> ## 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.

# validateMessageWithIdentityKey

> Verify a message signature against the wallet's identity key.

Validates a message signature against the wallet's identity key.

## Method Signature

```typescript theme={null}
async validateMessageWithIdentityKey(
  message: string,
  signature: string | Uint8Array
): Promise<boolean>
```

## Parameters

<ResponseField name="message" type="string" required>
  The original message that was signed
</ResponseField>

<ResponseField name="signature" type="string | Uint8Array" required>
  The signature to validate (hex string or bytes)
</ResponseField>

## Returns

<ResponseField name="valid" type="boolean" required>
  `true` if the signature is valid, `false` otherwise
</ResponseField>

## Example

```typescript theme={null}
const isValid = await wallet.validateMessageWithIdentityKey(
  "Hello, Spark!",
  "304402..."
);
console.log("Signature valid:", isValid);
```
