Preparing the proof request
Create a request for a proof generation on the backend
Quickstart
This is the simplest version of creating a proof request.
Import the library
Setup a request on the backend
- You can get the
APP_IDandAPP_SECRETusing this guide - The
PROVIDER_IDis the proof you want the user to generate. You can see all the available providers here.
Send back the proof request object to the frontend
Sample implementation in Next.js
Advance Options
Forcing Remote Browser use
Remote Browser use is available only for users on a premium enterprise plan. Please contact support for more details.
Set Context
You can set context to the proof request that helps identify the request when you receive it back in the callback.
address: this is usually a unique identifier for the user. This could be an email address, a wallet address, or just a session idmessage: this is an open field where you can add any other information that you want passed around from the build request to the callback endpoint. You can stringify jsons here for convenience.
Set Parameters
If you already know what the value of the extracted parameter is supposed to be, you can set that using setParams.
For example, if you know that the user's name before hand - and you want them to prove something from a website and you need the name to match exactly, you should use set the name in the params.
If the extracted parameter doesn't match the set parameter, the proof generation will fail.
Set Callback
Set a backend callback URL where Reclaim Protocol will POST proofs directly after verification. This enables secure backend proof processing without relying on frontend to upload the proof.
If useJson is set to true, it will send the proof as a raw JSON. Else, the POST body will contain the Proof JSON urlencoded.