API reference
| API | What it is |
|---|---|
AnvilOptions | fluent, validated configuration of every anvil flag, in groups (.account, .evm, .fork, .mining, .logs, .network, .server, .state) |
| Flag rules | conflicts and dependencies between flags |
AnvilContainer | the Testcontainers module: options + test client settings → a started node |
StartedAnvilContainer | a running node: test client, cheats, account/transaction/time/state helpers |
| Test client | AnvilTestClient: every viem test, public and wallet action, bound to the node |
| anvil extras | AnvilActions: anvil RPC methods viem doesn't wrap, strict reset / revert |
| Cheats | AnvilCheats: fluent, awaitable chains of state changes |
TestClientOptions | transport, polling, retries, batching, default account, chain metadata |
useAnvil() | test lifecycle hooks with per-test isolation |
| Errors | error classes and AnvilTestClientError codes |
| Exports | functions, enums, constants and types |
Code samples for every member are on the task pages; tables
marked generated are produced from the library itself by pnpm docs:sync.