Skip to Content
Hardware
On this page

tronSignMessage

TRON: sign message

Requests a message signature using the key derived from the specified path.

const result = await HardwareSDK.tronSignMessage(connectId, deviceId, params);

Params

Optional common params

  • path - required string | Array<number> SDK minimum length is 3. Path format

  • messageHex - required string Message to sign, encoded as a hexadecimal string.

  • messageType - "V2". Pass this explicitly: the current runtime rejects omitted values and legacy "V1" requests. The public type still includes both values.

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

{ success: true, payload: { signature: string; address: string; } }

Error

{ success: false, payload: { error: string, // error message code?: string | number // error code } }
Last updated on