Skip to content

feat(payments): add payment request schema and parser - #208

Open
emirykl wants to merge 1 commit into
Axionvera:mainfrom
emirykl:grantfox/issue-84-implement-anchorkit-payment-request-schema-and-p
Open

feat(payments): add payment request schema and parser#208
emirykl wants to merge 1 commit into
Axionvera:mainfrom
emirykl:grantfox/issue-84-implement-anchorkit-payment-request-schema-and-p

Conversation

@emirykl

@emirykl emirykl commented Jul 29, 2026

Copy link
Copy Markdown

Summary

  • add versioned payment request types, strict Zod validation, JSON/object parsing, expiry enforcement, and typed non-echoing errors
  • integrate parsed requests into the web payment intent builder and register valid, expired, malformed, and unsupported fixtures
  • document the v1 format, validation rules, parser API, UI workflow, and trust boundaries

Test evidence

  • pnpm --filter @anchorkit/stellar-kit test -- paymentRequest.test.ts — 10 tests passed
  • TypeScript package suites — 330 tests passed; web integration suite — 2 tests passed using an explicit in-repository Vitest config
  • relevant workspace type checks passed
  • focused package lint and full web lint passed
  • pnpm check:examples — 14 examples passed
  • pnpm check:boundaries passed
  • stellar-kit build and Next.js production build passed
  • focused Prettier check, git diff --check, and secret-pattern scan passed

Known baseline issues: repository-wide lint still reports unrelated findings in validationEngine.ts, assetRegistry.ts, and receipt.ts; root format:check attempts to parse Rust without a configured parser and flags unrelated baseline files. Default web Vitest discovery searches above the repository, so its in-repository test was rerun successfully with an explicit safe config.

Fixes #84

Verification

  • PASS: payment request parser tests (10)
  • PASS: TypeScript package suites (330 tests)
  • PASS: web integration tests (2 with explicit in-repository Vitest config)
  • PASS: relevant workspace type checks
  • PASS: focused package lint and full web lint
  • PASS: example consistency check (14 fixtures)
  • PASS: package boundary check
  • PASS: stellar-kit and Next.js production builds
  • PASS: focused formatting, git diff --check, and secret-pattern scan
  • Baseline: broad lint has unrelated existing findings; root format:check is broken by missing Rust parser support and unrelated formatting

Diagnostics

Recovered command failures: /bin/zsh -lc "find . -name AGENTS.md -print && rg -n \"parse.*Result|ParseError|safeParse|Date\\(|expires|UNSUPPORTED|PaymentRequest\" packages apps docs tests examples scripts --glob '"'!**/dist/**'"' --glob '"'!**/.next/**'"'" (2), /bin/zsh -lc "test -d node_modules && echo 'node_modules present' || echo 'node_modules missing'; node --version; pnpm --version; pnpm --filter @anchorkit/stellar-kit test -- paymentRequest.test.ts" (127), /bin/zsh -lc 'corepack pnpm --filter @anchorkit/stellar-kit test -- paymentRequest.test.ts' (1), /bin/zsh -lc 'corepack pnpm exec turbo run build --filter=@anchorkit/stellar-kit...' (1), /bin/zsh -lc 'corepack pnpm --filter @anchorkit/anchor-utils build && corepack pnpm --filter @anchorkit/types --filter @anchorkit/config --filter @anchorkit/validators --filter @anchorkit/stellar-kit --filter @anchorkit/anchor-utils --filter @anchorkit/web test' (1), /bin/zsh -lc 'corepack pnpm --filter @anchorkit/types --filter @anchorkit/config --filter @anchorkit/validators --filter @anchorkit/stellar-kit --filter @anchorkit/anchor-utils --filter @anchorkit/web lint' (1), /bin/zsh -lc 'corepack pnpm format:check && git diff --check' (2)

@El-swaggerito

Copy link
Copy Markdown
Contributor
\nThis PR is currently blocked by merge conflicts.\n\nPlease update the branch with the latest main branch and resolve the conflicts before it can be merged.

@El-swaggerito

Copy link
Copy Markdown
Contributor
\nGitHub has not finished calculating whether this PR can be merged cleanly.\n\nThe auto-merge automation will skip this PR for now. Re-run the automation later.

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.

Implement AnchorKit payment request schema and parser

2 participants