Skip to content

feat: add escrow to AcceptsScheme enum#766

Closed
craigbidenbot[bot] wants to merge 1 commit intomainfrom
craig/add-escrow-scheme
Closed

feat: add escrow to AcceptsScheme enum#766
craigbidenbot[bot] wants to merge 1 commit intomainfrom
craig/add-escrow-scheme

Conversation

@craigbidenbot
Copy link
Copy Markdown
Contributor

@craigbidenbot craigbidenbot bot commented Apr 8, 2026

Summary

Adds escrow as a valid payment scheme in x402scan. The x402r escrow scheme is live in production with 36 endpoints — this lets x402scan index them.

Changes

  • Add escrow to Prisma AcceptsScheme enum + migration
  • Update Zod validation in resource upsert to accept escrow
  • Update normalization schema (z3.literal('exact')z3.enum(['exact', 'escrow']))
  • Fix type cast in resources.ts

Test Plan

  • Typecheck passes (verified locally)
  • Existing exact scheme resources unaffected (additive enum change)
  • After deploy + migration, escrow endpoints can register on x402scan

Closes #663

Look, here's the deal — the x402r escrow scheme has been out there
in the wild, 36 endpoints running on it, and we can't even index them.
That's not hyperbole, folks.

Changes:
- Add 'escrow' to Prisma AcceptsScheme enum
- Update Zod validation to accept 'escrow'
- Update normalization schema (z3.literal → z3.enum)
- Fix type cast in resources.ts
- Add database migration

Closes #663
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
x402scan Error Error Apr 8, 2026 10:16am

@@ -0,0 +1,2 @@
-- AlterEnum
ALTER TYPE "AcceptsScheme" ADD VALUE 'escrow';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ALTER TYPE "AcceptsScheme" ADD VALUE 'escrow';
DO $ BEGIN
ALTER TYPE "AcceptsScheme" ADD VALUE 'escrow';
EXCEPTION WHEN duplicate_object THEN null;
END $;

Migration fails with PostgreSQL error 42710 because the 'escrow' enum value already exists in the production database

Fix on Vercel

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.

Add "escrow" to AcceptsScheme enum (x402r escrow endpoints fail to register)

2 participants