walletcreatefundedpsbt
walletcreatefundedpsbt ( [{"txid":"hex","vout":n,"sequence":n},...] ) [{"address":amount},{"data":"hex"},...] ( locktime options bip32derivs )
Creates and funds a transaction in the Partially Signed Transaction (PSBT) format, implementing both the Creator and Updater roles.
Argument #1 – inputs
Type: json array, optional
Leave empty to add inputs automatically. See add_inputs option.
Argument #2 – outputs
Type: json array, required
- The outputs are key-value pairs where no keys can be duplicated.
-
Each address can only appear once, and only one ‘data’ object is allowed. For convenience, a dictionary holding the key-value pairs directly is also accepted as the second parameter.
Argument #3 – locktime
Type: numeric, optional, default=0
Raw locktime. Non-0 value also locktime-activates inputs
Argument #4 – options
Optional Parameters:
-
“replaceable”: bool, optional, default=wallet default
Marks the transaction as BIP125 replaceable, allowing it to be replaced with a transaction that has higher fees. -
“conf_target”: numeric, optional, default=wallet
-txconfirmtarget
The confirmation target in blocks. -
“estimate_mode”: string, optional, default=unset
The fee estimate mode, which must be one of the following (case insensitive):"unset"
"economical"
"conservative"
Argument #5 – bip32derivs
Type: boolean, optional, default=true
Includes BIP 32 derivation paths for public keys if they are known.
Result
Examples
Create a transaction with no inputs: