@metamask/ramps-controller 20.1.0 → 20.2.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkEA,OAAO,EACL,eAAe,EACf,8BAA8B,EAC9B,oBAAoB,EACpB,yCAAyC,EAC1C,8BAA6B;AAuC9B,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,6BAA6B,EAC9B,2BAA0B;AAmB3B,OAAO,EACL,aAAa,EACb,yBAAyB,EACzB,8BAA8B,EAC9B,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EACjB,2BAA0B;AAC3B,OAAO,EAAE,iBAAiB,EAAE,8BAA6B;AAEzD,OAAO,EAAE,qBAAqB,EAAE,wBAAuB;AAEvD,OAAO,EACL,sCAAsC,EACtC,qCAAqC,EACrC,4BAA4B,EAC5B,6BAA6B,EAC9B,2BAA0B;AAC3B,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACvB,mCAAkC;AACnC,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EACjB,kCAAiC;AAClC,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACtB,0BAAyB;AAE1B,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,qBAAqB,EACtB,iCAAgC;AA2BjC,OAAO,EACL,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,yBAAyB,EAC1B,6BAA4B;AAC7B,OAAO,EACL,oBAAoB,EACpB,6BAA6B,EAC9B,mCAAkC","sourcesContent":["export type {\n RampsControllerActions,\n RampsControllerEvents,\n RampsControllerGetStateAction,\n RampsControllerMessenger,\n RampsControllerState,\n RampsControllerStateChangeEvent,\n RampsControllerOrderStatusChangedEvent,\n RampsControllerOptions,\n PaymentMethodsForContextResponse,\n UserRegion,\n ResourceState,\n TransakState,\n NativeProvidersState,\n} from './RampsController.js';\nexport type {\n RampsControllerExecuteRequestAction,\n RampsControllerAbortRequestAction,\n RampsControllerGetRequestStateAction,\n RampsControllerSetUserRegionAction,\n RampsControllerSetSelectedProviderAction,\n RampsControllerSetSelectedProviderForAssetAction,\n RampsControllerInitAction,\n RampsControllerGetCountriesAction,\n RampsControllerGetTokensAction,\n RampsControllerSetSelectedTokenAction,\n RampsControllerGetProvidersAction,\n RampsControllerGetPaymentMethodsAction,\n RampsControllerGetPaymentMethodsForContextAction,\n RampsControllerSetSelectedPaymentMethodAction,\n RampsControllerGetQuotesAction,\n RampsControllerAddOrderAction,\n RampsControllerRemoveOrderAction,\n RampsControllerStartOrderPollingAction,\n RampsControllerStopOrderPollingAction,\n RampsControllerGetBuyWidgetDataAction,\n RampsControllerAddPrecreatedOrderAction,\n RampsControllerGetOrderAction,\n RampsControllerGetOrderFromCallbackAction,\n RampsControllerTransakSetApiKeyAction,\n RampsControllerTransakSetAccessTokenAction,\n RampsControllerTransakClearAccessTokenAction,\n RampsControllerTransakSetAuthenticatedAction,\n RampsControllerTransakResetStateAction,\n RampsControllerTransakSendUserOtpAction,\n RampsControllerTransakVerifyUserOtpAction,\n RampsControllerTransakLogoutAction,\n RampsControllerTransakGetUserDetailsAction,\n RampsControllerTransakGetBuyQuoteAction,\n RampsControllerTransakGetKycRequirementAction,\n RampsControllerTransakGetAdditionalRequirementsAction,\n RampsControllerTransakCreateOrderAction,\n RampsControllerTransakGetOrderAction,\n RampsControllerTransakGetUserLimitsAction,\n RampsControllerTransakRequestOttAction,\n RampsControllerTransakGeneratePaymentWidgetUrlAction,\n RampsControllerTransakSubmitPurposeOfUsageFormAction,\n RampsControllerTransakPatchUserAction,\n RampsControllerTransakSubmitSsnDetailsAction,\n RampsControllerTransakConfirmPaymentAction,\n RampsControllerTransakGetTranslationAction,\n RampsControllerTransakGetIdProofStatusAction,\n RampsControllerTransakCancelOrderAction,\n RampsControllerTransakCancelAllActiveOrdersAction,\n RampsControllerTransakGetActiveOrdersAction,\n} from './RampsController-method-action-types.js';\nexport {\n RampsController,\n getDefaultRampsControllerState,\n getInternalOrderCode,\n RAMPS_CONTROLLER_REQUIRED_SERVICE_ACTIONS,\n} from './RampsController.js';\nexport type {\n RampsServiceActions,\n RampsServiceEvents,\n RampsServiceMessenger,\n Country,\n State,\n SupportedActions,\n CountryPhone,\n Provider,\n ProviderLink,\n ProviderLogos,\n ProviderBrowserType,\n ProviderLimit,\n ProviderFiatLimits,\n ProviderLimits,\n ProviderSortOrder,\n ProvidersResponse,\n RampAction,\n PaymentMethod,\n PaymentMethodsResponse,\n Quote,\n QuoteError,\n QuoteSortBy,\n QuoteSortOrder,\n QuoteCryptoTranslation,\n QuoteCustomAction,\n QuotesResponse,\n GetQuotesParams,\n RampsToken,\n TokensResponse,\n BuyWidget,\n RampsOrder,\n RampsOrderNetwork,\n RampsOrderCryptoCurrency,\n RampsOrderFiatCurrency,\n RampsOrderPaymentMethod,\n OrderPaymentDetail,\n} from './RampsService.js';\nexport {\n RampsService,\n RampsEnvironment,\n RampsApiService,\n RampsOrderStatus,\n RAMPS_SDK_VERSION,\n getDefaultRedirectCallbackUrl,\n} from './RampsService.js';\nexport type {\n RampsServiceGetDefaultRedirectCallbackUrlAction,\n RampsServiceGetGeolocationAction,\n RampsServiceGetCountriesAction,\n RampsServiceGetPaymentMethodsAction,\n RampsServiceGetQuotesAction,\n RampsServiceGetBuyWidgetUrlAction,\n RampsServiceGetOrderAction,\n RampsServiceGetOrderFromCallbackAction,\n} from './RampsService-method-action-types.js';\nexport type {\n RequestCache,\n RequestState,\n ExecuteRequestOptions,\n PendingRequest,\n ResourceType,\n} from './RequestCache.js';\nexport type { RampsErrorCode } from './rampsErrorCodes.js';\nexport {\n RequestStatus,\n DEFAULT_REQUEST_CACHE_TTL,\n DEFAULT_REQUEST_CACHE_MAX_SIZE,\n createCacheKey,\n isCacheExpired,\n createLoadingState,\n createSuccessState,\n createErrorState,\n} from './RequestCache.js';\nexport { RAMPS_ERROR_CODES } from './rampsErrorCodes.js';\nexport type { RequestSelectorResult } from './selectors.js';\nexport { createRequestSelector } from './selectors.js';\nexport type { HeadlessFeatureFlagsLookup } from './featureFlags.js';\nexport {\n HEADLESS_ALL_PROVIDERS_FEATURE_VERSION,\n MONEY_HEADLESS_ALL_PROVIDERS_FLAG_KEY,\n getHeadlessProviderAllowlist,\n isHeadlessAllProvidersEnabled,\n} from './featureFlags.js';\nexport {\n normalizeRampsAssetId,\n providerServesAsset,\n getProvidersServingAsset,\n regionHasProviderForAsset,\n isFiatDepositAvailable,\n} from './providerAvailability.js';\nexport {\n isExternalBrowserQuote,\n isCustomActionQuote,\n isInAppOnlyQuote,\n} from './quoteClassification.js';\nexport {\n TERMINAL_ORDER_STATUSES,\n isTerminalOrderStatus,\n} from './orderStatus.js';\nexport type { TypedError } from './errorNormalization.js';\nexport {\n getErrorMessage,\n extractExplicitTypedError,\n normalizeToTypedError,\n} from './errorNormalization.js';\nexport type {\n TransakServiceActions,\n TransakServiceEvents,\n TransakServiceMessenger,\n TransakAccessToken,\n TransakUserDetails,\n TransakUserDetailsAddress,\n TransakUserDetailsKycDetails,\n TransakBuyQuote,\n TransakKycRequirement,\n TransakAdditionalRequirement,\n TransakAdditionalRequirementsResponse,\n TransakOttResponse,\n TransakOrderPaymentMethod,\n TransakDepositOrder,\n TransakDepositNetwork,\n TransakDepositCryptoCurrency,\n TransakDepositPaymentMethod,\n TransakDepositRegion,\n TransakOrder,\n TransakQuoteTranslation,\n TransakTranslationRequest,\n TransakUserLimits,\n TransakIdProofStatus,\n PatchUserRequestBody as TransakPatchUserRequestBody,\n} from './TransakService.js';\nexport {\n TransakApiError,\n TransakService,\n TransakEnvironment,\n TransakOrderIdTransformer,\n} from './TransakService.js';\nexport {\n getTransakApiMessage,\n isTransakPhoneRegisteredError,\n} from './transakApiErrorUtils.js';\nexport type {\n TransakServiceMethodActions,\n TransakServiceSendUserOtpAction,\n TransakServiceVerifyUserOtpAction,\n TransakServiceGetUserDetailsAction,\n TransakServiceGetBuyQuoteAction,\n TransakServiceGetKycRequirementAction,\n TransakServiceCreateOrderAction,\n TransakServiceGetOrderAction,\n TransakServiceRequestOttAction,\n TransakServiceGeneratePaymentWidgetUrlAction,\n TransakServiceCreateWidgetUrlAction,\n} from './TransakService-method-action-types.js';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkEA,OAAO,EACL,eAAe,EACf,8BAA8B,EAC9B,oBAAoB,EACpB,yCAAyC,EAC1C,8BAA6B;AAuC9B,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,6BAA6B,EAC9B,2BAA0B;AAE3B,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,EAC3B,8BAA6B;AAmB9B,OAAO,EACL,aAAa,EACb,yBAAyB,EACzB,8BAA8B,EAC9B,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EACjB,2BAA0B;AAC3B,OAAO,EAAE,iBAAiB,EAAE,8BAA6B;AAEzD,OAAO,EAAE,qBAAqB,EAAE,wBAAuB;AAEvD,OAAO,EACL,sCAAsC,EACtC,qCAAqC,EACrC,4BAA4B,EAC5B,6BAA6B,EAC9B,2BAA0B;AAC3B,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACvB,mCAAkC;AACnC,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EACjB,kCAAiC;AAClC,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACtB,0BAAyB;AAE1B,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,qBAAqB,EACtB,iCAAgC;AA2BjC,OAAO,EACL,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,yBAAyB,EAC1B,6BAA4B;AAC7B,OAAO,EACL,oBAAoB,EACpB,6BAA6B,EAC9B,mCAAkC","sourcesContent":["export type {\n RampsControllerActions,\n RampsControllerEvents,\n RampsControllerGetStateAction,\n RampsControllerMessenger,\n RampsControllerState,\n RampsControllerStateChangeEvent,\n RampsControllerOrderStatusChangedEvent,\n RampsControllerOptions,\n PaymentMethodsForContextResponse,\n UserRegion,\n ResourceState,\n TransakState,\n NativeProvidersState,\n} from './RampsController.js';\nexport type {\n RampsControllerExecuteRequestAction,\n RampsControllerAbortRequestAction,\n RampsControllerGetRequestStateAction,\n RampsControllerSetUserRegionAction,\n RampsControllerSetSelectedProviderAction,\n RampsControllerSetSelectedProviderForAssetAction,\n RampsControllerInitAction,\n RampsControllerGetCountriesAction,\n RampsControllerGetTokensAction,\n RampsControllerSetSelectedTokenAction,\n RampsControllerGetProvidersAction,\n RampsControllerGetPaymentMethodsAction,\n RampsControllerGetPaymentMethodsForContextAction,\n RampsControllerSetSelectedPaymentMethodAction,\n RampsControllerGetQuotesAction,\n RampsControllerAddOrderAction,\n RampsControllerRemoveOrderAction,\n RampsControllerStartOrderPollingAction,\n RampsControllerStopOrderPollingAction,\n RampsControllerGetBuyWidgetDataAction,\n RampsControllerAddPrecreatedOrderAction,\n RampsControllerGetOrderAction,\n RampsControllerGetOrderFromCallbackAction,\n RampsControllerTransakSetApiKeyAction,\n RampsControllerTransakSetAccessTokenAction,\n RampsControllerTransakClearAccessTokenAction,\n RampsControllerTransakSetAuthenticatedAction,\n RampsControllerTransakResetStateAction,\n RampsControllerTransakSendUserOtpAction,\n RampsControllerTransakVerifyUserOtpAction,\n RampsControllerTransakLogoutAction,\n RampsControllerTransakGetUserDetailsAction,\n RampsControllerTransakGetBuyQuoteAction,\n RampsControllerTransakGetKycRequirementAction,\n RampsControllerTransakGetAdditionalRequirementsAction,\n RampsControllerTransakCreateOrderAction,\n RampsControllerTransakGetOrderAction,\n RampsControllerTransakGetUserLimitsAction,\n RampsControllerTransakRequestOttAction,\n RampsControllerTransakGeneratePaymentWidgetUrlAction,\n RampsControllerTransakSubmitPurposeOfUsageFormAction,\n RampsControllerTransakPatchUserAction,\n RampsControllerTransakSubmitSsnDetailsAction,\n RampsControllerTransakConfirmPaymentAction,\n RampsControllerTransakGetTranslationAction,\n RampsControllerTransakGetIdProofStatusAction,\n RampsControllerTransakCancelOrderAction,\n RampsControllerTransakCancelAllActiveOrdersAction,\n RampsControllerTransakGetActiveOrdersAction,\n} from './RampsController-method-action-types.js';\nexport {\n RampsController,\n getDefaultRampsControllerState,\n getInternalOrderCode,\n RAMPS_CONTROLLER_REQUIRED_SERVICE_ACTIONS,\n} from './RampsController.js';\nexport type {\n RampsServiceActions,\n RampsServiceEvents,\n RampsServiceMessenger,\n Country,\n State,\n SupportedActions,\n CountryPhone,\n Provider,\n ProviderLink,\n ProviderLogos,\n ProviderBrowserType,\n ProviderLimit,\n ProviderFiatLimits,\n ProviderLimits,\n ProviderSortOrder,\n ProvidersResponse,\n RampAction,\n PaymentMethod,\n PaymentMethodsResponse,\n Quote,\n QuoteError,\n QuoteSortBy,\n QuoteSortOrder,\n QuoteCryptoTranslation,\n QuoteCustomAction,\n QuotesResponse,\n GetQuotesParams,\n RampsToken,\n TokensResponse,\n BuyWidget,\n RampsOrder,\n RampsOrderNetwork,\n RampsOrderCryptoCurrency,\n RampsOrderFiatCurrency,\n RampsOrderPaymentMethod,\n OrderPaymentDetail,\n} from './RampsService.js';\nexport {\n RampsService,\n RampsEnvironment,\n RampsApiService,\n RampsOrderStatus,\n RAMPS_SDK_VERSION,\n getDefaultRedirectCallbackUrl,\n} from './RampsService.js';\nexport type { RampsClientIdentity } from './client-identity.js';\nexport {\n addRampsClientIdentityParams,\n RAMPS_CLIENT_PRODUCT_PARAM,\n RAMPS_CLIENT_VERSION_PARAM,\n} from './client-identity.js';\nexport type {\n RampsServiceGetDefaultRedirectCallbackUrlAction,\n RampsServiceGetGeolocationAction,\n RampsServiceGetCountriesAction,\n RampsServiceGetPaymentMethodsAction,\n RampsServiceGetQuotesAction,\n RampsServiceGetBuyWidgetUrlAction,\n RampsServiceGetOrderAction,\n RampsServiceGetOrderFromCallbackAction,\n} from './RampsService-method-action-types.js';\nexport type {\n RequestCache,\n RequestState,\n ExecuteRequestOptions,\n PendingRequest,\n ResourceType,\n} from './RequestCache.js';\nexport type { RampsErrorCode } from './rampsErrorCodes.js';\nexport {\n RequestStatus,\n DEFAULT_REQUEST_CACHE_TTL,\n DEFAULT_REQUEST_CACHE_MAX_SIZE,\n createCacheKey,\n isCacheExpired,\n createLoadingState,\n createSuccessState,\n createErrorState,\n} from './RequestCache.js';\nexport { RAMPS_ERROR_CODES } from './rampsErrorCodes.js';\nexport type { RequestSelectorResult } from './selectors.js';\nexport { createRequestSelector } from './selectors.js';\nexport type { HeadlessFeatureFlagsLookup } from './featureFlags.js';\nexport {\n HEADLESS_ALL_PROVIDERS_FEATURE_VERSION,\n MONEY_HEADLESS_ALL_PROVIDERS_FLAG_KEY,\n getHeadlessProviderAllowlist,\n isHeadlessAllProvidersEnabled,\n} from './featureFlags.js';\nexport {\n normalizeRampsAssetId,\n providerServesAsset,\n getProvidersServingAsset,\n regionHasProviderForAsset,\n isFiatDepositAvailable,\n} from './providerAvailability.js';\nexport {\n isExternalBrowserQuote,\n isCustomActionQuote,\n isInAppOnlyQuote,\n} from './quoteClassification.js';\nexport {\n TERMINAL_ORDER_STATUSES,\n isTerminalOrderStatus,\n} from './orderStatus.js';\nexport type { TypedError } from './errorNormalization.js';\nexport {\n getErrorMessage,\n extractExplicitTypedError,\n normalizeToTypedError,\n} from './errorNormalization.js';\nexport type {\n TransakServiceActions,\n TransakServiceEvents,\n TransakServiceMessenger,\n TransakAccessToken,\n TransakUserDetails,\n TransakUserDetailsAddress,\n TransakUserDetailsKycDetails,\n TransakBuyQuote,\n TransakKycRequirement,\n TransakAdditionalRequirement,\n TransakAdditionalRequirementsResponse,\n TransakOttResponse,\n TransakOrderPaymentMethod,\n TransakDepositOrder,\n TransakDepositNetwork,\n TransakDepositCryptoCurrency,\n TransakDepositPaymentMethod,\n TransakDepositRegion,\n TransakOrder,\n TransakQuoteTranslation,\n TransakTranslationRequest,\n TransakUserLimits,\n TransakIdProofStatus,\n PatchUserRequestBody as TransakPatchUserRequestBody,\n} from './TransakService.js';\nexport {\n TransakApiError,\n TransakService,\n TransakEnvironment,\n TransakOrderIdTransformer,\n} from './TransakService.js';\nexport {\n getTransakApiMessage,\n isTransakPhoneRegisteredError,\n} from './transakApiErrorUtils.js';\nexport type {\n TransakServiceMethodActions,\n TransakServiceSendUserOtpAction,\n TransakServiceVerifyUserOtpAction,\n TransakServiceGetUserDetailsAction,\n TransakServiceGetBuyQuoteAction,\n TransakServiceGetKycRequirementAction,\n TransakServiceCreateOrderAction,\n TransakServiceGetOrderAction,\n TransakServiceRequestOttAction,\n TransakServiceGeneratePaymentWidgetUrlAction,\n TransakServiceCreateWidgetUrlAction,\n} from './TransakService-method-action-types.js';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/ramps-controller",
3
- "version": "20.1.0",
3
+ "version": "20.2.0",
4
4
  "description": "A controller for managing cryptocurrency on/off ramps functionality",
5
5
  "keywords": [
6
6
  "Ethereum",