feat: extend PaymentRequest with public pay-only invoices (BB-14) - #306
Draft
trevormil wants to merge 1 commit into
Draft
feat: extend PaymentRequest with public pay-only invoices (BB-14)#306trevormil wants to merge 1 commit into
trevormil wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 toAll, 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 Allsupport and denial handling, and AI builder instructions.PaymentRequestDetails.denyApprovalbecomes 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:
bun run buildpassed, including CJS/ESM import checks and circular-dependency check.build payment-request --payer Allwith 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.