Payment Hold: authorize & capture demo (merchant + customer web views) - #14
Draft
tiero wants to merge 2 commits into
Draft
Payment Hold: authorize & capture demo (merchant + customer web views)#14tiero wants to merge 2 commits into
tiero wants to merge 2 commits into
Conversation
…aim) with merchant + customer web views, SDK program artifact, smoke test, and WASM contract playground Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G9JEqcarRxL54WPaSyoFaR
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…llet Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G9JEqcarRxL54WPaSyoFaR
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.
What
An end-to-end, serverless "authorize and capture" payment demo at
covenants/payment-hold/regtest/typescript/— gas-pump style: the customer taps to lock a hold in a covenant VTXO, the merchant captures the metered amount (change auto-returns), can void, and the customer can unilaterally reclaim after a CLTV timelock. The permissionless analog of Coinbase/Shopify's Commerce PaymentsAuthCaptureEscrow(path-by-path comparison table in the README).Pieces
contract/payment-hold.program.json: five paths (capturewith the amount as a witness value,captureAllfor full/sub-dust-change captures,void, customer-signed CLTVreclaim, CSVexit). Per-hold address uniqueness via anorderSaltin the capture covenant. The compiler's.arksources +ContractJsonartifact ship undercontract/reference/(reference only until Emit SDK Program JSON from compiled artifacts (bindgen sdk-program target) compiler#64 lands; contracts from Add payment hold contracts with authorize-and-capture flow compiler#66).src/lib/: terms TLV codec (packet type0x50on the funding tx → restore from chain), hold lifecycle ops, and a watcher that classifies spends by matching the revealed tapleaf against the compiled program (SSE indexer subscription replaces processor webhooks).merchant.html) and customer wallet (customer.html), vanilla TS + Vite, multi-page so the two roles are genuinely separate browser contexts. Handoff: BroadcastChannel → payment link/receipt → on-chain packet. Dev proxy handles CORS for arkd/emulator/esplora.playground/: compiles the reference.arkcontracts to their artifact in-browser via the compiler's wasm-pack build (localpkg/viaplayground/build.sh, hosted fallback)..github/workflows/payment-hold-smoke.ymlboots arkade-regtest and runs the full e2e on every PR touching this demo.Verification status
pnpm test(23/23),tscclean,pnpm buildgreen, all three pages render.captureAll; void; reclaim refused before the timelock and settled after it via the CLTV covenant path (G3); terms packet restored from the funding tx (G4).🤖 Generated with Claude Code
https://claude.ai/code/session_01G9JEqcarRxL54WPaSyoFaR