Credentials Verification Service
Developer Integration Guide
What is This?
The Humanity Protocol Credentials Verification Service allows your DApp to verify if users meet specific conditions, such as:
Has the user completed KYC identity verification?
Has the user connected social accounts like Google or Twitter?
Does the user's net worth reach a certain tier?
Is the user a member of a specific airline or hotel loyalty program?
In simple terms: Your smart contract can ask Humanity Protocol questions like "Does this user have a Google account?" or "Has this user passed KYC?", then decide whether to allow user actions based on the answer.
How It Works
1. User clicks "Verify Identity" button
The user initiates the verification process from your DApp's frontend interface.
2. User signs authorization
The user signs a permission message using their wallet (e.g., MetaMask) to authorize the verification request.
3. Your DApp contract calls the Oracle
Your DApp contract submits the verification request to the Humanity Protocol Verification Oracle, including the user's signature.
4. Oracle backend checks user credentials
The Oracle's off-chain backend validates the user's humanity credentials against Humanity Protocol's verification system.
5. Oracle calls back your contract with the result
The Oracle creates an on-chain attestation and calls your contract's onVerificationComplete callback with the verification result.
6. Your contract executes business logic
Your contract processes the result (verified or not) and executes the appropriate action, such as granting access or distributing tokens.
Core Concepts
Credential
A verifiable claim held by the user — may be a W3C Verifiable Credential (VC), a Zero-Knowledge proof, or a proof generated from another protocol
Issuer
The entity responsible for assessing user attributes/behavior and issuing credentials — this may be a KYC provider, the protocol itself, or an external partner
Holder
The user's wallet address that stores the credential/proof and presents it to the DApp when required
Verifier Contract
The smart contract provided by this service, responsible for verifying credentials
Claim
A specific verification condition (e.g., google_connected, mc_kyc)
Category
A grouping of related claims (e.g., IDENTITY, SOCIAL, FINANCE)
Supported Verification Claims
Social Account Verification
The simplest and most common verification - confirms users have connected social accounts:
github_connected
User has connected GitHub
google_connected
User has connected Google
discord_connected
User has connected Discord
twitter_connected
User has connected Twitter/X
linkedin_connected
User has connected LinkedIn
telegram_connected
User has connected Telegram
email_verified
User has verified email ownership
humanity_identity
User has verified via Palm check
Use Cases: Community verification, sybil attack prevention, ensuring real users
Identity & Financial Verification (Mastercard)
Verify user identity and assets through bank account data:
mc_kyc
User has completed KYC verification
Identity
mc_residency
User residency verification
Identity
mc_net_worth
Net worth tier ($100 / $10K / $1M+)
Finance
mc_investments
Investment account verification
Finance
mc_retirement
Retirement savings verification (401K, IRA)
Finance
mc_mortgage
Mortgage verification
Finance
Use Cases: DeFi lending, accredited investor verification, credit assessment
Membership Verification
Verify user's airline/hotel loyalty program memberships:
Airlines:
delta_membership
Delta Airlines SkyMiles
emirates_membership
Emirates Skywards
singapore_airlines_membership
Singapore Airlines KrisFlyer
american_airlines_membership
American Airlines AAdvantage
cathay_pacific_membership
Cathay Pacific Asia Miles
korean_air_membership
Korean Air SKYPASS
jetblue_membership
JetBlue TrueBlue
thai_airways_membership
Thai Airways Royal Orchid Plus
virgin_australia_membership
Virgin Australia Velocity
frontier_airlines_membership
Frontier Airlines Frontier Miles
spirit_airlines_membership
Spirit Airlines Free Spirit
etihad_membership
Etihad Airways Guest
ryanair_membership
Ryanair Membership
sas_membership
Scandinavian Airlines EuroBonus
Hotels:
marriott_membership
Marriott Bonvoy
hilton_membership
Hilton Honors
accor_membership
Accor Live Limitless
wyndham_membership
Wyndham Rewards
radisson_membership
Radisson Rewards
shangri_la_membership
Shangri-La Circle
taj_hotels_membership
Taj Hotels InnerCircle
Entertainment/Casinos:
caesars_membership
Caesars Rewards
mgm_resorts_membership
MGM Rewards
wynn_resorts_membership
Wynn Rewards
Use Cases: VIP member-exclusive events, loyalty rewards, identity verification
Crypto Exchange Verification (CEX)
binance_finance
Binance
Account and balances verification
okx_finance
OKX
Account and total valuation
Use Cases: Airdrop eligibility, trading volume proof
Contract Addresses
Mainnet (Humanity Chain)
HumanityVerificationOracle
0x8D71D8bD47860bd0381b272AE42162c3692c4F3a
6985385
FeeEscrow
0xe433f01131eAbD8060a1E34149eF0e79b2b86fEc
6985385
Testnet (Humanity Testnet)
HumanityVerificationOracle
0x67c0A5cA2Fb19E8E0Ff008d727aff5f128b00E09
7080969
FeeEscrow
0x1a247b7d7076e4c4D97D87c62947Ab5495C13423
7080969
Quick Start
Step 1: Set Up Your Contract
Step 2: Implement Verification Request
Step 3: Receive Verification Result
Step 4: Get User Signature on Frontend
Fee Management
Prepaid Model Overview
Humanity Protocol uses a prepaid model:
Your DApp deposits $tHP into FeeEscrow once. Verification fees are deducted automatically. Users never pay fees directly.
Quick Start
Deposit Funds
Check Balance
Withdraw Unused Funds
Balance Types
Total
All deposited funds
getBalance(dapp)
Reserved
Locked for pending verifications
getReserved(dapp)
Available
Can use for new verifications
getAvailable(dapp)
Fee Lifecycle
You only pay for successful verifications.
FAQ
Who funds FeeEscrow?
DApp developer/operator
When to fund?
Before users start verifying
What if balance runs out?
Verification requests fail with InsufficientAvailableBalance
Can users steal my funds?
No. Only Oracle can deduct fees; withdrawals need admin approval
One escrow per DApp?
Yes, each DApp needs its own balance
Can I withdraw unused funds?
Yes, request withdrawal → admin approves → funds sent
Best Practice: Monitor Balance
Fee Distribution (on successful verification)
Best Practices
Check Before Requesting
Choose Appropriate Claims
Choose Appropriate Validity Period
High security (financial)
1-7 days
Medium security (access control)
30 days
Low security (preferences)
90+ days
Maintain Sufficient Balance
Common Errors
InvalidUser()
User address is zero
Check user address
NoClaimsSpecified()
No verification claims specified
Pass at least one claim
InsufficientVerificationFee
FeeEscrow balance too low
Deposit more ETH
UnauthorizedRequest
Invalid user signature
Have user sign again
RequestNotFound
Request ID doesn't exist
Check requestId
Complete Example Contract
Quick Reference
Credential Categories
All credentials are organized into these categories:
IDENTITY
Identity verification
mc_kyc, mc_residency ,humanity_identity
SOCIAL
Social platform connections
google_connected, twitter_connected
FINANCE
Financial credentials
mc_net_worth, binance_finance
MEMBERSHIP
Loyalty program memberships
marriott_membership, delta_membership
EMPLOYMENT
Employment verification
(Coming soon)
EDUCATION
Educational credentials
(Coming soon)
HEALTH
Health-related credentials
(Coming soon)
REPUTATION
Reputation scores
(Coming soon)
LEGAL
Legal documents
(Coming soon)
OWNERSHIP
Asset ownership
(Coming soon)
Security Notes
Always verify the caller in your callback function:
User signatures are one-time use - the nonce prevents replay attacks
Signatures are chain-specific - prevents cross-chain attacks
Use ReentrancyGuard for functions that handle value transfers
Set appropriate MAX_AGE based on your security requirements
Last updated