@imtbl/sdk 0.41.2 → 0.42.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.
@@ -2679,7 +2679,7 @@ const PassportApiAxiosParamCreator = function (configuration) {
2679
2679
  },
2680
2680
  /**
2681
2681
  * Create a counterfactual address for a user based on their Ethereum address
2682
- * @summary Create a counterfactual address
2682
+ * @summary Deprecated Create a counterfactual address
2683
2683
  * @param {CreateCounterfactualAddressRequestDeprecated} createCounterfactualAddressRequestDeprecated
2684
2684
  * @param {*} [options] Override http request option.
2685
2685
  * @throws {RequiredError}
@@ -2710,6 +2710,43 @@ const PassportApiAxiosParamCreator = function (configuration) {
2710
2710
  options: localVarRequestOptions,
2711
2711
  };
2712
2712
  },
2713
+ /**
2714
+ * Create a counterfactual address for a user based on their Ethereum address
2715
+ * @summary Create a counterfactual address v2
2716
+ * @param {string} chainName
2717
+ * @param {CreateCounterfactualAddressRequest} createCounterfactualAddressRequest
2718
+ * @param {*} [options] Override http request option.
2719
+ * @throws {RequiredError}
2720
+ */
2721
+ createCounterfactualAddressV2: async (chainName, createCounterfactualAddressRequest, options = {}) => {
2722
+ // verify required parameter 'chainName' is not null or undefined
2723
+ assertParamExists('createCounterfactualAddressV2', 'chainName', chainName);
2724
+ // verify required parameter 'createCounterfactualAddressRequest' is not null or undefined
2725
+ assertParamExists('createCounterfactualAddressV2', 'createCounterfactualAddressRequest', createCounterfactualAddressRequest);
2726
+ const localVarPath = `/v2/chains/{chain_name}/passport/counterfactual-address`
2727
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
2728
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2729
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2730
+ let baseOptions;
2731
+ if (configuration) {
2732
+ baseOptions = configuration.baseOptions;
2733
+ }
2734
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2735
+ const localVarHeaderParameter = {};
2736
+ const localVarQueryParameter = {};
2737
+ // authentication BearerAuth required
2738
+ // http bearer authentication required
2739
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
2740
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2741
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2742
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2743
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2744
+ localVarRequestOptions.data = serializeDataIfNeeded(createCounterfactualAddressRequest, localVarRequestOptions, configuration);
2745
+ return {
2746
+ url: toPathString(localVarUrlObj),
2747
+ options: localVarRequestOptions,
2748
+ };
2749
+ },
2713
2750
  /**
2714
2751
  * Get a contract abi by contract address and method id
2715
2752
  * @summary Get a contract abi
@@ -2792,7 +2829,7 @@ const PassportApiAxiosParamCreator = function (configuration) {
2792
2829
  },
2793
2830
  /**
2794
2831
  * Get all the Ethereum linked addresses for a user based on its userId
2795
- * @summary Get Ethereum linked addresses for a user
2832
+ * @summary Deprecated Get Ethereum linked addresses for a user
2796
2833
  * @param {string} userId The user\'s userId
2797
2834
  * @param {*} [options] Override http request option.
2798
2835
  * @throws {RequiredError}
@@ -2845,7 +2882,7 @@ const PassportApiFp = function (configuration) {
2845
2882
  },
2846
2883
  /**
2847
2884
  * Create a counterfactual address for a user based on their Ethereum address
2848
- * @summary Create a counterfactual address
2885
+ * @summary Deprecated Create a counterfactual address
2849
2886
  * @param {CreateCounterfactualAddressRequestDeprecated} createCounterfactualAddressRequestDeprecated
2850
2887
  * @param {*} [options] Override http request option.
2851
2888
  * @throws {RequiredError}
@@ -2854,6 +2891,18 @@ const PassportApiFp = function (configuration) {
2854
2891
  const localVarAxiosArgs = await localVarAxiosParamCreator.createCounterfactualAddressDeprecated(createCounterfactualAddressRequestDeprecated, options);
2855
2892
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2856
2893
  },
2894
+ /**
2895
+ * Create a counterfactual address for a user based on their Ethereum address
2896
+ * @summary Create a counterfactual address v2
2897
+ * @param {string} chainName
2898
+ * @param {CreateCounterfactualAddressRequest} createCounterfactualAddressRequest
2899
+ * @param {*} [options] Override http request option.
2900
+ * @throws {RequiredError}
2901
+ */
2902
+ async createCounterfactualAddressV2(chainName, createCounterfactualAddressRequest, options) {
2903
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createCounterfactualAddressV2(chainName, createCounterfactualAddressRequest, options);
2904
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2905
+ },
2857
2906
  /**
2858
2907
  * Get a contract abi by contract address and method id
2859
2908
  * @summary Get a contract abi
@@ -2881,7 +2930,7 @@ const PassportApiFp = function (configuration) {
2881
2930
  },
2882
2931
  /**
2883
2932
  * Get all the Ethereum linked addresses for a user based on its userId
2884
- * @summary Get Ethereum linked addresses for a user
2933
+ * @summary Deprecated Get Ethereum linked addresses for a user
2885
2934
  * @param {string} userId The user\'s userId
2886
2935
  * @param {*} [options] Override http request option.
2887
2936
  * @throws {RequiredError}
@@ -2911,7 +2960,7 @@ const PassportApiFactory = function (configuration, basePath, axios) {
2911
2960
  },
2912
2961
  /**
2913
2962
  * Create a counterfactual address for a user based on their Ethereum address
2914
- * @summary Create a counterfactual address
2963
+ * @summary Deprecated Create a counterfactual address
2915
2964
  * @param {PassportApiCreateCounterfactualAddressDeprecatedRequest} requestParameters Request parameters.
2916
2965
  * @param {*} [options] Override http request option.
2917
2966
  * @throws {RequiredError}
@@ -2919,6 +2968,16 @@ const PassportApiFactory = function (configuration, basePath, axios) {
2919
2968
  createCounterfactualAddressDeprecated(requestParameters, options) {
2920
2969
  return localVarFp.createCounterfactualAddressDeprecated(requestParameters.createCounterfactualAddressRequestDeprecated, options).then((request) => request(axios, basePath));
2921
2970
  },
2971
+ /**
2972
+ * Create a counterfactual address for a user based on their Ethereum address
2973
+ * @summary Create a counterfactual address v2
2974
+ * @param {PassportApiCreateCounterfactualAddressV2Request} requestParameters Request parameters.
2975
+ * @param {*} [options] Override http request option.
2976
+ * @throws {RequiredError}
2977
+ */
2978
+ createCounterfactualAddressV2(requestParameters, options) {
2979
+ return localVarFp.createCounterfactualAddressV2(requestParameters.chainName, requestParameters.createCounterfactualAddressRequest, options).then((request) => request(axios, basePath));
2980
+ },
2922
2981
  /**
2923
2982
  * Get a contract abi by contract address and method id
2924
2983
  * @summary Get a contract abi
@@ -2941,7 +3000,7 @@ const PassportApiFactory = function (configuration, basePath, axios) {
2941
3000
  },
2942
3001
  /**
2943
3002
  * Get all the Ethereum linked addresses for a user based on its userId
2944
- * @summary Get Ethereum linked addresses for a user
3003
+ * @summary Deprecated Get Ethereum linked addresses for a user
2945
3004
  * @param {PassportApiGetLinkedAddressesDeprecatedRequest} requestParameters Request parameters.
2946
3005
  * @param {*} [options] Override http request option.
2947
3006
  * @throws {RequiredError}
@@ -2971,7 +3030,7 @@ class PassportApi extends BaseAPI {
2971
3030
  }
2972
3031
  /**
2973
3032
  * Create a counterfactual address for a user based on their Ethereum address
2974
- * @summary Create a counterfactual address
3033
+ * @summary Deprecated Create a counterfactual address
2975
3034
  * @param {PassportApiCreateCounterfactualAddressDeprecatedRequest} requestParameters Request parameters.
2976
3035
  * @param {*} [options] Override http request option.
2977
3036
  * @throws {RequiredError}
@@ -2980,6 +3039,17 @@ class PassportApi extends BaseAPI {
2980
3039
  createCounterfactualAddressDeprecated(requestParameters, options) {
2981
3040
  return PassportApiFp(this.configuration).createCounterfactualAddressDeprecated(requestParameters.createCounterfactualAddressRequestDeprecated, options).then((request) => request(this.axios, this.basePath));
2982
3041
  }
3042
+ /**
3043
+ * Create a counterfactual address for a user based on their Ethereum address
3044
+ * @summary Create a counterfactual address v2
3045
+ * @param {PassportApiCreateCounterfactualAddressV2Request} requestParameters Request parameters.
3046
+ * @param {*} [options] Override http request option.
3047
+ * @throws {RequiredError}
3048
+ * @memberof PassportApi
3049
+ */
3050
+ createCounterfactualAddressV2(requestParameters, options) {
3051
+ return PassportApiFp(this.configuration).createCounterfactualAddressV2(requestParameters.chainName, requestParameters.createCounterfactualAddressRequest, options).then((request) => request(this.axios, this.basePath));
3052
+ }
2983
3053
  /**
2984
3054
  * Get a contract abi by contract address and method id
2985
3055
  * @summary Get a contract abi
@@ -3004,7 +3074,7 @@ class PassportApi extends BaseAPI {
3004
3074
  }
3005
3075
  /**
3006
3076
  * Get all the Ethereum linked addresses for a user based on its userId
3007
- * @summary Get Ethereum linked addresses for a user
3077
+ * @summary Deprecated Get Ethereum linked addresses for a user
3008
3078
  * @param {PassportApiGetLinkedAddressesDeprecatedRequest} requestParameters Request parameters.
3009
3079
  * @param {*} [options] Override http request option.
3010
3080
  * @throws {RequiredError}
@@ -4083,7 +4153,7 @@ class APIError extends Error {
4083
4153
 
4084
4154
  /* eslint-disable implicit-arrow-linebreak */
4085
4155
  const defaultHeaders = {
4086
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.41.2',
4156
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.42.0',
4087
4157
  };
4088
4158
  /**
4089
4159
  * createAPIConfiguration to create a custom Configuration