For developers

Add payment evidence
to your existing agent.

Connect your executor, supply a structured policy, and capture a recoverable payment lifecycle with verifiable receipts. Keep your wallet. Keep your payment provider. Add OCD once.

Start here · TypeScript commerce SDK

Evaluate, execute,
observe, verify.

A separate @onchaindiligence/sdk/commerce export orchestrates an agent’s merchant payment lifecycle. OCD evaluates. Your executor authorizes. Your executor submits. OCD observes.

quickstart.ts
import { createCommerceClient, MockCommerceExecutor, apiPurchasePolicy } from '@onchaindiligence/sdk/commerce'
import { NodeFileRecoveryStore } from '@onchaindiligence/sdk/commerce/node'

const ocd = createCommerceClient({ recovery: new NodeFileRecoveryStore('./ocd-recovery') })
const { policy } = apiPurchasePolicy({ maxAmount: '1.00', allowedNetwork: 'eip155:8453', allowedAsset: BASE_USDC })
const op = await ocd.open({ action: proposedPayment, policy })

const evaluation = await op.preflight() // OCD evaluates against your policy
if (evaluation.kind === 'blocked' || evaluation.kind === 'approval-required') return handleThat(evaluation)

const execution = await op.execute({ executor: myExecutor }) // your executor authorizes + submits, e.g. X402BaseUsdcExecutor
const result = await op.observeAndFinalize() // OCD observes what actually happened -- safe to retry while pending
result.receipt.receipt.execution.status // read the fact, never infer "success" from existence

npm install @onchaindiligence/sdk · Package on npm → · See the complete, runnable quickstart.ts → (mocked executor, no wallet needed, costs nothing).

The commerce client, an MCP connection, and free receipt retrieval/verification are the practical sequence below — the schema catalog and deeper protocol construction remain fully documented further down this page.

Same tools, any agent runtime

ChatGPT, Claude, Gemini,
or ordinary TypeScript.

OCD exposes the same application/MCP interfaces from ChatGPT-style MCP/app environments, Claude MCP, Gemini or custom-tool/MCP environments, and ordinary TypeScript applications — one integration, not three. The application-level commerce hook above (not the model remembering to call a tool) is the real enforcement mechanism.

Free, always

Retrieve and verify
a receipt, at no cost.

get_receipt

Retrieval is free — look up any public receipt by ID, over MCP or the resolver.

verify_receipt

Verification is free. Online verification against OCD’s own key registry is convenient; independent/offline verification remains available for callers who want to run it themselves — see Verify.

Claude custom connector · Free, no account

Use OnChainDiligence
with Claude.

A free, read-only MCP connector lets Claude inspect a proposed payment and retrieve/verify OCD receipts directly in a conversation. It cannot send payments, custody funds, authorize a wallet, reach private operations, or call the paid x402 MCP surface — it only inspects and verifies.

  1. In Claude, go to Settings/Customize → Connectors → Add custom connector.
  2. Paste the server URL: https://mcp.onchaindiligence.com/public/mcp
  3. Name it OnChainDiligence. Authentication: None. Transport: Streamable HTTP.
  4. Click Add — no account, credentials, or setup required.

inspect_payment

Compare a proposed payment against your policy: ALLOW, REQUIRE_APPROVAL or BLOCK. Deterministic only — no external lookups, signing or payment.

get_receipt

Retrieve a public, signed OCD receipt by its exact receipt ID.

verify_receipt

Check a receipt’s proof: VALID, INVALID or UNVERIFIABLE.

Try it against a real example receipt: OCD-RCP-NB51-QG4S-VCAN-Y57F →

example prompts, once the connector is added
"Inspect a $0.001 USDC payment on Base against a $1 maximum."
"Retrieve OCD receipt OCD-RCP-NB51-QG4S-VCAN-Y57F."
"Verify that receipt and tell me what it does and doesn't prove."
Install

npm and PyPI.

TypeScript / npm

Published and installable today.

npm install @onchaindiligence/agent-evidence →

Python

onchaindiligence-agent-evidence — source and tests are public on GitHub. Not yet published to PyPI; install from source until it is.

View the Python package →

Compliance API

The underlying Evidence Provider checks, callable directly over HTTP or MCP.

Read the API docs →
Callable service

Use OnChainDiligence
from an agent.

The MCP service is a separate callable interface from the Technocore signing DID. It exposes public-data diligence tools over Streamable HTTP and charges only after an agent approves a server-supplied x402 requirement.

  1. Connect an MCP client to https://mcp.onchaindiligence.com/mcp.
  2. Call tools/list and choose a tool, such as screen_wallet.
  3. Call it once without payment. The response returns the exact x402 requirement in structuredContent.accepts[0].
  4. Have the agent apply its own policy, then authorize the returned USDC requirement from its own wallet and retry with _meta["x402/payment"].
  5. Read the signed result. The service is non-custodial: it never receives a wallet private key.
minimal screen_wallet flow
// Configure your MCP client with this public endpoint.
const client = await connectMcp('https://mcp.onchaindiligence.com/mcp')
const { tools } = await client.listTools()

const unpaid = await client.callTool({
  name: 'screen_wallet',
  arguments: { address: '0x0000000000000000000000000000000000000000' }
})
const requirement = unpaid.structuredContent.accepts[0] // amount, asset, Base, recipient

// Only after your agent's policy approves the server-supplied requirement:
const payment = await createPaymentHeader(agentWallet, 1, requirement)
const result = await client.callTool({ name: 'screen_wallet', arguments: { address }, _meta: { 'x402/payment': payment } })

The live service returned 10000 atomic USDC units ($0.01) for screen_wallet during validation on 2026-09-03. Do not hard-code that value: always use the requirement returned by the live server. Full runnable consumer example →

Agent Evidence Interoperability Profile v1

Make your agent
independently verifiable.

ArcFX is the working example of this pattern, not a requirement for using it. Full spec: AGENT_EVIDENCE_INTEROP.md →

  1. Install @onchaindiligence/agent-evidence
  2. Construct Mandate / Evidence / Policy / Decision / Execution records
  3. Seal a bundle with sealBundle
  4. Publish signer lifecycle metadata at /.well-known/agent-evidence-keys
  5. Hand the bundle to an independent verifier — browser handoff or any transport
  6. Verifier resolves trust via trustPolicyFromKeyRegistry or its own policy
  7. Receive VALID / INVALID / UNVERIFIABLE
verify.ts
import { trustPolicyFromKeyRegistry, verifyBundle } from '@onchaindiligence/agent-evidence'

// Fetching is the caller's job -- the SDK stays offline-usable.
const registry = await fetch('https://issuer.example/.well-known/agent-evidence-keys').then(r => r.json())
const policy = trustPolicyFromKeyRegistry(registry, { expectedIssuer: 'issuer', expectedEnvironment: 'production' })
const report = verifyBundle(bundle, policy)
report.state // VALID | INVALID | UNVERIFIABLE