Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.64 KB

File metadata and controls

36 lines (24 loc) · 1.64 KB

Pull Request

Summary

Wires the public attestation API to the real repository/cache/outbox path instead of the placeholder handlers in src/app.ts.

Changes

  • Mounts src/routes/attestations.ts from src/app.ts.
  • Adds repository-backed paginated list support with accurate totals.
  • Uses read-through attestation cache for list reads and invalidates cache after writes.
  • Persists new attestations in a transaction and emits an attestation.created outbox event.
  • Handles duplicate attestations with 409.
  • Normalizes Ethereum addresses before repository/cache use.
  • Validates payload size for key and value.
  • Documents the endpoints in docs/api.md and docs/openapi.yaml.
  • Extends route/cache/schema/envelope coverage for create, pagination, duplicates, normalization, and cache invalidation.

Verification

Passing focused verification:

npx.cmd vitest run tests/routes/attestations.test.ts src/services/__tests__/attestationCacheService.test.ts src/schemas/attestations.test.ts src/__tests__/envelopeContract.test.ts

Result: 4 passed, 46 tests passed.

Repo-wide verification still has unrelated existing failures:

  • npm.cmd run test fails in env config, member mocks, API key/webhook audit logs, bulk verification, rate limit, and Horizon listener tests.
  • npm.cmd run build fails on unrelated TypeScript errors across Soroban retry types, config timeout fields, outbox metrics, webhook repository interface, audit/service types, key manager types, and other existing modules.

The attestation-related webhook event typing issue was fixed by adding attestation.created and attestation.revoked to WebhookEventType.

#321