polkadotGetAddress
Use requirement
Firmware version required
Touch: 4.3.0
Classic/Mini: 3.0.0
Joystream Chain Firmware version required
Touch: 4.7.0
Classic/Mini: 3.6.0
Manta Chain Firmware version required
Touch: 4.9.0
Classic/Mini: 3.7.0
Polkadot: get address
Retrieves BIP32 extended public derived by given BIP32 path. User is presented with a description of the requested key and asked to confirm the export.
const result = await HardwareSDK.polkadotGetAddress(connectId, deviceId, params);
Params
Exporting single public key
path
— requiredstring | Array<number>
minimum length is3
. read moreprefix
- requiredstring
Address prefix. Default is set tonexatest
network
- requiredstring
Network name, Default is set topolkadot
showOnOneKey
— optionalboolean
determines if address will be displayed on device. Default is set totrue
Exporting bundle of public keys
bundle
-Array
of Objects withpath
,coin
fields
Example
Return public key of first ethereum account:
HardwareSDK.polkadotGetAddress(connectId, deviceId, {
path: "m/44'/354'/0'/0'/0'",
showOnOneKey: true,
isTestnet: false
});
Return a bundle of public keys for multiple ethereum accounts:
HardwareSDK.polkadotGetAddress(connectId, deviceId, {
bundle: [
{ path: "m/44'/354'/0'/0'/1'" }, // account 1
{ path: "m/44'/354'/0'/0'/2'" }, // account 2
{ path: "m/44'/354'/0'/0'/3'" } // account 3
]
});
Result
Result with only one public key
{
success: true,
payload: {
path: Array<number>, // hardended path
address: string, // address
publicKey: string, // publicKey
}
}
Result with bundle of public keys
{
success: true,
payload: [
{ path, address, publicKey }, // account 1
{ path, address, publicKey }, // account 2
{ path, address, publicKey }, // account 3
]
}
Error
{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}
Last updated
Was this helpful?