@imtbl/sdk 1.19.6-alpha → 1.20.0-alpha

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.
Files changed (36) hide show
  1. package/dist/blockchain_data.js +2 -2
  2. package/dist/browser/checkout/{BridgeWidget-24521d11.js → BridgeWidget-312cb2c2.js} +1 -1
  3. package/dist/browser/checkout/{HorizontalMenu-actual-6612c0c3.js → HorizontalMenu-actual-4dbb5c81.js} +1 -1
  4. package/dist/browser/checkout/{OnRampWidget-d264f707.js → OnRampWidget-1340f0cc.js} +1 -1
  5. package/dist/browser/checkout/SaleWidget-be034e41.js +2 -0
  6. package/dist/browser/checkout/{SpendingCapHero-0db6d7ed.js → SpendingCapHero-39ee51d6.js} +1 -1
  7. package/dist/browser/checkout/{SwapWidget-2c06420c.js → SwapWidget-e092d01c.js} +1 -1
  8. package/dist/browser/checkout/{TopUpView-d9658bbd.js → TopUpView-6e32a129.js} +1 -1
  9. package/dist/browser/checkout/{WalletWidget-43fb112d.js → WalletWidget-abb75fc8.js} +1 -1
  10. package/dist/browser/checkout/{auto-track-a398bcd2.js → auto-track-0ac33efe.js} +1 -1
  11. package/dist/browser/checkout/{balance-124a9c3c.js → balance-713e469c.js} +1 -1
  12. package/dist/browser/checkout/{index-5327f330.js → index-2d9d6340.js} +1 -1
  13. package/dist/browser/checkout/{index-dcf79a29.js → index-4f810b18.js} +1 -1
  14. package/dist/browser/checkout/{index-384fe7dd.js → index-63dc0a81.js} +1 -1
  15. package/dist/browser/checkout/{index-80d8482d.js → index-a8a9e072.js} +2 -2
  16. package/dist/browser/checkout/{index-e22be227.js → index-ad4dc41d.js} +1 -1
  17. package/dist/browser/checkout/{index-bc84abbd.js → index-ceb8406f.js} +1 -1
  18. package/dist/browser/checkout/{index-6e2b798d.js → index-d2f39097.js} +1 -1
  19. package/dist/browser/checkout/index-e0acfcc2.js +1 -0
  20. package/dist/browser/checkout/{index.umd-4fe7c784.js → index.umd-74591847.js} +1 -1
  21. package/dist/browser/checkout/{retry-21d3107e.js → retry-5e0ff99b.js} +1 -1
  22. package/dist/browser/checkout/sdk.js +4 -4
  23. package/dist/browser/checkout/widgets-esm.js +1 -1
  24. package/dist/browser/checkout/widgets.js +4 -4
  25. package/dist/checkout.js +41 -31
  26. package/dist/config.js +1 -1
  27. package/dist/index.browser.js +11 -11
  28. package/dist/index.browser.js.map +1 -1
  29. package/dist/index.cjs +46 -42
  30. package/dist/index.js +47 -42
  31. package/dist/orderbook.js +1 -1
  32. package/dist/passport.js +7 -12
  33. package/dist/x.js +6 -11
  34. package/package.json +1 -1
  35. package/dist/browser/checkout/SaleWidget-82dbc082.js +0 -2
  36. package/dist/browser/checkout/index-9ed7d230.js +0 -1
package/dist/index.cjs CHANGED
@@ -52,7 +52,6 @@ function _interopNamespaceDefault(e) {
52
52
  }
53
53
 
54
54
  var encUtils__namespace = /*#__PURE__*/_interopNamespaceDefault(encUtils);
55
- var elliptic__namespace = /*#__PURE__*/_interopNamespaceDefault(elliptic);
56
55
  var crypto__namespace = /*#__PURE__*/_interopNamespaceDefault(crypto);
57
56
  var Uniswap__namespace = /*#__PURE__*/_interopNamespaceDefault(Uniswap);
58
57
 
@@ -182,7 +181,7 @@ const flattenProperties$1 = (properties) => {
182
181
  };
