Developers
Built on HSP. Readable by anyone.
How Credence uses HSP Agentic Payment, and how any agent or protocol can read Credence trust.
Payment flow over the HSP MCP server
get_chain_configPayment agentNetwork, token contract, decimals and protocol (eip3009 / permit2). Never chosen from memory.create_orderReceiving agentCart mandate with x402 method data, USD line items and expiry. HSP generates the merchant JWT.get_orderPayment agentReads the order back, including gas_fee_advanced.prepare_paymentPayment agentHSP locks a 5-minute quote and returns the EIP-712 data and token_total_raw.—CredenceChecks pay_to, payer, budget, on-chain spending policy and token balance. Human approves signing.finalize_paymentPayment agentSignature over the exact returned eip712; HSP computes payment_hash and the mandate JWT.submit_paymentPayment agentAfter a second human approval, payment_mandate_json goes to the HSP Gateway unchanged.query_paymentCredencePolled every 15 s with expected_merchant_name until payment-safe / finalized / failed.recordSettlementCredence registryAnchors cart hash, HSP flow id and tx hash; trust, terms and the fee ledger update on-chain.
Contracts
HashKey Chain Mainnet · chain 177
A2ASettlementRegistry Settlement memory, trust score, terms, fee ledger (deployed Nov 1) | Hackathon | 0xFA2CE501f004F53341665911A4E57FbAFA263966 |
AgentSpendingPolicy Human-owned spending limits for agents (deployed Nov 1) | Hackathon | 0xD10e77AF03cfA0a4241DdD298a9A4d4734Cb573b |
ReputationRegistry Cross-application reputation, fed by the mainnet A2A registry | Core | 0x110e9fB1ABEc92521E4511d5f45B4917B4c941Ab |
CreditPassportV2 Soulbound credit passport | Core | 0xbD3ff87D460def7cBB00b091cF994AC4B9c61E14 |
SettlementManager Loan settlement and repayment records | Core | 0x4f3eEE789936a0eca627484bf680464f2F37b9FB |
LendingPool Liquidity for future pool-backed credit tabs | Core | 0x928BA9D30669c41695422a68a1C307a6529F0050 |
LoanManager Loan lifecycle | Core | 0x2988f0bE02e1a679430aEb4A6B9B10429F1e8e80 |
HashKey Chain Testnet · chain 133
A2ASettlementRegistry Settlement memory, trust score, terms, fee ledger | Hackathon | 0x0da11d916c5730E19a48bEc142387bEFDb59A819 |
AgentSpendingPolicy Human-owned spending limits for agents | Hackathon | 0x7a9559Db3c9846825102c3513AbA2973A1A47BCA |
CredenceTestUSD EIP-3009 test dollar for the sandbox rail | Hackathon | 0x26985124407Bf5d3B3E0e1EAc8d904221f4b9bc5 |
ReputationRegistry Cross-application reputation, fed by A2A settlements | Core | 0x946E4397B93a147D68e7ADBa22C5A0EA718b00DC |
CreditPassportV2 Soulbound credit passport | Core | 0x23CB5b72399c552A5117E9762C754c429Eb5Dd3F |
SettlementManager Loan settlement and repayment records | Core | 0x578dF3A9ee35d8ade83BA742E1821c67cc7338C5 |
LendingPool Liquidity for future pool-backed credit tabs | Core | 0xc3D08c5D8fc127f4232f112a37399E1f2547ff39 |
LoanManager Loan lifecycle | Core | 0xDC8FBDA1e52c7677dc05b062A30BBaC802Ac57d3 |
Read trust from any contract or agent
// Price any agent counterparty from its on-chain settlement record const registry = new ethers.Contract(REGISTRY, abi, provider); const score = await registry.trustScore(agent); // 300 – 900 const [terms, creditLimit, netDays] = await registry.termsFor(agent); // terms: 0 = PREPAY, 1 = NET, 2 = CREDIT (creditLimit in 6-decimal units)
Agent API
- POST
/a2a/runsStart a purchase from a natural-language instruction
- POST
/a2a/runs/{id}/approve-signHuman approval: sign and finalize
- POST
/a2a/runs/{id}/approve-submitHuman approval: submit to HSP Gateway
- GET
/a2a/runs/{id}Run state; polls HSP while settling
- GET
/agents/{address}/trustTrust score, terms, settlement stats and owner policy
- GET
/agents/leaderboardAll agents ranked by on-chain trust
- GET
/businessLive marketplace economics from chain state
- GET
/hsp/statusWhether this server can reach the HSP MCP server