# Grants — spoke context

The user wants to see which merchants have access to which of their identity attestations, or revoke a specific grant.

If you haven't already, fetch `https://poc.whoois.app/whoois-context.md` for the root primer.

---

## What's a grant?

The inverse of an attestation. Where an attestation says "what Whoois holds about you," a grant says "who has accessed it." Each grant is a per-merchant record of which attestations the merchant has read, when the grant started, and when it was last used.

A grant looks like:

- **Merchant** (Demo Coffee Co, Pretend Books, etc.)
- **Attestations released** (e.g., "Over 18", "Email verified")
- **Scope** (Ongoing — merchant can re-read at will; One-time — single read; Revoked — access blocked)
- **Granted at** (date the grant was first established)
- **Last used at** (most recent merchant read)
- **Partner-accepts** (which loyalty programs the merchant accepts — Valpak, clipp)

Grants are the user's audit log of "who knows what about me, and when did they last check."

---

## Trigger phrases

- "Show my grants"
- "Who has access to my data?"
- "Who's read my attestations?"
- "Who has my Whoois info?"
- "Revoke {merchant}'s access"
- "Cut off {merchant}"
- "Who knows my email through Whoois?"

---

## Tool to call

**`itsmi_grants_view`** — LLM-visible. Renders the grants iframe. Shows one card per merchant the user has granted access to. Each card has:

- Merchant logo (from `LOGO_BY_SLUG`)
- Merchant name
- Scope pill (Ongoing / One-time / Revoked)
- Attestations released (chip list)
- Granted / last-used timestamps
- Partner-accepts chips (Valpak, clipp)
- "Revoke grant" button (active grants only)

Includes search (filters by merchant name, attestation label, or partner provider) and pagination (5 per page).

POC scope: revoke is local-state only (`PUNCH-DEMO-PORT-GRANTS-BACKEND-STORE`). Real backend store + verifiable revocation is post-POC.

---

## Card-head visual: merchant logos (not Miclock)

As of PR #52, grant cards show the **merchant's logo** in the card head — NOT a Miclock-stamped Miprint. The brand-canonical correction was: MiClock applies to Miusers (people), not registrants (merchants). Merchants get their logo; people get their Miprint+MiClock. The 5 engageable merchants (DCC, PB, IT, MMS, Fake Hardware Hut) have actual PNG logos via `LOGO_BY_SLUG`. Fake Anvil Atelier (the revoked-state placeholder) falls back to serif text-initials until its logo is generated.

This is mostly background context — the LLM doesn't need to explain this to the user unless they ask.

---

## Revoking a grant

If the user wants to revoke:

1. Call `itsmi_grants_view` — surfaces the merchant cards
2. User clicks "Revoke" on the relevant card (inline revoke pattern — Berry-tinted confirm panel, [Keep it] / [Yes, revoke])
3. Confirm flips local scope to Revoked, card de-emphasizes (opacity 0.55, surface-2 bg)
4. Tell the user: *"{merchant} no longer has access to your {attestation list}. Past transactions remain valid in your Mitrail."*

Revoking blocks future releases. It does NOT invalidate past transactions or refund prior purchases — receipts in the Mitrail are still real and final.

---

## Cross-references

If user is confused about what attestations are: link to `https://poc.whoois.app/context/attestations.md` for the source-side view.

If user mentions loyalty providers (Valpak / clipp) appearing on grant cards: link to `https://poc.whoois.app/context/loyalty.md`.

---

## Tone notes

Grants are a privacy + control feature. The user is checking who has access to their data — they may be anxious or wary. Be reassuring + factual: this is a control panel, you have full visibility, nothing is hidden, revoke at will.

Don't editorialize the merchant choices. If the user has 15 active grants, don't say "wow, you've shared a lot." Just present what's there.

---

*This spoke is fetched from `https://poc.whoois.app/context/grants.md`. Pair with `https://poc.whoois.app/whoois-context.md` for the root primer.*
