@imtbl/sdk 0.30.4 → 0.31.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 +2 -2
- package/dist/browser/checkout/sdk.js +6 -6
- package/dist/browser/checkout/widgets.js +2 -2
- package/dist/checkout_sdk.d.ts +30 -9
- package/dist/checkout_sdk.js +155 -124
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +158 -127
- package/dist/index.d.ts +37 -10
- package/dist/index.js +158 -127
- package/dist/orderbook.d.ts +2 -2
- package/dist/orderbook.js +11 -11
- package/dist/passport.js +3 -3
- package/package.json +1 -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
|
],
|
|
@@ -1265,8 +1265,8 @@ function getOrderbookConfig(environment) {
|
|
|
1265
1265
|
switch (environment) {
|
|
1266
1266
|
case Environment.SANDBOX:
|
|
1267
1267
|
return {
|
|
1268
|
-
seaportContractAddress: '
|
|
1269
|
-
zoneContractAddress: '
|
|
1268
|
+
seaportContractAddress: '0x2CFA8f64e1B49A2DF28532D1D30Cda45117cF778',
|
|
1269
|
+
zoneContractAddress: '0x1Bb4Fb11Ba021Bd0104F0Ee8E5F5c728Bc83d7F1',
|
|
1270
1270
|
apiEndpoint: 'https://api.sandbox.immutable.com',
|
|
1271
1271
|
chainName: TESTNET_CHAIN_NAME,
|
|
1272
1272
|
provider: new providers.JsonRpcProvider('https://rpc.testnet.immutable.com'),
|
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.
|
|
2194
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.31.0' };
|
|
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.
|
|
2250
|
+
sdkVersion: 'ts-immutable-sdk-0.31.0',
|
|
2251
2251
|
});
|
|
2252
2252
|
/**
|
|
2253
2253
|
* Sets `sdkVersion` at the time of build
|
|
@@ -6757,7 +6757,7 @@ const withPassportError = async (fn, customErrorType) => {
|
|
|
6757
6757
|
var ChainId;
|
|
6758
6758
|
(function (ChainId) {
|
|
6759
6759
|
ChainId[ChainId["IMTBL_ZKEVM_MAINNET"] = 13371] = "IMTBL_ZKEVM_MAINNET";
|
|
6760
|
-
ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] =
|
|
6760
|
+
ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] = 13473] = "IMTBL_ZKEVM_TESTNET";
|
|
6761
6761
|
ChainId[ChainId["IMTBL_ZKEVM_DEVNET"] = 13433] = "IMTBL_ZKEVM_DEVNET";
|
|
6762
6762
|
ChainId[ChainId["ETHEREUM"] = 1] = "ETHEREUM";
|
|
6763
6763
|
ChainId[ChainId["SEPOLIA"] = 11155111] = "SEPOLIA";
|
package/package.json
CHANGED