@imtbl/sdk 0.42.0 → 0.43.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.
@@ -12694,13 +12694,16 @@ declare enum SaleEventType {
12694
12694
  FAILURE = "failure",
12695
12695
  REJECTED = "rejected",
12696
12696
  TRANSACTION_SUCCESS = "transaction-success",
12697
- LANGUAGE_CHANGED = "language-changed"
12697
+ LANGUAGE_CHANGED = "language-changed",
12698
+ PAYMENT_METHOD = "payment-method"
12698
12699
  }
12699
12700
  /**
12700
12701
  * Represents a successful Sale transaction.
12701
12702
  * @property {Array} transactions -
12702
12703
  */
12703
12704
  type SaleSuccess = {
12705
+ /** Chosen payment method */
12706
+ paymentMethod: SalePaymentTypes | undefined;
12704
12707
  /** The executed transactions */
12705
12708
  transactions: {
12706
12709
  method: string;
@@ -12719,6 +12722,8 @@ type SaleFailed = {
12719
12722
  reason: string;
12720
12723
  /** The timestamp of the failed swap. */
12721
12724
  timestamp: number;
12725
+ /** Chosen payment method */
12726
+ paymentMethod: SalePaymentTypes | undefined;
12722
12727
  /** The executed transactions */
12723
12728
  transactions: {
12724
12729
  method: string;
@@ -12730,12 +12735,28 @@ type SaleFailed = {
12730
12735
  * @property {Object} transactions
12731
12736
  */
12732
12737
  type SaleTransactionSuccess = {
12738
+ paymentMethod: SalePaymentTypes | undefined;
12733
12739
  /** The executed transactions */
12734
12740
  transactions: {
12735
12741
  method: string;
12736
12742
  hash: string | undefined;
12737
12743
  }[];
12738
12744
  };
12745
+ /**
12746
+ * Type representing a Sale Widget with type PAYMENT_METHOD.
12747
+ * @property {Object} transactions
12748
+ */
12749
+ type SalePaymentMethod = {
12750
+ /** Chosen payment method */
12751
+ paymentMethod: SalePaymentTypes | undefined;
12752
+ };
12753
+ /**
12754
+ * Enum representing Sale Widget available payment types.
12755
+ */
12756
+ declare enum SalePaymentTypes {
12757
+ CRYPTO = "crypto",
12758
+ FIAT = "fiat"
12759
+ }
12739
12760
 
12740
12761
  /**
12741
12762
  * Enum of possible Bridge Widget event types.
@@ -13067,6 +13088,7 @@ type WidgetEventData = {
13067
13088
  [SaleEventType.REJECTED]: any;
13068
13089
  [SaleEventType.CLOSE_WIDGET]: {};
13069
13090
  [SaleEventType.TRANSACTION_SUCCESS]: SaleTransactionSuccess;
13091
+ [SaleEventType.PAYMENT_METHOD]: SalePaymentMethod;
13070
13092
  } & OrchestrationMapping & ProviderEventMapping;
13071
13093
  };
13072
13094
  /**
@@ -13490,4 +13512,4 @@ type ErrorType = {
13490
13512
  };
13491
13513
  };
13492
13514
 
13493
- export { AllowedNetworkConfig, AvailableRoutingOptions, BalanceDelta, BridgeEventType, BridgeFailed, BridgeFundingStep, BridgeTransactionSent, BridgeWidgetConfiguration, BridgeWidgetParams, BuyOrder, BuyParams, BuyResult, BuyResultFailed, BuyResultInsufficientFunds, BuyResultSuccess, BuyToken, CancelParams, CancelResult, CancelResultFailed, CancelResultSuccess, ChainId, ChainName, ChainSlug, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutBridgeConfiguration, CheckoutConfiguration, CheckoutErrorType, CheckoutModuleConfiguration, CheckoutOnRampConfiguration, CheckoutStatus, CheckoutSwapConfiguration, CheckoutWidgetsConfig, ConnectEventType, ConnectParams, ConnectResult, ConnectTargetLayer, ConnectWidgetConfiguration, ConnectWidgetParams, ConnectionFailed, ConnectionSuccess, CreateProviderParams, CreateProviderResult, DexConfig, ERC20ItemRequirement, ERC721Balance, ERC721ItemRequirement, ErrorType, ExchangeType, Fee, FeePercentage, FeeToken, FeeType, FiatRampParams, FulfillmentTransaction, FundingItem, FundingRoute, FundingStep, FundingStepType, GasAmount, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GasToken, GasTokenType, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetTokenInfoParams, GetWalletAllowListParams, GetWalletAllowListResult, IMMUTABLE_API_BASE_URL, IMTBLWidgetEvents, IWidgetsFactory, ItemBalance, ItemType, LanguageChanged, NativeItemRequirement, NetworkFilter, NetworkFilterTypes, NetworkInfo, NoRouteOptions, NoRoutesFound, OnRampEventType, OnRampFailed, OnRampFundingStep, OnRampProviderFees, OnRampSuccess, OnRampWidgetParams, OnrampWidgetConfiguration, OrchestrationEvent, OrchestrationEventData, OrchestrationEventType, OrderFee, ProviderEvent, ProviderEventType, ProviderUpdated, RemoteConfiguration, RequestBridgeEvent, RequestConnectEvent, RequestOnrampEvent, RequestSwapEvent, RequestWalletEvent, RoutesFound, RoutingOutcome, RoutingOutcomeType, SaleEventType, SaleFailed, SaleItem, SaleSuccess, SaleTransactionSuccess, SaleWidgetConfiguration, SaleWidgetParams, SellOrder, SellParams, SellResult, SellResultFailed, SellResultInsufficientFunds, SellResultSuccess, SellToken, SemanticVersion, SendTransactionParams, SendTransactionResult, SmartCheckoutInsufficient, SmartCheckoutParams, SmartCheckoutResult, SmartCheckoutRouter, SmartCheckoutSufficient, SwapEventType, SwapFailed, SwapFundingStep, SwapRejected, SwapSuccess, SwapWidgetConfiguration, SwapWidgetParams, SwitchNetworkParams, SwitchNetworkResult, TokenAmountEstimate, TokenBalance, TokenFilter, TokenFilterTypes, TokenInfo, TransactionOrGasType, TransactionRequirement, WalletDisconnect, WalletEventType, WalletFilter, WalletFilterTypes, WalletInfo, WalletNetworkSwitch, WalletProviderName, WalletWidgetConfiguration, WalletWidgetParams, Widget, WidgetConfiguration, WidgetConfigurations, WidgetEvent, WidgetEventData, WidgetEventTypes, WidgetLanguage, WidgetParameters, WidgetProperties, WidgetTheme, WidgetType };
13515
+ export { AllowedNetworkConfig, AvailableRoutingOptions, BalanceDelta, BridgeEventType, BridgeFailed, BridgeFundingStep, BridgeTransactionSent, BridgeWidgetConfiguration, BridgeWidgetParams, BuyOrder, BuyParams, BuyResult, BuyResultFailed, BuyResultInsufficientFunds, BuyResultSuccess, BuyToken, CancelParams, CancelResult, CancelResultFailed, CancelResultSuccess, ChainId, ChainName, ChainSlug, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutBridgeConfiguration, CheckoutConfiguration, CheckoutErrorType, CheckoutModuleConfiguration, CheckoutOnRampConfiguration, CheckoutStatus, CheckoutSwapConfiguration, CheckoutWidgetsConfig, ConnectEventType, ConnectParams, ConnectResult, ConnectTargetLayer, ConnectWidgetConfiguration, ConnectWidgetParams, ConnectionFailed, ConnectionSuccess, CreateProviderParams, CreateProviderResult, DexConfig, ERC20ItemRequirement, ERC721Balance, ERC721ItemRequirement, ErrorType, ExchangeType, Fee, FeePercentage, FeeToken, FeeType, FiatRampParams, FulfillmentTransaction, FundingItem, FundingRoute, FundingStep, FundingStepType, GasAmount, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GasToken, GasTokenType, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetTokenInfoParams, GetWalletAllowListParams, GetWalletAllowListResult, IMMUTABLE_API_BASE_URL, IMTBLWidgetEvents, IWidgetsFactory, ItemBalance, ItemType, LanguageChanged, NativeItemRequirement, NetworkFilter, NetworkFilterTypes, NetworkInfo, NoRouteOptions, NoRoutesFound, OnRampEventType, OnRampFailed, OnRampFundingStep, OnRampProviderFees, OnRampSuccess, OnRampWidgetParams, OnrampWidgetConfiguration, OrchestrationEvent, OrchestrationEventData, OrchestrationEventType, OrderFee, ProviderEvent, ProviderEventType, ProviderUpdated, RemoteConfiguration, RequestBridgeEvent, RequestConnectEvent, RequestOnrampEvent, RequestSwapEvent, RequestWalletEvent, RoutesFound, RoutingOutcome, RoutingOutcomeType, SaleEventType, SaleFailed, SaleItem, SalePaymentMethod, SalePaymentTypes, SaleSuccess, SaleTransactionSuccess, SaleWidgetConfiguration, SaleWidgetParams, SellOrder, SellParams, SellResult, SellResultFailed, SellResultInsufficientFunds, SellResultSuccess, SellToken, SemanticVersion, SendTransactionParams, SendTransactionResult, SmartCheckoutInsufficient, SmartCheckoutParams, SmartCheckoutResult, SmartCheckoutRouter, SmartCheckoutSufficient, SwapEventType, SwapFailed, SwapFundingStep, SwapRejected, SwapSuccess, SwapWidgetConfiguration, SwapWidgetParams, SwitchNetworkParams, SwitchNetworkResult, TokenAmountEstimate, TokenBalance, TokenFilter, TokenFilterTypes, TokenInfo, TransactionOrGasType, TransactionRequirement, WalletDisconnect, WalletEventType, WalletFilter, WalletFilterTypes, WalletInfo, WalletNetworkSwitch, WalletProviderName, WalletWidgetConfiguration, WalletWidgetParams, Widget, WidgetConfiguration, WidgetConfigurations, WidgetEvent, WidgetEventData, WidgetEventTypes, WidgetLanguage, WidgetParameters, WidgetProperties, WidgetTheme, WidgetType };
package/dist/checkout.js CHANGED
@@ -25921,7 +25921,7 @@ class APIError extends Error {
25921
25921
 
25922
25922
  /* eslint-disable implicit-arrow-linebreak */
25923
25923
  const defaultHeaders = {
25924
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.42.0',
25924
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.43.0',
25925
25925
  };
25926
25926
  /**
25927
25927
  * createAPIConfiguration to create a custom Configuration
@@ -26404,7 +26404,16 @@ var SaleEventType;
26404
26404
  SaleEventType["REJECTED"] = "rejected";
26405
26405
  SaleEventType["TRANSACTION_SUCCESS"] = "transaction-success";
26406
26406
  SaleEventType["LANGUAGE_CHANGED"] = "language-changed";
26407
+ SaleEventType["PAYMENT_METHOD"] = "payment-method";
26407
26408
  })(SaleEventType || (SaleEventType = {}));
26409
+ /**
26410
+ * Enum representing Sale Widget available payment types.
26411
+ */
26412
+ var SalePaymentTypes;
26413
+ (function (SalePaymentTypes) {
26414
+ SalePaymentTypes["CRYPTO"] = "crypto";
26415
+ SalePaymentTypes["FIAT"] = "fiat";
26416
+ })(SalePaymentTypes || (SalePaymentTypes = {}));
26408
26417
 
26409
26418
  /**
26410
26419
  * Enum of possible Bridge Widget event types.
@@ -27271,7 +27280,7 @@ const GAS_OVERRIDES = {
27271
27280
  maxPriorityFeePerGas: BigNumber$1.from(101e9),
27272
27281
  };
27273
27282
 
27274
- const SDK_VERSION_MARKER = '0.42.0';
27283
+ const SDK_VERSION_MARKER = '0.43.0';
27275
27284
  // This SDK version is replaced by the `yarn build` command ran on the root level
27276
27285
  const globalPackageVersion = () => SDK_VERSION_MARKER;
27277
27286
 
@@ -31151,4 +31160,4 @@ class Checkout {
31151
31160
  }
31152
31161
  }
31153
31162
 
31154
- export { BridgeEventType, ChainId, ChainName, ChainSlug, Checkout, CheckoutConfiguration, CheckoutErrorType, CheckoutStatus, ConnectEventType, ConnectTargetLayer, ExchangeType, FeeType, FundingStepType, GasEstimateType, GasTokenType, IMMUTABLE_API_BASE_URL, IMTBLWidgetEvents, ItemType, NetworkFilterTypes, OnRampEventType, OrchestrationEventType, ProviderEventType, RoutingOutcomeType, SaleEventType, SwapEventType, TokenFilterTypes, TransactionOrGasType, WalletEventType, WalletFilterTypes, WalletProviderName, WidgetTheme, WidgetType };
31163
+ export { BridgeEventType, ChainId, ChainName, ChainSlug, Checkout, CheckoutConfiguration, CheckoutErrorType, CheckoutStatus, ConnectEventType, ConnectTargetLayer, ExchangeType, FeeType, FundingStepType, GasEstimateType, GasTokenType, IMMUTABLE_API_BASE_URL, IMTBLWidgetEvents, ItemType, NetworkFilterTypes, OnRampEventType, OrchestrationEventType, ProviderEventType, RoutingOutcomeType, SaleEventType, SalePaymentTypes, SwapEventType, TokenFilterTypes, TransactionOrGasType, WalletEventType, WalletFilterTypes, WalletProviderName, WidgetTheme, WidgetType };
@@ -17,7 +17,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
17
17
  chainID,
18
18
  coreContractAddress,
19
19
  registrationContractAddress,
20
- sdkVersion: 'ts-immutable-sdk-0.42.0',
20
+ sdkVersion: 'ts-immutable-sdk-0.43.0',
21
21
  });
22
22
  /**
23
23
  * Sets `sdkVersion` at the time of build