@tria-sdk/constants 1.0.17 → 1.0.19

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.
@@ -2,10 +2,14 @@ export declare const zkLink: string;
2
2
  export declare const zkLinkTestnet: string;
3
3
  export declare const bitlayerTestnet: string;
4
4
  export declare const neoxTestnet: string;
5
+ export declare const sepolia: string;
6
+ export declare const polygonAmoy: string;
5
7
  export type ZKLINK = "ZKLINK-NOVA";
6
8
  export type ZKLINK_TESTNET = "ZKLINK-NOVA-TESTNET";
7
9
  export type BITLAYER_TESTNET = "BITLAYER-TESTNET";
8
10
  export type NEOX_TESTNET = "NEOX-TESTNET";
11
+ export type SEPOLIA = "SEPOLIA";
12
+ export type AMOY = "AMOY";
9
13
  export declare const TESTNET_CHAINS: string[];
10
14
  export declare const SUPPORTED_EVM_CHAINS: string[];
11
15
  export declare const AA_SUPPORTED_EVM_CHAINS: string[];
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
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.neoxTestnet = exports.bitlayerTestnet = exports.zkLinkTestnet = exports.zkLink = void 0;
3
+ exports.chainNameToLogoBlack = exports.chainNameToLogo = exports.networks = exports.ALLCHAINS = exports.AA_SUPPORTED_EVM_CHAINS = exports.SUPPORTED_EVM_CHAINS = exports.TESTNET_CHAINS = exports.polygonAmoy = exports.sepolia = exports.neoxTestnet = exports.bitlayerTestnet = exports.zkLinkTestnet = exports.zkLink = void 0;
4
4
  exports.zkLink = "ZKLINK-NOVA";
5
5
  exports.zkLinkTestnet = "ZKLINK-NOVA-TESTNET";
6
6
  exports.bitlayerTestnet = "BITLAYER-TESTNET";
7
7
  exports.neoxTestnet = "NEOX-TESTNET";
