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
Merge bitcoin/bitcoin#17211: Allow fundrawtransaction and walletcreatefundedpsbt to take external inputs
928af61 allow send rpc take external inputs and solving data (Andrew Chow)
e39b5a5 Tests for funding with external inputs (Andrew Chow)
38f5642 allow fundtx rpcs to work with external inputs (Andrew Chow)
d5cfb86 Allow Coin Selection be able to take external inputs (Andrew Chow)
a00eb38 Allow CInputCoin to also be constructed with COutPoint and CTxOut (Andrew Chow)
Pull request description:
Currently `fundrawtransaction` and `walletcreatefundedpsbt` both do not allow external inputs as the wallet does not have the information necessary to estimate their fees.
This PR adds an additional argument to both those RPCs which allows the user to specify solving data. This way, the wallet can use that solving data to estimate the size of those inputs. The solving data can be public keys, scripts, or descriptors.
ACKs for top commit:
prayank23:
reACK bitcoin/bitcoin@928af61
meshcollider:
Re-utACK 928af61
instagibbs:
crACK 928af61
yanmaani:
utACK 928af61.
Tree-SHA512: bc7a6ef8961a7f4971ea5985d75e2d6dc50c2a90b44c664a1c4b0f1be5c1c97823516358fdaab35771a4701dbefc0862127b1d0d4bfd02b4f20d2befa4434700
{"conf_target", RPCArg::Type::NUM, RPCArg::DefaultHint{"wallet -txconfirmtarget"}, "Confirmation target in blocks"},
3358
3422
{"estimate_mode", RPCArg::Type::STR, RPCArg::Default{"unset"}, std::string() + "The fee estimate mode, must be one of (case insensitive):\n"
3359
3423
"\"" + FeeModes("\"\n\"") + "\""},
3424
+
{"solving_data", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED_NAMED_ARG, "Keys and scripts needed for producing a final transaction with a dummy signature.\n"
3425
+
"Used for fee estimation during coin selection.",
3426
+
{
3427
+
{"pubkeys", RPCArg::Type::ARR, RPCArg::Default{UniValue::VARR}, "Public keys involved in this transaction.",
3428
+
{
3429
+
{"pubkey", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "A public key"},
3430
+
},
3431
+
},
3432
+
{"scripts", RPCArg::Type::ARR, RPCArg::Default{UniValue::VARR}, "Scripts involved in this transaction.",
3433
+
{
3434
+
{"script", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "A script"},
3435
+
},
3436
+
},
3437
+
{"descriptors", RPCArg::Type::ARR, RPCArg::Default{UniValue::VARR}, "Descriptors that provide solving data for this transaction.",
3438
+
{
3439
+
{"descriptor", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "A descriptor"},
3440
+
},
3441
+
}
3442
+
}
3443
+
},
3360
3444
},
3361
3445
"options"},
3362
3446
{"iswitness", RPCArg::Type::BOOL, RPCArg::DefaultHint{"depends on heuristic tests"}, "Whether the transaction hex is a serialized witness transaction.\n"
@@ -4202,6 +4286,26 @@ static RPCHelpMan send()
4202
4286
},
4203
4287
{"replaceable", RPCArg::Type::BOOL, RPCArg::DefaultHint{"wallet default"}, "Marks this transaction as BIP125 replaceable.\n"
4204
4288
"Allows this transaction to be replaced by a transaction with higher fees"},
4289
+
{"solving_data", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED_NAMED_ARG, "Keys and scripts needed for producing a final transaction with a dummy signature.\n"
4290
+
"Used for fee estimation during coin selection.",
4291
+
{
4292
+
{"pubkeys", RPCArg::Type::ARR, RPCArg::Default{UniValue::VARR}, "Public keys involved in this transaction.",
4293
+
{
4294
+
{"pubkey", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "A public key"},
4295
+
},
4296
+
},
4297
+
{"scripts", RPCArg::Type::ARR, RPCArg::Default{UniValue::VARR}, "Scripts involved in this transaction.",
4298
+
{
4299
+
{"script", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "A script"},
4300
+
},
4301
+
},
4302
+
{"descriptors", RPCArg::Type::ARR, RPCArg::Default{UniValue::VARR}, "Descriptors that provide solving data for this transaction.",
4303
+
{
4304
+
{"descriptor", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "A descriptor"},
{"conf_target", RPCArg::Type::NUM, RPCArg::DefaultHint{"wallet -txconfirmtarget"}, "Confirmation target in blocks"},
4547
4653
{"estimate_mode", RPCArg::Type::STR, RPCArg::Default{"unset"}, std::string() + "The fee estimate mode, must be one of (case insensitive):\n"
4548
4654
"\"" + FeeModes("\"\n\"") + "\""},
4655
+
{"solving_data", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED_NAMED_ARG, "Keys and scripts needed for producing a final transaction with a dummy signature.\n"
4656
+
"Used for fee estimation during coin selection.",
4657
+
{
4658
+
{"pubkeys", RPCArg::Type::ARR, RPCArg::Default{UniValue::VARR}, "Public keys involved in this transaction.",
4659
+
{
4660
+
{"pubkey", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "A public key"},
4661
+
},
4662
+
},
4663
+
{"scripts", RPCArg::Type::ARR, RPCArg::Default{UniValue::VARR}, "Scripts involved in this transaction.",
4664
+
{
4665
+
{"script", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "A script"},
4666
+
},
4667
+
},
4668
+
{"descriptors", RPCArg::Type::ARR, RPCArg::Default{UniValue::VARR}, "Descriptors that provide solving data for this transaction.",
4669
+
{
4670
+
{"descriptor", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "A descriptor"},
4671
+
},
4672
+
}
4673
+
}
4674
+
},
4549
4675
},
4550
4676
"options"},
4551
4677
{"bip32derivs", RPCArg::Type::BOOL, RPCArg::Default{true}, "Include BIP 32 derivation paths for public keys if we know them"},
0 commit comments