@tria-sdk/constants 1.0.45 → 1.0.47

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/index.ts CHANGED
@@ -2,3 +2,4 @@ export * from "./src/config";
2
2
  export * from "./src/chains";
3
3
  export * from "./src/txn";
4
4
  export * from "./src/connect";
5
+ // export * from "./src/gasToken";
package/package.json CHANGED
@@ -1,18 +1,21 @@
1
1
  {
2
2
  "name": "@tria-sdk/constants",
3
- "version": "1.0.45",
3
+ "version": "1.0.47",
4
4
  "description": "",
5
- "main": "dist/index.js",
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
+ },
7
12
  "devDependencies": {
8
13
  "typescript": "^5.3.3",
9
- "typescript-tools": "^0.3.1"
14
+ "typescript-tools": "^0.3.1",
15
+ "vite": "^5.1.4",
16
+ "vite-plugin-dts": "^3.7.3"
10
17
  },
11
18
  "keywords": [],
12
19
  "author": "",
13
- "license": "ISC",
14
- "scripts": {
15
- "test": "echo \"Error: no test specified\" && exit 1",
16
- "build": "tsc --project tsconfig.json"
17
- }
18
- }
20
+ "license": "ISC"
21
+ }
package/src/chains.ts CHANGED
@@ -22,6 +22,7 @@ export type AMOY = "AMOY";
22
22
  export type VANGUARD_VANAR_TESTNET = "VANGUARD-VANAR-TESTNET";
23
23
 
