# `AccessGrid.SmartTapReveal`
[🔗](https://github.com/Access-Grid/accessgrid-ex/blob/main/lib/access_grid/smart_tap_reveal.ex#L1)

Response from `AccessGrid.Console.reveal_smart_tap/3` — the Smart Tap
credentials for a card template, encrypted with the caller's ephemeral public
key.

The caller decrypts `encrypted_private_key` using their corresponding private
key (out-of-scope for this SDK — Smart Tap decryption is the caller's
responsibility).

`encrypted_private_key` is exposed as a raw map (string keys) — it's an
encryption envelope, not a first-class entity. Expected keys:

  * `"alg"` — encryption algorithm identifier
  * `"ephemeral_public_key"` — server-side ephemeral key for ECDH
  * `"iv"` — initialization vector
  * `"ciphertext"` — encrypted Smart Tap private key
  * `"tag"` — authentication tag

# `t`

```elixir
@type t() :: %AccessGrid.SmartTapReveal{
  collector_id: String.t() | nil,
  encrypted_private_key: map() | nil,
  fingerprint: String.t() | nil,
  key_version: String.t() | nil
}
```

# `from_response`

```elixir
@spec from_response(map()) :: t()
```

Creates a SmartTapReveal struct from an API response map.

---

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