Class: LedgerExportPublicKey

ledger.LedgerExportPublicKey(bip32Path, includeXFP)

Returns the public key at a given BIP32 path.

Constructor

new LedgerExportPublicKey(bip32Path, includeXFP)

Parameters:
Name Type Description
bip32Path string

the BIP32 path for the HD node

includeXFP boolean

return xpub with root fingerprint concatenated

Source:
Example
import {LedgerExportPublicKey} from "unchained-wallets";
const interaction = new LedgerExportPublicKey({bip32Path: "m/48'/0'/0'/2'/0"});
const publicKey = await interaction.run();
console.log(publicKey);
// "03..."

Extends

  • module:ledger.LedgerExportHDNode

Methods

parsePublicKey(publicKey) → {string}

Compress the given public key.

Parameters:
Name Type Description
publicKey string

the uncompressed public key in hex

Source:
Returns:
  • the compressed public key in hex
Type
string

(async) run() → {string|Object}

Parses out and compresses the public key from the response of LedgerExportHDNode.

Source:
Returns:

(compressed) public key in hex (returns object if asked to include root fingerprint)

Type
string | Object