@tria-sdk/constants 1.0.28 → 1.0.29
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 +66 -69
- package/dist/src/config.js +12 -20
- package/dist/src/connect.js +5 -8
- package/dist/src/txn.js +66 -69
- package/package.json +1 -1
- package/tsconfig.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,21 +1,5 @@
|
|
|
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";
|
|
21
5
|
// export * from "./src/gasToken";
|
package/dist/src/chains.js
CHANGED
|
@@ -1,33 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
exports.vanarTestnet = "VANGUARD-VANAR-TESTNET";
|
|
16
|
-
exports.TESTNET_CHAINS = [
|
|
17
|
-
exports.sepolia,
|
|
1
|
+
export const mumbai = "MUMBAI";
|
|
2
|
+
export const polygon = "POLYGON";
|
|
3
|
+
export const ethereum = "ETH";
|
|
4
|
+
export const fuse = "FUSE";
|
|
5
|
+
export const fuseSpark = "FUSESPARK";
|
|
6
|
+
export const zkLink = "ZKLINK-NOVA";
|
|
7
|
+
export const zkLinkTestnet = "ZKLINK-NOVA-TESTNET";
|
|
8
|
+
export const bitlayerTestnet = "BITLAYER-TESTNET";
|
|
9
|
+
export const neoxTestnet = "NEOX-TESTNET";
|
|
10
|
+
export const sepolia = "SEPOLIA";
|
|
11
|
+
export const polygonAmoy = "AMOY";
|
|
12
|
+
export const vanarTestnet = "VANGUARD-VANAR-TESTNET";
|
|
13
|
+
export const TESTNET_CHAINS = [
|
|
14
|
+
sepolia,
|
|
18
15
|
"MUMBAI",
|
|
19
16
|
"FUSESPARK",
|
|
20
17
|
"MANTA-TESTNET",
|
|
21
18
|
"METIS-TESTNET",
|
|
22
19
|
"MANTLE-TESTNET",
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
zkLinkTestnet,
|
|
21
|
+
bitlayerTestnet,
|
|
22
|
+
neoxTestnet,
|
|
23
|
+
sepolia,
|
|
24
|
+
polygonAmoy,
|
|
25
|
+
vanarTestnet,
|
|
29
26
|
];
|
|
30
|
-
|
|
27
|
+
export const SUPPORTED_EVM_CHAINS = [
|
|
31
28
|
"ETH",
|
|
32
29
|
"POLYGON",
|
|
33
30
|
"AVALANCHE",
|
|
@@ -38,26 +35,26 @@ exports.SUPPORTED_EVM_CHAINS = [
|
|
|
38
35
|
"FUSE",
|
|
39
36
|
"FUSESPARK",
|
|
40
37
|
"MUMBAI",
|
|
41
|
-
|
|
38
|
+
sepolia,
|
|
42
39
|
"MANTA",
|
|
43
40
|
"MANTA-TESTNET",
|
|
44
41
|
"METIS",
|
|
45
42
|
"METIS-TESTNET",
|
|
46
43
|
"MANTLE",
|
|
47
44
|
"MANTLE-TESTNET",
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
zkLink,
|
|
46
|
+
zkLinkTestnet,
|
|
47
|
+
bitlayerTestnet,
|
|
48
|
+
neoxTestnet,
|
|
49
|
+
sepolia,
|
|
50
|
+
polygonAmoy,
|
|
51
|
+
vanarTestnet,
|
|
55
52
|
];
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
export const GAS_ABS_ENABLED_CHAINS = [sepolia, "POLYGON"];
|
|
54
|
+
export const AA_SUPPORTED_EVM_CHAINS = [
|
|
58
55
|
// "ETH",
|
|
59
56
|
"POLYGON",
|
|
60
|
-
|
|
57
|
+
sepolia,
|
|
61
58
|
// "AVALANCHE",
|
|
62
59
|
// "ARBITRUM",
|
|
63
60
|
// "BINANCE",
|
|
@@ -65,13 +62,13 @@ exports.AA_SUPPORTED_EVM_CHAINS = [
|
|
|
65
62
|
"FUSE",
|
|
66
63
|
"MUMBAI",
|
|
67
64
|
// "MANTLE",
|
|
68
|
-
|
|
65
|
+
sepolia,
|
|
69
66
|
"OPTIMISM",
|
|
70
67
|
"ARBITRUM",
|
|
71
68
|
"AVALANCHE",
|
|
72
69
|
"MANTLE",
|
|
73
70
|
];
|
|
74
|
-
|
|
71
|
+
export const ALLCHAINS = [
|
|
75
72
|
"ETH",
|
|
76
73
|
"POLYGON",
|
|
77
74
|
"AVALANCHE",
|
|
@@ -82,7 +79,7 @@ exports.ALLCHAINS = [
|
|
|
82
79
|
"FUSE",
|
|
83
80
|
"FUSESPARK",
|
|
84
81
|
"MUMBAI",
|
|
85
|
-
|
|
82
|
+
sepolia,
|
|
86
83
|
"MANTA",
|
|
87
84
|
"MANTA-TESTNET",
|
|
88
85
|
"METIS",
|
|
@@ -90,24 +87,24 @@ exports.ALLCHAINS = [
|
|
|
90
87
|
"MANTLE",
|
|
91
88
|
"MANTLE-TESTNET",
|
|
92
89
|
"SOLANA",
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
90
|
+
zkLink,
|
|
91
|
+
zkLinkTestnet,
|
|
92
|
+
bitlayerTestnet,
|
|
93
|
+
neoxTestnet,
|
|
94
|
+
sepolia,
|
|
95
|
+
polygonAmoy,
|
|
96
|
+
vanarTestnet,
|
|
100
97
|
];
|
|
101
98
|
const baseLogoUrl = "https://static.tria.so/chain-logo-w";
|
|
102
99
|
const baseLogoUrlBlack = "https://static.tria.so/chain-logo-b";
|
|
103
|
-
|
|
100
|
+
export const networks = [
|
|
104
101
|
{
|
|
105
102
|
chainName: "ETH",
|
|
106
103
|
logo: `${baseLogoUrl}/Ethereum.webp`,
|
|
107
104
|
type: "mainnet",
|
|
108
105
|
},
|
|
109
106
|
{
|
|
110
|
-
chainName:
|
|
107
|
+
chainName: sepolia,
|
|
111
108
|
logo: `${baseLogoUrl}/Ethereum.webp`,
|
|
112
109
|
type: "testnet",
|
|
113
110
|
},
|
|
@@ -122,7 +119,7 @@ exports.networks = [
|
|
|
122
119
|
type: "mainnet",
|
|
123
120
|
},
|
|
124
121
|
{
|
|
125
|
-
chainName:
|
|
122
|
+
chainName: polygonAmoy,
|
|
126
123
|
logo: `${baseLogoUrl}/Polygon.svg`,
|
|
127
124
|
type: "testnet",
|
|
128
125
|
},
|
|
@@ -201,37 +198,37 @@ exports.networks = [
|
|
|
201
198
|
type: "mainnet",
|
|
202
199
|
},
|
|
203
200
|
{
|
|
204
|
-
chainName:
|
|
201
|
+
chainName: zkLink,
|
|
205
202
|
logo: `${baseLogoUrl}/zklink.webp`,
|
|
206
203
|
type: "mainnet",
|
|
207
204
|
},
|
|
208
205
|
{
|
|
209
|
-
chainName:
|
|
206
|
+
chainName: zkLinkTestnet,
|
|
210
207
|
logo: `${baseLogoUrl}/zklink.webp`,
|
|
211
208
|
type: "testnet",
|
|
212
209
|
},
|
|
213
210
|
{
|
|
214
|
-
chainName:
|
|
211
|
+
chainName: bitlayerTestnet,
|
|
215
212
|
logo: `${baseLogoUrl}/bitlayer.webp`,
|
|
216
213
|
type: "testnet",
|
|
217
214
|
},
|
|
218
215
|
{
|
|
219
|
-
chainName:
|
|
216
|
+
chainName: neoxTestnet,
|
|
220
217
|
logo: `${baseLogoUrl}/Neo.webp`,
|
|
221
218
|
type: "testnet",
|
|
222
219
|
},
|
|
223
220
|
{
|
|
224
|
-
chainName:
|
|
221
|
+
chainName: vanarTestnet,
|
|
225
222
|
logo: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrl}/Vanguard.webp`,
|
|
226
223
|
type: "testnet",
|
|
227
224
|
},
|
|
228
225
|
];
|
|
229
|
-
|
|
226
|
+
export const chainNameToLogo = {
|
|
230
227
|
ETH: `${baseLogoUrl}/Ethereum.webp`,
|
|
231
|
-
[
|
|
228
|
+
[sepolia]: `${baseLogoUrl}/Ethereum.webp`,
|
|
232
229
|
FANTOM: `${baseLogoUrl}/Fantom.webp`,
|
|
233
230
|
POLYGON: `${baseLogoUrl}/Polygon.webp`,
|
|
234
|
-
[
|
|
231
|
+
[polygonAmoy]: `${baseLogoUrl}/Polygon.webp`,
|
|
235
232
|
AVALANCHE: `${baseLogoUrl}/Avalanche.webp`,
|
|
236
233
|
OPTIMISM: `${baseLogoUrl}/Optimism.webp`,
|
|
237
234
|
ARBITRUM: `${baseLogoUrl}/Arbitrum.webp`,
|
|
@@ -247,19 +244,19 @@ exports.chainNameToLogo = {
|
|
|
247
244
|
MANTLE: `${baseLogoUrl}/Mantle.webp`,
|
|
248
245
|
"MANTLE-TESTNET": `${baseLogoUrl}/Mantle.webp`,
|
|
249
246
|
SOLANA: `${baseLogoUrl}/Solana.webp`,
|
|
250
|
-
[
|
|
251
|
-
[
|
|
252
|
-
[
|
|
253
|
-
[
|
|
254
|
-
[
|
|
247
|
+
[zkLink]: `${baseLogoUrl}/zklink.webp`,
|
|
248
|
+
[zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
|
|
249
|
+
[bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
|
|
250
|
+
[neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
|
|
251
|
+
[vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrl}/Vanguard.webp`,
|
|
255
252
|
};
|
|
256
|
-
|
|
253
|
+
export const chainNameToLogoBlack = {
|
|
257
254
|
ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
|
|
258
|
-
[
|
|
255
|
+
[sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
|
|
259
256
|
BINANCE: `${baseLogoUrlBlack}/binance.webp`,
|
|
260
257
|
FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
|
|
261
258
|
POLYGON: `${baseLogoUrlBlack}/Polygon.webp`,
|
|
262
|
-
[
|
|
259
|
+
[polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
|
|
263
260
|
AVALANCHE: `${baseLogoUrlBlack}/Avalanche.webp`,
|
|
264
261
|
OPTIMISM: `${baseLogoUrlBlack}/Optimism.webp`,
|
|
265
262
|
ARBITRUM: `${baseLogoUrlBlack}/Arbitrum.webp`,
|
|
@@ -274,9 +271,9 @@ exports.chainNameToLogoBlack = {
|
|
|
274
271
|
MANTLE: `${baseLogoUrlBlack}/Mantle.webp`,
|
|
275
272
|
"MANTLE-TESTNET": `${baseLogoUrlBlack}/Mantle.webp`,
|
|
276
273
|
SOLANA: `${baseLogoUrlBlack}/Solana.webp`,
|
|
277
|
-
[
|
|
278
|
-
[
|
|
279
|
-
[
|
|
280
|
-
[
|
|
281
|
-
[
|
|
274
|
+
[zkLink]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
275
|
+
[zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
276
|
+
[bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
|
|
277
|
+
[neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
|
|
278
|
+
[vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrlBlack}/Vanguard.png`,
|
|
282
279
|
};
|
package/dist/src/config.js
CHANGED
|
@@ -1,25 +1,17 @@
|
|
|
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, GAS_ABS_ENABLED_CHAINS, 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
|
-
|
|
22
|
-
|
|
23
|
-
return chains_1.GAS_ABS_ENABLED_CHAINS.includes(chainName);
|
|
15
|
+
export const isGasAbsEnabled = (chainName) => {
|
|
16
|
+
return GAS_ABS_ENABLED_CHAINS.includes(chainName);
|
|
24
17
|
};
|
|
25
|
-
exports.isGasAbsEnabled = isGasAbsEnabled;
|
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, vanarTestnet, } 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,44 +22,44 @@ 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
|
-
[
|
|
32
|
-
[
|
|
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",
|
|
29
|
+
[vanarTestnet]: "https://explorer-vanguard.vanarchain.com",
|
|
33
30
|
};
|
|
34
|
-
|
|
35
|
-
ETH: `${
|
|
36
|
-
[
|
|
37
|
-
POLYGON: `${
|
|
38
|
-
[
|
|
39
|
-
AVALANCHE: `${
|
|
40
|
-
ARBITRUM: `${
|
|
41
|
-
BINANCE: `${
|
|
42
|
-
OPTIMISM: `${
|
|
43
|
-
FANTOM: `${
|
|
44
|
-
FUSE: `${
|
|
45
|
-
FUSESPARK: `${
|
|
46
|
-
MUMBAI: `${
|
|
47
|
-
METIS: `${
|
|
48
|
-
"METIS-TESTNET": `${
|
|
49
|
-
MANTLE: `${
|
|
50
|
-
"MANTLE-TESTNET": `${
|
|
51
|
-
MANTA: `${
|
|
52
|
-
"MANTA-TESTNET": `${
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
[
|
|
31
|
+
export const txnBaseUrl = {
|
|
32
|
+
ETH: `${explorerBaseUrls.ETH}/tx`, // /txHash
|
|
33
|
+
[sepolia]: `${explorerBaseUrls[sepolia]}/tx`,
|
|
34
|
+
POLYGON: `${explorerBaseUrls.POLYGON}/tx`,
|
|
35
|
+
[polygonAmoy]: `${explorerBaseUrls[polygonAmoy]}/tx`,
|
|
36
|
+
AVALANCHE: `${explorerBaseUrls.AVALANCHE}/tx`,
|
|
37
|
+
ARBITRUM: `${explorerBaseUrls.ARBITRUM}/tx`,
|
|
38
|
+
BINANCE: `${explorerBaseUrls.BINANCE}/tx`,
|
|
39
|
+
OPTIMISM: `${explorerBaseUrls.OPTIMISM}/tx`,
|
|
40
|
+
FANTOM: `${explorerBaseUrls.FANTOM}/tx`,
|
|
41
|
+
FUSE: `${explorerBaseUrls.FUSE}/tx`,
|
|
42
|
+
FUSESPARK: `${explorerBaseUrls.FUSESPARK}/tx`,
|
|
43
|
+
MUMBAI: `${explorerBaseUrls.MUMBAI}/tx`,
|
|
44
|
+
METIS: `${explorerBaseUrls.METIS}/tx`,
|
|
45
|
+
"METIS-TESTNET": `${explorerBaseUrls["METIS-TESTNET"]}/tx`,
|
|
46
|
+
MANTLE: `${explorerBaseUrls.MANTLE}/tx`,
|
|
47
|
+
"MANTLE-TESTNET": `${explorerBaseUrls["MANTLE-TESTNET"]}/tx`,
|
|
48
|
+
MANTA: `${explorerBaseUrls.MANTA}/tx`,
|
|
49
|
+
"MANTA-TESTNET": `${explorerBaseUrls["MANTA-TESTNET"]}/tx`,
|
|
50
|
+
[zkLink]: `${explorerBaseUrls[zkLink]}/tx`,
|
|
51
|
+
[zkLinkTestnet]: `${explorerBaseUrls[zkLinkTestnet]}/tx`,
|
|
52
|
+
[bitlayerTestnet]: `${explorerBaseUrls[bitlayerTestnet]}/tx`,
|
|
53
|
+
[neoxTestnet]: `${explorerBaseUrls[neoxTestnet]}/tx`,
|
|
54
|
+
[vanarTestnet]: `${explorerBaseUrls[vanarTestnet]}/tx`,
|
|
58
55
|
};
|
|
59
|
-
|
|
56
|
+
export const nativeTokenDetails = {
|
|
60
57
|
ETH: {
|
|
61
58
|
name: "Ether",
|
|
62
59
|
symbol: "ETH",
|
|
63
60
|
logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
|
|
64
61
|
},
|
|
65
|
-
[
|
|
62
|
+
[sepolia]: {
|
|
66
63
|
name: "Ether",
|
|
67
64
|
symbol: "ETH",
|
|
68
65
|
logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
|
|
@@ -72,7 +69,7 @@ exports.nativeTokenDetails = {
|
|
|
72
69
|
symbol: "MATIC",
|
|
73
70
|
logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
|
|
74
71
|
},
|
|
75
|
-
[
|
|
72
|
+
[polygonAmoy]: {
|
|
76
73
|
name: "Matic Token",
|
|
77
74
|
symbol: "MATIC",
|
|
78
75
|
logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
|
|
@@ -152,39 +149,39 @@ exports.nativeTokenDetails = {
|
|
|
152
149
|
symbol: "SOL",
|
|
153
150
|
logoUrl: "https://static.tria.so/chain-logo-w/Solana.webp",
|
|
154
151
|
},
|
|
155
|
-
[
|
|
152
|
+
[zkLink]: {
|
|
156
153
|
name: "Ether",
|
|
157
154
|
symbol: "ETH",
|
|
158
155
|
logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
|
|
159
156
|
},
|
|
160
|
-
[
|
|
157
|
+
[zkLinkTestnet]: {
|
|
161
158
|
name: "Ether",
|
|
162
159
|
symbol: "ETH",
|
|
163
160
|
logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
|
|
164
161
|
},
|
|
165
|
-
[
|
|
162
|
+
[bitlayerTestnet]: {
|
|
166
163
|
name: "Bitcoin",
|
|
167
164
|
symbol: "BTC",
|
|
168
165
|
logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp",
|
|
169
166
|
},
|
|
170
|
-
[
|
|
167
|
+
[neoxTestnet]: {
|
|
171
168
|
name: "Gas",
|
|
172
169
|
symbol: "GAS",
|
|
173
170
|
logoUrl: "https://assets.coingecko.com/coins/images/858/standard/GAS_512_512.png?1696501992",
|
|
174
171
|
},
|
|
175
|
-
[
|
|
172
|
+
[vanarTestnet]: {
|
|
176
173
|
name: "Vanry",
|
|
177
174
|
symbol: "VG",
|
|
178
175
|
logoUrl: "https://explorer-vanguard.vanarchain.com/assets/network_icon_dark.svg",
|
|
179
176
|
},
|
|
180
177
|
};
|
|
181
178
|
const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
|
|
182
|
-
|
|
179
|
+
export const rpcUrls = {
|
|
183
180
|
MUMBAI: `https://polygon-mumbai.g.alchemy.com/v2/${alchemyKey}`, //'https://polygon-mumbai.blockpi.network/v1/rpc/public',
|
|
184
|
-
[
|
|
185
|
-
[
|
|
181
|
+
[polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
|
|
182
|
+
[sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
|
|
186
183
|
ETH: "https://eth.llamarpc.com",
|
|
187
|
-
[
|
|
184
|
+
[sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
|
|
188
185
|
POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
|
|
189
186
|
AVALANCHE: "https://avalanche-c-chain.publicnode.com",
|
|
190
187
|
ARBITRUM: "https://arbitrum-one.publicnode.com",
|
|
@@ -199,16 +196,16 @@ exports.rpcUrls = {
|
|
|
199
196
|
"METIS-TESTNET": "https://goerli.gateway.metisdevops.link",
|
|
200
197
|
MANTLE: "https://rpc.mantle.xyz",
|
|
201
198
|
"MANTLE-TESTNET": "https://rpc.testnet.mantle.xyz",
|
|
202
|
-
[
|
|
203
|
-
[
|
|
204
|
-
[
|
|
205
|
-
[
|
|
206
|
-
[
|
|
199
|
+
[zkLink]: "https://rpc.zklink.io",
|
|
200
|
+
[zkLinkTestnet]: "https://goerli.rpc.zklink.io",
|
|
201
|
+
[bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
|
|
202
|
+
[neoxTestnet]: "https://neoxseed1.ngd.network",
|
|
203
|
+
[vanarTestnet]: "http://rpc-partners-vanguard.vanarchain.com", // "https://rpc-vanguard.vanarchain.com",
|
|
207
204
|
};
|
|
208
|
-
|
|
205
|
+
export const chainNameToChainId = {
|
|
209
206
|
MUMBAI: 80001,
|
|
210
|
-
[
|
|
211
|
-
[
|
|
207
|
+
[polygonAmoy]: 80002,
|
|
208
|
+
[sepolia]: 11155111,
|
|
212
209
|
POLYGON: 137,
|
|
213
210
|
ETH: 1,
|
|
214
211
|
AVALANCHE: 43114,
|
|
@@ -224,16 +221,16 @@ exports.chainNameToChainId = {
|
|
|
224
221
|
"METIS-TESTNET": 599,
|
|
225
222
|
MANTLE: 5000,
|
|
226
223
|
"MANTLE-TESTNET": 5001,
|
|
227
|
-
[
|
|
228
|
-
[
|
|
229
|
-
[
|
|
230
|
-
[
|
|
231
|
-
[
|
|
224
|
+
[zkLink]: 810180,
|
|
225
|
+
[zkLinkTestnet]: 810182,
|
|
226
|
+
[bitlayerTestnet]: 200810,
|
|
227
|
+
[neoxTestnet]: 12227330,
|
|
228
|
+
[vanarTestnet]: 78600,
|
|
232
229
|
};
|
|
233
|
-
|
|
234
|
-
11155111:
|
|
230
|
+
export const chainIdToChainName = {
|
|
231
|
+
11155111: sepolia,
|
|
235
232
|
80001: "MUMBAI",
|
|
236
|
-
80002:
|
|
233
|
+
80002: polygonAmoy,
|
|
237
234
|
137: "POLYGON",
|
|
238
235
|
1: "ETH",
|
|
239
236
|
43114: "AVALANCHE",
|
|
@@ -249,9 +246,9 @@ exports.chainIdToChainName = {
|
|
|
249
246
|
599: "METIS-TESTNET",
|
|
250
247
|
169: "MANTA",
|
|
251
248
|
3441005: "MANTA-TESTNET",
|
|
252
|
-
810180:
|
|
253
|
-
810182:
|
|
254
|
-
200810:
|
|
255
|
-
12227330:
|
|
256
|
-
78600:
|
|
249
|
+
810180: zkLink,
|
|
250
|
+
810182: zkLinkTestnet,
|
|
251
|
+
200810: bitlayerTestnet,
|
|
252
|
+
12227330: neoxTestnet,
|
|
253
|
+
78600: vanarTestnet,
|
|
257
254
|
};
|
package/package.json
CHANGED