Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 1 addition & 36 deletions content/docs/advance-options/advance-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ The `setRedirectUrl` method allows you to specify a custom URL where users will
const requestUrl = await reclaimProofRequest.getRequestUrl()
```
<Callout type="tip">
To set up deep linking in your Flutter app:
To set up deep linking in your RN app:
1. Configure your app to handle the custom URL scheme (e.g., 'yourapp://')
2. Set up a route in your app to handle the '/verification-complete' path
3. Process any additional data passed through the deep link as needed
Expand Down Expand Up @@ -596,38 +596,3 @@ When using any Reclaim SDK (JavaScript, React Native, Flutter), a proof is gener
}
```

### Key Components:

- **identifier**: A unique identifier for the proof.
- **claimData**: Contains detailed information about the claim, including:
- **provider**: The type of provider used for verification.
- **parameters**: The parameters used during the verification process.
- **owner**: The address of the owner of the proof.
- **timestampS**: The timestamp when the proof was generated.
- **context**: Any additional context information related to the proof.
- **epoch**: The epoch number indicating the version or state of the proof.
- **signatures**: A list of signatures that validate the proof.
- **witnesses**: Information about witnesses that observed the proof generation, including their ID and URL.
- **publicData**: Any public data associated with the proof.

This proof is typically received in the `onSuccess` callback of `startVerificationSession` method when using the default `callbackUrl`. However, if you have set a custom `callbackUrl`, you will receive this proof at your specified API endpoint.


## Best Practices for SDK Advanced Options

1. **Security**: Always prioritize security when configuring callbacks and parameters. Use HTTPS for all URLs and avoid passing sensitive data in parameters.

2. **Error Handling**: Implement robust error handling for all advanced options, especially when dealing with callbacks and redirects.

3. **Testing**: Thoroughly test your advanced options in a staging environment before deploying to production.

4. **Documentation**: Maintain clear documentation of your custom configurations, especially when using context or custom parameters.

<Callout type="info">
Remember, while these advanced options offer more flexibility, they also require careful implementation to ensure security and reliability.
</Callout>

By leveraging these advanced options, you can create a more tailored and robust integration of the Reclaim Protocol into your application. If you have any questions about these advanced features, don't hesitate to reach out to our support team or community forums.

Happy coding with Reclaim Protocol!

17 changes: 17 additions & 0 deletions content/docs/advance-options/verification-options.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Verification Options
description: Customize the default verification flow with Reclaim Protocol's InApp SDKs
---

import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';

## Options API

| Prop | Type | Description |
| ---------------------------------------------- | -------------------------------------- | ----------------------------------------------------------------------------- |
| **`canDeleteCookiesBeforeVerificationStarts`** | <code>boolean</code> | This is enabled by default. Set false to persist sessions storage for the user. (This will be replaced with `canClearWebStorage` in an upcoming update) |
| **`canUseAttestorAuthenticationRequest`** | <code>boolean</code> | Enable the use of authentication request when starting a verification |
| **`claimCreationType`** | <code>'standalone' \| 'meChain'</code> | The type of claim creation to use. Defaults to 'standalone'. |
| **`canAutoSubmit`** | <code>boolean</code> | Whether to automatically submit the proof after generation. Defaults to true. When false, a prompt to submit is shown to the user. |
| **`isCloseButtonVisible`** | <code>boolean</code> | Whether the close button is visible in the verification screen. Defaults to true. |
2 changes: 1 addition & 1 deletion content/docs/ai-agent/meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"title": "AI Agent",
"title": "A2A & MCP",
"pages": ["quickstart"]
}
68 changes: 68 additions & 0 deletions content/docs/android-kotlin/installation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
title: Installation
description: Integrate Reclaim Protocol into Android Native Applications.
---

import { BadgeGroup } from '@/app/components/badge';

<BadgeGroup badges={[
{ href: 'https://github.com/reclaimprotocol/reclaim-inapp-android-sdk', imgSrc: 'https://img.shields.io/github/v/tag/reclaimprotocol/reclaim-inapp-android-sdk.svg', alt: 'Reclaim Android SDK' },
{ href: 'https://docs.reclaimprotocol.org/inapp-sdks/android', imgSrc: 'https://img.shields.io/badge/read_the-docs-blue.svg', alt: 'Documentation' },
]} />

## Prerequisites

- An Android application source code (Support for Android 5.0 or later).
- An Android device or emulator running Android 5.0 or later.
- A Reclaim account where you've created an app and have the app id, app secret.
- A provider id that you've added to your app in Reclaim Devtools.


## Installation

Add the following repositories to your `settings.gradle` file's repositories block or at the end of settings.gradle:

```groovy
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
String flutterStorageUrl = System.env.FLUTTER_STORAGE_BASE_URL ?: "https://storage.googleapis.com"
String reclaimStorageUrl = System.env.RECLAIM_STORAGE_BASE_URL ?: "https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/android/0.3.0/repo"
repositories {
google()
mavenCentral()
maven {
url "$reclaimStorageUrl"
}
maven {
url "$flutterStorageUrl/download.flutter.io"
}
}
}
```

You can replace the version mentioned in the url of `reclaimStorageUrl` with the version of SDK you're using. Latest is `0.3.0`.