24
24
  export const TESTNET_CHAINS = [
25
+ sepolia,
25
26
  "MUMBAI",
26
27
  "FUSESPARK",
27
28
  "MANTA-TESTNET",
@@ -46,6 +47,7 @@ export const SUPPORTED_EVM_CHAINS = [
46
47
  "FUSE",
47
48
  "FUSESPARK",
48
49
  "MUMBAI",
50
+ sepolia,
49
51
  "MANTA",
50
52
  "MANTA-TESTNET",
51
53
  "METIS",
@@ -62,9 +64,12 @@ export const SUPPORTED_EVM_CHAINS = [
62
64
  vanarTestnet,
63
65
  ];
64
66
 
67
+ export const GAS_ABS_ENABLED_CHAINS = [sepolia, "POLYGON"];
68
+
65
69
  export const AA_SUPPORTED_EVM_CHAINS = [
66
70
  // "ETH",
67
71
  "POLYGON",
72
+ sepolia,
68
73
  // "AVALANCHE",
69
74
  // "ARBITRUM",
70
75
  // "BINANCE",
@@ -90,6 +95,7 @@ export const ALLCHAINS = [
90
95
  "FUSE",
91
96
  "FUSESPARK",
92
97
  "MUMBAI",
98
+ sepolia,
93
99
  "MANTA",
94
100
  "MANTA-TESTNET",
95
101
  "METIS",
@@ -270,11 +276,38 @@ export const chainNameToLogo = {
270
276
  [neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
271
277
  [vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrl}/Vanguard.webp`,
272
278
  };
279
+ export const chainNameToLogoAverageColor = {
280
+ ETH: "rgba(98,126,235,0.7)",
281
+ POLYGON: "rgba(131,69,231,0.7)",
282
+ SEPOLIA: "rgba(98,126,235,0.7)",
283
+ FANTOM: "rgba(19,181,235,0.7)",
284
+ AMOY: "rgba(131,69,231,0.7)",
285
+ AVALANCHE: "rgba(232,65,67,0.7)",
286
+ ARBITRUM: "rgba(17,170,255,0.7)",
287
+ OPTIMISM: "rgba(255,5,32,0.7)",
288
+ LINEA: "UNDETERMINED",
289
+ MUMBAI: "rgba(131,69,231,0.7)",
290
+ FUSESPARK: "rgba(180,249,185,0.7)",
291
+ FUSE: "rgba(180,249,185,0.7)",
292
+ MANTA: "rgba(255,0,0,0.7)",
293
+ "MANTA-TESTNET": "rgba(255,0,0,0.7)",
294
+ "METIS-TESTNET": "rgba(255,0,214,0.7)",
295
+ METIS: "rgba(255,0,214,0.7)",
296
+ SOLANA: "UNDETERMINED",
297
+ "MANTLE-TESTNET": "rgba(255,0,0,0.7)",
298
+ MANTLE: "rgba(255,0,0,0.7)",
299
+ "BITLAYER-TESTNET": "rgba(226,110,26,0.7)",
300
+ "ZKLINK-NOVA": "UNDETERMINED",
301
+ "ZKLINK-NOVA-TESTNET": "UNDETERMINED",
302
+ "NEOX-TESTNET": "rgba(1,229,155,0.7)",
303
+ "VANGUARD-VANAR-TESTNET": "rgba(0,255,255,0.7)",
304
+ BINANCE: "rgba(240,185,11,0.7)",
305
+ };
273
306
 
274
307
  export const chainNameToLogoBlack = {
275
308
  ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
276
309
  [sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
277
- BINANCE: `${baseLogoUrlBlack}/binance.webp`,
310
+ BINANCE: `${baseLogoUrlBlack}/binance.svg`,
278
311
  FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
279
312
  POLYGON: `${baseLogoUrlBlack}/Polygon.webp`,
280
313
  [polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
package/src/config.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  AA_SUPPORTED_EVM_CHAINS,
3
3
  ALLCHAINS,
4
+ GAS_ABS_ENABLED_CHAINS,
4
5
  SUPPORTED_EVM_CHAINS,
5
6
  TESTNET_CHAINS,
6
7
  } from "./chains";
@@ -22,3 +23,7 @@ export const isChainSupported = (chainName: string) => {
22
23
  export const isTestnetChain = (chainName: string) => {
23
24
  return TESTNET_CHAINS.includes(chainName);
24
25
  };
26
+
27
+ export const isGasAbsEnabled = (chainName: string) => {
28
+ return GAS_ABS_ENABLED_CHAINS.includes(chainName);
29
+ };
@@ -0,0 +1,13 @@
1
+ // import { polygonAmoy, sepolia } from "./chains";
2
+
3
+ // export const gasTokenAddresses = {
4
+ // [sepolia]: {
5
+ // USDC: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
6
+ // USDT: "",
7
+ // TST: "0xe2fDF4b113552A7bFaD5492D7E68F7479D7DFaCF",
8
+ // },
9
+ // [polygonAmoy]: {
10
+ // USDC: "",
11
+ // USDT: "",
12
+ // },
13
+ // };
package/src/txn.ts CHANGED
@@ -212,6 +212,7 @@ export const rpcUrls = {
212
212
  [polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
213
213
  [sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
214
214
  ETH: "https://eth.llamarpc.com",
215
+ [sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
215
216
  POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
216
217
  AVALANCHE: "https://avalanche-c-chain.publicnode.com",
217
218
  ARBITRUM: "https://arbitrum-one.publicnode.com",
@@ -231,7 +232,7 @@ export const rpcUrls = {
231
232
  [bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
232
233
  [bitlayerMainnet]: "https://rpc.bitlayer.org",
233
234
  [neoxTestnet]: "https://neoxseed1.ngd.network",
234
- [vanarTestnet]: "https://rpc-partners-vanguard.vanarchain.com", // "https://rpc-vanguard.vanarchain.com",
235
+ [vanarTestnet]: "http://rpc-partners-vanguard.vanarchain.com", // "https://rpc-vanguard.vanarchain.com",
235
236
  };
236
237
 
237
238
  export const chainNameToChainId = {
@@ -262,9 +263,9 @@ export const chainNameToChainId = {
262
263
  };
263
264
 
264
265
  export const chainIdToChainName = {
266
+ 11155111: sepolia,
265
267
  80001: "MUMBAI",
266
268
  80002: polygonAmoy,
267
- 11155111: sepolia,
268
269
  137: "POLYGON",
269
270
  1: "ETH",
270
271
  43114: "AVALANCHE",
package/tsconfig.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "ES6",
4
- "module": "ES6", // "CommonJS",
3
+ "target": "ES2022",
4
+ "module": "ES2022",
5
5
  "lib": ["ES2022"],
6
6
  "skipLibCheck": true,
7
7
  "strict": true,
package/vite.config.ts ADDED
@@ -0,0 +1,23 @@
1
+ import { defineConfig } from "vite";
2
+ import dts from "vite-plugin-dts";
3
+ // import visualizer from "rollup-plugin-visualizer";
4
+
5
+ export default defineConfig({
6
+ build: {
7
+ // Specify the entry point for your library
8
+ lib: {
9
+ entry: "index.ts", // Change this to your library's entry point
10
+ formats: ["es"], // Specify the format as ES module
11
+ },
12
+ // Optionally, specify external dependencies that should not be bundled
13
+ rollupOptions: {
14
+ output: {
15
+ preserveModules: true,
16
+ },
17
+ },
18
+ },
19
+ plugins: [
20
+ dts(),
21
+ // visualizer({ open: true, filename: "bundle-analysis.html" }),
22
+ ],
23
+ });
@@ -1,5 +0,0 @@
1
-
2
- 
3
- > @tria-sdk/constants@1.0.42 build /Users/dawn/Projects/Tria/tria-monorepo/packages/constants
4
- > tsc --project tsconfig.json
5
-
package/dist/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from "./src/config";
2
- export * from "./src/chains";
3
- export * from "./src/txn";
4
- export * from "./src/connect";
package/dist/index.js DELETED
@@ -1,4 +0,0 @@
1
- export * from "./src/config";
2
- export * from "./src/chains";
3
- export * from "./src/txn";
4
- export * from "./src/connect";
@@ -1,71 +0,0 @@
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 type ZKLINK = "ZKLINK-NOVA";
15
- export type ZKLINK_TESTNET = "ZKLINK-NOVA-TESTNET";
16
- export type BITLAYER_TESTNET = "BITLAYER-TESTNET";
17
- export type NEOX_TESTNET = "NEOX-TESTNET";
18
- export type SEPOLIA = "SEPOLIA";
19
- export type AMOY = "AMOY";
20
- export type VANGUARD_VANAR_TESTNET = "VANGUARD-VANAR-TESTNET";
21
- export declare const TESTNET_CHAINS: string[];
22
- export declare const SUPPORTED_EVM_CHAINS: string[];
23
- export declare const AA_SUPPORTED_EVM_CHAINS: string[];
24
- export declare const ALLCHAINS: string[];
25
- export declare const networks: {
26
- chainName: string;
27
- logo: string;
28
- type: string;
29
- }[];
30
- export declare const chainNameToLogo: {
31
- [x: string]: string;
32
- ETH: string;
33
- FANTOM: string;
34
- POLYGON: string;
35
- AVALANCHE: string;
36
- OPTIMISM: string;
37
- ARBITRUM: string;
38
- LINEA: string;
39
- MUMBAI: string;
40
- FUSE: string;
41
- FUSESPARK: string;
42
- BINANCE: string;
43
- MANTA: string;
44
- "MANTA-TESTNET": string;
45
- METIS: string;
46
- "METIS-TESTNET": string;
47
- MANTLE: string;
48
- "MANTLE-TESTNET": string;
49
- SOLANA: string;
50
- };
51
- export declare const chainNameToLogoBlack: {
52
- [x: string]: string;
53
- ETH: string;
54
- BINANCE: string;
55
- FANTOM: string;
56
- POLYGON: string;
57
- AVALANCHE: string;
58
- OPTIMISM: string;
59
- ARBITRUM: string;
60
- LINEA: string;
61
- MUMBAI: string;
62
- FUSE: string;
63
- FUSESPARK: string;
64
- MANTA: string;
65
- "MANTA-TESTNET": string;
66
- METIS: string;
67
- "METIS-TESTNET": string;
68
- MANTLE: string;
69
- "MANTLE-TESTNET": string;
70
- SOLANA: string;
71
- };
@@ -1,284 +0,0 @@
1
- export const mumbai = "MUMBAI";
2
- export const polygon = "POLYGON";
3
- export const ethereum = "ETH";
4
- export const fuse = "FUSE";
5
- export const fuseSpark = "FUSESPARK";
6
- export const zkLink = "ZKLINK-NOVA";
7
- export const zkLinkTestnet = "ZKLINK-NOVA-TESTNET";
8
- export const bitlayerTestnet = "BITLAYER-TESTNET";
9
- export const bitlayerMainnet = "BITLAYER-MAINNET";
10
- export const neoxTestnet = "NEOX-TESTNET";
11
- export const sepolia = "SEPOLIA";
12
- export const polygonAmoy = "AMOY";
13
- export const vanarTestnet = "VANGUARD-VANAR-TESTNET";
14
- export const TESTNET_CHAINS = [
15
- "MUMBAI",
16
- "FUSESPARK",
17
- "MANTA-TESTNET",
18
- "METIS-TESTNET",
19
- "MANTLE-TESTNET",
20
- zkLinkTestnet,
21
- bitlayerTestnet,
22
- neoxTestnet,
23
- sepolia,
24
- polygonAmoy,
25
- vanarTestnet,
26
- ];
27
- export const SUPPORTED_EVM_CHAINS = [
28
- "ETH",
29
- "POLYGON",
30
- "AVALANCHE",
31
- "ARBITRUM",
32
- "BINANCE",
33
- "OPTIMISM",
34
- "FANTOM",
35
- "FUSE",
36
- "FUSESPARK",
37
- "MUMBAI",
38
- "MANTA",
39
- "MANTA-TESTNET",
40
- "METIS",
41
- "METIS-TESTNET",
42
- "MANTLE",
43
- "MANTLE-TESTNET",
44
- zkLink,
45
- zkLinkTestnet,
46
- bitlayerTestnet,
47
- bitlayerMainnet,
48
- neoxTestnet,
49
- sepolia,
50
- polygonAmoy,
51
- vanarTestnet,
52
- ];
53
- export const AA_SUPPORTED_EVM_CHAINS = [
54
- // "ETH",
55
- "POLYGON",
56
- // "AVALANCHE",
57
- // "ARBITRUM",
58
- // "BINANCE",
59
- // "OPTIMISM",
60
- "FUSE",
61
- "MUMBAI",
62
- // "MANTLE",
63
- sepolia,
64
- "OPTIMISM",
65
- "ARBITRUM",
66
- "AVALANCHE",
67
- "MANTLE",
68
- ];
69
- export const ALLCHAINS = [
70
- "ETH",
71
- "POLYGON",
72
- "AVALANCHE",
73
- "ARBITRUM",
74
- "BINANCE",
75
- "OPTIMISM",
76
- "FANTOM",
77
- "FUSE",
78
- "FUSESPARK",
79
- "MUMBAI",
80
- "MANTA",
81
- "MANTA-TESTNET",
82
- "METIS",
83
- "METIS-TESTNET",
84
- "MANTLE",
85
- "MANTLE-TESTNET",
86
- "SOLANA",
87
- zkLink,
88
- zkLinkTestnet,
89
- bitlayerTestnet,
90
- bitlayerMainnet,
91
- neoxTestnet,
92
- sepolia,
93
- polygonAmoy,
94
- vanarTestnet,
95
- ];
96
- const baseLogoUrl = "https://static.tria.so/chain-logo-w";
97
- const baseLogoUrlBlack = "https://static.tria.so/chain-logo-b";
98
- export const networks = [
99
- {
100
- chainName: "ETH",
101
- logo: `${baseLogoUrl}/Ethereum.webp`,
102
- type: "mainnet",
103
- },
104
- {
105
- chainName: sepolia,
106
- logo: `${baseLogoUrl}/Ethereum.webp`,
107
- type: "testnet",
108
- },
109
- {
110
- chainName: "FANTOM",
111
- logo: `${baseLogoUrl}/Fantom.webp`,
112
- type: "mainnet",
113
- },
114
- {
115
- chainName: "POLYGON",
116
- logo: `${baseLogoUrl}/Polygon.svg`,
117
- type: "mainnet",
118
- },
119
- {
120
- chainName: polygonAmoy,
121
- logo: `${baseLogoUrl}/Polygon.svg`,
122
- type: "testnet",
123
- },
124
- {
125
- chainName: "AVALANCHE",
126
- logo: `${baseLogoUrl}/Avalanche.webp`,
127
- type: "mainnet",
128
- },
129
- {
130
- chainName: "OPTIMISM",
131
- logo: `${baseLogoUrl}/Optimism.webp`,
132
- type: "mainnet",
133
- },
134
- {
135
- chainName: "ARBITRUM",
136
- logo: `${baseLogoUrl}/Arbitrum.webp`,
137
- type: "mainnet",
138
- },
139
- {
140
- chainName: "FUSE",
141
- logo: `${baseLogoUrl}/Fuse.webp`,
142
- type: "mainnet",
143
- },
144
- {
145
- chainName: "FUSESPARK",
146
- logo: `${baseLogoUrl}/Fuse.webp`,
147
- type: "testnet",
148
- },
149
- {
150
- chainName: "MUMBAI",
151
- logo: `${baseLogoUrl}/Polygon.svg`,
152
- type: "testnet",
153
- },
154
- {
155
- chainName: "BINANCE",
156
- logo: `${baseLogoUrl}/Binance.svg`,
157
- type: "mainnet",
158
- },
159
- // {
160
- // chainName: 'LINEA',
161
- // logo: `${baseLogoUrl}/Linea.svg`,
162
- // },
163
- {
164
- chainName: "METIS",
165
- logo: `${baseLogoUrl}/Metis.webp`,
166
- type: "mainnet",
167
- },
168
- {
169
- chainName: "METIS-TESTNET",
170
- logo: `${baseLogoUrl}/Metis.webp`,
171
- type: "testnet",
172
- },
173
- {
174
- chainName: "MANTA",
175
- logo: `${baseLogoUrl}/Manta.webp`,
176
- type: "mainnet",
177
- },
178
- {
179
- chainName: "MANTA-TESTNET",
180
- logo: `${baseLogoUrl}/Manta.webp`,
181
- type: "testnet",
182
- },
183
- {
184
- chainName: "MANTLE",
185
- logo: `${baseLogoUrl}/Mantle.webp`,
186
- type: "mainnet",
187
- },
188
- {
189
- chainName: "MANTLE-TESTNET",
190
- logo: `${baseLogoUrl}/Mantle.webp`,
191
- type: "testnet",
192
- },
193
- {
194
- chainName: "SOLANA",
195
- logo: `${baseLogoUrl}/Solana.webp`,
196
- type: "mainnet",
197
- },
198
- {
199
- chainName: zkLink,
200
- logo: `${baseLogoUrl}/zklink.webp`,
201
- type: "mainnet",
202
- },
203
- {
204
- chainName: zkLinkTestnet,
205
- logo: `${baseLogoUrl}/zklink.webp`,
206
- type: "testnet",
207
- },
208
- {
209
- chainName: bitlayerTestnet,
210
- logo: `${baseLogoUrl}/bitlayer.webp`,
211
- type: "testnet",
212
- },
213
- {
214
- chainName: bitlayerMainnet,
215
- logo: `${baseLogoUrl}/bitlayer.webp`,
216
- type: "mainnet",
217
- },
218
- {
219
- chainName: neoxTestnet,
220
- logo: `${baseLogoUrl}/Neo.webp`,
221
- type: "testnet",
222
- },
223
- {
224
- chainName: vanarTestnet,
225
- logo: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrl}/Vanguard.webp`,
226
- type: "testnet",
227
- },
228
- ];
229
- export const chainNameToLogo = {
230
- ETH: `${baseLogoUrl}/Ethereum.webp`,
231
- [sepolia]: `${baseLogoUrl}/Ethereum.webp`,
232
- FANTOM: `${baseLogoUrl}/Fantom.webp`,
233
- POLYGON: `${baseLogoUrl}/Polygon.webp`,
234
- [polygonAmoy]: `${baseLogoUrl}/Polygon.webp`,
235
- AVALANCHE: `${baseLogoUrl}/Avalanche.webp`,
236
- OPTIMISM: `${baseLogoUrl}/Optimism.webp`,
237
- ARBITRUM: `${baseLogoUrl}/Arbitrum.webp`,
238
- LINEA: `${baseLogoUrl}/Linea.webp`,
239
- MUMBAI: `${baseLogoUrl}/Polygon.webp`,
240
- FUSE: `${baseLogoUrl}/Fuse.webp`,
241
- FUSESPARK: `${baseLogoUrl}/Fuse.webp`,
242
- BINANCE: `${baseLogoUrl}/Binance.svg`,
243
- MANTA: `${baseLogoUrl}/Manta.webp`,
244
- "MANTA-TESTNET": `${baseLogoUrl}/Manta.webp`,
245
- METIS: `${baseLogoUrl}/Metis.webp`,
246
- "METIS-TESTNET": `${baseLogoUrl}/Metis.webp`,
247
- MANTLE: `${baseLogoUrl}/Mantle.webp`,
248
- "MANTLE-TESTNET": `${baseLogoUrl}/Mantle.webp`,
249
- SOLANA: `${baseLogoUrl}/Solana.webp`,
250
- [zkLink]: `${baseLogoUrl}/zklink.webp`,
251
- [zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
252
- [bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
253
- [bitlayerMainnet]: `${baseLogoUrl}/bitlayer.webp`,
254
- [neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
255
- [vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrl}/Vanguard.webp`,
256
- };
257
- export const chainNameToLogoBlack = {
258
- ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
259
- [sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
260
- BINANCE: `${baseLogoUrlBlack}/binance.webp`,
261
- FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
262
- POLYGON: `${baseLogoUrlBlack}/Polygon.webp`,
263
- [polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
264
- AVALANCHE: `${baseLogoUrlBlack}/Avalanche.webp`,
265
- OPTIMISM: `${baseLogoUrlBlack}/Optimism.webp`,
266
- ARBITRUM: `${baseLogoUrlBlack}/Arbitrum.webp`,
267
- LINEA: `${baseLogoUrlBlack}/Linea.webp`,
268
- MUMBAI: `${baseLogoUrlBlack}/Polygon.webp`,
269
- FUSE: `${baseLogoUrlBlack}/fuse.webp`,
270
- FUSESPARK: `${baseLogoUrlBlack}/fuse.webp`,
271
- MANTA: `${baseLogoUrlBlack}/Manta.webp`,
272
- "MANTA-TESTNET": `${baseLogoUrlBlack}/Manta.webp`,
273
- METIS: `${baseLogoUrlBlack}/Metis.webp`,
274
- "METIS-TESTNET": `${baseLogoUrlBlack}/Metis.webp`,
275
- MANTLE: `${baseLogoUrlBlack}/Mantle.webp`,
276
- "MANTLE-TESTNET": `${baseLogoUrlBlack}/Mantle.webp`,
277
- SOLANA: `${baseLogoUrlBlack}/Solana.webp`,
278
- [zkLink]: `${baseLogoUrlBlack}/zklink.webp`,
279
- [zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
280
- [bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
281
- [bitlayerMainnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
282
- [neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
283
- [vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrlBlack}/Vanguard.png`,
284
- };
@@ -1,5 +0,0 @@
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;
@@ -1,14 +0,0 @@
1
- import { AA_SUPPORTED_EVM_CHAINS, ALLCHAINS, SUPPORTED_EVM_CHAINS, TESTNET_CHAINS, } from "./chains";
2
- export const prodApiUrl = "https://prod.tria.so";
3
- export const isEvmChain = (chainName) => {
4
- return SUPPORTED_EVM_CHAINS.includes(chainName);
5
- };
6
- export const isAaSupportedChain = (chainName) => {
7
- return AA_SUPPORTED_EVM_CHAINS.includes(chainName);
8
- };
9
- export const isChainSupported = (chainName) => {
10
- return ALLCHAINS.includes(chainName);
11
- };
12
- export const isTestnetChain = (chainName) => {
13
- return TESTNET_CHAINS.includes(chainName);
14
- };
@@ -1,25 +0,0 @@
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";
@@ -1,26 +0,0 @@
1
- export const eventTypes = {
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
- };
18
- export const TRIA_WALLET_STORE = "tria.wallet.store";
19
- export const TRIA_WALLET_SELECTED_CHAIN = "tria.wallet.selectedChain";
20
- export const storageKeys = {
21
- TRIA_WALLET_STORE: "tria.wallet.store",
22
- TRIA_WALLET_SELECTED_CHAIN: "tria.wallet.selectedChain",
23
- PERSIST_ROOT: "persist:root",
24
- };
25
- export const triaAuthUrl = "https://auth.tria.so";
26
- // export const PARENT_URL = document?.referrer || window?.parent?.[0]?.location?.ancestorOrigins?.[0];
package/dist/src/txn.d.ts DELETED
@@ -1,198 +0,0 @@
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
- 80001: string;
175
- 80002: string;
176
- 11155111: 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
- };
package/dist/src/txn.js DELETED
@@ -1,263 +0,0 @@
1
- import { bitlayerTestnet, bitlayerMainnet, neoxTestnet, polygonAmoy, sepolia, zkLink, zkLinkTestnet, vanarTestnet, } from "./chains";
2
- export const explorerBaseUrls = {
3
- ETH: "https://etherscan.io",
4
- [sepolia]: "https://sepolia.etherscan.io",
5
- POLYGON: "https://polygonscan.com",
6
- [polygonAmoy]: "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
- [zkLink]: "https://explorer.zklink.io",
26
- [zkLinkTestnet]: "https://goerli.explorer.zklink.io",
27
- [bitlayerTestnet]: "https://testnet-scan.bitlayer.org/en-us",
28
- [bitlayerMainnet]: "https://www.btrscan.com",
29
- [neoxTestnet]: "https://xt2scan.ngd.network",
30
- [vanarTestnet]: "https://explorer-vanguard.vanarchain.com",
31
- };
32
- export const txnBaseUrl = {
33
- ETH: `${explorerBaseUrls.ETH}/tx`, // /txHash
34
- [sepolia]: `${explorerBaseUrls[sepolia]}/tx`,
35
- POLYGON: `${explorerBaseUrls.POLYGON}/tx`,
36
- [polygonAmoy]: `${explorerBaseUrls[polygonAmoy]}/tx`,
37
- AVALANCHE: `${explorerBaseUrls.AVALANCHE}/tx`,
38
- ARBITRUM: `${explorerBaseUrls.ARBITRUM}/tx`,
39
- BINANCE: `${explorerBaseUrls.BINANCE}/tx`,
40
- OPTIMISM: `${explorerBaseUrls.OPTIMISM}/tx`,
41
- FANTOM: `${explorerBaseUrls.FANTOM}/tx`,
42
- FUSE: `${explorerBaseUrls.FUSE}/tx`,
43
- FUSESPARK: `${explorerBaseUrls.FUSESPARK}/tx`,
44
- MUMBAI: `${explorerBaseUrls.MUMBAI}/tx`,
45
- METIS: `${explorerBaseUrls.METIS}/tx`,
46
- "METIS-TESTNET": `${explorerBaseUrls["METIS-TESTNET"]}/tx`,
47
- MANTLE: `${explorerBaseUrls.MANTLE}/tx`,
48
- "MANTLE-TESTNET": `${explorerBaseUrls["MANTLE-TESTNET"]}/tx`,
49
- MANTA: `${explorerBaseUrls.MANTA}/tx`,
50
- "MANTA-TESTNET": `${explorerBaseUrls["MANTA-TESTNET"]}/tx`,
51
- [zkLink]: `${explorerBaseUrls[zkLink]}/tx`,
52
- [zkLinkTestnet]: `${explorerBaseUrls[zkLinkTestnet]}/tx`,
53
- [bitlayerTestnet]: `${explorerBaseUrls[bitlayerTestnet]}/tx`,
54
- [bitlayerMainnet]: `${explorerBaseUrls[bitlayerMainnet]}/tx`,
55
- [neoxTestnet]: `${explorerBaseUrls[neoxTestnet]}/tx`,
56
- [vanarTestnet]: `${explorerBaseUrls[vanarTestnet]}/tx`,
57
- };
58
- export const nativeTokenDetails = {
59
- ETH: {
60
- name: "Ether",
61
- symbol: "ETH",
62
- logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
63
- },
64
- [sepolia]: {
65
- name: "Ether",
66
- symbol: "ETH",
67
- logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
68
- },
69
- POLYGON: {
70
- name: "Matic Token",
71
- symbol: "MATIC",
72
- logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
73
- },
74
- [polygonAmoy]: {
75
- name: "Matic Token",
76
- symbol: "MATIC",
77
- logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
78
- },
79
- AVALANCHE: {
80
- name: "Avalanche Coin",
81
- symbol: "AVAX",
82
- logoUrl: "https://www.datocms-assets.com/86369/1686152997-avalanche-colour.png",
83
- },
84
- ARBITRUM: {
85
- name: "Arbitrum Mainnet Ether",
86
- symbol: "ETH",
87
- logoUrl: "https://www.datocms-assets.com/86369/1669925028-arbitrum.png",
88
- },
89
- BINANCE: {
90
- name: "Binance Coin",
91
- symbol: "BNB",
92
- logoUrl: "https://www.datocms-assets.com/86369/1670003837-biance-smart-chain-colour.png",
93
- },
94
- OPTIMISM: {
95
- name: "Ether",
96
- symbol: "ETH",
97
- logoUrl: "https://www.datocms-assets.com/86369/1670347461-optimisim-colour.png",
98
- },
99
- FANTOM: {
100
- name: "Fantom",
101
- symbol: "FTM",
102
- logoUrl: "https://www.datocms-assets.com/86369/1669925359-fantom-1.png",
103
- },
104
- FUSE: {
105
- name: "Fuse",
106
- symbol: "FUSE",
107
- logoUrl: "https://assets.coingecko.com/coins/images/10347/standard/fuse.png",
108
- },
109
- FUSESPARK: {
110
- name: "Spark",
111
- symbol: "SPARK",
112
- logoUrl: "https://assets.coingecko.com/coins/images/10347/standard/fuse.png",
113
- },
114
- MUMBAI: {
115
- name: "Matic Token",
116
- symbol: "MATIC",
117
- logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
118
- },
119
- METIS: {
120
- name: "Metis Token",
121
- symbol: "METIS",
122
- logoUrl: "https://static.tria.so/chain-logo-w/Metis.webp",
123
- },
124
- "METIS-TESTNET": {
125
- name: "Metis Token",
126
- symbol: "METIS",
127
- logoUrl: "https://static.tria.so/chain-logo-w/Metis.webp",
128
- },
129
- MANTLE: {
130
- name: "Mantle",
131
- symbol: "MNT",
132
- logoUrl: "https://static.tria.so/chain-logo-w/Mantle.webp",
133
- },
134
- "MANTLE-TESTNET": {
135
- name: "Mantle",
136
- symbol: "MNT",
137
- logoUrl: "https://static.tria.so/chain-logo-w/Mantle.webp",
138
- },
139
- MANTA: {
140
- name: "Ether",
141
- symbol: "ETH",
142
- logoUrl: "https://static.tria.so/chain-logo-w/Manta.webp",
143
- },
144
- "MANTA-TESTNET": {
145
- name: "Ether",
146
- symbol: "ETH",
147
- logoUrl: "https://static.tria.so/chain-logo-w/Manta.webp",
148
- },
149
- SOLANA: {
150
- name: "Solana",
151
- symbol: "SOL",
152
- logoUrl: "https://static.tria.so/chain-logo-w/Solana.webp",
153
- },
154
- [zkLink]: {
155
- name: "Ether",
156
- symbol: "ETH",
157
- logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
158
- },
159
- [zkLinkTestnet]: {
160
- name: "Ether",
161
- symbol: "ETH",
162
- logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
163
- },
164
- [bitlayerTestnet]: {
165
- name: "Bitcoin",
166
- symbol: "BTC",
167
- logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp",
168
- },
169
- [bitlayerMainnet]: {
170
- name: "Bitcoin",
171
- symbol: "BTC",
172
- logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp",
173
- },
174
- [neoxTestnet]: {
175
- name: "Gas",
176
- symbol: "GAS",
177
- logoUrl: "https://assets.coingecko.com/coins/images/858/standard/GAS_512_512.png?1696501992",
178
- },
179
- [vanarTestnet]: {
180
- name: "Vanry",
181
- symbol: "VG",
182
- logoUrl: "https://explorer-vanguard.vanarchain.com/assets/network_icon_dark.svg",
183
- },
184
- };
185
- const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
186
- export const rpcUrls = {
187
- MUMBAI: `https://polygon-mumbai.g.alchemy.com/v2/${alchemyKey}`, //'https://polygon-mumbai.blockpi.network/v1/rpc/public',
188
- [polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
189
- [sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
190
- ETH: "https://eth.llamarpc.com",
191
- POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
192
- AVALANCHE: "https://avalanche-c-chain.publicnode.com",
193
- ARBITRUM: "https://arbitrum-one.publicnode.com",
194
- BINANCE: "https://bsc.publicnode.com",
195
- OPTIMISM: "https://optimism.meowrpc.com",
196
- FANTOM: "https://fantom.publicnode.com",
197
- FUSE: "https://rpc.fuse.io",
198
- FUSESPARK: "https://rpc.fusespark.io",
199
- MANTA: "https://1rpc.io/manta",
200
- "MANTA-TESTNET": "https://manta-testnet.calderachain.xyz/http",
201
- METIS: "https://metis-pokt.nodies.app",
202
- "METIS-TESTNET": "https://goerli.gateway.metisdevops.link",
203
- MANTLE: "https://rpc.mantle.xyz",
204
- "MANTLE-TESTNET": "https://rpc.testnet.mantle.xyz",
205
- [zkLink]: "https://rpc.zklink.io",
206
- [zkLinkTestnet]: "https://goerli.rpc.zklink.io",
207
- [bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
208
- [bitlayerMainnet]: "https://rpc.bitlayer.org",
209
- [neoxTestnet]: "https://neoxseed1.ngd.network",
210
- [vanarTestnet]: "https://rpc-partners-vanguard.vanarchain.com", // "https://rpc-vanguard.vanarchain.com",
211
- };
212
- export const chainNameToChainId = {
213
- MUMBAI: 80001,
214
- [polygonAmoy]: 80002,
215
- [sepolia]: 11155111,
216
- POLYGON: 137,
217
- ETH: 1,
218
- AVALANCHE: 43114,
219
- ARBITRUM: 42161,
220
- BINANCE: 56,
221
- OPTIMISM: 10,
222
- FANTOM: 250,
223
- FUSE: 122,
224
- FUSESPARK: 123,
225
- MANTA: 169,
226
- "MANTA-TESTNET": 3441005,
227
- METIS: 1088,
228
- "METIS-TESTNET": 599,
229
- MANTLE: 5000,
230
- "MANTLE-TESTNET": 5001,
231
- [zkLink]: 810180,
232
- [zkLinkTestnet]: 810182,
233
- [bitlayerTestnet]: 200810,
234
- [bitlayerMainnet]: 200901,
235
- [neoxTestnet]: 12227330,
236
- [vanarTestnet]: 78600,
237
- };
238
- export const chainIdToChainName = {
239
- 80001: "MUMBAI",
240
- 80002: polygonAmoy,
241
- 11155111: sepolia,
242
- 137: "POLYGON",
243
- 1: "ETH",
244
- 43114: "AVALANCHE",
245
- 42161: "ARBITRUM",
246
- 56: "BINANCE",
247
- 10: "OPTIMISM",
248
- 250: "FANTOM",
249
- 122: "FUSE",
250
- 123: "FUSESPARK",
251
- 5000: "MANTLE",
252
- 5001: "MANTLE-TESTNET",
253
- 1088: "METIS",
254
- 599: "METIS-TESTNET",
255
- 169: "MANTA",
256
- 3441005: "MANTA-TESTNET",
257
- 810180: zkLink,
258
- 810182: zkLinkTestnet,
259
- 200810: bitlayerTestnet,
260
- 200901: bitlayerMainnet,
261
- 12227330: neoxTestnet,
262
- 78600: vanarTestnet,
263
- };