@tria-sdk/constants 1.0.19 → 1.0.20
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/index.js +4 -20
- package/dist/src/chains.js +49 -52
- package/dist/src/config.js +10 -17
- package/dist/src/connect.js +5 -8
- package/dist/src/txn.js +59 -62
- package/package.json +1 -1
- package/tsconfig.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./src/config"), exports);
|
|
18
|
-
__exportStar(require("./src/chains"), exports);
|
|
19
|
-
__exportStar(require("./src/txn"), exports);
|
|
20
|
-
__exportStar(require("./src/connect"), exports);
|
|
1
|
+
export * from "./src/config";
|
|
2
|
+
export * from "./src/chains";
|
|
3
|
+
export * from "./src/txn";
|
|
4
|
+
export * from "./src/connect";
|
package/dist/src/chains.js
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
exports.sepolia = "SEPOLIA";
|
|
9
|
-
exports.polygonAmoy = "AMOY";
|
|
10
|
-
exports.TESTNET_CHAINS = [
|
|
1
|
+
export const zkLink = "ZKLINK-NOVA";
|
|
2
|
+
export const zkLinkTestnet = "ZKLINK-NOVA-TESTNET";
|
|
3
|
+
export const bitlayerTestnet = "BITLAYER-TESTNET";
|
|
4
|
+
export const neoxTestnet = "NEOX-TESTNET";
|
|
5
|
+
export const sepolia = "SEPOLIA";
|
|
6
|
+
export const polygonAmoy = "AMOY";
|
|
7
|
+
export const TESTNET_CHAINS = [
|
|
11
8
|
"MUMBAI",
|
|
12
9
|
"FUSESPARK",
|
|
13
10
|
"MANTA-TESTNET",
|
|
14
11
|
"METIS-TESTNET",
|
|
15
12
|
"MANTLE-TESTNET",
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
zkLinkTestnet,
|
|
14
|
+
bitlayerTestnet,
|
|
15
|
+
neoxTestnet,
|
|
16
|
+
sepolia,
|
|
17
|
+
polygonAmoy,
|
|
21
18
|
];
|
|
22
|
-
|
|
19
|
+
export const SUPPORTED_EVM_CHAINS = [
|
|
23
20
|
"ETH",
|
|
24
21
|
"POLYGON",
|
|
25
22
|
"AVALANCHE",
|
|
@@ -36,14 +33,14 @@ exports.SUPPORTED_EVM_CHAINS = [
|
|
|
36
33
|
"METIS-TESTNET",
|
|
37
34
|
"MANTLE",
|
|
38
35
|
"MANTLE-TESTNET",
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
zkLink,
|
|
37
|
+
zkLinkTestnet,
|
|
38
|
+
bitlayerTestnet,
|
|
39
|
+
neoxTestnet,
|
|
40
|
+
sepolia,
|
|
41
|
+
polygonAmoy,
|
|
45
42
|
];
|
|
46
|
-
|
|
43
|
+
export const AA_SUPPORTED_EVM_CHAINS = [
|
|
47
44
|
// "ETH",
|
|
48
45
|
"POLYGON",
|
|
49
46
|
// "AVALANCHE",
|
|
@@ -53,9 +50,9 @@ exports.AA_SUPPORTED_EVM_CHAINS = [
|
|
|
53
50
|
"FUSE",
|
|
54
51
|
"MUMBAI",
|
|
55
52
|
// "MANTLE",
|
|
56
|
-
|
|
53
|
+
sepolia,
|
|
57
54
|
];
|
|
58
|
-
|
|
55
|
+
export const ALLCHAINS = [
|
|
59
56
|
"ETH",
|
|
60
57
|
"POLYGON",
|
|
61
58
|
"AVALANCHE",
|
|
@@ -73,23 +70,23 @@ exports.ALLCHAINS = [
|
|
|
73
70
|
"MANTLE",
|
|
74
71
|
"MANTLE-TESTNET",
|
|
75
72
|
"SOLANA",
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
73
|
+
zkLink,
|
|
74
|
+
zkLinkTestnet,
|
|
75
|
+
bitlayerTestnet,
|
|
76
|
+
neoxTestnet,
|
|
77
|
+
sepolia,
|
|
78
|
+
polygonAmoy,
|
|
82
79
|
];
|
|
83
80
|
const baseLogoUrl = "https://static.tria.so/chain-logo-w";
|
|
84
81
|
const baseLogoUrlBlack = "https://static.tria.so/chain-logo-b";
|
|
85
|
-
|
|
82
|
+
export const networks = [
|
|
86
83
|
{
|
|
87
84
|
chainName: "ETH",
|
|
88
85
|
logo: `${baseLogoUrl}/Ethereum.webp`,
|
|
89
86
|
type: "mainnet",
|
|
90
87
|
},
|
|
91
88
|
{
|
|
92
|
-
chainName:
|
|
89
|
+
chainName: sepolia,
|
|
93
90
|
logo: `${baseLogoUrl}/Ethereum.webp`,
|
|
94
91
|
type: "testnet",
|
|
95
92
|
},
|
|
@@ -104,7 +101,7 @@ exports.networks = [
|
|
|
104
101
|
type: "mainnet",
|
|
105
102
|
},
|
|
106
103
|
{
|
|
107
|
-
chainName:
|
|
104
|
+
chainName: polygonAmoy,
|
|
108
105
|
logo: `${baseLogoUrl}/Polygon.svg`,
|
|
109
106
|
type: "testnet",
|
|
110
107
|
},
|
|
@@ -183,32 +180,32 @@ exports.networks = [
|
|
|
183
180
|
type: "mainnet",
|
|
184
181
|
},
|
|
185
182
|
{
|
|
186
|
-
chainName:
|
|
183
|
+
chainName: zkLink,
|
|
187
184
|
logo: `${baseLogoUrl}/zklink.webp`,
|
|
188
185
|
type: "mainnet",
|
|
189
186
|
},
|
|
190
187
|
{
|
|
191
|
-
chainName:
|
|
188
|
+
chainName: zkLinkTestnet,
|
|
192
189
|
logo: `${baseLogoUrl}/zklink.webp`,
|
|
193
190
|
type: "testnet",
|
|
194
191
|
},
|
|
195
192
|
{
|
|
196
|
-
chainName:
|
|
193
|
+
chainName: bitlayerTestnet,
|
|
197
194
|
logo: `${baseLogoUrl}/bitlayer.webp`,
|
|
198
195
|
type: "testnet",
|
|
199
196
|
},
|
|
200
197
|
{
|
|
201
|
-
chainName:
|
|
198
|
+
chainName: neoxTestnet,
|
|
202
199
|
logo: `${baseLogoUrl}/neox.webp`,
|
|
203
200
|
type: "testnet",
|
|
204
201
|
},
|
|
205
202
|
];
|
|
206
|
-
|
|
203
|
+
export const chainNameToLogo = {
|
|
207
204
|
ETH: `${baseLogoUrl}/Ethereum.webp`,
|
|
208
|
-
[
|
|
205
|
+
[sepolia]: `${baseLogoUrl}/Ethereum.webp`,
|
|
209
206
|
FANTOM: `${baseLogoUrl}/Fantom.webp`,
|
|
210
207
|
POLYGON: `${baseLogoUrl}/Polygon.webp`,
|
|
211
|
-
[
|
|
208
|
+
[polygonAmoy]: `${baseLogoUrl}/Polygon.webp`,
|
|
212
209
|
AVALANCHE: `${baseLogoUrl}/Avalanche.webp`,
|
|
213
210
|
OPTIMISM: `${baseLogoUrl}/Optimism.webp`,
|
|
214
211
|
ARBITRUM: `${baseLogoUrl}/Arbitrum.webp`,
|
|
@@ -224,18 +221,18 @@ exports.chainNameToLogo = {
|
|
|
224
221
|
MANTLE: `${baseLogoUrl}/Mantle.webp`,
|
|
225
222
|
"MANTLE-TESTNET": `${baseLogoUrl}/Mantle.webp`,
|
|
226
223
|
SOLANA: `${baseLogoUrl}/Solana.webp`,
|
|
227
|
-
[
|
|
228
|
-
[
|
|
229
|
-
[
|
|
230
|
-
[
|
|
224
|
+
[zkLink]: `${baseLogoUrl}/zklink.webp`,
|
|
225
|
+
[zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
|
|
226
|
+
[bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
|
|
227
|
+
[neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
|
|
231
228
|
};
|
|
232
|
-
|
|
229
|
+
export const chainNameToLogoBlack = {
|
|
233
230
|
ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
|
|
234
|
-
[
|
|
231
|
+
[sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
|
|
235
232
|
BINANCE: `${baseLogoUrlBlack}/binance.webp`,
|
|
236
233
|
FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
|
|
237
234
|
POLYGON: `${baseLogoUrlBlack}/Polygon.webp`,
|
|
238
|
-
[
|
|
235
|
+
[polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
|
|
239
236
|
AVALANCHE: `${baseLogoUrlBlack}/Avalanche.webp`,
|
|
240
237
|
OPTIMISM: `${baseLogoUrlBlack}/Optimism.webp`,
|
|
241
238
|
ARBITRUM: `${baseLogoUrlBlack}/Arbitrum.webp`,
|
|
@@ -250,8 +247,8 @@ exports.chainNameToLogoBlack = {
|
|
|
250
247
|
MANTLE: `${baseLogoUrlBlack}/Mantle.webp`,
|
|
251
248
|
"MANTLE-TESTNET": `${baseLogoUrlBlack}/Mantle.webp`,
|
|
252
249
|
SOLANA: `${baseLogoUrlBlack}/Solana.webp`,
|
|
253
|
-
[
|
|
254
|
-
[
|
|
255
|
-
[
|
|
256
|
-
[
|
|
250
|
+
[zkLink]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
251
|
+
[zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
252
|
+
[bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
|
|
253
|
+
[neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
|
|
257
254
|
};
|
package/dist/src/config.js
CHANGED
|
@@ -1,21 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
exports.prodApiUrl = "https://prod.tria.so";
|
|
6
|
-
const isEvmChain = (chainName) => {
|
|
7
|
-
return chains_1.SUPPORTED_EVM_CHAINS.includes(chainName);
|
|
1
|
+
import { AA_SUPPORTED_EVM_CHAINS, ALLCHAINS, SUPPORTED_EVM_CHAINS, TESTNET_CHAINS, } from "./chains";
|
|
2
|
+
export const prodApiUrl = "https://prod.tria.so";
|
|
3
|
+
export const isEvmChain = (chainName) => {
|
|
4
|
+
return SUPPORTED_EVM_CHAINS.includes(chainName);
|
|
8
5
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return chains_1.AA_SUPPORTED_EVM_CHAINS.includes(chainName);
|
|
6
|
+
export const isAaSupportedChain = (chainName) => {
|
|
7
|
+
return AA_SUPPORTED_EVM_CHAINS.includes(chainName);
|
|
12
8
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return chains_1.ALLCHAINS.includes(chainName);
|
|
9
|
+
export const isChainSupported = (chainName) => {
|
|
10
|
+
return ALLCHAINS.includes(chainName);
|
|
16
11
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return chains_1.TESTNET_CHAINS.includes(chainName);
|
|
12
|
+
export const isTestnetChain = (chainName) => {
|
|
13
|
+
return TESTNET_CHAINS.includes(chainName);
|
|
20
14
|
};
|
|
21
|
-
exports.isTestnetChain = isTestnetChain;
|
package/dist/src/connect.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.triaAuthUrl = exports.storageKeys = exports.TRIA_WALLET_SELECTED_CHAIN = exports.TRIA_WALLET_STORE = exports.eventTypes = void 0;
|
|
4
|
-
exports.eventTypes = {
|
|
1
|
+
export const eventTypes = {
|
|
5
2
|
logIn: "Log in",
|
|
6
3
|
triaSignUp: "Tria Sign up",
|
|
7
4
|
emailPwSignUp: "Email Pwd Sign up",
|
|
@@ -18,12 +15,12 @@ exports.eventTypes = {
|
|
|
18
15
|
saveToAuth: "Save to Auth Iframe",
|
|
19
16
|
triaStoreSet: "triaStoreSet",
|
|
20
17
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
export const TRIA_WALLET_STORE = "tria.wallet.store";
|
|
19
|
+
export const TRIA_WALLET_SELECTED_CHAIN = "tria.wallet.selectedChain";
|
|
20
|
+
export const storageKeys = {
|
|
24
21
|
TRIA_WALLET_STORE: "tria.wallet.store",
|
|
25
22
|
TRIA_WALLET_SELECTED_CHAIN: "tria.wallet.selectedChain",
|
|
26
23
|
PERSIST_ROOT: "persist:root",
|
|
27
24
|
};
|
|
28
|
-
|
|
25
|
+
export const triaAuthUrl = "https://auth.tria.so";
|
|
29
26
|
// export const PARENT_URL = document?.referrer || window?.parent?.[0]?.location?.ancestorOrigins?.[0];
|
package/dist/src/txn.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.chainIdToChainName = exports.chainNameToChainId = exports.rpcUrls = exports.nativeTokenDetails = exports.txnBaseUrl = exports.explorerBaseUrls = void 0;
|
|
4
|
-
const chains_1 = require("./chains");
|
|
5
|
-
exports.explorerBaseUrls = {
|
|
1
|
+
import { bitlayerTestnet, neoxTestnet, polygonAmoy, sepolia, zkLink, zkLinkTestnet, } from "./chains";
|
|
2
|
+
export const explorerBaseUrls = {
|
|
6
3
|
ETH: "https://etherscan.io",
|
|
7
|
-
[
|
|
4
|
+
[sepolia]: "https://sepolia.etherscan.io",
|
|
8
5
|
POLYGON: "https://polygonscan.com",
|
|
9
|
-
[
|
|
6
|
+
[polygonAmoy]: "https://www.oklink.com/amoy",
|
|
10
7
|
AVALANCHE: "https://snowtrace.io",
|
|
11
8
|
ARBITRUM: "https://arbiscan.io",
|
|
12
9
|
BINANCE: "https://bscscan.com",
|
|
@@ -25,42 +22,42 @@ exports.explorerBaseUrls = {
|
|
|
25
22
|
"MANTLE-TESTNET": "https://explorer.testnet.mantle.xyz",
|
|
26
23
|
MANTA: "https://pacific-explorer.manta.network",
|
|
27
24
|
"MANTA-TESTNET": "https://manta-testnet.calderaexplorer.xyz",
|
|
28
|
-
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
25
|
+
[zkLink]: "https://explorer.zklink.io",
|
|
26
|
+
[zkLinkTestnet]: "https://goerli.explorer.zklink.io",
|
|
27
|
+
[bitlayerTestnet]: "https://testnet-scan.bitlayer.org/en-us",
|
|
28
|
+
[neoxTestnet]: "https://xt2scan.ngd.network",
|
|
32
29
|
};
|
|
33
|
-
|
|
34
|
-
ETH: `${
|
|
35
|
-
[
|
|
36
|
-
POLYGON: `${
|
|
37
|
-
[
|
|
38
|
-
AVALANCHE: `${
|
|
39
|
-
ARBITRUM: `${
|
|
40
|
-
BINANCE: `${
|
|
41
|
-
OPTIMISM: `${
|
|
42
|
-
FANTOM: `${
|
|
43
|
-
FUSE: `${
|
|
44
|
-
FUSESPARK: `${
|
|
45
|
-
MUMBAI: `${
|
|
46
|
-
METIS: `${
|
|
47
|
-
"METIS-TESTNET": `${
|
|
48
|
-
MANTLE: `${
|
|
49
|
-
"MANTLE-TESTNET": `${
|
|
50
|
-
MANTA: `${
|
|
51
|
-
"MANTA-TESTNET": `${
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
[
|
|
30
|
+
export const txnBaseUrl = {
|
|
31
|
+
ETH: `${explorerBaseUrls.ETH}/tx`, // /txHash
|
|
32
|
+
[sepolia]: `${explorerBaseUrls[sepolia]}/tx`,
|
|
33
|
+
POLYGON: `${explorerBaseUrls.POLYGON}/tx`,
|
|
34
|
+
[polygonAmoy]: `${explorerBaseUrls[polygonAmoy]}/tx`,
|
|
35
|
+
AVALANCHE: `${explorerBaseUrls.AVALANCHE}/tx`,
|
|
36
|
+
ARBITRUM: `${explorerBaseUrls.ARBITRUM}/tx`,
|
|
37
|
+
BINANCE: `${explorerBaseUrls.BINANCE}/tx`,
|
|
38
|
+
OPTIMISM: `${explorerBaseUrls.OPTIMISM}/tx`,
|
|
39
|
+
FANTOM: `${explorerBaseUrls.FANTOM}/tx`,
|
|
40
|
+
FUSE: `${explorerBaseUrls.FUSE}/tx`,
|
|
41
|
+
FUSESPARK: `${explorerBaseUrls.FUSESPARK}/tx`,
|
|
42
|
+
MUMBAI: `${explorerBaseUrls.MUMBAI}/tx`,
|
|
43
|
+
METIS: `${explorerBaseUrls.METIS}/tx`,
|
|
44
|
+
"METIS-TESTNET": `${explorerBaseUrls["METIS-TESTNET"]}/tx`,
|
|
45
|
+
MANTLE: `${explorerBaseUrls.MANTLE}/tx`,
|
|
46
|
+
"MANTLE-TESTNET": `${explorerBaseUrls["MANTLE-TESTNET"]}/tx`,
|
|
47
|
+
MANTA: `${explorerBaseUrls.MANTA}/tx`,
|
|
48
|
+
"MANTA-TESTNET": `${explorerBaseUrls["MANTA-TESTNET"]}/tx`,
|
|
49
|
+
[zkLink]: `${explorerBaseUrls[zkLink]}/tx`,
|
|
50
|
+
[zkLinkTestnet]: `${explorerBaseUrls[zkLinkTestnet]}/tx`,
|
|
51
|
+
[bitlayerTestnet]: `${explorerBaseUrls[bitlayerTestnet]}/tx`,
|
|
52
|
+
[neoxTestnet]: `${explorerBaseUrls[neoxTestnet]}/tx`,
|
|
56
53
|
};
|
|
57
|
-
|
|
54
|
+
export const nativeTokenDetails = {
|
|
58
55
|
ETH: {
|
|
59
56
|
name: "Ether",
|
|
60
57
|
symbol: "ETH",
|
|
61
58
|
logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
|
|
62
59
|
},
|
|
63
|
-
[
|
|
60
|
+
[sepolia]: {
|
|
64
61
|
name: "Ether",
|
|
65
62
|
symbol: "ETH",
|
|
66
63
|
logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
|
|
@@ -70,7 +67,7 @@ exports.nativeTokenDetails = {
|
|
|
70
67
|
symbol: "MATIC",
|
|
71
68
|
logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
|
|
72
69
|
},
|
|
73
|
-
[
|
|
70
|
+
[polygonAmoy]: {
|
|
74
71
|
name: "Matic Token",
|
|
75
72
|
symbol: "MATIC",
|
|
76
73
|
logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
|
|
@@ -150,32 +147,32 @@ exports.nativeTokenDetails = {
|
|
|
150
147
|
symbol: "SOL",
|
|
151
148
|
logoUrl: "https://static.tria.so/chain-logo-w/Solana.webp",
|
|
152
149
|
},
|
|
153
|
-
[
|
|
150
|
+
[zkLink]: {
|
|
154
151
|
name: "Ether",
|
|
155
152
|
symbol: "ETH",
|
|
156
153
|
logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
|
|
157
154
|
},
|
|
158
|
-
[
|
|
155
|
+
[zkLinkTestnet]: {
|
|
159
156
|
name: "Ether",
|
|
160
157
|
symbol: "ETH",
|
|
161
158
|
logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
|
|
162
159
|
},
|
|
163
|
-
[
|
|
160
|
+
[bitlayerTestnet]: {
|
|
164
161
|
name: "Bitcoin",
|
|
165
162
|
symbol: "BTC",
|
|
166
163
|
logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp",
|
|
167
164
|
},
|
|
168
|
-
[
|
|
165
|
+
[neoxTestnet]: {
|
|
169
166
|
name: "Gas",
|
|
170
167
|
symbol: "GAS",
|
|
171
168
|
logoUrl: "https://assets.coingecko.com/coins/images/858/standard/GAS_512_512.png?1696501992",
|
|
172
169
|
},
|
|
173
170
|
};
|
|
174
171
|
const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
|
|
175
|
-
|
|
172
|
+
export const rpcUrls = {
|
|
176
173
|
MUMBAI: `https://polygon-mumbai.g.alchemy.com/v2/${alchemyKey}`, //'https://polygon-mumbai.blockpi.network/v1/rpc/public',
|
|
177
|
-
[
|
|
178
|
-
[
|
|
174
|
+
[polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
|
|
175
|
+
[sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
|
|
179
176
|
ETH: "https://eth.llamarpc.com",
|
|
180
177
|
POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
|
|
181
178
|
AVALANCHE: "https://avalanche-c-chain.publicnode.com",
|
|
@@ -191,15 +188,15 @@ exports.rpcUrls = {
|
|
|
191
188
|
"METIS-TESTNET": "https://goerli.gateway.metisdevops.link",
|
|
192
189
|
MANTLE: "https://rpc.mantle.xyz",
|
|
193
190
|
"MANTLE-TESTNET": "https://rpc.testnet.mantle.xyz",
|
|
194
|
-
[
|
|
195
|
-
[
|
|
196
|
-
[
|
|
197
|
-
[
|
|
191
|
+
[zkLink]: "https://rpc.zklink.io",
|
|
192
|
+
[zkLinkTestnet]: "https://goerli.rpc.zklink.io",
|
|
193
|
+
[bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
|
|
194
|
+
[neoxTestnet]: "https://neoxseed1.ngd.network",
|
|
198
195
|
};
|
|
199
|
-
|
|
196
|
+
export const chainNameToChainId = {
|
|
200
197
|
MUMBAI: 80001,
|
|
201
|
-
[
|
|
202
|
-
[
|
|
198
|
+
[polygonAmoy]: 80002,
|
|
199
|
+
[sepolia]: 11155111,
|
|
203
200
|
POLYGON: 137,
|
|
204
201
|
ETH: 1,
|
|
205
202
|
AVALANCHE: 43114,
|
|
@@ -215,15 +212,15 @@ exports.chainNameToChainId = {
|
|
|
215
212
|
"METIS-TESTNET": 599,
|
|
216
213
|
MANTLE: 5000,
|
|
217
214
|
"MANTLE-TESTNET": 5001,
|
|
218
|
-
[
|
|
219
|
-
[
|
|
220
|
-
[
|
|
221
|
-
[
|
|
215
|
+
[zkLink]: 810180,
|
|
216
|
+
[zkLinkTestnet]: 810182,
|
|
217
|
+
[bitlayerTestnet]: 200810,
|
|
218
|
+
[neoxTestnet]: 12227330,
|
|
222
219
|
};
|
|
223
|
-
|
|
220
|
+
export const chainIdToChainName = {
|
|
224
221
|
80001: "MUMBAI",
|
|
225
|
-
80002:
|
|
226
|
-
11155111:
|
|
222
|
+
80002: polygonAmoy,
|
|
223
|
+
11155111: sepolia,
|
|
227
224
|
137: "POLYGON",
|
|
228
225
|
1: "ETH",
|
|
229
226
|
43114: "AVALANCHE",
|
|
@@ -239,8 +236,8 @@ exports.chainIdToChainName = {
|
|
|
239
236
|
599: "METIS-TESTNET",
|
|
240
237
|
169: "MANTA",
|
|
241
238
|
3441005: "MANTA-TESTNET",
|
|
242
|
-
810180:
|
|
243
|
-
810182:
|
|
244
|
-
200810:
|
|
245
|
-
12227330:
|
|
239
|
+
810180: zkLink,
|
|
240
|
+
810182: zkLinkTestnet,
|
|
241
|
+
200810: bitlayerTestnet,
|
|
242
|
+
12227330: neoxTestnet,
|
|
246
243
|
};
|
package/package.json
CHANGED