@metamask-previews/ramps-controller 29.0.0-preview-d94a14f45 → 29.0.0-preview-e53b41ba2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +0 -16
  2. package/dist/NeoBankService-method-action-types.d.ts +3 -7
  3. package/dist/NeoBankService-method-action-types.d.ts.map +1 -1
  4. package/dist/NeoBankService-method-action-types.js.map +1 -1
  5. package/dist/NeoBankService.d.ts +4 -26
  6. package/dist/NeoBankService.d.ts.map +1 -1
  7. package/dist/NeoBankService.js +9 -72
  8. package/dist/NeoBankService.js.map +1 -1
  9. package/dist/RampsController-method-action-types.d.ts +0 -12
  10. package/dist/RampsController-method-action-types.d.ts.map +1 -1
  11. package/dist/RampsController-method-action-types.js.map +1 -1
  12. package/dist/RampsController.d.ts +1 -23
  13. package/dist/RampsController.d.ts.map +1 -1
  14. package/dist/RampsController.js +7 -100
  15. package/dist/RampsController.js.map +1 -1
  16. package/dist/TransakService.d.ts +5 -18
  17. package/dist/TransakService.d.ts.map +1 -1
  18. package/dist/TransakService.js +114 -293
  19. package/dist/TransakService.js.map +1 -1
  20. package/dist/autoramp-types.d.ts +1 -32
  21. package/dist/autoramp-types.d.ts.map +1 -1
  22. package/dist/autoramp-types.js.map +1 -1
  23. package/dist/autorampAccount.d.ts +0 -3
  24. package/dist/autorampAccount.d.ts.map +1 -1
  25. package/dist/autorampAccount.js +2 -7
  26. package/dist/autorampAccount.js.map +1 -1
  27. package/dist/index.d.ts +3 -3
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +1 -1
  30. package/dist/index.js.map +1 -1
  31. package/dist/rampsErrorCodes.d.ts +0 -1
  32. package/dist/rampsErrorCodes.d.ts.map +1 -1
  33. package/dist/rampsErrorCodes.js +0 -1
  34. package/dist/rampsErrorCodes.js.map +1 -1
  35. package/package.json +3 -4
package/CHANGELOG.md CHANGED
@@ -9,30 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ### Added
11
11
 
