@tria-sdk/constants 1.0.21 → 1.0.23
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 +20 -4
- package/dist/index.mjs +35 -0
- package/dist/src/chains.d.ts +7 -0
- package/dist/src/chains.d.ts.map +1 -0
- package/dist/src/chains.js +69 -50
- package/dist/src/chains.mjs +255 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +17 -10
- package/dist/src/config.mjs +9 -0
- package/dist/src/connect.d.ts.map +1 -0
- package/dist/src/connect.js +8 -5
- package/dist/src/connect.mjs +28 -0
- package/dist/src/txn.d.ts +1 -0
- package/dist/src/txn.d.ts.map +1 -0
- package/dist/src/txn.js +72 -59
- package/dist/src/txn.mjs +248 -0
- package/package.json +1 -1
- package/src/chains.ts +19 -1
- package/src/txn.ts +12 -0
- package/tsconfig.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
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);
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { isAaSupportedChain as a, isChainSupported as n, isEvmChain as r, isTestnetChain as t, prodApiUrl as i } from "./src/config.mjs";
|
|
2
|
+
import { AA_SUPPORTED_EVM_CHAINS as s, ALLCHAINS as A, SUPPORTED_EVM_CHAINS as p, TESTNET_CHAINS as E, bitlayerTestnet as C, chainNameToLogo as h, chainNameToLogoBlack as l, neoxTestnet as L, networks as S, polygonAmoy as _, sepolia as m, zkLink as N, zkLinkTestnet as I } from "./src/chains.mjs";
|
|
3
|
+
import { chainIdToChainName as x, chainNameToChainId as U, explorerBaseUrls as c, nativeTokenDetails as d, rpcUrls as y, txnBaseUrl as H } from "./src/txn.mjs";
|
|
4
|
+
import { TRIA_WALLET_SELECTED_CHAIN as f, TRIA_WALLET_STORE as g, eventTypes as D, storageKeys as P, triaAuthUrl as u } from "./src/connect.mjs";
|
|
5
|
+
export {
|
|
6
|
+
s as AA_SUPPORTED_EVM_CHAINS,
|
|
7
|
+
A as ALLCHAINS,
|
|
8
|
+
p as SUPPORTED_EVM_CHAINS,
|
|
9
|
+
E as TESTNET_CHAINS,
|
|
10
|
+
f as TRIA_WALLET_SELECTED_CHAIN,
|
|
11
|
+
g as TRIA_WALLET_STORE,
|
|
12
|
+
C as bitlayerTestnet,
|
|
13
|
+
x as chainIdToChainName,
|
|
14
|
+
U as chainNameToChainId,
|
|
15
|
+
h as chainNameToLogo,
|
|
16
|
+
l as chainNameToLogoBlack,
|
|
17
|
+
D as eventTypes,
|
|
18
|
+
c as explorerBaseUrls,
|
|
19
|
+
a as isAaSupportedChain,
|
|
20
|
+
n as isChainSupported,
|
|
21
|
+
r as isEvmChain,
|
|
22
|
+
t as isTestnetChain,
|
|
23
|
+
d as nativeTokenDetails,
|
|
24
|
+
L as neoxTestnet,
|
|
25
|
+
S as networks,
|
|
26
|
+
_ as polygonAmoy,
|
|
27
|
+
i as prodApiUrl,
|
|
28
|
+
y as rpcUrls,
|
|
29
|
+
m as sepolia,
|
|
30
|
+
P as storageKeys,
|
|
31
|
+
u as triaAuthUrl,
|
|
32
|
+
H as txnBaseUrl,
|
|
33
|
+
N as zkLink,
|
|
34
|
+
I as zkLinkTestnet
|
|
35
|
+
};
|
package/dist/src/chains.d.ts
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
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;
|
|
4
9
|
export declare const neoxTestnet: string;
|
|
5
10
|
export declare const sepolia: string;
|
|
6
11
|
export declare const polygonAmoy: string;
|
|
12
|
+
export declare const vanarTestnet: string;
|
|
7
13
|
export type ZKLINK = "ZKLINK-NOVA";
|
|
8
14
|
export type ZKLINK_TESTNET = "ZKLINK-NOVA-TESTNET";
|
|
9
15
|
export type BITLAYER_TESTNET = "BITLAYER-TESTNET";
|
|
10
16
|
export type NEOX_TESTNET = "NEOX-TESTNET";
|
|
11
17
|
export type SEPOLIA = "SEPOLIA";
|
|
12
18
|
export type AMOY = "AMOY";
|
|
19
|
+
export type VANGUARD_VANAR_TESTNET = "VANGUARD-VANAR-TESTNET";
|
|
13
20
|
export declare const TESTNET_CHAINS: string[];
|
|
14
21
|
export declare const SUPPORTED_EVM_CHAINS: string[];
|
|
15
22
|
export declare const AA_SUPPORTED_EVM_CHAINS: string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../../src/chains.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,EAAE,MAAsB,CAAC;AAC5C,eAAO,MAAM,aAAa,EAAE,MAA8B,CAAC;AAC3D,eAAO,MAAM,eAAe,EAAE,MAA2B,CAAC;AAC1D,eAAO,MAAM,WAAW,EAAE,MAAuB,CAAC;AAClD,eAAO,MAAM,OAAO,EAAE,MAAkB,CAAC;AACzC,eAAO,MAAM,WAAW,EAAE,MAAe,CAAC;AAE1C,MAAM,MAAM,MAAM,GAAG,aAAa,CAAC;AACnC,MAAM,MAAM,cAAc,GAAG,qBAAqB,CAAC;AACnD,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAClD,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC;AAC1C,MAAM,MAAM,OAAO,GAAG,SAAS,CAAC;AAChC,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC;AAE1B,eAAO,MAAM,cAAc,UAW1B,CAAC;AAEF,eAAO,MAAM,oBAAoB,UAuBhC,CAAC;AAEF,eAAO,MAAM,uBAAuB,UAWnC,CAAC;AAEF,eAAO,MAAM,SAAS,UAwBrB,CAAC;AAKF,eAAO,MAAM,QAAQ;;;;GAwHpB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;CAyB3B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;CAyBhC,CAAC"}
|
package/dist/src/chains.js
CHANGED
|
@@ -1,22 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.chainNameToLogoBlack = exports.chainNameToLogo = exports.networks = exports.ALLCHAINS = exports.AA_SUPPORTED_EVM_CHAINS = exports.SUPPORTED_EVM_CHAINS = exports.TESTNET_CHAINS = exports.vanarTestnet = exports.polygonAmoy = exports.sepolia = exports.neoxTestnet = exports.bitlayerTestnet = exports.zkLinkTestnet = exports.zkLink = exports.fuseSpark = exports.fuse = exports.ethereum = exports.polygon = exports.mumbai = void 0;
|
|
4
|
+
exports.mumbai = "MUMBAI";
|
|
5
|
+
exports.polygon = "POLYGON";
|
|
6
|
+
exports.ethereum = "ETH";
|
|
7
|
+
exports.fuse = "FUSE";
|
|
8
|
+
exports.fuseSpark = "FUSESPARK";
|
|
9
|
+
exports.zkLink = "ZKLINK-NOVA";
|
|
10
|
+
exports.zkLinkTestnet = "ZKLINK-NOVA-TESTNET";
|
|
11
|
+
exports.bitlayerTestnet = "BITLAYER-TESTNET";
|
|
12
|
+
exports.neoxTestnet = "NEOX-TESTNET";
|
|
13
|
+
exports.sepolia = "SEPOLIA";
|
|
14
|
+
exports.polygonAmoy = "AMOY";
|
|
15
|
+
exports.vanarTestnet = "VANGUARD-VANAR-TESTNET";
|
|
16
|
+
exports.TESTNET_CHAINS = [
|
|
8
17
|
"MUMBAI",
|
|
9
18
|
"FUSESPARK",
|
|
10
19
|
"MANTA-TESTNET",
|
|
11
20
|
"METIS-TESTNET",
|
|
12
21
|
"MANTLE-TESTNET",
|
|
13
|
-
zkLinkTestnet,
|
|
14
|
-
bitlayerTestnet,
|
|
15
|
-
neoxTestnet,
|
|
16
|
-
sepolia,
|
|
17
|
-
polygonAmoy,
|
|
22
|
+
exports.zkLinkTestnet,
|
|
23
|
+
exports.bitlayerTestnet,
|
|
24
|
+
exports.neoxTestnet,
|
|
25
|
+
exports.sepolia,
|
|
26
|
+
exports.polygonAmoy,
|
|
27
|
+
exports.vanarTestnet,
|
|
18
28
|
];
|
|
19
|
-
|
|
29
|
+
exports.SUPPORTED_EVM_CHAINS = [
|
|
20
30
|
"ETH",
|
|
21
31
|
"POLYGON",
|
|
22
32
|
"AVALANCHE",
|
|
@@ -33,14 +43,15 @@ export const SUPPORTED_EVM_CHAINS = [
|
|
|
33
43
|
"METIS-TESTNET",
|
|
34
44
|
"MANTLE",
|
|
35
45
|
"MANTLE-TESTNET",
|
|
36
|
-
zkLink,
|
|
37
|
-
zkLinkTestnet,
|
|
38
|
-
bitlayerTestnet,
|
|
39
|
-
neoxTestnet,
|
|
40
|
-
sepolia,
|
|
41
|
-
polygonAmoy,
|
|
46
|
+
exports.zkLink,
|
|
47
|
+
exports.zkLinkTestnet,
|
|
48
|
+
exports.bitlayerTestnet,
|
|
49
|
+
exports.neoxTestnet,
|
|
50
|
+
exports.sepolia,
|
|
51
|
+
exports.polygonAmoy,
|
|
52
|
+
exports.vanarTestnet,
|
|
42
53
|
];
|
|
43
|
-
|
|
54
|
+
exports.AA_SUPPORTED_EVM_CHAINS = [
|
|
44
55
|
// "ETH",
|
|
45
56
|
"POLYGON",
|
|
46
57
|
// "AVALANCHE",
|
|
@@ -50,9 +61,9 @@ export const AA_SUPPORTED_EVM_CHAINS = [
|
|
|
50
61
|
"FUSE",
|
|
51
62
|
"MUMBAI",
|
|
52
63
|
// "MANTLE",
|
|
53
|
-
sepolia,
|
|
64
|
+
exports.sepolia,
|
|
54
65
|
];
|
|
55
|
-
|
|
66
|
+
exports.ALLCHAINS = [
|
|
56
67
|
"ETH",
|
|
57
68
|
"POLYGON",
|
|
58
69
|
"AVALANCHE",
|
|
@@ -70,23 +81,24 @@ export const ALLCHAINS = [
|
|
|
70
81
|
"MANTLE",
|
|
71
82
|
"MANTLE-TESTNET",
|
|
72
83
|
"SOLANA",
|
|
73
|
-
zkLink,
|
|
74
|
-
zkLinkTestnet,
|
|
75
|
-
bitlayerTestnet,
|
|
76
|
-
neoxTestnet,
|
|
77
|
-
sepolia,
|
|
78
|
-
polygonAmoy,
|
|
84
|
+
exports.zkLink,
|
|
85
|
+
exports.zkLinkTestnet,
|
|
86
|
+
exports.bitlayerTestnet,
|
|
87
|
+
exports.neoxTestnet,
|
|
88
|
+
exports.sepolia,
|
|
89
|
+
exports.polygonAmoy,
|
|
90
|
+
exports.vanarTestnet,
|
|
79
91
|
];
|
|
80
92
|
const baseLogoUrl = "https://static.tria.so/chain-logo-w";
|
|
81
93
|
const baseLogoUrlBlack = "https://static.tria.so/chain-logo-b";
|
|
82
|
-
|
|
94
|
+
exports.networks = [
|
|
83
95
|
{
|
|
84
96
|
chainName: "ETH",
|
|
85
97
|
logo: `${baseLogoUrl}/Ethereum.webp`,
|
|
86
98
|
type: "mainnet",
|
|
87
99
|
},
|
|
88
100
|
{
|
|
89
|
-
chainName: sepolia,
|
|
101
|
+
chainName: exports.sepolia,
|
|
90
102
|
logo: `${baseLogoUrl}/Ethereum.webp`,
|
|
91
103
|
type: "testnet",
|
|
92
104
|
},
|
|
@@ -101,7 +113,7 @@ export const networks = [
|
|
|
101
113
|
type: "mainnet",
|
|
102
114
|
},
|
|
103
115
|
{
|
|
104
|
-
chainName: polygonAmoy,
|
|
116
|
+
chainName: exports.polygonAmoy,
|
|
105
117
|
logo: `${baseLogoUrl}/Polygon.svg`,
|
|
106
118
|
type: "testnet",
|
|
107
119
|
},
|
|
@@ -180,32 +192,37 @@ export const networks = [
|
|
|
180
192
|
type: "mainnet",
|
|
181
193
|
},
|
|
182
194
|
{
|
|
183
|
-
chainName: zkLink,
|
|
195
|
+
chainName: exports.zkLink,
|
|
184
196
|
logo: `${baseLogoUrl}/zklink.webp`,
|
|
185
197
|
type: "mainnet",
|
|
186
198
|
},
|
|
187
199
|
{
|
|
188
|
-
chainName: zkLinkTestnet,
|
|
200
|
+
chainName: exports.zkLinkTestnet,
|
|
189
201
|
logo: `${baseLogoUrl}/zklink.webp`,
|
|
190
202
|
type: "testnet",
|
|
191
203
|
},
|
|
192
204
|
{
|
|
193
|
-
chainName: bitlayerTestnet,
|
|
205
|
+
chainName: exports.bitlayerTestnet,
|
|
194
206
|
logo: `${baseLogoUrl}/bitlayer.webp`,
|
|
195
207
|
type: "testnet",
|
|
196
208
|
},
|
|
197
209
|
{
|
|
198
|
-
chainName: neoxTestnet,
|
|
199
|
-
logo: `${baseLogoUrl}/
|
|
210
|
+
chainName: exports.neoxTestnet,
|
|
211
|
+
logo: `${baseLogoUrl}/Neo.webp`,
|
|
212
|
+
type: "testnet",
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
chainName: exports.vanarTestnet,
|
|
216
|
+
logo: `${baseLogoUrl}/Vanguard.webp`,
|
|
200
217
|
type: "testnet",
|
|
201
218
|
},
|
|
202
219
|
];
|
|
203
|
-
|
|
220
|
+
exports.chainNameToLogo = {
|
|
204
221
|
ETH: `${baseLogoUrl}/Ethereum.webp`,
|
|
205
|
-
[sepolia]: `${baseLogoUrl}/Ethereum.webp`,
|
|
222
|
+
[exports.sepolia]: `${baseLogoUrl}/Ethereum.webp`,
|
|
206
223
|
FANTOM: `${baseLogoUrl}/Fantom.webp`,
|
|
207
224
|
POLYGON: `${baseLogoUrl}/Polygon.webp`,
|
|
208
|
-
[polygonAmoy]: `${baseLogoUrl}/Polygon.webp`,
|
|
225
|
+
[exports.polygonAmoy]: `${baseLogoUrl}/Polygon.webp`,
|
|
209
226
|
AVALANCHE: `${baseLogoUrl}/Avalanche.webp`,
|
|
210
227
|
OPTIMISM: `${baseLogoUrl}/Optimism.webp`,
|
|
211
228
|
ARBITRUM: `${baseLogoUrl}/Arbitrum.webp`,
|
|
@@ -221,18 +238,19 @@ export const chainNameToLogo = {
|
|
|
221
238
|
MANTLE: `${baseLogoUrl}/Mantle.webp`,
|
|
222
239
|
"MANTLE-TESTNET": `${baseLogoUrl}/Mantle.webp`,
|
|
223
240
|
SOLANA: `${baseLogoUrl}/Solana.webp`,
|
|
224
|
-
[zkLink]: `${baseLogoUrl}/zklink.webp`,
|
|
225
|
-
[zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
|
|
226
|
-
[bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
|
|
227
|
-
[neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
|
|
241
|
+
[exports.zkLink]: `${baseLogoUrl}/zklink.webp`,
|
|
242
|
+
[exports.zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
|
|
243
|
+
[exports.bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
|
|
244
|
+
[exports.neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
|
|
245
|
+
[exports.vanarTestnet]: `${baseLogoUrl}/Vanguard.webp`,
|
|
228
246
|
};
|
|
229
|
-
|
|
247
|
+
exports.chainNameToLogoBlack = {
|
|
230
248
|
ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
|
|
231
|
-
[sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
|
|
249
|
+
[exports.sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
|
|
232
250
|
BINANCE: `${baseLogoUrlBlack}/binance.webp`,
|
|
233
251
|
FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
|
|
234
252
|
POLYGON: `${baseLogoUrlBlack}/Polygon.webp`,
|
|
235
|
-
[polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
|
|
253
|
+
[exports.polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
|
|
236
254
|
AVALANCHE: `${baseLogoUrlBlack}/Avalanche.webp`,
|
|
237
255
|
OPTIMISM: `${baseLogoUrlBlack}/Optimism.webp`,
|
|
238
256
|
ARBITRUM: `${baseLogoUrlBlack}/Arbitrum.webp`,
|
|
@@ -247,8 +265,9 @@ export const chainNameToLogoBlack = {
|
|
|
247
265
|
MANTLE: `${baseLogoUrlBlack}/Mantle.webp`,
|
|
248
266
|
"MANTLE-TESTNET": `${baseLogoUrlBlack}/Mantle.webp`,
|
|
249
267
|
SOLANA: `${baseLogoUrlBlack}/Solana.webp`,
|
|
250
|
-
[zkLink]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
251
|
-
[zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
252
|
-
[bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
|
|
253
|
-
[neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
|
|
268
|
+
[exports.zkLink]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
269
|
+
[exports.zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
270
|
+
[exports.bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
|
|
271
|
+
[exports.neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
|
|
272
|
+
[exports.vanarTestnet]: `${baseLogoUrlBlack}/Vanguard.png`,
|
|
254
273
|
};
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
const E = "ZKLINK-NOVA", T = "ZKLINK-NOVA-TESTNET", a = "BITLAYER-TESTNET", N = "NEOX-TESTNET", n = "SEPOLIA", o = "AMOY", A = [
|
|
2
|
+
"MUMBAI",
|
|
3
|
+
"FUSESPARK",
|
|
4
|
+
"MANTA-TESTNET",
|
|
5
|
+
"METIS-TESTNET",
|
|
6
|
+
"MANTLE-TESTNET",
|
|
7
|
+
T,
|
|
8
|
+
a,
|
|
9
|
+
N,
|
|
10
|
+
n,
|
|
11
|
+
o
|
|
12
|
+
], p = [
|
|
13
|
+
"ETH",
|
|
14
|
+
"POLYGON",
|
|
15
|
+
"AVALANCHE",
|
|
16
|
+
"ARBITRUM",
|
|
17
|
+
"BINANCE",
|
|
18
|
+
"OPTIMISM",
|
|
19
|
+
"FANTOM",
|
|
20
|
+
"FUSE",
|
|
21
|
+
"FUSESPARK",
|
|
22
|
+
"MUMBAI",
|
|
23
|
+
"MANTA",
|
|
24
|
+
"MANTA-TESTNET",
|
|
25
|
+
"METIS",
|
|
26
|
+
"METIS-TESTNET",
|
|
27
|
+
"MANTLE",
|
|
28
|
+
"MANTLE-TESTNET",
|
|
29
|
+
E,
|
|
30
|
+
T,
|
|
31
|
+
a,
|
|
32
|
+
N,
|
|
33
|
+
n,
|
|
34
|
+
o
|
|
35
|
+
], M = [
|
|
36
|
+
// "ETH",
|
|
37
|
+
"POLYGON",
|
|
38
|
+
// "AVALANCHE",
|
|
39
|
+
// "ARBITRUM",
|
|
40
|
+
// "BINANCE",
|
|
41
|
+
// "OPTIMISM",
|
|
42
|
+
"FUSE",
|
|
43
|
+
"MUMBAI",
|
|
44
|
+
// "MANTLE",
|
|
45
|
+
n
|
|
46
|
+
], i = [
|
|
47
|
+
"ETH",
|
|
48
|
+
"POLYGON",
|
|
49
|
+
"AVALANCHE",
|
|
50
|
+
"ARBITRUM",
|
|
51
|
+
"BINANCE",
|
|
52
|
+
"OPTIMISM",
|
|
53
|
+
"FANTOM",
|
|
54
|
+
"FUSE",
|
|
55
|
+
"FUSESPARK",
|
|
56
|
+
"MUMBAI",
|
|
57
|
+
"MANTA",
|
|
58
|
+
"MANTA-TESTNET",
|
|
59
|
+
"METIS",
|
|
60
|
+
"METIS-TESTNET",
|
|
61
|
+
"MANTLE",
|
|
62
|
+
"MANTLE-TESTNET",
|
|
63
|
+
"SOLANA",
|
|
64
|
+
E,
|
|
65
|
+
T,
|
|
66
|
+
a,
|
|
67
|
+
N,
|
|
68
|
+
n,
|
|
69
|
+
o
|
|
70
|
+
], e = "https://static.tria.so/chain-logo-w", t = "https://static.tria.so/chain-logo-b", b = [
|
|
71
|
+
{
|
|
72
|
+
chainName: "ETH",
|
|
73
|
+
logo: `${e}/Ethereum.webp`,
|
|
74
|
+
type: "mainnet"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
chainName: n,
|
|
78
|
+
logo: `${e}/Ethereum.webp`,
|
|
79
|
+
type: "testnet"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
chainName: "FANTOM",
|
|
83
|
+
logo: `${e}/Fantom.webp`,
|
|
84
|
+
type: "mainnet"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
chainName: "POLYGON",
|
|
88
|
+
logo: `${e}/Polygon.svg`,
|
|
89
|
+
type: "mainnet"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
chainName: o,
|
|
93
|
+
logo: `${e}/Polygon.svg`,
|
|
94
|
+
type: "testnet"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
chainName: "AVALANCHE",
|
|
98
|
+
logo: `${e}/Avalanche.webp`,
|
|
99
|
+
type: "mainnet"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
chainName: "OPTIMISM",
|
|
103
|
+
logo: `${e}/Optimism.webp`,
|
|
104
|
+
type: "mainnet"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
chainName: "ARBITRUM",
|
|
108
|
+
logo: `${e}/Arbitrum.webp`,
|
|
109
|
+
type: "mainnet"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
chainName: "FUSE",
|
|
113
|
+
logo: `${e}/Fuse.webp`,
|
|
114
|
+
type: "mainnet"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
chainName: "FUSESPARK",
|
|
118
|
+
logo: `${e}/Fuse.webp`,
|
|
119
|
+
type: "testnet"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
chainName: "MUMBAI",
|
|
123
|
+
logo: `${e}/Polygon.svg`,
|
|
124
|
+
type: "testnet"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
chainName: "BINANCE",
|
|
128
|
+
logo: `${e}/Binance.svg`,
|
|
129
|
+
type: "mainnet"
|
|
130
|
+
},
|
|
131
|
+
// {
|
|
132
|
+
// chainName: 'LINEA',
|
|
133
|
+
// logo: `${baseLogoUrl}/Linea.svg`,
|
|
134
|
+
// },
|
|
135
|
+
{
|
|
136
|
+
chainName: "METIS",
|
|
137
|
+
logo: `${e}/Metis.webp`,
|
|
138
|
+
type: "mainnet"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
chainName: "METIS-TESTNET",
|
|
142
|
+
logo: `${e}/Metis.webp`,
|
|
143
|
+
type: "testnet"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
chainName: "MANTA",
|
|
147
|
+
logo: `${e}/Manta.webp`,
|
|
148
|
+
type: "mainnet"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
chainName: "MANTA-TESTNET",
|
|
152
|
+
logo: `${e}/Manta.webp`,
|
|
153
|
+
type: "testnet"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
chainName: "MANTLE",
|
|
157
|
+
logo: `${e}/Mantle.webp`,
|
|
158
|
+
type: "mainnet"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
chainName: "MANTLE-TESTNET",
|
|
162
|
+
logo: `${e}/Mantle.webp`,
|
|
163
|
+
type: "testnet"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
chainName: "SOLANA",
|
|
167
|
+
logo: `${e}/Solana.webp`,
|
|
168
|
+
type: "mainnet"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
chainName: E,
|
|
172
|
+
logo: `${e}/zklink.webp`,
|
|
173
|
+
type: "mainnet"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
chainName: T,
|
|
177
|
+
logo: `${e}/zklink.webp`,
|
|
178
|
+
type: "testnet"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
chainName: a,
|
|
182
|
+
logo: `${e}/bitlayer.webp`,
|
|
183
|
+
type: "testnet"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
chainName: N,
|
|
187
|
+
logo: `${e}/Neo.webp`,
|
|
188
|
+
type: "testnet"
|
|
189
|
+
}
|
|
190
|
+
], $ = {
|
|
191
|
+
ETH: `${e}/Ethereum.webp`,
|
|
192
|
+
[n]: `${e}/Ethereum.webp`,
|
|
193
|
+
FANTOM: `${e}/Fantom.webp`,
|
|
194
|
+
POLYGON: `${e}/Polygon.webp`,
|
|
195
|
+
[o]: `${e}/Polygon.webp`,
|
|
196
|
+
AVALANCHE: `${e}/Avalanche.webp`,
|
|
197
|
+
OPTIMISM: `${e}/Optimism.webp`,
|
|
198
|
+
ARBITRUM: `${e}/Arbitrum.webp`,
|
|
199
|
+
LINEA: `${e}/Linea.webp`,
|
|
200
|
+
MUMBAI: `${e}/Polygon.webp`,
|
|
201
|
+
FUSE: `${e}/Fuse.webp`,
|
|
202
|
+
FUSESPARK: `${e}/Fuse.webp`,
|
|
203
|
+
BINANCE: `${e}/Binance.svg`,
|
|
204
|
+
MANTA: `${e}/Manta.webp`,
|
|
205
|
+
"MANTA-TESTNET": `${e}/Manta.webp`,
|
|
206
|
+
METIS: `${e}/Metis.webp`,
|
|
207
|
+
"METIS-TESTNET": `${e}/Metis.webp`,
|
|
208
|
+
MANTLE: `${e}/Mantle.webp`,
|
|
209
|
+
"MANTLE-TESTNET": `${e}/Mantle.webp`,
|
|
210
|
+
SOLANA: `${e}/Solana.webp`,
|
|
211
|
+
[E]: `${e}/zklink.webp`,
|
|
212
|
+
[T]: `${e}/zklink.webp`,
|
|
213
|
+
[a]: `${e}/bitlayer.webp`,
|
|
214
|
+
[N]: `${e}/Neo.webp`
|
|
215
|
+
}, S = {
|
|
216
|
+
ETH: `${t}/Ethereum.webp`,
|
|
217
|
+
[n]: `${t}/Ethereum.webp`,
|
|
218
|
+
BINANCE: `${t}/binance.webp`,
|
|
219
|
+
FANTOM: `${t}/Fantom.webp`,
|
|
220
|
+
POLYGON: `${t}/Polygon.webp`,
|
|
221
|
+
[o]: `${t}/Polygon.webp`,
|
|
222
|
+
AVALANCHE: `${t}/Avalanche.webp`,
|
|
223
|
+
OPTIMISM: `${t}/Optimism.webp`,
|
|
224
|
+
ARBITRUM: `${t}/Arbitrum.webp`,
|
|
225
|
+
LINEA: `${t}/Linea.webp`,
|
|
226
|
+
MUMBAI: `${t}/Polygon.webp`,
|
|
227
|
+
FUSE: `${t}/fuse.webp`,
|
|
228
|
+
FUSESPARK: `${t}/fuse.webp`,
|
|
229
|
+
MANTA: `${t}/Manta.webp`,
|
|
230
|
+
"MANTA-TESTNET": `${t}/Manta.webp`,
|
|
231
|
+
METIS: `${t}/Metis.webp`,
|
|
232
|
+
"METIS-TESTNET": `${t}/Metis.webp`,
|
|
233
|
+
MANTLE: `${t}/Mantle.webp`,
|
|
234
|
+
"MANTLE-TESTNET": `${t}/Mantle.webp`,
|
|
235
|
+
SOLANA: `${t}/Solana.webp`,
|
|
236
|
+
[E]: `${t}/zklink.webp`,
|
|
237
|
+
[T]: `${t}/zklink.webp`,
|
|
238
|
+
[a]: `${t}/bitlayer.webp`,
|
|
239
|
+
[N]: `${t}/Neo.png`
|
|
240
|
+
};
|
|
241
|
+
export {
|
|
242
|
+
M as AA_SUPPORTED_EVM_CHAINS,
|
|
243
|
+
i as ALLCHAINS,
|
|
244
|
+
p as SUPPORTED_EVM_CHAINS,
|
|
245
|
+
A as TESTNET_CHAINS,
|
|
246
|
+
a as bitlayerTestnet,
|
|
247
|
+
$ as chainNameToLogo,
|
|
248
|
+
S as chainNameToLogoBlack,
|
|
249
|
+
N as neoxTestnet,
|
|
250
|
+
b as networks,
|
|
251
|
+
o as polygonAmoy,
|
|
252
|
+
n as sepolia,
|
|
253
|
+
E as zkLink,
|
|
254
|
+
T as zkLinkTestnet
|
|
255
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,UAAU,yBAAyB,CAAC;AAEjD,eAAO,MAAM,UAAU,cAAe,MAAM,YAE3C,CAAC;AAEF,eAAO,MAAM,kBAAkB,cAAe,MAAM,YAEnD,CAAC;AAEF,eAAO,MAAM,gBAAgB,cAAe,MAAM,YAEjD,CAAC;AAEF,eAAO,MAAM,cAAc,cAAe,MAAM,YAE/C,CAAC"}
|
package/dist/src/config.js
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isTestnetChain = exports.isChainSupported = exports.isAaSupportedChain = exports.isEvmChain = exports.prodApiUrl = void 0;
|
|
4
|
+
const chains_1 = require("./chains");
|
|
5
|
+
exports.prodApiUrl = "https://prod.tria.so";
|
|
6
|
+
const isEvmChain = (chainName) => {
|
|
7
|
+
return chains_1.SUPPORTED_EVM_CHAINS.includes(chainName);
|
|
5
8
|
};
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
exports.isEvmChain = isEvmChain;
|
|
10
|
+
const isAaSupportedChain = (chainName) => {
|
|
11
|
+
return chains_1.AA_SUPPORTED_EVM_CHAINS.includes(chainName);
|
|
8
12
|
};
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
exports.isAaSupportedChain = isAaSupportedChain;
|
|
14
|
+
const isChainSupported = (chainName) => {
|
|
15
|
+
return chains_1.ALLCHAINS.includes(chainName);
|
|
11
16
|
};
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
exports.isChainSupported = isChainSupported;
|
|
18
|
+
const isTestnetChain = (chainName) => {
|
|
19
|
+
return chains_1.TESTNET_CHAINS.includes(chainName);
|
|
14
20
|
};
|
|
21
|
+
exports.isTestnetChain = isTestnetChain;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SUPPORTED_EVM_CHAINS as t, AA_SUPPORTED_EVM_CHAINS as r, ALLCHAINS as s, TESTNET_CHAINS as i } from "./chains.mjs";
|
|
2
|
+
const o = "https://prod.tria.so", p = (n) => t.includes(n), u = (n) => r.includes(n), c = (n) => s.includes(n), A = (n) => i.includes(n);
|
|
3
|
+
export {
|
|
4
|
+
u as isAaSupportedChain,
|
|
5
|
+
c as isChainSupported,
|
|
6
|
+
p as isEvmChain,
|
|
7
|
+
A as isTestnetChain,
|
|
8
|
+
o as prodApiUrl
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../src/connect.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;CAgBtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AACrD,eAAO,MAAM,0BAA0B,8BAA8B,CAAC;AACtE,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AACF,eAAO,MAAM,WAAW,yBAAyB,CAAC"}
|
package/dist/src/connect.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
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 = {
|
|
2
5
|
logIn: "Log in",
|
|
3
6
|
triaSignUp: "Tria Sign up",
|
|
4
7
|
emailPwSignUp: "Email Pwd Sign up",
|
|
@@ -15,12 +18,12 @@ export const eventTypes = {
|
|
|
15
18
|
saveToAuth: "Save to Auth Iframe",
|
|
16
19
|
triaStoreSet: "triaStoreSet",
|
|
17
20
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
exports.TRIA_WALLET_STORE = "tria.wallet.store";
|
|
22
|
+
exports.TRIA_WALLET_SELECTED_CHAIN = "tria.wallet.selectedChain";
|
|
23
|
+
exports.storageKeys = {
|
|
21
24
|
TRIA_WALLET_STORE: "tria.wallet.store",
|
|
22
25
|
TRIA_WALLET_SELECTED_CHAIN: "tria.wallet.selectedChain",
|
|
23
26
|
PERSIST_ROOT: "persist:root",
|
|
24
27
|
};
|
|
25
|
-
|
|
28
|
+
exports.triaAuthUrl = "https://auth.tria.so";
|
|
26
29
|
// export const PARENT_URL = document?.referrer || window?.parent?.[0]?.location?.ancestorOrigins?.[0];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
logIn: "Log in",
|
|
3
|
+
triaSignUp: "Tria Sign up",
|
|
4
|
+
emailPwSignUp: "Email Pwd Sign up",
|
|
5
|
+
socialSignUp: "Social Sign up",
|
|
6
|
+
signMessage: "Sign Message",
|
|
7
|
+
send: "Send",
|
|
8
|
+
disconnect: "Disconnect",
|
|
9
|
+
switchChain: "Switch chain",
|
|
10
|
+
detected: "Detected Logged in Tria account",
|
|
11
|
+
logout: "Logout",
|
|
12
|
+
passMessage: "Pass Message",
|
|
13
|
+
accessToken: "Access Token Pass",
|
|
14
|
+
idTokenPass: "Id Token Pass",
|
|
15
|
+
saveToAuth: "Save to Auth Iframe",
|
|
16
|
+
triaStoreSet: "triaStoreSet"
|
|
17
|
+
}, t = "tria.wallet.store", s = "tria.wallet.selectedChain", a = {
|
|
18
|
+
TRIA_WALLET_STORE: "tria.wallet.store",
|
|
19
|
+
TRIA_WALLET_SELECTED_CHAIN: "tria.wallet.selectedChain",
|
|
20
|
+
PERSIST_ROOT: "persist:root"
|
|
21
|
+
}, i = "https://auth.tria.so";
|
|
22
|
+
export {
|
|
23
|
+
s as TRIA_WALLET_SELECTED_CHAIN,
|
|
24
|
+
t as TRIA_WALLET_STORE,
|
|
25
|
+
e as eventTypes,
|
|
26
|
+
a as storageKeys,
|
|
27
|
+
i as triaAuthUrl
|
|
28
|
+
};
|
package/dist/src/txn.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"txn.d.ts","sourceRoot":"","sources":["../../src/txn.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;CA2B5B,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;CAuBtB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6H9B,CAAC;AAIF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;CAuBnB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;CAuB9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;CAuB9B,CAAC"}
|
package/dist/src/txn.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.chainIdToChainName = exports.chainNameToChainId = exports.rpcUrls = exports.nativeTokenDetails = exports.txnBaseUrl = exports.explorerBaseUrls = void 0;
|
|
4
|
+
const chains_1 = require("./chains");
|
|
5
|
+
exports.explorerBaseUrls = {
|
|
3
6
|
ETH: "https://etherscan.io",
|
|
4
|
-
[sepolia]: "https://sepolia.etherscan.io",
|
|
7
|
+
[chains_1.sepolia]: "https://sepolia.etherscan.io",
|
|
5
8
|
POLYGON: "https://polygonscan.com",
|
|
6
|
-
[polygonAmoy]: "https://www.oklink.com/amoy",
|
|
9
|
+
[chains_1.polygonAmoy]: "https://www.oklink.com/amoy",
|
|
7
10
|
AVALANCHE: "https://snowtrace.io",
|
|
8
11
|
ARBITRUM: "https://arbiscan.io",
|
|
9
12
|
BINANCE: "https://bscscan.com",
|
|
@@ -22,42 +25,44 @@ export const explorerBaseUrls = {
|
|
|
22
25
|
"MANTLE-TESTNET": "https://explorer.testnet.mantle.xyz",
|
|
23
26
|
MANTA: "https://pacific-explorer.manta.network",
|
|
24
27
|
"MANTA-TESTNET": "https://manta-testnet.calderaexplorer.xyz",
|
|
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",
|
|
28
|
+
[chains_1.zkLink]: "https://explorer.zklink.io",
|
|
29
|
+
[chains_1.zkLinkTestnet]: "https://goerli.explorer.zklink.io",
|
|
30
|
+
[chains_1.bitlayerTestnet]: "https://testnet-scan.bitlayer.org/en-us",
|
|
31
|
+
[chains_1.neoxTestnet]: "https://xt2scan.ngd.network",
|
|
32
|
+
[chains_1.vanarTestnet]: "https://explorer-vanguard.vanarchain.com",
|
|
29
33
|
};
|
|
30
|
-
|
|
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`,
|
|
34
|
+
exports.txnBaseUrl = {
|
|
35
|
+
ETH: `${exports.explorerBaseUrls.ETH}/tx`, // /txHash
|
|
36
|
+
[chains_1.sepolia]: `${exports.explorerBaseUrls[chains_1.sepolia]}/tx`,
|
|
37
|
+
POLYGON: `${exports.explorerBaseUrls.POLYGON}/tx`,
|
|
38
|
+
[chains_1.polygonAmoy]: `${exports.explorerBaseUrls[chains_1.polygonAmoy]}/tx`,
|
|
39
|
+
AVALANCHE: `${exports.explorerBaseUrls.AVALANCHE}/tx`,
|
|
40
|
+
ARBITRUM: `${exports.explorerBaseUrls.ARBITRUM}/tx`,
|
|
41
|
+
BINANCE: `${exports.explorerBaseUrls.BINANCE}/tx`,
|
|
42
|
+
OPTIMISM: `${exports.explorerBaseUrls.OPTIMISM}/tx`,
|
|
43
|
+
FANTOM: `${exports.explorerBaseUrls.FANTOM}/tx`,
|
|
44
|
+
FUSE: `${exports.explorerBaseUrls.FUSE}/tx`,
|
|
45
|
+
FUSESPARK: `${exports.explorerBaseUrls.FUSESPARK}/tx`,
|
|
46
|
+
MUMBAI: `${exports.explorerBaseUrls.MUMBAI}/tx`,
|
|
47
|
+
METIS: `${exports.explorerBaseUrls.METIS}/tx`,
|
|
48
|
+
"METIS-TESTNET": `${exports.explorerBaseUrls["METIS-TESTNET"]}/tx`,
|
|
49
|
+
MANTLE: `${exports.explorerBaseUrls.MANTLE}/tx`,
|
|
50
|
+
"MANTLE-TESTNET": `${exports.explorerBaseUrls["MANTLE-TESTNET"]}/tx`,
|
|
51
|
+
MANTA: `${exports.explorerBaseUrls.MANTA}/tx`,
|
|
52
|
+
"MANTA-TESTNET": `${exports.explorerBaseUrls["MANTA-TESTNET"]}/tx`,
|
|
53
|
+
[chains_1.zkLink]: `${exports.explorerBaseUrls[chains_1.zkLink]}/tx`,
|
|
54
|
+
[chains_1.zkLinkTestnet]: `${exports.explorerBaseUrls[chains_1.zkLinkTestnet]}/tx`,
|
|
55
|
+
[chains_1.bitlayerTestnet]: `${exports.explorerBaseUrls[chains_1.bitlayerTestnet]}/tx`,
|
|
56
|
+
[chains_1.neoxTestnet]: `${exports.explorerBaseUrls[chains_1.neoxTestnet]}/tx`,
|
|
57
|
+
[chains_1.vanarTestnet]: `${exports.explorerBaseUrls[chains_1.vanarTestnet]}/tx`,
|
|
53
58
|
};
|
|
54
|
-
|
|
59
|
+
exports.nativeTokenDetails = {
|
|
55
60
|
ETH: {
|
|
56
61
|
name: "Ether",
|
|
57
62
|
symbol: "ETH",
|
|
58
63
|
logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
|
|
59
64
|
},
|
|
60
|
-
[sepolia]: {
|
|
65
|
+
[chains_1.sepolia]: {
|
|
61
66
|
name: "Ether",
|
|
62
67
|
symbol: "ETH",
|
|
63
68
|
logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
|
|
@@ -67,7 +72,7 @@ export const nativeTokenDetails = {
|
|
|
67
72
|
symbol: "MATIC",
|
|
68
73
|
logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
|
|
69
74
|
},
|
|
70
|
-
[polygonAmoy]: {
|
|
75
|
+
[chains_1.polygonAmoy]: {
|
|
71
76
|
name: "Matic Token",
|
|
72
77
|
symbol: "MATIC",
|
|
73
78
|
logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
|
|
@@ -147,32 +152,37 @@ export const nativeTokenDetails = {
|
|
|
147
152
|
symbol: "SOL",
|
|
148
153
|
logoUrl: "https://static.tria.so/chain-logo-w/Solana.webp",
|
|
149
154
|
},
|
|
150
|
-
[zkLink]: {
|
|
155
|
+
[chains_1.zkLink]: {
|
|
151
156
|
name: "Ether",
|
|
152
157
|
symbol: "ETH",
|
|
153
158
|
logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
|
|
154
159
|
},
|
|
155
|
-
[zkLinkTestnet]: {
|
|
160
|
+
[chains_1.zkLinkTestnet]: {
|
|
156
161
|
name: "Ether",
|
|
157
162
|
symbol: "ETH",
|
|
158
163
|
logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
|
|
159
164
|
},
|
|
160
|
-
[bitlayerTestnet]: {
|
|
165
|
+
[chains_1.bitlayerTestnet]: {
|
|
161
166
|
name: "Bitcoin",
|
|
162
167
|
symbol: "BTC",
|
|
163
168
|
logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp",
|
|
164
169
|
},
|
|
165
|
-
[neoxTestnet]: {
|
|
170
|
+
[chains_1.neoxTestnet]: {
|
|
166
171
|
name: "Gas",
|
|
167
172
|
symbol: "GAS",
|
|
168
173
|
logoUrl: "https://assets.coingecko.com/coins/images/858/standard/GAS_512_512.png?1696501992",
|
|
169
174
|
},
|
|
175
|
+
[chains_1.vanarTestnet]: {
|
|
176
|
+
name: "Vanry",
|
|
177
|
+
symbol: "VANRY",
|
|
178
|
+
logoUrl: "https://explorer-vanguard.vanarchain.com/assets/network_icon_dark.svg",
|
|
179
|
+
},
|
|
170
180
|
};
|
|
171
181
|
const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
|
|
172
|
-
|
|
182
|
+
exports.rpcUrls = {
|
|
173
183
|
MUMBAI: `https://polygon-mumbai.g.alchemy.com/v2/${alchemyKey}`, //'https://polygon-mumbai.blockpi.network/v1/rpc/public',
|
|
174
|
-
[polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
|
|
175
|
-
[sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
|
|
184
|
+
[chains_1.polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
|
|
185
|
+
[chains_1.sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
|
|
176
186
|
ETH: "https://eth.llamarpc.com",
|
|
177
187
|
POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
|
|
178
188
|
AVALANCHE: "https://avalanche-c-chain.publicnode.com",
|
|
@@ -188,15 +198,16 @@ export const rpcUrls = {
|
|
|
188
198
|
"METIS-TESTNET": "https://goerli.gateway.metisdevops.link",
|
|
189
199
|
MANTLE: "https://rpc.mantle.xyz",
|
|
190
200
|
"MANTLE-TESTNET": "https://rpc.testnet.mantle.xyz",
|
|
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",
|
|
201
|
+
[chains_1.zkLink]: "https://rpc.zklink.io",
|
|
202
|
+
[chains_1.zkLinkTestnet]: "https://goerli.rpc.zklink.io",
|
|
203
|
+
[chains_1.bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
|
|
204
|
+
[chains_1.neoxTestnet]: "https://neoxseed1.ngd.network",
|
|
205
|
+
[chains_1.vanarTestnet]: "https://rpc-vanguard.vanarchain.com",
|
|
195
206
|
};
|
|
196
|
-
|
|
207
|
+
exports.chainNameToChainId = {
|
|
197
208
|
MUMBAI: 80001,
|
|
198
|
-
[polygonAmoy]: 80002,
|
|
199
|
-
[sepolia]: 11155111,
|
|
209
|
+
[chains_1.polygonAmoy]: 80002,
|
|
210
|
+
[chains_1.sepolia]: 11155111,
|
|
200
211
|
POLYGON: 137,
|
|
201
212
|
ETH: 1,
|
|
202
213
|
AVALANCHE: 43114,
|
|
@@ -212,15 +223,16 @@ export const chainNameToChainId = {
|
|
|
212
223
|
"METIS-TESTNET": 599,
|
|
213
224
|
MANTLE: 5000,
|
|
214
225
|
"MANTLE-TESTNET": 5001,
|
|
215
|
-
[zkLink]: 810180,
|
|
216
|
-
[zkLinkTestnet]: 810182,
|
|
217
|
-
[bitlayerTestnet]: 200810,
|
|
218
|
-
[neoxTestnet]: 12227330,
|
|
226
|
+
[chains_1.zkLink]: 810180,
|
|
227
|
+
[chains_1.zkLinkTestnet]: 810182,
|
|
228
|
+
[chains_1.bitlayerTestnet]: 200810,
|
|
229
|
+
[chains_1.neoxTestnet]: 12227330,
|
|
230
|
+
[chains_1.vanarTestnet]: 78600,
|
|
219
231
|
};
|
|
220
|
-
|
|
232
|
+
exports.chainIdToChainName = {
|
|
221
233
|
80001: "MUMBAI",
|
|
222
|
-
80002: polygonAmoy,
|
|
223
|
-
11155111: sepolia,
|
|
234
|
+
80002: chains_1.polygonAmoy,
|
|
235
|
+
11155111: chains_1.sepolia,
|
|
224
236
|
137: "POLYGON",
|
|
225
237
|
1: "ETH",
|
|
226
238
|
43114: "AVALANCHE",
|
|
@@ -236,8 +248,9 @@ export const chainIdToChainName = {
|
|
|
236
248
|
599: "METIS-TESTNET",
|
|
237
249
|
169: "MANTA",
|
|
238
250
|
3441005: "MANTA-TESTNET",
|
|
239
|
-
810180: zkLink,
|
|
240
|
-
810182: zkLinkTestnet,
|
|
241
|
-
200810: bitlayerTestnet,
|
|
242
|
-
12227330: neoxTestnet,
|
|
251
|
+
810180: chains_1.zkLink,
|
|
252
|
+
810182: chains_1.zkLinkTestnet,
|
|
253
|
+
200810: chains_1.bitlayerTestnet,
|
|
254
|
+
12227330: chains_1.neoxTestnet,
|
|
255
|
+
78600: chains_1.vanarTestnet,
|
|
243
256
|
};
|
package/dist/src/txn.mjs
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { sepolia as o, polygonAmoy as s, zkLink as e, zkLinkTestnet as a, bitlayerTestnet as n, neoxTestnet as T } from "./chains.mjs";
|
|
2
|
+
const t = {
|
|
3
|
+
ETH: "https://etherscan.io",
|
|
4
|
+
[o]: "https://sepolia.etherscan.io",
|
|
5
|
+
POLYGON: "https://polygonscan.com",
|
|
6
|
+
[s]: "https://www.oklink.com/amoy",
|
|
7
|
+
AVALANCHE: "https://snowtrace.io",
|
|
8
|
+
ARBITRUM: "https://arbiscan.io",
|
|
9
|
+
BINANCE: "https://bscscan.com",
|
|
10
|
+
OPTIMISM: "https://optimistic.etherscan.io",
|
|
11
|
+
FANTOM: "https://ftmscan.com",
|
|
12
|
+
SOLANA: "https://solscan.io",
|
|
13
|
+
APTOS: "https://explorer.aptoslabs.com",
|
|
14
|
+
NEO: "https://neo3.neotube.io",
|
|
15
|
+
SUI: "https://suiexplorer.com/?network=mainnet",
|
|
16
|
+
FUSE: "https://explorer.fuse.io",
|
|
17
|
+
FUSESPARK: "https://explorer.fusespark.io",
|
|
18
|
+
MUMBAI: "https://mumbai.polygonscan.com",
|
|
19
|
+
METIS: "https://andromeda-explorer.metis.io",
|
|
20
|
+
"METIS-TESTNET": "https://sepolia.explorer.metisdevops.link",
|
|
21
|
+
MANTLE: "https://explorer.mantle.xyz",
|
|
22
|
+
"MANTLE-TESTNET": "https://explorer.testnet.mantle.xyz",
|
|
23
|
+
MANTA: "https://pacific-explorer.manta.network",
|
|
24
|
+
"MANTA-TESTNET": "https://manta-testnet.calderaexplorer.xyz",
|
|
25
|
+
[e]: "https://explorer.zklink.io",
|
|
26
|
+
[a]: "https://goerli.explorer.zklink.io",
|
|
27
|
+
[n]: "https://testnet-scan.bitlayer.org/en-us",
|
|
28
|
+
[T]: "https://xt2scan.ngd.network"
|
|
29
|
+
}, c = {
|
|
30
|
+
ETH: `${t.ETH}/tx`,
|
|
31
|
+
// /txHash
|
|
32
|
+
[o]: `${t[o]}/tx`,
|
|
33
|
+
POLYGON: `${t.POLYGON}/tx`,
|
|
34
|
+
[s]: `${t[s]}/tx`,
|
|
35
|
+
AVALANCHE: `${t.AVALANCHE}/tx`,
|
|
36
|
+
ARBITRUM: `${t.ARBITRUM}/tx`,
|
|
37
|
+
BINANCE: `${t.BINANCE}/tx`,
|
|
38
|
+
OPTIMISM: `${t.OPTIMISM}/tx`,
|
|
39
|
+
FANTOM: `${t.FANTOM}/tx`,
|
|
40
|
+
FUSE: `${t.FUSE}/tx`,
|
|
41
|
+
FUSESPARK: `${t.FUSESPARK}/tx`,
|
|
42
|
+
MUMBAI: `${t.MUMBAI}/tx`,
|
|
43
|
+
METIS: `${t.METIS}/tx`,
|
|
44
|
+
"METIS-TESTNET": `${t["METIS-TESTNET"]}/tx`,
|
|
45
|
+
MANTLE: `${t.MANTLE}/tx`,
|
|
46
|
+
"MANTLE-TESTNET": `${t["MANTLE-TESTNET"]}/tx`,
|
|
47
|
+
MANTA: `${t.MANTA}/tx`,
|
|
48
|
+
"MANTA-TESTNET": `${t["MANTA-TESTNET"]}/tx`,
|
|
49
|
+
[e]: `${t[e]}/tx`,
|
|
50
|
+
[a]: `${t[a]}/tx`,
|
|
51
|
+
[n]: `${t[n]}/tx`,
|
|
52
|
+
[T]: `${t[T]}/tx`
|
|
53
|
+
}, m = {
|
|
54
|
+
ETH: {
|
|
55
|
+
name: "Ether",
|
|
56
|
+
symbol: "ETH",
|
|
57
|
+
logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png"
|
|
58
|
+
},
|
|
59
|
+
[o]: {
|
|
60
|
+
name: "Ether",
|
|
61
|
+
symbol: "ETH",
|
|
62
|
+
logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png"
|
|
63
|
+
},
|
|
64
|
+
POLYGON: {
|
|
65
|
+
name: "Matic Token",
|
|
66
|
+
symbol: "MATIC",
|
|
67
|
+
logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png"
|
|
68
|
+
},
|
|
69
|
+
[s]: {
|
|
70
|
+
name: "Matic Token",
|
|
71
|
+
symbol: "MATIC",
|
|
72
|
+
logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png"
|
|
73
|
+
},
|
|
74
|
+
AVALANCHE: {
|
|
75
|
+
name: "Avalanche Coin",
|
|
76
|
+
symbol: "AVAX",
|
|
77
|
+
logoUrl: "https://www.datocms-assets.com/86369/1686152997-avalanche-colour.png"
|
|
78
|
+
},
|
|
79
|
+
ARBITRUM: {
|
|
80
|
+
name: "Arbitrum Mainnet Ether",
|
|
81
|
+
symbol: "ETH",
|
|
82
|
+
logoUrl: "https://www.datocms-assets.com/86369/1669925028-arbitrum.png"
|
|
83
|
+
},
|
|
84
|
+
BINANCE: {
|
|
85
|
+
name: "Binance Coin",
|
|
86
|
+
symbol: "BNB",
|
|
87
|
+
logoUrl: "https://www.datocms-assets.com/86369/1670003837-biance-smart-chain-colour.png"
|
|
88
|
+
},
|
|
89
|
+
OPTIMISM: {
|
|
90
|
+
name: "Ether",
|
|
91
|
+
symbol: "ETH",
|
|
92
|
+
logoUrl: "https://www.datocms-assets.com/86369/1670347461-optimisim-colour.png"
|
|
93
|
+
},
|
|
94
|
+
FANTOM: {
|
|
95
|
+
name: "Fantom",
|
|
96
|
+
symbol: "FTM",
|
|
97
|
+
logoUrl: "https://www.datocms-assets.com/86369/1669925359-fantom-1.png"
|
|
98
|
+
},
|
|
99
|
+
FUSE: {
|
|
100
|
+
name: "Fuse",
|
|
101
|
+
symbol: "FUSE",
|
|
102
|
+
logoUrl: "https://assets.coingecko.com/coins/images/10347/standard/fuse.png"
|
|
103
|
+
},
|
|
104
|
+
FUSESPARK: {
|
|
105
|
+
name: "Spark",
|
|
106
|
+
symbol: "SPARK",
|
|
107
|
+
logoUrl: "https://assets.coingecko.com/coins/images/10347/standard/fuse.png"
|
|
108
|
+
},
|
|
109
|
+
MUMBAI: {
|
|
110
|
+
name: "Matic Token",
|
|
111
|
+
symbol: "MATIC",
|
|
112
|
+
logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png"
|
|
113
|
+
},
|
|
114
|
+
METIS: {
|
|
115
|
+
name: "Metis Token",
|
|
116
|
+
symbol: "METIS",
|
|
117
|
+
logoUrl: "https://static.tria.so/chain-logo-w/Metis.webp"
|
|
118
|
+
},
|
|
119
|
+
"METIS-TESTNET": {
|
|
120
|
+
name: "Metis Token",
|
|
121
|
+
symbol: "METIS",
|
|
122
|
+
logoUrl: "https://static.tria.so/chain-logo-w/Metis.webp"
|
|
123
|
+
},
|
|
124
|
+
MANTLE: {
|
|
125
|
+
name: "Mantle",
|
|
126
|
+
symbol: "MNT",
|
|
127
|
+
logoUrl: "https://static.tria.so/chain-logo-w/Mantle.webp"
|
|
128
|
+
},
|
|
129
|
+
"MANTLE-TESTNET": {
|
|
130
|
+
name: "Mantle",
|
|
131
|
+
symbol: "MNT",
|
|
132
|
+
logoUrl: "https://static.tria.so/chain-logo-w/Mantle.webp"
|
|
133
|
+
},
|
|
134
|
+
MANTA: {
|
|
135
|
+
name: "Ether",
|
|
136
|
+
symbol: "ETH",
|
|
137
|
+
logoUrl: "https://static.tria.so/chain-logo-w/Manta.webp"
|
|
138
|
+
},
|
|
139
|
+
"MANTA-TESTNET": {
|
|
140
|
+
name: "Ether",
|
|
141
|
+
symbol: "ETH",
|
|
142
|
+
logoUrl: "https://static.tria.so/chain-logo-w/Manta.webp"
|
|
143
|
+
},
|
|
144
|
+
SOLANA: {
|
|
145
|
+
name: "Solana",
|
|
146
|
+
symbol: "SOL",
|
|
147
|
+
logoUrl: "https://static.tria.so/chain-logo-w/Solana.webp"
|
|
148
|
+
},
|
|
149
|
+
[e]: {
|
|
150
|
+
name: "Ether",
|
|
151
|
+
symbol: "ETH",
|
|
152
|
+
logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp"
|
|
153
|
+
},
|
|
154
|
+
[a]: {
|
|
155
|
+
name: "Ether",
|
|
156
|
+
symbol: "ETH",
|
|
157
|
+
logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp"
|
|
158
|
+
},
|
|
159
|
+
[n]: {
|
|
160
|
+
name: "Bitcoin",
|
|
161
|
+
symbol: "BTC",
|
|
162
|
+
logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp"
|
|
163
|
+
},
|
|
164
|
+
[T]: {
|
|
165
|
+
name: "Gas",
|
|
166
|
+
symbol: "GAS",
|
|
167
|
+
logoUrl: "https://assets.coingecko.com/coins/images/858/standard/GAS_512_512.png?1696501992"
|
|
168
|
+
}
|
|
169
|
+
}, l = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z", i = {
|
|
170
|
+
MUMBAI: `https://polygon-mumbai.g.alchemy.com/v2/${l}`,
|
|
171
|
+
//'https://polygon-mumbai.blockpi.network/v1/rpc/public',
|
|
172
|
+
[s]: `https://polygon-amoy.g.alchemy.com/v2/${l}`,
|
|
173
|
+
[o]: `https://eth-sepolia.g.alchemy.com/v2/${l}`,
|
|
174
|
+
ETH: "https://eth.llamarpc.com",
|
|
175
|
+
POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${l}`,
|
|
176
|
+
// 'https://polygon.llamarpc.com',
|
|
177
|
+
AVALANCHE: "https://avalanche-c-chain.publicnode.com",
|
|
178
|
+
ARBITRUM: "https://arbitrum-one.publicnode.com",
|
|
179
|
+
BINANCE: "https://bsc.publicnode.com",
|
|
180
|
+
OPTIMISM: "https://optimism.meowrpc.com",
|
|
181
|
+
FANTOM: "https://fantom.publicnode.com",
|
|
182
|
+
FUSE: "https://rpc.fuse.io",
|
|
183
|
+
FUSESPARK: "https://rpc.fusespark.io",
|
|
184
|
+
MANTA: "https://1rpc.io/manta",
|
|
185
|
+
"MANTA-TESTNET": "https://manta-testnet.calderachain.xyz/http",
|
|
186
|
+
METIS: "https://metis-pokt.nodies.app",
|
|
187
|
+
"METIS-TESTNET": "https://goerli.gateway.metisdevops.link",
|
|
188
|
+
MANTLE: "https://rpc.mantle.xyz",
|
|
189
|
+
"MANTLE-TESTNET": "https://rpc.testnet.mantle.xyz",
|
|
190
|
+
[e]: "https://rpc.zklink.io",
|
|
191
|
+
[a]: "https://goerli.rpc.zklink.io",
|
|
192
|
+
[n]: "https://testnet-rpc.bitlayer.org",
|
|
193
|
+
[T]: "https://neoxseed1.ngd.network"
|
|
194
|
+
}, E = {
|
|
195
|
+
MUMBAI: 80001,
|
|
196
|
+
[s]: 80002,
|
|
197
|
+
[o]: 11155111,
|
|
198
|
+
POLYGON: 137,
|
|
199
|
+
ETH: 1,
|
|
200
|
+
AVALANCHE: 43114,
|
|
201
|
+
ARBITRUM: 42161,
|
|
202
|
+
BINANCE: 56,
|
|
203
|
+
OPTIMISM: 10,
|
|
204
|
+
FANTOM: 250,
|
|
205
|
+
FUSE: 122,
|
|
206
|
+
FUSESPARK: 123,
|
|
207
|
+
MANTA: 169,
|
|
208
|
+
"MANTA-TESTNET": 3441005,
|
|
209
|
+
METIS: 1088,
|
|
210
|
+
"METIS-TESTNET": 599,
|
|
211
|
+
MANTLE: 5e3,
|
|
212
|
+
"MANTLE-TESTNET": 5001,
|
|
213
|
+
[e]: 810180,
|
|
214
|
+
[a]: 810182,
|
|
215
|
+
[n]: 200810,
|
|
216
|
+
[T]: 12227330
|
|
217
|
+
}, r = {
|
|
218
|
+
80001: "MUMBAI",
|
|
219
|
+
80002: s,
|
|
220
|
+
11155111: o,
|
|
221
|
+
137: "POLYGON",
|
|
222
|
+
1: "ETH",
|
|
223
|
+
43114: "AVALANCHE",
|
|
224
|
+
42161: "ARBITRUM",
|
|
225
|
+
56: "BINANCE",
|
|
226
|
+
10: "OPTIMISM",
|
|
227
|
+
250: "FANTOM",
|
|
228
|
+
122: "FUSE",
|
|
229
|
+
123: "FUSESPARK",
|
|
230
|
+
5e3: "MANTLE",
|
|
231
|
+
5001: "MANTLE-TESTNET",
|
|
232
|
+
1088: "METIS",
|
|
233
|
+
599: "METIS-TESTNET",
|
|
234
|
+
169: "MANTA",
|
|
235
|
+
3441005: "MANTA-TESTNET",
|
|
236
|
+
810180: e,
|
|
237
|
+
810182: a,
|
|
238
|
+
200810: n,
|
|
239
|
+
12227330: T
|
|
240
|
+
};
|
|
241
|
+
export {
|
|
242
|
+
r as chainIdToChainName,
|
|
243
|
+
E as chainNameToChainId,
|
|
244
|
+
t as explorerBaseUrls,
|
|
245
|
+
m as nativeTokenDetails,
|
|
246
|
+
i as rpcUrls,
|
|
247
|
+
c as txnBaseUrl
|
|
248
|
+
};
|
package/package.json
CHANGED
package/src/chains.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
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";
|
|
4
10
|
export const neoxTestnet: string = "NEOX-TESTNET";
|
|
5
11
|
export const sepolia: string = "SEPOLIA";
|
|
6
12
|
export const polygonAmoy: string = "AMOY";
|
|
13
|
+
export const vanarTestnet: string = "VANGUARD-VANAR-TESTNET";
|
|
7
14
|
|
|
8
15
|
export type ZKLINK = "ZKLINK-NOVA";
|
|
9
16
|
export type ZKLINK_TESTNET = "ZKLINK-NOVA-TESTNET";
|
|
@@ -11,6 +18,7 @@ export type BITLAYER_TESTNET = "BITLAYER-TESTNET";
|
|
|
11
18
|
export type NEOX_TESTNET = "NEOX-TESTNET";
|
|
12
19
|
export type SEPOLIA = "SEPOLIA";
|
|
13
20
|
export type AMOY = "AMOY";
|
|
21
|
+
export type VANGUARD_VANAR_TESTNET = "VANGUARD-VANAR-TESTNET";
|
|
14
22
|
|
|
15
23
|
export const TESTNET_CHAINS = [
|
|
16
24
|
"MUMBAI",
|
|
@@ -23,6 +31,7 @@ export const TESTNET_CHAINS = [
|
|
|
23
31
|
neoxTestnet,
|
|
24
32
|
sepolia,
|
|
25
33
|
polygonAmoy,
|
|
34
|
+
vanarTestnet,
|
|
26
35
|
];
|
|
27
36
|
|
|
28
37
|
export const SUPPORTED_EVM_CHAINS = [
|
|
@@ -48,6 +57,7 @@ export const SUPPORTED_EVM_CHAINS = [
|
|
|
48
57
|
neoxTestnet,
|
|
49
58
|
sepolia,
|
|
50
59
|
polygonAmoy,
|
|
60
|
+
vanarTestnet,
|
|
51
61
|
];
|
|
52
62
|
|
|
53
63
|
export const AA_SUPPORTED_EVM_CHAINS = [
|
|
@@ -87,6 +97,7 @@ export const ALLCHAINS = [
|
|
|
87
97
|
neoxTestnet,
|
|
88
98
|
sepolia,
|
|
89
99
|
polygonAmoy,
|
|
100
|
+
vanarTestnet,
|
|
90
101
|
];
|
|
91
102
|
|
|
92
103
|
const baseLogoUrl = "https://static.tria.so/chain-logo-w";
|
|
@@ -209,7 +220,12 @@ export const networks = [
|
|
|
209
220
|
},
|
|
210
221
|
{
|
|
211
222
|
chainName: neoxTestnet,
|
|
212
|
-
logo: `${baseLogoUrl}/
|
|
223
|
+
logo: `${baseLogoUrl}/Neo.webp`,
|
|
224
|
+
type: "testnet",
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
chainName: vanarTestnet,
|
|
228
|
+
logo: `${baseLogoUrl}/Vanguard.webp`,
|
|
213
229
|
type: "testnet",
|
|
214
230
|
},
|
|
215
231
|
];
|
|
@@ -239,6 +255,7 @@ export const chainNameToLogo = {
|
|
|
239
255
|
[zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
|
|
240
256
|
[bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
|
|
241
257
|
[neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
|
|
258
|
+
[vanarTestnet]: `${baseLogoUrl}/Vanguard.webp`,
|
|
242
259
|
};
|
|
243
260
|
|
|
244
261
|
export const chainNameToLogoBlack = {
|
|
@@ -266,4 +283,5 @@ export const chainNameToLogoBlack = {
|
|
|
266
283
|
[zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
267
284
|
[bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
|
|
268
285
|
[neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
|
|
286
|
+
[vanarTestnet]: `${baseLogoUrlBlack}/Vanguard.png`,
|
|
269
287
|
};
|
package/src/txn.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
sepolia,
|
|
6
6
|
zkLink,
|
|
7
7
|
zkLinkTestnet,
|
|
8
|
+
vanarTestnet,
|
|
8
9
|
} from "./chains";
|
|
9
10
|
|
|
10
11
|
export const explorerBaseUrls = {
|
|
@@ -34,6 +35,7 @@ export const explorerBaseUrls = {
|
|
|
34
35
|
[zkLinkTestnet]: "https://goerli.explorer.zklink.io",
|
|
35
36
|
[bitlayerTestnet]: "https://testnet-scan.bitlayer.org/en-us",
|
|
36
37
|
[neoxTestnet]: "https://xt2scan.ngd.network",
|
|
38
|
+
[vanarTestnet]: "https://explorer-vanguard.vanarchain.com",
|
|
37
39
|
};
|
|
38
40
|
|
|
39
41
|
export const txnBaseUrl = {
|
|
@@ -59,6 +61,7 @@ export const txnBaseUrl = {
|
|
|
59
61
|
[zkLinkTestnet]: `${explorerBaseUrls[zkLinkTestnet]}/tx`,
|
|
60
62
|
[bitlayerTestnet]: `${explorerBaseUrls[bitlayerTestnet]}/tx`,
|
|
61
63
|
[neoxTestnet]: `${explorerBaseUrls[neoxTestnet]}/tx`,
|
|
64
|
+
[vanarTestnet]: `${explorerBaseUrls[vanarTestnet]}/tx`,
|
|
62
65
|
};
|
|
63
66
|
|
|
64
67
|
export const nativeTokenDetails = {
|
|
@@ -186,6 +189,12 @@ export const nativeTokenDetails = {
|
|
|
186
189
|
logoUrl:
|
|
187
190
|
"https://assets.coingecko.com/coins/images/858/standard/GAS_512_512.png?1696501992",
|
|
188
191
|
},
|
|
192
|
+
[vanarTestnet]: {
|
|
193
|
+
name: "Vanry",
|
|
194
|
+
symbol: "VANRY",
|
|
195
|
+
logoUrl:
|
|
196
|
+
"https://explorer-vanguard.vanarchain.com/assets/network_icon_dark.svg",
|
|
197
|
+
},
|
|
189
198
|
};
|
|
190
199
|
|
|
191
200
|
const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
|
|
@@ -213,6 +222,7 @@ export const rpcUrls = {
|
|
|
213
222
|
[zkLinkTestnet]: "https://goerli.rpc.zklink.io",
|
|
214
223
|
[bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
|
|
215
224
|
[neoxTestnet]: "https://neoxseed1.ngd.network",
|
|
225
|
+
[vanarTestnet]: "https://rpc-vanguard.vanarchain.com",
|
|
216
226
|
};
|
|
217
227
|
|
|
218
228
|
export const chainNameToChainId = {
|
|
@@ -238,6 +248,7 @@ export const chainNameToChainId = {
|
|
|
238
248
|
[zkLinkTestnet]: 810182,
|
|
239
249
|
[bitlayerTestnet]: 200810,
|
|
240
250
|
[neoxTestnet]: 12227330,
|
|
251
|
+
[vanarTestnet]: 78600,
|
|
241
252
|
};
|
|
242
253
|
|
|
243
254
|
export const chainIdToChainName = {
|
|
@@ -263,4 +274,5 @@ export const chainIdToChainName = {
|
|
|
263
274
|
810182: zkLinkTestnet,
|
|
264
275
|
200810: bitlayerTestnet,
|
|
265
276
|
12227330: neoxTestnet,
|
|
277
|
+
78600: vanarTestnet,
|
|
266
278
|
};
|