@imtbl/sdk 0.36.1 → 0.36.2

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/dist/index.cjs CHANGED
@@ -4256,7 +4256,7 @@ class MultiRollupApiClients {
4256
4256
  }
4257
4257
 
4258
4258
  // eslint-disable-next-line @typescript-eslint/naming-convention
4259
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.36.1' };
4259
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.36.2' };
4260
4260
  const createConfig = ({ basePath, headers, }) => {
4261
4261
  if (!basePath.trim()) {
4262
4262
  throw Error('basePath can not be empty');
@@ -4316,7 +4316,7 @@ class APIError extends Error {
4316
4316
 
4317
4317
  /* eslint-disable implicit-arrow-linebreak */
4318
4318
  const defaultHeaders = {
4319
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.36.1',
4319
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.36.2',
4320
4320
  };
4321
4321
  /**
4322
4322
  * createAPIConfiguration to create a custom Configuration
@@ -4755,7 +4755,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
4755
4755
  chainID,
4756
4756
  coreContractAddress,
4757
4757
  registrationContractAddress,
4758
- sdkVersion: 'ts-immutable-sdk-0.36.1',
4758
+ sdkVersion: 'ts-immutable-sdk-0.36.2',
4759
4759
  });
4760
4760
  /**
4761
4761
  * Sets `sdkVersion` at the time of build
@@ -35380,7 +35380,7 @@ const GAS_OVERRIDES = {
35380
35380
  maxPriorityFeePerGas: ethers.BigNumber.from(101e9),
35381
35381
  };
35382
35382
 
35383
- const SDK_VERSION_MARKER = '0.36.1';
35383
+ const SDK_VERSION_MARKER = '0.36.2';
35384
35384
  // This SDK version is replaced by the `yarn build` command ran on the root level
35385
35385
  const globalPackageVersion = () => SDK_VERSION_MARKER;
35386
35386
 
@@ -35707,9 +35707,9 @@ const getBalance = async (config, web3Provider, walletAddress) => await withChec
35707
35707
  token: networkInfo.nativeCurrency,
35708
35708
  };
35709
35709
  }, { type: CheckoutErrorType.GET_BALANCE_ERROR });
35710
- async function getERC20Balance(web3Provider, walletAddress, contractAddress) {
35710
+ async function getERC20Balance(web3Provider, walletAddress, tokenAddress) {
35711
35711
  return await withCheckoutError(async () => {
35712
- const contract = new ethers.Contract(contractAddress, JSON.stringify(ERC20ABI), web3Provider);
35712
+ const contract = new ethers.Contract(tokenAddress, JSON.stringify(ERC20ABI), web3Provider);
35713
35713
  return Promise.all([
35714
35714
  contract.name(),
35715
35715
  contract.symbol(),
@@ -35725,7 +35725,7 @@ async function getERC20Balance(web3Provider, walletAddress, contractAddress) {
35725
35725
  name,
35726
35726
  symbol,
35727
35727
  decimals,
35728
- address: contractAddress,
35728
+ address: tokenAddress,
35729
35729
  },
35730
35730
  };
35731
35731
  });
@@ -38937,10 +38937,10 @@ class Checkout {
38937
38937
  */
38938
38938
  async getBalance(params) {
38939
38939
  const web3Provider = await validateProvider(this.config, params.provider);
38940
- if (!params.contractAddress || params.contractAddress === '') {
38940
+ if (!params.tokenAddress || params.tokenAddress === '') {
38941
38941
  return await getBalance(this.config, web3Provider, params.walletAddress);
38942
38942
  }
38943
- return await getERC20Balance(web3Provider, params.walletAddress, params.contractAddress);
38943
+ return await getERC20Balance(web3Provider, params.walletAddress, params.tokenAddress);
38944
38944
  }
38945
38945
  /**
38946
38946
  * Retrieves the balances of all tokens for a given wallet address on a specific chain.
package/dist/index.d.ts CHANGED
@@ -16529,12 +16529,12 @@ interface TokenInfo {
16529
16529
  * Interface representing the parameters for {@link Checkout.getBalance}.
16530
16530
  * @property {Web3Provider} provider - The provider used to get the balance.
16531
16531
  * @property {string} walletAddress - The wallet address.
16532
- * @property {string | undefined} contractAddress - The contract address of the token.
16532
+ * @property {string | undefined} tokenAddress - The contract address of the token.
16533
16533
  */
16534
16534
  interface GetBalanceParams {
16535
16535
  provider: Web3Provider;
16536
16536
  walletAddress: string;
16537
- contractAddress?: string;
16537
+ tokenAddress?: string;
16538
16538
  }
16539
16539
  /**
16540
16540
  * Interface representing the result of {@link Checkout.getBalance}.
@@ -18203,13 +18203,13 @@ type ConnectWidgetParams = {};
18203
18203
 
18204
18204
  /**
18205
18205
  * Bridge Widget parameters
18206
- * @property {string | undefined} contractAddress
18206
+ * @property {string | undefined} tokenAddress
18207
18207
  * @property {string | undefined} amount
18208
18208
  * @property {WalletProviderName | undefined} walletProviderName
18209
18209
  */
18210
18210
  type BridgeWidgetParams = {
18211
18211
  /** The contract address of the token to bridge from, used to populate the bridge form token field */
18212
- contractAddress?: string;
18212
+ tokenAddress?: string;
18213
18213
  /** The formatted amount to bridge, used to populate the bridge form amount field */
18214
18214
  amount?: string;
18215
18215
  /** The wallet provider name to use for the bridge widget */
@@ -18228,30 +18228,30 @@ type WalletWidgetParams = {
18228
18228
  /**
18229
18229
  * Swap Widget parameters
18230
18230
  * @property {string | undefined} amount
18231
- * @property {string | undefined} fromContractAddress
18232
- * @property {string | undefined} toContractAddress
18231
+ * @property {string | undefined} fromTokenAddress
18232
+ * @property {string | undefined} toTokenAddress
18233
18233
  * @property {WalletProviderName | undefined} walletProviderName
18234
18234
  */
18235
18235
  type SwapWidgetParams = {
18236
18236
  /** The formatted amount to swap, used to populate the swap from amount field */
18237
18237
  amount?: string;
18238
18238
  /** The contract address of the token to swap from */
18239
- fromContractAddress?: string;
18239
+ fromTokenAddress?: string;
18240
18240
  /** The contract address of the token to swap to */
18241
- toContractAddress?: string;
18241
+ toTokenAddress?: string;
18242
18242
  /** The wallet provider name to use for the swap widget */
18243
18243
  walletProviderName?: WalletProviderName;
18244
18244
  };
18245
18245
 
18246
18246
  /**
18247
18247
  * OnRamp Widget parameters
18248
- * @property {string | undefined} contractAddress
18248
+ * @property {string | undefined} tokenAddress
18249
18249
  * @property {string | undefined} amount
18250
18250
  * @property {WalletProviderName | undefined} walletProviderName
18251
18251
  */
18252
18252
  type OnRampWidgetParams = {
18253
18253
  /** The contract address of the token to onramp */
18254
- contractAddress?: string;
18254
+ tokenAddress?: string;
18255
18255
  /** The formatted amount to onramp, used to populate the onramp form amount field */
18256
18256
  amount?: string;
18257
18257
  /** The wallet provider name to use for the onramp widget */
@@ -18262,7 +18262,7 @@ type OnRampWidgetParams = {
18262
18262
  * Sale Widget parameters
18263
18263
  * @property {string} amount
18264
18264
  * @property {string} environmentId
18265
- * @property {string} fromContractAddress
18265
+ * @property {string} fromTokenAddress
18266
18266
  * @property {SaleItem[]} items
18267
18267
  * @property {WalletProviderName | undefined} walletProviderName
18268
18268
  */
@@ -18270,7 +18270,7 @@ type SaleWidgetParams = {
18270
18270
  /** The total price to pay for the items in the sale */
18271
18271
  amount?: string;
18272
18272
  environmentId?: string;
18273
- fromContractAddress?: string;
18273
+ fromTokenAddress?: string;
18274
18274
  /** The list of products to be purchased */
18275
18275
  items?: SaleItem[];
18276
18276
  /** The wallet provider name to default to if no web3Provider is passed */
package/dist/index.js CHANGED
@@ -4234,7 +4234,7 @@ class MultiRollupApiClients {
4234
4234
  }
4235
4235
 
4236
4236
  // eslint-disable-next-line @typescript-eslint/naming-convention
4237
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.36.1' };
4237
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.36.2' };
4238
4238
  const createConfig = ({ basePath, headers, }) => {
4239
4239
  if (!basePath.trim()) {
4240
4240
  throw Error('basePath can not be empty');
@@ -4294,7 +4294,7 @@ class APIError extends Error {
4294
4294
 
4295
4295
  /* eslint-disable implicit-arrow-linebreak */
4296
4296
  const defaultHeaders = {
4297
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.36.1',
4297
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.36.2',
4298
4298
  };
4299
4299
  /**
4300
4300
  * createAPIConfiguration to create a custom Configuration
@@ -4733,7 +4733,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
4733
4733
  chainID,
4734
4734
  coreContractAddress,
4735
4735
  registrationContractAddress,
4736
- sdkVersion: 'ts-immutable-sdk-0.36.1',
4736
+ sdkVersion: 'ts-immutable-sdk-0.36.2',
4737
4737
  });
4738
4738
  /**
4739
4739
  * Sets `sdkVersion` at the time of build
@@ -35358,7 +35358,7 @@ const GAS_OVERRIDES = {
35358
35358
  maxPriorityFeePerGas: BigNumber$1.from(101e9),
35359
35359
  };
35360
35360
 
35361
- const SDK_VERSION_MARKER = '0.36.1';
35361
+ const SDK_VERSION_MARKER = '0.36.2';
35362
35362
  // This SDK version is replaced by the `yarn build` command ran on the root level
35363
35363
  const globalPackageVersion = () => SDK_VERSION_MARKER;
35364
35364
 
@@ -35685,9 +35685,9 @@ const getBalance = async (config, web3Provider, walletAddress) => await withChec
35685
35685
  token: networkInfo.nativeCurrency,
35686
35686
  };
35687
35687
  }, { type: CheckoutErrorType.GET_BALANCE_ERROR });
35688
- async function getERC20Balance(web3Provider, walletAddress, contractAddress) {
35688
+ async function getERC20Balance(web3Provider, walletAddress, tokenAddress) {
35689
35689
  return await withCheckoutError(async () => {
35690
- const contract = new Contract$1(contractAddress, JSON.stringify(ERC20ABI), web3Provider);
35690
+ const contract = new Contract$1(tokenAddress, JSON.stringify(ERC20ABI), web3Provider);
35691
35691
  return Promise.all([
35692
35692
  contract.name(),
35693
35693
  contract.symbol(),
@@ -35703,7 +35703,7 @@ async function getERC20Balance(web3Provider, walletAddress, contractAddress) {
35703
35703
  name,
35704
35704
  symbol,
35705
35705
  decimals,
35706
- address: contractAddress,
35706
+ address: tokenAddress,
35707
35707
  },
35708
35708
  };
35709
35709
  });
@@ -38915,10 +38915,10 @@ class Checkout {
38915
38915
  */
38916
38916
  async getBalance(params) {
38917
38917
  const web3Provider = await validateProvider(this.config, params.provider);
38918
- if (!params.contractAddress || params.contractAddress === '') {
38918
+ if (!params.tokenAddress || params.tokenAddress === '') {
38919
38919
  return await getBalance(this.config, web3Provider, params.walletAddress);
38920
38920
  }
38921
- return await getERC20Balance(web3Provider, params.walletAddress, params.contractAddress);
38921
+ return await getERC20Balance(web3Provider, params.walletAddress, params.tokenAddress);
38922
38922
  }
38923
38923
  /**
38924
38924
  * Retrieves the balances of all tokens for a given wallet address on a specific chain.
package/dist/passport.js CHANGED
@@ -2349,7 +2349,7 @@ class MultiRollupApiClients {
2349
2349
  }
2350
2350
 
2351
2351
  // eslint-disable-next-line @typescript-eslint/naming-convention
2352
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.36.1' };
2352
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.36.2' };
2353
2353
  const createConfig = ({ basePath, headers, }) => {
2354
2354
  if (!basePath.trim()) {
2355
2355
  throw Error('basePath can not be empty');
@@ -2405,7 +2405,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
2405
2405
  chainID,
2406
2406
  coreContractAddress,
2407
2407
  registrationContractAddress,
2408
- sdkVersion: 'ts-immutable-sdk-0.36.1',
2408
+ sdkVersion: 'ts-immutable-sdk-0.36.2',
2409
2409
  });
2410
2410
  /**
2411
2411
  * Sets `sdkVersion` at the time of build
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imtbl/sdk",
3
3
  "description": "Immutable Unified SDK",
4
- "version": "0.36.1",
4
+ "version": "0.36.2",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",
@@ -9,7 +9,7 @@
9
9
  "@0xsequence/abi": "^1.4.3",
10
10
  "@0xsequence/core": "^1.4.3",
11
11
  "@biom3/design-tokens": "0.2.9",
12
- "@biom3/react": "^0.19.13",
12
+ "@biom3/react": "^0.19.22",
13
13
  "@ethersproject/abi": "^5.7.0",
14
14
  "@ethersproject/abstract-signer": "^5.7.0",
15
15
  "@ethersproject/providers": "^5.7.2",