@imtbl/sdk 0.22.0-alpha.1 → 0.22.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.
package/dist/index.cjs CHANGED
@@ -24,7 +24,6 @@ var assert = require('assert');
24
24
  var v3Sdk = require('@uniswap/v3-sdk');
25
25
  var solidity = require('@ethersproject/solidity');
26
26
  var routerSdk = require('@uniswap/router-sdk');
27
- var utils$1 = require('ethers/lib/utils');
28
27
  var jsxRuntime = require('react/jsx-runtime');
29
28
  var react = require('react');
30
29
 
@@ -3010,7 +3009,7 @@ class MultiRollupApiClients {
3010
3009
  }
3011
3010
 
3012
3011
  // eslint-disable-next-line @typescript-eslint/naming-convention
3013
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.22.0-alpha.1' };
3012
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.22.1' };
3014
3013
  const createConfig = ({ basePath, headers, }) => {
3015
3014
  if (!basePath.trim()) {
3016
3015
  throw Error('basePath can not be empty');
@@ -3070,7 +3069,7 @@ class APIError extends Error {
3070
3069
 
3071
3070
  /* eslint-disable implicit-arrow-linebreak */
3072
3071
  const defaultHeaders = {
3073
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.22.0-alpha.1',
3072
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.22.1',
3074
3073
  };
3075
3074
  /**
3076
3075
  * createAPIConfiguration to create a custom Configuration
@@ -3356,7 +3355,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
3356
3355
  chainID,
3357
3356
  coreContractAddress,
3358
3357
  registrationContractAddress,
3359
- sdkVersion: 'ts-immutable-sdk-0.22.0-alpha.1',
3358
+ sdkVersion: 'ts-immutable-sdk-0.22.1',
3360
3359
  });
3361
3360
  /**
3362
3361
  * Sets `sdkVersion` at the time of build
@@ -31303,7 +31302,6 @@ const $a7367d01c6e76b1c$export$d62081fac18000c2 = (orderHash, orderComponents, a
31303
31302
 
31304
31303
 
31305
31304
 
31306
-
31307
31305
  const $9051cee080948594$export$9ac1563efd38130 = 1; // 100%
31308
31306
  const $9051cee080948594$export$768e717351d4b176 = 6; // will allow 0.000001 (0.0001%) as the minimum value
31309
31307
  const $9051cee080948594$var$calculateFeesPercent = (orderFee, amountBn)=>{
@@ -31315,7 +31313,7 @@ const $9051cee080948594$var$calculateFeesPercent = (orderFee, amountBn)=>{
31315
31313
  };
31316
31314
  const $9051cee080948594$var$calculateFeesToken = (orderFee, decimals)=>{
31317
31315
  const feeToken = orderFee.amount;
31318
- const bnFeeAmount = (utils$1.parseUnits)(feeToken.token, decimals);
31316
+ const bnFeeAmount = (ethers.utils).parseUnits(feeToken.token, decimals);
31319
31317
  return bnFeeAmount;
31320
31318
  };
31321
31319
  const $9051cee080948594$export$1e69c9cfc42e28d8 = (orderFees, weiAmount, decimals = 18)=>{
@@ -31547,7 +31545,6 @@ const $9c3db1bb9c8b69d3$export$70b61ad426ddbe54 = async (config, provider, order
31547
31545
 
31548
31546
 
31549
31547
 
31550
-
31551
31548
  const $9085b221b72ac69e$export$af768ccdf17d5c04 = (id, contractAddress, spenderAddress)=>({
31552
31549
  type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
31553
31550
  id: id,
@@ -31555,7 +31552,7 @@ const $9085b221b72ac69e$export$af768ccdf17d5c04 = (id, contractAddress, spenderA
31555
31552
  spenderAddress: spenderAddress
31556
31553
  });
31557
31554
  const $9085b221b72ac69e$export$586d02673c66d423 = (buyToken, decimals = 18)=>{
31558
- const bnAmount = (utils$1.parseUnits)(buyToken.amount, decimals);
31555
+ const bnAmount = (ethers.utils).parseUnits(buyToken.amount, decimals);
31559
31556
  if (buyToken.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) return {
31560
31557
  type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE,
31561
31558
  amount: bnAmount.toString()
@@ -31736,11 +31733,11 @@ async function $d35036efee31c5d1$export$dc8635800ef20f4b(provider, requirements)
31736
31733
  const itemRequirements = requirements.map((itemRequirementParam, index)=>{
31737
31734
  if (itemRequirementParam.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) return {
31738
31735
  ...itemRequirementParam,
31739
- amount: (utils$1.parseUnits)(itemRequirementParam.amount, 18)
31736
+ amount: (ethers.utils).parseUnits(itemRequirementParam.amount, 18)
31740
31737
  };
31741
31738
  if (itemRequirementParam.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC20) return {
31742
31739
  ...itemRequirementParam,
31743
- amount: (utils$1.parseUnits)(itemRequirementParam.amount, decimals[index])
31740
+ amount: (ethers.utils).parseUnits(itemRequirementParam.amount, decimals[index])
31744
31741
  };
31745
31742
  return itemRequirementParam;
31746
31743
  });
@@ -31999,7 +31996,7 @@ var checkout_sdk = /*#__PURE__*/Object.freeze({
31999
31996
  function $parcel$export(e, n, v, s) {
32000
31997
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
32001
31998
  }
32002
- const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.22.0-alpha.1";
31999
+ const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.22.1";
32003
32000
  const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
32004
32001
  const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
32005
32002
 
@@ -32064,6 +32061,7 @@ var $207ed853f11d19d5$export$5a0ace85cae72d45;
32064
32061
  IMTBLWidgetEvents["IMTBL_SWAP_WIDGET_EVENT"] = "imtbl-swap-widget";
32065
32062
  IMTBLWidgetEvents["IMTBL_BRIDGE_WIDGET_EVENT"] = "imtbl-bridge-widget";
32066
32063
  IMTBLWidgetEvents["IMTBL_ONRAMP_WIDGET_EVENT"] = "imtbl-onramp-widget";
32064
+ IMTBLWidgetEvents["IMTBL_PRIMARY_REVENUE_WIDGET_EVENT"] = "imtbl-primary-revenue-widget";
32067
32065
  })($207ed853f11d19d5$export$5a0ace85cae72d45 || ($207ed853f11d19d5$export$5a0ace85cae72d45 = {}));
32068
32066
 
32069
32067
 
@@ -32103,6 +32101,20 @@ $parcel$export($53d219e7f6bf0cd6$exports, "SwapEventType", () => $53d219e7f6bf0c
32103
32101
  })($53d219e7f6bf0cd6$export$140a49745ab55563 || ($53d219e7f6bf0cd6$export$140a49745ab55563 = {}));
32104
32102
 
32105
32103
 
32104
+ var $8c83f59522c4ca40$exports = {};
32105
+
32106
+ $parcel$export($8c83f59522c4ca40$exports, "PrimaryRevenueEventType", () => $8c83f59522c4ca40$export$b33478ffb988bd5e);
32107
+ /**
32108
+ * Enum representing possible Primary Revenue Widget event types.
32109
+ */ var $8c83f59522c4ca40$export$b33478ffb988bd5e;
32110
+ (function(PrimaryRevenueEventType) {
32111
+ PrimaryRevenueEventType["CLOSE_WIDGET"] = "close-widget";
32112
+ PrimaryRevenueEventType["SUCCESS"] = "success";
32113
+ PrimaryRevenueEventType["FAILURE"] = "failure";
32114
+ PrimaryRevenueEventType["REJECTED"] = "rejected";
32115
+ })($8c83f59522c4ca40$export$b33478ffb988bd5e || ($8c83f59522c4ca40$export$b33478ffb988bd5e = {}));
32116
+
32117
+
32106
32118
  var $15cc9e120aa6f3bf$exports = {};
32107
32119
 
32108
32120
  $parcel$export($15cc9e120aa6f3bf$exports, "BridgeEventType", () => $15cc9e120aa6f3bf$export$d1bfa21f7c76447a);
@@ -32369,6 +32381,7 @@ var checkout_widgets = /*#__PURE__*/Object.freeze({
32369
32381
  get OnRampEventType () { return $d882ddc5600b1284$export$66ec39c0924078d8; },
32370
32382
  OnRampReact: $f94f63f2c041a04c$export$9e363c61ea99bbb4,
32371
32383
  get OrchestrationEventType () { return $ad06b030b1a3ba34$export$b80d2daf830437b9; },
32384
+ get PrimaryRevenueEventType () { return $8c83f59522c4ca40$export$b33478ffb988bd5e; },
32372
32385
  get SwapEventType () { return $53d219e7f6bf0cd6$export$140a49745ab55563; },
32373
32386
  SwapReact: $a4fbb8e3a6aeff58$export$971e031379577f4,
32374
32387
  UpdateConfig: $430e3eda76fa4d5f$export$bf1548ba7e61c17f,
package/dist/index.d.ts CHANGED
@@ -30149,6 +30149,31 @@ type WalletNetworkSwitchEvent = {
30149
30149
  * Represents an event that is triggered when a wallet is disconnected.
30150
30150
  */
30151
30151
  type WalletDisconnectWalletEvent = {};
30152
+ /**
30153
+ * Enum representing possible Primary Revenue Widget event types.
30154
+ */
30155
+ declare enum PrimaryRevenueEventType {
30156
+ CLOSE_WIDGET = "close-widget",
30157
+ SUCCESS = "success",
30158
+ FAILURE = "failure",
30159
+ REJECTED = "rejected"
30160
+ }
30161
+ /**
30162
+ * Represents a successful primary revenue transaction.
30163
+ * @property {string} transactionHash - The hash of the successful transaction.
30164
+ */
30165
+ type PrimaryRevenueSuccess = {
30166
+ [key: string]: string;
30167
+ };
30168
+ /**
30169
+ * Type representing a PrimaryRevenue Widget with type FAILURE.
30170
+ * @property {string} reason - The reason why the swap failed.
30171
+ * @property {number} timestamp - The timestamp of the failed swap.
30172
+ */
30173
+ type PrimaryRevenueFailed = {
30174
+ reason: string;
30175
+ timestamp: number;
30176
+ };
30152
30177
  /**
30153
30178
  * Enum representing the events emitted by the widgets.
30154
30179
  */
@@ -30157,16 +30182,17 @@ declare enum IMTBLWidgetEvents {
30157
30182
  IMTBL_WALLET_WIDGET_EVENT = "imtbl-wallet-widget",
30158
30183
  IMTBL_SWAP_WIDGET_EVENT = "imtbl-swap-widget",
30159
30184
  IMTBL_BRIDGE_WIDGET_EVENT = "imtbl-bridge-widget",
30160
- IMTBL_ONRAMP_WIDGET_EVENT = "imtbl-onramp-widget"
30185
+ IMTBL_ONRAMP_WIDGET_EVENT = "imtbl-onramp-widget",
30186
+ IMTBL_PRIMARY_REVENUE_WIDGET_EVENT = "imtbl-primary-revenue-widget"
30161
30187
  }
30162
30188
  /**
30163
30189
  * Represents an event emitted by a widget.
30164
30190
  * @template T - The type of data associated with the event.
30165
- * @property {OrchestrationEventType | ConnectEventType | WalletEventType | SwapEventType | BridgeEventType | OnRampEventType} type - The type of the event.
30191
+ * @property {OrchestrationEventType | ConnectEventType | WalletEventType | SwapEventType | BridgeEventType | OnRampEventType | PrimaryRevenueEventType} type - The type of the event.
30166
30192
  * @property {T} data - The data associated with the event.
30167
30193
  */
30168
30194
  type WidgetEvent<T> = {
30169
- type: OrchestrationEventType | ConnectEventType | WalletEventType | SwapEventType | BridgeEventType | OnRampEventType;
30195
+ type: OrchestrationEventType | ConnectEventType | WalletEventType | SwapEventType | BridgeEventType | OnRampEventType | PrimaryRevenueEventType;
30170
30196
  data: T;
30171
30197
  };
30172
30198
  /**
@@ -30195,6 +30221,7 @@ declare global {
30195
30221
  'imtbl-swap': ImtblSwapProps;
30196
30222
  'imtbl-bridge': ImtblBridgeProps;
30197
30223
  'imtbl-onramp': ImtblOnRampProps;
30224
+ 'imtbl-primary-revenue': ImtblPrimaryRevenueProps;
30198
30225
  }
30199
30226
  }
30200
30227
  interface ImmutableWebComponent {
@@ -30275,6 +30302,26 @@ interface ImtblOnRampProps extends React.DetailedHTMLProps<React.HTMLAttributes<
30275
30302
  amount?: string;
30276
30303
  contractAddress?: string;
30277
30304
  }
30305
+ /**
30306
+ * Interface for the properties of the primary revenue web component.
30307
+ * Extends the React.DetailedHTMLProps interface to inherit HTML attributes for an HTMLElement.
30308
+ * @interface ImtblPrimaryRevenueProps
30309
+ * @extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>
30310
+ * @property {string | undefined} widgetConfig - Optional string representing the widget configuration.
30311
+ * @property {string | undefined} amount - The amount to be paid.
30312
+ * @property {string | undefined} products - A base64 encoded string of the array of items to be purchased.
30313
+ * @property {string | undefined} fromContractAddress - The contract address of the token to pay with.
30314
+ * @property {string | undefined} env - The environment to use: SANDBOX, DEV, PRODUCTION, ...
30315
+ * @property {string | undefined} environmentId - The environment id from Immutable Hub.
30316
+ */
30317
+ interface ImtblPrimaryRevenueProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
30318
+ widgetConfig?: string;
30319
+ amount: string;
30320
+ products: string;
30321
+ fromContractAddress: string;
30322
+ env: string;
30323
+ environmentId: string;
30324
+ }
30278
30325
  /**
30279
30326
  * Interface representing the props for the Bridge Widget component.
30280
30327
  * @interface BridgeReactProps
@@ -30396,6 +30443,7 @@ declare const checkout_widgets_d_IMTBLWidgetEvents: typeof IMTBLWidgetEvents;
30396
30443
  type checkout_widgets_d_ImtblBridgeProps = ImtblBridgeProps;
30397
30444
  type checkout_widgets_d_ImtblConnectProps = ImtblConnectProps;
30398
30445
  type checkout_widgets_d_ImtblOnRampProps = ImtblOnRampProps;
30446
+ type checkout_widgets_d_ImtblPrimaryRevenueProps = ImtblPrimaryRevenueProps;
30399
30447
  type checkout_widgets_d_ImtblSwapProps = ImtblSwapProps;
30400
30448
  type checkout_widgets_d_ImtblWalletProps = ImtblWalletProps;
30401
30449
  type checkout_widgets_d_OnRampEventType = OnRampEventType;
@@ -30406,6 +30454,10 @@ type checkout_widgets_d_OnRampReactProps = OnRampReactProps;
30406
30454
  type checkout_widgets_d_OnRampSuccess = OnRampSuccess;
30407
30455
  type checkout_widgets_d_OrchestrationEventType = OrchestrationEventType;
30408
30456
  declare const checkout_widgets_d_OrchestrationEventType: typeof OrchestrationEventType;
30457
+ type checkout_widgets_d_PrimaryRevenueEventType = PrimaryRevenueEventType;
30458
+ declare const checkout_widgets_d_PrimaryRevenueEventType: typeof PrimaryRevenueEventType;
30459
+ type checkout_widgets_d_PrimaryRevenueFailed = PrimaryRevenueFailed;
30460
+ type checkout_widgets_d_PrimaryRevenueSuccess = PrimaryRevenueSuccess;
30409
30461
  type checkout_widgets_d_RequestBridgeEvent = RequestBridgeEvent;
30410
30462
  type checkout_widgets_d_RequestConnectEvent = RequestConnectEvent;
30411
30463
  type checkout_widgets_d_RequestOnrampEvent = RequestOnrampEvent;
@@ -30448,6 +30500,7 @@ declare namespace checkout_widgets_d {
30448
30500
  checkout_widgets_d_ImtblBridgeProps as ImtblBridgeProps,
30449
30501
  checkout_widgets_d_ImtblConnectProps as ImtblConnectProps,
30450
30502
  checkout_widgets_d_ImtblOnRampProps as ImtblOnRampProps,
30503
+ checkout_widgets_d_ImtblPrimaryRevenueProps as ImtblPrimaryRevenueProps,
30451
30504
  checkout_widgets_d_ImtblSwapProps as ImtblSwapProps,
30452
30505
  checkout_widgets_d_ImtblWalletProps as ImtblWalletProps,
30453
30506
  checkout_widgets_d_OnRampEventType as OnRampEventType,
@@ -30456,6 +30509,9 @@ declare namespace checkout_widgets_d {
30456
30509
  checkout_widgets_d_OnRampReactProps as OnRampReactProps,
30457
30510
  checkout_widgets_d_OnRampSuccess as OnRampSuccess,
30458
30511
  checkout_widgets_d_OrchestrationEventType as OrchestrationEventType,
30512
+ checkout_widgets_d_PrimaryRevenueEventType as PrimaryRevenueEventType,
30513
+ checkout_widgets_d_PrimaryRevenueFailed as PrimaryRevenueFailed,
30514
+ checkout_widgets_d_PrimaryRevenueSuccess as PrimaryRevenueSuccess,
30459
30515
  checkout_widgets_d_RequestBridgeEvent as RequestBridgeEvent,
30460
30516
  checkout_widgets_d_RequestConnectEvent as RequestConnectEvent,
30461
30517
  checkout_widgets_d_RequestOnrampEvent as RequestOnrampEvent,
package/dist/index.js CHANGED
@@ -22,7 +22,6 @@ import assert from 'assert';
22
22
  import { FeeAmount, Route, SwapQuoter, Pool, Trade, toHex as toHex$1, encodeRouteToPath } from '@uniswap/v3-sdk';
23
23
  import { keccak256 as keccak256$1 } from '@ethersproject/solidity';
24
24
  import { SwapRouter } from '@uniswap/router-sdk';
25
- import { parseUnits as parseUnits$1 } from 'ethers/lib/utils';
26
25
  import { jsx } from 'react/jsx-runtime';
27
26
  import { useEffect } from 'react';
28
27
 
@@ -2988,7 +2987,7 @@ class MultiRollupApiClients {
2988
2987
  }
2989
2988
 
2990
2989
  // eslint-disable-next-line @typescript-eslint/naming-convention
2991
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.22.0-alpha.1' };
2990
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.22.1' };
2992
2991
  const createConfig = ({ basePath, headers, }) => {
2993
2992
  if (!basePath.trim()) {
2994
2993
  throw Error('basePath can not be empty');
@@ -3048,7 +3047,7 @@ class APIError extends Error {
3048
3047
 
3049
3048
  /* eslint-disable implicit-arrow-linebreak */
3050
3049
  const defaultHeaders = {
3051
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.22.0-alpha.1',
3050
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.22.1',
3052
3051
  };
3053
3052
  /**
3054
3053
  * createAPIConfiguration to create a custom Configuration
@@ -3334,7 +3333,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
3334
3333
  chainID,
3335
3334
  coreContractAddress,
3336
3335
  registrationContractAddress,
3337
- sdkVersion: 'ts-immutable-sdk-0.22.0-alpha.1',
3336
+ sdkVersion: 'ts-immutable-sdk-0.22.1',
3338
3337
  });
3339
3338
  /**
3340
3339
  * Sets `sdkVersion` at the time of build
@@ -31281,7 +31280,6 @@ const $a7367d01c6e76b1c$export$d62081fac18000c2 = (orderHash, orderComponents, a
31281
31280
 
31282
31281
 
31283
31282
 
31284
-
31285
31283
  const $9051cee080948594$export$9ac1563efd38130 = 1; // 100%
31286
31284
  const $9051cee080948594$export$768e717351d4b176 = 6; // will allow 0.000001 (0.0001%) as the minimum value
31287
31285
  const $9051cee080948594$var$calculateFeesPercent = (orderFee, amountBn)=>{
@@ -31293,7 +31291,7 @@ const $9051cee080948594$var$calculateFeesPercent = (orderFee, amountBn)=>{
31293
31291
  };
31294
31292
  const $9051cee080948594$var$calculateFeesToken = (orderFee, decimals)=>{
31295
31293
  const feeToken = orderFee.amount;
31296
- const bnFeeAmount = (parseUnits$1)(feeToken.token, decimals);
31294
+ const bnFeeAmount = (utils$1).parseUnits(feeToken.token, decimals);
31297
31295
  return bnFeeAmount;
31298
31296
  };
31299
31297
  const $9051cee080948594$export$1e69c9cfc42e28d8 = (orderFees, weiAmount, decimals = 18)=>{
@@ -31525,7 +31523,6 @@ const $9c3db1bb9c8b69d3$export$70b61ad426ddbe54 = async (config, provider, order
31525
31523
 
31526
31524
 
31527
31525
 
31528
-
31529
31526
  const $9085b221b72ac69e$export$af768ccdf17d5c04 = (id, contractAddress, spenderAddress)=>({
31530
31527
  type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
31531
31528
  id: id,
@@ -31533,7 +31530,7 @@ const $9085b221b72ac69e$export$af768ccdf17d5c04 = (id, contractAddress, spenderA
31533
31530
  spenderAddress: spenderAddress
31534
31531
  });
31535
31532
  const $9085b221b72ac69e$export$586d02673c66d423 = (buyToken, decimals = 18)=>{
31536
- const bnAmount = (parseUnits$1)(buyToken.amount, decimals);
31533
+ const bnAmount = (utils$1).parseUnits(buyToken.amount, decimals);
31537
31534
  if (buyToken.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) return {
31538
31535
  type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE,
31539
31536
  amount: bnAmount.toString()
@@ -31714,11 +31711,11 @@ async function $d35036efee31c5d1$export$dc8635800ef20f4b(provider, requirements)
31714
31711
  const itemRequirements = requirements.map((itemRequirementParam, index)=>{
31715
31712
  if (itemRequirementParam.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) return {
31716
31713
  ...itemRequirementParam,
31717
- amount: (parseUnits$1)(itemRequirementParam.amount, 18)
31714
+ amount: (utils$1).parseUnits(itemRequirementParam.amount, 18)
31718
31715
  };
31719
31716
  if (itemRequirementParam.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC20) return {
31720
31717
  ...itemRequirementParam,
31721
- amount: (parseUnits$1)(itemRequirementParam.amount, decimals[index])
31718
+ amount: (utils$1).parseUnits(itemRequirementParam.amount, decimals[index])
31722
31719
  };
31723
31720
  return itemRequirementParam;
31724
31721
  });
@@ -31977,7 +31974,7 @@ var checkout_sdk = /*#__PURE__*/Object.freeze({
31977
31974
  function $parcel$export(e, n, v, s) {
31978
31975
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
31979
31976
  }
31980
- const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.22.0-alpha.1";
31977
+ const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.22.1";
31981
31978
  const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
31982
31979
  const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
31983
31980
 
@@ -32042,6 +32039,7 @@ var $207ed853f11d19d5$export$5a0ace85cae72d45;
32042
32039
  IMTBLWidgetEvents["IMTBL_SWAP_WIDGET_EVENT"] = "imtbl-swap-widget";
32043
32040
  IMTBLWidgetEvents["IMTBL_BRIDGE_WIDGET_EVENT"] = "imtbl-bridge-widget";
32044
32041
  IMTBLWidgetEvents["IMTBL_ONRAMP_WIDGET_EVENT"] = "imtbl-onramp-widget";
32042
+ IMTBLWidgetEvents["IMTBL_PRIMARY_REVENUE_WIDGET_EVENT"] = "imtbl-primary-revenue-widget";
32045
32043
  })($207ed853f11d19d5$export$5a0ace85cae72d45 || ($207ed853f11d19d5$export$5a0ace85cae72d45 = {}));
32046
32044
 
32047
32045
 
@@ -32081,6 +32079,20 @@ $parcel$export($53d219e7f6bf0cd6$exports, "SwapEventType", () => $53d219e7f6bf0c
32081
32079
  })($53d219e7f6bf0cd6$export$140a49745ab55563 || ($53d219e7f6bf0cd6$export$140a49745ab55563 = {}));
32082
32080
 
32083
32081
 
32082
+ var $8c83f59522c4ca40$exports = {};
32083
+
32084
+ $parcel$export($8c83f59522c4ca40$exports, "PrimaryRevenueEventType", () => $8c83f59522c4ca40$export$b33478ffb988bd5e);
32085
+ /**
32086
+ * Enum representing possible Primary Revenue Widget event types.
32087
+ */ var $8c83f59522c4ca40$export$b33478ffb988bd5e;
32088
+ (function(PrimaryRevenueEventType) {
32089
+ PrimaryRevenueEventType["CLOSE_WIDGET"] = "close-widget";
32090
+ PrimaryRevenueEventType["SUCCESS"] = "success";
32091
+ PrimaryRevenueEventType["FAILURE"] = "failure";
32092
+ PrimaryRevenueEventType["REJECTED"] = "rejected";
32093
+ })($8c83f59522c4ca40$export$b33478ffb988bd5e || ($8c83f59522c4ca40$export$b33478ffb988bd5e = {}));
32094
+
32095
+
32084
32096
  var $15cc9e120aa6f3bf$exports = {};
32085
32097
 
32086
32098
  $parcel$export($15cc9e120aa6f3bf$exports, "BridgeEventType", () => $15cc9e120aa6f3bf$export$d1bfa21f7c76447a);
@@ -32347,6 +32359,7 @@ var checkout_widgets = /*#__PURE__*/Object.freeze({
32347
32359
  get OnRampEventType () { return $d882ddc5600b1284$export$66ec39c0924078d8; },
32348
32360
  OnRampReact: $f94f63f2c041a04c$export$9e363c61ea99bbb4,
32349
32361
  get OrchestrationEventType () { return $ad06b030b1a3ba34$export$b80d2daf830437b9; },
32362
+ get PrimaryRevenueEventType () { return $8c83f59522c4ca40$export$b33478ffb988bd5e; },
32350
32363
  get SwapEventType () { return $53d219e7f6bf0cd6$export$140a49745ab55563; },
32351
32364
  SwapReact: $a4fbb8e3a6aeff58$export$971e031379577f4,
32352
32365
  UpdateConfig: $430e3eda76fa4d5f$export$bf1548ba7e61c17f,
package/dist/passport.js CHANGED
@@ -1785,7 +1785,7 @@ class MultiRollupApiClients {
1785
1785
  }
1786
1786
 
1787
1787
  // eslint-disable-next-line @typescript-eslint/naming-convention
1788
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.22.0-alpha.1' };
1788
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.22.1' };
1789
1789
  const createConfig = ({ basePath, headers, }) => {
1790
1790
  if (!basePath.trim()) {
1791
1791
  throw Error('basePath can not be empty');
@@ -1841,7 +1841,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
1841
1841
  chainID,
1842
1842
  coreContractAddress,
1843
1843
  registrationContractAddress,
1844
- sdkVersion: 'ts-immutable-sdk-0.22.0-alpha.1',
1844
+ sdkVersion: 'ts-immutable-sdk-0.22.1',
1845
1845
  });
1846
1846
  /**
1847
1847
  * 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.22.0-alpha.1",
4
+ "version": "0.22.1",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",