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
path- requiredstring | Array<number>minimum length is3. read morepayload-AptosMessagePayloadtype with the following fields:address- optionalstringderived address from the pathchainId- optionalstringchain IDapplication- optionalstringDApp website URLnonce- requiredstringrandom numbermessage- requiredstringmessage 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
}
}