Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.spark.money/llms.txt

Use this file to discover all available pages before exploring further.

Signs a message with the wallet’s identity key.

Method Signature

async signMessageWithIdentityKey(
  message: string,
  compact?: boolean
): Promise<string>

Parameters

message
string
required
The message to sign
compact
boolean
Whether to use compact encoding. If false, uses DER encoding.

Returns

signature
string
required
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);