starcoinSignMessage
starcoin: sign message
Asks device to sign a message using the private key derived by given BIP32 path.
const result = await HardwareSDK.starcoinSignMessage(connectId, deviceId, params);Params
path— requiredstring | Array<number>minimum length is3. read moremessageHex- requiredstringmessage to sign in hex text
Example
// Original message
const message = "Hello World";
// Convert to hex
const messageHex = Buffer.from(message).toString('hex');
HardwareSDK.starcoinSignMessage(connectId, deviceId, {
path: "m/44'/101010'/0'/0/0",
message: messageHex
});Result
Error
Last updated
Was this helpful?