Display requested public key on device and returns it to caller. User is presented with a description of the requested public key and asked to confirm the export.
ES6
const result = await TrezorConnect.tezosGetPublicKey(params);
CommonJS
TrezorConnect.tezosGetPublicKey(params).then(function(result) {
});
path
— requiredstring | Array<number>
minimum length is3
. read moreshowOnTrezor
— optionalboolean
determines if public key will be displayed on device.
bundle
-Array
of Objects withpath
andshowOnTrezor
fields
Result with only one public key
TrezorConnect.tezosGetPublicKey({
path: "m/49'/1729'/0'",
});
Result with bundle of public keys
TrezorConnect.tezosGetPublicKey({
bundle: [
{ path: "m/49'/1729'/0'" }, // account 1
{ path: "m/49'/1729'/1'" }, // account 2
{ path: "m/49'/1729'/2'" } // account 3
]
});
Result with only one public key
{
success: true,
payload: {
publicKey: string,
path: Array<number>,
serializedPath: string,
}
}
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
}
}