12
- - Add `TransakServiceInvalidateQueriesAction`, `TransakServiceCacheUpdatedEvent` and `TransakServiceGranularCacheUpdatedEvent` types, and include them in `TransakServiceActions` and `TransakServiceEvents` ([#11216](https://github.com/MetaMask/core/pull/11216))
13
12
  - Add `RampsServiceInvalidateQueriesAction`, `RampsServiceCacheUpdatedEvent` and `RampsServiceGranularCacheUpdatedEvent`, also included in `RampsServiceActions` and `RampsServiceEvents` ([#11214](https://github.com/MetaMask/core/pull/11214))
14
13
  - Add `NeoBankServiceInvalidateQueriesAction`, `NeoBankServiceCacheUpdatedEvent` and `NeoBankServiceGranularCacheUpdatedEvent`, also included in `NeoBankServiceActions` and `NeoBankServiceEvents` ([#10882](https://github.com/MetaMask/core/pull/10882))
15
- - Added an optional `isNetworkAccessAllowed` constructor option to `RampsController`. Every method that can reach the network checks it before any state write or request, and throws an error carrying the new `RAMPS_ERROR_CODES.NETWORK_ACCESS_DENIED` code when it returns `false`. A denied call does not serve a non-expired request-cache entry either, so hosts render already-fetched data from controller state while access is denied. Omitting the option keeps the existing behavior. `addOrder`, `addPrecreatedOrder`, `removeOrder`, and `transakLogout` still apply their local change and skip only the remote call ([#11222](https://github.com/MetaMask/core/pull/11222))
16
- - Add `SepaDepositInstructions` and `extractSepaDepositInstructions`; `NeoBankService.getDepositInstructions` now returns `{ type: 'Sepa' }` for an EUR autoramp with a SEPA deposit rail, including `paymentReference` from the autoramp's `inbound_payment_reference` when MoonPay uses pay-by-reference and `isThirdParty` from its `is_third_party` when present ([#11397](https://github.com/MetaMask/core/pull/11397))
17
14
 
18
15
  ### Changed
19
16
 
20
- - **BREAKING:** `TransakService` now extends `BaseDataService` ([#11216](https://github.com/MetaMask/core/pull/11216))
21
- - This is breaking because `TransakServiceMessenger` has new required actions and events, writes are no longer retried, and `verifyUserOtp` now shares the circuit breaker with every other request (see below).
22
- - `TransakServiceActions` now includes `TransakService:invalidateQueries`, and `TransakServiceEvents` now includes the `TransakService:cacheUpdated` events. A host messenger built from `MessengerActions<TransakServiceMessenger>` and `MessengerEvents<TransakServiceMessenger>` picks these up automatically.
23
17
  - **BREAKING:** `RampsService` now extends `BaseDataService` from `@metamask/base-data-service` ([#11214](https://github.com/MetaMask/core/pull/11214))
24
18
  - This is breaking because `RampsService` no longer has public `onRetry`, `onBreak` and `onDegraded` methods (see Removed), and `RampsServiceMessenger` has new required actions and events. Pass `policyOptions` to the constructor to configure retries and the circuit breaker.
25
19
  - `RampsServiceMessenger` now includes the `RampsService:invalidateQueries` action and the `RampsService:cacheUpdated` events. Messengers built from `RampsServiceActions` and `RampsServiceEvents` pick these up automatically.
26
20
  - **BREAKING:** `NeoBankService` now extends `BaseDataService` from `@metamask/base-data-service`, so reads and writes share one circuit breaker (previously each had its own) and repeated read failures can now block writes ([#10882](https://github.com/MetaMask/core/pull/10882))
27
21
  - `NeoBankServiceMessenger` now includes the `NeoBankService:invalidateQueries` action and `NeoBankService:cacheUpdated` events. Messengers built from `NeoBankServiceActions` / `NeoBankServiceEvents` pick these up automatically.
28
- - **BREAKING:** `AutorampDepositInstructions` now includes a `Sepa` variant, so exhaustive switches on its `type` must handle it ([#11397](https://github.com/MetaMask/core/pull/11397))
29
- - `NeoBankService.getDepositInstructions` returns `{ type: 'Sepa', iban, ... }` when the autoramp has a SEPA rail with an IBAN, after PIX and US bank rails. The result includes `paymentReference` when MoonPay returns an `inbound_payment_reference` for a pay-by-reference autoramp.
30
- - `getMusdAutorampDepositRailReadiness` now checks the `sepa` rail for EUR ([#11397](https://github.com/MetaMask/core/pull/11397))
31
- - Dropped `source_is_third_party` from `buildMusdAutorampRequest`; neobank-proxy now sets it on every market create, choosing first- or third-party per customer from the eligible rails ([#11397](https://github.com/MetaMask/core/pull/11397))
32
- - Concurrent identical `TransakService` reads are now deduplicated: while one request is in flight, identical calls reuse it instead of sending another. Reads still always hit the API ([#11216](https://github.com/MetaMask/core/pull/11216))
33
- - Responses are now validated, and a malformed response throws `Query function for "TransakService:<method>" returned an unexpected response: ...` for reads or `Mutation function for "TransakService:<method>" returned an unexpected response: ...` for writes. Previously the response was returned unchecked ([#11216](https://github.com/MetaMask/core/pull/11216))
34
- - Writes (every POST, PATCH and DELETE request) are no longer retried. Previously only `verifyUserOtp` was exempt from retries ([#11216](https://github.com/MetaMask/core/pull/11216))
35
- - `verifyUserOtp` now shares the circuit breaker with every other `TransakService` request. Previously it had its own, so repeated failures on other requests can now block it ([#11216](https://github.com/MetaMask/core/pull/11216))
36
22
  - Concurrent identical `RampsService` calls are now deduplicated: while one request is in flight, calls with the same method and arguments reuse it instead of sending another. Sequential calls still always hit the API ([#11214](https://github.com/MetaMask/core/pull/11214))
37
23
  - Responses that do not match the expected shape now throw `Query function for "RampsService:<method>" returned an unexpected response: ...`, instead of `Malformed response received from <api name>` ([#11214](https://github.com/MetaMask/core/pull/11214))
38
24
  - `NeoBankService.getAutorampQuote`, `getAutorampQuoteForAutoramp`, `getCustomerByExternalId`, `registerPixAddress` and `attachAutorampQuote` now return `Promise<Json>` instead of `Promise<unknown>` ([#10882](https://github.com/MetaMask/core/pull/10882))
@@ -42,8 +28,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
42
28
  - This applies to `getAutoramp`, `getAutoramps`, `getPixDepositInstructions`, `getDepositInstructions`, `getMicrodeposits`, `getCustomerAbilities`, `listAutorampTransactions` and `createAutoramp`.
43
29
  - Add dependency `@metamask/base-data-service` ([#10882](https://github.com/MetaMask/core/pull/10882))
44
30
  - Add dependency `@metamask/superstruct` ([#10882](https://github.com/MetaMask/core/pull/10882))
45
- - Bump `@metamask/profile-sync-controller` from `^36.0.0` to `^36.1.2` ([#11396](https://github.com/MetaMask/core/pull/11396), [#11419](https://github.com/MetaMask/core/pull/11419), [#11474](https://github.com/MetaMask/core/pull/11474))
46
- - Bump `@metamask/utils` from `^12.0.1` to `^12.0.2` ([#11474](https://github.com/MetaMask/core/pull/11474))
47
31
 
48
32
  ### Removed
49
33
 
@@ -49,13 +49,9 @@ export type NeoBankServiceGetPixDepositInstructionsAction = {
49
49
  * Loads deposit details for an autoramp, whichever rail it has.
50
50
  *
51
51
  * Calls `GET /neobank/autoramps/{id}` and reads the PIX rail, or else a US
52
- * bank rail (`ACH`, `Wire`, `RTP`, or `FedNow`), or else the SEPA rail.
53
- * SEPA details also carry the autoramp's `inbound_payment_reference` as
54
- * `paymentReference` when MoonPay uses pay-by-reference, and `is_third_party`
55
- * as `isThirdParty` when the response has one.
56
- * Returns null until MoonPay has attached a supported rail. MoonPay only
57
- * verifies the rail at `Approved`, so callers should not show these details
58
- * before then.
52
+ * bank rail (`ACH`, `Wire`, `RTP`, or `FedNow`). Returns null until MoonPay
53
+ * has attached a supported rail. MoonPay only verifies the rail at
54
+ * `Approved`, so callers should not show these details before then.
59
55
  *
60
56
  * @param autorampId - MoonPay autoramp id.
61
57
  * @returns Deposit details discriminated by `type`, or null.
@@ -1 +1 @@
1
- {"version":3,"file":"NeoBankService-method-action-types.d.ts","sourceRoot":"","sources":["../src/NeoBankService-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D;;;;;;;GAOG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,4BAA4B,CAAC;IACnC,OAAO,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C,IAAI,EAAE,6BAA6B,CAAC;IACpC,OAAO,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CACzC,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,6CAA6C,GAAG;IAC1D,IAAI,EAAE,0CAA0C,CAAC;IACjD,OAAO,EAAE,cAAc,CAAC,2BAA2B,CAAC,CAAC;CACtD,CAAC;AAEF;;;;;;;;;;;;;;G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CAAqC,CAAC;IAC5C,OAAO,EAAE,cAAc,CAAC,sBAAsB,CAAC,CAAC;CACjD,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,cAAc,CAAC,kBAAkB,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,wCAAwC,GAAG;IACrD,IAAI,EAAE,qCAAqC,CAAC;IAC5C,OAAO,EAAE,cAAc,CAAC,sBAAsB,CAAC,CAAC;CACjD,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,+CAA+C,GAAG;IAC5D,IAAI,EAAE,4CAA4C,CAAC;IACnD,OAAO,EAAE,cAAc,CAAC,6BAA6B,CAAC,CAAC;CACxD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,4CAA4C,GAAG;IACzD,IAAI,EAAE,yCAAyC,CAAC;IAChD,OAAO,EAAE,cAAc,CAAC,0BAA0B,CAAC,CAAC;CACrD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GACnC,+BAA+B,GAC/B,gCAAgC,GAChC,6CAA6C,GAC7C,0CAA0C,GAC1C,4CAA4C,GAC5C,sCAAsC,GACtC,oCAAoC,GACpC,kCAAkC,GAClC,+CAA+C,GAC/C,uCAAuC,GACvC,2CAA2C,GAC3C,wCAAwC,GACxC,oCAAoC,GACpC,wCAAwC,GACxC,+CAA+C,GAC/C,4CAA4C,CAAC"}
1
+ {"version":3,"file":"NeoBankService-method-action-types.d.ts","sourceRoot":"","sources":["../src/NeoBankService-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D;;;;;;;GAOG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,4BAA4B,CAAC;IACnC,OAAO,EAAE,cAA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,GAC3C,wCAAwC,GACxC,oCAAoC,GACpC,wCAAwC,GACxC,+CAA+C,GAC/C,4CAA4C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"NeoBankService-method-action-types.js","sourceRoot":"","sources":["../src/NeoBankService-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { NeoBankService } from './NeoBankService.js';\n\n/**\n * Fetches an autoramp account via neobank-proxy\n * `GET /neobank/autoramps/{autoramp_id}` (MoonPay\n * `GET /api/autoramps/{autoramp_id}`).\n *\n * @param autorampId - MoonPay / Ramp API autoramp id.\n * @returns Remote snapshot for controller apply/refresh.\n */\nexport type NeoBankServiceGetAutorampAction = {\n type: `NeoBankService:getAutoramp`;\n handler: NeoBankService['getAutoramp'];\n};\n\n/**\n * Fetches autoramp accounts, following MoonPay `cursor` pages until the\n * list is complete.\n *\n * Pass `customerId` to scope the list to one MoonPay customer. Omitting it\n * asks the proxy for the partner-wide list. Each request uses MoonPay's\n * maximum `page_size`.\n *\n * @param params - Optional filters.\n * @param params.customerId - MoonPay customer id.\n * @returns Remote snapshots for every page.\n */\nexport type NeoBankServiceGetAutorampsAction = {\n type: `NeoBankService:getAutoramps`;\n handler: NeoBankService['getAutoramps'];\n};\n\n/**\n * Loads PIX deposit instructions for an autoramp.\n *\n * Calls `GET /neobank/autoramps/{id}` and reads the `type: Pix` rail\n * (`br_code`, `instruction`, optional `pix_key`). Returns null until MoonPay\n * has attached deposit rails (typically once the autoramp is Approved).\n *\n * @param autorampId - MoonPay autoramp id.\n * @returns PIX instructions, or null when the rail is not ready.\n */\nexport type NeoBankServiceGetPixDepositInstructionsAction = {\n type: `NeoBankService:getPixDepositInstructions`;\n handler: NeoBankService['getPixDepositInstructions'];\n};\n\n/**\n * Loads deposit details for an autoramp, whichever rail it has.\n *\n * Calls `GET /neobank/autoramps/{id}` and reads the PIX rail, or else a US\n * bank rail (`ACH`, `Wire`, `RTP`, or `FedNow`), or else the SEPA rail.\n * SEPA details also carry the autoramp's `inbound_payment_reference` as\n * `paymentReference` when MoonPay uses pay-by-reference, and `is_third_party`\n * as `isThirdParty` when the response has one.\n * Returns null until MoonPay has attached a supported rail. MoonPay only\n * verifies the rail at `Approved`, so callers should not show these details\n * before then.\n *\n * @param autorampId - MoonPay autoramp id.\n * @returns Deposit details discriminated by `type`, or null.\n */\nexport type NeoBankServiceGetDepositInstructionsAction = {\n type: `NeoBankService:getDepositInstructions`;\n handler: NeoBankService['getDepositInstructions'];\n};\n\n/**\n * Lists the newest page of transactions for one autoramp via\n * `GET /neobank/autoramp-transactions?autoramp_id=&sort_order=desc`.\n *\n * This is the first page only, not the full history. Poll `status`\n * (`Completed`, `Failed`, …). The deprecated `state` field is ignored.\n *\n * @param autorampId - MoonPay autoramp id.\n * @param options - Optional page size. Omitted requests use the API default.\n * @param options.pageSize - `page_size` query value. Callers that diff\n * status pass 50.\n * @returns Transaction summaries from the newest page.\n */\nexport type NeoBankServiceListAutorampTransactionsAction = {\n type: `NeoBankService:listAutorampTransactions`;\n handler: NeoBankService['listAutorampTransactions'];\n};\n\n/**\n * Registers a Pix address via neobank-proxy `POST /neobank/addresses/pix`.\n * Body is forwarded as opaque JSON (MoonPay address schema).\n *\n * @param body - Pix address registration payload.\n * @param options - Optional idempotency key.\n * @returns Parsed proxy JSON response.\n */\nexport type NeoBankServiceRegisterPixAddressAction = {\n type: `NeoBankService:registerPixAddress`;\n handler: NeoBankService['registerPixAddress'];\n};\n\n/**\n * Fetches an autoramp quote via neobank-proxy `GET /neobank/autoramps/quote`.\n *\n * @param query - Quote query params (forwarded as-is).\n * @returns Parsed proxy JSON response.\n */\nexport type NeoBankServiceGetAutorampQuoteAction = {\n type: `NeoBankService:getAutorampQuote`;\n handler: NeoBankService['getAutorampQuote'];\n};\n\n/**\n * Creates an autoramp from a signed quote via neobank-proxy\n * `POST /neobank/autoramps` (MoonPay `POST /api/autoramps`).\n *\n * @param body - CreateAutoramp / signed-quote payload (forwarded as-is).\n * @param options - Optional idempotency key.\n * @returns Remote snapshot for controller apply/refresh.\n */\nexport type NeoBankServiceCreateAutorampAction = {\n type: `NeoBankService:createAutoramp`;\n handler: NeoBankService['createAutoramp'];\n};\n\n/**\n * Fetches a quote for an existing autoramp via neobank-proxy\n * `GET /neobank/autoramps/{autoramp_id}/quote`.\n *\n * @param autorampId - Autoramp id.\n * @param query - Quote query params (forwarded as-is).\n * @returns Parsed proxy JSON response.\n */\nexport type NeoBankServiceGetAutorampQuoteForAutorampAction = {\n type: `NeoBankService:getAutorampQuoteForAutoramp`;\n handler: NeoBankService['getAutorampQuoteForAutoramp'];\n};\n\n/**\n * Attaches a signed quote to an autoramp via neobank-proxy\n * `POST /neobank/autoramps/{autoramp_id}/quotes`.\n *\n * @param autorampId - Autoramp id.\n * @param body - Quote attachment payload (forwarded as-is).\n * @param options - Optional idempotency key.\n * @returns Parsed proxy JSON response.\n */\nexport type NeoBankServiceAttachAutorampQuoteAction = {\n type: `NeoBankService:attachAutorampQuote`;\n handler: NeoBankService['attachAutorampQuote'];\n};\n\n/**\n * Fetches a customer by partner external id via neobank-proxy\n * `GET /neobank/customers/{external_id}/external`.\n *\n * @param externalId - Partner-assigned external customer id.\n * @returns Parsed proxy JSON response.\n */\nexport type NeoBankServiceGetCustomerByExternalIdAction = {\n type: `NeoBankService:getCustomerByExternalId`;\n handler: NeoBankService['getCustomerByExternalId'];\n};\n\n/**\n * Resolves Iron's internal customer id via neobank-proxy customer lookup,\n * using the MetaMask canonical profile id as the partner `external_id`.\n *\n * @returns Iron's internal customer id.\n */\nexport type NeoBankServiceGetMoonpayCustomerIdAction = {\n type: `NeoBankService:getMoonpayCustomerId`;\n handler: NeoBankService['getMoonpayCustomerId'];\n};\n\n/**\n * Lists the customer's bank-link microdeposits via neobank-proxy\n * `GET /neobank/customers/{customer_id}/microdeposits` (MoonPay\n * `GET /api/customers/{id}/microdeposits`).\n *\n * The customer id is resolved through {@link getMoonpayCustomerId} at most\n * once per service instance; concurrent callers share the in-flight lookup\n * and a failed lookup is retried by the next call. A 404 (from the customer\n * lookup or the list) means there is no customer or no deposits yet and\n * resolves `[]`. Any other non-2xx response throws an {@link HttpError}. The\n * customer lookup is a single attempt: it does not go through the retry\n * policy.\n *\n * @returns MoonPay microdeposits, unmodified.\n */\nexport type NeoBankServiceGetMicrodepositsAction = {\n type: `NeoBankService:getMicrodeposits`;\n handler: NeoBankService['getMicrodeposits'];\n};\n\n/**\n * Reads the customer's rail abilities via neobank-proxy\n * `GET /neobank/customers/{customer_id}/abilities` (MoonPay\n * `GET /api/customers/{id}/abilities`).\n *\n * MoonPay rejects an autoramp create with a 422 when the rail it needs is not\n * `Active`, even for an `Active` customer. The customer id is resolved the\n * same way as in {@link getMicrodeposits}. Any non-2xx response, including a\n * 404 when there is no customer yet, throws an {@link HttpError}.\n *\n * @returns MoonPay customer abilities, unmodified.\n */\nexport type NeoBankServiceGetCustomerAbilitiesAction = {\n type: `NeoBankService:getCustomerAbilities`;\n handler: NeoBankService['getCustomerAbilities'];\n};\n\n/**\n * Checks whether a Monad Money Account address is already registered for the\n * given Iron customer.\n *\n * @param params - Customer id and address to check.\n * @param params.customerId - Iron / MoonPay customer UUID.\n * @param params.address - Money Account address.\n * @returns Active, disabled, or absent registration status.\n */\nexport type NeoBankServiceGetWalletRegistrationStatusAction = {\n type: `NeoBankService:getWalletRegistrationStatus`;\n handler: NeoBankService['getWalletRegistrationStatus'];\n};\n\n/**\n * Submits a signed Monad Money Account ownership proof via neobank-proxy\n * `POST /neobank/addresses/crypto/selfhosted`.\n *\n * @param params - Signed ownership proof.\n * @returns Registered wallet record.\n */\nexport type NeoBankServiceRegisterSelfHostedWalletAction = {\n type: `NeoBankService:registerSelfHostedWallet`;\n handler: NeoBankService['registerSelfHostedWallet'];\n};\n\n/**\n * Union of all NeoBankService action types.\n */\nexport type NeoBankServiceMethodActions =\n | NeoBankServiceGetAutorampAction\n | NeoBankServiceGetAutorampsAction\n | NeoBankServiceGetPixDepositInstructionsAction\n | NeoBankServiceGetDepositInstructionsAction\n | NeoBankServiceListAutorampTransactionsAction\n | NeoBankServiceRegisterPixAddressAction\n | NeoBankServiceGetAutorampQuoteAction\n | NeoBankServiceCreateAutorampAction\n | NeoBankServiceGetAutorampQuoteForAutorampAction\n | NeoBankServiceAttachAutorampQuoteAction\n | NeoBankServiceGetCustomerByExternalIdAction\n | NeoBankServiceGetMoonpayCustomerIdAction\n | NeoBankServiceGetMicrodepositsAction\n | NeoBankServiceGetCustomerAbilitiesAction\n | NeoBankServiceGetWalletRegistrationStatusAction\n | NeoBankServiceRegisterSelfHostedWalletAction;\n"]}
1
+ {"version":3,"file":"NeoBankService-method-action-types.js","sourceRoot":"","sources":["../src/NeoBankService-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { NeoBankService } from './NeoBankService.js';\n\n/**\n * Fetches an autoramp account via neobank-proxy\n * `GET /neobank/autoramps/{autoramp_id}` (MoonPay\n * `GET /api/autoramps/{autoramp_id}`).\n *\n * @param autorampId - MoonPay / Ramp API autoramp id.\n * @returns Remote snapshot for controller apply/refresh.\n */\nexport type NeoBankServiceGetAutorampAction = {\n type: `NeoBankService:getAutoramp`;\n handler: NeoBankService['getAutoramp'];\n};\n\n/**\n * Fetches autoramp accounts, following MoonPay `cursor` pages until the\n * list is complete.\n *\n * Pass `customerId` to scope the list to one MoonPay customer. Omitting it\n * asks the proxy for the partner-wide list. Each request uses MoonPay's\n * maximum `page_size`.\n *\n * @param params - Optional filters.\n * @param params.customerId - MoonPay customer id.\n * @returns Remote snapshots for every page.\n */\nexport type NeoBankServiceGetAutorampsAction = {\n type: `NeoBankService:getAutoramps`;\n handler: NeoBankService['getAutoramps'];\n};\n\n/**\n * Loads PIX deposit instructions for an autoramp.\n *\n * Calls `GET /neobank/autoramps/{id}` and reads the `type: Pix` rail\n * (`br_code`, `instruction`, optional `pix_key`). Returns null until MoonPay\n * has attached deposit rails (typically once the autoramp is Approved).\n *\n * @param autorampId - MoonPay autoramp id.\n * @returns PIX instructions, or null when the rail is not ready.\n */\nexport type NeoBankServiceGetPixDepositInstructionsAction = {\n type: `NeoBankService:getPixDepositInstructions`;\n handler: NeoBankService['getPixDepositInstructions'];\n};\n\n/**\n * Loads deposit details for an autoramp, whichever rail it has.\n *\n * Calls `GET /neobank/autoramps/{id}` and reads the PIX rail, or else a US\n * bank rail (`ACH`, `Wire`, `RTP`, or `FedNow`). Returns null until MoonPay\n * has attached a supported rail. MoonPay only verifies the rail at\n * `Approved`, so callers should not show these details before then.\n *\n * @param autorampId - MoonPay autoramp id.\n * @returns Deposit details discriminated by `type`, or null.\n */\nexport type NeoBankServiceGetDepositInstructionsAction = {\n type: `NeoBankService:getDepositInstructions`;\n handler: NeoBankService['getDepositInstructions'];\n};\n\n/**\n * Lists the newest page of transactions for one autoramp via\n * `GET /neobank/autoramp-transactions?autoramp_id=&sort_order=desc`.\n *\n * This is the first page only, not the full history. Poll `status`\n * (`Completed`, `Failed`, …). The deprecated `state` field is ignored.\n *\n * @param autorampId - MoonPay autoramp id.\n * @param options - Optional page size. Omitted requests use the API default.\n * @param options.pageSize - `page_size` query value. Callers that diff\n * status pass 50.\n * @returns Transaction summaries from the newest page.\n */\nexport type NeoBankServiceListAutorampTransactionsAction = {\n type: `NeoBankService:listAutorampTransactions`;\n handler: NeoBankService['listAutorampTransactions'];\n};\n\n/**\n * Registers a Pix address via neobank-proxy `POST /neobank/addresses/pix`.\n * Body is forwarded as opaque JSON (MoonPay address schema).\n *\n * @param body - Pix address registration payload.\n * @param options - Optional idempotency key.\n * @returns Parsed proxy JSON response.\n */\nexport type NeoBankServiceRegisterPixAddressAction = {\n type: `NeoBankService:registerPixAddress`;\n handler: NeoBankService['registerPixAddress'];\n};\n\n/**\n * Fetches an autoramp quote via neobank-proxy `GET /neobank/autoramps/quote`.\n *\n * @param query - Quote query params (forwarded as-is).\n * @returns Parsed proxy JSON response.\n */\nexport type NeoBankServiceGetAutorampQuoteAction = {\n type: `NeoBankService:getAutorampQuote`;\n handler: NeoBankService['getAutorampQuote'];\n};\n\n/**\n * Creates an autoramp from a signed quote via neobank-proxy\n * `POST /neobank/autoramps` (MoonPay `POST /api/autoramps`).\n *\n * @param body - CreateAutoramp / signed-quote payload (forwarded as-is).\n * @param options - Optional idempotency key.\n * @returns Remote snapshot for controller apply/refresh.\n */\nexport type NeoBankServiceCreateAutorampAction = {\n type: `NeoBankService:createAutoramp`;\n handler: NeoBankService['createAutoramp'];\n};\n\n/**\n * Fetches a quote for an existing autoramp via neobank-proxy\n * `GET /neobank/autoramps/{autoramp_id}/quote`.\n *\n * @param autorampId - Autoramp id.\n * @param query - Quote query params (forwarded as-is).\n * @returns Parsed proxy JSON response.\n */\nexport type NeoBankServiceGetAutorampQuoteForAutorampAction = {\n type: `NeoBankService:getAutorampQuoteForAutoramp`;\n handler: NeoBankService['getAutorampQuoteForAutoramp'];\n};\n\n/**\n * Attaches a signed quote to an autoramp via neobank-proxy\n * `POST /neobank/autoramps/{autoramp_id}/quotes`.\n *\n * @param autorampId - Autoramp id.\n * @param body - Quote attachment payload (forwarded as-is).\n * @param options - Optional idempotency key.\n * @returns Parsed proxy JSON response.\n */\nexport type NeoBankServiceAttachAutorampQuoteAction = {\n type: `NeoBankService:attachAutorampQuote`;\n handler: NeoBankService['attachAutorampQuote'];\n};\n\n/**\n * Fetches a customer by partner external id via neobank-proxy\n * `GET /neobank/customers/{external_id}/external`.\n *\n * @param externalId - Partner-assigned external customer id.\n * @returns Parsed proxy JSON response.\n */\nexport type NeoBankServiceGetCustomerByExternalIdAction = {\n type: `NeoBankService:getCustomerByExternalId`;\n handler: NeoBankService['getCustomerByExternalId'];\n};\n\n/**\n * Resolves Iron's internal customer id via neobank-proxy customer lookup,\n * using the MetaMask canonical profile id as the partner `external_id`.\n *\n * @returns Iron's internal customer id.\n */\nexport type NeoBankServiceGetMoonpayCustomerIdAction = {\n type: `NeoBankService:getMoonpayCustomerId`;\n handler: NeoBankService['getMoonpayCustomerId'];\n};\n\n/**\n * Lists the customer's bank-link microdeposits via neobank-proxy\n * `GET /neobank/customers/{customer_id}/microdeposits` (MoonPay\n * `GET /api/customers/{id}/microdeposits`).\n *\n * The customer id is resolved through {@link getMoonpayCustomerId} at most\n * once per service instance; concurrent callers share the in-flight lookup\n * and a failed lookup is retried by the next call. A 404 (from the customer\n * lookup or the list) means there is no customer or no deposits yet and\n * resolves `[]`. Any other non-2xx response throws an {@link HttpError}. The\n * customer lookup is a single attempt: it does not go through the retry\n * policy.\n *\n * @returns MoonPay microdeposits, unmodified.\n */\nexport type NeoBankServiceGetMicrodepositsAction = {\n type: `NeoBankService:getMicrodeposits`;\n handler: NeoBankService['getMicrodeposits'];\n};\n\n/**\n * Reads the customer's rail abilities via neobank-proxy\n * `GET /neobank/customers/{customer_id}/abilities` (MoonPay\n * `GET /api/customers/{id}/abilities`).\n *\n * MoonPay rejects an autoramp create with a 422 when the rail it needs is not\n * `Active`, even for an `Active` customer. The customer id is resolved the\n * same way as in {@link getMicrodeposits}. Any non-2xx response, including a\n * 404 when there is no customer yet, throws an {@link HttpError}.\n *\n * @returns MoonPay customer abilities, unmodified.\n */\nexport type NeoBankServiceGetCustomerAbilitiesAction = {\n type: `NeoBankService:getCustomerAbilities`;\n handler: NeoBankService['getCustomerAbilities'];\n};\n\n/**\n * Checks whether a Monad Money Account address is already registered for the\n * given Iron customer.\n *\n * @param params - Customer id and address to check.\n * @param params.customerId - Iron / MoonPay customer UUID.\n * @param params.address - Money Account address.\n * @returns Active, disabled, or absent registration status.\n */\nexport type NeoBankServiceGetWalletRegistrationStatusAction = {\n type: `NeoBankService:getWalletRegistrationStatus`;\n handler: NeoBankService['getWalletRegistrationStatus'];\n};\n\n/**\n * Submits a signed Monad Money Account ownership proof via neobank-proxy\n * `POST /neobank/addresses/crypto/selfhosted`.\n *\n * @param params - Signed ownership proof.\n * @returns Registered wallet record.\n */\nexport type NeoBankServiceRegisterSelfHostedWalletAction = {\n type: `NeoBankService:registerSelfHostedWallet`;\n handler: NeoBankService['registerSelfHostedWallet'];\n};\n\n/**\n * Union of all NeoBankService action types.\n */\nexport type NeoBankServiceMethodActions =\n | NeoBankServiceGetAutorampAction\n | NeoBankServiceGetAutorampsAction\n | NeoBankServiceGetPixDepositInstructionsAction\n | NeoBankServiceGetDepositInstructionsAction\n | NeoBankServiceListAutorampTransactionsAction\n | NeoBankServiceRegisterPixAddressAction\n | NeoBankServiceGetAutorampQuoteAction\n | NeoBankServiceCreateAutorampAction\n | NeoBankServiceGetAutorampQuoteForAutorampAction\n | NeoBankServiceAttachAutorampQuoteAction\n | NeoBankServiceGetCustomerByExternalIdAction\n | NeoBankServiceGetMoonpayCustomerIdAction\n | NeoBankServiceGetMicrodepositsAction\n | NeoBankServiceGetCustomerAbilitiesAction\n | NeoBankServiceGetWalletRegistrationStatusAction\n | NeoBankServiceRegisterSelfHostedWalletAction;\n"]}
@@ -3,7 +3,7 @@ import type { CreateServicePolicyOptions, DataServiceCacheUpdatedEvent, DataServ
3
3
  import type { Messenger } from '@metamask/messenger';
4
4
  import type { AuthenticationController } from '@metamask/profile-sync-controller';
5
5
  import type { Json } from '@metamask/utils';
6
- import type { AutorampDepositInstructions, AutorampRemoteSnapshot, AutorampTransactionSummary, PixDepositInstructions, SepaDepositInstructions, UsBankDepositInstructions } from './autoramp-types.js';
6
+ import type { AutorampDepositInstructions, AutorampRemoteSnapshot, AutorampTransactionSummary, PixDepositInstructions, UsBankDepositInstructions } from './autoramp-types.js';
7
7
  import type { NeoBankServiceMethodActions } from './NeoBankService-method-action-types.js';
8
8
  import { RampsEnvironment } from './RampsService.js';
9
9
  import type { RegistrationOutcome, RegistrationStatus } from './wallet-registration-service.js';
@@ -37,17 +37,6 @@ export type NeoBankAutorampResponse = {
37
37
  address?: string;
38
38
  };
39
39
  deposit_rails?: unknown[];
40
- /**
41
- * Reference senders must include on transfers when the autoramp uses
42
- * pay-by-reference. Absent or null otherwise.
43
- */
44
- inbound_payment_reference?: string | null;
45
- /**
46
- * Whether the autoramp accepts third-party payments. MoonPay derives it
47
- * from the create and can auto-enable it for some currencies depending on
48
- * the eligible rail, so the response is authoritative.
49
- */
50
- is_third_party?: boolean;
51
40
  };
52
41
  /**
53
42
  * A MoonPay microdeposit: a small test credit a bank sends when a user links
@@ -184,13 +173,6 @@ export declare function extractPixDepositInstructions(depositRails: unknown): Pi
184
173
  * @returns US bank details, or null when no complete US rail is present.
185
174
  */
186
175
  export declare function extractUsBankDepositInstructions(depositRails: unknown): UsBankDepositInstructions | null;
187
- /**
188
- * Pulls SEPA transfer details out of an autoramp `deposit_rails` array.
189
- *
190
- * @param depositRails - MoonPay `deposit_rails` value.
191
- * @returns SEPA details, or null when no usable SEPA rail is present.
192
- */
193
- export declare function extractSepaDepositInstructions(depositRails: unknown): SepaDepositInstructions | null;
194
176
  /**
195
177
  * Client for MetaMask Ramp API neo-bank endpoints (MoonPay Enterprise proxy).
196
178
  *
@@ -249,13 +231,9 @@ export declare class NeoBankService extends BaseDataService<typeof serviceName,
249
231
  * Loads deposit details for an autoramp, whichever rail it has.
250
232
  *
251
233
  * Calls `GET /neobank/autoramps/{id}` and reads the PIX rail, or else a US
252
- * bank rail (`ACH`, `Wire`, `RTP`, or `FedNow`), or else the SEPA rail.
253
- * SEPA details also carry the autoramp's `inbound_payment_reference` as
254
- * `paymentReference` when MoonPay uses pay-by-reference, and `is_third_party`
255
- * as `isThirdParty` when the response has one.
256
- * Returns null until MoonPay has attached a supported rail. MoonPay only
257
- * verifies the rail at `Approved`, so callers should not show these details
258
- * before then.
234
+ * bank rail (`ACH`, `Wire`, `RTP`, or `FedNow`). Returns null until MoonPay
235
+ * has attached a supported rail. MoonPay only verifies the rail at
236
+ * `Approved`, so callers should not show these details before then.
259
237
  *
260
238
  * @param autorampId - MoonPay autoramp id.
261
239
  * @returns Deposit details discriminated by `type`, or null.
@@ -1 +1 @@
1
- {"version":3,"file":"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,CAa9D;IAkCD;;;;;;;;OAQG;IACG,2BAA2B,CAAC,EAChC,UAAU,EACV,OAAO,GACR,EAAE,iCAAiC,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAMjE;IAED;;;;;;OAMG;IACG,wBAAwB,CAC5B,MAAM,EAAE,8BAA8B,GACrC,OAAO,CAAC,mBAAmB,CAAC,CAK9B;CAwBF"}
@@ -244,15 +244,6 @@ const DEPOSIT_RAIL_CURRENCIES = {
244
244
  RTP: 'USD',
245
245
  FedNow: 'USD',
246
246
  };
247
- /**
248
- * Reads a non-empty string.
249
- *
250
- * @param value - Candidate value.
251
- * @returns The value, or undefined when missing, not a string, or empty.
252
- */
253
- function readNonEmptyString(value) {
254
- return typeof value === 'string' && value.length > 0 ? value : undefined;
255
- }
256
247
  /**
257
248
  * Reads a non-empty string field from a deposit rail.
258
249
  *
@@ -261,7 +252,8 @@ function readNonEmptyString(value) {
261
252
  * @returns The value, or undefined when missing or empty.
262
253
  */
263
254
  function readRailString(record, key) {
264
- return readNonEmptyString(record[key]);
255
+ const value = record[key];
256
+ return typeof value === 'string' && value.length > 0 ? value : undefined;
265
257
  }
266
258
  /**
267
259
  * Lists the object entries of a MoonPay `deposit_rails` value.
@@ -290,10 +282,8 @@ function readDepositRailCurrency(depositRails) {
290
282
  if (extractUsBankDepositInstructions(depositRails)) {
291
283
  return DEPOSIT_RAIL_CURRENCIES.ACH;
292
284
  }
293
- if (extractSepaDepositInstructions(depositRails)) {
294
- return DEPOSIT_RAIL_CURRENCIES.SEPA;
295
- }
296
- return undefined;
285
+ const sepa = readDepositRails(depositRails).find((rail) => rail.type === 'SEPA' && readRailString(rail, 'iban'));
286
+ return sepa ? DEPOSIT_RAIL_CURRENCIES.SEPA : undefined;
297
287
  }
298
288
  /**
299
289
  * Pulls US bank transfer details out of an autoramp `deposit_rails` array.
@@ -336,42 +326,6 @@ export function extractUsBankDepositInstructions(depositRails) {
336
326
  }
337
327
  return null;
338
328
  }
339
- /**
340
- * Pulls SEPA transfer details out of an autoramp `deposit_rails` array.
341
- *
342
- * @param depositRails - MoonPay `deposit_rails` value.
343
- * @returns SEPA details, or null when no usable SEPA rail is present.
344
- */
345
- export function extractSepaDepositInstructions(depositRails) {
346
- for (const record of readDepositRails(depositRails)) {
347
- if (record.type !== 'SEPA') {
348
- continue;
349
- }
350
- const iban = readRailString(record, 'iban')?.replace(/\s+/gu, '');
351
- if (!iban) {
352
- continue;
353
- }
354
- const instructions = { iban };
355
- const bic = readRailString(record, 'bic');
356
- if (bic) {
357
- instructions.bic = bic;
358
- }
359
- const accountHolder = readRailString(record, 'beneficiary_name');
360
- if (accountHolder) {
361
- instructions.accountHolder = accountHolder;
362
- }
363
- const bankName = readRailString(record, 'name');
364
- if (bankName) {
365
- instructions.bankName = bankName;
366
- }
367
- const bankAddress = readRailString(record, 'address');
368
- if (bankAddress) {
369
- instructions.bankAddress = bankAddress;
370
- }
371
- return instructions;
372
- }
373
- return null;
374
- }
375
329
  /**
376
330
  * Reads a decimal amount from a MoonPay `Amount` object.
377
331
  *
@@ -605,13 +559,9 @@ export class NeoBankService extends BaseDataService {
605
559
  * Loads deposit details for an autoramp, whichever rail it has.
606
560
  *
607
561
  * Calls `GET /neobank/autoramps/{id}` and reads the PIX rail, or else a US
608
- * bank rail (`ACH`, `Wire`, `RTP`, or `FedNow`), or else the SEPA rail.
609
- * SEPA details also carry the autoramp's `inbound_payment_reference` as
610
- * `paymentReference` when MoonPay uses pay-by-reference, and `is_third_party`
611
- * as `isThirdParty` when the response has one.
612
- * Returns null until MoonPay has attached a supported rail. MoonPay only
613
- * verifies the rail at `Approved`, so callers should not show these details
614
- * before then.
562
+ * bank rail (`ACH`, `Wire`, `RTP`, or `FedNow`). Returns null until MoonPay
563
+ * has attached a supported rail. MoonPay only verifies the rail at
564
+ * `Approved`, so callers should not show these details before then.
615
565
  *
616
566
  * @param autorampId - MoonPay autoramp id.
617
567
  * @returns Deposit details discriminated by `type`, or null.
@@ -624,26 +574,13 @@ export class NeoBankService extends BaseDataService {
624
574
  responseStruct: PixAutorampResponseStruct,
625
575
  queryFn: async () => this.#getJson(`autoramps/${encodeURIComponent(autorampId)}`),
626
576
  });
627
- const { deposit_rails: depositRails, inbound_payment_reference: inboundPaymentReference, is_third_party: isThirdParty, } = response;
577
+ const { deposit_rails: depositRails } = response;
628
578
  const pix = extractPixDepositInstructions(depositRails);
629
579
  if (pix) {
630
580
  return { type: 'Pix', ...pix };
631
581
  }
632
582
  const usBank = extractUsBankDepositInstructions(depositRails);
633
- if (usBank) {
634
- return { type: 'UsBank', ...usBank };
635
- }
636
- const sepa = extractSepaDepositInstructions(depositRails);
637
- if (!sepa) {
638
- return null;
639
- }
640
- const paymentReference = readNonEmptyString(inboundPaymentReference);
641
- return {
642
- type: 'Sepa',
643
- ...sepa,
644
- ...(paymentReference ? { paymentReference } : {}),
645
- ...(typeof isThirdParty === 'boolean' ? { isThirdParty } : {}),
646
- };
583
+ return usBank ? { type: 'UsBank', ...usBank } : null;
647
584
  }
648
585
  /**
649
586
  * Lists the newest page of transactions for one autoramp via