@imtbl/sdk 0.43.0 → 0.44.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.
- package/dist/blockchain_data.js +1 -1
- package/dist/browser/checkout/sdk.js +2 -2
- package/dist/browser/checkout/widgets.js +57 -57
- package/dist/checkout.d.ts +17 -2
- package/dist/checkout.js +19 -4
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +3 -3
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +21 -5
- package/dist/index.d.ts +19 -1
- package/dist/index.js +21 -5
- package/dist/passport.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -10641,7 +10641,7 @@ class MultiRollupApiClients {
|
|
|
10641
10641
|
}
|
|
10642
10642
|
|
|
10643
10643
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
10644
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.
|
|
10644
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.44.0' };
|
|
10645
10645
|
const createConfig = ({ basePath, headers, }) => {
|
|
10646
10646
|
if (!basePath.trim()) {
|
|
10647
10647
|
throw Error('basePath can not be empty');
|
|
@@ -10713,7 +10713,7 @@ class APIError extends Error {
|
|
|
10713
10713
|
|
|
10714
10714
|
/* eslint-disable implicit-arrow-linebreak */
|
|
10715
10715
|
const defaultHeaders = {
|
|
10716
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.
|
|
10716
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.44.0',
|
|
10717
10717
|
};
|
|
10718
10718
|
/**
|
|
10719
10719
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -11152,7 +11152,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
11152
11152
|
chainID,
|
|
11153
11153
|
coreContractAddress,
|
|
11154
11154
|
registrationContractAddress,
|
|
11155
|
-
sdkVersion: 'ts-immutable-sdk-0.
|
|
11155
|
+
sdkVersion: 'ts-immutable-sdk-0.44.0',
|
|
11156
11156
|
});
|
|
11157
11157
|
/**
|
|
11158
11158
|
* Sets `sdkVersion` at the time of build
|
|
@@ -41945,7 +41945,7 @@ const GAS_OVERRIDES = {
|
|
|
41945
41945
|
maxPriorityFeePerGas: ethers.BigNumber.from(101e9),
|
|
41946
41946
|
};
|
|
41947
41947
|
|
|
41948
|
-
const SDK_VERSION_MARKER = '0.
|
|
41948
|
+
const SDK_VERSION_MARKER = '0.44.0';
|
|
41949
41949
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
41950
41950
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
41951
41951
|
|
|
@@ -45213,7 +45213,7 @@ const sell = async (config, provider, orders) => {
|
|
|
45213
45213
|
if (orders.length === 0) {
|
|
45214
45214
|
throw new CheckoutError('No orders were provided to the orders array. Please provide at least one order.', CheckoutErrorType.PREPARE_ORDER_LISTING_ERROR);
|
|
45215
45215
|
}
|
|
45216
|
-
const { buyToken, sellToken, makerFees } = orders[0];
|
|
45216
|
+
const { buyToken, sellToken, makerFees, orderExpiry, } = orders[0];
|
|
45217
45217
|
let decimals = 18;
|
|
45218
45218
|
if (buyToken.type === ItemType.ERC20) {
|
|
45219
45219
|
// get this from the allowed list
|
|
@@ -45234,6 +45234,7 @@ const sell = async (config, provider, orders) => {
|
|
|
45234
45234
|
contractAddress: sellToken.collectionAddress,
|
|
45235
45235
|
tokenId: sellToken.id,
|
|
45236
45236
|
},
|
|
45237
|
+
orderExpiry,
|
|
45237
45238
|
}));
|
|
45238
45239
|
}
|
|
45239
45240
|
catch (err) {
|
|
@@ -45825,8 +45826,23 @@ class Checkout {
|
|
|
45825
45826
|
}
|
|
45826
45827
|
}
|
|
45827
45828
|
|
|
45829
|
+
class BlockExplorerService {
|
|
45830
|
+
/**
|
|
45831
|
+
* getTransationLink returns the link to the transaction on blockscout
|
|
45832
|
+
* @param hash transaction hash
|
|
45833
|
+
* @returns link to the transaction on blockscout
|
|
45834
|
+
*/
|
|
45835
|
+
static getTransactionLink(chainId, hash) {
|
|
45836
|
+
const url = BLOCKSCOUT_CHAIN_URL_MAP?.[chainId]?.url;
|
|
45837
|
+
if (!url || !hash)
|
|
45838
|
+
return undefined;
|
|
45839
|
+
return `${url}/tx/${hash}`;
|
|
45840
|
+
}
|
|
45841
|
+
}
|
|
45842
|
+
|
|
45828
45843
|
var checkout = /*#__PURE__*/Object.freeze({
|
|
45829
45844
|
__proto__: null,
|
|
45845
|
+
BlockExplorerService: BlockExplorerService,
|
|
45830
45846
|
get BridgeEventType () { return BridgeEventType; },
|
|
45831
45847
|
get ChainId () { return ChainId; },
|
|
45832
45848
|
get ChainName () { return ChainName; },
|
package/dist/index.d.ts
CHANGED
|
@@ -17202,8 +17202,10 @@ type SellOrder = {
|
|
|
17202
17202
|
sellToken: SellToken;
|
|
17203
17203
|
/** the token info of the price of the item */
|
|
17204
17204
|
buyToken: BuyToken;
|
|
17205
|
-
/**
|
|
17205
|
+
/** optional array of makerFees to be applied to the listing */
|
|
17206
17206
|
makerFees?: OrderFee[];
|
|
17207
|
+
/** optional order expiry date. Default order expiry to 2 years from now */
|
|
17208
|
+
orderExpiry?: Date;
|
|
17207
17209
|
};
|
|
17208
17210
|
/**
|
|
17209
17211
|
* Represents the token that the item can be bought with once listed for sale.
|
|
@@ -18895,10 +18897,14 @@ type OnRampWidgetParams = {
|
|
|
18895
18897
|
type SaleWidgetParams = {
|
|
18896
18898
|
/** The total price to pay for the items in the sale */
|
|
18897
18899
|
amount?: string;
|
|
18900
|
+
/** Environment id from Immutable Hub */
|
|
18898
18901
|
environmentId?: string;
|
|
18902
|
+
/** Contract address of the token accepted for payments */
|
|
18899
18903
|
fromTokenAddress?: string;
|
|
18900
18904
|
/** The list of products to be purchased */
|
|
18901
18905
|
items?: SaleItem[];
|
|
18906
|
+
/** The name of the NFT collection on sale */
|
|
18907
|
+
collectionName?: string;
|
|
18902
18908
|
/** The wallet provider name to default to if no web3Provider is passed */
|
|
18903
18909
|
walletProviderName?: WalletProviderName;
|
|
18904
18910
|
/** The language to use for the sales widget */
|
|
@@ -19442,9 +19448,20 @@ type ErrorType = {
|
|
|
19442
19448
|
};
|
|
19443
19449
|
};
|
|
19444
19450
|
|
|
19451
|
+
declare class BlockExplorerService {
|
|
19452
|
+
/**
|
|
19453
|
+
* getTransationLink returns the link to the transaction on blockscout
|
|
19454
|
+
* @param hash transaction hash
|
|
19455
|
+
* @returns link to the transaction on blockscout
|
|
19456
|
+
*/
|
|
19457
|
+
static getTransactionLink(chainId: ChainId, hash: string): string | undefined;
|
|
19458
|
+
}
|
|
19459
|
+
|
|
19445
19460
|
type checkout_d_AllowedNetworkConfig = AllowedNetworkConfig;
|
|
19446
19461
|
type checkout_d_AvailableRoutingOptions = AvailableRoutingOptions;
|
|
19447
19462
|
type checkout_d_BalanceDelta = BalanceDelta;
|
|
19463
|
+
type checkout_d_BlockExplorerService = BlockExplorerService;
|
|
19464
|
+
declare const checkout_d_BlockExplorerService: typeof BlockExplorerService;
|
|
19448
19465
|
type checkout_d_BridgeEventType = BridgeEventType;
|
|
19449
19466
|
declare const checkout_d_BridgeEventType: typeof BridgeEventType;
|
|
19450
19467
|
type checkout_d_BridgeFailed = BridgeFailed;
|
|
@@ -19654,6 +19671,7 @@ declare namespace checkout_d {
|
|
|
19654
19671
|
checkout_d_AllowedNetworkConfig as AllowedNetworkConfig,
|
|
19655
19672
|
checkout_d_AvailableRoutingOptions as AvailableRoutingOptions,
|
|
19656
19673
|
checkout_d_BalanceDelta as BalanceDelta,
|
|
19674
|
+
checkout_d_BlockExplorerService as BlockExplorerService,
|
|
19657
19675
|
checkout_d_BridgeEventType as BridgeEventType,
|
|
19658
19676
|
checkout_d_BridgeFailed as BridgeFailed,
|
|
19659
19677
|
checkout_d_BridgeFundingStep as BridgeFundingStep,
|
package/dist/index.js
CHANGED
|
@@ -10619,7 +10619,7 @@ class MultiRollupApiClients {
|
|
|
10619
10619
|
}
|
|
10620
10620
|
|
|
10621
10621
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
10622
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.
|
|
10622
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.44.0' };
|
|
10623
10623
|
const createConfig = ({ basePath, headers, }) => {
|
|
10624
10624
|
if (!basePath.trim()) {
|
|
10625
10625
|
throw Error('basePath can not be empty');
|
|
@@ -10691,7 +10691,7 @@ class APIError extends Error {
|
|
|
10691
10691
|
|
|
10692
10692
|
/* eslint-disable implicit-arrow-linebreak */
|
|
10693
10693
|
const defaultHeaders = {
|
|
10694
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.
|
|
10694
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.44.0',
|
|
10695
10695
|
};
|
|
10696
10696
|
/**
|
|
10697
10697
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -11130,7 +11130,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
11130
11130
|
chainID,
|
|
11131
11131
|
coreContractAddress,
|
|
11132
11132
|
registrationContractAddress,
|
|
11133
|
-
sdkVersion: 'ts-immutable-sdk-0.
|
|
11133
|
+
sdkVersion: 'ts-immutable-sdk-0.44.0',
|
|
11134
11134
|
});
|
|
11135
11135
|
/**
|
|
11136
11136
|
* Sets `sdkVersion` at the time of build
|
|
@@ -41923,7 +41923,7 @@ const GAS_OVERRIDES = {
|
|
|
41923
41923
|
maxPriorityFeePerGas: BigNumber$1.from(101e9),
|
|
41924
41924
|
};
|
|
41925
41925
|
|
|
41926
|
-
const SDK_VERSION_MARKER = '0.
|
|
41926
|
+
const SDK_VERSION_MARKER = '0.44.0';
|
|
41927
41927
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
41928
41928
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
41929
41929
|
|
|
@@ -45191,7 +45191,7 @@ const sell = async (config, provider, orders) => {
|
|
|
45191
45191
|
if (orders.length === 0) {
|
|
45192
45192
|
throw new CheckoutError('No orders were provided to the orders array. Please provide at least one order.', CheckoutErrorType.PREPARE_ORDER_LISTING_ERROR);
|
|
45193
45193
|
}
|
|
45194
|
-
const { buyToken, sellToken, makerFees } = orders[0];
|
|
45194
|
+
const { buyToken, sellToken, makerFees, orderExpiry, } = orders[0];
|
|
45195
45195
|
let decimals = 18;
|
|
45196
45196
|
if (buyToken.type === ItemType.ERC20) {
|
|
45197
45197
|
// get this from the allowed list
|
|
@@ -45212,6 +45212,7 @@ const sell = async (config, provider, orders) => {
|
|
|
45212
45212
|
contractAddress: sellToken.collectionAddress,
|
|
45213
45213
|
tokenId: sellToken.id,
|
|
45214
45214
|
},
|
|
45215
|
+
orderExpiry,
|
|
45215
45216
|
}));
|
|
45216
45217
|
}
|
|
45217
45218
|
catch (err) {
|
|
@@ -45803,8 +45804,23 @@ class Checkout {
|
|
|
45803
45804
|
}
|
|
45804
45805
|
}
|
|
45805
45806
|
|
|
45807
|
+
class BlockExplorerService {
|
|
45808
|
+
/**
|
|
45809
|
+
* getTransationLink returns the link to the transaction on blockscout
|
|
45810
|
+
* @param hash transaction hash
|
|
45811
|
+
* @returns link to the transaction on blockscout
|
|
45812
|
+
*/
|
|
45813
|
+
static getTransactionLink(chainId, hash) {
|
|
45814
|
+
const url = BLOCKSCOUT_CHAIN_URL_MAP?.[chainId]?.url;
|
|
45815
|
+
if (!url || !hash)
|
|
45816
|
+
return undefined;
|
|
45817
|
+
return `${url}/tx/${hash}`;
|
|
45818
|
+
}
|
|
45819
|
+
}
|
|
45820
|
+
|
|
45806
45821
|
var checkout = /*#__PURE__*/Object.freeze({
|
|
45807
45822
|
__proto__: null,
|
|
45823
|
+
BlockExplorerService: BlockExplorerService,
|
|
45808
45824
|
get BridgeEventType () { return BridgeEventType; },
|
|
45809
45825
|
get ChainId () { return ChainId; },
|
|
45810
45826
|
get ChainName () { return ChainName; },
|
package/dist/passport.js
CHANGED
|
@@ -8724,7 +8724,7 @@ class MultiRollupApiClients {
|
|
|
8724
8724
|
}
|
|
8725
8725
|
|
|
8726
8726
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
8727
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.
|
|
8727
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.44.0' };
|
|
8728
8728
|
const createConfig = ({ basePath, headers, }) => {
|
|
8729
8729
|
if (!basePath.trim()) {
|
|
8730
8730
|
throw Error('basePath can not be empty');
|
|
@@ -8792,7 +8792,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
8792
8792
|
chainID,
|
|
8793
8793
|
coreContractAddress,
|
|
8794
8794
|
registrationContractAddress,
|
|
8795
|
-
sdkVersion: 'ts-immutable-sdk-0.
|
|
8795
|
+
sdkVersion: 'ts-immutable-sdk-0.44.0',
|
|
8796
8796
|
});
|
|
8797
8797
|
/**
|
|
8798
8798
|
* Sets `sdkVersion` at the time of build
|
package/package.json
CHANGED