Doc Sync Agent Instructions
This repo contains documentation for Spark (https://spark.money).Repo Structure
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
@deprecatedin 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
- Multi-token support - IssuerSparkWallet methods now take
tokenIdentifierparameter - Object vs positional params - Many methods changed from positional to object params
- Async/await - Ensure examples have
awaitfor async methods - Type accuracy -
bigintfor token amounts,numberfor 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 |