Skip to main content

cardanoGetPublicKey

Use requirement

  • Firmware version required
    • UKey Lite 24 / UKey Lite 25: 3.0.0
    • UKey Core 26: 4.1.0

Cardano: get public key

Retrieves BIP32-Ed25529 extended public derived by given BIP32-Ed25519 path. User is presented with a description of the requested key and asked to confirm the export.

const result = await HardwareSDK.cardanoGetPublicKey(
connectId,
deviceId,
params,
);

Params

Optional common params

Exporting single public key

  • path - required string | Array<number> minimum length is 1. read more
  • showOnUKey - optional boolean determines if address will be displayed on device. Default is set to true
  • derivationType - optional CardanoDerivationType enum. determines used derivation type. Default is set to ICARUS=1

Exporting bundle of public keys

  • bundle - Array of Objects with path, showOnUKey fields

Example

Return public key of first cardano account:

HardwareSDK.aptosGetPublicKey(connectId, deviceId, {
path: "m/1852'/1815'/0'/0/0",
showOnUKey: true,
});

Return a bundle of public keys for multiple cardano accounts:

HardwareSDK.cardanoGetPublicKey(connectId, deviceId, {
bundle: [
{ path: "m/1852'/1815'/0'/0/0" }, // account 1
{ path: "m/1852'/1815'/1'/0/0" }, // account 2
{ path: "m/1852'/1815'/2'/0/0" }, // account 3
],
});

Result

Result with only one public key

{
success: true,
payload: {
path: Array<number>, // hardended path
serializedPath: string,
publicKey: string,
node: HDPubNode,
}
}

Error

{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}