# `Layr8.Presentations`
[🔗](https://github.com/layr8/elixir_sdk/blob/main/lib/layr8/presentations.ex#L1)

W3C Verifiable Presentation operations via the Layr8 cloud-node REST API.

All functions accept a `Layr8.REST` client and keyword options.

## Example

    rest = Layr8.REST.new("https://node.example.com", "my-api-key")
    {:ok, vp_jwt} = Layr8.Presentations.sign_presentation(rest, [vc_jwt], holder_did: "did:example:alice")

# `sign_presentation`

```elixir
@spec sign_presentation(Layr8.REST.t(), [String.t()], keyword()) ::
  {:ok, String.t()} | {:error, term()}
```

Signs a W3C Verifiable Presentation wrapping one or more signed credential JWTs.

Uses the holder's authentication key (not assertion key).

## Options

- `:holder_did` — holder DID (default: agent DID)
- `:format` — output format: `"compact_jwt"` (default), `"json"`, `"jwt"`, `"enveloped"`
- `:nonce` — optional nonce/challenge for the presentation

Returns `{:ok, signed_jwt}` or `{:error, reason}`.

# `verify_presentation`

```elixir
@spec verify_presentation(Layr8.REST.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, term()}
```

Verifies a signed presentation using the verifier DID's authentication key.

## Options

- `:verifier_did` — verifier DID (default: agent DID)

Returns `{:ok, verified}` or `{:error, reason}`.

---

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