183
182
 
184
183
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
185
- const SDK_VERSION$1 = '1.19.6-alpha';
184
+ const SDK_VERSION$1 = '1.20.0-alpha';
186
185
  const getReferrer$1 = () => {
187
186
  if (isNode$1()) {
188
187
  return '';
@@ -13558,7 +13557,7 @@ class MultiRollupApiClients {
13558
13557
  }
13559
13558
 
13560
13559
  // eslint-disable-next-line @typescript-eslint/naming-convention
13561
- const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.19.6-alpha' };
13560
+ const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.20.0-alpha' };
13562
13561
  const createConfig$1 = ({ basePath, headers, }) => {
13563
13562
  if (!basePath.trim()) {
13564
13563
  throw Error('basePath can not be empty');
@@ -13630,7 +13629,7 @@ class APIError extends Error {
13630
13629
 
13631
13630
  /* eslint-disable implicit-arrow-linebreak */
13632
13631
  const defaultHeaders$1 = {
13633
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.19.6-alpha',
13632
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.20.0-alpha',
13634
13633
  };
13635
13634
  /**
13636
13635
  * createAPIConfiguration to create a custom Configuration
@@ -14104,7 +14103,7 @@ var blockchain_data = /*#__PURE__*/Object.freeze({
14104
14103
  /* eslint-disable @typescript-eslint/naming-convention */
14105
14104
  class ApiConfiguration extends index$2.Configuration {
14106
14105
  }
14107
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.19.6-alpha' };
14106
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.20.0-alpha' };
14108
14107
  /**
14109
14108
  * @dev use createImmutableXConfiguration instead
14110
14109
  */
@@ -14143,7 +14142,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
14143
14142
  chainID,
14144
14143
  coreContractAddress,
14145
14144
  registrationContractAddress,
14146
- sdkVersion: 'ts-immutable-sdk-1.19.6-alpha',
14145
+ sdkVersion: 'ts-immutable-sdk-1.20.0-alpha',
14147
14146
  baseConfig,
14148
14147
  });
14149
14148
  const production = ({ baseConfig }) => createImmutableXConfiguration({
@@ -16355,10 +16354,7 @@ const DEFAULT_ACCOUNT_APPLICATION = 'immutablex';
16355
16354
  const DEFAULT_ACCOUNT_INDEX = '1';
16356
16355
  const prime = new BN$2('800000000000011000000000000000000000000000000000000000000000001', 16);
16357
16356
  const order = new BN$2('08000000 00000010 ffffffff ffffffff b781126d cae7b232 1e66a241 adc64d2f', 16);
16358
- // eslint-disable-next-line @typescript-eslint/naming-convention
16359
- const { PresetCurve: PresetCurve$1 } = elliptic__namespace.curves;
16360
- // eslint-disable-next-line new-cap
16361
- const starkEc = new elliptic__namespace.ec(new PresetCurve$1({
16357
+ const starkEc = new elliptic.ec(new elliptic.curves.PresetCurve({
16362
16358
  type: 'short',
16363
16359
  prime: null,
16364
16360
  p: prime,
@@ -16546,10 +16542,8 @@ G = (874739451078007766457464989774322083649278607533249481151382481072868806602
16546
16542
  https://docs.starkware.co/starkex-v4/crypto/stark-curve
16547
16543
  */
16548
16544
  const starkEcOrder = new BN$2('08000000 00000010 ffffffff ffffffff b781126d cae7b232 1e66a241 adc64d2f', 16);
16549
- // eslint-disable-next-line @typescript-eslint/naming-convention
16550
- const { PresetCurve } = elliptic__namespace.curves;
16551
16545
  // eslint-disable-next-line new-cap
16552
- new elliptic__namespace.ec(new PresetCurve({
16546
+ new elliptic.ec(new elliptic.curves.PresetCurve({
16553
16547
  type: 'short',
16554
16548
  prime: null,
16555
16549
  p: '08000000 00000011 00000000 00000000 00000000 00000000 00000000 00000001',
@@ -45443,7 +45437,7 @@ const flattenProperties = (properties) => {
45443
45437
  };
45444
45438
 
45445
45439
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
45446
- const SDK_VERSION = '1.19.6-alpha';
45440
+ const SDK_VERSION = '1.20.0-alpha';
45447
45441
  const getReferrer = () => {
45448
45442
  if (isNode()) {
45449
45443
  return '';
@@ -50638,7 +50632,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
50638
50632
  maxPriorityFeePerGas: ethers.BigNumber.from(10e9),
50639
50633
  };
50640
50634
 
50641
- const SDK_VERSION_MARKER = '1.19.6-alpha';
50635
+ const SDK_VERSION_MARKER = '1.20.0-alpha';
50642
50636
  // This SDK version is replaced by the `yarn build` command ran on the root level
50643
50637
  const globalPackageVersion = () => SDK_VERSION_MARKER;
50644
50638
 
@@ -54149,44 +54143,54 @@ class FiatRampService {
54149
54143
  return (await this.getTransakWidgetUrl(params));
54150
54144
  }
54151
54145
  async getTransakWidgetUrl(params) {
54152
- let widgetUrl = `${TRANSAK_API_BASE_URL[this.config.environment]}?`;
54153
54146
  const onRampConfig = (await this.config.remote.getConfig('onramp'));
54154
- const apiKey = onRampConfig[OnRampProvider.TRANSAK].publishableApiKey;
54155
- const transakPublishableKey = `apiKey=${apiKey}`;
54156
- const zkevmNetwork = 'network=immutablezkevm';
54157
- const defaultPaymentMethod = 'defaultPaymentMethod=credit_debit_card';
54158
- const disableBankTransfer = 'disablePaymentMethods=sepa_bank_transfer,gbp_bank_transfer,'
54159
- + 'pm_cash_app,pm_jwire,pm_paymaya,pm_bpi,pm_ubp,pm_grabpay,pm_shopeepay,pm_gcash,pm_pix,'
54160
- + 'pm_astropay,pm_pse,inr_bank_transfer';
54161
- const productsAvailed = 'productsAvailed=buy';
54162
- const exchangeScreenTitle = 'exchangeScreenTitle=Buy';
54163
- const themeColor = 'themeColor=0D0D0D';
54164
- const defaultFiat = 'defaultFiatAmount=50&defaultFiatCurrency=usd';
54165
- widgetUrl += `${transakPublishableKey}&`
54166
- + `${zkevmNetwork}&`
54167
- + `${defaultPaymentMethod}&`
54168
- + `${disableBankTransfer}&`
54169
- + `${productsAvailed}&`
54170
- + `${exchangeScreenTitle}&`
54171
- + `${themeColor}&`
54172
- + `${defaultFiat}`;
54147
+ const widgetUrl = TRANSAK_API_BASE_URL[this.config.environment];
54148
+ let widgetParams = {
54149
+ apiKey: onRampConfig[OnRampProvider.TRANSAK].publishableApiKey,
54150
+ network: 'immutablezkevm',
54151
+ defaultPaymentMethod: 'credit_debit_card',
54152
+ disablePaymentMethods: 'sepa_bank_transfer,gbp_bank_transfer,pm_cash_app,pm_jwire,pm_paymaya,'
54153
+ + 'pm_bpi,pm_ubp,pm_grabpay,pm_shopeepay,pm_gcash,pm_pix,pm_astropay,pm_pse,inr_bank_transfer',
54154
+ productsAvailed: 'buy',
54155
+ exchangeScreenTitle: 'Buy',
54156
+ themeColor: '0D0D0D',
54157
+ defaultFiatCurrency: 'usd',
54158
+ };
54173
54159
  if (params.isPassport && params.email) {
54174
- const encodedEmail = encodeURIComponent(params.email);
54175
- widgetUrl += `&email=${encodedEmail}&isAutoFillUserData=true&disableWalletAddressForm=true`;
54160
+ widgetParams = {
54161
+ ...widgetParams,
54162
+ email: encodeURIComponent(params.email),
54163
+ isAutoFillUserData: true,
54164
+ disableWalletAddressForm: true,
54165
+ };
54176
54166
  }
54177
54167
  if (params.tokenAmount && params.tokenSymbol) {
54178
- widgetUrl += `&defaultCryptoAmount=${params.tokenAmount}&defaultCryptoCurrency=${params.tokenSymbol}`;
54168
+ widgetParams = {
54169
+ ...widgetParams,
54170
+ defaultCryptoAmount: params.tokenAmount,
54171
+ cryptoCurrencyCode: params.tokenSymbol,
54172
+ };
54179
54173
  }
54180
54174
  else {
54181
- widgetUrl += '&defaultCryptoCurrency=IMX';
54175
+ widgetParams = {
54176
+ ...widgetParams,
54177
+ defaultFiatAmount: '50',
54178
+ defaultCryptoCurrency: 'IMX',
54179
+ };
54182
54180
  }
54183
54181
  if (params.walletAddress) {
54184
- widgetUrl += `&walletAddress=${params.walletAddress}`;
54182
+ widgetParams = {
54183
+ ...widgetParams,
54184
+ walletAddress: params.walletAddress,
54185
+ };
54185
54186
  }
54186
54187
  if (params.allowedTokens) {
54187
- widgetUrl += `&cryptoCurrencyList=${params.allowedTokens?.join(',').toLowerCase()}`;
54188
+ widgetParams = {
54189
+ ...widgetParams,
54190
+ cryptoCurrencyList: params.allowedTokens?.join(',').toLowerCase(),
54191
+ };
54188
54192
  }
54189
- return widgetUrl;
54193
+ return `${widgetUrl}?${new URLSearchParams(widgetParams).toString()}`;
54190
54194
  }
54191
54195
  }
54192
54196
 
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import BN$2 from 'bn.js';
7
7
  import * as encUtils from 'enc-utils';
8
8
  import { splitSignature } from '@ethersproject/bytes';
9
9
  import hashJS from 'hash.js';
10
- import * as elliptic from 'elliptic';
10
+ import { ec, curves } from 'elliptic';
11
11
  import { hdkey } from 'ethereumjs-wallet';
12
12
  import assert from 'assert';
13
13
  import { utils as utils$3, Contract as Contract$1, ContractFactory, BigNumber as BigNumber$1, errors, ethers, constants as constants$1, providers } from 'ethers';
@@ -159,7 +159,7 @@ const flattenProperties$1 = (properties) => {
159
159
  };
160
160
 
161
161
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
162
- const SDK_VERSION$1 = '1.19.6-alpha';
162
+ const SDK_VERSION$1 = '1.20.0-alpha';
163
163
  const getReferrer$1 = () => {
164
164
  if (isNode$1()) {
165
165
  return '';
@@ -13535,7 +13535,7 @@ class MultiRollupApiClients {
13535
13535
  }
13536
13536
 
13537
13537
  // eslint-disable-next-line @typescript-eslint/naming-convention
13538
- const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.19.6-alpha' };
13538
+ const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.20.0-alpha' };
13539
13539
  const createConfig$1 = ({ basePath, headers, }) => {
13540
13540
  if (!basePath.trim()) {
13541
13541
  throw Error('basePath can not be empty');
@@ -13607,7 +13607,7 @@ class APIError extends Error {
13607
13607
 
13608
13608
  /* eslint-disable implicit-arrow-linebreak */
13609
13609
  const defaultHeaders$1 = {
13610
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.19.6-alpha',
13610
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.20.0-alpha',
13611
13611
  };
13612
13612
  /**
13613
13613
  * createAPIConfiguration to create a custom Configuration
@@ -14081,7 +14081,7 @@ var blockchain_data = /*#__PURE__*/Object.freeze({
14081
14081
  /* eslint-disable @typescript-eslint/naming-convention */
14082
14082
  class ApiConfiguration extends index$2.Configuration {
14083
14083
  }
14084
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.19.6-alpha' };
14084
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.20.0-alpha' };
14085
14085
  /**
14086
14086
  * @dev use createImmutableXConfiguration instead
14087
14087
  */
@@ -14120,7 +14120,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
14120
14120
  chainID,
14121
14121
  coreContractAddress,
14122
14122
  registrationContractAddress,
14123
- sdkVersion: 'ts-immutable-sdk-1.19.6-alpha',
14123
+ sdkVersion: 'ts-immutable-sdk-1.20.0-alpha',
14124
14124
  baseConfig,
14125
14125
  });
14126
14126
  const production = ({ baseConfig }) => createImmutableXConfiguration({
@@ -16332,10 +16332,7 @@ const DEFAULT_ACCOUNT_APPLICATION = 'immutablex';
16332
16332
  const DEFAULT_ACCOUNT_INDEX = '1';
16333
16333
  const prime = new BN$2('800000000000011000000000000000000000000000000000000000000000001', 16);
16334
16334
  const order = new BN$2('08000000 00000010 ffffffff ffffffff b781126d cae7b232 1e66a241 adc64d2f', 16);
16335
- // eslint-disable-next-line @typescript-eslint/naming-convention
16336
- const { PresetCurve: PresetCurve$1 } = elliptic.curves;
16337
- // eslint-disable-next-line new-cap
16338
- const starkEc = new elliptic.ec(new PresetCurve$1({
16335
+ const starkEc = new ec(new curves.PresetCurve({
16339
16336
  type: 'short',
16340
16337
  prime: null,
16341
16338
  p: prime,
@@ -16523,10 +16520,8 @@ G = (874739451078007766457464989774322083649278607533249481151382481072868806602
16523
16520
  https://docs.starkware.co/starkex-v4/crypto/stark-curve
16524
16521
  */
16525
16522
  const starkEcOrder = new BN$2('08000000 00000010 ffffffff ffffffff b781126d cae7b232 1e66a241 adc64d2f', 16);
16526
- // eslint-disable-next-line @typescript-eslint/naming-convention
16527
- const { PresetCurve } = elliptic.curves;
16528
16523
  // eslint-disable-next-line new-cap
16529
- new elliptic.ec(new PresetCurve({
16524
+ new ec(new curves.PresetCurve({
16530
16525
  type: 'short',
16531
16526
  prime: null,
16532
16527
  p: '08000000 00000011 00000000 00000000 00000000 00000000 00000000 00000001',
@@ -45420,7 +45415,7 @@ const flattenProperties = (properties) => {
45420
45415
  };
45421
45416
 
45422
45417
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
45423
- const SDK_VERSION = '1.19.6-alpha';
45418
+ const SDK_VERSION = '1.20.0-alpha';
45424
45419
  const getReferrer = () => {
45425
45420
  if (isNode()) {
45426
45421
  return '';
@@ -50615,7 +50610,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
50615
50610
  maxPriorityFeePerGas: BigNumber$1.from(10e9),
50616
50611
  };
50617
50612
 
50618
- const SDK_VERSION_MARKER = '1.19.6-alpha';
50613
+ const SDK_VERSION_MARKER = '1.20.0-alpha';
50619
50614
  // This SDK version is replaced by the `yarn build` command ran on the root level
50620
50615
  const globalPackageVersion = () => SDK_VERSION_MARKER;
50621
50616
 
@@ -54126,44 +54121,54 @@ class FiatRampService {
54126
54121
  return (await this.getTransakWidgetUrl(params));
54127
54122
  }
54128
54123
  async getTransakWidgetUrl(params) {
54129
- let widgetUrl = `${TRANSAK_API_BASE_URL[this.config.environment]}?`;
54130
54124
  const onRampConfig = (await this.config.remote.getConfig('onramp'));
54131
- const apiKey = onRampConfig[OnRampProvider.TRANSAK].publishableApiKey;
54132
- const transakPublishableKey = `apiKey=${apiKey}`;
54133
- const zkevmNetwork = 'network=immutablezkevm';
54134
- const defaultPaymentMethod = 'defaultPaymentMethod=credit_debit_card';
54135
- const disableBankTransfer = 'disablePaymentMethods=sepa_bank_transfer,gbp_bank_transfer,'
54136
- + 'pm_cash_app,pm_jwire,pm_paymaya,pm_bpi,pm_ubp,pm_grabpay,pm_shopeepay,pm_gcash,pm_pix,'
54137
- + 'pm_astropay,pm_pse,inr_bank_transfer';
54138
- const productsAvailed = 'productsAvailed=buy';
54139
- const exchangeScreenTitle = 'exchangeScreenTitle=Buy';
54140
- const themeColor = 'themeColor=0D0D0D';
54141
- const defaultFiat = 'defaultFiatAmount=50&defaultFiatCurrency=usd';
54142
- widgetUrl += `${transakPublishableKey}&`
54143
- + `${zkevmNetwork}&`
54144
- + `${defaultPaymentMethod}&`
54145
- + `${disableBankTransfer}&`
54146
- + `${productsAvailed}&`
54147
- + `${exchangeScreenTitle}&`
54148
- + `${themeColor}&`
54149
- + `${defaultFiat}`;
54125
+ const widgetUrl = TRANSAK_API_BASE_URL[this.config.environment];
54126
+ let widgetParams = {
54127
+ apiKey: onRampConfig[OnRampProvider.TRANSAK].publishableApiKey,
54128
+ network: 'immutablezkevm',
54129
+ defaultPaymentMethod: 'credit_debit_card',
54130
+ disablePaymentMethods: 'sepa_bank_transfer,gbp_bank_transfer,pm_cash_app,pm_jwire,pm_paymaya,'
54131
+ + 'pm_bpi,pm_ubp,pm_grabpay,pm_shopeepay,pm_gcash,pm_pix,pm_astropay,pm_pse,inr_bank_transfer',
54132
+ productsAvailed: 'buy',
54133
+ exchangeScreenTitle: 'Buy',
54134
+ themeColor: '0D0D0D',
54135
+ defaultFiatCurrency: 'usd',
54136
+ };
54150
54137
  if (params.isPassport && params.email) {
54151
- const encodedEmail = encodeURIComponent(params.email);
54152
- widgetUrl += `&email=${encodedEmail}&isAutoFillUserData=true&disableWalletAddressForm=true`;
54138
+ widgetParams = {
54139
+ ...widgetParams,
54140
+ email: encodeURIComponent(params.email),
54141
+ isAutoFillUserData: true,
54142
+ disableWalletAddressForm: true,
54143
+ };
54153
54144
  }
54154
54145
  if (params.tokenAmount && params.tokenSymbol) {
54155
- widgetUrl += `&defaultCryptoAmount=${params.tokenAmount}&defaultCryptoCurrency=${params.tokenSymbol}`;
54146
+ widgetParams = {
54147
+ ...widgetParams,
54148
+ defaultCryptoAmount: params.tokenAmount,
54149
+ cryptoCurrencyCode: params.tokenSymbol,
54150
+ };
54156
54151
  }
54157
54152
  else {
54158
- widgetUrl += '&defaultCryptoCurrency=IMX';
54153
+ widgetParams = {
54154
+ ...widgetParams,
54155
+ defaultFiatAmount: '50',
54156
+ defaultCryptoCurrency: 'IMX',
54157
+ };
54159
54158
  }
54160
54159
  if (params.walletAddress) {
54161
- widgetUrl += `&walletAddress=${params.walletAddress}`;
54160
+ widgetParams = {
54161
+ ...widgetParams,
54162
+ walletAddress: params.walletAddress,
54163
+ };
54162
54164
  }
54163
54165
  if (params.allowedTokens) {
54164
- widgetUrl += `&cryptoCurrencyList=${params.allowedTokens?.join(',').toLowerCase()}`;
54166
+ widgetParams = {
54167
+ ...widgetParams,
54168
+ cryptoCurrencyList: params.allowedTokens?.join(',').toLowerCase(),
54169
+ };
54165
54170
  }
54166
- return widgetUrl;
54171
+ return `${widgetUrl}?${new URLSearchParams(widgetParams).toString()}`;
54167
54172
  }
54168
54173
  }
54169
54174
 
package/dist/orderbook.js CHANGED
@@ -131,7 +131,7 @@ const flattenProperties = (properties) => {
131
131
  };
132
132
 
133
133
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
134
- const SDK_VERSION = '1.19.6-alpha';
134
+ const SDK_VERSION = '1.20.0-alpha';
135
135
  const getReferrer = () => {
136
136
  if (isNode()) {
137
137
  return '';
package/dist/passport.js CHANGED
@@ -7,7 +7,7 @@ import BN from 'bn.js';
7
7
  import * as encUtils from 'enc-utils';
8
8
  import '@ethersproject/bytes';
9
9
  import hashJS from 'hash.js';
10
- import * as elliptic from 'elliptic';
10
+ import { ec, curves } from 'elliptic';
11
11
  import 'ethereumjs-wallet';
12
12
  import 'assert';
13
13
  import { BigNumber, Contract, errors, utils as utils$2, ethers, constants } from 'ethers';
@@ -11350,7 +11350,7 @@ class MultiRollupApiClients {
11350
11350
  }
11351
11351
 
11352
11352
  // eslint-disable-next-line @typescript-eslint/naming-convention
11353
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.19.6-alpha' };
11353
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.20.0-alpha' };
11354
11354
  const createConfig$1 = ({ basePath, headers, }) => {
11355
11355
  if (!basePath.trim()) {
11356
11356
  throw Error('basePath can not be empty');
@@ -11529,7 +11529,7 @@ const flattenProperties = (properties) => {
11529
11529
  };
11530
11530
 
11531
11531
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
11532
- const SDK_VERSION = '1.19.6-alpha';
11532
+ const SDK_VERSION = '1.20.0-alpha';
11533
11533
  const getReferrer = () => {
11534
11534
  if (isNode()) {
11535
11535
  return '';
@@ -11779,7 +11779,7 @@ const addKeysToHeadersOverride = (baseConfig, overrides) => {
11779
11779
  /* eslint-disable @typescript-eslint/naming-convention */
11780
11780
  class ApiConfiguration extends index$2.Configuration {
11781
11781
  }
11782
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.19.6-alpha' };
11782
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.20.0-alpha' };
11783
11783
  /**
11784
11784
  * @dev use createImmutableXConfiguration instead
11785
11785
  */
@@ -11818,7 +11818,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
11818
11818
  chainID,
11819
11819
  coreContractAddress,
11820
11820
  registrationContractAddress,
11821
- sdkVersion: 'ts-immutable-sdk-1.19.6-alpha',
11821
+ sdkVersion: 'ts-immutable-sdk-1.20.0-alpha',
11822
11822
  baseConfig,
11823
11823
  });
11824
11824
  const production = ({ baseConfig }) => createImmutableXConfiguration({
@@ -14001,10 +14001,7 @@ const constantPointsHex = [
14001
14001
  ];
14002
14002
  const prime = new BN('800000000000011000000000000000000000000000000000000000000000001', 16);
14003
14003
  const order = new BN('08000000 00000010 ffffffff ffffffff b781126d cae7b232 1e66a241 adc64d2f', 16);
14004
- // eslint-disable-next-line @typescript-eslint/naming-convention
14005
- const { PresetCurve: PresetCurve$1 } = elliptic.curves;
14006
- // eslint-disable-next-line new-cap
14007
- const starkEc = new elliptic.ec(new PresetCurve$1({
14004
+ const starkEc = new ec(new curves.PresetCurve({
14008
14005
  type: 'short',
14009
14006
  prime: null,
14010
14007
  p: prime,
@@ -14072,10 +14069,8 @@ G = (874739451078007766457464989774322083649278607533249481151382481072868806602
14072
14069
  https://docs.starkware.co/starkex-v4/crypto/stark-curve
14073
14070
  */
14074
14071
  const starkEcOrder = new BN('08000000 00000010 ffffffff ffffffff b781126d cae7b232 1e66a241 adc64d2f', 16);
14075
- // eslint-disable-next-line @typescript-eslint/naming-convention
14076
- const { PresetCurve } = elliptic.curves;
14077
14072
  // eslint-disable-next-line new-cap
14078
- new elliptic.ec(new PresetCurve({
14073
+ new ec(new curves.PresetCurve({
14079
14074
  type: 'short',
14080
14075
  prime: null,
14081
14076
  p: '08000000 00000011 00000000 00000000 00000000 00000000 00000000 00000001',
package/dist/x.js CHANGED
@@ -7,7 +7,7 @@ import BN from 'bn.js';
7
7
  import * as encUtils from 'enc-utils';
8
8
  import { splitSignature } from '@ethersproject/bytes';
9
9
  import hashJS from 'hash.js';
10
- import * as elliptic from 'elliptic';
10
+ import { ec, curves } from 'elliptic';
11
11
  import { hdkey } from 'ethereumjs-wallet';
12
12
  import 'assert';
13
13
  import { utils, Contract, ContractFactory, ethers } from 'ethers';
@@ -8953,7 +8953,7 @@ const flattenProperties = (properties) => {
8953
8953
  };
8954
8954
 
8955
8955
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
8956
- const SDK_VERSION = '1.19.6-alpha';
8956
+ const SDK_VERSION = '1.20.0-alpha';
8957
8957
  const getReferrer = () => {
8958
8958
  if (isNode()) {
8959
8959
  return '';
@@ -9196,7 +9196,7 @@ const addKeysToHeadersOverride = (baseConfig, overrides) => {
9196
9196
  /* eslint-disable @typescript-eslint/naming-convention */
9197
9197
  class ApiConfiguration extends index$2.Configuration {
9198
9198
  }
9199
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.19.6-alpha' };
9199
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.20.0-alpha' };
9200
9200
  /**
9201
9201
  * @dev use createImmutableXConfiguration instead
9202
9202
  */
@@ -9235,7 +9235,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
9235
9235
  chainID,
9236
9236
  coreContractAddress,
9237
9237
  registrationContractAddress,
9238
- sdkVersion: 'ts-immutable-sdk-1.19.6-alpha',
9238
+ sdkVersion: 'ts-immutable-sdk-1.20.0-alpha',
9239
9239
  baseConfig,
9240
9240
  });
9241
9241
  const production = ({ baseConfig }) => createImmutableXConfiguration({
@@ -11447,10 +11447,7 @@ const DEFAULT_ACCOUNT_APPLICATION = 'immutablex';
11447
11447
  const DEFAULT_ACCOUNT_INDEX = '1';
11448
11448
  const prime = new BN('800000000000011000000000000000000000000000000000000000000000001', 16);
11449
11449
  const order = new BN('08000000 00000010 ffffffff ffffffff b781126d cae7b232 1e66a241 adc64d2f', 16);
11450
- // eslint-disable-next-line @typescript-eslint/naming-convention
11451
- const { PresetCurve: PresetCurve$1 } = elliptic.curves;
11452
- // eslint-disable-next-line new-cap
11453
- const starkEc = new elliptic.ec(new PresetCurve$1({
11450
+ const starkEc = new ec(new curves.PresetCurve({
11454
11451
  type: 'short',
11455
11452
  prime: null,
11456
11453
  p: prime,
@@ -11638,10 +11635,8 @@ G = (874739451078007766457464989774322083649278607533249481151382481072868806602
11638
11635
  https://docs.starkware.co/starkex-v4/crypto/stark-curve
11639
11636
  */
11640
11637
  const starkEcOrder = new BN('08000000 00000010 ffffffff ffffffff b781126d cae7b232 1e66a241 adc64d2f', 16);
11641
- // eslint-disable-next-line @typescript-eslint/naming-convention
11642
- const { PresetCurve } = elliptic.curves;
11643
11638
  // eslint-disable-next-line new-cap
11644
- new elliptic.ec(new PresetCurve({
11639
+ new ec(new curves.PresetCurve({
11645
11640
  type: 'short',
11646
11641
  prime: null,
11647
11642
  p: '08000000 00000011 00000000 00000000 00000000 00000000 00000000 00000001',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imtbl/sdk",
3
3
  "description": "Immutable Unified SDK",
4
- "version": "1.19.6-alpha",
4
+ "version": "1.20.0-alpha",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",