feat(ramps): add RampsController sendPix orchestration - #9856
Draft
saustrie-consensys wants to merge 6 commits into
Draft
feat(ramps): add RampsController sendPix orchestration#9856saustrie-consensys wants to merge 6 commits into
saustrie-consensys wants to merge 6 commits into
Conversation
… withdraw actions Money Account mUSD that arrives from an external payout (MoonPay/Iron) can only be vaulted by CHOMP's delayed auto-sweep, and there is no reusable path for redeeming vmUSD straight to a partner deposit address. Add two messenger actions so the client can drive both directions itself.
…ithdraw
Persist successful deposit/withdraw results for process-lifetime idempotency,
tighten CHOMP matching to exact vault destination and amount, slim the withdraw
request surface, and return { skipped: true } instead of a fake 0x hash when
vaulting is disabled.
Retain successful deposit results for controller-lifetime dedupe, but clear skipped results so enabling vaulting later can retry the same payout hash.
…-functions' into saustrie/ramps-send-pix
Offramp create responses often omit top-level wallet_address and only expose the Iron crypto deposit Hex in deposit_rails. Preserve that address on AutorampRemoteSnapshot.walletAddress so sendPix / addAutoramp can use it as the vault withdraw recipient.
Compose registerPixAddress, exact-out quote, createAutoramp, addAutoramp, and slim TransactionPay vault withdraw behind one messenger action. Require clientRequestId for NeoBank idempotency and in-flight dedupe; keep Pix metadata out of the withdraw request. Confirmation remains a side effect of submitMoneyAccountVaultWithdraw (requireApproval).
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.
Explanation
Adds
RampsController:sendPixso Mobile can submit a Money Account Pix offramp through one messenger action:NeoBankService:registerPixAddressNeoBankService:getAutorampQuote(exact-out BRL)NeoBankService:createAutoramp(body adapter matching feat(ramps): add NeoBankService Pix and quote client methods #9851 fixtures; Matt/proxy confirmation still open)addAutorampwith mapped Crypto deposit Hex onwalletAddressTransactionPayController:submitMoneyAccountVaultWithdrawwith slim{ amountInRaw, moneyAccountAddress, recipient, requestId }Also includes the NeoBank mapper fix so offramp
deposit_railsCrypto Hex is preserved onAutorampRemoteSnapshot.walletAddress(needed before withdraw recipient resolution). Soft-coord with George on thatwalletAddresssemantics.Confirmation UI is a side effect of vault withdraw (
requireApproval: true);sendPixresolves after approval (or throws). It does not return a handle for Mobile to open the sheet afterward. Mobile must keep the messenger call alive across confirmation.This PR intentionally does not include Mobile UI, WS deposit listeners, or by-ids address lookup.
Plan:
docs/plans/ramps-controller-send-pix-tdd.md(in related worktrees / planning notes). Runtime stack depends on #9849 (vault withdraw), #9851 (NeoBank Pix methods), and #9848 (autoramp accounts). This branch merges #9849 into the send-pix tip so Action types/tests compile against the withdraw messenger action.Open assumptions called out in code:
mUSD/monad) pending Matt/product (plan Q1)createAutorampbody uses{ signed_quote, customer_id }per feat(ramps): add NeoBankService Pix and quote client methods #9851 fixtures until Matt confirms proxy/Iron wire shape (plan Q3)remoteFeatureFlags.moneyAccount.moneyAccountPixSendEnabled(name TBD with LaunchDarkly)Hosts must also delegate the new AllowedActions (included in
RAMPS_CONTROLLER_REQUIRED_SERVICE_ACTIONS): NeoBank Pix/quote/create plusTransactionPayController:submitMoneyAccountVaultWithdraw.References
saustrie/neobank-pix-service-methods)submitMoneyAccountVaultWithdraw)clientRequestId+ approval-blocking call UXdocs/plans/ramps-controller-send-pix-tdd.mdChecklist