@imtbl/sdk 0.41.2 → 0.42.1

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.
@@ -10482,10 +10482,6 @@ type UserProfile = {
10482
10482
  nickname?: string;
10483
10483
  sub: string;
10484
10484
  };
10485
- declare enum Networks {
10486
- PRODUCTION = "mainnet",
10487
- SANDBOX = "sepolia"
10488
- }
10489
10485
  interface OidcConfiguration {
10490
10486
  clientId: string;
10491
10487
  logoutRedirectUri?: string;
@@ -10495,7 +10491,6 @@ interface OidcConfiguration {
10495
10491
  audience?: string;
10496
10492
  }
10497
10493
  interface PassportOverrides {
10498
- network: Networks;
10499
10494
  authenticationDomain: string;
10500
10495
  magicPublishableApiKey: string;
10501
10496
  magicProviderId: string;
@@ -12699,13 +12694,16 @@ declare enum SaleEventType {
12699
12694
  FAILURE = "failure",
12700
12695
  REJECTED = "rejected",
12701
12696
  TRANSACTION_SUCCESS = "transaction-success",
12702
- LANGUAGE_CHANGED = "language-changed"
12697
+ LANGUAGE_CHANGED = "language-changed",
12698
+ PAYMENT_METHOD = "payment-method"
12703
12699
  }
12704
12700
  /**
12705
12701
  * Represents a successful Sale transaction.
12706
12702
  * @property {Array} transactions -
12707
12703
  */
12708
12704
  type SaleSuccess = {
12705
+ /** Chosen payment method */
12706
+ paymentMethod: string | undefined;
12709
12707
  /** The executed transactions */
12710
12708
  transactions: {
12711
12709
  method: string;
@@ -12724,6 +12722,8 @@ type SaleFailed = {
12724
12722
  reason: string;
12725
12723
  /** The timestamp of the failed swap. */
12726
12724
  timestamp: number;
12725
+ /** Chosen payment method */
12726
+ paymentMethod: string | undefined;
12727
12727
  /** The executed transactions */
12728
12728
  transactions: {
12729
12729
  method: string;
@@ -12735,12 +12735,21 @@ type SaleFailed = {
12735
12735
  * @property {Object} transactions
12736
12736
  */
12737
12737
  type SaleTransactionSuccess = {
12738
+ paymentMethod: string | undefined;
12738
12739
  /** The executed transactions */
12739
12740
  transactions: {
12740
12741
  method: string;
12741
12742
  hash: string | undefined;
12742
12743
  }[];
12743
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: string | undefined;
12752
+ };
12744
12753
 
12745
12754
  /**
12746
12755
  * Enum of possible Bridge Widget event types.
@@ -13072,6 +13081,7 @@ type WidgetEventData = {
13072
13081
  [SaleEventType.REJECTED]: any;
13073
13082
  [SaleEventType.CLOSE_WIDGET]: {};
13074
13083
  [SaleEventType.TRANSACTION_SUCCESS]: SaleTransactionSuccess;
13084
+ [SaleEventType.PAYMENT_METHOD]: SalePaymentMethod;
13075
13085
  } & OrchestrationMapping & ProviderEventMapping;
13076
13086
  };
13077
13087
  /**
@@ -13495,4 +13505,4 @@ type ErrorType = {
13495
13505
  };
13496
13506
  };
13497
13507
 
13498
- 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 };
13508
+ 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, 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
@@ -24581,7 +24581,7 @@ const PassportApiAxiosParamCreator = function (configuration) {
24581
24581
  },
24582
24582
  /**
24583
24583
  * Create a counterfactual address for a user based on their Ethereum address
24584
- * @summary Create a counterfactual address
24584
+ * @summary Deprecated Create a counterfactual address
24585
24585
  * @param {CreateCounterfactualAddressRequestDeprecated} createCounterfactualAddressRequestDeprecated
24586
24586
  * @param {*} [options] Override http request option.
24587
24587
  * @throws {RequiredError}
@@ -24612,6 +24612,43 @@ const PassportApiAxiosParamCreator = function (configuration) {
24612
24612
  options: localVarRequestOptions,
24613
24613
  };
24614
24614
  },
24615
+ /**
24616
+ * Create a counterfactual address for a user based on their Ethereum address
24617
+ * @summary Create a counterfactual address v2
24618
+ * @param {string} chainName
24619
+ * @param {CreateCounterfactualAddressRequest} createCounterfactualAddressRequest
24620
+ * @param {*} [options] Override http request option.
24621
+ * @throws {RequiredError}
24622
+ */
24623
+ createCounterfactualAddressV2: async (chainName, createCounterfactualAddressRequest, options = {}) => {
24624
+ // verify required parameter 'chainName' is not null or undefined
24625
+ assertParamExists('createCounterfactualAddressV2', 'chainName', chainName);
24626
+ // verify required parameter 'createCounterfactualAddressRequest' is not null or undefined
24627
+ assertParamExists('createCounterfactualAddressV2', 'createCounterfactualAddressRequest', createCounterfactualAddressRequest);
24628
+ const localVarPath = `/v2/chains/{chain_name}/passport/counterfactual-address`
24629
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
24630
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
24631
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
24632
+ let baseOptions;
24633
+ if (configuration) {
24634
+ baseOptions = configuration.baseOptions;
24635
+ }
24636
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
24637
+ const localVarHeaderParameter = {};
24638
+ const localVarQueryParameter = {};
24639
+ // authentication BearerAuth required
24640
+ // http bearer authentication required
24641
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
24642
+ localVarHeaderParameter['Content-Type'] = 'application/json';
24643
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
24644
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
24645
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
24646
+ localVarRequestOptions.data = serializeDataIfNeeded(createCounterfactualAddressRequest, localVarRequestOptions, configuration);
24647
+ return {
24648
+ url: toPathString(localVarUrlObj),
24649
+ options: localVarRequestOptions,
24650
+ };
24651
+ },
24615
24652
  /**
24616
24653
  * Get a contract abi by contract address and method id
24617
24654
  * @summary Get a contract abi
@@ -24694,7 +24731,7 @@ const PassportApiAxiosParamCreator = function (configuration) {
24694
24731
  },
24695
24732
  /**
24696
24733
  * Get all the Ethereum linked addresses for a user based on its userId
24697
- * @summary Get Ethereum linked addresses for a user
24734
+ * @summary Deprecated Get Ethereum linked addresses for a user
24698
24735
  * @param {string} userId The user\'s userId
24699
24736
  * @param {*} [options] Override http request option.
24700
24737
  * @throws {RequiredError}
@@ -24747,7 +24784,7 @@ const PassportApiFp = function (configuration) {
24747
24784
  },
24748
24785
  /**
24749
24786
  * Create a counterfactual address for a user based on their Ethereum address
24750
- * @summary Create a counterfactual address
24787
+ * @summary Deprecated Create a counterfactual address
24751
24788
  * @param {CreateCounterfactualAddressRequestDeprecated} createCounterfactualAddressRequestDeprecated
24752
24789
  * @param {*} [options] Override http request option.
24753
24790
  * @throws {RequiredError}
@@ -24756,6 +24793,18 @@ const PassportApiFp = function (configuration) {
24756
24793
  const localVarAxiosArgs = await localVarAxiosParamCreator.createCounterfactualAddressDeprecated(createCounterfactualAddressRequestDeprecated, options);
24757
24794
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
24758
24795
  },
24796
+ /**
24797
+ * Create a counterfactual address for a user based on their Ethereum address
24798
+ * @summary Create a counterfactual address v2
24799
+ * @param {string} chainName
24800
+ * @param {CreateCounterfactualAddressRequest} createCounterfactualAddressRequest
24801
+ * @param {*} [options] Override http request option.
24802
+ * @throws {RequiredError}
24803
+ */
24804
+ async createCounterfactualAddressV2(chainName, createCounterfactualAddressRequest, options) {
24805
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createCounterfactualAddressV2(chainName, createCounterfactualAddressRequest, options);
24806
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
24807
+ },
24759
24808
  /**
24760
24809
  * Get a contract abi by contract address and method id
24761
24810
  * @summary Get a contract abi
@@ -24783,7 +24832,7 @@ const PassportApiFp = function (configuration) {
24783
24832
  },
24784
24833
  /**
24785
24834
  * Get all the Ethereum linked addresses for a user based on its userId
24786
- * @summary Get Ethereum linked addresses for a user
24835
+ * @summary Deprecated Get Ethereum linked addresses for a user
24787
24836
  * @param {string} userId The user\'s userId
24788
24837
  * @param {*} [options] Override http request option.
24789
24838
  * @throws {RequiredError}
@@ -24813,7 +24862,7 @@ const PassportApiFactory = function (configuration, basePath, axios) {
24813
24862
  },
24814
24863
  /**
24815
24864
  * Create a counterfactual address for a user based on their Ethereum address
24816
- * @summary Create a counterfactual address
24865
+ * @summary Deprecated Create a counterfactual address
24817
24866
  * @param {PassportApiCreateCounterfactualAddressDeprecatedRequest} requestParameters Request parameters.
24818
24867
  * @param {*} [options] Override http request option.
24819
24868
  * @throws {RequiredError}
@@ -24821,6 +24870,16 @@ const PassportApiFactory = function (configuration, basePath, axios) {
24821
24870
  createCounterfactualAddressDeprecated(requestParameters, options) {
24822
24871
  return localVarFp.createCounterfactualAddressDeprecated(requestParameters.createCounterfactualAddressRequestDeprecated, options).then((request) => request(axios, basePath));
24823
24872
  },
24873
+ /**
24874
+ * Create a counterfactual address for a user based on their Ethereum address
24875
+ * @summary Create a counterfactual address v2
24876
+ * @param {PassportApiCreateCounterfactualAddressV2Request} requestParameters Request parameters.
24877
+ * @param {*} [options] Override http request option.
24878
+ * @throws {RequiredError}
24879
+ */
24880
+ createCounterfactualAddressV2(requestParameters, options) {
24881
+ return localVarFp.createCounterfactualAddressV2(requestParameters.chainName, requestParameters.createCounterfactualAddressRequest, options).then((request) => request(axios, basePath));
24882
+ },
24824
24883
  /**
24825
24884
  * Get a contract abi by contract address and method id
24826
24885
  * @summary Get a contract abi
@@ -24843,7 +24902,7 @@ const PassportApiFactory = function (configuration, basePath, axios) {
24843
24902
  },
24844
24903
  /**
24845
24904
  * Get all the Ethereum linked addresses for a user based on its userId
24846
- * @summary Get Ethereum linked addresses for a user
24905
+ * @summary Deprecated Get Ethereum linked addresses for a user
24847
24906
  * @param {PassportApiGetLinkedAddressesDeprecatedRequest} requestParameters Request parameters.
24848
24907
  * @param {*} [options] Override http request option.
24849
24908
  * @throws {RequiredError}
@@ -24873,7 +24932,7 @@ class PassportApi extends BaseAPI {
24873
24932
  }
24874
24933
  /**
24875
24934
  * Create a counterfactual address for a user based on their Ethereum address
24876
- * @summary Create a counterfactual address
24935
+ * @summary Deprecated Create a counterfactual address
24877
24936
  * @param {PassportApiCreateCounterfactualAddressDeprecatedRequest} requestParameters Request parameters.
24878
24937
  * @param {*} [options] Override http request option.
24879
24938
  * @throws {RequiredError}
@@ -24882,6 +24941,17 @@ class PassportApi extends BaseAPI {
24882
24941
  createCounterfactualAddressDeprecated(requestParameters, options) {
24883
24942
  return PassportApiFp(this.configuration).createCounterfactualAddressDeprecated(requestParameters.createCounterfactualAddressRequestDeprecated, options).then((request) => request(this.axios, this.basePath));
24884
24943
  }
24944
+ /**
24945
+ * Create a counterfactual address for a user based on their Ethereum address
24946
+ * @summary Create a counterfactual address v2
24947
+ * @param {PassportApiCreateCounterfactualAddressV2Request} requestParameters Request parameters.
24948
+ * @param {*} [options] Override http request option.
24949
+ * @throws {RequiredError}
24950
+ * @memberof PassportApi
24951
+ */
24952
+ createCounterfactualAddressV2(requestParameters, options) {
24953
+ return PassportApiFp(this.configuration).createCounterfactualAddressV2(requestParameters.chainName, requestParameters.createCounterfactualAddressRequest, options).then((request) => request(this.axios, this.basePath));
24954
+ }
24885
24955
  /**
24886
24956
  * Get a contract abi by contract address and method id
24887
24957
  * @summary Get a contract abi
@@ -24906,7 +24976,7 @@ class PassportApi extends BaseAPI {
24906
24976
  }
24907
24977
  /**
24908
24978
  * Get all the Ethereum linked addresses for a user based on its userId
24909
- * @summary Get Ethereum linked addresses for a user
24979
+ * @summary Deprecated Get Ethereum linked addresses for a user
24910
24980
  * @param {PassportApiGetLinkedAddressesDeprecatedRequest} requestParameters Request parameters.
24911
24981
  * @param {*} [options] Override http request option.
24912
24982
  * @throws {RequiredError}
@@ -25851,7 +25921,7 @@ class APIError extends Error {
25851
25921
 
25852
25922
  /* eslint-disable implicit-arrow-linebreak */
25853
25923
  const defaultHeaders = {
25854
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.41.2',
25924
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.42.1',
25855
25925
  };
25856
25926
  /**
25857
25927
  * createAPIConfiguration to create a custom Configuration
@@ -26334,6 +26404,7 @@ var SaleEventType;
26334
26404
  SaleEventType["REJECTED"] = "rejected";
26335
26405
  SaleEventType["TRANSACTION_SUCCESS"] = "transaction-success";
26336
26406
  SaleEventType["LANGUAGE_CHANGED"] = "language-changed";
26407
+ SaleEventType["PAYMENT_METHOD"] = "payment-method";
26337
26408
  })(SaleEventType || (SaleEventType = {}));
26338
26409
 
26339
26410
  /**
@@ -27201,7 +27272,7 @@ const GAS_OVERRIDES = {
27201
27272
  maxPriorityFeePerGas: BigNumber$1.from(101e9),
27202
27273
  };
27203
27274
 
27204
- const SDK_VERSION_MARKER = '0.41.2';
27275
+ const SDK_VERSION_MARKER = '0.42.1';
27205
27276
  // This SDK version is replaced by the `yarn build` command ran on the root level
27206
27277
  const globalPackageVersion = () => SDK_VERSION_MARKER;
27207
27278
 
@@ -17,7 +17,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
17
17
  chainID,
18
18
  coreContractAddress,
19
19
  registrationContractAddress,
20
- sdkVersion: 'ts-immutable-sdk-0.41.2',
20
+ sdkVersion: 'ts-immutable-sdk-0.42.1',
21
21
  });
22
22
  /**
23
23
  * Sets `sdkVersion` at the time of build