Skip to content

feat(ramps): add RampsController sendPix orchestration - #9856

Draft
saustrie-consensys wants to merge 6 commits into
saustrie/neobank-pix-service-methodsfrom
saustrie/ramps-send-pix
Draft

feat(ramps): add RampsController sendPix orchestration#9856
saustrie-consensys wants to merge 6 commits into
saustrie/neobank-pix-service-methodsfrom
saustrie/ramps-send-pix

Conversation

@saustrie-consensys

@saustrie-consensys saustrie-consensys commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Explanation

Adds RampsController:sendPix so Mobile can submit a Money Account Pix offramp through one messenger action:

  1. NeoBankService:registerPixAddress
  2. NeoBankService:getAutorampQuote (exact-out BRL)
  3. NeoBankService:createAutoramp (body adapter matching feat(ramps): add NeoBankService Pix and quote client methods #9851 fixtures; Matt/proxy confirmation still open)
  4. addAutoramp with mapped Crypto deposit Hex on walletAddress
  5. TransactionPayController:submitMoneyAccountVaultWithdraw with slim { amountInRaw, moneyAccountAddress, recipient, requestId }

Also includes the NeoBank mapper fix so offramp deposit_rails Crypto Hex is preserved on AutorampRemoteSnapshot.walletAddress (needed before withdraw recipient resolution). Soft-coord with George on that walletAddress semantics.

Confirmation UI is a side effect of vault withdraw (requireApproval: true); sendPix resolves 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:

  • Iron source currency/chain constants (mUSD / monad) pending Matt/product (plan Q1)
  • createAutoramp body 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)
  • Feature flag key 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 plus TransactionPayController:submitMoneyAccountVaultWithdraw.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

… 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.
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).
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