Build with CrowdProof

Integrate reputation scores, ZK proofs, and identity verification into your protocol. SDKs for TypeScript, Python, Go, C#, Java, and Swift.

Official SDKs

TypeScriptnpm
PythonPyPI
GoGo Modules
C#NuGet
JavaMaven Central
SwiftSPM

Quick Start

Install

npm install @decentra-id/sdk

Usage

index.ts
import { DecentraID } from '@decentra-id/sdk';

const did = new DecentraID({ apiKey: 'did_live_...' });

const score = await did.reputation.getScore(
  '0x1234...abcd',
  'DEFI_LENDING'
);
// → { score: 785, confidence: 88, tier: 'High' }
ScoreCard.tsxReact Hook
import { useScore } from '@decentra-id/sdk/react';

function ScoreCard({ address }) {
  const { data, isLoading } = useScore(address, 'OVERALL');

  if (isLoading) return <Spinner />;
  return <div>Score: {data.score} / 1000</div>;
}

REST API Endpoints

Base URL: https://api.crowdproof.id/api/v1 All SDKs wrap these endpoints with retry logic, timeouts, and typed responses.

POST/api/v1/identity/register
GET/api/v1/identity/{did}
GET/api/v1/reputation/{address}
GET/api/v1/reputation/{address}/{cat}
POST/api/v1/reputation/batch
POST/api/v1/reputation/prove
POST/api/v1/reputation/verify
POST/api/v1/compliance/verify-age
POST/api/v1/compliance/kyc/initiate
GET/api/v1/compliance/kyc/{did}/status
POST/api/v1/compliance/sanctions-check
POST/api/v1/billing/api-keys
GET/api/v1/billing/usage

On-Chain Integration

Query reputation scores directly from your smart contracts.

UndercollateralizedLending.sol
// Query CrowdProof oracle from any smart contract
(uint256 score, uint256 confidence,) = oracle.getScore{
    value: queryFee
}(msg.sender, 1); // 1 = DEFI_LENDING category

// Dynamic collateral based on reputation
if (score >= 800) collateralRatio = 110; // 10% overcollateralized
else if (score >= 600) collateralRatio = 130;
else if (score >= 400) collateralRatio = 150;
else revert("Score too low");