# Getting a ProofPack JWT with a Nationality Claim

This page walks through the **full user journey** to obtain a JWT that:

* Contains a **ProofPack** (selective-disclosure proof)
* Is tied to an attestation chain where an **IsDelegate** points to a verified **human**
* Reveals a **nationality** claim (and only what you choose)

Use this when you want to understand every step from "I'm a human with an attested identity" to "I have a JWT my agent (or I) can present to services that proves delegation and nationality."

***

## What You End Up With

At the end of this journey you have a **JWT** (compact token) that:

1. **Attestation chain** — The proof inside points to an IsDelegate attestation that points to your human attestation (e.g. IsAHuman). Services can verify this chain on-chain.
2. **ProofPack** — The JWT is a ProofPack: it uses Merkle proofs and selective disclosure.
3. **Nationality claim** — The proof reveals only the claim you requested (e.g. nationality), not your full identity.

That JWT can be given to an agent to send in `Authorization: Bearer <token>` to services that verify ProofPacks and read the nationality claim.

***

## The Five Steps

### Step 1: Get your identity attested (human root)

You need a verified human identity and identity data (including nationality) that Zipwire can use to build proofs.

**What to do:**

* Use [Zipwire Attest](https://zipwire.io/attest) to verify your identity.
* Complete a **Yoti ID check** (liveness + government ID).
* Connect and use an **Ethereum wallet** that will hold your attestations.

**What you get:**

* An **IsAHuman** (or equivalent) attestation tied to **your wallet** — the "human" wallet.
* Your identity data (including nationality) stored in a **Merkle tree** and committed on-chain (e.g. via that attestation / Merkle root).

That human wallet + IsAHuman is the **root of trust** for all later steps.

{% content-ref url="/pages/kzmdzG6x7y91vzCPFJMX" %}
[Your Digital Identity on the Blockchain](/zipwire-attest/zipwire-attest.md)
{% endcontent-ref %}

***

### Step 2: Create an IsDelegate from you (human) to the agent

You authorize an agent wallet to act on your behalf by creating an IsDelegate attestation.

**What to do:**

* On [EAS Base](https://base.easscan.org), create an attestation using the **IsDelegate** schema.
* Set:
  * **Attester** = your **human wallet** (the one with IsAHuman).
  * **Recipient** = the **agent wallet** that will use the JWT (e.g. your bot’s or app’s wallet).
  * **refUID** = the UID of your **IsAHuman** attestation (so the chain is human → IsDelegate → agent).
* Sign and submit the attestation.

**What you get:**

* The agent wallet is **delegated to you**: its IsDelegate points to your human attestation. Services (and the ProofPack Mint API) can follow this chain to confirm the agent acts for a verified human.

{% content-ref url="/pages/9pYWdNTnWIKazoNLt567" %}
[IsDelegate: Agent Delegation & Authorization](/fundamentals/security/attestations/isdelegate-agent-delegation.md)
{% endcontent-ref %}

***

### Step 3: Get an API key for your Zipwire account

The ProofPack Mint API is called with **your** (the human’s) API key. The API mints a proof on your behalf for a delegated agent.

**What to do:**

* Obtain an **API key** for the Zipwire account that owns the human wallet and attested identity (e.g. from your Zipwire account or developer settings).

**What you get:**

* The ability to call the ProofPack Mint API to generate JWTs (ProofPacks) for agents delegated to you.

***

### Step 4: Mint a ProofPack JWT that reveals nationality

This is the step where you **get the JWT**.

**What to do:**

* Call the **ProofPack Mint API** with your API key:
  * **agentWallet** = the **agent** wallet you delegated in Step 2.
  * **selectedFields** = `["nationality"]` (optional; not required—omit to mint a proof with no identity fields revealed; for this journey we include it to get the nationality claim).
  * **format** = `"JWT"`.

**What the API does:**

* Resolves your API key to your account and your attested identity (and its Merkle tree, which includes nationality).
* Verifies that the agent wallet has an **IsDelegate** that points to **you** (the same human).
* Builds a ProofPack that reveals only the **nationality** field and returns it as a **JWT**.

**What you get:**

* The response body contains the JWT in the **proofPack** field. That JWT **is** the ProofPack: it includes the nationality claim and is tied to the attestation chain (IsDelegate → human).

{% content-ref url="/pages/gY1sW2rVpDHKKy5RRCDi" %}
[ProofPack Mint API](/api/zipwire-attest/proofpack-mint-api.md)
{% endcontent-ref %}

***

### Step 5: Use the JWT

**What to do:**

* Use the JWT you received from the Mint API.
* Typically: give it to the **agent** (e.g. store it or pass it in a header). The agent sends it to services as `Authorization: Bearer <JWT>`.
* Services verify the JWT with the ProofPack library: they see the attestation chain (IsDelegate → human) and the revealed **nationality** claim.

{% content-ref url="/pages/yTRncn59sC3kqKG8cFaH" %}
[ProofPack & Agent Delegation](/tools-and-integrations/proofpack-agent-delegation.md)
{% endcontent-ref %}

{% content-ref url="/pages/vHjbCV4bV7welWu86ldI" %}
[Path 2: JWS with claims (JavaScript)](/tools-and-integrations/proofpack-agent-delegation/path2-jws-claims-javascript.md)
{% endcontent-ref %}

***

## Summary Table

| Step  | What you do                                                                                   | What you get                                                                           |
| ----- | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| **1** | Attest as human (Yoti + Zipwire Attest)                                                       | Human wallet with IsAHuman + Merkle tree (includes nationality).                       |
| **2** | Create IsDelegate on EAS: human → agent wallet                                                | Agent wallet delegated to you.                                                         |
| **3** | Get Zipwire API key for your account                                                          | Ability to call ProofPack Mint.                                                        |
| **4** | POST to ProofPack Mint with `agentWallet`, `selectedFields: ["nationality"]`, `format: "JWT"` | **JWT (ProofPack)** with nationality claim and attestation chain (IsDelegate → human). |
| **5** | Pass JWT to agent or use it yourself                                                          | Agent (or you) can present it to services.                                             |

{% hint style="info" %}
**Other claims**\
`selectedFields` is optional (not required). Omit it to mint a proof with no identity fields revealed. To reveal claims, use `selectedFields` with any keys from your identity data (e.g. `nationality`, `date_of_birth`, `given_names`). See the [ProofPack Mint API](/api/zipwire-attest/proofpack-mint-api.md) for the list of typical fields.
{% endhint %}

***

## Related documentation

* [Proof Verification](/zipwire-attest/proof-verification.md) — How services verify ProofPacks
* [IsDelegate REST API](/fundamentals/security/attestations/is-delegate-rest-api.md) — Public check that a wallet has a valid IsDelegate chain
* [ProofPack Examples](/tools-and-integrations/proofpack-agent-delegation/proofpack-examples.md) — Code samples for verification and integration


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zipwire.io/zipwire-attest/getting-a-proofpack-jwt-with-nationality.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
