Cardano: get public key
Retrieves BIP32-Ed25519 extended public derived by given BIP32-Ed25519 path. User is presented with a description of the requested key and asked to confirm the export on Trezor.
const result = await TrezorConnect.cardanoGetPublicKey(params);Params
CardanoGetPublicKey
path
String | Array<Number>
minimum length is 3. read more
showOnTrezor
Boolean
determines if publick key will be displayed on device. Default is set to true
suppressBackupWarning
Boolean
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
Display the result in chunks for better readability. Default is false
and
derivationType
Enum: LEDGER (0) | ICARUS (1) | ICARUS_TREZOR (2)
enum. determines used derivation type. Default is set to ICARUS_TREZOR=2
Bundle(CardanoGetPublicKey)
Example
Display public key of first cardano account:
TrezorConnect.cardanoGetPublicKey({
path: "m/44'/1815'/0'",
});Return a bundle of cardano public keys without displaying them on device:
TrezorConnect.cardanoGetPublicKey({
bundle: [
{ path: "m/44'/1815'/0'", showOnTrezor: false }, // account 1
{ path: "m/44'/1815'/1'", showOnTrezor: false }, // account 2
{ path: "m/44'/1815'/2'", showOnTrezor: false }, // account 3
],
});Result
Result with only one public key
{
success: true,
payload: {
path: Array<number>, // hardended path
serializedPath: string,
publicKey: string,
node: HDPubNode,
}
}Result with a bundle of public keys
{
success: true,
payload: [
{ path: Array<number>, serializedPath: string, publicKey: string, node: HDPubNode }, // account 1
{ path: Array<number>, serializedPath: string, publicKey: string, node: HDPubNode}, // account 2
{ path: Array<number>, serializedPath: string, publicKey: string, node: HDPubNode } // account 3
]
}Error
{
success: false,
payload: {
error: string // error message
}
}