You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let _createwallet_result:Value = test_client.bitcoind.client.call("createwallet",&["taproot_wallet".into(),true.into(),true.into(), serde_json::to_value("").unwrap(),false.into(),true.into(),true.into(),false.into()]).expect("created wallet");
1307
+
1308
+
let external_descriptor = wallet.get_descriptor_for_keychain(KeychainKind::External);
1309
+
1310
+
// TODO replace once bitcoind released with support for rust-bitcoincore-rpc PR 174
1311
+
let taproot_wallet_client = Client::new(&test_client.bitcoind.rpc_url_with_wallet("taproot_wallet"),Auth::CookieFile(test_client.bitcoind.params.cookie_file.clone())).unwrap();
1312
+
1313
+
let descriptor_info = taproot_wallet_client.get_descriptor_info(external_descriptor.to_string().as_str()).expect("descriptor info");
1314
+
1315
+
let import_descriptor_args = json!([{
1316
+
"desc": descriptor_info.descriptor,
1317
+
"active":true,
1318
+
"timestamp":"now",
1319
+
"label":"taproot key spend",
1320
+
}]);
1321
+
let _importdescriptors_result:Value = taproot_wallet_client.call("importdescriptors",&[import_descriptor_args]).expect("import wallet");
1322
+
let generate_to_address: bitcoin::Address = taproot_wallet_client.call("getnewaddress",&["test address".into(),"bech32m".into()]).expect("new address");
1323
+
let _generatetoaddress_result = taproot_wallet_client.generate_to_address(101,&generate_to_address).expect("generated to address");
1324
+
let send_to_address = wallet.get_address($crate::wallet::AddressIndex::New).unwrap().address.to_string();
1325
+
let change_address = wallet.get_address($crate::wallet::AddressIndex::New).unwrap().address.to_string();
1326
+
let send_addr_amounts = json!([{
1327
+
send_to_address:"0.4321"
1328
+
}]);
1329
+
let send_options = json!({
1330
+
"change_address": change_address,
1331
+
"psbt":true,
1332
+
});
1333
+
let send_result:Value = taproot_wallet_client.call("send",&[send_addr_amounts,Value::Null,"unset".into(),Value::Null, send_options]).expect("send psbt");
1334
+
let core_psbt = send_result["psbt"].as_str().expect("core psbt str");
1335
+
1336
+
use bitcoin::util::psbt::PartiallySignedTransaction;
0 commit comments