Skip to content

Latest commit

 

History

History
65 lines (51 loc) · 1.34 KB

File metadata and controls

65 lines (51 loc) · 1.34 KB

aptosSignMessage

Use requirement

  • Firmware version required
    • Touch: 3.0.0
    • Classic/Mini: 2.6.0

Aptos: sign message

Asks device to sign a message using the private key derived by given BIP32 path.

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

Params

Optional common params

  • pathrequired string | Array<number> minimum length is 3. read more
  • payload - AptosMessagePayload type
    • address - optional string of path Derived address
    • chainId - optional string of the id of the chain
    • application - optional string of DApp web site url
    • nonce - required string of random number
    • message - required string message to sign text

Example

HardwareSDK.aptosSignMessage(connectId, deviceId, {
    path: "m/44'/637'/0'/0'/0'",
    payload: {
        nonce: "1",
        message: "hello world"
    }
});

Result

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

Error

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