Skip to main content
Validates a message signature against the wallet’s identity key.

Method Signature

async validateMessageWithIdentityKey(
  message: string,
  signature: string | Uint8Array
): Promise<boolean>

Parameters

message
string
required
The original message that was signed
signature
string | Uint8Array
required
The signature to validate (hex string or bytes)

Returns

valid
boolean
required
true if the signature is valid, false otherwise

Example

const isValid = await wallet.validateMessageWithIdentityKey(
  "Hello, Spark!",
  "304402..."
);
console.log("Signature valid:", isValid);