Skip to content

Commit 20b0dcb

Browse files
authored
Merge pull request #79 from reclaimprotocol/feat/newJSSDKDocs
Feat/new jssdk docs
2 parents 96653f3 + 73cf860 commit 20b0dcb

File tree

23 files changed

+5657
-62
lines changed

23 files changed

+5657
-62
lines changed

content/docs/browser-extension/extension-integration/index.mdx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,26 @@ Use the SDK's API in your popup or panel to trigger verification and handle resu
105105
Before starting, ensure you have:
106106

107107
- ✅ Completed the [Installation guide](/browser-extension/installation)
108-
- ✅ Obtained API credentials from the [API Key guide](/api-key)
109108
- ✅ Basic understanding of Chrome extension development
110109
- ✅ Familiarity with JavaScript Promises and async/await
111110
- ✅ A Chrome extension project with Manifest V3
112111

112+
## Get Your API Credentials
113+
114+
<Callout type="warning">
115+
**🔑 Required: Get Your API Credentials First**
116+
117+
Before you proceed with any integration steps, you **must** obtain your API credentials. These credentials (`APP_ID` and `APP_SECRET`) are essential for initializing the SDK and creating verification requests.
118+
119+
**[Get Your API Credentials Now →](/api-key)**
120+
121+
You'll need:
122+
- **`APP_ID`**: Your unique application identifier
123+
- **`APP_SECRET`**: Your application secret key (keep secure!)
124+
125+
Without these credentials, you cannot complete the integration steps below.
126+
</Callout>
127+
113128
## Security Considerations
114129

115130
### Content Security Policy

content/docs/browser-extension/extension-integration/setup.mdx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,25 @@ title: Setup
33
description: Initialize the SDK in your browser extension's background and content scripts
44
---
55

6+
## Get Your API Credentials First
7+
8+
<Callout type="warning">
9+
**🔑 Required Before Setup**
10+
11+
Before you can initialize the SDK, you **must** have your API credentials (`APP_ID` and `APP_SECRET`). These are required to create verification requests.
12+
13+
**[Get Your API Credentials →](/api-key)**
14+
15+
You'll need:
16+
- **`APP_ID`**: Your unique application identifier
17+
- **`APP_SECRET`**: Your application secret key
18+
19+
Keep these credentials secure and never expose them in client-side code for production applications.
20+
</Callout>
21+
622
## Overview
723

8-
After configuring your manifest, you need to initialize the SDK in two places:
24+
After configuring your manifest and obtaining your API credentials, you need to initialize the SDK in two places:
925

1026
1. **Background Service Worker**: Manages offscreen documents and verification orchestration
1127
2. **Content Script Loading**: Bridges communication (optional if using static manifest registration)

content/docs/browser-extension/extension-integration/usage.mdx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,27 @@ description: Implement Reclaim verification flows in your browser extension popu
77

88
With the SDK initialized and configured, you can now implement verification flows in your extension's user interface. This guide covers implementing verification in popups, side panels, and handling the complete verification lifecycle.
99

10+
## Get Your API Credentials
11+
12+
<Callout type="warning">
13+
**🔑 Required: API Credentials**
14+
15+
Before implementing verification, make sure you have your API credentials (`APP_ID` and `APP_SECRET`). All code examples below require these credentials.
16+
17+
**[Get Your API Credentials →](/api-key)**
18+
19+
You'll need:
20+
- **`APP_ID`**: Your unique application identifier
21+
- **`APP_SECRET`**: Your application secret key
22+
</Callout>
23+
1024
## Prerequisites
1125

1226
Before implementing verification flows, ensure you have:
1327

1428
- ✅ Completed [Manifest Configuration](/browser-extension/extension-integration/manifest-configuration)
1529
- ✅ Completed [Background Setup](/browser-extension/extension-integration/setup)
16-
- ✅ Obtained API credentials from the [API Key guide](/api-key)
30+
-**Obtained your API credentials** (`APP_ID` and `APP_SECRET`) from the [API Key guide](/api-key)
1731

1832
## Basic Popup Implementation
1933

Lines changed: 16 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,41 @@
11
---
22
title: Browser Extension SDK
3-
description: Lightweight SDK for integrating Reclaim verification flows into browser extensions and websites with Chrome Manifest V3 support
3+
description: Seamlessly integrate Reclaim Protocol verification into your Chrome browser extension
44
---
55

66
## Overview
77

