Bounded caller uniqueness and exclusive retention end in Unix seconds.
Retention ends above 253,402,300,799 reject because no accepted sweep clock can evict them. Stores reject invalid claims with their existing failure.
Summary
Functions
Validate the bounded shape of a replay claim without claiming or storing it.
Types
Functions
Validate the bounded shape of a replay claim without claiming or storing it.
Validation does not check a clock, require a future retention end, derive uniqueness, or establish replay protection. Stores enforce the exclusive Unix-second retention end when claiming.
Parameters
claim- any term. Only aRequestSeal.Replay.Claimstruct with exactly its three fields can pass:namespaceandkeybinaries of 1–256 bytes each (UTF-8 not required) and an integerretain_untilfrom -9,223,372,036,854,775,808 through 253,402,300,799. Negative ends remain valid already-expired claims.
Returns
true- the claim has the bounded shape.false- any other value, including maps and structs with extra fields.
Examples
iex> claim = %RequestSeal.Replay.Claim{namespace: "scope", key: "nonce", retain_until: 0}
iex> RequestSeal.Replay.Claim.valid?(claim)
true
iex> RequestSeal.Replay.Claim.valid?(%{claim | key: ""})
false
iex> RequestSeal.Replay.Claim.valid?(%{claim | retain_until: 253_402_300_800})
false