Add CashApp as a buy bitcoin provider#765
Merged
erdemyerebasmaz merged 7 commits intomainfrom Mar 26, 2026
Merged
Conversation
Introduce a CashApp provider that builds a cash.app/launch/lightning deep link from a bolt11 invoice. Remove the BuyBitcoinProviderApi trait (single implementor) and use MoonpayProvider directly. The CashApp flow is a plain function since it has no server-side dependencies.
Replace the flat struct with a tagged enum so each provider carries
only its own parameters:
BuyBitcoinRequest::Moonpay { locked_amount_sat, redirect_url }
BuyBitcoinRequest::CashApp { amount_sats }
Route buy_bitcoin through the selected variant: MoonPay uses an
on-chain deposit address, CashApp generates a bolt11 invoice and
wraps it in a deep link. CashApp is restricted to mainnet.
Expose the new enum variants to JavaScript/TypeScript (wasm-bindgen) and Flutter (flutter_rust_bridge).
Add --provider flag (moonpay/cashapp) and construct the matching enum variant.
Add a CashApp section to the buy-bitcoin guide with platform-specific navigation guidance (pre-open pattern for PWA/mobile). Add CashApp code examples across all nine supported languages.
Update CLAUDE.md CLI modification policy to require fixing CI failures with minimal changes. Fix language CLIs to use the new tagged union BuyBitcoinRequest.Moonpay constructor.
b286fdd to
a041acc
Compare
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.
Summary
BuyBitcoinRequestfrom a flat struct to a tagged union so each provider carries only its own parametersBuyBitcoinProviderApitrait (single implementor) and useMoonpayProviderdirectlycash.app/launch/lightning/<bolt11>deep link from a Lightning invoiceChanges
cashapp.rs, remove trait, simplifyMoonpayProviderMoonpay { locked_amount_sat, redirect_url }/CashApp { amount_sats }--providerflagCLI language ports are intentionally excluded — the Sync CLI workflow will handle them.
Original branch:
feature/cashapp-buy-bitcoin