alephiumSignMessage

Use requirement

  • Firmware version required

    • Touch: 4.10.0

Alephium: sign message

Sign a message using the private key derived by given BIP32 path. User needs to confirm the action on OneKey device.

const result = await HardwareSDK.alephiumSignMessage(connectId, deviceId, {
    path: "m/44'/1234'/0'/0/0",
    messageHex: "68656c6c6f",  // "Hello Alephium" in hex
    messageType: "alephium"
});

Params

Optional common params

  • pathrequired string | Array<number> minimum length is 3

  • messageHexrequired string message to sign in hexadecimal format

  • messageTypeoptional string type of message signing algorithm (default: "alephium")

Example

const response = await HardwareSDK.alephiumSignMessage(connectId, deviceId, {
    path: "m/44'/1234'/0'/0/0",
    messageHex: "68656c6c6f",
    messageType: "alephium"
});

Result

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

Error

{
    success: false,
    payload: {
        error: string, // error message
        code: number // error code
    }
}

Last updated