mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-20 14:18:16 +01:00
2.1 KiB
2.1 KiB
Bitcoin: get Ownership proof
Export SLIP-0019 ownership proof. Read more
const result = await TrezorConnect.getOwnershipProof(params);
:note: Supported only by Trezor T with Firmware 2.4.4 or higher!
Params
Exporting single proof
path— requiredstring | Array<number>minimum length is5. read morecoin- optionalstringDetermines network definition specified in coins.json file. Coin
shortcut,nameorlabelcan be used.scriptType— optionalInputScriptTypeuserConfirmation— optionalbooleanownershipIds— optionalArray<string>commitmentData— optionalstringmultisig— optionalMultisigRedeemScriptTypepreauthorized— optionalbooleanread more
Exporting bundle of proofs
bundle-Arrayof Objects with fields listed above.
Example
Display ownership proof of the first bitcoin address:
TrezorConnect.getOwnershipProof({
path: "m/86'/0'/0'/0/0",
});
Return a bundle of ownership proofs:
TrezorConnect.getOwnershipProof({
bundle: [
{ path: "m/86'/0'/0'/0/0" }, // taproot
{ path: "m/84'/0'/0'/0/0" }, // bech32
{ path: "m/49'/0'/0'/0/0" }, // segwit
],
});
Result
Result with single proof:
{
success: true,
payload: {
ownership_proof: string,
signature: string
}
}
Result with bundle of proofs sorted by FIFO
{
success: true,
payload: [
{ ownership_proof: string, signature: string }, // taproot
{ ownership_proof: string, signature: string }, // bech32
{ ownership_proof: string, signature: string } // segwit
]
}
Error
{
success: false,
payload: {
error: string // error message
}
}