signPsbt
This method will traverse all inputs that match the current address to sign.
Wallet & Address Type Compatibility
Software Wallet
-
p2wpkh (Native Segwit), p2tr (Taproot)
Hardware Wallet
Pro, Classic1S
p2tr (Taproot)
Method
Params
psbtHex
— requiredstring
the hex string of psbt to signoptions
— optionalobject
autoFinalized
— optionalboolean
: whether finalize psbt after signing, default istrue
toSignInputs
— optionalArray
: specify which inputs to signindex
— requirednumber
: which input to signaddress
— optionalstring
: (specify either address or publicKey) which corresponding private key to use for signingpublicKey
— optionalstring
: (specify either address or publicKey) which corresponding private key to use for signingsighashTypes
— optionalnumber[]
: optional sighash types for the inputdisableTweakSigner
— optionalboolean
: default is false. Set true to use original private key when signing taproot inputsuseTweakedSigner
— optionalboolean
: force whether to use tweaked signer. Higher priority than disableTweakSigner
Returns
Promise<string>
— the hex string of signed psbt
Example
Demo
Last updated