benfenGetPublicKey
Benfen: get public key
Get public key from device using BIP32 path.
Use requirement
Firmware version required
pro: 4.12.0
const result = await HardwareSDK.benfenGetPublicKey(connectId, deviceId, {
path: "m/44'/728'/0'/0'/0'",
showOnOneKey: false
});
Params
Optional common params
path
— requiredstring | Array<number>
minimum length is3
. read moreshowOnOneKey
- optionalboolean
whether to display public key on device
Returns:
success: boolean - True if successful
payload:
path: string - BIP32 path used
pub: string - Public key in hex format
Example:
const params = {
path: "m/44'/728'/0'/0'/0'",
showOnOneKey: false
};
// Single public key
const response = await HardwareSDK.benfenGetPublicKey(connectId, deviceId, params);
// Batch public keys
const batchParams = {
bundle: [
{
path: "m/44'/728'/0'/0'/0'",
showOnOneKey: false
},
{
path: "m/44'/728'/1'/0'/0'",
showOnOneKey: false
}
]
};
const batchResponse = await HardwareSDK.benfenGetPublicKey(connectId, deviceId, batchParams);
Last updated
Was this helpful?