Method testing tool
Tezos: get public key
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.
const result = await TrezorConnect.tezosGetPublicKey(params);
Params
Including CommonParams
GetPublicKey
path
String | Array<Number>
Required
minimum length is 3
. read more
showOnTrezor
Boolean
Optional
determines if public key will be displayed on device.
suppressBackupWarning
Boolean
Optional
By default, this method will emit an event to show a warning if the wallet does not have a backup. This option suppresses the message.
chunkify
Boolean
Optional
determines if address will be displayed in chunks of 4 characters. Default is set to false
Bundle(GetPublicKey)
Example
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
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
}
}