Signs a message with the wallet’s identity key.
Method Signature
async signMessageWithIdentityKey(
message: string,
compact?: boolean
): Promise<string>
Parameters
Whether to use compact encoding. If false, uses DER encoding.
Returns
The signature as a hex string
Example
const signature = await wallet.signMessageWithIdentityKey("Hello, Spark!");
console.log("Signature:", signature);
// Compact encoding
const compactSig = await wallet.signMessageWithIdentityKey("Hello", true);