This is an example Next.js application demonstrating how to use the Reclaim Protocol WebSDK
- Node.js 18+ installed
- Reclaim Protocol App ID and App Secret
You can obtain these details from the Reclaim Developer Portal.
- Clone or navigate to this directory:
cd example- Install dependencies:
npm install- Configure environment variables:
Copy .env.example to .env.local and fill in your Reclaim credentials:
cp .env.example .env.localEdit .env.local:
NEXT_PUBLIC_RECLAIM_APP_ID=your_app_id_here
NEXT_PUBLIC_RECLAIM_APP_SECRET=your_app_secret_here
NEXT_PUBLIC_WEBSDK_URL=websdk_urlTo add providers to your application, edit the src/config/providers.ts file:
you can find the providerId in the dev.reclaimprotocol.org dashboard under your app page.
export const providers: Provider[] = [
{
providerId: "your-provider-id-here",
providerName: "Your Provider Name"
},
];Start the development server:
npm run devOpen http://localhost:3000 with your browser to see the application.
Build the application:
npm run buildStart the production server:
npm start