@tria-sdk/constants 1.0.47 → 1.0.48
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 +18 -0
- package/dist/constants.mjs +46 -0
- package/dist/constants2.mjs +10 -0
- package/dist/constants3.mjs +331 -0
- package/dist/constants4.mjs +280 -0
- package/dist/constants5.mjs +28 -0
- package/dist/index.d.ts +4 -0
- package/dist/src/chains.d.ts +101 -0
- package/dist/src/config.d.ts +6 -0
- package/dist/src/connect.d.ts +25 -0
- package/dist/src/gasToken.d.ts +0 -0
- package/dist/src/txn.d.ts +199 -0
- package/dist/vite.config.d.ts +2 -0
- package/package.json +8 -8
- package/src/chains.ts +12 -0
- package/src/txn.ts +12 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @tria-sdk/constants@1.0.46 build /Users/dawn/Projects/Tria/tria-monorepo/packages/constants
|
|
4
|
+
> tsc && vite build
|
|
5
|
+
|
|
6
|
+
[33mThe CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.[39m
|
|
7
|
+
[36mvite v5.2.10 [32mbuilding for production...[36m[39m
|
|
8
|
+
[2K[1Gtransforming (1) [2mindex.ts[22m[2K[1G[32m✓[39m 5 modules transformed.
|
|
9
|
+
[2K[1Grendering chunks (1)...[2K[1Grendering chunks (2)...[2K[1Grendering chunks (3)...[2K[1Grendering chunks (4)...[2K[1Grendering chunks (5)...[2K[1G[32m
|
|
10
|
+
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
11
|
+
[2K[1Gcomputing gzip size (0)...[2K[1Gcomputing gzip size (1)...[2K[1Gcomputing gzip size (2)...[2K[1Gcomputing gzip size (3)...[2K[1Gcomputing gzip size (4)...[2K[1Gcomputing gzip size (5)...[2K[1G[2mdist/[22m[36mconstants2.mjs [39m[1m[2m 0.39 kB[22m[1m[22m[2m │ gzip: 0.24 kB[22m
|
|
12
|
+
[2mdist/[22m[36mconstants5.mjs [39m[1m[2m 0.83 kB[22m[1m[22m[2m │ gzip: 0.42 kB[22m
|
|
13
|
+
[2mdist/[22m[36mconstants.mjs [39m[1m[2m 1.80 kB[22m[1m[22m[2m │ gzip: 0.69 kB[22m
|
|
14
|
+
[2mdist/[22m[36mconstants4.mjs [39m[1m[2m 7.75 kB[22m[1m[22m[2m │ gzip: 2.06 kB[22m
|
|
15
|
+
[2mdist/[22m[36mconstants3.mjs [39m[1m[2m18.43 kB[22m[1m[22m[2m │ gzip: 2.68 kB[22m
|
|
16
|
+
[32m[36m[vite:dts][32m Declaration files built in 771ms.
|
|
17
|
+
[39m
|
|
18
|
+
[32m✓ built in 842ms[39m
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { isAaSupportedChain as o, isChainSupported as n, isEvmChain as t, isGasAbsEnabled as r, isTestnetChain as i, prodApiUrl as s } from "./constants2.mjs";
|
|
2
|
+
import { AA_SUPPORTED_EVM_CHAINS as A, ALLCHAINS as p, GAS_ABS_ENABLED_CHAINS as l, SUPPORTED_EVM_CHAINS as E, TESTNET_CHAINS as S, bitlayerMainnet as m, bitlayerTestnet as C, chainNameToLogo as _, chainNameToLogoAverageColor as h, chainNameToLogoBlack as L, ethereum as N, fuse as I, fuseSpark as k, mumbai as c, neoxTestnet as g, networks as u, polygon as x, polygonAmoy as y, sepolia as U, skaleTestnet as d, vanarTestnet as f, zkLink as H, zkLinkTestnet as b } from "./constants3.mjs";
|
|
3
|
+
import { chainIdToChainName as B, chainNameToChainId as D, explorerBaseUrls as R, nativeTokenDetails as P, rpcUrls as M, txnBaseUrl as O } from "./constants4.mjs";
|
|
4
|
+
import { TRIA_WALLET_SELECTED_CHAIN as G, TRIA_WALLET_STORE as V, eventTypes as W, storageKeys as w, triaAuthUrl as K } from "./constants5.mjs";
|
|
5
|
+
export {
|
|
6
|
+
A as AA_SUPPORTED_EVM_CHAINS,
|
|
7
|
+
p as ALLCHAINS,
|
|
8
|
+
l as GAS_ABS_ENABLED_CHAINS,
|
|
9
|
+
E as SUPPORTED_EVM_CHAINS,
|
|
10
|
+
S as TESTNET_CHAINS,
|
|
11
|
+
G as TRIA_WALLET_SELECTED_CHAIN,
|
|
12
|
+
V as TRIA_WALLET_STORE,
|
|
13
|
+
m as bitlayerMainnet,
|
|
14
|
+
C as bitlayerTestnet,
|
|
15
|
+
B as chainIdToChainName,
|
|
16
|
+
D as chainNameToChainId,
|
|
17
|
+
_ as chainNameToLogo,
|
|
18
|
+
h as chainNameToLogoAverageColor,
|
|
19
|
+
L as chainNameToLogoBlack,
|
|
20
|
+
N as ethereum,
|
|
21
|
+
W as eventTypes,
|
|
22
|
+
R as explorerBaseUrls,
|
|
23
|
+
I as fuse,
|
|
24
|
+
k as fuseSpark,
|
|
25
|
+
o as isAaSupportedChain,
|
|
26
|
+
n as isChainSupported,
|
|
27
|
+
t as isEvmChain,
|
|
28
|
+
r as isGasAbsEnabled,
|
|
29
|
+
i as isTestnetChain,
|
|
30
|
+
c as mumbai,
|
|
31
|
+
P as nativeTokenDetails,
|
|
32
|
+
g as neoxTestnet,
|
|
33
|
+
u as networks,
|
|
34
|
+
x as polygon,
|
|
35
|
+
y as polygonAmoy,
|
|
36
|
+
s as prodApiUrl,
|
|
37
|
+
M as rpcUrls,
|
|
38
|
+
U as sepolia,
|
|
39
|
+
d as skaleTestnet,
|
|
40
|
+
w as storageKeys,
|
|
41
|
+
K as triaAuthUrl,
|
|
42
|
+
O as txnBaseUrl,
|
|
43
|
+
f as vanarTestnet,
|
|
44
|
+
H as zkLink,
|
|
45
|
+
b as zkLinkTestnet
|
|
46
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SUPPORTED_EVM_CHAINS as s, AA_SUPPORTED_EVM_CHAINS as t, ALLCHAINS as r, TESTNET_CHAINS as i, GAS_ABS_ENABLED_CHAINS as e } from "./constants3.mjs";
|
|
2
|
+
const A = "https://prod.tria.so", u = (n) => s.includes(n), S = (n) => t.includes(n), c = (n) => r.includes(n), d = (n) => i.includes(n), p = (n) => e.includes(n);
|
|
3
|
+
export {
|
|
4
|
+
S as isAaSupportedChain,
|
|
5
|
+
c as isChainSupported,
|
|
6
|
+
u as isEvmChain,
|
|
7
|
+
p as isGasAbsEnabled,
|
|
8
|
+
d as isTestnetChain,
|
|
9
|
+
A as prodApiUrl
|
|
10
|
+
};
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
const b = "MUMBAI", S = "POLYGON", s = "ETH", i = "FUSE", g = "FUSESPARK", p = "ZKLINK-NOVA", T = "ZKLINK-NOVA-TESTNET", n = "BITLAYER-TESTNET", M = "BITLAYER-MAINNET", N = "NEOX-TESTNET", t = "SEPOLIA", E = "AMOY", o = "VANGUARD-VANAR-TESTNET", A = "SKALE-TESTNET", l = [
|
|
2
|
+
t,
|
|
3
|
+
"MUMBAI",
|
|
4
|
+
"FUSESPARK",
|
|
5
|
+
"MANTA-TESTNET",
|
|
6
|
+
"METIS-TESTNET",
|
|
7
|
+
"MANTLE-TESTNET",
|
|
8
|
+
T,
|
|
9
|
+
n,
|
|
10
|
+
N,
|
|
11
|
+
t,
|
|
12
|
+
E,
|
|
13
|
+
o,
|
|
14
|
+
A
|
|
15
|
+
], c = [
|
|
16
|
+
"ETH",
|
|
17
|
+
"POLYGON",
|
|
18
|
+
"AVALANCHE",
|
|
19
|
+
"ARBITRUM",
|
|
20
|
+
"BINANCE",
|
|
21
|
+
"OPTIMISM",
|
|
22
|
+
"FANTOM",
|
|
23
|
+
"FUSE",
|
|
24
|
+
"FUSESPARK",
|
|
25
|
+
"MUMBAI",
|
|
26
|
+
t,
|
|
27
|
+
"MANTA",
|
|
28
|
+
"MANTA-TESTNET",
|
|
29
|
+
"METIS",
|
|
30
|
+
"METIS-TESTNET",
|
|
31
|
+
"MANTLE",
|
|
32
|
+
"MANTLE-TESTNET",
|
|
33
|
+
p,
|
|
34
|
+
T,
|
|
35
|
+
n,
|
|
36
|
+
M,
|
|
37
|
+
N,
|
|
38
|
+
t,
|
|
39
|
+
E,
|
|
40
|
+
o,
|
|
41
|
+
A
|
|
42
|
+
], $ = [t, "POLYGON"], w = [
|
|
43
|
+
// "ETH",
|
|
44
|
+
"POLYGON",
|
|
45
|
+
t,
|
|
46
|
+
// "AVALANCHE",
|
|
47
|
+
// "ARBITRUM",
|
|
48
|
+
// "BINANCE",
|
|
49
|
+
// "OPTIMISM",
|
|
50
|
+
"FUSE",
|
|
51
|
+
"MUMBAI",
|
|
52
|
+
// "MANTLE",
|
|
53
|
+
t,
|
|
54
|
+
"OPTIMISM",
|
|
55
|
+
"ARBITRUM",
|
|
56
|
+
"AVALANCHE",
|
|
57
|
+
"MANTLE"
|
|
58
|
+
], m = [
|
|
59
|
+
"ETH",
|
|
60
|
+
"POLYGON",
|
|
61
|
+
"AVALANCHE",
|
|
62
|
+
"ARBITRUM",
|
|
63
|
+
"BINANCE",
|
|
64
|
+
"OPTIMISM",
|
|
65
|
+
"FANTOM",
|
|
66
|
+
"FUSE",
|
|
67
|
+
"FUSESPARK",
|
|
68
|
+
"MUMBAI",
|
|
69
|
+
t,
|
|
70
|
+
"MANTA",
|
|
71
|
+
"MANTA-TESTNET",
|
|
72
|
+
"METIS",
|
|
73
|
+
"METIS-TESTNET",
|
|
74
|
+
"MANTLE",
|
|
75
|
+
"MANTLE-TESTNET",
|
|
76
|
+
"SOLANA",
|
|
77
|
+
p,
|
|
78
|
+
T,
|
|
79
|
+
n,
|
|
80
|
+
M,
|
|
81
|
+
N,
|
|
82
|
+
t,
|
|
83
|
+
E,
|
|
84
|
+
o,
|
|
85
|
+
A
|
|
86
|
+
], e = "https://static.tria.so/chain-logo-w", a = "https://static.tria.so/chain-logo-b", I = [
|
|
87
|
+
{
|
|
88
|
+
chainName: "ETH",
|
|
89
|
+
logo: `${e}/Ethereum.webp`,
|
|
90
|
+
type: "mainnet"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
chainName: t,
|
|
94
|
+
logo: `${e}/Ethereum.webp`,
|
|
95
|
+
type: "testnet"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
chainName: "FANTOM",
|
|
99
|
+
logo: `${e}/Fantom.webp`,
|
|
100
|
+
type: "mainnet"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
chainName: "POLYGON",
|
|
104
|
+
logo: `${e}/Polygon.svg`,
|
|
105
|
+
type: "mainnet"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
chainName: E,
|
|
109
|
+
logo: `${e}/Polygon.svg`,
|
|
110
|
+
type: "testnet"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
chainName: "AVALANCHE",
|
|
114
|
+
logo: `${e}/Avalanche.webp`,
|
|
115
|
+
type: "mainnet"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
chainName: "OPTIMISM",
|
|
119
|
+
logo: `${e}/Optimism.webp`,
|
|
120
|
+
type: "mainnet"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
chainName: "ARBITRUM",
|
|
124
|
+
logo: `${e}/Arbitrum.webp`,
|
|
125
|
+
type: "mainnet"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
chainName: "FUSE",
|
|
129
|
+
logo: `${e}/Fuse.webp`,
|
|
130
|
+
type: "mainnet"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
chainName: "FUSESPARK",
|
|
134
|
+
logo: `${e}/Fuse.webp`,
|
|
135
|
+
type: "testnet"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
chainName: "MUMBAI",
|
|
139
|
+
logo: `${e}/Polygon.svg`,
|
|
140
|
+
type: "testnet"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
chainName: "BINANCE",
|
|
144
|
+
logo: `${e}/Binance.svg`,
|
|
145
|
+
type: "mainnet"
|
|
146
|
+
},
|
|
147
|
+
// {
|
|
148
|
+
// chainName: 'LINEA',
|
|
149
|
+
// logo: `${baseLogoUrl}/Linea.svg`,
|
|
150
|
+
// },
|
|
151
|
+
{
|
|
152
|
+
chainName: "METIS",
|
|
153
|
+
logo: `${e}/Metis.webp`,
|
|
154
|
+
type: "mainnet"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
chainName: "METIS-TESTNET",
|
|
158
|
+
logo: `${e}/Metis.webp`,
|
|
159
|
+
type: "testnet"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
chainName: "MANTA",
|
|
163
|
+
logo: `${e}/Manta.webp`,
|
|
164
|
+
type: "mainnet"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
chainName: "MANTA-TESTNET",
|
|
168
|
+
logo: `${e}/Manta.webp`,
|
|
169
|
+
type: "testnet"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
chainName: "MANTLE",
|
|
173
|
+
logo: `${e}/Mantle.webp`,
|
|
174
|
+
type: "mainnet"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
chainName: "MANTLE-TESTNET",
|
|
178
|
+
logo: `${e}/Mantle.webp`,
|
|
179
|
+
type: "testnet"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
chainName: "SOLANA",
|
|
183
|
+
logo: `${e}/Solana.webp`,
|
|
184
|
+
type: "mainnet"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
chainName: p,
|
|
188
|
+
logo: `${e}/zklink.webp`,
|
|
189
|
+
type: "mainnet"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
chainName: T,
|
|
193
|
+
logo: `${e}/zklink.webp`,
|
|
194
|
+
type: "testnet"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
chainName: n,
|
|
198
|
+
logo: `${e}/bitlayer.webp`,
|
|
199
|
+
type: "testnet"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
chainName: M,
|
|
203
|
+
logo: `${e}/bitlayer.webp`,
|
|
204
|
+
type: "mainnet"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
chainName: N,
|
|
208
|
+
logo: `${e}/Neo.webp`,
|
|
209
|
+
type: "testnet"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
chainName: o,
|
|
213
|
+
logo: "https://vanguard.vanarchain.com/assets/vanry-logo.png",
|
|
214
|
+
//`${baseLogoUrl}/Vanguard.webp`,
|
|
215
|
+
type: "testnet"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
chainName: A,
|
|
219
|
+
logo: "https://docs.skale.network/_/img/Skale_Logo_Black.png",
|
|
220
|
+
type: "testnet"
|
|
221
|
+
}
|
|
222
|
+
], r = {
|
|
223
|
+
ETH: `${e}/Ethereum.webp`,
|
|
224
|
+
[t]: `${e}/Ethereum.webp`,
|
|
225
|
+
FANTOM: `${e}/Fantom.webp`,
|
|
226
|
+
POLYGON: `${e}/Polygon.webp`,
|
|
227
|
+
[E]: `${e}/Polygon.webp`,
|
|
228
|
+
AVALANCHE: `${e}/Avalanche.webp`,
|
|
229
|
+
OPTIMISM: `${e}/Optimism.webp`,
|
|
230
|
+
ARBITRUM: `${e}/Arbitrum.webp`,
|
|
231
|
+
LINEA: `${e}/Linea.webp`,
|
|
232
|
+
MUMBAI: `${e}/Polygon.webp`,
|
|
233
|
+
FUSE: `${e}/Fuse.webp`,
|
|
234
|
+
FUSESPARK: `${e}/Fuse.webp`,
|
|
235
|
+
BINANCE: `${e}/Binance.svg`,
|
|
236
|
+
MANTA: `${e}/Manta.webp`,
|
|
237
|
+
"MANTA-TESTNET": `${e}/Manta.webp`,
|
|
238
|
+
METIS: `${e}/Metis.webp`,
|
|
239
|
+
"METIS-TESTNET": `${e}/Metis.webp`,
|
|
240
|
+
MANTLE: `${e}/Mantle.webp`,
|
|
241
|
+
"MANTLE-TESTNET": `${e}/Mantle.webp`,
|
|
242
|
+
SOLANA: `${e}/Solana.webp`,
|
|
243
|
+
[p]: `${e}/zklink.webp`,
|
|
244
|
+
[T]: `${e}/zklink.webp`,
|
|
245
|
+
[n]: `${e}/bitlayer.webp`,
|
|
246
|
+
[M]: `${e}/bitlayer.webp`,
|
|
247
|
+
[N]: `${e}/Neo.webp`,
|
|
248
|
+
[o]: "https://vanguard.vanarchain.com/assets/vanry-logo.png",
|
|
249
|
+
//`${baseLogoUrl}/Vanguard.webp`,
|
|
250
|
+
[A]: "https://docs.skale.network/_/img/Skale_Logo_Black.png"
|
|
251
|
+
}, L = {
|
|
252
|
+
ETH: "rgba(98,126,235,0.7)",
|
|
253
|
+
POLYGON: "rgba(131,69,231,0.7)",
|
|
254
|
+
SEPOLIA: "rgba(98,126,235,0.7)",
|
|
255
|
+
FANTOM: "rgba(19,181,235,0.7)",
|
|
256
|
+
AMOY: "rgba(131,69,231,0.7)",
|
|
257
|
+
AVALANCHE: "rgba(232,65,67,0.7)",
|
|
258
|
+
ARBITRUM: "rgba(17,170,255,0.7)",
|
|
259
|
+
OPTIMISM: "rgba(255,5,32,0.7)",
|
|
260
|
+
LINEA: "UNDETERMINED",
|
|
261
|
+
MUMBAI: "rgba(131,69,231,0.7)",
|
|
262
|
+
FUSESPARK: "rgba(180,249,185,0.7)",
|
|
263
|
+
FUSE: "rgba(180,249,185,0.7)",
|
|
264
|
+
MANTA: "rgba(255,0,0,0.7)",
|
|
265
|
+
"MANTA-TESTNET": "rgba(255,0,0,0.7)",
|
|
266
|
+
"METIS-TESTNET": "rgba(255,0,214,0.7)",
|
|
267
|
+
METIS: "rgba(255,0,214,0.7)",
|
|
268
|
+
SOLANA: "UNDETERMINED",
|
|
269
|
+
"MANTLE-TESTNET": "rgba(255,0,0,0.7)",
|
|
270
|
+
MANTLE: "rgba(255,0,0,0.7)",
|
|
271
|
+
"BITLAYER-TESTNET": "rgba(226,110,26,0.7)",
|
|
272
|
+
"ZKLINK-NOVA": "UNDETERMINED",
|
|
273
|
+
"ZKLINK-NOVA-TESTNET": "UNDETERMINED",
|
|
274
|
+
"NEOX-TESTNET": "rgba(1,229,155,0.7)",
|
|
275
|
+
"VANGUARD-VANAR-TESTNET": "rgba(0,255,255,0.7)",
|
|
276
|
+
BINANCE: "rgba(240,185,11,0.7)"
|
|
277
|
+
}, h = {
|
|
278
|
+
ETH: `${a}/Ethereum.webp`,
|
|
279
|
+
[t]: `${a}/Ethereum.webp`,
|
|
280
|
+
BINANCE: `${a}/binance.svg`,
|
|
281
|
+
FANTOM: `${a}/Fantom.webp`,
|
|
282
|
+
POLYGON: `${a}/Polygon.webp`,
|
|
283
|
+
[E]: `${a}/Polygon.webp`,
|
|
284
|
+
AVALANCHE: `${a}/Avalanche.webp`,
|
|
285
|
+
OPTIMISM: `${a}/Optimism.webp`,
|
|
286
|
+
ARBITRUM: `${a}/Arbitrum.webp`,
|
|
287
|
+
LINEA: `${a}/Linea.webp`,
|
|
288
|
+
MUMBAI: `${a}/Polygon.webp`,
|
|
289
|
+
FUSE: `${a}/fuse.webp`,
|
|
290
|
+
FUSESPARK: `${a}/fuse.webp`,
|
|
291
|
+
MANTA: `${a}/Manta.webp`,
|
|
292
|
+
"MANTA-TESTNET": `${a}/Manta.webp`,
|
|
293
|
+
METIS: `${a}/Metis.webp`,
|
|
294
|
+
"METIS-TESTNET": `${a}/Metis.webp`,
|
|
295
|
+
MANTLE: `${a}/Mantle.webp`,
|
|
296
|
+
"MANTLE-TESTNET": `${a}/Mantle.webp`,
|
|
297
|
+
SOLANA: `${a}/Solana.webp`,
|
|
298
|
+
[p]: `${a}/zklink.webp`,
|
|
299
|
+
[T]: `${a}/zklink.webp`,
|
|
300
|
+
[n]: `${a}/bitlayer.webp`,
|
|
301
|
+
[M]: `${a}/bitlayer.webp`,
|
|
302
|
+
[N]: `${a}/Neo.png`,
|
|
303
|
+
[o]: "https://vanguard.vanarchain.com/assets/vanry-logo.png",
|
|
304
|
+
//`${baseLogoUrlBlack}/Vanguard.png`,
|
|
305
|
+
[A]: "https://docs.skale.network/_/img/Skale_Logo_Black.png"
|
|
306
|
+
};
|
|
307
|
+
export {
|
|
308
|
+
w as AA_SUPPORTED_EVM_CHAINS,
|
|
309
|
+
m as ALLCHAINS,
|
|
310
|
+
$ as GAS_ABS_ENABLED_CHAINS,
|
|
311
|
+
c as SUPPORTED_EVM_CHAINS,
|
|
312
|
+
l as TESTNET_CHAINS,
|
|
313
|
+
M as bitlayerMainnet,
|
|
314
|
+
n as bitlayerTestnet,
|
|
315
|
+
r as chainNameToLogo,
|
|
316
|
+
L as chainNameToLogoAverageColor,
|
|
317
|
+
h as chainNameToLogoBlack,
|
|
318
|
+
s as ethereum,
|
|
319
|
+
i as fuse,
|
|
320
|
+
g as fuseSpark,
|
|
321
|
+
b as mumbai,
|
|
322
|
+
N as neoxTestnet,
|
|
323
|
+
I as networks,
|
|
324
|
+
S as polygon,
|
|
325
|
+
E as polygonAmoy,
|
|
326
|
+
t as sepolia,
|
|
327
|
+
A as skaleTestnet,
|
|
328
|
+
o as vanarTestnet,
|
|
329
|
+
p as zkLink,
|
|
330
|
+
T as zkLinkTestnet
|
|
331
|
+
};
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { sepolia as o, polygonAmoy as s, zkLink as a, zkLinkTestnet as e, bitlayerTestnet as n, bitlayerMainnet as l, neoxTestnet as p, vanarTestnet as c, skaleTestnet as T } from "./constants3.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
|
+
[a]: "https://explorer.zklink.io",
|
|
26
|
+
[e]: "https://goerli.explorer.zklink.io",
|
|
27
|
+
[n]: "https://testnet-scan.bitlayer.org/en-us",
|
|
28
|
+
[l]: "https://www.btrscan.com",
|
|
29
|
+
[p]: "https://xt2scan.ngd.network",
|
|
30
|
+
[c]: "https://explorer-vanguard.vanarchain.com",
|
|
31
|
+
[T]: "https://giant-half-dual-testnet.explorer.testnet.skalenodes.com"
|
|
32
|
+
}, i = {
|
|
33
|
+
ETH: `${t.ETH}/tx`,
|
|
34
|
+
// /txHash
|
|
35
|
+
[o]: `${t[o]}/tx`,
|
|
36
|
+
POLYGON: `${t.POLYGON}/tx`,
|
|
37
|
+
[s]: `${t[s]}/tx`,
|
|
38
|
+
AVALANCHE: `${t.AVALANCHE}/tx`,
|
|
39
|
+
ARBITRUM: `${t.ARBITRUM}/tx`,
|
|
40
|
+
BINANCE: `${t.BINANCE}/tx`,
|
|
41
|
+
OPTIMISM: `${t.OPTIMISM}/tx`,
|
|
42
|
+
FANTOM: `${t.FANTOM}/tx`,
|
|
43
|
+
FUSE: `${t.FUSE}/tx`,
|
|
44
|
+
FUSESPARK: `${t.FUSESPARK}/tx`,
|
|
45
|
+
MUMBAI: `${t.MUMBAI}/tx`,
|
|
46
|
+
METIS: `${t.METIS}/tx`,
|
|
47
|
+
"METIS-TESTNET": `${t["METIS-TESTNET"]}/tx`,
|
|
48
|
+
MANTLE: `${t.MANTLE}/tx`,
|
|
49
|
+
"MANTLE-TESTNET": `${t["MANTLE-TESTNET"]}/tx`,
|
|
50
|
+
MANTA: `${t.MANTA}/tx`,
|
|
51
|
+
"MANTA-TESTNET": `${t["MANTA-TESTNET"]}/tx`,
|
|
52
|
+
[a]: `${t[a]}/tx`,
|
|
53
|
+
[e]: `${t[e]}/tx`,
|
|
54
|
+
[n]: `${t[n]}/tx`,
|
|
55
|
+
[l]: `${t[l]}/tx`,
|
|
56
|
+
[p]: `${t[p]}/tx`,
|
|
57
|
+
[c]: `${t[c]}/tx`,
|
|
58
|
+
[T]: `${t[T]}/tx`
|
|
59
|
+
}, h = {
|
|
60
|
+
ETH: {
|
|
61
|
+
name: "Ether",
|
|
62
|
+
symbol: "ETH",
|
|
63
|
+
logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png"
|
|
64
|
+
},
|
|
65
|
+
[o]: {
|
|
66
|
+
name: "Ether",
|
|
67
|
+
symbol: "ETH",
|
|
68
|
+
logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png"
|
|
69
|
+
},
|
|
70
|
+
POLYGON: {
|
|
71
|
+
name: "Matic Token",
|
|
72
|
+
symbol: "MATIC",
|
|
73
|
+
logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png"
|
|
74
|
+
},
|
|
75
|
+
[s]: {
|
|
76
|
+
name: "Matic Token",
|
|
77
|
+
symbol: "MATIC",
|
|
78
|
+
logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png"
|
|
79
|
+
},
|
|
80
|
+
AVALANCHE: {
|
|
81
|
+
name: "Avalanche Coin",
|
|
82
|
+
symbol: "AVAX",
|
|
83
|
+
logoUrl: "https://www.datocms-assets.com/86369/1686152997-avalanche-colour.png"
|
|
84
|
+
},
|
|
85
|
+
ARBITRUM: {
|
|
86
|
+
name: "Arbitrum Mainnet Ether",
|
|
87
|
+
symbol: "ETH",
|
|
88
|
+
logoUrl: "https://www.datocms-assets.com/86369/1669925028-arbitrum.png"
|
|
89
|
+
},
|
|
90
|
+
BINANCE: {
|
|
91
|
+
name: "Binance Coin",
|
|
92
|
+
symbol: "BNB",
|
|
93
|
+
logoUrl: "https://www.datocms-assets.com/86369/1670003837-biance-smart-chain-colour.png"
|
|
94
|
+
},
|
|
95
|
+
OPTIMISM: {
|
|
96
|
+
name: "Ether",
|
|
97
|
+
symbol: "ETH",
|
|
98
|
+
logoUrl: "https://www.datocms-assets.com/86369/1670347461-optimisim-colour.png"
|
|
99
|
+
},
|
|
100
|
+
FANTOM: {
|
|
101
|
+
name: "Fantom",
|
|
102
|
+
symbol: "FTM",
|
|
103
|
+
logoUrl: "https://www.datocms-assets.com/86369/1669925359-fantom-1.png"
|
|
104
|
+
},
|
|
105
|
+
FUSE: {
|
|
106
|
+
name: "Fuse",
|
|
107
|
+
symbol: "FUSE",
|
|
108
|
+
logoUrl: "https://assets.coingecko.com/coins/images/10347/standard/fuse.png"
|
|
109
|
+
},
|
|
110
|
+
FUSESPARK: {
|
|
111
|
+
name: "Spark",
|
|
112
|
+
symbol: "SPARK",
|
|
113
|
+
logoUrl: "https://assets.coingecko.com/coins/images/10347/standard/fuse.png"
|
|
114
|
+
},
|
|
115
|
+
MUMBAI: {
|
|
116
|
+
name: "Matic Token",
|
|
117
|
+
symbol: "MATIC",
|
|
118
|
+
logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png"
|
|
119
|
+
},
|
|
120
|
+
METIS: {
|
|
121
|
+
name: "Metis Token",
|
|
122
|
+
symbol: "METIS",
|
|
123
|
+
logoUrl: "https://static.tria.so/chain-logo-w/Metis.webp"
|
|
124
|
+
},
|
|
125
|
+
"METIS-TESTNET": {
|
|
126
|
+
name: "Metis Token",
|
|
127
|
+
symbol: "METIS",
|
|
128
|
+
logoUrl: "https://static.tria.so/chain-logo-w/Metis.webp"
|
|
129
|
+
},
|
|
130
|
+
MANTLE: {
|
|
131
|
+
name: "Mantle",
|
|
132
|
+
symbol: "MNT",
|
|
133
|
+
logoUrl: "https://static.tria.so/chain-logo-w/Mantle.webp"
|
|
134
|
+
},
|
|
135
|
+
"MANTLE-TESTNET": {
|
|
136
|
+
name: "Mantle",
|
|
137
|
+
symbol: "MNT",
|
|
138
|
+
logoUrl: "https://static.tria.so/chain-logo-w/Mantle.webp"
|
|
139
|
+
},
|
|
140
|
+
MANTA: {
|
|
141
|
+
name: "Ether",
|
|
142
|
+
symbol: "ETH",
|
|
143
|
+
logoUrl: "https://static.tria.so/chain-logo-w/Manta.webp"
|
|
144
|
+
},
|
|
145
|
+
"MANTA-TESTNET": {
|
|
146
|
+
name: "Ether",
|
|
147
|
+
symbol: "ETH",
|
|
148
|
+
logoUrl: "https://static.tria.so/chain-logo-w/Manta.webp"
|
|
149
|
+
},
|
|
150
|
+
SOLANA: {
|
|
151
|
+
name: "Solana",
|
|
152
|
+
symbol: "SOL",
|
|
153
|
+
logoUrl: "https://static.tria.so/chain-logo-w/Solana.webp"
|
|
154
|
+
},
|
|
155
|
+
[a]: {
|
|
156
|
+
name: "Ether",
|
|
157
|
+
symbol: "ETH",
|
|
158
|
+
logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp"
|
|
159
|
+
},
|
|
160
|
+
[e]: {
|
|
161
|
+
name: "Ether",
|
|
162
|
+
symbol: "ETH",
|
|
163
|
+
logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp"
|
|
164
|
+
},
|
|
165
|
+
[n]: {
|
|
166
|
+
name: "Bitcoin",
|
|
167
|
+
symbol: "BTC",
|
|
168
|
+
logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp"
|
|
169
|
+
},
|
|
170
|
+
[l]: {
|
|
171
|
+
name: "Bitcoin",
|
|
172
|
+
symbol: "BTC",
|
|
173
|
+
logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp"
|
|
174
|
+
},
|
|
175
|
+
[p]: {
|
|
176
|
+
name: "Gas",
|
|
177
|
+
symbol: "GAS",
|
|
178
|
+
logoUrl: "https://assets.coingecko.com/coins/images/858/standard/GAS_512_512.png?1696501992"
|
|
179
|
+
},
|
|
180
|
+
[c]: {
|
|
181
|
+
name: "Vanry",
|
|
182
|
+
symbol: "VG",
|
|
183
|
+
logoUrl: "https://explorer-vanguard.vanarchain.com/assets/network_icon_dark.svg"
|
|
184
|
+
},
|
|
185
|
+
[T]: {
|
|
186
|
+
name: "sFUEL",
|
|
187
|
+
symbol: "sFUEL",
|
|
188
|
+
logoUrl: "https://docs.skale.network/_/img/Skale_Logo_Black.png"
|
|
189
|
+
}
|
|
190
|
+
}, r = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z", E = {
|
|
191
|
+
MUMBAI: `https://polygon-mumbai.g.alchemy.com/v2/${r}`,
|
|
192
|
+
//'https://polygon-mumbai.blockpi.network/v1/rpc/public',
|
|
193
|
+
[s]: `https://polygon-amoy.g.alchemy.com/v2/${r}`,
|
|
194
|
+
[o]: `https://eth-sepolia.g.alchemy.com/v2/${r}`,
|
|
195
|
+
ETH: "https://eth.llamarpc.com",
|
|
196
|
+
[o]: `https://eth-sepolia.g.alchemy.com/v2/${r}`,
|
|
197
|
+
POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${r}`,
|
|
198
|
+
// 'https://polygon.llamarpc.com',
|
|
199
|
+
AVALANCHE: "https://avalanche-c-chain.publicnode.com",
|
|
200
|
+
ARBITRUM: "https://arbitrum-one.publicnode.com",
|
|
201
|
+
BINANCE: "https://bsc.publicnode.com",
|
|
202
|
+
OPTIMISM: "https://optimism.meowrpc.com",
|
|
203
|
+
FANTOM: "https://fantom.publicnode.com",
|
|
204
|
+
FUSE: "https://rpc.fuse.io",
|
|
205
|
+
FUSESPARK: "https://rpc.fusespark.io",
|
|
206
|
+
MANTA: "https://1rpc.io/manta",
|
|
207
|
+
"MANTA-TESTNET": "https://manta-testnet.calderachain.xyz/http",
|
|
208
|
+
METIS: "https://metis-pokt.nodies.app",
|
|
209
|
+
"METIS-TESTNET": "https://goerli.gateway.metisdevops.link",
|
|
210
|
+
MANTLE: "https://rpc.mantle.xyz",
|
|
211
|
+
"MANTLE-TESTNET": "https://rpc.testnet.mantle.xyz",
|
|
212
|
+
[a]: "https://rpc.zklink.io",
|
|
213
|
+
[e]: "https://goerli.rpc.zklink.io",
|
|
214
|
+
[n]: "https://testnet-rpc.bitlayer.org",
|
|
215
|
+
[l]: "https://rpc.bitlayer.org",
|
|
216
|
+
[p]: "https://neoxseed1.ngd.network",
|
|
217
|
+
[c]: "http://rpc-partners-vanguard.vanarchain.com",
|
|
218
|
+
// "https://rpc-vanguard.vanarchain.com",
|
|
219
|
+
[T]: "https://testnet.skalenodes.com/v1/giant-half-dual-testnet"
|
|
220
|
+
}, A = {
|
|
221
|
+
MUMBAI: 80001,
|
|
222
|
+
[s]: 80002,
|
|
223
|
+
[o]: 11155111,
|
|
224
|
+
POLYGON: 137,
|
|
225
|
+
ETH: 1,
|
|
226
|
+
AVALANCHE: 43114,
|
|
227
|
+
ARBITRUM: 42161,
|
|
228
|
+
BINANCE: 56,
|
|
229
|
+
OPTIMISM: 10,
|
|
230
|
+
FANTOM: 250,
|
|
231
|
+
FUSE: 122,
|
|
232
|
+
FUSESPARK: 123,
|
|
233
|
+
MANTA: 169,
|
|
234
|
+
"MANTA-TESTNET": 3441005,
|
|
235
|
+
METIS: 1088,
|
|
236
|
+
"METIS-TESTNET": 599,
|
|
237
|
+
MANTLE: 5e3,
|
|
238
|
+
"MANTLE-TESTNET": 5001,
|
|
239
|
+
[a]: 810180,
|
|
240
|
+
[e]: 810182,
|
|
241
|
+
[n]: 200810,
|
|
242
|
+
[l]: 200901,
|
|
243
|
+
[p]: 12227330,
|
|
244
|
+
[c]: 78600,
|
|
245
|
+
[T]: 974399131
|
|
246
|
+
}, M = {
|
|
247
|
+
11155111: o,
|
|
248
|
+
80001: "MUMBAI",
|
|
249
|
+
80002: s,
|
|
250
|
+
137: "POLYGON",
|
|
251
|
+
1: "ETH",
|
|
252
|
+
43114: "AVALANCHE",
|
|
253
|
+
42161: "ARBITRUM",
|
|
254
|
+
56: "BINANCE",
|
|
255
|
+
10: "OPTIMISM",
|
|
256
|
+
250: "FANTOM",
|
|
257
|
+
122: "FUSE",
|
|
258
|
+
123: "FUSESPARK",
|
|
259
|
+
5e3: "MANTLE",
|
|
260
|
+
5001: "MANTLE-TESTNET",
|
|
261
|
+
1088: "METIS",
|
|
262
|
+
599: "METIS-TESTNET",
|
|
263
|
+
169: "MANTA",
|
|
264
|
+
3441005: "MANTA-TESTNET",
|
|
265
|
+
810180: a,
|
|
266
|
+
810182: e,
|
|
267
|
+
200810: n,
|
|
268
|
+
200901: l,
|
|
269
|
+
12227330: p,
|
|
270
|
+
78600: c,
|
|
271
|
+
974399131: T
|
|
272
|
+
};
|
|
273
|
+
export {
|
|
274
|
+
M as chainIdToChainName,
|
|
275
|
+
A as chainNameToChainId,
|
|
276
|
+
t as explorerBaseUrls,
|
|
277
|
+
h as nativeTokenDetails,
|
|
278
|
+
E as rpcUrls,
|
|
279
|
+
i as txnBaseUrl
|
|
280
|
+
};
|
|
@@ -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/index.d.ts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
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";
|
|
6
|
+
export declare const zkLink: string;
|
|
7
|
+
export declare const zkLinkTestnet: string;
|
|
8
|
+
export declare const bitlayerTestnet: string;
|
|
9
|
+
export declare const bitlayerMainnet: string;
|
|
10
|
+
export declare const neoxTestnet: string;
|
|
11
|
+
export declare const sepolia: string;
|
|
12
|
+
export declare const polygonAmoy: string;
|
|
13
|
+
export declare const vanarTestnet: string;
|
|
14
|
+
export declare const skaleTestnet: string;
|
|
15
|
+
export type ZKLINK = "ZKLINK-NOVA";
|
|
16
|
+
export type ZKLINK_TESTNET = "ZKLINK-NOVA-TESTNET";
|
|
17
|
+
export type BITLAYER_TESTNET = "BITLAYER-TESTNET";
|
|
18
|
+
export type NEOX_TESTNET = "NEOX-TESTNET";
|
|
19
|
+
export type SEPOLIA = "SEPOLIA";
|
|
20
|
+
export type AMOY = "AMOY";
|
|
21
|
+
export type VANGUARD_VANAR_TESTNET = "VANGUARD-VANAR-TESTNET";
|
|
22
|
+
export type SKALE_TESTNET = "SKALE-TESTNET";
|
|
23
|
+
export declare const TESTNET_CHAINS: string[];
|
|
24
|
+
export declare const SUPPORTED_EVM_CHAINS: string[];
|
|
25
|
+
export declare const GAS_ABS_ENABLED_CHAINS: string[];
|
|
26
|
+
export declare const AA_SUPPORTED_EVM_CHAINS: string[];
|
|
27
|
+
export declare const ALLCHAINS: string[];
|
|
28
|
+
export declare const networks: {
|
|
29
|
+
chainName: string;
|
|
30
|
+
logo: string;
|
|
31
|
+
type: string;
|
|
32
|
+
}[];
|
|
33
|
+
export declare const chainNameToLogo: {
|
|
34
|
+
[x: string]: string;
|
|
35
|
+
ETH: string;
|
|
36
|
+
FANTOM: string;
|
|
37
|
+
POLYGON: string;
|
|
38
|
+
AVALANCHE: string;
|
|
39
|
+
OPTIMISM: string;
|
|
40
|
+
ARBITRUM: string;
|
|
41
|
+
LINEA: string;
|
|
42
|
+
MUMBAI: string;
|
|
43
|
+
FUSE: string;
|
|
44
|
+
FUSESPARK: string;
|
|
45
|
+
BINANCE: string;
|
|
46
|
+
MANTA: string;
|
|
47
|
+
"MANTA-TESTNET": string;
|
|
48
|
+
METIS: string;
|
|
49
|
+
"METIS-TESTNET": string;
|
|
50
|
+
MANTLE: string;
|
|
51
|
+
"MANTLE-TESTNET": string;
|
|
52
|
+
SOLANA: string;
|
|
53
|
+
};
|
|
54
|
+
export declare const chainNameToLogoAverageColor: {
|
|
55
|
+
ETH: string;
|
|
56
|
+
POLYGON: string;
|
|
57
|
+
SEPOLIA: string;
|
|
58
|
+
FANTOM: string;
|
|
59
|
+
AMOY: string;
|
|
60
|
+
AVALANCHE: string;
|
|
61
|
+
ARBITRUM: string;
|
|
62
|
+
OPTIMISM: string;
|
|
63
|
+
LINEA: string;
|
|
64
|
+
MUMBAI: string;
|
|
65
|
+
FUSESPARK: string;
|
|
66
|
+
FUSE: string;
|
|
67
|
+
MANTA: string;
|
|
68
|
+
"MANTA-TESTNET": string;
|
|
69
|
+
"METIS-TESTNET": string;
|
|
70
|
+
METIS: string;
|
|
71
|
+
SOLANA: string;
|
|
72
|
+
"MANTLE-TESTNET": string;
|
|
73
|
+
MANTLE: string;
|
|
74
|
+
"BITLAYER-TESTNET": string;
|
|
75
|
+
"ZKLINK-NOVA": string;
|
|
76
|
+
"ZKLINK-NOVA-TESTNET": string;
|
|
77
|
+
"NEOX-TESTNET": string;
|
|
78
|
+
"VANGUARD-VANAR-TESTNET": string;
|
|
79
|
+
BINANCE: string;
|
|
80
|
+
};
|
|
81
|
+
export declare const chainNameToLogoBlack: {
|
|
82
|
+
[x: string]: string;
|
|
83
|
+
ETH: string;
|
|
84
|
+
BINANCE: string;
|
|
85
|
+
FANTOM: string;
|
|
86
|
+
POLYGON: string;
|
|
87
|
+
AVALANCHE: string;
|
|
88
|
+
OPTIMISM: string;
|
|
89
|
+
ARBITRUM: string;
|
|
90
|
+
LINEA: string;
|
|
91
|
+
MUMBAI: string;
|
|
92
|
+
FUSE: string;
|
|
93
|
+
FUSESPARK: string;
|
|
94
|
+
MANTA: string;
|
|
95
|
+
"MANTA-TESTNET": string;
|
|
96
|
+
METIS: string;
|
|
97
|
+
"METIS-TESTNET": string;
|
|
98
|
+
MANTLE: string;
|
|
99
|
+
"MANTLE-TESTNET": string;
|
|
100
|
+
SOLANA: string;
|
|
101
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const prodApiUrl = "https://prod.tria.so";
|
|
2
|
+
export declare const isEvmChain: (chainName: string) => boolean;
|
|
3
|
+
export declare const isAaSupportedChain: (chainName: string) => boolean;
|
|
4
|
+
export declare const isChainSupported: (chainName: string) => boolean;
|
|
5
|
+
export declare const isTestnetChain: (chainName: string) => boolean;
|
|
6
|
+
export declare const isGasAbsEnabled: (chainName: string) => boolean;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const eventTypes: {
|
|
2
|
+
logIn: string;
|
|
3
|
+
triaSignUp: string;
|
|
4
|
+
emailPwSignUp: string;
|
|
5
|
+
socialSignUp: string;
|
|
6
|
+
signMessage: string;
|
|
7
|
+
send: string;
|
|
8
|
+
disconnect: string;
|
|
9
|
+
switchChain: string;
|
|
10
|
+
detected: string;
|
|
11
|
+
logout: string;
|
|
12
|
+
passMessage: string;
|
|
13
|
+
accessToken: string;
|
|
14
|
+
idTokenPass: string;
|
|
15
|
+
saveToAuth: string;
|
|
16
|
+
triaStoreSet: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const TRIA_WALLET_STORE = "tria.wallet.store";
|
|
19
|
+
export declare const TRIA_WALLET_SELECTED_CHAIN = "tria.wallet.selectedChain";
|
|
20
|
+
export declare const storageKeys: {
|
|
21
|
+
TRIA_WALLET_STORE: string;
|
|
22
|
+
TRIA_WALLET_SELECTED_CHAIN: string;
|
|
23
|
+
PERSIST_ROOT: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const triaAuthUrl = "https://auth.tria.so";
|
|
File without changes
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
export declare const explorerBaseUrls: {
|
|
2
|
+
[x: string]: string;
|
|
3
|
+
ETH: string;
|
|
4
|
+
POLYGON: string;
|
|
5
|
+
AVALANCHE: string;
|
|
6
|
+
ARBITRUM: string;
|
|
7
|
+
BINANCE: string;
|
|
8
|
+
OPTIMISM: string;
|
|
9
|
+
FANTOM: string;
|
|
10
|
+
SOLANA: string;
|
|
11
|
+
APTOS: string;
|
|
12
|
+
NEO: string;
|
|
13
|
+
SUI: string;
|
|
14
|
+
FUSE: string;
|
|
15
|
+
FUSESPARK: string;
|
|
16
|
+
MUMBAI: string;
|
|
17
|
+
METIS: string;
|
|
18
|
+
"METIS-TESTNET": string;
|
|
19
|
+
MANTLE: string;
|
|
20
|
+
"MANTLE-TESTNET": string;
|
|
21
|
+
MANTA: string;
|
|
22
|
+
"MANTA-TESTNET": string;
|
|
23
|
+
};
|
|
24
|
+
export declare const txnBaseUrl: {
|
|
25
|
+
[x: string]: string;
|
|
26
|
+
ETH: string;
|
|
27
|
+
POLYGON: string;
|
|
28
|
+
AVALANCHE: string;
|
|
29
|
+
ARBITRUM: string;
|
|
30
|
+
BINANCE: string;
|
|
31
|
+
OPTIMISM: string;
|
|
32
|
+
FANTOM: string;
|
|
33
|
+
FUSE: string;
|
|
34
|
+
FUSESPARK: string;
|
|
35
|
+
MUMBAI: string;
|
|
36
|
+
METIS: string;
|
|
37
|
+
"METIS-TESTNET": string;
|
|
38
|
+
MANTLE: string;
|
|
39
|
+
"MANTLE-TESTNET": string;
|
|
40
|
+
MANTA: string;
|
|
41
|
+
"MANTA-TESTNET": string;
|
|
42
|
+
};
|
|
43
|
+
export declare const nativeTokenDetails: {
|
|
44
|
+
[x: string]: {
|
|
45
|
+
name: string;
|
|
46
|
+
symbol: string;
|
|
47
|
+
logoUrl: string;
|
|
48
|
+
};
|
|
49
|
+
ETH: {
|
|
50
|
+
name: string;
|
|
51
|
+
symbol: string;
|
|
52
|
+
logoUrl: string;
|
|
53
|
+
};
|
|
54
|
+
POLYGON: {
|
|
55
|
+
name: string;
|
|
56
|
+
symbol: string;
|
|
57
|
+
logoUrl: string;
|
|
58
|
+
};
|
|
59
|
+
AVALANCHE: {
|
|
60
|
+
name: string;
|
|
61
|
+
symbol: string;
|
|
62
|
+
logoUrl: string;
|
|
63
|
+
};
|
|
64
|
+
ARBITRUM: {
|
|
65
|
+
name: string;
|
|
66
|
+
symbol: string;
|
|
67
|
+
logoUrl: string;
|
|
68
|
+
};
|
|
69
|
+
BINANCE: {
|
|
70
|
+
name: string;
|
|
71
|
+
symbol: string;
|
|
72
|
+
logoUrl: string;
|
|
73
|
+
};
|
|
74
|
+
OPTIMISM: {
|
|
75
|
+
name: string;
|
|
76
|
+
symbol: string;
|
|
77
|
+
logoUrl: string;
|
|
78
|
+
};
|
|
79
|
+
FANTOM: {
|
|
80
|
+
name: string;
|
|
81
|
+
symbol: string;
|
|
82
|
+
logoUrl: string;
|
|
83
|
+
};
|
|
84
|
+
FUSE: {
|
|
85
|
+
name: string;
|
|
86
|
+
symbol: string;
|
|
87
|
+
logoUrl: string;
|
|
88
|
+
};
|
|
89
|
+
FUSESPARK: {
|
|
90
|
+
name: string;
|
|
91
|
+
symbol: string;
|
|
92
|
+
logoUrl: string;
|
|
93
|
+
};
|
|
94
|
+
MUMBAI: {
|
|
95
|
+
name: string;
|
|
96
|
+
symbol: string;
|
|
97
|
+
logoUrl: string;
|
|
98
|
+
};
|
|
99
|
+
METIS: {
|
|
100
|
+
name: string;
|
|
101
|
+
symbol: string;
|
|
102
|
+
logoUrl: string;
|
|
103
|
+
};
|
|
104
|
+
"METIS-TESTNET": {
|
|
105
|
+
name: string;
|
|
106
|
+
symbol: string;
|
|
107
|
+
logoUrl: string;
|
|
108
|
+
};
|
|
109
|
+
MANTLE: {
|
|
110
|
+
name: string;
|
|
111
|
+
symbol: string;
|
|
112
|
+
logoUrl: string;
|
|
113
|
+
};
|
|
114
|
+
"MANTLE-TESTNET": {
|
|
115
|
+
name: string;
|
|
116
|
+
symbol: string;
|
|
117
|
+
logoUrl: string;
|
|
118
|
+
};
|
|
119
|
+
MANTA: {
|
|
120
|
+
name: string;
|
|
121
|
+
symbol: string;
|
|
122
|
+
logoUrl: string;
|
|
123
|
+
};
|
|
124
|
+
"MANTA-TESTNET": {
|
|
125
|
+
name: string;
|
|
126
|
+
symbol: string;
|
|
127
|
+
logoUrl: string;
|
|
128
|
+
};
|
|
129
|
+
SOLANA: {
|
|
130
|
+
name: string;
|
|
131
|
+
symbol: string;
|
|
132
|
+
logoUrl: string;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
export declare const rpcUrls: {
|
|
136
|
+
[x: string]: string;
|
|
137
|
+
MUMBAI: string;
|
|
138
|
+
ETH: string;
|
|
139
|
+
POLYGON: string;
|
|
140
|
+
AVALANCHE: string;
|
|
141
|
+
ARBITRUM: string;
|
|
142
|
+
BINANCE: string;
|
|
143
|
+
OPTIMISM: string;
|
|
144
|
+
FANTOM: string;
|
|
145
|
+
FUSE: string;
|
|
146
|
+
FUSESPARK: string;
|
|
147
|
+
MANTA: string;
|
|
148
|
+
"MANTA-TESTNET": string;
|
|
149
|
+
METIS: string;
|
|
150
|
+
"METIS-TESTNET": string;
|
|
151
|
+
MANTLE: string;
|
|
152
|
+
"MANTLE-TESTNET": string;
|
|
153
|
+
};
|
|
154
|
+
export declare const chainNameToChainId: {
|
|
155
|
+
[x: string]: number;
|
|
156
|
+
MUMBAI: number;
|
|
157
|
+
POLYGON: number;
|
|
158
|
+
ETH: number;
|
|
159
|
+
AVALANCHE: number;
|
|
160
|
+
ARBITRUM: number;
|
|
161
|
+
BINANCE: number;
|
|
162
|
+
OPTIMISM: number;
|
|
163
|
+
FANTOM: number;
|
|
164
|
+
FUSE: number;
|
|
165
|
+
FUSESPARK: number;
|
|
166
|
+
MANTA: number;
|
|
167
|
+
"MANTA-TESTNET": number;
|
|
168
|
+
METIS: number;
|
|
169
|
+
"METIS-TESTNET": number;
|
|
170
|
+
MANTLE: number;
|
|
171
|
+
"MANTLE-TESTNET": number;
|
|
172
|
+
};
|
|
173
|
+
export declare const chainIdToChainName: {
|
|
174
|
+
11155111: string;
|
|
175
|
+
80001: string;
|
|
176
|
+
80002: string;
|
|
177
|
+
137: string;
|
|
178
|
+
1: string;
|
|
179
|
+
43114: string;
|
|
180
|
+
42161: string;
|
|
181
|
+
56: string;
|
|
182
|
+
10: string;
|
|
183
|
+
250: string;
|
|
184
|
+
122: string;
|
|
185
|
+
123: string;
|
|
186
|
+
5000: string;
|
|
187
|
+
5001: string;
|
|
188
|
+
1088: string;
|
|
189
|
+
599: string;
|
|
190
|
+
169: string;
|
|
191
|
+
3441005: string;
|
|
192
|
+
810180: string;
|
|
193
|
+
810182: string;
|
|
194
|
+
200810: string;
|
|
195
|
+
200901: string;
|
|
196
|
+
12227330: string;
|
|
197
|
+
78600: string;
|
|
198
|
+
974399131: string;
|
|
199
|
+
};
|
package/package.json
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tria-sdk/constants",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48",
|
|
4
4
|
"description": "",
|
|
5
5
|
"module": "dist/constants.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
-
"rollup": "rollup -c",
|
|
10
|
-
"build": "tsc && vite build"
|
|
11
|
-
},
|
|
12
7
|
"devDependencies": {
|
|
13
8
|
"typescript": "^5.3.3",
|
|
14
9
|
"typescript-tools": "^0.3.1",
|
|
@@ -17,5 +12,10 @@
|
|
|
17
12
|
},
|
|
18
13
|
"keywords": [],
|
|
19
14
|
"author": "",
|
|
20
|
-
"license": "ISC"
|
|
21
|
-
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
18
|
+
"rollup": "rollup -c",
|
|
19
|
+
"build": "tsc && vite build"
|
|
20
|
+
}
|
|
21
|
+
}
|
package/src/chains.ts
CHANGED
|
@@ -12,6 +12,7 @@ export const neoxTestnet: string = "NEOX-TESTNET";
|
|
|
12
12
|
export const sepolia: string = "SEPOLIA";
|
|
13
13
|
export const polygonAmoy: string = "AMOY";
|
|
14
14
|
export const vanarTestnet: string = "VANGUARD-VANAR-TESTNET";
|
|
15
|
+
export const skaleTestnet: string = "SKALE-TESTNET";
|
|
15
16
|
|
|
16
17
|
export type ZKLINK = "ZKLINK-NOVA";
|
|
17
18
|
export type ZKLINK_TESTNET = "ZKLINK-NOVA-TESTNET";
|
|
@@ -20,6 +21,7 @@ export type NEOX_TESTNET = "NEOX-TESTNET";
|
|
|
20
21
|
export type SEPOLIA = "SEPOLIA";
|
|
21
22
|
export type AMOY = "AMOY";
|
|
22
23
|
export type VANGUARD_VANAR_TESTNET = "VANGUARD-VANAR-TESTNET";
|
|
24
|
+
export type SKALE_TESTNET = "SKALE-TESTNET";
|
|
23
25
|
|
|
24
26
|
export const TESTNET_CHAINS = [
|
|
25
27
|
sepolia,
|
|
@@ -34,6 +36,7 @@ export const TESTNET_CHAINS = [
|
|
|
34
36
|
sepolia,
|
|
35
37
|
polygonAmoy,
|
|
36
38
|
vanarTestnet,
|
|
39
|
+
skaleTestnet,
|
|
37
40
|
];
|
|
38
41
|
|
|
39
42
|
export const SUPPORTED_EVM_CHAINS = [
|
|
@@ -62,6 +65,7 @@ export const SUPPORTED_EVM_CHAINS = [
|
|
|
62
65
|
sepolia,
|
|
63
66
|
polygonAmoy,
|
|
64
67
|
vanarTestnet,
|
|
68
|
+
skaleTestnet,
|
|
65
69
|
];
|
|
66
70
|
|
|
67
71
|
export const GAS_ABS_ENABLED_CHAINS = [sepolia, "POLYGON"];
|
|
@@ -111,6 +115,7 @@ export const ALLCHAINS = [
|
|
|
111
115
|
sepolia,
|
|
112
116
|
polygonAmoy,
|
|
113
117
|
vanarTestnet,
|
|
118
|
+
skaleTestnet,
|
|
114
119
|
];
|
|
115
120
|
|
|
116
121
|
const baseLogoUrl = "https://static.tria.so/chain-logo-w";
|
|
@@ -246,6 +251,11 @@ export const networks = [
|
|
|
246
251
|
logo: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrl}/Vanguard.webp`,
|
|
247
252
|
type: "testnet",
|
|
248
253
|
},
|
|
254
|
+
{
|
|
255
|
+
chainName: skaleTestnet,
|
|
256
|
+
logo: "https://docs.skale.network/_/img/Skale_Logo_Black.png",
|
|
257
|
+
type: "testnet",
|
|
258
|
+
},
|
|
249
259
|
];
|
|
250
260
|
|
|
251
261
|
export const chainNameToLogo = {
|
|
@@ -275,6 +285,7 @@ export const chainNameToLogo = {
|
|
|
275
285
|
[bitlayerMainnet]: `${baseLogoUrl}/bitlayer.webp`,
|
|
276
286
|
[neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
|
|
277
287
|
[vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrl}/Vanguard.webp`,
|
|
288
|
+
[skaleTestnet]: "https://docs.skale.network/_/img/Skale_Logo_Black.png",
|
|
278
289
|
};
|
|
279
290
|
export const chainNameToLogoAverageColor = {
|
|
280
291
|
ETH: "rgba(98,126,235,0.7)",
|
|
@@ -331,4 +342,5 @@ export const chainNameToLogoBlack = {
|
|
|
331
342
|
[bitlayerMainnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
|
|
332
343
|
[neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
|
|
333
344
|
[vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrlBlack}/Vanguard.png`,
|
|
345
|
+
[skaleTestnet]: "https://docs.skale.network/_/img/Skale_Logo_Black.png",
|
|
334
346
|
};
|
package/src/txn.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
zkLink,
|
|
8
8
|
zkLinkTestnet,
|
|
9
9
|
vanarTestnet,
|
|
10
|
+
skaleTestnet,
|
|
10
11
|
} from "./chains";
|
|
11
12
|
|
|
12
13
|
export const explorerBaseUrls = {
|
|
@@ -38,6 +39,8 @@ export const explorerBaseUrls = {
|
|
|
38
39
|
[bitlayerMainnet]: "https://www.btrscan.com",
|
|
39
40
|
[neoxTestnet]: "https://xt2scan.ngd.network",
|
|
40
41
|
[vanarTestnet]: "https://explorer-vanguard.vanarchain.com",
|
|
42
|
+
[skaleTestnet]:
|
|
43
|
+
"https://giant-half-dual-testnet.explorer.testnet.skalenodes.com",
|
|
41
44
|
};
|
|
42
45
|
|
|
43
46
|
export const txnBaseUrl = {
|
|
@@ -65,6 +68,7 @@ export const txnBaseUrl = {
|
|
|
65
68
|
[bitlayerMainnet]: `${explorerBaseUrls[bitlayerMainnet]}/tx`,
|
|
66
69
|
[neoxTestnet]: `${explorerBaseUrls[neoxTestnet]}/tx`,
|
|
67
70
|
[vanarTestnet]: `${explorerBaseUrls[vanarTestnet]}/tx`,
|
|
71
|
+
[skaleTestnet]: `${explorerBaseUrls[skaleTestnet]}/tx`,
|
|
68
72
|
};
|
|
69
73
|
|
|
70
74
|
export const nativeTokenDetails = {
|
|
@@ -203,6 +207,11 @@ export const nativeTokenDetails = {
|
|
|
203
207
|
logoUrl:
|
|
204
208
|
"https://explorer-vanguard.vanarchain.com/assets/network_icon_dark.svg",
|
|
205
209
|
},
|
|
210
|
+
[skaleTestnet]: {
|
|
211
|
+
name: "sFUEL",
|
|
212
|
+
symbol: "sFUEL",
|
|
213
|
+
logoUrl: "https://docs.skale.network/_/img/Skale_Logo_Black.png",
|
|
214
|
+
},
|
|
206
215
|
};
|
|
207
216
|
|
|
208
217
|
const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
|
|
@@ -233,6 +242,7 @@ export const rpcUrls = {
|
|
|
233
242
|
[bitlayerMainnet]: "https://rpc.bitlayer.org",
|
|
234
243
|
[neoxTestnet]: "https://neoxseed1.ngd.network",
|
|
235
244
|
[vanarTestnet]: "http://rpc-partners-vanguard.vanarchain.com", // "https://rpc-vanguard.vanarchain.com",
|
|
245
|
+
[skaleTestnet]: "https://testnet.skalenodes.com/v1/giant-half-dual-testnet",
|
|
236
246
|
};
|
|
237
247
|
|
|
238
248
|
export const chainNameToChainId = {
|
|
@@ -260,6 +270,7 @@ export const chainNameToChainId = {
|
|
|
260
270
|
[bitlayerMainnet]: 200901,
|
|
261
271
|
[neoxTestnet]: 12227330,
|
|
262
272
|
[vanarTestnet]: 78600,
|
|
273
|
+
[skaleTestnet]: 974399131,
|
|
263
274
|
};
|
|
264
275
|
|
|
265
276
|
export const chainIdToChainName = {
|
|
@@ -287,4 +298,5 @@ export const chainIdToChainName = {
|
|
|
287
298
|
200901: bitlayerMainnet,
|
|
288
299
|
12227330: neoxTestnet,
|
|
289
300
|
78600: vanarTestnet,
|
|
301
|
+
974399131: skaleTestnet,
|
|
290
302
|
};
|