Wires the public attestation API to the real repository/cache/outbox path instead of the placeholder handlers in src/app.ts.
- Mounts
src/routes/attestations.tsfromsrc/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.createdoutbox event. - Handles duplicate attestations with
409. - Normalizes Ethereum addresses before repository/cache use.
- Validates payload size for
keyandvalue. - Documents the endpoints in
docs/api.mdanddocs/openapi.yaml. - Extends route/cache/schema/envelope coverage for create, pagination, duplicates, normalization, and cache invalidation.
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.tsResult: 4 passed, 46 tests passed.
Repo-wide verification still has unrelated existing failures:
npm.cmd run testfails in env config, member mocks, API key/webhook audit logs, bulk verification, rate limit, and Horizon listener tests.npm.cmd run buildfails 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