> For the complete documentation index, see [llms.txt](https://clarity-7.gitbook.io/clarity-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://clarity-7.gitbook.io/clarity-docs/consumer-walkthrough/05-gitbook-gate.md).

# 5. GitBook Authenticated Access

Unlock tier-gated sections in this GitBook space using your JWT after wallet login.

## Preview site

[GitBook SWARM preview](https://app.gitbook.com/o/6MCNfiz1cpjlR5LX4kWw/sites/site_vzd1R/preview)

## How gating works

1. Complete [Pay Gate Checkout](/clarity-docs/consumer-walkthrough/02-pay-gate-checkout.md)
2. Obtain JWT via [Private JWT + Wallet Login](/clarity-docs/consumer-walkthrough/04-private-jwt-wallet.md)
3. Sign in to Clarity Wallet — token stored in browser session
4. GitBook Audience validates JWT against `POST /v1/auth/verify`
5. Sections marked with tier attributes become visible

## Tier keys

| Tier key      | Unlocks                                             |
| ------------- | --------------------------------------------------- |
| `starter`     | Starter docs, basic deploy steps                    |
| `wallet_fund` | Wallet top-up + per-run execution                   |
| `dev_portal`  | Full agent upload, Cherry install, instruction book |
| `elite`       | HELIX tier content                                  |
| `enterprise`  | Bare-metal enterprise content                       |

Higher tiers inherit lower-tier sections.

## Client gating (custom HTML surfaces)

If you mirror docs on monitor or a custom site, include the gating script:

```html
<script type="module" src="./assets/gitbook-gating.js"></script>
```

The script reads JWT from URL query (`?token=` or `?jwt=`) or `localStorage` (`clrty_wallet_session`), calls verify, and shows/hides `[data-required-tier]` blocks.

## Pass token in URL (testing)

```
https://monitor.clarity-fintech.com/docs/swarm-agent-node/?token=<JWT>
```

## Locked banner

Without a valid token, gated sections stay hidden and a sticky banner prompts wallet login.

## Next step

→ [6. Install on Cherry (NO Docker)](/clarity-docs/consumer-walkthrough/06-install-cherry.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://clarity-7.gitbook.io/clarity-docs/consumer-walkthrough/05-gitbook-gate.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
