Skip to content

feat: extend PaymentRequest with public pay-only invoices (BB-14) - #306

Draft
trevormil wants to merge 1 commit into
mainfrom
feat/bb-14-pay-only-public-invoices
Draft

feat: extend PaymentRequest with public pay-only invoices (BB-14)#306
trevormil wants to merge 1 commit into
mainfrom
feat/bb-14-pay-only-public-invoices

Conversation

@trevormil

@trevormil trevormil commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Public payment requests currently couple Pay and Deny to All, allowing an unrelated wallet to record a denial. Extend PaymentRequest with a public pay-only shape: exactly one payment approval scoped to All, no deny approval, and pending → paid or expired. Specific-payer requests retain their two-approval Pay/Deny flow.

Updates both SDK validators, the builder and presets, CLI --payer All support and denial handling, and AI builder instructions. PaymentRequestDetails.denyApproval becomes optional. Public pay/deny pairs are rejected as nonconforming; existing on-chain approvals are not changed. Creator-only Deny was avoided because it would record a marker without stopping payment on-chain.

Tracks BB-14. Replaces the approach in closed frontend PR BitBadges/bitbadges-frontend#262. The rollout runbook explains compatibility and release order.

Validation:

  • 325 targeted Jest tests passed across protocol validation, cross-standard rejection, builders, presets, and CLI command suites. Regression cases were observed failing before implementation.
  • bun run build passed, including CJS/ESM import checks and circular-dependency check.
  • CLI smoke: build payment-request --payer All with an explicit creator emits one pay approval; no transaction broadcast.
  • bun audit --json: 5 existing moderate advisories, no High/Critical; manifests and lockfiles are unchanged. Semgrep unavailable; gitleaks not requested.

Rollout: merge/publish this SDK first, then pin the resulting version and lockfiles in the linked indexer/frontend drafts. No release or deployment is performed by this PR.

Companion PRs: SDK #306, indexer #248, frontend #345.

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