@imtbl/sdk 0.30.3 → 0.30.5
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 +3 -3
- package/dist/browser/checkout/widgets.js +53 -53
- package/dist/checkout_sdk.d.ts +0 -11
- package/dist/checkout_sdk.js +35 -37
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +8 -8
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +37 -39
- package/dist/index.d.ts +2 -13
- package/dist/index.js +37 -39
- package/dist/orderbook.d.ts +2 -2
- package/dist/orderbook.js +9 -9
- package/dist/passport.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3792,7 +3792,7 @@ class MultiRollupApiClients {
|
|
|
3792
3792
|
}
|
|
3793
3793
|
|
|
3794
3794
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3795
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.30.
|
|
3795
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.30.5' };
|
|
3796
3796
|
const createConfig = ({ basePath, headers, }) => {
|
|
3797
3797
|
if (!basePath.trim()) {
|
|
3798
3798
|
throw Error('basePath can not be empty');
|
|
@@ -3852,7 +3852,7 @@ class APIError extends Error {
|
|
|
3852
3852
|
|
|
3853
3853
|
/* eslint-disable implicit-arrow-linebreak */
|
|
3854
3854
|
const defaultHeaders = {
|
|
3855
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.30.
|
|
3855
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.30.5',
|
|
3856
3856
|
};
|
|
3857
3857
|
/**
|
|
3858
3858
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -4263,7 +4263,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
4263
4263
|
chainID,
|
|
4264
4264
|
coreContractAddress,
|
|
4265
4265
|
registrationContractAddress,
|
|
4266
|
-
sdkVersion: 'ts-immutable-sdk-0.30.
|
|
4266
|
+
sdkVersion: 'ts-immutable-sdk-0.30.5',
|
|
4267
4267
|
});
|
|
4268
4268
|
/**
|
|
4269
4269
|
* Sets `sdkVersion` at the time of build
|
|
@@ -11870,13 +11870,13 @@ function mapFromOpenApiOrder(order) {
|
|
|
11870
11870
|
return {
|
|
11871
11871
|
type: 'ERC20',
|
|
11872
11872
|
contractAddress: item.contract_address,
|
|
11873
|
-
amount: item.
|
|
11873
|
+
amount: item.amount,
|
|
11874
11874
|
};
|
|
11875
11875
|
}
|
|
11876
11876
|
if (item.item_type === 'NATIVE') {
|
|
11877
11877
|
return {
|
|
11878
11878
|
type: 'NATIVE',
|
|
11879
|
-
amount: item.
|
|
11879
|
+
amount: item.amount,
|
|
11880
11880
|
};
|
|
11881
11881
|
}
|
|
11882
11882
|
throw new Error('Buy items must be either ERC20 or NATIVE');
|
|
@@ -11924,13 +11924,13 @@ function mapFromOpenApiTrade(trade) {
|
|
|
11924
11924
|
return {
|
|
11925
11925
|
type: 'ERC20',
|
|
11926
11926
|
contractAddress: item.contract_address,
|
|
11927
|
-
amount: item.
|
|
11927
|
+
amount: item.amount,
|
|
11928
11928
|
};
|
|
11929
11929
|
}
|
|
11930
11930
|
if (item.item_type === 'NATIVE') {
|
|
11931
11931
|
return {
|
|
11932
11932
|
type: 'NATIVE',
|
|
11933
|
-
amount: item.
|
|
11933
|
+
amount: item.amount,
|
|
11934
11934
|
};
|
|
11935
11935
|
}
|
|
11936
11936
|
throw new Error('Buy items must be either ERC20 or NATIVE');
|
|
@@ -12070,8 +12070,8 @@ function mapImmutableOrderToSeaportOrderComponents(order, counter, zoneAddress)
|
|
|
12070
12070
|
switch (buyItem.item_type) {
|
|
12071
12071
|
case 'NATIVE':
|
|
12072
12072
|
return {
|
|
12073
|
-
startAmount: buyItem.
|
|
12074
|
-
endAmount: buyItem.
|
|
12073
|
+
startAmount: buyItem.amount,
|
|
12074
|
+
endAmount: buyItem.amount,
|
|
12075
12075
|
itemType: ItemType$1.NATIVE,
|
|
12076
12076
|
recipient: order.account_address,
|
|
12077
12077
|
token: ethers.constants.AddressZero,
|
|
@@ -12079,8 +12079,8 @@ function mapImmutableOrderToSeaportOrderComponents(order, counter, zoneAddress)
|
|
|
12079
12079
|
};
|
|
12080
12080
|
case 'ERC20':
|
|
12081
12081
|
return {
|
|
12082
|
-
startAmount: buyItem.
|
|
12083
|
-
endAmount: buyItem.
|
|
12082
|
+
startAmount: buyItem.amount,
|
|
12083
|
+
endAmount: buyItem.amount,
|
|
12084
12084
|
itemType: ItemType$1.ERC20,
|
|
12085
12085
|
recipient: order.account_address,
|
|
12086
12086
|
token: buyItem.contract_address || ethers.constants.AddressZero,
|
|
@@ -12401,7 +12401,7 @@ class ImmutableApiClient {
|
|
|
12401
12401
|
=== ItemType$1.NATIVE
|
|
12402
12402
|
? 'NATIVE'
|
|
12403
12403
|
: 'ERC20',
|
|
12404
|
-
|
|
12404
|
+
amount: orderComponents.consideration[0].startAmount,
|
|
12405
12405
|
contract_address: orderComponents.consideration[0].token,
|
|
12406
12406
|
},
|
|
12407
12407
|
],
|
|
@@ -31315,42 +31315,40 @@ function getTokenContract(address, contractInterface, signerOrProvider) {
|
|
|
31315
31315
|
|
|
31316
31316
|
const DUMMY_WALLET_ADDRESS = '0x0000000000000000000000000000000000000001';
|
|
31317
31317
|
const DEFAULT_TOKEN_DECIMALS = 18;
|
|
31318
|
-
async function
|
|
31319
|
-
if (tokenAddress === 'NATIVE') {
|
|
31320
|
-
return config.networkMap.get(chainId)?.nativeCurrency;
|
|
31321
|
-
}
|
|
31322
|
-
const contract = new ethers.Contract(tokenAddress, JSON.stringify(ERC20ABI), provider);
|
|
31323
|
-
const name = await contract.name();
|
|
31324
|
-
const symbol = await contract.symbol();
|
|
31325
|
-
const decimals = await contract.decimals();
|
|
31326
|
-
return {
|
|
31327
|
-
name,
|
|
31328
|
-
symbol,
|
|
31329
|
-
decimals,
|
|
31330
|
-
address: tokenAddress,
|
|
31331
|
-
};
|
|
31332
|
-
}
|
|
31333
|
-
async function bridgeToL2GasEstimator(readOnlyProviders, config, isSpendingCapApprovalRequired, tokenAddress) {
|
|
31318
|
+
async function bridgeToL2GasEstimator(readOnlyProviders, config, isSpendingCapApprovalRequired) {
|
|
31334
31319
|
const fromChainId = getL1ChainId(config);
|
|
31335
31320
|
const toChainId = getL2ChainId(config);
|
|
31336
31321
|
const gasEstimateTokensConfig = (await config.remote.getConfig('gasEstimateTokens'));
|
|
31337
|
-
const {
|
|
31322
|
+
const { fromAddress } = gasEstimateTokensConfig[fromChainId].bridgeToL2Addresses;
|
|
31338
31323
|
const provider = readOnlyProviders.get(fromChainId);
|
|
31339
31324
|
if (!provider)
|
|
31340
31325
|
throw new Error(`Missing JsonRpcProvider for chain id: ${fromChainId}`);
|
|
31341
31326
|
try {
|
|
31342
|
-
|
|
31343
|
-
|
|
31344
|
-
|
|
31345
|
-
|
|
31327
|
+
let gasFees = {};
|
|
31328
|
+
const getGasFees = async () => {
|
|
31329
|
+
gasFees = await getBridgeEstimatedGas(provider, isSpendingCapApprovalRequired);
|
|
31330
|
+
gasFees.token = config.networkMap.get(fromChainId)?.nativeCurrency;
|
|
31331
|
+
};
|
|
31332
|
+
let bridgeFees = {
|
|
31333
|
+
bridgeFee: {},
|
|
31334
|
+
bridgeable: false,
|
|
31335
|
+
};
|
|
31336
|
+
const getBridgeFees = async () => {
|
|
31337
|
+
const tokenBridge = await createBridgeInstance(fromChainId, toChainId, readOnlyProviders, config);
|
|
31338
|
+
bridgeFees = await getBridgeFeeEstimate$1(tokenBridge, fromAddress);
|
|
31339
|
+
};
|
|
31340
|
+
await Promise.all([
|
|
31341
|
+
getGasFees(),
|
|
31342
|
+
getBridgeFees(),
|
|
31343
|
+
]);
|
|
31346
31344
|
return {
|
|
31347
31345
|
gasEstimateType: GasEstimateType.BRIDGE_TO_L2,
|
|
31348
|
-
gasFee,
|
|
31346
|
+
gasFee: gasFees,
|
|
31349
31347
|
bridgeFee: {
|
|
31350
|
-
estimatedAmount: bridgeFee?.estimatedAmount,
|
|
31351
|
-
token: bridgeFee?.token,
|
|
31348
|
+
estimatedAmount: bridgeFees.bridgeFee?.estimatedAmount,
|
|
31349
|
+
token: bridgeFees.bridgeFee?.token,
|
|
31352
31350
|
},
|
|
31353
|
-
bridgeable,
|
|
31351
|
+
bridgeable: bridgeFees.bridgeable,
|
|
31354
31352
|
};
|
|
31355
31353
|
}
|
|
31356
31354
|
catch {
|
|
@@ -31406,7 +31404,7 @@ async function swapGasEstimator(config) {
|
|
|
31406
31404
|
async function gasEstimator(params, readOnlyProviders, config) {
|
|
31407
31405
|
switch (params.gasEstimateType) {
|
|
31408
31406
|
case GasEstimateType.BRIDGE_TO_L2:
|
|
31409
|
-
return await bridgeToL2GasEstimator(readOnlyProviders, config, params.isSpendingCapApprovalRequired
|
|
31407
|
+
return await bridgeToL2GasEstimator(readOnlyProviders, config, params.isSpendingCapApprovalRequired);
|
|
31410
31408
|
case GasEstimateType.SWAP:
|
|
31411
31409
|
return await swapGasEstimator(config);
|
|
31412
31410
|
default:
|
|
@@ -34024,7 +34022,7 @@ async function getItemRequirementsFromRequirements(provider, requirements) {
|
|
|
34024
34022
|
return itemRequirements;
|
|
34025
34023
|
}
|
|
34026
34024
|
|
|
34027
|
-
const SDK_VERSION_MARKER = '0.30.
|
|
34025
|
+
const SDK_VERSION_MARKER = '0.30.5';
|
|
34028
34026
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
34029
34027
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
34030
34028
|
|
package/dist/index.d.ts
CHANGED
|
@@ -14949,7 +14949,7 @@ type ERC20Item$1 = {
|
|
|
14949
14949
|
/**
|
|
14950
14950
|
* A string representing the starting price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum).
|
|
14951
14951
|
*/
|
|
14952
|
-
|
|
14952
|
+
amount: string;
|
|
14953
14953
|
};
|
|
14954
14954
|
|
|
14955
14955
|
type ERC721Item$1 = {
|
|
@@ -14975,7 +14975,7 @@ type NativeItem$1 = {
|
|
|
14975
14975
|
/**
|
|
14976
14976
|
* A string representing the starting price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum).
|
|
14977
14977
|
*/
|
|
14978
|
-
|
|
14978
|
+
amount: string;
|
|
14979
14979
|
};
|
|
14980
14980
|
|
|
14981
14981
|
type Item = (NativeItem$1 | ERC20Item$1 | ERC721Item$1);
|
|
@@ -16919,15 +16919,6 @@ interface CheckConnectionResult {
|
|
|
16919
16919
|
walletAddress: string;
|
|
16920
16920
|
}
|
|
16921
16921
|
|
|
16922
|
-
/**
|
|
16923
|
-
* @typedef {string} Address - Represents an Ethereum address.
|
|
16924
|
-
*/
|
|
16925
|
-
type Address = string;
|
|
16926
|
-
/**
|
|
16927
|
-
* @typedef {Address | 'NATIVE'} FungibleToken - Represents a fungible token, either an ERC20 token address or the native token.
|
|
16928
|
-
*/
|
|
16929
|
-
type FungibleToken = Address | 'NATIVE';
|
|
16930
|
-
|
|
16931
16922
|
/**
|
|
16932
16923
|
* An enum representing the type of gas estimate.
|
|
16933
16924
|
* @enum {string}
|
|
@@ -16948,12 +16939,10 @@ type GasEstimateParams = GasEstimateBridgeToL2Params | GasEstimateSwapParams;
|
|
|
16948
16939
|
* An interface representing the parameters for estimating gas for a bridge to L2 transaction {@link Checkout.gasEstimate}.
|
|
16949
16940
|
* @param {GasEstimateType.BRIDGE_TO_L2} gasEstimateType - The type of gas estimate.
|
|
16950
16941
|
* @param {boolean} isSpendingCapApprovalRequired - Whether or not spending cap approval is required.
|
|
16951
|
-
* @param {FungibleToken | undefined} tokenAddress - The address of the fungible token to use in the transaction.
|
|
16952
16942
|
*/
|
|
16953
16943
|
interface GasEstimateBridgeToL2Params {
|
|
16954
16944
|
gasEstimateType: GasEstimateType.BRIDGE_TO_L2;
|
|
16955
16945
|
isSpendingCapApprovalRequired: boolean;
|
|
16956
|
-
tokenAddress?: FungibleToken;
|
|
16957
16946
|
}
|
|
16958
16947
|
/**
|
|
16959
16948
|
* An interface representing the parameters for a gas estimate swap {@link Checkout.gasEstimate}.
|
package/dist/index.js
CHANGED
|
@@ -3770,7 +3770,7 @@ class MultiRollupApiClients {
|
|
|
3770
3770
|
}
|
|
3771
3771
|
|
|
3772
3772
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3773
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.30.
|
|
3773
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.30.5' };
|
|
3774
3774
|
const createConfig = ({ basePath, headers, }) => {
|
|
3775
3775
|
if (!basePath.trim()) {
|
|
3776
3776
|
throw Error('basePath can not be empty');
|
|
@@ -3830,7 +3830,7 @@ class APIError extends Error {
|
|
|
3830
3830
|
|
|
3831
3831
|
/* eslint-disable implicit-arrow-linebreak */
|
|
3832
3832
|
const defaultHeaders = {
|
|
3833
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.30.
|
|
3833
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.30.5',
|
|
3834
3834
|
};
|
|
3835
3835
|
/**
|
|
3836
3836
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -4241,7 +4241,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
4241
4241
|
chainID,
|
|
4242
4242
|
coreContractAddress,
|
|
4243
4243
|
registrationContractAddress,
|
|
4244
|
-
sdkVersion: 'ts-immutable-sdk-0.30.
|
|
4244
|
+
sdkVersion: 'ts-immutable-sdk-0.30.5',
|
|
4245
4245
|
});
|
|
4246
4246
|
/**
|
|
4247
4247
|
* Sets `sdkVersion` at the time of build
|
|
@@ -11848,13 +11848,13 @@ function mapFromOpenApiOrder(order) {
|
|
|
11848
11848
|
return {
|
|
11849
11849
|
type: 'ERC20',
|
|
11850
11850
|
contractAddress: item.contract_address,
|
|
11851
|
-
amount: item.
|
|
11851
|
+
amount: item.amount,
|
|
11852
11852
|
};
|
|
11853
11853
|
}
|
|
11854
11854
|
if (item.item_type === 'NATIVE') {
|
|
11855
11855
|
return {
|
|
11856
11856
|
type: 'NATIVE',
|
|
11857
|
-
amount: item.
|
|
11857
|
+
amount: item.amount,
|
|
11858
11858
|
};
|
|
11859
11859
|
}
|
|
11860
11860
|
throw new Error('Buy items must be either ERC20 or NATIVE');
|
|
@@ -11902,13 +11902,13 @@ function mapFromOpenApiTrade(trade) {
|
|
|
11902
11902
|
return {
|
|
11903
11903
|
type: 'ERC20',
|
|
11904
11904
|
contractAddress: item.contract_address,
|
|
11905
|
-
amount: item.
|
|
11905
|
+
amount: item.amount,
|
|
11906
11906
|
};
|
|
11907
11907
|
}
|
|
11908
11908
|
if (item.item_type === 'NATIVE') {
|
|
11909
11909
|
return {
|
|
11910
11910
|
type: 'NATIVE',
|
|
11911
|
-
amount: item.
|
|
11911
|
+
amount: item.amount,
|
|
11912
11912
|
};
|
|
11913
11913
|
}
|
|
11914
11914
|
throw new Error('Buy items must be either ERC20 or NATIVE');
|
|
@@ -12048,8 +12048,8 @@ function mapImmutableOrderToSeaportOrderComponents(order, counter, zoneAddress)
|
|
|
12048
12048
|
switch (buyItem.item_type) {
|
|
12049
12049
|
case 'NATIVE':
|
|
12050
12050
|
return {
|
|
12051
|
-
startAmount: buyItem.
|
|
12052
|
-
endAmount: buyItem.
|
|
12051
|
+
startAmount: buyItem.amount,
|
|
12052
|
+
endAmount: buyItem.amount,
|
|
12053
12053
|
itemType: ItemType$1.NATIVE,
|
|
12054
12054
|
recipient: order.account_address,
|
|
12055
12055
|
token: constants$1.AddressZero,
|
|
@@ -12057,8 +12057,8 @@ function mapImmutableOrderToSeaportOrderComponents(order, counter, zoneAddress)
|
|
|
12057
12057
|
};
|
|
12058
12058
|
case 'ERC20':
|
|
12059
12059
|
return {
|
|
12060
|
-
startAmount: buyItem.
|
|
12061
|
-
endAmount: buyItem.
|
|
12060
|
+
startAmount: buyItem.amount,
|
|
12061
|
+
endAmount: buyItem.amount,
|
|
12062
12062
|
itemType: ItemType$1.ERC20,
|
|
12063
12063
|
recipient: order.account_address,
|
|
12064
12064
|
token: buyItem.contract_address || constants$1.AddressZero,
|
|
@@ -12379,7 +12379,7 @@ class ImmutableApiClient {
|
|
|
12379
12379
|
=== ItemType$1.NATIVE
|
|
12380
12380
|
? 'NATIVE'
|
|
12381
12381
|
: 'ERC20',
|
|
12382
|
-
|
|
12382
|
+
amount: orderComponents.consideration[0].startAmount,
|
|
12383
12383
|
contract_address: orderComponents.consideration[0].token,
|
|
12384
12384
|
},
|
|
12385
12385
|
],
|
|
@@ -31293,42 +31293,40 @@ function getTokenContract(address, contractInterface, signerOrProvider) {
|
|
|
31293
31293
|
|
|
31294
31294
|
const DUMMY_WALLET_ADDRESS = '0x0000000000000000000000000000000000000001';
|
|
31295
31295
|
const DEFAULT_TOKEN_DECIMALS = 18;
|
|
31296
|
-
async function
|
|
31297
|
-
if (tokenAddress === 'NATIVE') {
|
|
31298
|
-
return config.networkMap.get(chainId)?.nativeCurrency;
|
|
31299
|
-
}
|
|
31300
|
-
const contract = new Contract$1(tokenAddress, JSON.stringify(ERC20ABI), provider);
|
|
31301
|
-
const name = await contract.name();
|
|
31302
|
-
const symbol = await contract.symbol();
|
|
31303
|
-
const decimals = await contract.decimals();
|
|
31304
|
-
return {
|
|
31305
|
-
name,
|
|
31306
|
-
symbol,
|
|
31307
|
-
decimals,
|
|
31308
|
-
address: tokenAddress,
|
|
31309
|
-
};
|
|
31310
|
-
}
|
|
31311
|
-
async function bridgeToL2GasEstimator(readOnlyProviders, config, isSpendingCapApprovalRequired, tokenAddress) {
|
|
31296
|
+
async function bridgeToL2GasEstimator(readOnlyProviders, config, isSpendingCapApprovalRequired) {
|
|
31312
31297
|
const fromChainId = getL1ChainId(config);
|
|
31313
31298
|
const toChainId = getL2ChainId(config);
|
|
31314
31299
|
const gasEstimateTokensConfig = (await config.remote.getConfig('gasEstimateTokens'));
|
|
31315
|
-
const {
|
|
31300
|
+
const { fromAddress } = gasEstimateTokensConfig[fromChainId].bridgeToL2Addresses;
|
|
31316
31301
|
const provider = readOnlyProviders.get(fromChainId);
|
|
31317
31302
|
if (!provider)
|
|
31318
31303
|
throw new Error(`Missing JsonRpcProvider for chain id: ${fromChainId}`);
|
|
31319
31304
|
try {
|
|
31320
|
-
|
|
31321
|
-
|
|
31322
|
-
|
|
31323
|
-
|
|
31305
|
+
let gasFees = {};
|
|
31306
|
+
const getGasFees = async () => {
|
|
31307
|
+
gasFees = await getBridgeEstimatedGas(provider, isSpendingCapApprovalRequired);
|
|
31308
|
+
gasFees.token = config.networkMap.get(fromChainId)?.nativeCurrency;
|
|
31309
|
+
};
|
|
31310
|
+
let bridgeFees = {
|
|
31311
|
+
bridgeFee: {},
|
|
31312
|
+
bridgeable: false,
|
|
31313
|
+
};
|
|
31314
|
+
const getBridgeFees = async () => {
|
|
31315
|
+
const tokenBridge = await createBridgeInstance(fromChainId, toChainId, readOnlyProviders, config);
|
|
31316
|
+
bridgeFees = await getBridgeFeeEstimate$1(tokenBridge, fromAddress);
|
|
31317
|
+
};
|
|
31318
|
+
await Promise.all([
|
|
31319
|
+
getGasFees(),
|
|
31320
|
+
getBridgeFees(),
|
|
31321
|
+
]);
|
|
31324
31322
|
return {
|
|
31325
31323
|
gasEstimateType: GasEstimateType.BRIDGE_TO_L2,
|
|
31326
|
-
gasFee,
|
|
31324
|
+
gasFee: gasFees,
|
|
31327
31325
|
bridgeFee: {
|
|
31328
|
-
estimatedAmount: bridgeFee?.estimatedAmount,
|
|
31329
|
-
token: bridgeFee?.token,
|
|
31326
|
+
estimatedAmount: bridgeFees.bridgeFee?.estimatedAmount,
|
|
31327
|
+
token: bridgeFees.bridgeFee?.token,
|
|
31330
31328
|
},
|
|
31331
|
-
bridgeable,
|
|
31329
|
+
bridgeable: bridgeFees.bridgeable,
|
|
31332
31330
|
};
|
|
31333
31331
|
}
|
|
31334
31332
|
catch {
|
|
@@ -31384,7 +31382,7 @@ async function swapGasEstimator(config) {
|
|
|
31384
31382
|
async function gasEstimator(params, readOnlyProviders, config) {
|
|
31385
31383
|
switch (params.gasEstimateType) {
|
|
31386
31384
|
case GasEstimateType.BRIDGE_TO_L2:
|
|
31387
|
-
return await bridgeToL2GasEstimator(readOnlyProviders, config, params.isSpendingCapApprovalRequired
|
|
31385
|
+
return await bridgeToL2GasEstimator(readOnlyProviders, config, params.isSpendingCapApprovalRequired);
|
|
31388
31386
|
case GasEstimateType.SWAP:
|
|
31389
31387
|
return await swapGasEstimator(config);
|
|
31390
31388
|
default:
|
|
@@ -34002,7 +34000,7 @@ async function getItemRequirementsFromRequirements(provider, requirements) {
|
|
|
34002
34000
|
return itemRequirements;
|
|
34003
34001
|
}
|
|
34004
34002
|
|
|
34005
|
-
const SDK_VERSION_MARKER = '0.30.
|
|
34003
|
+
const SDK_VERSION_MARKER = '0.30.5';
|
|
34006
34004
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
34007
34005
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
34008
34006
|
|
package/dist/orderbook.d.ts
CHANGED
|
@@ -761,7 +761,7 @@ type ERC20Item$1 = {
|
|
|
761
761
|
/**
|
|
762
762
|
* A string representing the starting price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum).
|
|
763
763
|
*/
|
|
764
|
-
|
|
764
|
+
amount: string;
|
|
765
765
|
};
|
|
766
766
|
|
|
767
767
|
type ERC721Item$1 = {
|
|
@@ -787,7 +787,7 @@ type NativeItem$1 = {
|
|
|
787
787
|
/**
|
|
788
788
|
* A string representing the starting price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum).
|
|
789
789
|
*/
|
|
790
|
-
|
|
790
|
+
amount: string;
|
|
791
791
|
};
|
|
792
792
|
|
|
793
793
|
type Item = (NativeItem$1 | ERC20Item$1 | ERC721Item$1);
|
package/dist/orderbook.js
CHANGED
|
@@ -679,13 +679,13 @@ function mapFromOpenApiOrder(order) {
|
|
|
679
679
|
return {
|
|
680
680
|
type: 'ERC20',
|
|
681
681
|
contractAddress: item.contract_address,
|
|
682
|
-
amount: item.
|
|
682
|
+
amount: item.amount,
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
685
|
if (item.item_type === 'NATIVE') {
|
|
686
686
|
return {
|
|
687
687
|
type: 'NATIVE',
|
|
688
|
-
amount: item.
|
|
688
|
+
amount: item.amount,
|
|
689
689
|
};
|
|
690
690
|
}
|
|
691
691
|
throw new Error('Buy items must be either ERC20 or NATIVE');
|
|
@@ -733,13 +733,13 @@ function mapFromOpenApiTrade(trade) {
|
|
|
733
733
|
return {
|
|
734
734
|
type: 'ERC20',
|
|
735
735
|
contractAddress: item.contract_address,
|
|
736
|
-
amount: item.
|
|
736
|
+
amount: item.amount,
|
|
737
737
|
};
|
|
738
738
|
}
|
|
739
739
|
if (item.item_type === 'NATIVE') {
|
|
740
740
|
return {
|
|
741
741
|
type: 'NATIVE',
|
|
742
|
-
amount: item.
|
|
742
|
+
amount: item.amount,
|
|
743
743
|
};
|
|
744
744
|
}
|
|
745
745
|
throw new Error('Buy items must be either ERC20 or NATIVE');
|
|
@@ -879,8 +879,8 @@ function mapImmutableOrderToSeaportOrderComponents(order, counter, zoneAddress)
|
|
|
879
879
|
switch (buyItem.item_type) {
|
|
880
880
|
case 'NATIVE':
|
|
881
881
|
return {
|
|
882
|
-
startAmount: buyItem.
|
|
883
|
-
endAmount: buyItem.
|
|
882
|
+
startAmount: buyItem.amount,
|
|
883
|
+
endAmount: buyItem.amount,
|
|
884
884
|
itemType: ItemType.NATIVE,
|
|
885
885
|
recipient: order.account_address,
|
|
886
886
|
token: constants$1.AddressZero,
|
|
@@ -888,8 +888,8 @@ function mapImmutableOrderToSeaportOrderComponents(order, counter, zoneAddress)
|
|
|
888
888
|
};
|
|
889
889
|
case 'ERC20':
|
|
890
890
|
return {
|
|
891
|
-
startAmount: buyItem.
|
|
892
|
-
endAmount: buyItem.
|
|
891
|
+
startAmount: buyItem.amount,
|
|
892
|
+
endAmount: buyItem.amount,
|
|
893
893
|
itemType: ItemType.ERC20,
|
|
894
894
|
recipient: order.account_address,
|
|
895
895
|
token: buyItem.contract_address || constants$1.AddressZero,
|
|
@@ -1210,7 +1210,7 @@ class ImmutableApiClient {
|
|
|
1210
1210
|
=== ItemType.NATIVE
|
|
1211
1211
|
? 'NATIVE'
|
|
1212
1212
|
: 'ERC20',
|
|
1213
|
-
|
|
1213
|
+
amount: orderComponents.consideration[0].startAmount,
|
|
1214
1214
|
contract_address: orderComponents.consideration[0].token,
|
|
1215
1215
|
},
|
|
1216
1216
|
],
|
package/dist/passport.js
CHANGED
|
@@ -2191,7 +2191,7 @@ class MultiRollupApiClients {
|
|
|
2191
2191
|
}
|
|
2192
2192
|
|
|
2193
2193
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2194
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.30.
|
|
2194
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.30.5' };
|
|
2195
2195
|
const createConfig = ({ basePath, headers, }) => {
|
|
2196
2196
|
if (!basePath.trim()) {
|
|
2197
2197
|
throw Error('basePath can not be empty');
|
|
@@ -2247,7 +2247,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
2247
2247
|
chainID,
|
|
2248
2248
|
coreContractAddress,
|
|
2249
2249
|
registrationContractAddress,
|
|
2250
|
-
sdkVersion: 'ts-immutable-sdk-0.30.
|
|
2250
|
+
sdkVersion: 'ts-immutable-sdk-0.30.5',
|
|
2251
2251
|
});
|
|
2252
2252
|
/**
|
|
2253
2253
|
* Sets `sdkVersion` at the time of build
|
package/package.json
CHANGED