cardanoSignMessage
Use requirement
Firmware version required
Touch: 4.1.0
Classic/Mini: 3.0.0
Cardano: sign message
Asks device to sign a message using the private key derived by given BIP32 path.
const result = await HardwareSDK.cardanoSignMessage(connectId, deviceId, params);Params
path— requiredstring | Array<number>minimum length is3. read moremessage- requiredstringmessage to sign in hex textnetworkId- requiredInteger1 for Mainnet, 0 for TestnetderivationType— optionalCardanoDerivationTypeenum. determines used derivation type. Default is set to ICARUS=1
Example
// Original message
const message = "Hello World";
// Convert to hex
const messageHex = Buffer.from(message).toString('hex');
HardwareSDK.cardanoSignMessage(connectId, deviceId, {
path: "m/1852'/1815'/0'/0/0",
message: messageHex,
networkId: 1
});Result
{
success: true,
payload: {
signature: string;
key: string;
}
}Error
{
success: false,
payload: {
error: string, // error message
code: number // error code
}
}Last updated
Was this helpful?