@tria-sdk/constants 1.0.41 → 1.0.43
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/.turbo/turbo-build.log +5 -0
- package/dist/index.js +4 -20
- package/dist/src/chains.d.ts +7 -0
- package/dist/src/chains.js +71 -58
- package/dist/src/config.js +10 -17
- package/dist/src/connect.js +5 -8
- package/dist/src/txn.d.ts +1 -0
- package/dist/src/txn.js +75 -68
- package/package.json +7 -7
- package/src/chains.ts +18 -0
- package/src/txn.ts +12 -0
- package/tsconfig.json +1 -1
- package/dist/src/gasToken.d.ts +0 -0
- package/dist/src/gasToken.js +0 -13
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.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export declare const mumbai = "MUMBAI";
|
|
2
|
+
export declare const polygon = "POLYGON";
|
|
3
|
+
export declare const ethereum = "ETH";
|
|
4
|
+
export declare const fuse = "FUSE";
|
|
5
|
+
export declare const fuseSpark = "FUSESPARK";
|
|
1
6
|
export declare const zkLink: string;
|
|
2
7
|
export declare const zkLinkTestnet: string;
|
|
3
8
|
export declare const bitlayerTestnet: string;
|
|
@@ -5,12 +10,14 @@ export declare const bitlayerMainnet: string;
|
|
|
5
10
|
export declare const neoxTestnet: string;
|
|
6
11
|
export declare const sepolia: string;
|
|
7
12
|
export declare const polygonAmoy: string;
|
|
13
|
+
export declare const vanarTestnet: string;
|
|
8
14
|
export type ZKLINK = "ZKLINK-NOVA";
|
|
9
15
|
export type ZKLINK_TESTNET = "ZKLINK-NOVA-TESTNET";
|
|
10
16
|
export type BITLAYER_TESTNET = "BITLAYER-TESTNET";
|
|
11
17
|
export type NEOX_TESTNET = "NEOX-TESTNET";
|
|
12
18
|
export type SEPOLIA = "SEPOLIA";
|
|
13
19
|
export type AMOY = "AMOY";
|
|
20
|
+
export type VANGUARD_VANAR_TESTNET = "VANGUARD-VANAR-TESTNET";
|
|
14
21
|
export declare const TESTNET_CHAINS: string[];
|
|
15
22
|
export declare const SUPPORTED_EVM_CHAINS: string[];
|
|
16
23
|
export declare const AA_SUPPORTED_EVM_CHAINS: string[];
|
package/dist/src/chains.js
CHANGED
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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 bitlayerMainnet = "BITLAYER-MAINNET";
|
|
10
|
+
export const neoxTestnet = "NEOX-TESTNET";
|
|
11
|
+
export const sepolia = "SEPOLIA";
|
|
12
|
+
export const polygonAmoy = "AMOY";
|
|
13
|
+
export const vanarTestnet = "VANGUARD-VANAR-TESTNET";
|
|
14
|
+
export const TESTNET_CHAINS = [
|
|
12
15
|
"MUMBAI",
|
|
13
16
|
"FUSESPARK",
|
|
14
17
|
"MANTA-TESTNET",
|
|
15
18
|
"METIS-TESTNET",
|
|
16
19
|
"MANTLE-TESTNET",
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
zkLinkTestnet,
|
|
21
|
+
bitlayerTestnet,
|
|
22
|
+
neoxTestnet,
|
|
23
|
+
sepolia,
|
|
24
|
+
polygonAmoy,
|
|
25
|
+
vanarTestnet,
|
|
22
26
|
];
|
|
23
|
-
|
|
27
|
+
export const SUPPORTED_EVM_CHAINS = [
|
|
24
28
|
"ETH",
|
|
25
29
|
"POLYGON",
|
|
26
30
|
"AVALANCHE",
|
|
@@ -37,15 +41,16 @@ exports.SUPPORTED_EVM_CHAINS = [
|
|
|
37
41
|
"METIS-TESTNET",
|
|
38
42
|
"MANTLE",
|
|
39
43
|
"MANTLE-TESTNET",
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
zkLink,
|
|
45
|
+
zkLinkTestnet,
|
|
46
|
+
bitlayerTestnet,
|
|
47
|
+
bitlayerMainnet,
|
|
48
|
+
neoxTestnet,
|
|
49
|
+
sepolia,
|
|
50
|
+
polygonAmoy,
|
|
51
|
+
vanarTestnet,
|
|
47
52
|
];
|
|
48
|
-
|
|
53
|
+
export const AA_SUPPORTED_EVM_CHAINS = [
|
|
49
54
|
// "ETH",
|
|
50
55
|
"POLYGON",
|
|
51
56
|
// "AVALANCHE",
|
|
@@ -55,13 +60,13 @@ exports.AA_SUPPORTED_EVM_CHAINS = [
|
|
|
55
60
|
"FUSE",
|
|
56
61
|
"MUMBAI",
|
|
57
62
|
// "MANTLE",
|
|
58
|
-
|
|
63
|
+
sepolia,
|
|
59
64
|
"OPTIMISM",
|
|
60
65
|
"ARBITRUM",
|
|
61
66
|
"AVALANCHE",
|
|
62
67
|
"MANTLE",
|
|
63
68
|
];
|
|
64
|
-
|
|
69
|
+
export const ALLCHAINS = [
|
|
65
70
|
"ETH",
|
|
66
71
|
"POLYGON",
|
|
67
72
|
"AVALANCHE",
|
|
@@ -79,24 +84,25 @@ exports.ALLCHAINS = [
|
|
|
79
84
|
"MANTLE",
|
|
80
85
|
"MANTLE-TESTNET",
|
|
81
86
|
"SOLANA",
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
zkLink,
|
|
88
|
+
zkLinkTestnet,
|
|
89
|
+
bitlayerTestnet,
|
|
90
|
+
bitlayerMainnet,
|
|
91
|
+
neoxTestnet,
|
|
92
|
+
sepolia,
|
|
93
|
+
polygonAmoy,
|
|
94
|
+
vanarTestnet,
|
|
89
95
|
];
|
|
90
96
|
const baseLogoUrl = "https://static.tria.so/chain-logo-w";
|
|
91
97
|
const baseLogoUrlBlack = "https://static.tria.so/chain-logo-b";
|
|
92
|
-
|
|
98
|
+
export const networks = [
|
|
93
99
|
{
|
|
94
100
|
chainName: "ETH",
|
|
95
101
|
logo: `${baseLogoUrl}/Ethereum.webp`,
|
|
96
102
|
type: "mainnet",
|
|
97
103
|
},
|
|
98
104
|
{
|
|
99
|
-
chainName:
|
|
105
|
+
chainName: sepolia,
|
|
100
106
|
logo: `${baseLogoUrl}/Ethereum.webp`,
|
|
101
107
|
type: "testnet",
|
|
102
108
|
},
|
|
@@ -111,7 +117,7 @@ exports.networks = [
|
|
|
111
117
|
type: "mainnet",
|
|
112
118
|
},
|
|
113
119
|
{
|
|
114
|
-
chainName:
|
|
120
|
+
chainName: polygonAmoy,
|
|
115
121
|
logo: `${baseLogoUrl}/Polygon.svg`,
|
|
116
122
|
type: "testnet",
|
|
117
123
|
},
|
|
@@ -190,37 +196,42 @@ exports.networks = [
|
|
|
190
196
|
type: "mainnet",
|
|
191
197
|
},
|
|
192
198
|
{
|
|
193
|
-
chainName:
|
|
199
|
+
chainName: zkLink,
|
|
194
200
|
logo: `${baseLogoUrl}/zklink.webp`,
|
|
195
201
|
type: "mainnet",
|
|
196
202
|
},
|
|
197
203
|
{
|
|
198
|
-
chainName:
|
|
204
|
+
chainName: zkLinkTestnet,
|
|
199
205
|
logo: `${baseLogoUrl}/zklink.webp`,
|
|
200
206
|
type: "testnet",
|
|
201
207
|
},
|
|
202
208
|
{
|
|
203
|
-
chainName:
|
|
209
|
+
chainName: bitlayerTestnet,
|
|
204
210
|
logo: `${baseLogoUrl}/bitlayer.webp`,
|
|
205
211
|
type: "testnet",
|
|
206
212
|
},
|
|
207
213
|
{
|
|
208
|
-
chainName:
|
|
214
|
+
chainName: bitlayerMainnet,
|
|
209
215
|
logo: `${baseLogoUrl}/bitlayer.webp`,
|
|
210
216
|
type: "mainnet",
|
|
211
217
|
},
|
|
212
218
|
{
|
|
213
|
-
chainName:
|
|
219
|
+
chainName: neoxTestnet,
|
|
214
220
|
logo: `${baseLogoUrl}/Neo.webp`,
|
|
215
221
|
type: "testnet",
|
|
216
222
|
},
|
|
223
|
+
{
|
|
224
|
+
chainName: vanarTestnet,
|
|
225
|
+
logo: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrl}/Vanguard.webp`,
|
|
226
|
+
type: "testnet",
|
|
227
|
+
},
|
|
217
228
|
];
|
|
218
|
-
|
|
229
|
+
export const chainNameToLogo = {
|
|
219
230
|
ETH: `${baseLogoUrl}/Ethereum.webp`,
|
|
220
|
-
[
|
|
231
|
+
[sepolia]: `${baseLogoUrl}/Ethereum.webp`,
|
|
221
232
|
FANTOM: `${baseLogoUrl}/Fantom.webp`,
|
|
222
233
|
POLYGON: `${baseLogoUrl}/Polygon.webp`,
|
|
223
|
-
[
|
|
234
|
+
[polygonAmoy]: `${baseLogoUrl}/Polygon.webp`,
|
|
224
235
|
AVALANCHE: `${baseLogoUrl}/Avalanche.webp`,
|
|
225
236
|
OPTIMISM: `${baseLogoUrl}/Optimism.webp`,
|
|
226
237
|
ARBITRUM: `${baseLogoUrl}/Arbitrum.webp`,
|
|
@@ -236,19 +247,20 @@ exports.chainNameToLogo = {
|
|
|
236
247
|
MANTLE: `${baseLogoUrl}/Mantle.webp`,
|
|
237
248
|
"MANTLE-TESTNET": `${baseLogoUrl}/Mantle.webp`,
|
|
238
249
|
SOLANA: `${baseLogoUrl}/Solana.webp`,
|
|
239
|
-
[
|
|
240
|
-
[
|
|
241
|
-
[
|
|
242
|
-
[
|
|
243
|
-
[
|
|
250
|
+
[zkLink]: `${baseLogoUrl}/zklink.webp`,
|
|
251
|
+
[zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
|
|
252
|
+
[bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
|
|
253
|
+
[bitlayerMainnet]: `${baseLogoUrl}/bitlayer.webp`,
|
|
254
|
+
[neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
|
|
255
|
+
[vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrl}/Vanguard.webp`,
|
|
244
256
|
};
|
|
245
|
-
|
|
257
|
+
export const chainNameToLogoBlack = {
|
|
246
258
|
ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
|
|
247
|
-
[
|
|
259
|
+
[sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
|
|
248
260
|
BINANCE: `${baseLogoUrlBlack}/binance.webp`,
|
|
249
261
|
FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
|
|
250
262
|
POLYGON: `${baseLogoUrlBlack}/Polygon.webp`,
|
|
251
|
-
[
|
|
263
|
+
[polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
|
|
252
264
|
AVALANCHE: `${baseLogoUrlBlack}/Avalanche.webp`,
|
|
253
265
|
OPTIMISM: `${baseLogoUrlBlack}/Optimism.webp`,
|
|
254
266
|
ARBITRUM: `${baseLogoUrlBlack}/Arbitrum.webp`,
|
|
@@ -263,9 +275,10 @@ exports.chainNameToLogoBlack = {
|
|
|
263
275
|
MANTLE: `${baseLogoUrlBlack}/Mantle.webp`,
|
|
264
276
|
"MANTLE-TESTNET": `${baseLogoUrlBlack}/Mantle.webp`,
|
|
265
277
|
SOLANA: `${baseLogoUrlBlack}/Solana.webp`,
|
|
266
|
-
[
|
|
267
|
-
[
|
|
268
|
-
[
|
|
269
|
-
[
|
|
270
|
-
[
|
|
278
|
+
[zkLink]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
279
|
+
[zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
280
|
+
[bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
|
|
281
|
+
[bitlayerMainnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
|
|
282
|
+
[neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
|
|
283
|
+
[vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrlBlack}/Vanguard.png`,
|
|
271
284
|
};
|
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.d.ts
CHANGED
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, bitlayerMainnet, 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,46 @@ 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
|
+
[bitlayerMainnet]: "https://www.btrscan.com",
|
|
29
|
+
[neoxTestnet]: "https://xt2scan.ngd.network",
|
|
30
|
+
[vanarTestnet]: "https://explorer-vanguard.vanarchain.com",
|
|
33
31
|
};
|
|
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
|
-
[
|
|
32
|
+
export const txnBaseUrl = {
|
|
33
|
+
ETH: `${explorerBaseUrls.ETH}/tx`, // /txHash
|
|
34
|
+
[sepolia]: `${explorerBaseUrls[sepolia]}/tx`,
|
|
35
|
+
POLYGON: `${explorerBaseUrls.POLYGON}/tx`,
|
|
36
|
+
[polygonAmoy]: `${explorerBaseUrls[polygonAmoy]}/tx`,
|
|
37
|
+
AVALANCHE: `${explorerBaseUrls.AVALANCHE}/tx`,
|
|
38
|
+
ARBITRUM: `${explorerBaseUrls.ARBITRUM}/tx`,
|
|
39
|
+
BINANCE: `${explorerBaseUrls.BINANCE}/tx`,
|
|
40
|
+
OPTIMISM: `${explorerBaseUrls.OPTIMISM}/tx`,
|
|
41
|
+
FANTOM: `${explorerBaseUrls.FANTOM}/tx`,
|
|
42
|
+
FUSE: `${explorerBaseUrls.FUSE}/tx`,
|
|
43
|
+
FUSESPARK: `${explorerBaseUrls.FUSESPARK}/tx`,
|
|
44
|
+
MUMBAI: `${explorerBaseUrls.MUMBAI}/tx`,
|
|
45
|
+
METIS: `${explorerBaseUrls.METIS}/tx`,
|
|
46
|
+
"METIS-TESTNET": `${explorerBaseUrls["METIS-TESTNET"]}/tx`,
|
|
47
|
+
MANTLE: `${explorerBaseUrls.MANTLE}/tx`,
|
|
48
|
+
"MANTLE-TESTNET": `${explorerBaseUrls["MANTLE-TESTNET"]}/tx`,
|
|
49
|
+
MANTA: `${explorerBaseUrls.MANTA}/tx`,
|
|
50
|
+
"MANTA-TESTNET": `${explorerBaseUrls["MANTA-TESTNET"]}/tx`,
|
|
51
|
+
[zkLink]: `${explorerBaseUrls[zkLink]}/tx`,
|
|
52
|
+
[zkLinkTestnet]: `${explorerBaseUrls[zkLinkTestnet]}/tx`,
|
|
53
|
+
[bitlayerTestnet]: `${explorerBaseUrls[bitlayerTestnet]}/tx`,
|
|
54
|
+
[bitlayerMainnet]: `${explorerBaseUrls[bitlayerMainnet]}/tx`,
|
|
55
|
+
[neoxTestnet]: `${explorerBaseUrls[neoxTestnet]}/tx`,
|
|
56
|
+
[vanarTestnet]: `${explorerBaseUrls[vanarTestnet]}/tx`,
|
|
58
57
|
};
|
|
59
|
-
|
|
58
|
+
export const nativeTokenDetails = {
|
|
60
59
|
ETH: {
|
|
61
60
|
name: "Ether",
|
|
62
61
|
symbol: "ETH",
|
|
63
62
|
logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
|
|
64
63
|
},
|
|
65
|
-
[
|
|
64
|
+
[sepolia]: {
|
|
66
65
|
name: "Ether",
|
|
67
66
|
symbol: "ETH",
|
|
68
67
|
logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
|
|
@@ -72,7 +71,7 @@ exports.nativeTokenDetails = {
|
|
|
72
71
|
symbol: "MATIC",
|
|
73
72
|
logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
|
|
74
73
|
},
|
|
75
|
-
[
|
|
74
|
+
[polygonAmoy]: {
|
|
76
75
|
name: "Matic Token",
|
|
77
76
|
symbol: "MATIC",
|
|
78
77
|
logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
|
|
@@ -152,37 +151,42 @@ exports.nativeTokenDetails = {
|
|
|
152
151
|
symbol: "SOL",
|
|
153
152
|
logoUrl: "https://static.tria.so/chain-logo-w/Solana.webp",
|
|
154
153
|
},
|
|
155
|
-
[
|
|
154
|
+
[zkLink]: {
|
|
156
155
|
name: "Ether",
|
|
157
156
|
symbol: "ETH",
|
|
158
157
|
logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
|
|
159
158
|
},
|
|
160
|
-
[
|
|
159
|
+
[zkLinkTestnet]: {
|
|
161
160
|
name: "Ether",
|
|
162
161
|
symbol: "ETH",
|
|
163
162
|
logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
|
|
164
163
|
},
|
|
165
|
-
[
|
|
164
|
+
[bitlayerTestnet]: {
|
|
166
165
|
name: "Bitcoin",
|
|
167
166
|
symbol: "BTC",
|
|
168
167
|
logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp",
|
|
169
168
|
},
|
|
170
|
-
[
|
|
169
|
+
[bitlayerMainnet]: {
|
|
171
170
|
name: "Bitcoin",
|
|
172
171
|
symbol: "BTC",
|
|
173
172
|
logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp",
|
|
174
173
|
},
|
|
175
|
-
[
|
|
174
|
+
[neoxTestnet]: {
|
|
176
175
|
name: "Gas",
|
|
177
176
|
symbol: "GAS",
|
|
178
177
|
logoUrl: "https://assets.coingecko.com/coins/images/858/standard/GAS_512_512.png?1696501992",
|
|
179
178
|
},
|
|
179
|
+
[vanarTestnet]: {
|
|
180
|
+
name: "Vanry",
|
|
181
|
+
symbol: "VG",
|
|
182
|
+
logoUrl: "https://explorer-vanguard.vanarchain.com/assets/network_icon_dark.svg",
|
|
183
|
+
},
|
|
180
184
|
};
|
|
181
185
|
const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
|
|
182
|
-
|
|
186
|
+
export const rpcUrls = {
|
|
183
187
|
MUMBAI: `https://polygon-mumbai.g.alchemy.com/v2/${alchemyKey}`, //'https://polygon-mumbai.blockpi.network/v1/rpc/public',
|
|
184
|
-
[
|
|
185
|
-
[
|
|
188
|
+
[polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
|
|
189
|
+
[sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
|
|
186
190
|
ETH: "https://eth.llamarpc.com",
|
|
187
191
|
POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
|
|
188
192
|
AVALANCHE: "https://avalanche-c-chain.publicnode.com",
|
|
@@ -198,16 +202,17 @@ exports.rpcUrls = {
|
|
|
198
202
|
"METIS-TESTNET": "https://goerli.gateway.metisdevops.link",
|
|
199
203
|
MANTLE: "https://rpc.mantle.xyz",
|
|
200
204
|
"MANTLE-TESTNET": "https://rpc.testnet.mantle.xyz",
|
|
201
|
-
[
|
|
202
|
-
[
|
|
203
|
-
[
|
|
204
|
-
[
|
|
205
|
-
[
|
|
205
|
+
[zkLink]: "https://rpc.zklink.io",
|
|
206
|
+
[zkLinkTestnet]: "https://goerli.rpc.zklink.io",
|
|
207
|
+
[bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
|
|
208
|
+
[bitlayerMainnet]: "https://rpc.bitlayer.org",
|
|
209
|
+
[neoxTestnet]: "https://neoxseed1.ngd.network",
|
|
210
|
+
[vanarTestnet]: "https://rpc-partners-vanguard.vanarchain.com", // "https://rpc-vanguard.vanarchain.com",
|
|
206
211
|
};
|
|
207
|
-
|
|
212
|
+
export const chainNameToChainId = {
|
|
208
213
|
MUMBAI: 80001,
|
|
209
|
-
[
|
|
210
|
-
[
|
|
214
|
+
[polygonAmoy]: 80002,
|
|
215
|
+
[sepolia]: 11155111,
|
|
211
216
|
POLYGON: 137,
|
|
212
217
|
ETH: 1,
|
|
213
218
|
AVALANCHE: 43114,
|
|
@@ -223,16 +228,17 @@ exports.chainNameToChainId = {
|
|
|
223
228
|
"METIS-TESTNET": 599,
|
|
224
229
|
MANTLE: 5000,
|
|
225
230
|
"MANTLE-TESTNET": 5001,
|
|
226
|
-
[
|
|
227
|
-
[
|
|
228
|
-
[
|
|
229
|
-
[
|
|
230
|
-
[
|
|
231
|
+
[zkLink]: 810180,
|
|
232
|
+
[zkLinkTestnet]: 810182,
|
|
233
|
+
[bitlayerTestnet]: 200810,
|
|
234
|
+
[bitlayerMainnet]: 200901,
|
|
235
|
+
[neoxTestnet]: 12227330,
|
|
236
|
+
[vanarTestnet]: 78600,
|
|
231
237
|
};
|
|
232
|
-
|
|
238
|
+
export const chainIdToChainName = {
|
|
233
239
|
80001: "MUMBAI",
|
|
234
|
-
80002:
|
|
235
|
-
11155111:
|
|
240
|
+
80002: polygonAmoy,
|
|
241
|
+
11155111: sepolia,
|
|
236
242
|
137: "POLYGON",
|
|
237
243
|
1: "ETH",
|
|
238
244
|
43114: "AVALANCHE",
|
|
@@ -248,9 +254,10 @@ exports.chainIdToChainName = {
|
|
|
248
254
|
599: "METIS-TESTNET",
|
|
249
255
|
169: "MANTA",
|
|
250
256
|
3441005: "MANTA-TESTNET",
|
|
251
|
-
810180:
|
|
252
|
-
810182:
|
|
253
|
-
200810:
|
|
254
|
-
200901:
|
|
255
|
-
12227330:
|
|
257
|
+
810180: zkLink,
|
|
258
|
+
810182: zkLinkTestnet,
|
|
259
|
+
200810: bitlayerTestnet,
|
|
260
|
+
200901: bitlayerMainnet,
|
|
261
|
+
12227330: neoxTestnet,
|
|
262
|
+
78600: vanarTestnet,
|
|
256
263
|
};
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tria-sdk/constants",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.43",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
-
"build": "tsc --project tsconfig.json"
|
|
10
|
-
},
|
|
11
7
|
"devDependencies": {
|
|
12
8
|
"typescript": "^5.3.3",
|
|
13
9
|
"typescript-tools": "^0.3.1"
|
|
14
10
|
},
|
|
15
11
|
"keywords": [],
|
|
16
12
|
"author": "",
|
|
17
|
-
"license": "ISC"
|
|
18
|
-
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
16
|
+
"build": "tsc --project tsconfig.json"
|
|
17
|
+
}
|
|
18
|
+
}
|
package/src/chains.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
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
|
+
|
|
1
7
|
export const zkLink: string = "ZKLINK-NOVA";
|
|
2
8
|
export const zkLinkTestnet: string = "ZKLINK-NOVA-TESTNET";
|
|
3
9
|
export const bitlayerTestnet: string = "BITLAYER-TESTNET";
|
|
@@ -5,6 +11,7 @@ export const bitlayerMainnet: string = "BITLAYER-MAINNET";
|
|
|
5
11
|
export const neoxTestnet: string = "NEOX-TESTNET";
|
|
6
12
|
export const sepolia: string = "SEPOLIA";
|
|
7
13
|
export const polygonAmoy: string = "AMOY";
|
|
14
|
+
export const vanarTestnet: string = "VANGUARD-VANAR-TESTNET";
|
|
8
15
|
|
|
9
16
|
export type ZKLINK = "ZKLINK-NOVA";
|
|
10
17
|
export type ZKLINK_TESTNET = "ZKLINK-NOVA-TESTNET";
|
|
@@ -12,6 +19,7 @@ export type BITLAYER_TESTNET = "BITLAYER-TESTNET";
|
|
|
12
19
|
export type NEOX_TESTNET = "NEOX-TESTNET";
|
|
13
20
|
export type SEPOLIA = "SEPOLIA";
|
|
14
21
|
export type AMOY = "AMOY";
|
|
22
|
+
export type VANGUARD_VANAR_TESTNET = "VANGUARD-VANAR-TESTNET";
|
|
15
23
|
|
|
16
24
|
export const TESTNET_CHAINS = [
|
|
17
25
|
"MUMBAI",
|
|
@@ -24,6 +32,7 @@ export const TESTNET_CHAINS = [
|
|
|
24
32
|
neoxTestnet,
|
|
25
33
|
sepolia,
|
|
26
34
|
polygonAmoy,
|
|
35
|
+
vanarTestnet,
|
|
27
36
|
];
|
|
28
37
|
|
|
29
38
|
export const SUPPORTED_EVM_CHAINS = [
|
|
@@ -50,6 +59,7 @@ export const SUPPORTED_EVM_CHAINS = [
|
|
|
50
59
|
neoxTestnet,
|
|
51
60
|
sepolia,
|
|
52
61
|
polygonAmoy,
|
|
62
|
+
vanarTestnet,
|
|
53
63
|
];
|
|
54
64
|
|
|
55
65
|
export const AA_SUPPORTED_EVM_CHAINS = [
|
|
@@ -94,6 +104,7 @@ export const ALLCHAINS = [
|
|
|
94
104
|
neoxTestnet,
|
|
95
105
|
sepolia,
|
|
96
106
|
polygonAmoy,
|
|
107
|
+
vanarTestnet,
|
|
97
108
|
];
|
|
98
109
|
|
|
99
110
|
const baseLogoUrl = "https://static.tria.so/chain-logo-w";
|
|
@@ -224,6 +235,11 @@ export const networks = [
|
|
|
224
235
|
logo: `${baseLogoUrl}/Neo.webp`,
|
|
225
236
|
type: "testnet",
|
|
226
237
|
},
|
|
238
|
+
{
|
|
239
|
+
chainName: vanarTestnet,
|
|
240
|
+
logo: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrl}/Vanguard.webp`,
|
|
241
|
+
type: "testnet",
|
|
242
|
+
},
|
|
227
243
|
];
|
|
228
244
|
|
|
229
245
|
export const chainNameToLogo = {
|
|
@@ -252,6 +268,7 @@ export const chainNameToLogo = {
|
|
|
252
268
|
[bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
|
|
253
269
|
[bitlayerMainnet]: `${baseLogoUrl}/bitlayer.webp`,
|
|
254
270
|
[neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
|
|
271
|
+
[vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrl}/Vanguard.webp`,
|
|
255
272
|
};
|
|
256
273
|
|
|
257
274
|
export const chainNameToLogoBlack = {
|
|
@@ -280,4 +297,5 @@ export const chainNameToLogoBlack = {
|
|
|
280
297
|
[bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
|
|
281
298
|
[bitlayerMainnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
|
|
282
299
|
[neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
|
|
300
|
+
[vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrlBlack}/Vanguard.png`,
|
|
283
301
|
};
|
package/src/txn.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
sepolia,
|
|
7
7
|
zkLink,
|
|
8
8
|
zkLinkTestnet,
|
|
9
|
+
vanarTestnet,
|
|
9
10
|
} from "./chains";
|
|
10
11
|
|
|
11
12
|
export const explorerBaseUrls = {
|
|
@@ -36,6 +37,7 @@ export const explorerBaseUrls = {
|
|
|
36
37
|
[bitlayerTestnet]: "https://testnet-scan.bitlayer.org/en-us",
|
|
37
38
|
[bitlayerMainnet]: "https://www.btrscan.com",
|
|
38
39
|
[neoxTestnet]: "https://xt2scan.ngd.network",
|
|
40
|
+
[vanarTestnet]: "https://explorer-vanguard.vanarchain.com",
|
|
39
41
|
};
|
|
40
42
|
|
|
41
43
|
export const txnBaseUrl = {
|
|
@@ -62,6 +64,7 @@ export const txnBaseUrl = {
|
|
|
62
64
|
[bitlayerTestnet]: `${explorerBaseUrls[bitlayerTestnet]}/tx`,
|
|
63
65
|
[bitlayerMainnet]: `${explorerBaseUrls[bitlayerMainnet]}/tx`,
|
|
64
66
|
[neoxTestnet]: `${explorerBaseUrls[neoxTestnet]}/tx`,
|
|
67
|
+
[vanarTestnet]: `${explorerBaseUrls[vanarTestnet]}/tx`,
|
|
65
68
|
};
|
|
66
69
|
|
|
67
70
|
export const nativeTokenDetails = {
|
|
@@ -194,6 +197,12 @@ export const nativeTokenDetails = {
|
|
|
194
197
|
logoUrl:
|
|
195
198
|
"https://assets.coingecko.com/coins/images/858/standard/GAS_512_512.png?1696501992",
|
|
196
199
|
},
|
|
200
|
+
[vanarTestnet]: {
|
|
201
|
+
name: "Vanry",
|
|
202
|
+
symbol: "VG",
|
|
203
|
+
logoUrl:
|
|
204
|
+
"https://explorer-vanguard.vanarchain.com/assets/network_icon_dark.svg",
|
|
205
|
+
},
|
|
197
206
|
};
|
|
198
207
|
|
|
199
208
|
const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
|
|
@@ -222,6 +231,7 @@ export const rpcUrls = {
|
|
|
222
231
|
[bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
|
|
223
232
|
[bitlayerMainnet]: "https://rpc.bitlayer.org",
|
|
224
233
|
[neoxTestnet]: "https://neoxseed1.ngd.network",
|
|
234
|
+
[vanarTestnet]: "https://rpc-partners-vanguard.vanarchain.com", // "https://rpc-vanguard.vanarchain.com",
|
|
225
235
|
};
|
|
226
236
|
|
|
227
237
|
export const chainNameToChainId = {
|
|
@@ -248,6 +258,7 @@ export const chainNameToChainId = {
|
|
|
248
258
|
[bitlayerTestnet]: 200810,
|
|
249
259
|
[bitlayerMainnet]: 200901,
|
|
250
260
|
[neoxTestnet]: 12227330,
|
|
261
|
+
[vanarTestnet]: 78600,
|
|
251
262
|
};
|
|
252
263
|
|
|
253
264
|
export const chainIdToChainName = {
|
|
@@ -274,4 +285,5 @@ export const chainIdToChainName = {
|
|
|
274
285
|
200810: bitlayerTestnet,
|
|
275
286
|
200901: bitlayerMainnet,
|
|
276
287
|
12227330: neoxTestnet,
|
|
288
|
+
78600: vanarTestnet,
|
|
277
289
|
};
|
package/tsconfig.json
CHANGED
package/dist/src/gasToken.d.ts
DELETED
|
File without changes
|
package/dist/src/gasToken.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// import { polygonAmoy, sepolia } from "./chains";
|
|
3
|
-
// export const gasTokenAddresses = {
|
|
4
|
-
// [sepolia]: {
|
|
5
|
-
// USDC: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
|
|
6
|
-
// USDT: "",
|
|
7
|
-
// TST: "0xe2fDF4b113552A7bFaD5492D7E68F7479D7DFaCF",
|
|
8
|
-
// },
|
|
9
|
-
// [polygonAmoy]: {
|
|
10
|
-
// USDC: "",
|
|
11
|
-
// USDT: "",
|
|
12
|
-
// },
|
|
13
|
-
// };
|