Installation
Quick Start
Configuration
Evaluate Options
Using a Policy Template
The simplest way to evaluate — pick a template that matches your use case:Using Custom Gates
For full control, specify individual gates:With Dynamic Pricing
Compute trust-based pricing for your API:With Reputation Data
Response Types
TrustResult
Theevaluate() method returns a TrustResult:
| Field | Type | Description |
|---|---|---|
walletAddress | string | The evaluated wallet |
trustScore | number | 0–100 composite score |
trustTier | TrustTier | trusted, verified, limited, untrusted, blocked |
confidence | number | 0.0–1.0 data confidence |
allPassed | boolean | Whether all gates passed |
gateResults | GateScoreBreakdown[] | Per-gate breakdown |
priceMultiplier | number | null | Dynamic pricing multiplier |
suggestedPriceUsdc | number | null | Computed price |
reputation | WalletReputation | null | Behavioral history |
cached | boolean | Whether this was a cache hit |
requestId | string | Unique request ID for debugging |
challenge | object | null | 402 challenge body (if gates failed) |
raw | EvaluationResponse | Full API response |
GateScoreBreakdown
| Field | Type | Description |
|---|---|---|
gateId | string | Gate identifier (e.g., "human") |
gateName | string | Human-readable name |
passed | boolean | Whether this gate passed |
score | number | null | 0–100 gate score |
provider | string | "cred" or third-party name |
Error Handling
| Status | Meaning |
|---|---|
400 | Bad request — unknown policy or missing fields |
401 | Invalid or missing API key |
429 | Rate limit exceeded |
502 | Upstream gate provider error |
Framework Middleware
The core SDK is used by all framework middleware packages. If you’re using Hono, Express, Next.js, or FastAPI, see the dedicated middleware guides — they handle wallet extraction, 402 challenges, and trust headers automatically.Hono
Drop-in Hono middleware
Express
Express middleware
Next.js
Next.js edge middleware
Python
Python + FastAPI