starcoinGetPublicKey

Starcoin: get public key

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.starcoinGetPublicKey(connectId, deviceId, params);

Params

Optional common params

Exporting single public key

  • pathrequired string | Array<number> minimum length is 1. read more

  • showOnOneKeyoptional boolean determines if address will be displayed on device. Default is set to true

Exporting bundle of public keys

  • bundle - Array of Objects with path, showOnOneKey fields

Example

Return public key of fifth starcoin account:

HardwareSDK.starcoinGetPublicKey(connectId, deviceId, {
    path: "m/101010'/0'/0'",
    showOnOneKey: true
});

Return a bundle of public keys for multiple starcoin accounts:

Result

Result with only one public key

Read more about BIP32 serialization format

Result with bundle of public keys

Error

Last updated

Was this helpful?