Basic Integration
Creating a verifier instance
import {
SelfBackendVerifier,
DefaultConfigStore,
AllIds
} from '@selfxyz/core'
const selfBackendVerifier = new SelfBackendVerifier(
'docs', // scope string
'https://docs.self.xyz/api/verify', // endpoint (your backend verification API)
true, // mockPassport → true = testnet, realPassport → false = mainnet
AllIds, // allowed attestation IDs map
new DefaultConfigStore({ // config store (see separate docs)
minimumAge: 18,
excludedCountries: ['USA'],
ofac: false,
}),
'hex' // user identifier type
);Parameters
Verifying a proof
Example output
Using in an API endpoint
Endpoint API Reference
Name
Value
Name
Type
Description
Accepting only certain type of documents
Last updated