> ## Documentation Index
> Fetch the complete documentation index at: https://prism-ddf93e61.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# diff_state

> Compares pre and post execution ledger states.

```rust theme={null}
pub fn diff_state(
    before: &LedgerState,
    after: &LedgerState
) -> Result<StateDiff, PrismError>
```

Produces a structured comparison of ledger entries, highlighting created, updated, and deleted keys.
