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

# CLAUDE

# Doc Sync Agent Instructions

This repo contains documentation for Spark ([https://spark.money](https://spark.money)).

## Repo Structure

```
issuance/           # Token issuance tutorials (IssuerSparkWallet)
wallets/            # Wallet tutorials (SparkWallet)
api-reference/
  wallet/           # SparkWallet method reference
  issuer/           # IssuerSparkWallet method reference
learn/              # Conceptual docs (architecture, trust model)
quickstart/         # Getting started guides
```

## SDK Source of Truth

The Spark SDKs are the source of truth:

* **SparkWallet**: `sdks/js/packages/spark-sdk/src/spark-wallet/spark-wallet.ts`
* **IssuerSparkWallet**: `sdks/js/packages/issuer-sdk/src/issuer-wallet/issuer-spark-wallet.ts`

## Sync Rules

### Method Signatures

* Parameter names must match SDK EXACTLY
* Types must match EXACTLY (bigint vs number matters)
* Optional parameters must be marked correctly
* Return types must match

### Deprecations

* Methods marked `@deprecated` in SDK need `<Warning>**Deprecated**...</Warning>` in docs
* Link to the replacement method

### Code Examples

* Must use correct parameter syntax
* Object-style params: `method({ param1, param2 })`
* Positional params: `method(param1, param2)`

## Common Issues to Check

1. **Multi-token support** - IssuerSparkWallet methods now take `tokenIdentifier` parameter
2. **Object vs positional params** - Many methods changed from positional to object params
3. **Async/await** - Ensure examples have `await` for async methods
4. **Type accuracy** - `bigint` for token amounts, `number` for sats

## Files to Compare

When syncing, always compare:

| Doc File                     | SDK Source               |
| ---------------------------- | ------------------------ |
| `api-reference/wallet/*.mdx` | `spark-wallet.ts`        |
| `api-reference/issuer/*.mdx` | `issuer-spark-wallet.ts` |
| `issuance/*.mdx`             | `issuer-spark-wallet.ts` |
| `wallets/*.mdx`              | `spark-wallet.ts`        |
