Off-Chain Proofs
Overview
The process involves redirecting users to Holonym to generate proofs, then handling verification at your callback URL:
- Redirect user to Holonym for proof generation
- User is redirected back to your callback with the proof included
- Verify the proof at your callback location
Redirect User to Holonym
Send users to this URL format:
https://app.holonym.id/prove/off-chain/<proofType>?callback=<callback>Parameters:
-
proofType- One of three options:uniqueness- Government ID proof of uniquenessuniqueness-phone- Phone proof of uniquenessus-residency- Proof of US residency
-
callback- Your redirect destination URL where the proof will be appended as a query parameter (e.g.,https://example.com?proof=<proof>)
Verify Proof
Users only reach the callback if the proof is valid, but you can verify it independently using the off-chain SDK package.
Installation:
npm i @holonym-foundation/off-chain-sdkExample verification code:
import {
verifyUniquenessProof
} from '@holonym-foundation/off-chain-sdk';
async function verify(proof) {
const parsedProof = JSON.parse(proof);
const result = await verifyUniquenessProof(parsedProof);
console.log(`User is unique: ${result}`);
return result;
}The verify() function takes the proof query parameter value and returns a boolean indicating verification status.
Last updated on