Skip to main content

aptosSignMessage

Use requirement

  • Firmware version required
    • UKey Lite 24 / UKey Lite 25: 1.1.0
    • UKey Core 26: 1.1.0

Aptos: sign message

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

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

Params

Optional common params

  • path - required string | Array<number> minimum length is 3. read more
  • payload - AptosMessagePayload type with the following fields:
    • address - optional string derived address from the path
    • chainId - optional string chain ID
    • application - optional string DApp website URL
    • nonce - required string random number
    • message - required string message text to sign

Example

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

Result

{
success: true,
payload: {
path: string, // derived path
fullMessage: string, // full signing message
signature: string, // signature result
address: string, // returned address
}
}

Error

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