btcGetPublicKey
Bitcoin: 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.btcGetPublicKey(connectId, deviceId, params);Params
Exporting single public key
path- requiredstring | Array<number>minimum length is1. read moreshowOnOneKey- optionalbooleandetermines if address will be displayed on device. Default is set totruecoin- optionalstringdetermines network definition specified in coins.json file. Coinshortcut,nameorlabelcan be used. Ifcoinis not set API will try to get network definition frompath.scriptType- optional InputScriptType, address script type
Exporting bundle of public keys
bundle-Arrayof Objects withpath,coinfields
Example
Return public key of fifth bitcoin account:
Return a bundle of public keys for multiple bitcoin 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?