Some projects may require you to add the repositories to the root `build.gradle` file or your app-level `build.gradle` file's allprojects section.

Next, add the following to your app level `build.gradle` file:

```groovy
implementation "org.reclaimprotocol:inapp_sdk:0.3.0"
```

Add the following to your app level `AndroidManifest.xml` file under the `<application>` tag:

```xml
<activity
android:name="org.reclaimprotocol.inapp_sdk.ReclaimActivity"
android:theme="@style/Theme.ReclaimInAppSdk.LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"
/>
<meta-data android:name="org.reclaimprotocol.inapp_sdk.APP_ID"
android:value="<YOUR_RECLAIM_APP_ID>" />
<meta-data android:name="org.reclaimprotocol.inapp_sdk.APP_SECRET"
android:value="<YOUR_RECLAIM_APP_SECRET>" />
```

7 changes: 7 additions & 0 deletions content/docs/android-kotlin/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"title": "Android SDK",
"pages": [
"installation",
"usage"
]
}
71 changes: 71 additions & 0 deletions content/docs/android-kotlin/usage.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
title: Usage
description: Reclaim Protocol's InApp Android SDK for ZK proof generations for requests with an in-app experience of web verification
---

## Usage

To use ReclaimInAppSdk in your project, follow these steps:

1. Import the ReclaimInAppSdk module into your Kotlin/Java file.

```kotlin
import org.reclaimprotocol.inapp_sdk.ReclaimVerification
```

2. Create a request object.

```kotlin
val request = ReclaimVerification.Request(
appId = "YOUR_APP_ID",
secret = "YOUR_APP_SECRET",
providerId = "YOUR_PROVIDER_ID"
)
```

Or if you have added the APP_ID and APP_SECRET metadata to your AndroidManifest.xml file, you can create the request object using the `ReclaimVerification.Request.fromManifestMetaData` method.

```kotlin
val request = ReclaimVerification.Request.fromManifestMetaData(
context = context,
providerId = "YOUR_PROVIDER_ID"
)
```

3. Start the verification flow.


```kotlin
ReclaimVerification.startVerification(
context = context,
request = request,
handler = object : ReclaimVerification.ResultHandler {
override fun onException(exception: ReclaimVerification.ReclaimVerificationException) {
Log.e("MainActivity", "Something went wrong", exception)
val reason = when (exception) {
is ReclaimVerification.ReclaimVerificationException.Failed -> "Failed because: ${exception.reason}"
is ReclaimVerification.ReclaimVerificationException.Cancelled -> "Verification cancelled"
is ReclaimVerification.ReclaimVerificationException.Dismissed -> "Dismissed by user"
is ReclaimVerification.ReclaimVerificationException.SessionExpired -> "Session expired"
}
Log.d("MainActivity", "reason: $reason")
}

override fun onResponse(response: ReclaimVerification.Response) {
Log.d("MainActivity", response.toString())
}
}
)
```

The returned result `ReclaimVerification.ResultHandler.onResponse` in is a `ReclaimVerification.Response` object. This object contains a response that has proofs, exception, and the sessionId if the verification is successful.

If the verification is cancelled or failed, the handler's `ReclaimVerification.ResultHandler.onException` method is called with a `ReclaimVerification.ReclaimVerificationException` object.

## Example

- See the [Reclaim Compose Example - Android](https://github.com/reclaimprotocol/reclaim-inapp-android-sdk/tree/main/example/README.md) for a complete example of how to use the SDK in an Android application.


## Advanced Usage
For more usage options see [Advance Options guide](/advance-options/advance-options)
39 changes: 39 additions & 0 deletions content/docs/api-key.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: Get an API key
description: For all the SDKs mentioned on this docs page, you need an `APP_ID` and `APP_SECRET`
---

For being able to use Reclaim Protocol, you need to have 3 variables handy.

## 0. Register
First, head to the [Reclaim Protocol Dev Tool](https://dev.reclaimprotocol.org).
Create an account here if you haven't already.

## 1. Create an Application
Head to [My Applicatons](https://dev.reclaimprotocol.org/my-applications) from the left navigation bar. Here, tap on [Create Application](https://dev.reclaimprotocol.org/application-creation).

Provide the application name, description and upload a logo.
This is the information that will be presented to the user when they are generating the proof, to maintain continuity with your brand.

### Copy your Application ID and secret
Once you create the application, you will be shown the Application ID and Application Secret.
Be sure to copy them into your `.env` file immediately.

<Callout type="warning">
You will not be able to see the Application Secret once you leave this screen.
</Callout>

## 2. Add providers
Once you have created the application, you will have to add providers that are supported by this application. You will NOT be able to generate proofs for providers that are not already added to your application.

Open your application `https://dev.reclaimprotocol.org/my-applications/[YOUR APP_ID]`

Here you can tap on `Add Provider`

Search for the providers you want to add and click on it to add it to the list.
Once you have added all your providers, hit Update Providers.

After adding the providers, you can copy the `provider ID` and keep them handy.

## 3. Integrate your SDK
Now, you can head over to the integration guide for your platform - where you can paste these values to get the application up and running!
51 changes: 0 additions & 51 deletions content/docs/backend/best-practices.mdx

This file was deleted.

4 changes: 0 additions & 4 deletions content/docs/backend/meta.json

This file was deleted.

Loading