Individual Verification (KYC)
Individual verification uses a Know Your Customer (KYC) flow to verify a person's identity and issue verifiable credentials to their embedded wallet. This is the default mode of the SDK.
Setup
Render the AvererWebSdk component with your eligibility queries. The mode prop defaults to "individual", so you can omit it.
'use client';
import {
AvererWebSdk,
AvererSdkProvider,
type SdkQuery,
type SdkSuccessRes,
} from '@averer/averer-websdk';
export default function EligibilityPage() {
const sdkQuery: SdkQuery = [
{
id: 5,
circuitId: 'credentialAtomicQuerySigV2' as any,
subjectTitle: 'Pass AML & CTF Checks',
query: {
allowedIssuers: [
'did:receptor:redbelly:testnet:31K3oHpCV428AkXUYTL89q6LCvHcSqHirdv7z6LHtu9',
],
type: 'AMLCTFCredential',
context:
'https://raw.githubusercontent.com/redbellynetwork/receptor-schema/refs/heads/main/schemas/json-ld/AMLCTFCredential.jsonld',
skipClaimRevocationCheck: true,
credentialSubject: {
amlCheckStatus: { $eq: 'passed' },
},
},
},
];
const handleSuccess = (data: SdkSuccessRes) => {
if (data.eligibility.passed) {
console.log('Verification successful', data);
}
};
const handleError = (reason: string) => {
console.error('Verification failed:', reason);
};
return (
<AvererSdkProvider configId="your-config-id">
<AvererWebSdk
appName="My App"
sdkQuery={sdkQuery}
onSuccess={handleSuccess}
onError={handleError}
/>
</AvererSdkProvider>
);
}
Available credentials for individuals
| Credential Type | Purpose |
|---|---|
EssentialIdCredential |
Core identity fields (name, date of birth) |
PassportCredential |
Passport-derived identity data |
DriversLicenceCredential |
Driver's licence-derived identity data |
NationalIdCredential |
National ID-derived identity data |
ProofOfAddressCredential |
Address verification |
AMLCTFCredential |
AML & CTF compliance check |
AUSophisticatedWholesaleInvestorCredential |
Australian sophisticated/wholesale investor status |
ComprehensiveIdCredential |
Extended identity fields |
EnhancedIdCredential |
Enhanced identity fields |
For schema URLs and query construction details, see Eligibility Criteria.
On-chain verification
To submit proofs on-chain via a Verifier contract, provide onChainMetaData along with an on-chain circuit in your query (e.g. credentialAtomicQuerySigV2OnChain).
'use client';
import {
AvererWebSdk,
AvererSdkProvider,
type SdkQuery,
type SdkSuccessRes,
} from '@averer/averer-websdk';
const WEB3_QUERIES: SdkQuery = [
{
id: 3,
circuitId: 'credentialAtomicQuerySigV2OnChain' as any,
subjectTitle: '18+ Years Old',
query: {
allowedIssuers: ['*'],
type: 'EssentialIdCredential',
context:
'https://raw.githubusercontent.com/redbellynetwork/receptor-schema/refs/heads/main/schemas/json-ld/EssentialIdCredential.jsonld',
credentialSubject: { birthDate: { $lt: 20070622 } },
},
},
];
const onChainMetaData = {
contract_address: '0x1320e9a482116A59BD8751388cceEB7f75160BA5',
method_id: 'ade09fcd', // submitZKPResponseV2
};
export default function OnChainEligibilityPage() {
const handleSuccess = (data: SdkSuccessRes) => {
if (data.eligibility.passed) {
console.log('On-chain proof submitted & verified', data);
console.log('Tx hashes:', data.onChain?.txHash);
}
};
const handleError = (reason: string) => {
console.error('On-chain verification failed:', reason);
};
return (
<AvererSdkProvider configId="your-config-id">
<AvererWebSdk
appName="My App"
sdkQuery={WEB3_QUERIES}
onChainMetaData={onChainMetaData}
onSuccess={handleSuccess}
onError={handleError}
/>
</AvererSdkProvider>
);
}
For more on choosing between off-chain and on-chain approaches, see Proof Methods.