# `Ltix.Test.StorageAdapter`
[🔗](https://github.com/DecoyLex/ltix/blob/main/lib/ltix/test/storage_adapter.ex#L1)

In-memory `StorageAdapter` for tests.

Uses an `Agent` to store registrations, deployments, and nonces. Each
test should start its own adapter via `start_link/1` and register it
with `set_pid/1`.

## Manual usage

    {:ok, pid} = Ltix.Test.StorageAdapter.start_link(
      platforms: [platform]
    )
    Ltix.Test.StorageAdapter.set_pid(pid)

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `set_pid`

Register the adapter PID in the calling process.

Processes the caller starts, such as tasks and LiveViews, use the same
adapter.

# `start_link`

Start the storage adapter agent.

## Options

  * `:platforms` - list of `Ltix.Test.Platform` structs whose registration
    and deployment the adapter resolves (defaults to `[]`)
  * `:registrations` - list of structs implementing `Ltix.Registerable`
    that have no deployment (defaults to `[]`)

# `tool_jwk`

```elixir
@spec tool_jwk() :: Ltix.JWK.t()
```

Return the key the adapter signs with.

The key is generated the first time it is needed, and signing works
without starting the adapter.

---

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