KYC Providers
Integrate Sumsub, Jumio, or Onfido for automated KYC-to-allowlist management
KYC Providers
The Oracle uses a KycAdapter interface to normalize KYC provider responses. When a provider sends a webhook, the adapter parses the payload and returns a standardized action (add, remove, or none). The Oracle then updates the on-chain allowlist automatically.
KycAdapter Interface
Selecting a Provider
Set the KYC_PROVIDER environment variable:
The Oracle creates the appropriate adapter at startup via createKycAdapter(provider, { apiKey, apiSecret }).
Webhook Flow
All providers follow the same integration flow:
The mint query parameter tells the Oracle which token's allowlist to update. If omitted, falls back to the DEFAULT_MINT environment variable.
Sumsub
Authentication: HMAC-SHA256 request signing with three headers.
Request Signing
Every API call to Sumsub includes:
| Header | Value |
|---|---|
X-App-Token | Your app token |
X-App-Access-Ts | Unix timestamp (seconds) |
X-App-Access-Sig | HMAC-SHA256(secret, ts + method + path + body) |
Verification Check
The adapter looks up applicants by externalUserId (the wallet address). A wallet is verified when:
Webhook Status Mapping
| Sumsub Status | Action | Description |
|---|---|---|
GREEN | add | Verification approved |
RED | remove | Verification rejected (with rejection labels) |
applicantPending | remove | Precautionary removal during review |
applicantCreated | remove | Precautionary removal |
Configure Sumsub Webhook
In your Sumsub dashboard, set the webhook URL to:
Jumio
Authentication: Basic Auth.
Requests use Authorization: Basic base64(apiToken:apiSecret).
Verification Check
Looks up verifications by customerId (the wallet address). A wallet is verified when:
Webhook Status Mapping
| Jumio Status | Action |
|---|---|
APPROVED_VERIFIED | add |
DENIED_FRAUD | remove |
DENIED_UNSUPPORTED_ID_TYPE | remove |
DENIED_UNSUPPORTED_ID_COUNTRY | remove |
ERROR_NOT_READABLE_ID | remove |
NO_ID_UPLOADED | remove |
Onfido
Authentication: Token auth.
Requests use Authorization: Token token=apiToken.
Verification Check
Fetches applicant checks and verifies when:
Webhook Handling
Onfido sends check.completed events. The adapter:
- Extracts
checkIdfrom the webhook payload - Fetches the full check via
GET /v3.6/checks/{checkId} - Fetches the applicant via
GET /v3.6/applicants/{applicantId} - Maps the result:
| Check Result | Action |
|---|---|
clear | add |
consider | remove |
unidentified | remove |
Mock Adapter
For development and testing, the mock adapter uses an in-memory set of wallets:
No API keys required. The mock adapter also exposes addVerifiedWallet(wallet) for programmatic testing.
Checking KYC Status
Regardless of provider, you can check any wallet's status: