// lib/accounting/core/README.currency-snapshot.md

# Currency Snapshot (WP-01)

## Purpose

- Captures the base and transaction currency, exchange rate, and precision at posting time
- Ensures all FX and precision data is immutable and auditable
- Used in posting, migration, and audit scenarios

## Usage

- Use `snapshotCurrency(base, tx, rate, precision, asOf)` to create a currency snapshot
- Store the snapshot in every journal entry

## Example

```ts
const snapshot = snapshotCurrency('USD', 'SAR', 3.75, 2, new Date().toISOString());
```

---

> **Note:** Currency snapshot is mandatory for all posting and migration scenarios.