8
+ exports.sepolia = "SEPOLIA";
9
+ exports.polygonAmoy = "AMOY";
8
10
  exports.TESTNET_CHAINS = [
9
11
  "MUMBAI",
10
12
  "FUSESPARK",
@@ -14,6 +16,8 @@ exports.TESTNET_CHAINS = [
14
16
  exports.zkLinkTestnet,
15
17
  exports.bitlayerTestnet,
16
18
  exports.neoxTestnet,
19
+ exports.sepolia,
20
+ exports.polygonAmoy,
17
21
  ];
18
22
  exports.SUPPORTED_EVM_CHAINS = [
19
23
  "ETH",
@@ -36,6 +40,8 @@ exports.SUPPORTED_EVM_CHAINS = [
36
40
  exports.zkLinkTestnet,
37
41
  exports.bitlayerTestnet,
38
42
  exports.neoxTestnet,
43
+ exports.sepolia,
44
+ exports.polygonAmoy,
39
45
  ];
40
46
  exports.AA_SUPPORTED_EVM_CHAINS = [
41
47
  // "ETH",
@@ -47,6 +53,7 @@ exports.AA_SUPPORTED_EVM_CHAINS = [
47
53
  "FUSE",
48
54
  "MUMBAI",
49
55
  // "MANTLE",
56
+ exports.sepolia,
50
57
  ];
51
58
  exports.ALLCHAINS = [
52
59
  "ETH",
@@ -70,6 +77,8 @@ exports.ALLCHAINS = [
70
77
  exports.zkLinkTestnet,
71
78
  exports.bitlayerTestnet,
72
79
  exports.neoxTestnet,
80
+ exports.sepolia,
81
+ exports.polygonAmoy,
73
82
  ];
74
83
  const baseLogoUrl = "https://static.tria.so/chain-logo-w";
75
84
  const baseLogoUrlBlack = "https://static.tria.so/chain-logo-b";
@@ -79,6 +88,11 @@ exports.networks = [
79
88
  logo: `${baseLogoUrl}/Ethereum.webp`,
80
89
  type: "mainnet",
81
90
  },
91
+ {
92
+ chainName: exports.sepolia,
93
+ logo: `${baseLogoUrl}/Ethereum.webp`,
94
+ type: "testnet",
95
+ },
82
96
  {
83
97
  chainName: "FANTOM",
84
98
  logo: `${baseLogoUrl}/Fantom.webp`,
@@ -89,6 +103,11 @@ exports.networks = [
89
103
  logo: `${baseLogoUrl}/Polygon.svg`,
90
104
  type: "mainnet",
91
105
  },
106
+ {
107
+ chainName: exports.polygonAmoy,
108
+ logo: `${baseLogoUrl}/Polygon.svg`,
109
+ type: "testnet",
110
+ },
92
111
  {
93
112
  chainName: "AVALANCHE",
94
113
  logo: `${baseLogoUrl}/Avalanche.webp`,
@@ -186,8 +205,10 @@ exports.networks = [
186
205
  ];
187
206
  exports.chainNameToLogo = {
188
207
  ETH: `${baseLogoUrl}/Ethereum.webp`,
208
+ [exports.sepolia]: `${baseLogoUrl}/Ethereum.webp`,
189
209
  FANTOM: `${baseLogoUrl}/Fantom.webp`,
190
210
  POLYGON: `${baseLogoUrl}/Polygon.webp`,
211
+ [exports.polygonAmoy]: `${baseLogoUrl}/Polygon.webp`,
191
212
  AVALANCHE: `${baseLogoUrl}/Avalanche.webp`,
192
213
  OPTIMISM: `${baseLogoUrl}/Optimism.webp`,
193
214
  ARBITRUM: `${baseLogoUrl}/Arbitrum.webp`,
@@ -210,9 +231,11 @@ exports.chainNameToLogo = {
210
231
  };
211
232
  exports.chainNameToLogoBlack = {
212
233
  ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
234
+ [exports.sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
213
235
  BINANCE: `${baseLogoUrlBlack}/binance.webp`,
214
236
  FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
215
237
  POLYGON: `${baseLogoUrlBlack}/Polygon.webp`,
238
+ [exports.polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
216
239
  AVALANCHE: `${baseLogoUrlBlack}/Avalanche.webp`,
217
240
  OPTIMISM: `${baseLogoUrlBlack}/Optimism.webp`,
218
241
  ARBITRUM: `${baseLogoUrlBlack}/Arbitrum.webp`,
package/dist/src/txn.d.ts CHANGED
@@ -172,6 +172,8 @@ export declare const chainNameToChainId: {
172
172
  };
173
173
  export declare const chainIdToChainName: {
174
174
  80001: string;
175
+ 80002: string;
176
+ 11155111: string;
175
177
  137: string;
176
178
  1: string;
177
179
  43114: string;
package/dist/src/txn.js CHANGED
@@ -4,7 +4,9 @@ exports.chainIdToChainName = exports.chainNameToChainId = exports.rpcUrls = expo
4
4
  const chains_1 = require("./chains");
5
5
  exports.explorerBaseUrls = {
6
6
  ETH: "https://etherscan.io",
7
+ [chains_1.sepolia]: "https://sepolia.etherscan.io",
7
8
  POLYGON: "https://polygonscan.com",
9
+ [chains_1.polygonAmoy]: "https://www.oklink.com/amoy",
8
10
  AVALANCHE: "https://snowtrace.io",
9
11
  ARBITRUM: "https://arbiscan.io",
10
12
  BINANCE: "https://bscscan.com",
@@ -30,7 +32,9 @@ exports.explorerBaseUrls = {
30
32
  };
31
33
  exports.txnBaseUrl = {
32
34
  ETH: `${exports.explorerBaseUrls.ETH}/tx`, // /txHash
35
+ [chains_1.sepolia]: `${exports.explorerBaseUrls[chains_1.sepolia]}/tx`,
33
36
  POLYGON: `${exports.explorerBaseUrls.POLYGON}/tx`,
37
+ [chains_1.polygonAmoy]: `${exports.explorerBaseUrls[chains_1.polygonAmoy]}/tx`,
34
38
  AVALANCHE: `${exports.explorerBaseUrls.AVALANCHE}/tx`,
35
39
  ARBITRUM: `${exports.explorerBaseUrls.ARBITRUM}/tx`,
36
40
  BINANCE: `${exports.explorerBaseUrls.BINANCE}/tx`,
@@ -56,11 +60,21 @@ exports.nativeTokenDetails = {
56
60
  symbol: "ETH",
57
61
  logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
58
62
  },
63
+ [chains_1.sepolia]: {
64
+ name: "Ether",
65
+ symbol: "ETH",
66
+ logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
67
+ },
59
68
  POLYGON: {
60
69
  name: "Matic Token",
61
70
  symbol: "MATIC",
62
71
  logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
63
72
  },
73
+ [chains_1.polygonAmoy]: {
74
+ name: "Matic Token",
75
+ symbol: "MATIC",
76
+ logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
77
+ },
64
78
  AVALANCHE: {
65
79
  name: "Avalanche Coin",
66
80
  symbol: "AVAX",
@@ -160,6 +174,8 @@ exports.nativeTokenDetails = {
160
174
  const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
161
175
  exports.rpcUrls = {
162
176
  MUMBAI: `https://polygon-mumbai.g.alchemy.com/v2/${alchemyKey}`, //'https://polygon-mumbai.blockpi.network/v1/rpc/public',
177
+ [chains_1.polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
178
+ [chains_1.sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
163
179
  ETH: "https://eth.llamarpc.com",
164
180
  POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
165
181
  AVALANCHE: "https://avalanche-c-chain.publicnode.com",
@@ -182,6 +198,8 @@ exports.rpcUrls = {
182
198
  };
183
199
  exports.chainNameToChainId = {
184
200
  MUMBAI: 80001,
201
+ [chains_1.polygonAmoy]: 80002,
202
+ [chains_1.sepolia]: 11155111,
185
203
  POLYGON: 137,
186
204
  ETH: 1,
187
205
  AVALANCHE: 43114,
@@ -204,6 +222,8 @@ exports.chainNameToChainId = {
204
222
  };
205
223
  exports.chainIdToChainName = {
206
224
  80001: "MUMBAI",
225
+ 80002: chains_1.polygonAmoy,
226
+ 11155111: chains_1.sepolia,
207
227
  137: "POLYGON",
208
228
  1: "ETH",
209
229
  43114: "AVALANCHE",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tria-sdk/constants",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/chains.ts CHANGED
@@ -2,11 +2,15 @@ export const zkLink: string = "ZKLINK-NOVA";
2
2
  export const zkLinkTestnet: string = "ZKLINK-NOVA-TESTNET";
3
3
  export const bitlayerTestnet: string = "BITLAYER-TESTNET";
4
4
  export const neoxTestnet: string = "NEOX-TESTNET";
5
+ export const sepolia: string = "SEPOLIA";
6
+ export const polygonAmoy: string = "AMOY";
5
7
 
6
8
  export type ZKLINK = "ZKLINK-NOVA";
7
9
  export type ZKLINK_TESTNET = "ZKLINK-NOVA-TESTNET";
8
10
  export type BITLAYER_TESTNET = "BITLAYER-TESTNET";
9
11
  export type NEOX_TESTNET = "NEOX-TESTNET";
12
+ export type SEPOLIA = "SEPOLIA";
13
+ export type AMOY = "AMOY";
10
14
 
11
15
  export const TESTNET_CHAINS = [
12
16
  "MUMBAI",
@@ -17,6 +21,8 @@ export const TESTNET_CHAINS = [
17
21
  zkLinkTestnet,
18
22
  bitlayerTestnet,
19
23
  neoxTestnet,
24
+ sepolia,
25
+ polygonAmoy,
20
26
  ];
21
27
 
22
28
  export const SUPPORTED_EVM_CHAINS = [
@@ -40,6 +46,8 @@ export const SUPPORTED_EVM_CHAINS = [
40
46
  zkLinkTestnet,
41
47
  bitlayerTestnet,
42
48
  neoxTestnet,
49
+ sepolia,
50
+ polygonAmoy,
43
51
  ];
44
52
 
45
53
  export const AA_SUPPORTED_EVM_CHAINS = [
@@ -52,6 +60,7 @@ export const AA_SUPPORTED_EVM_CHAINS = [
52
60
  "FUSE",
53
61
  "MUMBAI",
54
62
  // "MANTLE",
63
+ sepolia,
55
64
  ];
56
65
 
57
66
  export const ALLCHAINS = [
@@ -76,6 +85,8 @@ export const ALLCHAINS = [
76
85
  zkLinkTestnet,
77
86
  bitlayerTestnet,
78
87
  neoxTestnet,
88
+ sepolia,
89
+ polygonAmoy,
79
90
  ];
80
91
 
81
92
  const baseLogoUrl = "https://static.tria.so/chain-logo-w";
@@ -87,6 +98,11 @@ export const networks = [
87
98
  logo: `${baseLogoUrl}/Ethereum.webp`,
88
99
  type: "mainnet",
89
100
  },
101
+ {
102
+ chainName: sepolia,
103
+ logo: `${baseLogoUrl}/Ethereum.webp`,
104
+ type: "testnet",
105
+ },
90
106
  {
91
107
  chainName: "FANTOM",
92
108
  logo: `${baseLogoUrl}/Fantom.webp`,
@@ -97,6 +113,11 @@ export const networks = [
97
113
  logo: `${baseLogoUrl}/Polygon.svg`,
98
114
  type: "mainnet",
99
115
  },
116
+ {
117
+ chainName: polygonAmoy,
118
+ logo: `${baseLogoUrl}/Polygon.svg`,
119
+ type: "testnet",
120
+ },
100
121
  {
101
122
  chainName: "AVALANCHE",
102
123
  logo: `${baseLogoUrl}/Avalanche.webp`,
@@ -195,8 +216,10 @@ export const networks = [
195
216
 
196
217
  export const chainNameToLogo = {
197
218
  ETH: `${baseLogoUrl}/Ethereum.webp`,
219
+ [sepolia]: `${baseLogoUrl}/Ethereum.webp`,
198
220
  FANTOM: `${baseLogoUrl}/Fantom.webp`,
199
221
  POLYGON: `${baseLogoUrl}/Polygon.webp`,
222
+ [polygonAmoy]: `${baseLogoUrl}/Polygon.webp`,
200
223
  AVALANCHE: `${baseLogoUrl}/Avalanche.webp`,
201
224
  OPTIMISM: `${baseLogoUrl}/Optimism.webp`,
202
225
  ARBITRUM: `${baseLogoUrl}/Arbitrum.webp`,
@@ -220,9 +243,11 @@ export const chainNameToLogo = {
220
243
 
221
244
  export const chainNameToLogoBlack = {
222
245
  ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
246
+ [sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
223
247
  BINANCE: `${baseLogoUrlBlack}/binance.webp`,
224
248
  FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
225
249
  POLYGON: `${baseLogoUrlBlack}/Polygon.webp`,
250
+ [polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
226
251
  AVALANCHE: `${baseLogoUrlBlack}/Avalanche.webp`,
227
252
  OPTIMISM: `${baseLogoUrlBlack}/Optimism.webp`,
228
253
  ARBITRUM: `${baseLogoUrlBlack}/Arbitrum.webp`,
package/src/txn.ts CHANGED
@@ -1,8 +1,17 @@
1
- import { bitlayerTestnet, neoxTestnet, zkLink, zkLinkTestnet } from "./chains";
1
+ import {
2
+ bitlayerTestnet,
3
+ neoxTestnet,
4
+ polygonAmoy,
5
+ sepolia,
6
+ zkLink,
7
+ zkLinkTestnet,
8
+ } from "./chains";
2
9
 
3
10
  export const explorerBaseUrls = {
4
11
  ETH: "https://etherscan.io",
12
+ [sepolia]: "https://sepolia.etherscan.io",
5
13
  POLYGON: "https://polygonscan.com",
14
+ [polygonAmoy]: "https://www.oklink.com/amoy",
6
15
  AVALANCHE: "https://snowtrace.io",
7
16
  ARBITRUM: "https://arbiscan.io",
8
17
  BINANCE: "https://bscscan.com",
@@ -29,7 +38,9 @@ export const explorerBaseUrls = {
29
38
 
30
39
  export const txnBaseUrl = {
31
40
  ETH: `${explorerBaseUrls.ETH}/tx`, // /txHash
41
+ [sepolia]: `${explorerBaseUrls[sepolia]}/tx`,
32
42
  POLYGON: `${explorerBaseUrls.POLYGON}/tx`,
43
+ [polygonAmoy]: `${explorerBaseUrls[polygonAmoy]}/tx`,
33
44
  AVALANCHE: `${explorerBaseUrls.AVALANCHE}/tx`,
34
45
  ARBITRUM: `${explorerBaseUrls.ARBITRUM}/tx`,
35
46
  BINANCE: `${explorerBaseUrls.BINANCE}/tx`,
@@ -56,12 +67,23 @@ export const nativeTokenDetails = {
56
67
  symbol: "ETH",
57
68
  logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
58
69
  },
70
+ [sepolia]: {
71
+ name: "Ether",
72
+ symbol: "ETH",
73
+ logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
74
+ },
59
75
  POLYGON: {
60
76
  name: "Matic Token",
61
77
  symbol: "MATIC",
62
78
  logoUrl:
63
79
  "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
64
80
  },
81
+ [polygonAmoy]: {
82
+ name: "Matic Token",
83
+ symbol: "MATIC",
84
+ logoUrl:
85
+ "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
86
+ },
65
87
  AVALANCHE: {
66
88
  name: "Avalanche Coin",
67
89
  symbol: "AVAX",
@@ -170,6 +192,8 @@ const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
170
192
 
171
193
  export const rpcUrls = {
172
194
  MUMBAI: `https://polygon-mumbai.g.alchemy.com/v2/${alchemyKey}`, //'https://polygon-mumbai.blockpi.network/v1/rpc/public',
195
+ [polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
196
+ [sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
173
197
  ETH: "https://eth.llamarpc.com",
174
198
  POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
175
199
  AVALANCHE: "https://avalanche-c-chain.publicnode.com",
@@ -193,6 +217,8 @@ export const rpcUrls = {
193
217
 
194
218
  export const chainNameToChainId = {
195
219
  MUMBAI: 80001,
220
+ [polygonAmoy]: 80002,
221
+ [sepolia]: 11155111,
196
222
  POLYGON: 137,
197
223
  ETH: 1,
198
224
  AVALANCHE: 43114,
@@ -216,6 +242,8 @@ export const chainNameToChainId = {
216
242
 
217
243
  export const chainIdToChainName = {
218
244
  80001: "MUMBAI",
245
+ 80002: polygonAmoy,
246
+ 11155111: sepolia,
219
247
  137: "POLYGON",
220
248
  1: "ETH",
221
249
  43114: "AVALANCHE",