# `Spectre.GAM.Id`
[🔗](https://github.com/elchemista/spectre/blob/0.4.0/lib/spectre/gam/id.ex#L1)

Generates opaque identifiers for operational ledger records.

Operational identifiers answer *which occurrence?* and use UUIDv7. Semantic
records answer *which value?* and therefore use their canonical content
digest instead; those references are created by the record modules, not here.

The source is explicit so callers at a boundary can substitute a deterministic
implementation in tests without making UUID generation part of the kernel.

# `source`

```elixir
@type source() :: module()
```

A module which supplies UUIDv7 values.

# `t`

```elixir
@type t() :: &lt;&lt;_::288&gt;&gt;
```

A canonical lowercase RFC 9562 UUIDv7 string.

# `generate`

```elixir
@spec generate(source()) :: t()
```

Generates and validates a UUIDv7 using `source`.

# `valid?`

```elixir
@spec valid?(term()) :: boolean()
```

Returns whether `value` is a canonical lowercase RFC 9562 UUIDv7.

---

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