@imtbl/sdk 0.3.2-alpha → 0.4.0-alpha
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.js +2 -2
- package/dist/checkout_sdk.d.ts +3 -2
- package/dist/checkout_sdk.js +31 -9
- package/dist/checkout_widgets.js +1 -1
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +6 -6
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +35 -13
- package/dist/index.d.ts +3 -2
- package/dist/index.js +35 -13
- package/dist/passport.js +2 -2
- package/package.json +1 -1
package/dist/checkout_sdk.d.ts
CHANGED
|
@@ -618,8 +618,8 @@ type FungibleToken = Address | 'NATIVE';
|
|
|
618
618
|
*/
|
|
619
619
|
declare enum ChainId {
|
|
620
620
|
IMTBL_ZKEVM_MAINNET = 13371,
|
|
621
|
-
IMTBL_ZKEVM_TESTNET =
|
|
622
|
-
IMTBL_ZKEVM_DEVNET =
|
|
621
|
+
IMTBL_ZKEVM_TESTNET = 13372,
|
|
622
|
+
IMTBL_ZKEVM_DEVNET = 13423,
|
|
623
623
|
ETHEREUM = 1,
|
|
624
624
|
SEPOLIA = 11155111
|
|
625
625
|
}
|
|
@@ -1101,6 +1101,7 @@ declare class RemoteConfigFetcher {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
declare class CheckoutConfiguration {
|
|
1103
1103
|
readonly isDevelopment: boolean;
|
|
1104
|
+
readonly isLocal: boolean;
|
|
1104
1105
|
readonly isProduction: boolean;
|
|
1105
1106
|
readonly remote: RemoteConfigFetcher;
|
|
1106
1107
|
readonly environment: Environment;
|
package/dist/checkout_sdk.js
CHANGED
|
@@ -12740,8 +12740,8 @@ const $762782b6c862d954$export$db5daa1b5156ccfe = [
|
|
|
12740
12740
|
*/ var $0472f23319457bfb$export$c06e1e7429de6283;
|
|
12741
12741
|
(function(ChainId) {
|
|
12742
12742
|
ChainId[ChainId["IMTBL_ZKEVM_MAINNET"] = 13371] = "IMTBL_ZKEVM_MAINNET";
|
|
12743
|
-
ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] =
|
|
12744
|
-
ChainId[ChainId["IMTBL_ZKEVM_DEVNET"] =
|
|
12743
|
+
ChainId[ChainId["IMTBL_ZKEVM_TESTNET"] = 13372] = "IMTBL_ZKEVM_TESTNET";
|
|
12744
|
+
ChainId[ChainId["IMTBL_ZKEVM_DEVNET"] = 13423] = "IMTBL_ZKEVM_DEVNET";
|
|
12745
12745
|
ChainId[ChainId["ETHEREUM"] = 1] = "ETHEREUM";
|
|
12746
12746
|
ChainId[ChainId["SEPOLIA"] = 11155111] = "SEPOLIA";
|
|
12747
12747
|
})($0472f23319457bfb$export$c06e1e7429de6283 || ($0472f23319457bfb$export$c06e1e7429de6283 = {}));
|
|
@@ -12826,6 +12826,10 @@ const $d85ad1457a3f1a83$export$161d4a74df65fc08 = {
|
|
|
12826
12826
|
[(Environment$1).SANDBOX]: "https://checkout-api.sandbox.immutable.com",
|
|
12827
12827
|
[(Environment$1).PRODUCTION]: "https://checkout-api.immutable.com"
|
|
12828
12828
|
};
|
|
12829
|
+
const $d85ad1457a3f1a83$export$7b057be2a3f512cc = {
|
|
12830
|
+
[(Environment$1).SANDBOX]: "https://zkevm-rpc.sandbox.x.immutable.com",
|
|
12831
|
+
[(Environment$1).PRODUCTION]: "https://zkevm-rpc.x.immutable.com"
|
|
12832
|
+
};
|
|
12829
12833
|
const $d85ad1457a3f1a83$export$6f24f3cef7d501c4 = new Map([
|
|
12830
12834
|
[
|
|
12831
12835
|
($0472f23319457bfb$export$c06e1e7429de6283).ETHEREUM,
|
|
@@ -12851,7 +12855,7 @@ const $d85ad1457a3f1a83$export$6f24f3cef7d501c4 = new Map([
|
|
|
12851
12855
|
chainIdHex: `0x${($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_MAINNET.toString(16)}`,
|
|
12852
12856
|
chainName: ($0472f23319457bfb$export$b874c6b1dfe85e02).IMTBL_ZKEVM_MAINNET,
|
|
12853
12857
|
rpcUrls: [
|
|
12854
|
-
"https://
|
|
12858
|
+
"https://rpc.immutable.com"
|
|
12855
12859
|
],
|
|
12856
12860
|
nativeCurrency: {
|
|
12857
12861
|
name: "IMX",
|
|
@@ -12886,7 +12890,7 @@ const $d85ad1457a3f1a83$export$3e81fc0987227f10 = new Map([
|
|
|
12886
12890
|
chainIdHex: `0x${($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET.toString(16)}`,
|
|
12887
12891
|
chainName: ($0472f23319457bfb$export$b874c6b1dfe85e02).IMTBL_ZKEVM_TESTNET,
|
|
12888
12892
|
rpcUrls: [
|
|
12889
|
-
"https://
|
|
12893
|
+
"https://rpc.testnet.immutable.com"
|
|
12890
12894
|
],
|
|
12891
12895
|
nativeCurrency: {
|
|
12892
12896
|
name: "IMX",
|
|
@@ -13494,10 +13498,23 @@ class $4013c5c91bb535f6$export$6ad73ea7e1b6f37f extends Error {
|
|
|
13494
13498
|
this.message = message;
|
|
13495
13499
|
}
|
|
13496
13500
|
}
|
|
13497
|
-
const $4013c5c91bb535f6$var$networkMap = (prod, dev)=>{
|
|
13498
|
-
|
|
13499
|
-
if (
|
|
13500
|
-
|
|
13501
|
+
const $4013c5c91bb535f6$var$networkMap = (prod, dev, local)=>{
|
|
13502
|
+
let networks;
|
|
13503
|
+
if (dev) networks = ($d85ad1457a3f1a83$export$3a9ebede6a150274);
|
|
13504
|
+
else if (prod) {
|
|
13505
|
+
networks = ($d85ad1457a3f1a83$export$6f24f3cef7d501c4);
|
|
13506
|
+
if (local) {
|
|
13507
|
+
const rpcUrls = networks.get(($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_MAINNET)?.rpcUrls;
|
|
13508
|
+
rpcUrls?.splice(0, 1, ($d85ad1457a3f1a83$export$7b057be2a3f512cc)[(Environment$1).PRODUCTION]);
|
|
13509
|
+
}
|
|
13510
|
+
} else {
|
|
13511
|
+
networks = ($d85ad1457a3f1a83$export$3e81fc0987227f10);
|
|
13512
|
+
if (local) {
|
|
13513
|
+
const rpcUrls = networks.get(($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET)?.rpcUrls;
|
|
13514
|
+
rpcUrls?.splice(0, 1, ($d85ad1457a3f1a83$export$7b057be2a3f512cc)[(Environment$1).SANDBOX]);
|
|
13515
|
+
}
|
|
13516
|
+
}
|
|
13517
|
+
return networks;
|
|
13501
13518
|
};
|
|
13502
13519
|
const $4013c5c91bb535f6$export$9b794d067cdd1af6 = (config)=>{
|
|
13503
13520
|
// DevMode and Sandbox will both use Sepolia.
|
|
@@ -13515,6 +13532,11 @@ class $4013c5c91bb535f6$export$4823433c4a67bbc6 {
|
|
|
13515
13532
|
// This will be used to get around the lack of
|
|
13516
13533
|
// Environment.DEVELOPMENT
|
|
13517
13534
|
isDevelopment = false;
|
|
13535
|
+
// This is a hidden feature that is only available
|
|
13536
|
+
// when building the project from source code.
|
|
13537
|
+
// This will be used to get around the lack of
|
|
13538
|
+
// Environment.LOCAL_DEVELOPMENT
|
|
13539
|
+
isLocal = false;
|
|
13518
13540
|
isProduction;
|
|
13519
13541
|
remote;
|
|
13520
13542
|
environment;
|
|
@@ -13524,7 +13546,7 @@ class $4013c5c91bb535f6$export$4823433c4a67bbc6 {
|
|
|
13524
13546
|
this.environment = config.baseConfig.environment;
|
|
13525
13547
|
// Developer mode will super set any environment configuration
|
|
13526
13548
|
this.isProduction = !this.isDevelopment && this.environment === (Environment$1).PRODUCTION;
|
|
13527
|
-
this.networkMap = $4013c5c91bb535f6$var$networkMap(this.isProduction, this.isDevelopment);
|
|
13549
|
+
this.networkMap = $4013c5c91bb535f6$var$networkMap(this.isProduction, this.isDevelopment, this.isLocal);
|
|
13528
13550
|
this.remote = new ($a492ee374ae7b613$export$d902b56530cd5f87)({
|
|
13529
13551
|
isDevelopment: this.isDevelopment,
|
|
13530
13552
|
isProduction: this.isProduction
|
package/dist/checkout_widgets.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useEffect } from 'react';
|
|
|
4
4
|
function $parcel$export(e, n, v, s) {
|
|
5
5
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
6
6
|
}
|
|
7
|
-
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.
|
|
7
|
+
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.4.0-alpha";
|
|
8
8
|
const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
|
|
9
9
|
const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
|
|
10
10
|
|
|
@@ -16,7 +16,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
16
16
|
chainID,
|
|
17
17
|
coreContractAddress,
|
|
18
18
|
registrationContractAddress,
|
|
19
|
-
sdkVersion: 'ts-immutable-sdk-0.
|
|
19
|
+
sdkVersion: 'ts-immutable-sdk-0.4.0-alpha',
|
|
20
20
|
});
|
|
21
21
|
/**
|
|
22
22
|
* Sets `sdkVersion` at the time of build
|