- Firmware version required
- Touch: 3.0.0
- Classic/Mini: 2.6.0
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.aptosGetPublicKey(connectId, deviceId, params);
path
— requiredstring | Array<number>
minimum length is1
. read moreshowOnOneKey
— optionalboolean
determines if address will be displayed on device. Default is set totrue
bundle
-Array
of Objects withpath
,showOnOneKey
fields
Return public key of fifth aptos account:
HardwareSDK.aptosGetPublicKey(connectId, deviceId, {
path: "m/44'/637'/0'/0'/0'",
showOnOneKey: true
});
Return a bundle of public keys for multiple aptos accounts:
HardwareSDK.aptosGetPublicKey(connectId, deviceId, {
bundle: [
{ path: "m/637'/0'/0'/0'/0'" }, // account 1
{ path: "m/637'/0'/1'/0'/0'" }, // account 2
{ path: "m/637'/0'/2'/0'/0'" } // account 3
]
});
Result with only one public key
{
success: true,
payload: {
path: string, // hardended path
publicKey: string
}
}
Read more about BIP32 serialization format
Result with bundle of public keys
{
success: true,
payload: [
{ path: serializedPath, publicKey }, // account 1
{ path: serializedPath, publicKey }, // account 2
{ path: serializedPath, publicKey }, // account 3
]
}
Error
{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}