Skip to content

feat(api): add signed payment authorization (SPA) flow#29

Merged
naory merged 4 commits into
mainfrom
feat/signed-payment-authorization
Mar 8, 2026
Merged

feat(api): add signed payment authorization (SPA) flow#29
naory merged 4 commits into
mainfrom
feat/signed-payment-authorization

Conversation

@naory
Copy link
Copy Markdown
Owner

@naory naory commented Mar 8, 2026

Summary

  • add SPA issuance service using Ed25519 signatures over canonicalized authorization payloads
  • include SPA envelope in exit decision responses when signing key config is present
  • persist SPA envelope inside decision payload and verify it during settlement enforcement
  • add regression coverage for SPA creation/verification and invalid authorization rejection

Test plan

  • pnpm --filter api test -- test/services/paymentAuthorization.test.ts test/policy/enforceOrReject.test.ts test/routes/gate.test.ts

Made with Cursor

NAOR YUVAL added 4 commits March 8, 2026 18:15
Introduce a signed payment authorization artifact (Ed25519) generated from policy decisions and verified at settlement time, then return it in exit responses to support portable deterministic agent payments.

Made-with: Cursor
Remove empty SIGNED_PAYMENT_AUTHORIZATION.md from the dedicated SPA implementation PR so the change set remains focused on functional code and tests.

Made-with: Cursor
Include the restored signed payment authorization design spec in the dedicated SPA pull request so implementation and protocol guidance land together.

Made-with: Cursor
Preserve precise authorization failure reasons, enforce keyId/public-key verification boundaries, support deterministic expiry checks, and document digest-signing semantics to keep SPA behavior explicit and replay-safe.

Made-with: Cursor
@naory naory merged commit 3c8853f into main Mar 8, 2026
1 check failed
@naory naory deleted the feat/signed-payment-authorization branch March 8, 2026 17:15
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