Gitcoin Passport Integration
Gitcoin Passport — aggregator of identity credentials for proving human uniqueness. User collects "stamps" (confirmations) from various sources: GitHub, Twitter, Google, ENS, BrightID, Proof of Humanity, on-chain activity. Total score used as anti-sybil protection.
Integration via Passport SDK
import PassportVerifier from '@gitcoinco/passport-sdk-verifier';
const verifier = new PassportVerifier();
// Get passport and score of user
async function checkPassport(address: string) {
const passport = await verifier.verifyPassport(address);
const score = await verifier.getPassportScore(address);
return {
hasPassport: !!passport,
score: score,
stamps: passport?.stamps || []
};
}
On-chain Integration
Gitcoin provides scorer API and on-chain attestations via EAS:
interface IGitcoinPassportDecoder {
function getScore(address user) external view returns (uint256);
function getPassport(address user) external view returns (Credential[] memory);
}
contract ProtectedFeature {
IGitcoinPassportDecoder passport;
uint256 public constant MIN_SCORE = 15; // configurable threshold
modifier requiresPassport() {
require(
passport.getScore(msg.sender) >= MIN_SCORE,
"Gitcoin Passport score too low"
);
_;
}
function accessGatedFeature() external requiresPassport {
// only verified users
}
}
Scorer API
For backend integration:
const response = await fetch(
`https://api.scorer.gitcoin.co/registry/score/${SCORER_ID}/${walletAddress}`,
{ headers: { 'X-API-Key': process.env.GITCOIN_API_KEY } }
);
const { score, passing_score } = await response.json();
Gitcoin Passport integration — 1-3 days. Simplest way to add anti-sybil protection without developing own system.







