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.
Summary
Functions
Returns a specification to start this module under a supervisor.
Reads one record from the owner.
Starts a private store. The optional :name must be an atom.
Serializes a mutation; callback failure leaves the previous record intact.
Serializes a multi-record snapshot and applies its selected writes atomically.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec fetch(GenServer.server(), term()) :: {:ok, X402.AuthCapture.Store.value()}
Reads one record from the owner.
@spec start_link(keyword()) :: GenServer.on_start() | {:error, NimbleOptions.ValidationError.t()}
Starts a private store. The optional :name must be an atom.
@spec transact(GenServer.server(), term(), X402.AuthCapture.Store.mutation()) :: {:ok, term()} | {:error, term()}
Serializes a mutation; callback failure leaves the previous record intact.
@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.