Installation
Install the Reclaim JavaScript SDK and start integrating proof generation and verification
Prerequisites
- Node.js: 14.x or later
- Package Manager: npm 6.x+, yarn 1.22.x+, or pnpm
- Project: Initialized with
package.json
Installation
Import
Get API Credentials
Before using the SDK, obtain your credentials from the Reclaim Developer Portal:
APP_ID- Your application identifierAPP_SECRET- Your application secret (keep secure!)PROVIDER_ID- The provider you want to verify against
Environment Setup
Security: Never hardcode credentials in your code or commit them to version control. Always use environment variables.
Create a .env file in your project root:
Add .env to your .gitignore:
Load Environment Variables
Critical: Never expose APP_SECRET to the client. Keep it server-side only. Frontend environment variables (like REACT_APP_*, NEXT_PUBLIC_*, VITE_*) are bundled into your JavaScript and visible to users.
Verify Installation
Create a test file to verify the SDK is installed correctly:
Run the test:
Expected output:
Troubleshooting
Module Not Found
If you see Cannot find module '@reclaimprotocol/js-sdk':
TypeScript Errors
Ensure TypeScript 4.0+ and check tsconfig.json:
Environment Variables Not Loading
- Ensure
.envfile is in project root - Restart your development server after changes
- Check for typos in variable names
- Verify no spaces around
=in.envfile
Next Steps
Choose your integration approach:
- Quickstart → - Client-side demo for learning (dev only)
- Backend Integration → - Production-ready setup ⭐
- API Reference → - Complete SDK documentation
Get started with your first integration →