8-
Lightweight SDK for integrating Reclaim verification into browser extensions and websites. Handles content-background communication, provider tab management, WebAssembly proof generation, and completion events.
8+
Build browser extensions with Reclaim Protocol verification capabilities. This SDK handles Chrome extension architecture (MV3, service workers, offscreen documents), WebAssembly proof generation, and provider tab management.
99

1010
### Key Features
1111

12-
- 🔌 **Dual Integration**: Build extensions or integrate from web apps
1312
- 🛡️ **Manifest V3 Compatible**: Full Chrome MV3 support
1413
-**WebAssembly Proofs**: High-performance cryptographic proof generation
1514
- 🔄 **Event-Driven**: Real-time updates via clean event API
1615
- 📦 **Pre-built Bundles**: No re-bundling required
17-
- 🎯 **Auto Provider Management**: Automatic tab orchestration
18-
- 🔐 **Network Monitoring**: Built-in request interception
1916

2017
## Two Integration Paths
2118

22-
### 1. Extension Integration (Primary)
19+
### 1. Extension Integration (Standalone)
2320

24-
**Build a browser extension** with Reclaim verification in popup/sidepanel:
25-
- Users trigger verification from your extension UI
21+
**Build a standalone browser extension** with Reclaim verification:
22+
23+
- Complete extension that users install from Chrome Web Store
24+
- Users trigger verification directly from your extension popup/sidepanel
25+
- No website required - extension works independently
2626
- Full control over extension experience
2727
- SDK handles all Chrome extension complexity
28-
- Manifest V3, offscreen documents, service workers
2928

3029
[Get Started with Extension Integration →](/browser-extension/extension-integration)
3130

32-
### 2. Web Integration (Optional)
33-
34-
**Trigger verification from your website** through a compatible extension:
35-
- For websites that want to use an extension built with this SDK
36-
- Users verify without leaving your site
37-
- Extension handles verification, you control website UI
38-
- Requires users to install compatible extension
39-
40-
[Learn About Web Integration →](/browser-extension/web-integration)
41-
42-
## How It Works
43-
44-
Multi-layer architecture for secure verification:
45-
46-
1. **Content Script Bridge** - Communication between pages and extension
47-
2. **Background Service Worker** - Manages offscreen docs and provider tabs
48-
3. **Offscreen Document** - WebAssembly proof generation
49-
4. **Network Interceptor** - Captures network requests during verification
31+
### 2. Web Integration (Website + Extension)
5032

51-
```mermaid
52-
graph LR
53-
A[Web Page / Extension Popup] --> B[Content Script]
54-
B --> C[Background Service Worker]
55-
C --> D[Offscreen Document]
56-
C --> E[Provider Tab]
57-
D --> F[WebAssembly Proof Generation]
58-
E --> G[Network Interceptor]
59-
```
33+
**Trigger verification from your website** using a compatible extension:
6034

61-
## Compatibility
35+
- Requires BOTH: your website + a compatible extension installed by users
36+
- Users verify directly on your website without leaving the page
37+
- Extension (built with this SDK) handles verification in background
38+
- Website maintains control over UI/UX
39+
- Users must install the extension first
6240

63-
**Browsers**: Chrome 93+, Edge 93+, Brave, Opera (Chromium-based)
64-
65-
**Requirements**: Node.js 14.x+, npm 6.x+ or yarn 1.22.x+, Manifest V3
66-
67-
## Next Steps
68-
69-
Choose your integration path:
70-
71-
1. **[Installation](/browser-extension/installation)** - Install the SDK and set up assets
72-
2. **[Extension Integration](/browser-extension/extension-integration)** - Build a browser extension with Reclaim
73-
3. **[Web Integration](/browser-extension/web-integration)** - Integrate from your website
74-
4. **[Troubleshooting](/browser-extension/troubleshooting)** - Common issues and solutions
75-
76-
## Get an API Key
77-
78-
Before integrating, you'll need API credentials. Follow the [Get API Key guide](/api-key) to set up your Reclaim Protocol project.
41+
[Learn About Web Integration →](/browser-extension/web-integration)

content/docs/browser-extension/installation.mdx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,28 @@ rm -rf node_modules package-lock.json && npm install
104104
- Ensure SDK assets are in `public/`, not imported in your code
105105
- Reference via manifest configuration (see next steps)
106106

107+
## Get Your API Credentials
108+
109+
<Callout type="warning">
110+
**⚠️ Required Before Proceeding**
111+
112+
Before you can use the SDK, you **must** obtain your API credentials (`APP_ID` and `APP_SECRET`) from the Reclaim Protocol dashboard. These credentials are required for all integrations.
113+
114+
**[Get Your API Credentials Now →](/api-key)**
115+
</Callout>
116+
117+
Without API credentials, you won't be able to initialize the SDK or create verification requests. This is the most important step after installation.
118+
119+
### What You'll Get
120+
121+
- **`APP_ID`**: Your unique application identifier
122+
- **`APP_SECRET`**: Your application secret key (keep this secure!)
123+
124+
You'll need both of these credentials in the next steps for any integration path you choose.
125+
107126
## Next Steps
108127

