# `AttestoClient.Wallet.PresentationRequest`
[🔗](https://github.com/XukuLLC/attesto_client/blob/v2.26.0/lib/attesto_client/wallet/presentation_request.ex#L1)

Verify signed OID4VP 1.0 wallet authorization requests.

`from_uri/3` binds the outer `client_id` to the signed request and ignores
other outer authorization parameters. A caller-supplied `:client_id` must
equal the outer `client_id`. Request URI POST sends a fresh wallet
nonce, which must be echoed in the signed object. Requests using `x509_hash`
require explicit DER trust anchors in `:trusted_certificates`; the embedded
leaf certificate supplies the signing key, never the trust decision.
An optional `:certificate_trust` callback adds ecosystem/revocation policy.

Pre-registered signed requests retain the temporal verification options from
`Attesto.RequestObject`. All signed requests require `oauth-authz-req+jwt`;
`iss` is ignored and the verified `client_id` identifies the verifier.
Algorithm policies must be nonempty and can only narrow supported algorithms.
RSA verification requires at least 2048 bits under every policy. Set
`enforce_fapi_alg_policy: true` to use FAPI's algorithm and curve restrictions.
This module supports `direct_post` and encrypted `direct_post.jwt`.
Unsupported transaction data fails closed before credential selection.

Verifier metadata must contain a nonempty `vp_formats_supported` object.
Registered clients may supply authoritative metadata through
`:verifier_metadata`; its fields take precedence over the signed metadata.
For `x509_hash`, all metadata must come from the signed `client_metadata`.
Advertised issuer and holder algorithms constrain the actual presentation.

# `error`

```elixir
@type error() :: atom() | term()
```

# `t`

```elixir
@type t() :: %AttestoClient.Wallet.PresentationRequest{
  client_id: String.t(),
  client_metadata: map(),
  dcql_query: map(),
  nonce: String.t(),
  profile: :generic | :haip,
  response_mode: String.t(),
  response_uri: String.t(),
  state: String.t() | nil
}
```

# `fetch`

Fetch and verify a request URI; :request_uri_method may be get or post.

`:outbound` is refused with `{:error, :outbound_not_supported}`: the address
comes from another party, so it gets no exception to the HTTPS and
public-address rules (see `AttestoClient.Outbound`).

# `from_uri`

Parse an authorization deep link and verify its by-value or by-reference signed request.

A `:client_id` passed by the caller is the expected verifier identity and must
equal the deep link's `client_id`; a different outer value returns
`{:error, :invalid_client_id}` before any request URI is fetched. Without a
caller `:client_id`, the outer value is bound to the signed request.

A by-reference request is fetched from the link's `request_uri`.
`:outbound` is refused with `{:error, :outbound_not_supported}`: the address
comes from another party, so it gets no exception to the HTTPS and
public-address rules (see `AttestoClient.Outbound`).

# `verify`

Verify a compact request JWT. Pass :client_id to bind an outer authorization request.

---

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