signPsbt

Sign PSBT

Method

async function signPsbt(
    psbtHex: string, 
    options: { autoFinalized: boolean },
): string

Params

  • psbtHexrequired string the hex string of psbt to sign

  • optionsoptional object

    • autoFinalizedoptional boolean: whether finalize psbt after signing, default is true

Response

signedstring

Example

const provider = (window.$onekey && window.$onekey.btc) || window.unisat;

const psbtHex = "010203"
const signed = async provider.signPsbt(psbtHex);

Demo

Last updated