Skip to content

feat: add DID reputation provider framework (CoinPay integration)#2

Open
kai-agent-free wants to merge 3 commits intomainfrom
feature/did-reputation
Open

feat: add DID reputation provider framework (CoinPay integration)#2
kai-agent-free wants to merge 3 commits intomainfrom
feature/did-reputation

Conversation

@kai-agent-free
Copy link
Owner

Summary

Adds a pluggable reputation provider framework to AgentPass core, with CoinPay DID as the first implementation.

What's new

  • ReputationProvider interface — generic, any DID provider can implement
  • CoinPayReputationProvider — implements 7-dimension weighted trust scoring (stub endpoints, ready when CoinPay API is documented)
  • ReputationAggregator — fetches from multiple providers, converts to AgentPass ExternalAttestation format
  • 3 new tests passing, all 281 existing tests still green

Design decisions

  • Leverages existing ExternalAttestation type in core — no schema changes needed
  • Provider pattern allows adding did:sol, did:web, etc. later
  • Weights configurable per dimension (economic, productivity, behavioral, dispute, recency, activity, cross-platform)

Next steps

  • Contact CoinPay re: DID API beta access
  • Add DID link fields to passport types + API endpoints
  • Consider did:sol as alternative provider

Spec: specs/coinpay-did-reputation.md

- ReputationProvider interface for pluggable DID reputation sources
- CoinPayReputationProvider stub (7-dimension trust vector)
- ReputationAggregator that converts to ExternalAttestation format
- 3 passing tests
- Spec at specs/coinpay-did-reputation.md
- Add /reputation/* API routes (get reputation, trust vector, badge proxy,
  submit receipt, claim DID, register platform issuer)
- Update CoinPayReputationProvider in core to use real SDK API paths
  (Authorization: Bearer, /reputation/agent/:did/reputation, etc.)
- Install @profullstack/coinpay@0.6.10 in api-server
- Fix pre-existing TS build errors (trust.ts unused var, captcha-service,
  aggregator import path)

Routes require COINPAY_API_KEY env var. Public endpoints:
  GET /reputation/:did
  GET /reputation/:did/trust
  GET /reputation/:did/badge
Auth-protected:
  POST /reputation/receipt
  GET  /reputation/did/me
  POST /reputation/did/claim
  POST /reputation/issuer
- Added CoinPayDID section with live trust score from CoinPay API
- Shows DID, trust tier, score, and trust vector dimensions
- Added 'Trust Score' nav link in header
- Section placed between Architecture and MCP Tools sections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant