# `X402.AuthCapture.ETSStore`
[🔗](https://github.com/cardotrejos/x402/blob/v0.9.0/lib/x402/auth_capture/ets_store.ex#L1)

Volatile, serialized auth-capture store for development and tests.

A dedicated owner serializes mutations over a private ETS table. There is no
TTL, takeover, or eviction. Losing the owner loses all records and is unsafe
once payments exist. Do not restart an empty store against funded payments.
Production applications must implement `X402.AuthCapture.Store` with shared,
durable storage instead.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `fetch`
*since 0.9.0* 

```elixir
@spec fetch(GenServer.server(), term()) :: {:ok, X402.AuthCapture.Store.value()}
```

Reads one record from the owner.

# `start_link`
*since 0.9.0* 

```elixir
@spec start_link(keyword()) ::
  GenServer.on_start() | {:error, NimbleOptions.ValidationError.t()}
```

Starts a private store. The optional `:name` must be an atom.

# `transact`
*since 0.9.0* 

```elixir
@spec transact(GenServer.server(), term(), X402.AuthCapture.Store.mutation()) ::
  {:ok, term()} | {:error, term()}
```

Serializes a mutation; callback failure leaves the previous record intact.

# `transact_many`
*since 0.9.0* 

```elixir
@spec transact_many(
  GenServer.server(),
  [term()],
  X402.AuthCapture.Store.multi_mutation()
) ::
  {:ok, term()} | {:error, term()}
```

Serializes a multi-record snapshot and applies its selected writes atomically.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
