tronSignMessage
TRON: sign message
Asks device to sign a message using the private key derived by given BIP32 path.
const result = await HardwareSDK.tronSignMessage(connectId, deviceId, params);Params
path- requiredstring | Array<number>minimum length is3. read moremessageHex- requiredstringmessage to sign in hex textmessageType- optionalstringTRON message signing algorithm type. Recommended'v2'for better compatibility and security. Allowed:'v1' | 'v2'. Unless you have a legacy constraint, use'v2'.
Example
// Original message
const message = "Hello World";
// Convert to hex
const messageHex = Buffer.from(message).toString('hex');
HardwareSDK.tronSignMessage(connectId, deviceId, {
path: "m/44'/195'/0'/0/0",
messageHex,
messageType: 'v2'
});Result
Error
Last updated
Was this helpful?