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

Optional common params

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

  • messageHex - required string message to sign in hex text

Example

HardwareSDK.starcoinSignMessage(connectId, deviceId, {
    path: "m/44'/101010'/0'/0/0",
    message: "68656c6c6f776f726c64"
});

Result

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

Error

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

Last updated