@metamask/ramps-controller 20.1.0 → 20.3.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.
- package/CHANGELOG.md +21 -1
- package/dist/NeoBankService-method-action-types.cjs +7 -0
- package/dist/NeoBankService-method-action-types.cjs.map +1 -0
- package/dist/NeoBankService-method-action-types.d.cts +126 -0
- package/dist/NeoBankService-method-action-types.d.cts.map +1 -0
- package/dist/NeoBankService-method-action-types.d.mts +126 -0
- package/dist/NeoBankService-method-action-types.d.mts.map +1 -0
- package/dist/NeoBankService-method-action-types.mjs +6 -0
- package/dist/NeoBankService-method-action-types.mjs.map +1 -0
- package/dist/NeoBankService.cjs +387 -0
- package/dist/NeoBankService.cjs.map +1 -0
- package/dist/NeoBankService.d.cts +191 -0
- package/dist/NeoBankService.d.cts.map +1 -0
- package/dist/NeoBankService.d.mts +191 -0
- package/dist/NeoBankService.d.mts.map +1 -0
- package/dist/NeoBankService.mjs +379 -0
- package/dist/NeoBankService.mjs.map +1 -0
- package/dist/RampsController-method-action-types.cjs.map +1 -1
- package/dist/RampsController-method-action-types.d.cts +91 -1
- package/dist/RampsController-method-action-types.d.cts.map +1 -1
- package/dist/RampsController-method-action-types.d.mts +91 -1
- package/dist/RampsController-method-action-types.d.mts.map +1 -1
- package/dist/RampsController-method-action-types.mjs.map +1 -1
- package/dist/RampsController.cjs +372 -2
- package/dist/RampsController.cjs.map +1 -1
- package/dist/RampsController.d.cts +152 -5
- package/dist/RampsController.d.cts.map +1 -1
- package/dist/RampsController.d.mts +152 -5
- package/dist/RampsController.d.mts.map +1 -1
- package/dist/RampsController.mjs +371 -1
- package/dist/RampsController.mjs.map +1 -1
- package/dist/RampsService.cjs +14 -3
- package/dist/RampsService.cjs.map +1 -1
- package/dist/RampsService.d.cts +5 -1
- package/dist/RampsService.d.cts.map +1 -1
- package/dist/RampsService.d.mts +5 -1
- package/dist/RampsService.d.mts.map +1 -1
- package/dist/RampsService.mjs +14 -3
- package/dist/RampsService.mjs.map +1 -1
- package/dist/TransakService.cjs +15 -3
- package/dist/TransakService.cjs.map +1 -1
- package/dist/TransakService.d.cts +3 -1
- package/dist/TransakService.d.cts.map +1 -1
- package/dist/TransakService.d.mts +3 -1
- package/dist/TransakService.d.mts.map +1 -1
- package/dist/TransakService.mjs +15 -3
- package/dist/TransakService.mjs.map +1 -1
- package/dist/autoramp-types.cjs +3 -0
- package/dist/autoramp-types.cjs.map +1 -0
- package/dist/autoramp-types.d.cts +22 -0
- package/dist/autoramp-types.d.cts.map +1 -0
- package/dist/autoramp-types.d.mts +22 -0
- package/dist/autoramp-types.d.mts.map +1 -0
- package/dist/autoramp-types.mjs +2 -0
- package/dist/autoramp-types.mjs.map +1 -0
- package/dist/autorampAccount.cjs +155 -0
- package/dist/autorampAccount.cjs.map +1 -0
- package/dist/autorampAccount.d.cts +126 -0
- package/dist/autorampAccount.d.cts.map +1 -0
- package/dist/autorampAccount.d.mts +126 -0
- package/dist/autorampAccount.d.mts.map +1 -0
- package/dist/autorampAccount.mjs +147 -0
- package/dist/autorampAccount.mjs.map +1 -0
- package/dist/client-identity.cjs +28 -0
- package/dist/client-identity.cjs.map +1 -0
- package/dist/client-identity.d.cts +24 -0
- package/dist/client-identity.d.cts.map +1 -0
- package/dist/client-identity.d.mts +24 -0
- package/dist/client-identity.d.mts.map +1 -0
- package/dist/client-identity.mjs +24 -0
- package/dist/client-identity.mjs.map +1 -0
- package/dist/index.cjs +24 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +14 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +6 -1
- package/dist/index.mjs.map +1 -1
- package/dist/ownership-message.cjs +26 -0
- package/dist/ownership-message.cjs.map +1 -0
- package/dist/ownership-message.d.cts +22 -0
- package/dist/ownership-message.d.cts.map +1 -0
- package/dist/ownership-message.d.mts +22 -0
- package/dist/ownership-message.d.mts.map +1 -0
- package/dist/ownership-message.mjs +22 -0
- package/dist/ownership-message.mjs.map +1 -0
- package/dist/wallet-registration-machine.cjs +144 -0
- package/dist/wallet-registration-machine.cjs.map +1 -0
- package/dist/wallet-registration-machine.d.cts +81 -0
- package/dist/wallet-registration-machine.d.cts.map +1 -0
- package/dist/wallet-registration-machine.d.mts +81 -0
- package/dist/wallet-registration-machine.d.mts.map +1 -0
- package/dist/wallet-registration-machine.mjs +139 -0
- package/dist/wallet-registration-machine.mjs.map +1 -0
- package/dist/wallet-registration-service.cjs +351 -0
- package/dist/wallet-registration-service.cjs.map +1 -0
- package/dist/wallet-registration-service.d.cts +144 -0
- package/dist/wallet-registration-service.d.cts.map +1 -0
- package/dist/wallet-registration-service.d.mts +144 -0
- package/dist/wallet-registration-service.d.mts.map +1 -0
- package/dist/wallet-registration-service.mjs +344 -0
- package/dist/wallet-registration-service.mjs.map +1 -0
- package/package.json +3 -3
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAkEA,4DAK8B;AAJ5B,qHAAA,eAAe,OAAA;AACf,oIAAA,8BAA8B,OAAA;AAC9B,0HAAA,oBAAoB,OAAA;AACpB,+IAAA,yCAAyC,OAAA;AAwC3C,sDAO2B;AANzB,+GAAA,YAAY,OAAA;AACZ,mHAAA,gBAAgB,OAAA;AAChB,kHAAA,eAAe,OAAA;AACf,mHAAA,gBAAgB,OAAA;AAChB,oHAAA,iBAAiB,OAAA;AACjB,gIAAA,6BAA6B,OAAA;AAoB/B,sDAS2B;AARzB,gHAAA,aAAa,OAAA;AACb,4HAAA,yBAAyB,OAAA;AACzB,iIAAA,8BAA8B,OAAA;AAC9B,iHAAA,cAAc,OAAA;AACd,iHAAA,cAAc,OAAA;AACd,qHAAA,kBAAkB,OAAA;AAClB,qHAAA,kBAAkB,OAAA;AAClB,mHAAA,gBAAgB,OAAA;AAElB,4DAAyD;AAAhD,uHAAA,iBAAiB,OAAA;AAE1B,gDAAuD;AAA9C,qHAAA,qBAAqB,OAAA;AAE9B,sDAK2B;AAJzB,yIAAA,sCAAsC,OAAA;AACtC,wIAAA,qCAAqC,OAAA;AACrC,+HAAA,4BAA4B,OAAA;AAC5B,gIAAA,6BAA6B,OAAA;AAE/B,sEAMmC;AALjC,gIAAA,qBAAqB,OAAA;AACrB,8HAAA,mBAAmB,OAAA;AACnB,mIAAA,wBAAwB,OAAA;AACxB,oIAAA,yBAAyB,OAAA;AACzB,iIAAA,sBAAsB,OAAA;AAExB,oEAIkC;AAHhC,gIAAA,sBAAsB,OAAA;AACtB,6HAAA,mBAAmB,OAAA;AACnB,0HAAA,gBAAgB,OAAA;AAElB,oDAG0B;AAFxB,yHAAA,uBAAuB,OAAA;AACvB,uHAAA,qBAAqB,OAAA;AAGvB,kEAIiC;AAH/B,wHAAA,eAAe,OAAA;AACf,kIAAA,yBAAyB,OAAA;AACzB,8HAAA,qBAAqB,OAAA;AA4BvB,0DAK6B;AAJ3B,oHAAA,eAAe,OAAA;AACf,mHAAA,cAAc,OAAA;AACd,uHAAA,kBAAkB,OAAA;AAClB,8HAAA,yBAAyB,OAAA;AAE3B,sEAGmC;AAFjC,+HAAA,oBAAoB,OAAA;AACpB,wIAAA,6BAA6B,OAAA","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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uB,OAAA;AACvB,uHAAA,qBAAqB,OAAA;AAGvB,kEAIiC;AAH/B,wHAAA,eAAe,OAAA;AACf,kIAAA,yBAAyB,OAAA;AACzB,8HAAA,qBAAqB,OAAA;AA4BvB,0DAK6B;AAJ3B,oHAAA,eAAe,OAAA;AACf,mHAAA,cAAc,OAAA;AACd,uHAAA,kBAAkB,OAAA;AAClB,8HAAA,yBAAyB,OAAA;AAE3B,sEAGmC;AAFjC,+HAAA,oBAAoB,OAAA;AACpB,wIAAA,6BAA6B,OAAA;AAoB/B,4DAS8B;AAR5B,oHAAA,cAAc,OAAA;AACd,gIAAA,0BAA0B,OAAA;AAC1B,+HAAA,yBAAyB,OAAA;AACzB,8HAAA,wBAAwB,OAAA;AACxB,6HAAA,uBAAuB,OAAA;AACvB,2HAAA,qBAAqB,OAAA;AACrB,+HAAA,yBAAyB,OAAA;AACzB,0HAAA,oBAAoB,OAAA;AAEtB,gEAA+D;AAAtD,6HAAA,qBAAqB,OAAA;AA2B9B,0DAI6B;AAH3B,mHAAA,cAAc,OAAA;AACd,uHAAA,WAAW,OAAsB;AACjC,uIAAA,kCAAkC,OAAA;AASpC,oFAA2E;AAAlE,yIAAA,uBAAuB,OAAA","sourcesContent":["export type {\n RampsControllerActions,\n RampsControllerEvents,\n RampsControllerGetStateAction,\n RampsControllerMessenger,\n RampsControllerState,\n RampsControllerStateChangeEvent,\n RampsControllerOrderStatusChangedEvent,\n RampsControllerAutorampStatusChangedEvent,\n RampsControllerOptions,\n PaymentMethodsForContextResponse,\n UserRegion,\n ResourceState,\n TransakState,\n NativeProvidersState,\n MoneyAccountWalletRegistrationResult,\n KeyringControllerSignPersonalMessageAction,\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 RampsControllerAddAutorampAction,\n RampsControllerCreateAutorampAction,\n RampsControllerRemoveAutorampAction,\n RampsControllerRegisterMoneyAccountWalletAction,\n RampsControllerMarkAutorampAsNotifiedAction,\n RampsControllerApplyAutorampStatusFromPushAction,\n RampsControllerRefreshAutorampAction,\n RampsControllerRefreshAutorampsAction,\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 RAMPS_CONTROLLER_REQUIRED_CONTROLLER_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';\nexport type {\n AutorampAccount,\n ApplyAutorampRemoteStatusResult,\n CreateAutorampRequest,\n} from './autorampAccount.js';\nexport {\n AutorampStatus,\n TERMINAL_AUTORAMP_STATUSES,\n NOTABLE_AUTORAMP_STATUSES,\n isTerminalAutorampStatus,\n normalizeAutorampStatus,\n createAutorampAccount,\n applyAutorampRemoteStatus,\n markAutorampNotified,\n} from './autorampAccount.js';\nexport { buildOwnershipMessage } from './ownership-message.js';\nexport type {\n AutorampDepositRailsSummary,\n AutorampRemoteSnapshot,\n} from './autoramp-types.js';\nexport type {\n NeoBankServiceActions,\n NeoBankServiceEvents,\n NeoBankServiceMessenger,\n NeoBankAutorampResponse,\n NeoBankRequestOptions,\n NeoBankQueryParams,\n GetWalletRegistrationStatusParams,\n RegisterSelfHostedWalletParams,\n} from './NeoBankService.js';\nexport type {\n NeoBankServiceGetAutorampAction,\n NeoBankServiceRegisterPixAddressAction,\n NeoBankServiceGetAutorampQuoteAction,\n NeoBankServiceCreateAutorampAction,\n NeoBankServiceGetAutorampQuoteForAutorampAction,\n NeoBankServiceAttachAutorampQuoteAction,\n NeoBankServiceGetCustomerByExternalIdAction,\n NeoBankServiceGetMoonpayCustomerIdAction,\n NeoBankServiceGetWalletRegistrationStatusAction,\n NeoBankServiceRegisterSelfHostedWalletAction,\n} from './NeoBankService-method-action-types.js';\nexport {\n NeoBankService,\n serviceName as neoBankServiceName,\n mapNeoBankAutorampToRemoteSnapshot,\n} from './NeoBankService.js';\nexport type {\n Blockchain,\n RegistrationOutcome,\n RegistrationStatus,\n SelfHostedRegistration,\n WalletRegistrationErrorKind,\n} from './wallet-registration-service.js';\nexport { WalletRegistrationError } from './wallet-registration-service.js';\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export type { RampsControllerActions, RampsControllerEvents, RampsControllerGetStateAction, RampsControllerMessenger, RampsControllerState, RampsControllerStateChangeEvent, RampsControllerOrderStatusChangedEvent, RampsControllerOptions, PaymentMethodsForContextResponse, UserRegion, ResourceState, TransakState, NativeProvidersState, } from "./RampsController.cjs";
|
|
2
|
-
export type { RampsControllerExecuteRequestAction, RampsControllerAbortRequestAction, RampsControllerGetRequestStateAction, RampsControllerSetUserRegionAction, RampsControllerSetSelectedProviderAction, RampsControllerSetSelectedProviderForAssetAction, RampsControllerInitAction, RampsControllerGetCountriesAction, RampsControllerGetTokensAction, RampsControllerSetSelectedTokenAction, RampsControllerGetProvidersAction, RampsControllerGetPaymentMethodsAction, RampsControllerGetPaymentMethodsForContextAction, RampsControllerSetSelectedPaymentMethodAction, RampsControllerGetQuotesAction, RampsControllerAddOrderAction, RampsControllerRemoveOrderAction, RampsControllerStartOrderPollingAction, RampsControllerStopOrderPollingAction, RampsControllerGetBuyWidgetDataAction, RampsControllerAddPrecreatedOrderAction, RampsControllerGetOrderAction, RampsControllerGetOrderFromCallbackAction, RampsControllerTransakSetApiKeyAction, RampsControllerTransakSetAccessTokenAction, RampsControllerTransakClearAccessTokenAction, RampsControllerTransakSetAuthenticatedAction, RampsControllerTransakResetStateAction, RampsControllerTransakSendUserOtpAction, RampsControllerTransakVerifyUserOtpAction, RampsControllerTransakLogoutAction, RampsControllerTransakGetUserDetailsAction, RampsControllerTransakGetBuyQuoteAction, RampsControllerTransakGetKycRequirementAction, RampsControllerTransakGetAdditionalRequirementsAction, RampsControllerTransakCreateOrderAction, RampsControllerTransakGetOrderAction, RampsControllerTransakGetUserLimitsAction, RampsControllerTransakRequestOttAction, RampsControllerTransakGeneratePaymentWidgetUrlAction, RampsControllerTransakSubmitPurposeOfUsageFormAction, RampsControllerTransakPatchUserAction, RampsControllerTransakSubmitSsnDetailsAction, RampsControllerTransakConfirmPaymentAction, RampsControllerTransakGetTranslationAction, RampsControllerTransakGetIdProofStatusAction, RampsControllerTransakCancelOrderAction, RampsControllerTransakCancelAllActiveOrdersAction, RampsControllerTransakGetActiveOrdersAction, } from "./RampsController-method-action-types.cjs";
|
|
3
|
-
export { RampsController, getDefaultRampsControllerState, getInternalOrderCode, RAMPS_CONTROLLER_REQUIRED_SERVICE_ACTIONS, } from "./RampsController.cjs";
|
|
1
|
+
export type { RampsControllerActions, RampsControllerEvents, RampsControllerGetStateAction, RampsControllerMessenger, RampsControllerState, RampsControllerStateChangeEvent, RampsControllerOrderStatusChangedEvent, RampsControllerAutorampStatusChangedEvent, RampsControllerOptions, PaymentMethodsForContextResponse, UserRegion, ResourceState, TransakState, NativeProvidersState, MoneyAccountWalletRegistrationResult, KeyringControllerSignPersonalMessageAction, } from "./RampsController.cjs";
|
|
2
|
+
export type { RampsControllerExecuteRequestAction, RampsControllerAbortRequestAction, RampsControllerGetRequestStateAction, RampsControllerSetUserRegionAction, RampsControllerSetSelectedProviderAction, RampsControllerSetSelectedProviderForAssetAction, RampsControllerInitAction, RampsControllerGetCountriesAction, RampsControllerGetTokensAction, RampsControllerSetSelectedTokenAction, RampsControllerGetProvidersAction, RampsControllerGetPaymentMethodsAction, RampsControllerGetPaymentMethodsForContextAction, RampsControllerSetSelectedPaymentMethodAction, RampsControllerGetQuotesAction, RampsControllerAddOrderAction, RampsControllerRemoveOrderAction, RampsControllerAddAutorampAction, RampsControllerCreateAutorampAction, RampsControllerRemoveAutorampAction, RampsControllerRegisterMoneyAccountWalletAction, RampsControllerMarkAutorampAsNotifiedAction, RampsControllerApplyAutorampStatusFromPushAction, RampsControllerRefreshAutorampAction, RampsControllerRefreshAutorampsAction, RampsControllerStartOrderPollingAction, RampsControllerStopOrderPollingAction, RampsControllerGetBuyWidgetDataAction, RampsControllerAddPrecreatedOrderAction, RampsControllerGetOrderAction, RampsControllerGetOrderFromCallbackAction, RampsControllerTransakSetApiKeyAction, RampsControllerTransakSetAccessTokenAction, RampsControllerTransakClearAccessTokenAction, RampsControllerTransakSetAuthenticatedAction, RampsControllerTransakResetStateAction, RampsControllerTransakSendUserOtpAction, RampsControllerTransakVerifyUserOtpAction, RampsControllerTransakLogoutAction, RampsControllerTransakGetUserDetailsAction, RampsControllerTransakGetBuyQuoteAction, RampsControllerTransakGetKycRequirementAction, RampsControllerTransakGetAdditionalRequirementsAction, RampsControllerTransakCreateOrderAction, RampsControllerTransakGetOrderAction, RampsControllerTransakGetUserLimitsAction, RampsControllerTransakRequestOttAction, RampsControllerTransakGeneratePaymentWidgetUrlAction, RampsControllerTransakSubmitPurposeOfUsageFormAction, RampsControllerTransakPatchUserAction, RampsControllerTransakSubmitSsnDetailsAction, RampsControllerTransakConfirmPaymentAction, RampsControllerTransakGetTranslationAction, RampsControllerTransakGetIdProofStatusAction, RampsControllerTransakCancelOrderAction, RampsControllerTransakCancelAllActiveOrdersAction, RampsControllerTransakGetActiveOrdersAction, } from "./RampsController-method-action-types.cjs";
|
|
3
|
+
export { RampsController, getDefaultRampsControllerState, getInternalOrderCode, RAMPS_CONTROLLER_REQUIRED_SERVICE_ACTIONS, RAMPS_CONTROLLER_REQUIRED_CONTROLLER_ACTIONS, } from "./RampsController.cjs";
|
|
4
4
|
export type { RampsServiceActions, RampsServiceEvents, RampsServiceMessenger, Country, State, SupportedActions, CountryPhone, Provider, ProviderLink, ProviderLogos, ProviderBrowserType, ProviderLimit, ProviderFiatLimits, ProviderLimits, ProviderSortOrder, ProvidersResponse, RampAction, PaymentMethod, PaymentMethodsResponse, Quote, QuoteError, QuoteSortBy, QuoteSortOrder, QuoteCryptoTranslation, QuoteCustomAction, QuotesResponse, GetQuotesParams, RampsToken, TokensResponse, BuyWidget, RampsOrder, RampsOrderNetwork, RampsOrderCryptoCurrency, RampsOrderFiatCurrency, RampsOrderPaymentMethod, OrderPaymentDetail, } from "./RampsService.cjs";
|
|
5
5
|
export { RampsService, RampsEnvironment, RampsApiService, RampsOrderStatus, RAMPS_SDK_VERSION, getDefaultRedirectCallbackUrl, } from "./RampsService.cjs";
|
|
6
|
+
export type { RampsClientIdentity } from "./client-identity.cjs";
|
|
7
|
+
export { addRampsClientIdentityParams, RAMPS_CLIENT_PRODUCT_PARAM, RAMPS_CLIENT_VERSION_PARAM, } from "./client-identity.cjs";
|
|
6
8
|
export type { RampsServiceGetDefaultRedirectCallbackUrlAction, RampsServiceGetGeolocationAction, RampsServiceGetCountriesAction, RampsServiceGetPaymentMethodsAction, RampsServiceGetQuotesAction, RampsServiceGetBuyWidgetUrlAction, RampsServiceGetOrderAction, RampsServiceGetOrderFromCallbackAction, } from "./RampsService-method-action-types.cjs";
|
|
7
9
|
export type { RequestCache, RequestState, ExecuteRequestOptions, PendingRequest, ResourceType, } from "./RequestCache.cjs";
|
|
8
10
|
export type { RampsErrorCode } from "./rampsErrorCodes.cjs";
|
|
@@ -21,4 +23,13 @@ export type { TransakServiceActions, TransakServiceEvents, TransakServiceMesseng
|
|
|
21
23
|
export { TransakApiError, TransakService, TransakEnvironment, TransakOrderIdTransformer, } from "./TransakService.cjs";
|
|
22
24
|
export { getTransakApiMessage, isTransakPhoneRegisteredError, } from "./transakApiErrorUtils.cjs";
|
|
23
25
|
export type { TransakServiceMethodActions, TransakServiceSendUserOtpAction, TransakServiceVerifyUserOtpAction, TransakServiceGetUserDetailsAction, TransakServiceGetBuyQuoteAction, TransakServiceGetKycRequirementAction, TransakServiceCreateOrderAction, TransakServiceGetOrderAction, TransakServiceRequestOttAction, TransakServiceGeneratePaymentWidgetUrlAction, TransakServiceCreateWidgetUrlAction, } from "./TransakService-method-action-types.cjs";
|
|
26
|
+
export type { AutorampAccount, ApplyAutorampRemoteStatusResult, CreateAutorampRequest, } from "./autorampAccount.cjs";
|
|
27
|
+
export { AutorampStatus, TERMINAL_AUTORAMP_STATUSES, NOTABLE_AUTORAMP_STATUSES, isTerminalAutorampStatus, normalizeAutorampStatus, createAutorampAccount, applyAutorampRemoteStatus, markAutorampNotified, } from "./autorampAccount.cjs";
|
|
28
|
+
export { buildOwnershipMessage } from "./ownership-message.cjs";
|
|
29
|
+
export type { AutorampDepositRailsSummary, AutorampRemoteSnapshot, } from "./autoramp-types.cjs";
|
|
30
|
+
export type { NeoBankServiceActions, NeoBankServiceEvents, NeoBankServiceMessenger, NeoBankAutorampResponse, NeoBankRequestOptions, NeoBankQueryParams, GetWalletRegistrationStatusParams, RegisterSelfHostedWalletParams, } from "./NeoBankService.cjs";
|
|
31
|
+
export type { NeoBankServiceGetAutorampAction, NeoBankServiceRegisterPixAddressAction, NeoBankServiceGetAutorampQuoteAction, NeoBankServiceCreateAutorampAction, NeoBankServiceGetAutorampQuoteForAutorampAction, NeoBankServiceAttachAutorampQuoteAction, NeoBankServiceGetCustomerByExternalIdAction, NeoBankServiceGetMoonpayCustomerIdAction, NeoBankServiceGetWalletRegistrationStatusAction, NeoBankServiceRegisterSelfHostedWalletAction, } from "./NeoBankService-method-action-types.cjs";
|
|
32
|
+
export { NeoBankService, serviceName as neoBankServiceName, mapNeoBankAutorampToRemoteSnapshot, } from "./NeoBankService.cjs";
|
|
33
|
+
export type { Blockchain, RegistrationOutcome, RegistrationStatus, SelfHostedRegistration, WalletRegistrationErrorKind, } from "./wallet-registration-service.cjs";
|
|
34
|
+
export { WalletRegistrationError } from "./wallet-registration-service.cjs";
|
|
24
35
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,6BAA6B,EAC7B,wBAAwB,EACxB,oBAAoB,EACpB,+BAA+B,EAC/B,sCAAsC,EACtC,sBAAsB,EACtB,gCAAgC,EAChC,UAAU,EACV,aAAa,EACb,YAAY,EACZ,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,6BAA6B,EAC7B,wBAAwB,EACxB,oBAAoB,EACpB,+BAA+B,EAC/B,sCAAsC,EACtC,yCAAyC,EACzC,sBAAsB,EACtB,gCAAgC,EAChC,UAAU,EACV,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,oCAAoC,EACpC,0CAA0C,GAC3C,8BAA6B;AAC9B,YAAY,EACV,mCAAmC,EACnC,iCAAiC,EACjC,oCAAoC,EACpC,kCAAkC,EAClC,wCAAwC,EACxC,gDAAgD,EAChD,yBAAyB,EACzB,iCAAiC,EACjC,8BAA8B,EAC9B,qCAAqC,EACrC,iCAAiC,EACjC,sCAAsC,EACtC,gDAAgD,EAChD,6CAA6C,EAC7C,8BAA8B,EAC9B,6BAA6B,EAC7B,gCAAgC,EAChC,gCAAgC,EAChC,mCAAmC,EACnC,mCAAmC,EACnC,+CAA+C,EAC/C,2CAA2C,EAC3C,gDAAgD,EAChD,oCAAoC,EACpC,qCAAqC,EACrC,sCAAsC,EACtC,qCAAqC,EACrC,qCAAqC,EACrC,uCAAuC,EACvC,6BAA6B,EAC7B,yCAAyC,EACzC,qCAAqC,EACrC,0CAA0C,EAC1C,4CAA4C,EAC5C,4CAA4C,EAC5C,sCAAsC,EACtC,uCAAuC,EACvC,yCAAyC,EACzC,kCAAkC,EAClC,0CAA0C,EAC1C,uCAAuC,EACvC,6CAA6C,EAC7C,qDAAqD,EACrD,uCAAuC,EACvC,oCAAoC,EACpC,yCAAyC,EACzC,sCAAsC,EACtC,oDAAoD,EACpD,oDAAoD,EACpD,qCAAqC,EACrC,4CAA4C,EAC5C,0CAA0C,EAC1C,0C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+B,EAC/B,qCAAqC,EACrC,+BAA+B,EAC/B,4BAA4B,EAC5B,8BAA8B,EAC9B,4CAA4C,EAC5C,mCAAmC,GACpC,iDAAgD;AACjD,YAAY,EACV,eAAe,EACf,+BAA+B,EAC/B,qBAAqB,GACtB,8BAA6B;AAC9B,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,GACrB,8BAA6B;AAC9B,OAAO,EAAE,qBAAqB,EAAE,gCAA+B;AAC/D,YAAY,EACV,2BAA2B,EAC3B,sBAAsB,GACvB,6BAA4B;AAC7B,YAAY,EACV,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,iCAAiC,EACjC,8BAA8B,GAC/B,6BAA4B;AAC7B,YAAY,EACV,+BAA+B,EAC/B,sCAAsC,EACtC,oCAAoC,EACpC,kCAAkC,EAClC,+CAA+C,EAC/C,uCAAuC,EACvC,2CAA2C,EAC3C,wCAAwC,EACxC,+CAA+C,EAC/C,4CAA4C,GAC7C,iDAAgD;AACjD,OAAO,EACL,cAAc,EACd,WAAW,IAAI,kBAAkB,EACjC,kCAAkC,GACnC,6BAA4B;AAC7B,YAAY,EACV,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,2BAA2B,GAC5B,0CAAyC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,0CAAyC"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export type { RampsControllerActions, RampsControllerEvents, RampsControllerGetStateAction, RampsControllerMessenger, RampsControllerState, RampsControllerStateChangeEvent, RampsControllerOrderStatusChangedEvent, RampsControllerOptions, PaymentMethodsForContextResponse, UserRegion, ResourceState, TransakState, NativeProvidersState, } from "./RampsController.mjs";
|
|
2
|
-
export type { RampsControllerExecuteRequestAction, RampsControllerAbortRequestAction, RampsControllerGetRequestStateAction, RampsControllerSetUserRegionAction, RampsControllerSetSelectedProviderAction, RampsControllerSetSelectedProviderForAssetAction, RampsControllerInitAction, RampsControllerGetCountriesAction, RampsControllerGetTokensAction, RampsControllerSetSelectedTokenAction, RampsControllerGetProvidersAction, RampsControllerGetPaymentMethodsAction, RampsControllerGetPaymentMethodsForContextAction, RampsControllerSetSelectedPaymentMethodAction, RampsControllerGetQuotesAction, RampsControllerAddOrderAction, RampsControllerRemoveOrderAction, RampsControllerStartOrderPollingAction, RampsControllerStopOrderPollingAction, RampsControllerGetBuyWidgetDataAction, RampsControllerAddPrecreatedOrderAction, RampsControllerGetOrderAction, RampsControllerGetOrderFromCallbackAction, RampsControllerTransakSetApiKeyAction, RampsControllerTransakSetAccessTokenAction, RampsControllerTransakClearAccessTokenAction, RampsControllerTransakSetAuthenticatedAction, RampsControllerTransakResetStateAction, RampsControllerTransakSendUserOtpAction, RampsControllerTransakVerifyUserOtpAction, RampsControllerTransakLogoutAction, RampsControllerTransakGetUserDetailsAction, RampsControllerTransakGetBuyQuoteAction, RampsControllerTransakGetKycRequirementAction, RampsControllerTransakGetAdditionalRequirementsAction, RampsControllerTransakCreateOrderAction, RampsControllerTransakGetOrderAction, RampsControllerTransakGetUserLimitsAction, RampsControllerTransakRequestOttAction, RampsControllerTransakGeneratePaymentWidgetUrlAction, RampsControllerTransakSubmitPurposeOfUsageFormAction, RampsControllerTransakPatchUserAction, RampsControllerTransakSubmitSsnDetailsAction, RampsControllerTransakConfirmPaymentAction, RampsControllerTransakGetTranslationAction, RampsControllerTransakGetIdProofStatusAction, RampsControllerTransakCancelOrderAction, RampsControllerTransakCancelAllActiveOrdersAction, RampsControllerTransakGetActiveOrdersAction, } from "./RampsController-method-action-types.mjs";
|
|
3
|
-
export { RampsController, getDefaultRampsControllerState, getInternalOrderCode, RAMPS_CONTROLLER_REQUIRED_SERVICE_ACTIONS, } from "./RampsController.mjs";
|
|
1
|
+
export type { RampsControllerActions, RampsControllerEvents, RampsControllerGetStateAction, RampsControllerMessenger, RampsControllerState, RampsControllerStateChangeEvent, RampsControllerOrderStatusChangedEvent, RampsControllerAutorampStatusChangedEvent, RampsControllerOptions, PaymentMethodsForContextResponse, UserRegion, ResourceState, TransakState, NativeProvidersState, MoneyAccountWalletRegistrationResult, KeyringControllerSignPersonalMessageAction, } from "./RampsController.mjs";
|
|
2
|
+
export type { RampsControllerExecuteRequestAction, RampsControllerAbortRequestAction, RampsControllerGetRequestStateAction, RampsControllerSetUserRegionAction, RampsControllerSetSelectedProviderAction, RampsControllerSetSelectedProviderForAssetAction, RampsControllerInitAction, RampsControllerGetCountriesAction, RampsControllerGetTokensAction, RampsControllerSetSelectedTokenAction, RampsControllerGetProvidersAction, RampsControllerGetPaymentMethodsAction, RampsControllerGetPaymentMethodsForContextAction, RampsControllerSetSelectedPaymentMethodAction, RampsControllerGetQuotesAction, RampsControllerAddOrderAction, RampsControllerRemoveOrderAction, RampsControllerAddAutorampAction, RampsControllerCreateAutorampAction, RampsControllerRemoveAutorampAction, RampsControllerRegisterMoneyAccountWalletAction, RampsControllerMarkAutorampAsNotifiedAction, RampsControllerApplyAutorampStatusFromPushAction, RampsControllerRefreshAutorampAction, RampsControllerRefreshAutorampsAction, RampsControllerStartOrderPollingAction, RampsControllerStopOrderPollingAction, RampsControllerGetBuyWidgetDataAction, RampsControllerAddPrecreatedOrderAction, RampsControllerGetOrderAction, RampsControllerGetOrderFromCallbackAction, RampsControllerTransakSetApiKeyAction, RampsControllerTransakSetAccessTokenAction, RampsControllerTransakClearAccessTokenAction, RampsControllerTransakSetAuthenticatedAction, RampsControllerTransakResetStateAction, RampsControllerTransakSendUserOtpAction, RampsControllerTransakVerifyUserOtpAction, RampsControllerTransakLogoutAction, RampsControllerTransakGetUserDetailsAction, RampsControllerTransakGetBuyQuoteAction, RampsControllerTransakGetKycRequirementAction, RampsControllerTransakGetAdditionalRequirementsAction, RampsControllerTransakCreateOrderAction, RampsControllerTransakGetOrderAction, RampsControllerTransakGetUserLimitsAction, RampsControllerTransakRequestOttAction, RampsControllerTransakGeneratePaymentWidgetUrlAction, RampsControllerTransakSubmitPurposeOfUsageFormAction, RampsControllerTransakPatchUserAction, RampsControllerTransakSubmitSsnDetailsAction, RampsControllerTransakConfirmPaymentAction, RampsControllerTransakGetTranslationAction, RampsControllerTransakGetIdProofStatusAction, RampsControllerTransakCancelOrderAction, RampsControllerTransakCancelAllActiveOrdersAction, RampsControllerTransakGetActiveOrdersAction, } from "./RampsController-method-action-types.mjs";
|
|
3
|
+
export { RampsController, getDefaultRampsControllerState, getInternalOrderCode, RAMPS_CONTROLLER_REQUIRED_SERVICE_ACTIONS, RAMPS_CONTROLLER_REQUIRED_CONTROLLER_ACTIONS, } from "./RampsController.mjs";
|
|
4
4
|
export type { RampsServiceActions, RampsServiceEvents, RampsServiceMessenger, Country, State, SupportedActions, CountryPhone, Provider, ProviderLink, ProviderLogos, ProviderBrowserType, ProviderLimit, ProviderFiatLimits, ProviderLimits, ProviderSortOrder, ProvidersResponse, RampAction, PaymentMethod, PaymentMethodsResponse, Quote, QuoteError, QuoteSortBy, QuoteSortOrder, QuoteCryptoTranslation, QuoteCustomAction, QuotesResponse, GetQuotesParams, RampsToken, TokensResponse, BuyWidget, RampsOrder, RampsOrderNetwork, RampsOrderCryptoCurrency, RampsOrderFiatCurrency, RampsOrderPaymentMethod, OrderPaymentDetail, } from "./RampsService.mjs";
|
|
5
5
|
export { RampsService, RampsEnvironment, RampsApiService, RampsOrderStatus, RAMPS_SDK_VERSION, getDefaultRedirectCallbackUrl, } from "./RampsService.mjs";
|
|
6
|
+
export type { RampsClientIdentity } from "./client-identity.mjs";
|
|
7
|
+
export { addRampsClientIdentityParams, RAMPS_CLIENT_PRODUCT_PARAM, RAMPS_CLIENT_VERSION_PARAM, } from "./client-identity.mjs";
|
|
6
8
|
export type { RampsServiceGetDefaultRedirectCallbackUrlAction, RampsServiceGetGeolocationAction, RampsServiceGetCountriesAction, RampsServiceGetPaymentMethodsAction, RampsServiceGetQuotesAction, RampsServiceGetBuyWidgetUrlAction, RampsServiceGetOrderAction, RampsServiceGetOrderFromCallbackAction, } from "./RampsService-method-action-types.mjs";
|
|
7
9
|
export type { RequestCache, RequestState, ExecuteRequestOptions, PendingRequest, ResourceType, } from "./RequestCache.mjs";
|
|
8
10
|
export type { RampsErrorCode } from "./rampsErrorCodes.mjs";
|
|
@@ -21,4 +23,13 @@ export type { TransakServiceActions, TransakServiceEvents, TransakServiceMesseng
|
|
|
21
23
|
export { TransakApiError, TransakService, TransakEnvironment, TransakOrderIdTransformer, } from "./TransakService.mjs";
|
|
22
24
|
export { getTransakApiMessage, isTransakPhoneRegisteredError, } from "./transakApiErrorUtils.mjs";
|
|
23
25
|
export type { TransakServiceMethodActions, TransakServiceSendUserOtpAction, TransakServiceVerifyUserOtpAction, TransakServiceGetUserDetailsAction, TransakServiceGetBuyQuoteAction, TransakServiceGetKycRequirementAction, TransakServiceCreateOrderAction, TransakServiceGetOrderAction, TransakServiceRequestOttAction, TransakServiceGeneratePaymentWidgetUrlAction, TransakServiceCreateWidgetUrlAction, } from "./TransakService-method-action-types.mjs";
|
|
26
|
+
export type { AutorampAccount, ApplyAutorampRemoteStatusResult, CreateAutorampRequest, } from "./autorampAccount.mjs";
|
|
27
|
+
export { AutorampStatus, TERMINAL_AUTORAMP_STATUSES, NOTABLE_AUTORAMP_STATUSES, isTerminalAutorampStatus, normalizeAutorampStatus, createAutorampAccount, applyAutorampRemoteStatus, markAutorampNotified, } from "./autorampAccount.mjs";
|
|
28
|
+
export { buildOwnershipMessage } from "./ownership-message.mjs";
|
|
29
|
+
export type { AutorampDepositRailsSummary, AutorampRemoteSnapshot, } from "./autoramp-types.mjs";
|
|
30
|
+
export type { NeoBankServiceActions, NeoBankServiceEvents, NeoBankServiceMessenger, NeoBankAutorampResponse, NeoBankRequestOptions, NeoBankQueryParams, GetWalletRegistrationStatusParams, RegisterSelfHostedWalletParams, } from "./NeoBankService.mjs";
|
|
31
|
+
export type { NeoBankServiceGetAutorampAction, NeoBankServiceRegisterPixAddressAction, NeoBankServiceGetAutorampQuoteAction, NeoBankServiceCreateAutorampAction, NeoBankServiceGetAutorampQuoteForAutorampAction, NeoBankServiceAttachAutorampQuoteAction, NeoBankServiceGetCustomerByExternalIdAction, NeoBankServiceGetMoonpayCustomerIdAction, NeoBankServiceGetWalletRegistrationStatusAction, NeoBankServiceRegisterSelfHostedWalletAction, } from "./NeoBankService-method-action-types.mjs";
|
|
32
|
+
export { NeoBankService, serviceName as neoBankServiceName, mapNeoBankAutorampToRemoteSnapshot, } from "./NeoBankService.mjs";
|
|
33
|
+
export type { Blockchain, RegistrationOutcome, RegistrationStatus, SelfHostedRegistration, WalletRegistrationErrorKind, } from "./wallet-registration-service.mjs";
|
|
34
|
+
export { WalletRegistrationError } from "./wallet-registration-service.mjs";
|
|
24
35
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,6BAA6B,EAC7B,wBAAwB,EACxB,oBAAoB,EACpB,+BAA+B,EAC/B,sCAAsC,EACtC,sBAAsB,EACtB,gCAAgC,EAChC,UAAU,EACV,aAAa,EACb,YAAY,EACZ,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,6BAA6B,EAC7B,wBAAwB,EACxB,oBAAoB,EACpB,+BAA+B,EAC/B,sCAAsC,EACtC,yCAAyC,EACzC,sBAAsB,EACtB,gCAAgC,EAChC,UAAU,EACV,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,oCAAoC,EACpC,0CAA0C,GAC3C,8BAA6B;AAC9B,YAAY,EACV,mC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AAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,iCAAiC,EACjC,8BAA8B,GAC/B,6BAA4B;AAC7B,YAAY,EACV,+BAA+B,EAC/B,sCAAsC,EACtC,oCAAoC,EACpC,kCAAkC,EAClC,+CAA+C,EAC/C,uCAAuC,EACvC,2CAA2C,EAC3C,wCAAwC,EACxC,+CAA+C,EAC/C,4CAA4C,GAC7C,iDAAgD;AACjD,OAAO,EACL,cAAc,EACd,WAAW,IAAI,kBAAkB,EACjC,kCAAkC,GACnC,6BAA4B;AAC7B,YAAY,EACV,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,2BAA2B,GAC5B,0CAAyC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,0CAAyC"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { RampsController, getDefaultRampsControllerState, getInternalOrderCode, RAMPS_CONTROLLER_REQUIRED_SERVICE_ACTIONS } from "./RampsController.mjs";
|
|
1
|
+
export { RampsController, getDefaultRampsControllerState, getInternalOrderCode, RAMPS_CONTROLLER_REQUIRED_SERVICE_ACTIONS, RAMPS_CONTROLLER_REQUIRED_CONTROLLER_ACTIONS } from "./RampsController.mjs";
|
|
2
2
|
export { RampsService, RampsEnvironment, RampsApiService, RampsOrderStatus, RAMPS_SDK_VERSION, getDefaultRedirectCallbackUrl } from "./RampsService.mjs";
|
|
3
|
+
export { addRampsClientIdentityParams, RAMPS_CLIENT_PRODUCT_PARAM, RAMPS_CLIENT_VERSION_PARAM } from "./client-identity.mjs";
|
|
3
4
|
export { RequestStatus, DEFAULT_REQUEST_CACHE_TTL, DEFAULT_REQUEST_CACHE_MAX_SIZE, createCacheKey, isCacheExpired, createLoadingState, createSuccessState, createErrorState } from "./RequestCache.mjs";
|
|
4
5
|
export { RAMPS_ERROR_CODES } from "./rampsErrorCodes.mjs";
|
|
5
6
|
export { createRequestSelector } from "./selectors.mjs";
|
|
@@ -10,4 +11,8 @@ export { TERMINAL_ORDER_STATUSES, isTerminalOrderStatus } from "./orderStatus.mj
|
|
|
10
11
|
export { getErrorMessage, extractExplicitTypedError, normalizeToTypedError } from "./errorNormalization.mjs";
|
|
11
12
|
export { TransakApiError, TransakService, TransakEnvironment, TransakOrderIdTransformer } from "./TransakService.mjs";
|
|
12
13
|
export { getTransakApiMessage, isTransakPhoneRegisteredError } from "./transakApiErrorUtils.mjs";
|
|
14
|
+
export { AutorampStatus, TERMINAL_AUTORAMP_STATUSES, NOTABLE_AUTORAMP_STATUSES, isTerminalAutorampStatus, normalizeAutorampStatus, createAutorampAccount, applyAutorampRemoteStatus, markAutorampNotified } from "./autorampAccount.mjs";
|
|
15
|
+
export { buildOwnershipMessage } from "./ownership-message.mjs";
|
|
16
|
+
export { NeoBankService, serviceName as neoBankServiceName, mapNeoBankAutorampToRemoteSnapshot } from "./NeoBankService.mjs";
|
|
17
|
+
export { WalletRegistrationError } from "./wallet-registration-service.mjs";
|
|
13
18
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -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":"AA6EA,OAAO,EACL,eAAe,EACf,8BAA8B,EAC9B,oBAAoB,EACpB,yCAAyC,EACzC,4CAA4C,EAC7C,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;AAmBnC,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACrB,8BAA6B;AAC9B,OAAO,EAAE,qBAAqB,EAAE,gCAA+B;AA2B/D,OAAO,EACL,cAAc,EACd,WAAW,IAAI,kBAAkB,EACjC,kCAAkC,EACnC,6BAA4B;AAQ7B,OAAO,EAAE,uBAAuB,EAAE,0CAAyC","sourcesContent":["export type {\n RampsControllerActions,\n RampsControllerEvents,\n RampsControllerGetStateAction,\n RampsControllerMessenger,\n RampsControllerState,\n RampsControllerStateChangeEvent,\n RampsControllerOrderStatusChangedEvent,\n RampsControllerAutorampStatusChangedEvent,\n RampsControllerOptions,\n PaymentMethodsForContextResponse,\n UserRegion,\n ResourceState,\n TransakState,\n NativeProvidersState,\n MoneyAccountWalletRegistrationResult,\n KeyringControllerSignPersonalMessageAction,\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 RampsControllerAddAutorampAction,\n RampsControllerCreateAutorampAction,\n RampsControllerRemoveAutorampAction,\n RampsControllerRegisterMoneyAccountWalletAction,\n RampsControllerMarkAutorampAsNotifiedAction,\n RampsControllerApplyAutorampStatusFromPushAction,\n RampsControllerRefreshAutorampAction,\n RampsControllerRefreshAutorampsAction,\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 RAMPS_CONTROLLER_REQUIRED_CONTROLLER_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';\nexport type {\n AutorampAccount,\n ApplyAutorampRemoteStatusResult,\n CreateAutorampRequest,\n} from './autorampAccount.js';\nexport {\n AutorampStatus,\n TERMINAL_AUTORAMP_STATUSES,\n NOTABLE_AUTORAMP_STATUSES,\n isTerminalAutorampStatus,\n normalizeAutorampStatus,\n createAutorampAccount,\n applyAutorampRemoteStatus,\n markAutorampNotified,\n} from './autorampAccount.js';\nexport { buildOwnershipMessage } from './ownership-message.js';\nexport type {\n AutorampDepositRailsSummary,\n AutorampRemoteSnapshot,\n} from './autoramp-types.js';\nexport type {\n NeoBankServiceActions,\n NeoBankServiceEvents,\n NeoBankServiceMessenger,\n NeoBankAutorampResponse,\n NeoBankRequestOptions,\n NeoBankQueryParams,\n GetWalletRegistrationStatusParams,\n RegisterSelfHostedWalletParams,\n} from './NeoBankService.js';\nexport type {\n NeoBankServiceGetAutorampAction,\n NeoBankServiceRegisterPixAddressAction,\n NeoBankServiceGetAutorampQuoteAction,\n NeoBankServiceCreateAutorampAction,\n NeoBankServiceGetAutorampQuoteForAutorampAction,\n NeoBankServiceAttachAutorampQuoteAction,\n NeoBankServiceGetCustomerByExternalIdAction,\n NeoBankServiceGetMoonpayCustomerIdAction,\n NeoBankServiceGetWalletRegistrationStatusAction,\n NeoBankServiceRegisterSelfHostedWalletAction,\n} from './NeoBankService-method-action-types.js';\nexport {\n NeoBankService,\n serviceName as neoBankServiceName,\n mapNeoBankAutorampToRemoteSnapshot,\n} from './NeoBankService.js';\nexport type {\n Blockchain,\n RegistrationOutcome,\n RegistrationStatus,\n SelfHostedRegistration,\n WalletRegistrationErrorKind,\n} from './wallet-registration-service.js';\nexport { WalletRegistrationError } from './wallet-registration-service.js';\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildOwnershipMessage = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Builds the proof-of-ownership message required to register a self-hosted
|
|
6
|
+
* wallet with MoonPay Iron (`POST /addresses/crypto/selfhosted`).
|
|
7
|
+
*
|
|
8
|
+
* The returned string is the exact sentence that must be both signed (EIP-191
|
|
9
|
+
* `personal_sign`) and sent, byte-for-byte, in the registration request body.
|
|
10
|
+
* The date is always formatted as `DD/MM/YYYY` in UTC so a signature produced
|
|
11
|
+
* just before UTC midnight is not reused with a stale date after rollover.
|
|
12
|
+
*
|
|
13
|
+
* @param request - Values embedded in the ownership message.
|
|
14
|
+
* @param request.address - Wallet address, kept verbatim (no re-casing).
|
|
15
|
+
* @param request.customerId - Iron customer id; must match the request body.
|
|
16
|
+
* @param request.now - Reference time used to derive the UTC calendar date.
|
|
17
|
+
* @returns The exact message to sign and submit.
|
|
18
|
+
*/
|
|
19
|
+
function buildOwnershipMessage({ address, customerId, now, }) {
|
|
20
|
+
const day = String(now.getUTCDate()).padStart(2, '0');
|
|
21
|
+
const month = String(now.getUTCMonth() + 1).padStart(2, '0');
|
|
22
|
+
const year = now.getUTCFullYear();
|
|
23
|
+
return `I am verifying ownership of the wallet address ${address} as customer ${customerId}. This message was signed on ${day}/${month}/${year} to confirm my control over this wallet.`;
|
|
24
|
+
}
|
|
25
|
+
exports.buildOwnershipMessage = buildOwnershipMessage;
|
|
26
|
+
//# sourceMappingURL=ownership-message.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ownership-message.cjs","sourceRoot":"","sources":["../src/ownership-message.ts"],"names":[],"mappings":";;;AAMA;;;;;;;;;;;;;;GAcG;AACH,SAAgB,qBAAqB,CAAC,EACpC,OAAO,EACP,UAAU,EACV,GAAG,GAC0B;IAC7B,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACtD,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,GAAG,CAAC,cAAc,EAAE,CAAC;IAElC,OAAO,kDAAkD,OAAO,gBAAgB,UAAU,gCAAgC,GAAG,IAAI,KAAK,IAAI,IAAI,0CAA0C,CAAC;AAC3L,CAAC;AAVD,sDAUC","sourcesContent":["export type BuildOwnershipMessageRequest = {\n address: string;\n customerId: string;\n now: Date;\n};\n\n/**\n * Builds the proof-of-ownership message required to register a self-hosted\n * wallet with MoonPay Iron (`POST /addresses/crypto/selfhosted`).\n *\n * The returned string is the exact sentence that must be both signed (EIP-191\n * `personal_sign`) and sent, byte-for-byte, in the registration request body.\n * The date is always formatted as `DD/MM/YYYY` in UTC so a signature produced\n * just before UTC midnight is not reused with a stale date after rollover.\n *\n * @param request - Values embedded in the ownership message.\n * @param request.address - Wallet address, kept verbatim (no re-casing).\n * @param request.customerId - Iron customer id; must match the request body.\n * @param request.now - Reference time used to derive the UTC calendar date.\n * @returns The exact message to sign and submit.\n */\nexport function buildOwnershipMessage({\n address,\n customerId,\n now,\n}: BuildOwnershipMessageRequest): string {\n const day = String(now.getUTCDate()).padStart(2, '0');\n const month = String(now.getUTCMonth() + 1).padStart(2, '0');\n const year = now.getUTCFullYear();\n\n return `I am verifying ownership of the wallet address ${address} as customer ${customerId}. This message was signed on ${day}/${month}/${year} to confirm my control over this wallet.`;\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type BuildOwnershipMessageRequest = {
|
|
2
|
+
address: string;
|
|
3
|
+
customerId: string;
|
|
4
|
+
now: Date;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Builds the proof-of-ownership message required to register a self-hosted
|
|
8
|
+
* wallet with MoonPay Iron (`POST /addresses/crypto/selfhosted`).
|
|
9
|
+
*
|
|
10
|
+
* The returned string is the exact sentence that must be both signed (EIP-191
|
|
11
|
+
* `personal_sign`) and sent, byte-for-byte, in the registration request body.
|
|
12
|
+
* The date is always formatted as `DD/MM/YYYY` in UTC so a signature produced
|
|
13
|
+
* just before UTC midnight is not reused with a stale date after rollover.
|
|
14
|
+
*
|
|
15
|
+
* @param request - Values embedded in the ownership message.
|
|
16
|
+
* @param request.address - Wallet address, kept verbatim (no re-casing).
|
|
17
|
+
* @param request.customerId - Iron customer id; must match the request body.
|
|
18
|
+
* @param request.now - Reference time used to derive the UTC calendar date.
|
|
19
|
+
* @returns The exact message to sign and submit.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildOwnershipMessage({ address, customerId, now, }: BuildOwnershipMessageRequest): string;
|
|
22
|
+
//# sourceMappingURL=ownership-message.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ownership-message.d.cts","sourceRoot":"","sources":["../src/ownership-message.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,4BAA4B,GAAG;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,IAAI,CAAC;CACX,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,OAAO,EACP,UAAU,EACV,GAAG,GACJ,EAAE,4BAA4B,GAAG,MAAM,CAMvC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type BuildOwnershipMessageRequest = {
|
|
2
|
+
address: string;
|
|
3
|
+
customerId: string;
|
|
4
|
+
now: Date;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Builds the proof-of-ownership message required to register a self-hosted
|
|
8
|
+
* wallet with MoonPay Iron (`POST /addresses/crypto/selfhosted`).
|
|
9
|
+
*
|
|
10
|
+
* The returned string is the exact sentence that must be both signed (EIP-191
|
|
11
|
+
* `personal_sign`) and sent, byte-for-byte, in the registration request body.
|
|
12
|
+
* The date is always formatted as `DD/MM/YYYY` in UTC so a signature produced
|
|
13
|
+
* just before UTC midnight is not reused with a stale date after rollover.
|
|
14
|
+
*
|
|
15
|
+
* @param request - Values embedded in the ownership message.
|
|
16
|
+
* @param request.address - Wallet address, kept verbatim (no re-casing).
|
|
17
|
+
* @param request.customerId - Iron customer id; must match the request body.
|
|
18
|
+
* @param request.now - Reference time used to derive the UTC calendar date.
|
|
19
|
+
* @returns The exact message to sign and submit.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildOwnershipMessage({ address, customerId, now, }: BuildOwnershipMessageRequest): string;
|
|
22
|
+
//# sourceMappingURL=ownership-message.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ownership-message.d.mts","sourceRoot":"","sources":["../src/ownership-message.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,4BAA4B,GAAG;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,IAAI,CAAC;CACX,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,OAAO,EACP,UAAU,EACV,GAAG,GACJ,EAAE,4BAA4B,GAAG,MAAM,CAMvC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds the proof-of-ownership message required to register a self-hosted
|
|
3
|
+
* wallet with MoonPay Iron (`POST /addresses/crypto/selfhosted`).
|
|
4
|
+
*
|
|
5
|
+
* The returned string is the exact sentence that must be both signed (EIP-191
|
|
6
|
+
* `personal_sign`) and sent, byte-for-byte, in the registration request body.
|
|
7
|
+
* The date is always formatted as `DD/MM/YYYY` in UTC so a signature produced
|
|
8
|
+
* just before UTC midnight is not reused with a stale date after rollover.
|
|
9
|
+
*
|
|
10
|
+
* @param request - Values embedded in the ownership message.
|
|
11
|
+
* @param request.address - Wallet address, kept verbatim (no re-casing).
|
|
12
|
+
* @param request.customerId - Iron customer id; must match the request body.
|
|
13
|
+
* @param request.now - Reference time used to derive the UTC calendar date.
|
|
14
|
+
* @returns The exact message to sign and submit.
|
|
15
|
+
*/
|
|
16
|
+
export function buildOwnershipMessage({ address, customerId, now, }) {
|
|
17
|
+
const day = String(now.getUTCDate()).padStart(2, '0');
|
|
18
|
+
const month = String(now.getUTCMonth() + 1).padStart(2, '0');
|
|
19
|
+
const year = now.getUTCFullYear();
|
|
20
|
+
return `I am verifying ownership of the wallet address ${address} as customer ${customerId}. This message was signed on ${day}/${month}/${year} to confirm my control over this wallet.`;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=ownership-message.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ownership-message.mjs","sourceRoot":"","sources":["../src/ownership-message.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,qBAAqB,CAAC,EACpC,OAAO,EACP,UAAU,EACV,GAAG,GAC0B;IAC7B,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACtD,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,GAAG,CAAC,cAAc,EAAE,CAAC;IAElC,OAAO,kDAAkD,OAAO,gBAAgB,UAAU,gCAAgC,GAAG,IAAI,KAAK,IAAI,IAAI,0CAA0C,CAAC;AAC3L,CAAC","sourcesContent":["export type BuildOwnershipMessageRequest = {\n address: string;\n customerId: string;\n now: Date;\n};\n\n/**\n * Builds the proof-of-ownership message required to register a self-hosted\n * wallet with MoonPay Iron (`POST /addresses/crypto/selfhosted`).\n *\n * The returned string is the exact sentence that must be both signed (EIP-191\n * `personal_sign`) and sent, byte-for-byte, in the registration request body.\n * The date is always formatted as `DD/MM/YYYY` in UTC so a signature produced\n * just before UTC midnight is not reused with a stale date after rollover.\n *\n * @param request - Values embedded in the ownership message.\n * @param request.address - Wallet address, kept verbatim (no re-casing).\n * @param request.customerId - Iron customer id; must match the request body.\n * @param request.now - Reference time used to derive the UTC calendar date.\n * @returns The exact message to sign and submit.\n */\nexport function buildOwnershipMessage({\n address,\n customerId,\n now,\n}: BuildOwnershipMessageRequest): string {\n const day = String(now.getUTCDate()).padStart(2, '0');\n const month = String(now.getUTCMonth() + 1).padStart(2, '0');\n const year = now.getUTCFullYear();\n\n return `I am verifying ownership of the wallet address ${address} as customer ${customerId}. This message was signed on ${day}/${month}/${year} to confirm my control over this wallet.`;\n}\n"]}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Pure, hand-rolled finite state machine for the MoonPay Iron self-hosted
|
|
4
|
+
* wallet registration signing step. It follows the FSM convention used
|
|
5
|
+
* elsewhere in `core` (no XState dependency): a single pure `transition`
|
|
6
|
+
* reducer plus a data-driven transition table.
|
|
7
|
+
*
|
|
8
|
+
* Side effects (server lookups, signing, POSTing) live in the interpreter that
|
|
9
|
+
* drives this machine; every effect result is fed back in as an event, so the
|
|
10
|
+
* machine itself stays deterministic and trivially testable.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.transition = exports.createInitialState = void 0;
|
|
14
|
+
const DEFAULT_MAX_ATTEMPTS = 3;
|
|
15
|
+
/**
|
|
16
|
+
* Creates the initial idle state.
|
|
17
|
+
*
|
|
18
|
+
* @param maxAttempts - Optional retry ceiling for sign attempts.
|
|
19
|
+
* @returns A fresh idle machine state.
|
|
20
|
+
*/
|
|
21
|
+
function createInitialState(maxAttempts = DEFAULT_MAX_ATTEMPTS) {
|
|
22
|
+
return { status: 'idle', context: { attempts: 0, maxAttempts } };
|
|
23
|
+
}
|
|
24
|
+
exports.createInitialState = createInitialState;
|
|
25
|
+
/**
|
|
26
|
+
* Builds a handler that moves to a status while preserving context.
|
|
27
|
+
*
|
|
28
|
+
* @param status - Target status.
|
|
29
|
+
* @returns A handler transitioning to `status`.
|
|
30
|
+
*/
|
|
31
|
+
function keep(status) {
|
|
32
|
+
return (state) => ({ status, context: state.context });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Builds a handler that moves to a status and resets the retry context. Used
|
|
36
|
+
* when the user (or app resume) starts a fresh attempt from scratch.
|
|
37
|
+
*
|
|
38
|
+
* @param status - Target status.
|
|
39
|
+
* @returns A handler transitioning to `status` with reset context.
|
|
40
|
+
*/
|
|
41
|
+
function reset(status) {
|
|
42
|
+
return (state) => ({
|
|
43
|
+
status,
|
|
44
|
+
context: { ...state.context, attempts: 0 },
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Moves to `signing` and counts this as a new sign attempt.
|
|
49
|
+
*
|
|
50
|
+
* @param state - Current state.
|
|
51
|
+
* @returns The `signing` state with an incremented attempt count.
|
|
52
|
+
*/
|
|
53
|
+
const toSigning = (state) => ({
|
|
54
|
+
status: 'signing',
|
|
55
|
+
context: { ...state.context, attempts: state.context.attempts + 1 },
|
|
56
|
+
});
|
|
57
|
+
const toPreparing = reset('preparing');
|
|
58
|
+
const toAlreadyRegistered = keep('alreadyRegistered');
|
|
59
|
+
const toRegisteredDisabled = keep('registeredDisabled');
|
|
60
|
+
const toLookupUnavailable = keep('lookupUnavailable');
|
|
61
|
+
const toCancelled = keep('cancelled');
|
|
62
|
+
const signFailed = (state, event) => {
|
|
63
|
+
const { retryable } = event;
|
|
64
|
+
return retryable
|
|
65
|
+
? keep('failedRetryable')(state, event)
|
|
66
|
+
: keep('failedTerminal')(state, event);
|
|
67
|
+
};
|
|
68
|
+
const submitValidation = (state, event) => {
|
|
69
|
+
const { utcRollover } = event;
|
|
70
|
+
return utcRollover && state.context.attempts < state.context.maxAttempts
|
|
71
|
+
? toSigning(state, event)
|
|
72
|
+
: keep('failedTerminal')(state, event);
|
|
73
|
+
};
|
|
74
|
+
const checkThenRetryAbsent = (state, event) => state.context.attempts < state.context.maxAttempts
|
|
75
|
+
? toSigning(state, event)
|
|
76
|
+
: keep('failedRetryable')(state, event);
|
|
77
|
+
const TABLE = {
|
|
78
|
+
idle: {
|
|
79
|
+
START: toPreparing,
|
|
80
|
+
},
|
|
81
|
+
preparing: {
|
|
82
|
+
LOOKUP_ACTIVE: toAlreadyRegistered,
|
|
83
|
+
LOOKUP_DISABLED: toRegisteredDisabled,
|
|
84
|
+
LOOKUP_ABSENT: toSigning,
|
|
85
|
+
LOOKUP_FAILED: toLookupUnavailable,
|
|
86
|
+
},
|
|
87
|
+
awaitingUnlock: {
|
|
88
|
+
WALLET_UNLOCKED: keep('signing'),
|
|
89
|
+
},
|
|
90
|
+
signing: {
|
|
91
|
+
SIGN_OK: keep('submitting'),
|
|
92
|
+
SIGN_REJECTED: toCancelled,
|
|
93
|
+
SIGN_FAILED: signFailed,
|
|
94
|
+
WALLET_LOCKED: keep('awaitingUnlock'),
|
|
95
|
+
CANCEL: toCancelled,
|
|
96
|
+
},
|
|
97
|
+
submitting: {
|
|
98
|
+
SUBMIT_OK: keep('registered'),
|
|
99
|
+
SUBMIT_CONFLICT: keep('disambiguate409'),
|
|
100
|
+
SUBMIT_TRANSIENT: keep('checkThenRetry'),
|
|
101
|
+
SUBMIT_VALIDATION: submitValidation,
|
|
102
|
+
SUBMIT_TERMINAL: keep('failedTerminal'),
|
|
103
|
+
SUBMIT_RATE_LIMITED: keep('failedRetryable'),
|
|
104
|
+
CANCEL: toCancelled,
|
|
105
|
+
},
|
|
106
|
+
disambiguate409: {
|
|
107
|
+
LOOKUP_ACTIVE: toAlreadyRegistered,
|
|
108
|
+
LOOKUP_DISABLED: toRegisteredDisabled,
|
|
109
|
+
LOOKUP_ABSENT: keep('failedRetryable'),
|
|
110
|
+
LOOKUP_FAILED: toLookupUnavailable,
|
|
111
|
+
CANCEL: toCancelled,
|
|
112
|
+
},
|
|
113
|
+
checkThenRetry: {
|
|
114
|
+
LOOKUP_ACTIVE: toAlreadyRegistered,
|
|
115
|
+
LOOKUP_DISABLED: toRegisteredDisabled,
|
|
116
|
+
LOOKUP_ABSENT: checkThenRetryAbsent,
|
|
117
|
+
LOOKUP_FAILED: toLookupUnavailable,
|
|
118
|
+
CANCEL: toCancelled,
|
|
119
|
+
},
|
|
120
|
+
failedRetryable: {
|
|
121
|
+
RETRY: toPreparing,
|
|
122
|
+
},
|
|
123
|
+
lookupUnavailable: {
|
|
124
|
+
RETRY: toPreparing,
|
|
125
|
+
},
|
|
126
|
+
cancelled: {
|
|
127
|
+
RETRY: toPreparing,
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Pure transition reducer. Unhandled (state, event) pairs are no-ops, which is
|
|
132
|
+
* how the machine enforces "one in-flight operation" (a second `START` while
|
|
133
|
+
* busy is ignored) and how terminal states stay put.
|
|
134
|
+
*
|
|
135
|
+
* @param state - Current machine state.
|
|
136
|
+
* @param event - Event to apply.
|
|
137
|
+
* @returns The next state (or the same state for unhandled events).
|
|
138
|
+
*/
|
|
139
|
+
function transition(state, event) {
|
|
140
|
+
const handler = TABLE[state.status]?.[event.type];
|
|
141
|
+
return handler ? handler(state, event) : state;
|
|
142
|
+
}
|
|
143
|
+
exports.transition = transition;
|
|
144
|
+
//# sourceMappingURL=wallet-registration-machine.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet-registration-machine.cjs","sourceRoot":"","sources":["../src/wallet-registration-machine.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AA4DH,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAE/B;;;;;GAKG;AACH,SAAgB,kBAAkB,CAChC,cAAsB,oBAAoB;IAE1C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,CAAC;AACnE,CAAC;AAJD,gDAIC;AAED;;;;;GAKG;AACH,SAAS,IAAI,CAAC,MAAgC;IAC5C,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;GAMG;AACH,SAAS,KAAK,CAAC,MAAgC;IAC7C,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACjB,MAAM;QACN,OAAO,EAAE,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE;KAC3C,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,SAAS,GAAY,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACrC,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,GAAG,CAAC,EAAE;CACpE,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,KAAK,CAAC,WA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9B,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClD,OAAO,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AACjD,CAAC;AAND,gCAMC","sourcesContent":["/**\n * Pure, hand-rolled finite state machine for the MoonPay Iron self-hosted\n * wallet registration signing step. It follows the FSM convention used\n * elsewhere in `core` (no XState dependency): a single pure `transition`\n * reducer plus a data-driven transition table.\n *\n * Side effects (server lookups, signing, POSTing) live in the interpreter that\n * drives this machine; every effect result is fed back in as an event, so the\n * machine itself stays deterministic and trivially testable.\n */\n\n/** Every state in the signing step. */\nexport type WalletRegistrationStatus =\n | 'idle'\n | 'preparing'\n | 'awaitingUnlock'\n | 'signing'\n | 'submitting'\n | 'disambiguate409'\n | 'checkThenRetry'\n | 'lookupUnavailable'\n | 'registered'\n | 'alreadyRegistered'\n | 'registeredDisabled'\n | 'failedRetryable'\n | 'failedTerminal'\n | 'cancelled';\n\n/** Machine context carried across transitions. */\nexport type WalletRegistrationContext = {\n /** Number of sign attempts made so far (used for the retry ceiling). */\n attempts: number;\n /** Maximum number of sign attempts before a retryable failure is surfaced. */\n maxAttempts: number;\n};\n\nexport type WalletRegistrationState = {\n status: WalletRegistrationStatus;\n context: WalletRegistrationContext;\n};\n\n/** Events the interpreter dispatches into the machine. */\nexport type WalletRegistrationEvent =\n | { type: 'START' }\n | { type: 'WALLET_LOCKED' }\n | { type: 'WALLET_UNLOCKED' }\n | { type: 'LOOKUP_ACTIVE' }\n | { type: 'LOOKUP_DISABLED' }\n | { type: 'LOOKUP_ABSENT' }\n | { type: 'LOOKUP_FAILED' }\n | { type: 'SIGN_OK' }\n | { type: 'SIGN_REJECTED' }\n | { type: 'SIGN_FAILED'; retryable: boolean }\n | { type: 'SUBMIT_OK' }\n | { type: 'SUBMIT_CONFLICT' }\n | { type: 'SUBMIT_TRANSIENT' }\n | { type: 'SUBMIT_VALIDATION'; utcRollover: boolean }\n | { type: 'SUBMIT_TERMINAL' }\n | { type: 'SUBMIT_RATE_LIMITED' }\n | { type: 'RETRY' }\n | { type: 'CANCEL' };\n\ntype EventType = WalletRegistrationEvent['type'];\n\ntype Handler = (\n state: WalletRegistrationState,\n event: WalletRegistrationEvent,\n) => WalletRegistrationState;\n\nconst DEFAULT_MAX_ATTEMPTS = 3;\n\n/**\n * Creates the initial idle state.\n *\n * @param maxAttempts - Optional retry ceiling for sign attempts.\n * @returns A fresh idle machine state.\n */\nexport function createInitialState(\n maxAttempts: number = DEFAULT_MAX_ATTEMPTS,\n): WalletRegistrationState {\n return { status: 'idle', context: { attempts: 0, maxAttempts } };\n}\n\n/**\n * Builds a handler that moves to a status while preserving context.\n *\n * @param status - Target status.\n * @returns A handler transitioning to `status`.\n */\nfunction keep(status: WalletRegistrationStatus): Handler {\n return (state) => ({ status, context: state.context });\n}\n\n/**\n * Builds a handler that moves to a status and resets the retry context. Used\n * when the user (or app resume) starts a fresh attempt from scratch.\n *\n * @param status - Target status.\n * @returns A handler transitioning to `status` with reset context.\n */\nfunction reset(status: WalletRegistrationStatus): Handler {\n return (state) => ({\n status,\n context: { ...state.context, attempts: 0 },\n });\n}\n\n/**\n * Moves to `signing` and counts this as a new sign attempt.\n *\n * @param state - Current state.\n * @returns The `signing` state with an incremented attempt count.\n */\nconst toSigning: Handler = (state) => ({\n status: 'signing',\n context: { ...state.context, attempts: state.context.attempts + 1 },\n});\n\nconst toPreparing = reset('preparing');\nconst toAlreadyRegistered = keep('alreadyRegistered');\nconst toRegisteredDisabled = keep('registeredDisabled');\nconst toLookupUnavailable = keep('lookupUnavailable');\nconst toCancelled = keep('cancelled');\n\nconst signFailed: Handler = (state, event) => {\n const { retryable } = event as Extract<\n WalletRegistrationEvent,\n { type: 'SIGN_FAILED' }\n >;\n return retryable\n ? keep('failedRetryable')(state, event)\n : keep('failedTerminal')(state, event);\n};\n\nconst submitValidation: Handler = (state, event) => {\n const { utcRollover } = event as Extract<\n WalletRegistrationEvent,\n { type: 'SUBMIT_VALIDATION' }\n >;\n return utcRollover && state.context.attempts < state.context.maxAttempts\n ? toSigning(state, event)\n : keep('failedTerminal')(state, event);\n};\n\nconst checkThenRetryAbsent: Handler = (state, event) =>\n state.context.attempts < state.context.maxAttempts\n ? toSigning(state, event)\n : keep('failedRetryable')(state, event);\n\nconst TABLE: Partial<\n Record<WalletRegistrationStatus, Partial<Record<EventType, Handler>>>\n> = {\n idle: {\n START: toPreparing,\n },\n preparing: {\n LOOKUP_ACTIVE: toAlreadyRegistered,\n LOOKUP_DISABLED: toRegisteredDisabled,\n LOOKUP_ABSENT: toSigning,\n LOOKUP_FAILED: toLookupUnavailable,\n },\n awaitingUnlock: {\n WALLET_UNLOCKED: keep('signing'),\n },\n signing: {\n SIGN_OK: keep('submitting'),\n SIGN_REJECTED: toCancelled,\n SIGN_FAILED: signFailed,\n WALLET_LOCKED: keep('awaitingUnlock'),\n CANCEL: toCancelled,\n },\n submitting: {\n SUBMIT_OK: keep('registered'),\n SUBMIT_CONFLICT: keep('disambiguate409'),\n SUBMIT_TRANSIENT: keep('checkThenRetry'),\n SUBMIT_VALIDATION: submitValidation,\n SUBMIT_TERMINAL: keep('failedTerminal'),\n SUBMIT_RATE_LIMITED: keep('failedRetryable'),\n CANCEL: toCancelled,\n },\n disambiguate409: {\n LOOKUP_ACTIVE: toAlreadyRegistered,\n LOOKUP_DISABLED: toRegisteredDisabled,\n LOOKUP_ABSENT: keep('failedRetryable'),\n LOOKUP_FAILED: toLookupUnavailable,\n CANCEL: toCancelled,\n },\n checkThenRetry: {\n LOOKUP_ACTIVE: toAlreadyRegistered,\n LOOKUP_DISABLED: toRegisteredDisabled,\n LOOKUP_ABSENT: checkThenRetryAbsent,\n LOOKUP_FAILED: toLookupUnavailable,\n CANCEL: toCancelled,\n },\n failedRetryable: {\n RETRY: toPreparing,\n },\n lookupUnavailable: {\n RETRY: toPreparing,\n },\n cancelled: {\n RETRY: toPreparing,\n },\n};\n\n/**\n * Pure transition reducer. Unhandled (state, event) pairs are no-ops, which is\n * how the machine enforces \"one in-flight operation\" (a second `START` while\n * busy is ignored) and how terminal states stay put.\n *\n * @param state - Current machine state.\n * @param event - Event to apply.\n * @returns The next state (or the same state for unhandled events).\n */\nexport function transition(\n state: WalletRegistrationState,\n event: WalletRegistrationEvent,\n): WalletRegistrationState {\n const handler = TABLE[state.status]?.[event.type];\n return handler ? handler(state, event) : state;\n}\n"]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure, hand-rolled finite state machine for the MoonPay Iron self-hosted
|
|
3
|
+
* wallet registration signing step. It follows the FSM convention used
|
|
4
|
+
* elsewhere in `core` (no XState dependency): a single pure `transition`
|
|
5
|
+
* reducer plus a data-driven transition table.
|
|
6
|
+
*
|
|
7
|
+
* Side effects (server lookups, signing, POSTing) live in the interpreter that
|
|
8
|
+
* drives this machine; every effect result is fed back in as an event, so the
|
|
9
|
+
* machine itself stays deterministic and trivially testable.
|
|
10
|
+
*/
|
|
11
|
+
/** Every state in the signing step. */
|
|
12
|
+
export type WalletRegistrationStatus = 'idle' | 'preparing' | 'awaitingUnlock' | 'signing' | 'submitting' | 'disambiguate409' | 'checkThenRetry' | 'lookupUnavailable' | 'registered' | 'alreadyRegistered' | 'registeredDisabled' | 'failedRetryable' | 'failedTerminal' | 'cancelled';
|
|
13
|
+
/** Machine context carried across transitions. */
|
|
14
|
+
export type WalletRegistrationContext = {
|
|
15
|
+
/** Number of sign attempts made so far (used for the retry ceiling). */
|
|
16
|
+
attempts: number;
|
|
17
|
+
/** Maximum number of sign attempts before a retryable failure is surfaced. */
|
|
18
|
+
maxAttempts: number;
|
|
19
|
+
};
|
|
20
|
+
export type WalletRegistrationState = {
|
|
21
|
+
status: WalletRegistrationStatus;
|
|
22
|
+
context: WalletRegistrationContext;
|
|
23
|
+
};
|
|
24
|
+
/** Events the interpreter dispatches into the machine. */
|
|
25
|
+
export type WalletRegistrationEvent = {
|
|
26
|
+
type: 'START';
|
|
27
|
+
} | {
|
|
28
|
+
type: 'WALLET_LOCKED';
|
|
29
|
+
} | {
|
|
30
|
+
type: 'WALLET_UNLOCKED';
|
|
31
|
+
} | {
|
|
32
|
+
type: 'LOOKUP_ACTIVE';
|
|
33
|
+
} | {
|
|
34
|
+
type: 'LOOKUP_DISABLED';
|
|
35
|
+
} | {
|
|
36
|
+
type: 'LOOKUP_ABSENT';
|
|
37
|
+
} | {
|
|
38
|
+
type: 'LOOKUP_FAILED';
|
|
39
|
+
} | {
|
|
40
|
+
type: 'SIGN_OK';
|
|
41
|
+
} | {
|
|
42
|
+
type: 'SIGN_REJECTED';
|
|
43
|
+
} | {
|
|
44
|
+
type: 'SIGN_FAILED';
|
|
45
|
+
retryable: boolean;
|
|
46
|
+
} | {
|
|
47
|
+
type: 'SUBMIT_OK';
|
|
48
|
+
} | {
|
|
49
|
+
type: 'SUBMIT_CONFLICT';
|
|
50
|
+
} | {
|
|
51
|
+
type: 'SUBMIT_TRANSIENT';
|
|
52
|
+
} | {
|
|
53
|
+
type: 'SUBMIT_VALIDATION';
|
|
54
|
+
utcRollover: boolean;
|
|
55
|
+
} | {
|
|
56
|
+
type: 'SUBMIT_TERMINAL';
|
|
57
|
+
} | {
|
|
58
|
+
type: 'SUBMIT_RATE_LIMITED';
|
|
59
|
+
} | {
|
|
60
|
+
type: 'RETRY';
|
|
61
|
+
} | {
|
|
62
|
+
type: 'CANCEL';
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Creates the initial idle state.
|
|
66
|
+
*
|
|
67
|
+
* @param maxAttempts - Optional retry ceiling for sign attempts.
|
|
68
|
+
* @returns A fresh idle machine state.
|
|
69
|
+
*/
|
|
70
|
+
export declare function createInitialState(maxAttempts?: number): WalletRegistrationState;
|
|
71
|
+
/**
|
|
72
|
+
* Pure transition reducer. Unhandled (state, event) pairs are no-ops, which is
|
|
73
|
+
* how the machine enforces "one in-flight operation" (a second `START` while
|
|
74
|
+
* busy is ignored) and how terminal states stay put.
|
|
75
|
+
*
|
|
76
|
+
* @param state - Current machine state.
|
|
77
|
+
* @param event - Event to apply.
|
|
78
|
+
* @returns The next state (or the same state for unhandled events).
|
|
79
|
+
*/
|
|
80
|
+
export declare function transition(state: WalletRegistrationState, event: WalletRegistrationEvent): WalletRegistrationState;
|
|
81
|
+
//# sourceMappingURL=wallet-registration-machine.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet-registration-machine.d.cts","sourceRoot":"","sources":["../src/wallet-registration-machine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,uCAAuC;AACvC,MAAM,MAAM,wBAAwB,GAChC,MAAM,GACN,WAAW,GACX,gBAAgB,GAChB,SAAS,GACT,YAAY,GACZ,iBAAiB,GACjB,gBAAgB,GAChB,mBAAmB,GACnB,YAAY,GACZ,mBAAmB,GACnB,oBAAoB,GACpB,iBAAiB,GACjB,gBAAgB,GAChB,WAAW,CAAC;AAEhB,kDAAkD;AAClD,MAAM,MAAM,yBAAyB,GAAG;IACtC,wEAAwE;IACxE,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,wBAAwB,CAAC;IACjC,OAAO,EAAE,yBAAyB,CAAC;CACpC,CAAC;AAEF,0DAA0D;AAC1D,MAAM,MAAM,uBAAuB,GAC/B;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,GACzB;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,GAC3B;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,GACzB;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,GAC3B;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,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