suiSignMessage
Use requirement
- Firmware version required
- UKey Lite 24 / UKey Lite 25: 1.1.0
- UKey Core 26: 1.1.0
Sui: sign message
Asks the device to sign a message using the private key derived from the given BIP32 path.
const result = await HardwareSDK.suiSignMessage(connectId, deviceId, params);
Params
path- requiredstring | Array<number>minimum array length is3. read moremessageHex- requiredstringmessage to sign in hexadecimal text format.
Example
// Original message content
const message = "Hello Sui";
// Convert to hex
const messageHex = Buffer.from(message).toString("hex");
HardwareSDK.suiSignMessage(connectId, deviceId, {
path: "m/44'/784'/1'/0'/0'",
messageHex,
});
Result
{
success: true,
payload: {
address: string, // returned signing address
signature: string, // signature result in hexadecimal format
}
}
Error
{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}