signPsbts

Sign PSBT List

Method

async function signPsbts(
    psbtHex: string, 
    options: { autoFinalized: boolean },
): string[]

Params

  • psbtHexsrequired Array<string> the hex string of psbt to sign

  • optionsoptional object

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

Response

signedsArray<string>

Example

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

const psbtHexs = ["010203", "010203"]
const signeds = async provider.signPsbts(psbtHexs);

Demo

Last updated