109128
Choose your integration path:
110129

111130
- **[Extension Integration →](/browser-extension/extension-integration)** - Build a browser extension
112131
- **[Web Integration →](/browser-extension/web-integration)** - Integrate from a website
113-
114-
Get your [API credentials →](/api-key) before proceeding.

content/docs/browser-extension/web-integration/index.mdx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,28 @@ graph LR
4343
5. **Provider Tab**: Handles authentication
4444
6. **Proofs Returned**: Sent back to your website
4545

46+
## Get Your API Credentials First
47+
48+
<Callout type="warning">
49+
**🔑 Required: Get Your API Credentials Before Integration**
50+
51+
Before you can integrate Reclaim verification into your website, you **must** obtain your API credentials. These credentials (`APP_ID` and `APP_SECRET`) are essential for creating verification requests.
52+
53+
**[Get Your API Credentials Now →](/api-key)**
54+
55+
You'll need:
56+
- **`APP_ID`**: Your unique application identifier
57+
- **`APP_SECRET`**: Your application secret key (keep secure!)
58+
59+
Without these credentials, you cannot initialize the SDK or start verification flows.
60+
</Callout>
61+
4662
## Prerequisites
4763

4864
Before integrating, ensure you have:
4965

5066
- ✅ Completed the [Installation guide](/browser-extension/installation)
51-
- ✅ Obtained API credentials from the [API Key guide](/api-key)
67+
-**Obtained your API credentials (`APP_ID` and `APP_SECRET`)** from the [API Key guide](/api-key)
5268
- ✅ Access to a Reclaim-compatible browser extension (or built one using [Extension Integration](/browser-extension/extension-integration))
5369
- ✅ A web application (React, Vue, vanilla JavaScript, etc.)
5470

content/docs/browser-extension/web-integration/setup.mdx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,26 @@ description: Configure the Reclaim Browser Extension SDK in your web application
55

66
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
77

8+
## Get Your API Credentials First
9+
10+
<Callout type="warning">
11+
**🔑 Required: Get Your API Credentials Before Setup**
12+
13+
The first and most important step is obtaining your API credentials. You'll need `APP_ID` and `APP_SECRET` to create verification requests in the steps below.
14+
15+
**[Get Your API Credentials Now →](/api-key)**
16+
17+
What you'll get:
18+
- **`APP_ID`**: Your unique application identifier
19+
- **`APP_SECRET`**: Your application secret key (keep secure!)
20+
21+
These credentials are essential for all the code examples in this guide.
22+
</Callout>
23+
824
## Prerequisites
925

1026
-[Installation guide](/browser-extension/installation) completed
11-
-[API credentials](/api-key) obtained
27+
-**[API credentials](/api-key) obtained** (`APP_ID` and `APP_SECRET`)
1228
- ✅ Extension ID of the Reclaim-compatible extension
1329
- ✅ Web application (React, Vue, vanilla JS)
1430

content/docs/browser-extension/web-integration/usage.mdx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,26 @@ description: Implement Reclaim verification flows in your web application
77

88
This guide demonstrates how to implement complete verification flows in your web application, including initialization, event handling, UI states, and error management.
99

10+
## Get Your API Credentials
11+
12+
<Callout type="warning">
13+
**🔑 Required: API Credentials**
14+
15+
Before implementing verification, ensure you have your API credentials (`APP_ID` and `APP_SECRET`). All code examples below require these credentials.
16+
17+
**[Get Your API Credentials →](/api-key)**
18+
19+
You'll need:
20+
- **`APP_ID`**: Your unique application identifier
21+
- **`APP_SECRET`**: Your application secret key (keep secure!)
22+
</Callout>
23+
1024
## Prerequisites
1125

1226
- ✅ Completed [Installation](/browser-extension/installation)
1327
- ✅ Completed [Setup](/browser-extension/web-integration/setup)
1428
- ✅ Extension installed and extension ID configured
15-
- ✅ API credentials from [API Key guide](/api-key)
29+
-**Obtained your API credentials** (`APP_ID` and `APP_SECRET`) from [API Key guide](/api-key)
1630

1731
## Basic Implementation
1832

0 commit comments

Comments
 (0)