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 #755: Be able to fund transactions with peg-ins specified
00eb6c0 Test funding peg-in psbt (Andrew Chow)
1ce74e0 Be able to fund transactions with peg-ins (Andrew Chow)
74c4d37 Tests for fundrawtransaction with external inputs (Andrew Chow)
c258746 allow fundtx rpcs to work with external inputs (Andrew Chow)
9486cdf Give a better error when tx size estimation fails (Andrew Chow)
8258aaa Allow Coin Selection be able to take external inputs (Andrew Chow)
698340b Allow CInputCoin to also be constructed with COutPoint and CTxOut (Andrew Chow)
Pull request description:
Allows `fundrawtransaction` and `walletcreatefundedpsbt` to take transactions with pre-selected peg-in inputs and take them into account when selecting additional inputs to meet the output amounts.
As a side effect, those RPCs will also now allow pre-selected non-wallet inputs so long as the correct additional solving data is provided (scripts and pubkeys are needed to estimate the size for transaction fees).
Based on #751
Ports bitcoin/bitcoin#17211 with some modification to work with elements outputs and such.
Tree-SHA512: 813202adfe2b63780bea01b02975dda393197a489a6c1a9590908ac7252d1d0e5f0984125fbfd1dc271524ddad84dc1778a1e8fa447e61235c7f21c6e6999460
{"iswitness", RPCArg::Type::BOOL, /* default */"depends on heuristic tests", "Whether the transaction hex is a serialized witness transaction \n"
3408
3478
" If iswitness is not present, heuristic tests will be used in decoding"},
3479
+
{"solving_data", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED_NAMED_ARG, "Keys and scripts needed for producing a final transaction with a dummy signature. Used for fee estimation during coin selection.\n",
3480
+
{
3481
+
{"pubkeys", RPCArg::Type::ARR, /* default */"empty array", "A json array of public keys.\n",
3482
+
{
3483
+
{"pubkey", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "A public key"},
3484
+
},
3485
+
},
3486
+
{"scripts", RPCArg::Type::ARR, /* default */"empty array", "A json array of scripts.\n",
3487
+
{
3488
+
{"script", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "A script"},
3489
+
},
3490
+
},
3491
+
{"descriptors", RPCArg::Type::ARR, /* default */"empty array", "A json array of descriptors.\n",
3492
+
{
3493
+
{"descriptor", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "A descriptor"},
{"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The transaction id"},
4595
4684
{"vout", RPCArg::Type::NUM, RPCArg::Optional::NO, "The output number"},
4596
4685
{"sequence", RPCArg::Type::NUM, RPCArg::Optional::NO, "The sequence number"},
4686
+
{"pegin_bitcoin_tx", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The raw bitcoin transaction (in hex) depositing bitcoin to the mainchain_address generated by getpeginaddress"},
4687
+
{"pegin_txout_proof", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "A rawtxoutproof (in hex) generated by the mainchain daemon's `gettxoutproof` containing a proof of only bitcoin_tx"},
4688
+
{"pegin_claim_script", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The witness program generated by getpeginaddress."},
{"bip32derivs", RPCArg::Type::BOOL, /* default */"false", "If true, includes the BIP 32 derivation paths for public keys if we know them"},
4737
+
{"solving_data", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED_NAMED_ARG, "Keys and scripts needed for producing a final transaction with a dummy signature. Used for fee estimation during coin selection.\n",
4738
+
{
4739
+
{"pubkeys", RPCArg::Type::ARR, /* default */"empty array", "A json array of public keys.\n",
4740
+
{
4741
+
{"pubkey", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "A public key"},
4742
+
},
4743
+
},
4744
+
{"scripts", RPCArg::Type::ARR, /* default */"empty array", "A json array of scripts.\n",
4745
+
{
4746
+
{"script", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "A script"},
4747
+
},
4748
+
},
4749
+
{"descriptors", RPCArg::Type::ARR, /* default */"empty array", "A json array of descriptors.\n",
4750
+
{
4751
+
{"descriptor", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "A descriptor"},
0 commit comments