@imtbl/sdk 1.35.2-alpha → 1.35.3
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/blockchain_data.js +2 -2
- package/dist/browser/checkout/{BridgeWidget-22c8b08d.js → BridgeWidget-b9e736eb.js} +1 -1
- package/dist/browser/checkout/{OnRampWidget-aeb5d57c.js → OnRampWidget-08bfa49c.js} +1 -1
- package/dist/browser/checkout/{SaleWidget-93a4fffd.js → SaleWidget-62cda384.js} +1 -1
- package/dist/browser/checkout/{SpendingCapHero-8459b91d.js → SpendingCapHero-341cfc38.js} +1 -1
- package/dist/browser/checkout/{SwapWidget-11ecb4ae.js → SwapWidget-40adbff0.js} +1 -1
- package/dist/browser/checkout/{TopUpView-ad058510.js → TopUpView-17d237f3.js} +1 -1
- package/dist/browser/checkout/{WalletWidget-920b03b4.js → WalletWidget-a19ab89c.js} +1 -1
- package/dist/browser/checkout/{auto-track-469b3ba5.js → auto-track-ffcab507.js} +1 -1
- package/dist/browser/checkout/{balance-c9c03af5.js → balance-4d6f9b6f.js} +1 -1
- package/dist/browser/checkout/{index-06896b92.js → index-11eefc56.js} +1 -1
- package/dist/browser/checkout/{index-09b1efac.js → index-317dcefc.js} +1 -1
- package/dist/browser/checkout/{index-9997f064.js → index-4fb1863d.js} +1 -1
- package/dist/browser/checkout/{index-e5f07d9e.js → index-7a9fdf09.js} +2 -2
- package/dist/browser/checkout/{index-cbf7168d.js → index-9a663258.js} +1 -1
- package/dist/browser/checkout/{index-37c4003a.js → index-ab21662b.js} +1 -1
- package/dist/browser/checkout/index-bafd7f6d.js +1 -0
- package/dist/browser/checkout/{index-c53e5321.js → index-be2f6fa5.js} +1 -1
- package/dist/browser/checkout/{index.umd-e783a603.js → index.umd-cb823fd6.js} +1 -1
- package/dist/browser/checkout/{retry-10de11e8.js → retry-0002f89a.js} +1 -1
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/browser/checkout/widgets-esm.js +1 -1
- package/dist/browser/checkout/widgets.js +1 -1
- package/dist/checkout.d.ts +14 -2
- package/dist/checkout.js +18 -13
- package/dist/config.js +1 -1
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +89 -578
- package/dist/index.d.ts +21 -114
- package/dist/index.js +90 -577
- package/dist/orderbook.js +1 -1
- package/dist/passport.js +64 -55
- package/dist/x.js +3 -3
- package/package.json +1 -9
- package/dist/browser/checkout/index-1b8b7ce9.js +0 -1
- package/dist/minting_backend.d.ts +0 -3506
- package/dist/minting_backend.js +0 -447
- package/dist/webhook.d.ts +0 -11
- package/dist/webhook.js +0 -388
package/dist/checkout.d.ts
CHANGED
|
@@ -14296,7 +14296,7 @@ type BuyOrder = {
|
|
|
14296
14296
|
*/
|
|
14297
14297
|
type SellOrder = {
|
|
14298
14298
|
/** the token to be listed for sale */
|
|
14299
|
-
sellToken:
|
|
14299
|
+
sellToken: SellToken;
|
|
14300
14300
|
/** the token info of the price of the item */
|
|
14301
14301
|
buyToken: BuyToken;
|
|
14302
14302
|
/** optional array of makerFees to be applied to the listing */
|
|
@@ -14338,7 +14338,7 @@ type ERC20BuyToken = {
|
|
|
14338
14338
|
* Represents the token listed for sale.
|
|
14339
14339
|
* ERC721SellToken or ERC1155SellToken {@link Checkout.smartCheckout}.
|
|
14340
14340
|
*/
|
|
14341
|
-
type SellToken = ERC721SellToken | ERC1155SellToken;
|
|
14341
|
+
type SellToken = DeprecatedERC721SellToken | ERC721SellToken | ERC1155SellToken;
|
|
14342
14342
|
/**
|
|
14343
14343
|
* The ERC721SellToken type
|
|
14344
14344
|
* @property {string} id
|
|
@@ -14351,6 +14351,18 @@ type ERC721SellToken = {
|
|
|
14351
14351
|
/** The ERC721 collection address */
|
|
14352
14352
|
collectionAddress: string;
|
|
14353
14353
|
};
|
|
14354
|
+
/**
|
|
14355
|
+
* The original ERC721SellToken type, before the introduction of the ItemType enum
|
|
14356
|
+
* @property {string} id
|
|
14357
|
+
* @property {string} collectionAddress
|
|
14358
|
+
* @deprecated
|
|
14359
|
+
*/
|
|
14360
|
+
type DeprecatedERC721SellToken = {
|
|
14361
|
+
/** The ERC721 token id */
|
|
14362
|
+
id: string;
|
|
14363
|
+
/** The ERC721 collection address */
|
|
14364
|
+
collectionAddress: string;
|
|
14365
|
+
};
|
|
14354
14366
|
/**
|
|
14355
14367
|
* The ERC1155SellToken type
|
|
14356
14368
|
* @property {string} id
|
package/dist/checkout.js
CHANGED
|
@@ -140,7 +140,7 @@ const flattenProperties$1 = (properties) => {
|
|
|
140
140
|
};
|
|
141
141
|
|
|
142
142
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
143
|
-
const SDK_VERSION$1 = '1.35.
|
|
143
|
+
const SDK_VERSION$1 = '1.35.3';
|
|
144
144
|
const getFrameParentDomain$1 = () => {
|
|
145
145
|
if (isNode$1()) {
|
|
146
146
|
return '';
|
|
@@ -28928,7 +28928,7 @@ const flattenProperties = (properties) => {
|
|
|
28928
28928
|
};
|
|
28929
28929
|
|
|
28930
28930
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
28931
|
-
const SDK_VERSION = '1.35.
|
|
28931
|
+
const SDK_VERSION = '1.35.3';
|
|
28932
28932
|
const getFrameParentDomain = () => {
|
|
28933
28933
|
if (isNode()) {
|
|
28934
28934
|
return '';
|
|
@@ -40051,7 +40051,7 @@ class APIError extends Error {
|
|
|
40051
40051
|
|
|
40052
40052
|
/* eslint-disable implicit-arrow-linebreak */
|
|
40053
40053
|
const defaultHeaders = {
|
|
40054
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.35.
|
|
40054
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.35.3',
|
|
40055
40055
|
};
|
|
40056
40056
|
/**
|
|
40057
40057
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -41557,7 +41557,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
|
|
|
41557
41557
|
maxPriorityFeePerGas: BigNumber$1.from(10e9),
|
|
41558
41558
|
};
|
|
41559
41559
|
|
|
41560
|
-
const SDK_VERSION_MARKER = '1.35.
|
|
41560
|
+
const SDK_VERSION_MARKER = '1.35.3';
|
|
41561
41561
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
41562
41562
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
41563
41563
|
|
|
@@ -45304,22 +45304,23 @@ const sell = async (config, provider, orders) => {
|
|
|
45304
45304
|
decimals = await measureAsyncExecution(config, 'Time to get decimals of token contract for the buy token', buyTokenContract.decimals());
|
|
45305
45305
|
}
|
|
45306
45306
|
const buyTokenOrNative = getBuyToken(buyToken, decimals);
|
|
45307
|
+
const sellTokenHasType = 'type' in sellToken;
|
|
45307
45308
|
try {
|
|
45308
45309
|
const walletAddress = await measureAsyncExecution(config, 'Time to get the address from the provider', provider.getSigner().getAddress());
|
|
45309
45310
|
orderbook = createOrderbookInstance(config);
|
|
45310
45311
|
const { seaportContractAddress } = orderbook.config();
|
|
45311
45312
|
spenderAddress = seaportContractAddress;
|
|
45312
|
-
const sellItem = sellToken.type === ItemType.
|
|
45313
|
+
const sellItem = sellTokenHasType && sellToken.type === ItemType.ERC1155
|
|
45313
45314
|
? {
|
|
45314
|
-
type:
|
|
45315
|
+
type: ItemType.ERC1155,
|
|
45315
45316
|
contractAddress: sellToken.collectionAddress,
|
|
45316
45317
|
tokenId: sellToken.id,
|
|
45318
|
+
amount: sellToken.amount,
|
|
45317
45319
|
}
|
|
45318
45320
|
: {
|
|
45319
|
-
type:
|
|
45321
|
+
type: ItemType.ERC721,
|
|
45320
45322
|
contractAddress: sellToken.collectionAddress,
|
|
45321
45323
|
tokenId: sellToken.id,
|
|
45322
|
-
amount: sellToken.amount,
|
|
45323
45324
|
};
|
|
45324
45325
|
listing = await measureAsyncExecution(config, 'Time to prepare the listing from the orderbook', orderbook.prepareListing({
|
|
45325
45326
|
makerAddress: walletAddress,
|
|
@@ -45335,11 +45336,15 @@ const sell = async (config, provider, orders) => {
|
|
|
45335
45336
|
collectionAddress: sellToken.collectionAddress,
|
|
45336
45337
|
});
|
|
45337
45338
|
}
|
|
45338
|
-
const itemRequirements = [
|
|
45339
|
-
|
|
45340
|
-
|
|
45341
|
-
|
|
45342
|
-
|
|
45339
|
+
const itemRequirements = [];
|
|
45340
|
+
if (sellTokenHasType && sellToken.type === ItemType.ERC1155) {
|
|
45341
|
+
const erc1155ItemRequirement = getERC1155Requirement(sellToken.id, sellToken.collectionAddress, spenderAddress, sellToken.amount);
|
|
45342
|
+
itemRequirements.push(erc1155ItemRequirement);
|
|
45343
|
+
}
|
|
45344
|
+
else {
|
|
45345
|
+
const erc721ItemRequirement = getERC721Requirement(sellToken.id, sellToken.collectionAddress, spenderAddress);
|
|
45346
|
+
itemRequirements.push(erc721ItemRequirement);
|
|
45347
|
+
}
|
|
45343
45348
|
let smartCheckoutResult;
|
|
45344
45349
|
const isPassport = provider.provider?.isPassport;
|
|
45345
45350
|
if (!isPassport) {
|
package/dist/config.js
CHANGED
|
@@ -128,7 +128,7 @@ const flattenProperties = (properties) => {
|
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
131
|
-
const SDK_VERSION = '1.35.
|
|
131
|
+
const SDK_VERSION = '1.35.3';
|
|
132
132
|
const getFrameParentDomain = () => {
|
|
133
133
|
if (isNode()) {
|
|
134
134
|
return '';
|