- Firmware version required
- Touch: 4.10.0
Signs a message using the private key derived by given BIP32 path.
// Original message
const message = "Hello World";
// Convert to hex
const messageHex = Buffer.from(message).toString('hex');
const response = await HardwareSDK.scdoSignMessage(connectId, deviceId, {
path: "m/44'/541'/0'/0/0",
messageHex: messageHex
});
Params
Optional common params
path
— requiredstring | Array<number>
minimum length is 3. read moremessageHex
— requiredstring
message to sign in hex format
Example
// Original message
const message = "Hello World";
// Convert to hex
const messageHex = Buffer.from(message).toString('hex');
const response = await HardwareSDK.scdoSignMessage(connectId, deviceId, {
path: "m/44'/541'/0'/0/0",
messageHex,
});
Result
{
success: true,
payload: {
signature: string,
address: string
}
}
Error
{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}