# `Attesto.MapParams`
[🔗](https://github.com/XukuLLC/attesto/blob/v2.1.0/lib/attesto/map_params.ex#L1)

Shared helpers for reading and validating protocol map parameters.

Wallet builders and parsers use these helpers at the boundary where caller
input may use atom or string keys. The helpers keep that boundary behavior
consistent while protocol-specific validation remains with each caller.

# `ensure_keyword!`

```elixir
@spec ensure_keyword!(term()) :: keyword()
```

Return a keyword list or raise an `ArgumentError`.

# `fetch`

```elixir
@spec fetch(map(), atom()) :: term() | nil
```

Fetch a value by atom key, falling back to its string spelling.

# `optional_string!`

```elixir
@spec optional_string!(term(), term()) :: String.t()
```

Return a non-empty binary or raise an `ArgumentError`.

# `put_optional`

```elixir
@spec put_optional(map(), term(), term()) :: map()
```

Put `value` into `map` unless it is nil.

# `put_optional`

```elixir
@spec put_optional(map(), term(), term(), (term(), term() -&gt; term())) :: map()
```

Put a normalized non-nil value into `map`.

# `required_string!`

```elixir
@spec required_string!(term(), term()) :: String.t()
```

Raise unless `value` is a non-empty binary.

# `string_keyed_map`

```elixir
@spec string_keyed_map(map()) :: map()
```

Convert atom keys in a map to strings, without recursing into values.

# `string_list!`

```elixir
@spec string_list!(term(), term()) :: [String.t()]
```

Return a list of binaries or raise an `ArgumentError`.

---

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