A subject identifier requested or returned in a grant's subject information.
The pinned schema requires an id string and the format discriminator uri.
The id property itself has no URI format/pattern constraint, so this codec
checks its string type without imposing wallet discovery or request URL rules.
Additional JSON fields are retained in extensions.
Inspection omits the identifier and extensions. Explicit map/JSON export includes
them. This type does not resolve a wallet, verify identity, or make requests.
Validate manually constructed or modified structs with validate/1;
to_map/1 converts shape without validating it.
Summary
Functions
Decodes a subject identifier without interpreting or resolving its value.
Converts to protocol fields, including the identifier, without validating.
Validates the identifier, format discriminator and permitted extension data.
Types
Functions
@spec from_map(map()) :: {:ok, t()} | {:error, OpenPayments.Error.t()}
Decodes a subject identifier without interpreting or resolving its value.
Converts to protocol fields, including the identifier, without validating.
@spec validate(t()) :: :ok | {:error, OpenPayments.Error.t()}
Validates the identifier, format discriminator and permitted extension data.