Quick Access
Coin Methods
Bitcoin
Miscellaneous
Methods
Other
getOwnershipId

Bitcoin: get Ownership identifier

Export SLIP-0019 ownership identifier. Read more

const result = await TrezorConnect.getOwnershipId(params);
Supported only by T2T1 with Firmware 2.4.4 or higher!

Params

Including CommonParams

GetOwnershipId

coin

String

Optional

determines network definition specified in coins.json file. Coin shortcut, name or label can be used. If coin is not set API will try to get network definition from path.

scriptType

"SPENDADDRESS" | "SPENDMULTISIG" | "SPENDWITNESS" | "SPENDP2SHWITNESS" | "SPENDTAPROOT"

Optional

used to distinguish between various address formats (non-segwit, segwit, etc.).

Bundle(GetOwnershipId)

Example

Display id of the first bitcoin address:

TrezorConnect.getOwnershipId({
    path: "m/86'/0'/0'/0/0",
});

Return a bundle of ids:

TrezorConnect.getOwnershipId({
    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

OwnershipId type

Result with single id:

{
    success: true,
    payload: {
        ownership_id: string,
        path: number[],
        serializedPath: string
    }
}

Result with bundle of ids sorted by FIFO

{
    success: true,
    payload: [
        { ownership_id: string, path: number[], serializedPath: string }, // taproot
        { ownership_id: string, path: number[], serializedPath: string }, // bech32
        { ownership_id: string, path: number[], serializedPath: string }  // segwit
    ]
}

Error

{
    success: false,
    payload: {
        error: string // error message
    }
}