@tria-sdk/constants 1.0.18 → 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.
package/dist/index.js CHANGED
@@ -1,4 +1,20 @@
1
- export * from "./src/config";
2
- export * from "./src/chains";
3
- export * from "./src/txn";
4
- export * from "./src/connect";
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./src/config"), exports);
18
+ __exportStar(require("./src/chains"), exports);
19
+ __exportStar(require("./src/txn"), exports);
20
+ __exportStar(require("./src/connect"), exports);
@@ -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,18 +1,25 @@
1
- export const zkLink = "ZKLINK-NOVA";
2
- export const zkLinkTestnet = "ZKLINK-NOVA-TESTNET";
3
- export const bitlayerTestnet = "BITLAYER-TESTNET";
4
- export const neoxTestnet = "NEOX-TESTNET";
5
- export const TESTNET_CHAINS = [
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.chainNameToLogoBlack = exports.chainNameToLogo = exports.networks = exports.ALLCHAINS = exports.AA_SUPPORTED_EVM_CHAINS = exports.SUPPORTED_EVM_CHAINS = exports.TESTNET_CHAINS = exports.polygonAmoy = exports.sepolia = exports.neoxTestnet = exports.bitlayerTestnet = exports.zkLinkTestnet = exports.zkLink = void 0;
4
+ exports.zkLink = "ZKLINK-NOVA";
5
+ exports.zkLinkTestnet = "ZKLINK-NOVA-TESTNET";
6
+ exports.bitlayerTestnet = "BITLAYER-TESTNET";
7
+ exports.neoxTestnet = "NEOX-TESTNET";
8
+ exports.sepolia = "SEPOLIA";
9
+ exports.polygonAmoy = "AMOY";
10
+ exports.TESTNET_CHAINS = [
6
11
  "MUMBAI",
7
12
  "FUSESPARK",
8
13
  "MANTA-TESTNET",
9
14
  "METIS-TESTNET",
10
15
  "MANTLE-TESTNET",
11
- zkLinkTestnet,
12
- bitlayerTestnet,
13
- neoxTestnet,
16
+ exports.zkLinkTestnet,
17
+ exports.bitlayerTestnet,
18
+ exports.neoxTestnet,
19
+ exports.sepolia,
20
+ exports.polygonAmoy,
14
21
  ];
15
- export const SUPPORTED_EVM_CHAINS = [
22
+ exports.SUPPORTED_EVM_CHAINS = [
16
23
  "ETH",
17
24
  "POLYGON",
18
25
  "AVALANCHE",
@@ -29,12 +36,14 @@ export const SUPPORTED_EVM_CHAINS = [
29
36
  "METIS-TESTNET",
30
37
  "MANTLE",
31
38
  "MANTLE-TESTNET",
32
- zkLink,
33
- zkLinkTestnet,
34
- bitlayerTestnet,
35
- neoxTestnet,
39
+ exports.zkLink,
40
+ exports.zkLinkTestnet,
41
+ exports.bitlayerTestnet,
42
+ exports.neoxTestnet,
43
+ exports.sepolia,
44
+ exports.polygonAmoy,
36
45
  ];
37
- export const AA_SUPPORTED_EVM_CHAINS = [
46
+ exports.AA_SUPPORTED_EVM_CHAINS = [
38
47
  // "ETH",
39
48
  "POLYGON",
40
49
  // "AVALANCHE",
@@ -44,8 +53,9 @@ export const AA_SUPPORTED_EVM_CHAINS = [
44
53
  "FUSE",
45
54
  "MUMBAI",
46
55
  // "MANTLE",
56
+ exports.sepolia,
47
57
  ];
48
- export const ALLCHAINS = [
58
+ exports.ALLCHAINS = [
49
59
  "ETH",
50
60
  "POLYGON",
51
61
  "AVALANCHE",
@@ -63,19 +73,26 @@ export const ALLCHAINS = [
63
73
  "MANTLE",
64
74
  "MANTLE-TESTNET",
65
75
  "SOLANA",
66
- zkLink,
67
- zkLinkTestnet,
68
- bitlayerTestnet,
69
- neoxTestnet,
76
+ exports.zkLink,
77
+ exports.zkLinkTestnet,
78
+ exports.bitlayerTestnet,
79
+ exports.neoxTestnet,
80
+ exports.sepolia,
81
+ exports.polygonAmoy,
70
82
  ];
71
83
  const baseLogoUrl = "https://static.tria.so/chain-logo-w";
72
84
  const baseLogoUrlBlack = "https://static.tria.so/chain-logo-b";
73
- export const networks = [
85
+ exports.networks = [
74
86
  {
75
87
  chainName: "ETH",
76
88
  logo: `${baseLogoUrl}/Ethereum.webp`,
77
89
  type: "mainnet",
78
90
  },
91
+ {
92
+ chainName: exports.sepolia,
93
+ logo: `${baseLogoUrl}/Ethereum.webp`,
94
+ type: "testnet",
95
+ },
79
96
  {
80
97
  chainName: "FANTOM",
81
98
  logo: `${baseLogoUrl}/Fantom.webp`,
@@ -86,6 +103,11 @@ export const networks = [
86
103
  logo: `${baseLogoUrl}/Polygon.svg`,
87
104
  type: "mainnet",
88
105
  },
106
+ {
107
+ chainName: exports.polygonAmoy,
108
+ logo: `${baseLogoUrl}/Polygon.svg`,
109
+ type: "testnet",
110
+ },
89
111
  {
90
112
  chainName: "AVALANCHE",
91
113
  logo: `${baseLogoUrl}/Avalanche.webp`,
@@ -161,30 +183,32 @@ export const networks = [
161
183
  type: "mainnet",
162
184
  },
163
185
  {
164
- chainName: zkLink,
186
+ chainName: exports.zkLink,
165
187
  logo: `${baseLogoUrl}/zklink.webp`,
166
188
  type: "mainnet",
167
189
  },
168
190
  {
169
- chainName: zkLinkTestnet,
191
+ chainName: exports.zkLinkTestnet,
170
192
  logo: `${baseLogoUrl}/zklink.webp`,
171
193
  type: "testnet",
172
194
  },
173
195
  {
174
- chainName: bitlayerTestnet,
196
+ chainName: exports.bitlayerTestnet,
175
197
  logo: `${baseLogoUrl}/bitlayer.webp`,
176
198
  type: "testnet",
177
199
  },
178
200
  {
179
- chainName: neoxTestnet,
201
+ chainName: exports.neoxTestnet,
180
202
  logo: `${baseLogoUrl}/neox.webp`,
181
203
  type: "testnet",
182
204
  },
183
205
  ];
184
- export const chainNameToLogo = {
206
+ exports.chainNameToLogo = {
185
207
  ETH: `${baseLogoUrl}/Ethereum.webp`,
208
+ [exports.sepolia]: `${baseLogoUrl}/Ethereum.webp`,
186
209
  FANTOM: `${baseLogoUrl}/Fantom.webp`,
187
210
  POLYGON: `${baseLogoUrl}/Polygon.webp`,
211
+ [exports.polygonAmoy]: `${baseLogoUrl}/Polygon.webp`,
188
212
  AVALANCHE: `${baseLogoUrl}/Avalanche.webp`,
189
213
  OPTIMISM: `${baseLogoUrl}/Optimism.webp`,
190
214
  ARBITRUM: `${baseLogoUrl}/Arbitrum.webp`,
@@ -200,16 +224,18 @@ export const chainNameToLogo = {
200
224
  MANTLE: `${baseLogoUrl}/Mantle.webp`,
201
225
  "MANTLE-TESTNET": `${baseLogoUrl}/Mantle.webp`,
202
226
  SOLANA: `${baseLogoUrl}/Solana.webp`,
203
- [zkLink]: `${baseLogoUrl}/zklink.webp`,
204
- [zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
205
- [bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
206
- [neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
227
+ [exports.zkLink]: `${baseLogoUrl}/zklink.webp`,
228
+ [exports.zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
229
+ [exports.bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
230
+ [exports.neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
207
231
  };
208
- export const chainNameToLogoBlack = {
232
+ exports.chainNameToLogoBlack = {
209
233
  ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
234
+ [exports.sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
210
235
  BINANCE: `${baseLogoUrlBlack}/binance.webp`,
211
236
  FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
212
237
  POLYGON: `${baseLogoUrlBlack}/Polygon.webp`,
238
+ [exports.polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
213
239
  AVALANCHE: `${baseLogoUrlBlack}/Avalanche.webp`,
214
240
  OPTIMISM: `${baseLogoUrlBlack}/Optimism.webp`,
215
241
  ARBITRUM: `${baseLogoUrlBlack}/Arbitrum.webp`,
@@ -224,8 +250,8 @@ export const chainNameToLogoBlack = {
224
250
  MANTLE: `${baseLogoUrlBlack}/Mantle.webp`,
225
251
  "MANTLE-TESTNET": `${baseLogoUrlBlack}/Mantle.webp`,
226
252
  SOLANA: `${baseLogoUrlBlack}/Solana.webp`,
227
- [zkLink]: `${baseLogoUrlBlack}/zklink.webp`,
228
- [zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
229
- [bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
230
- [neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
253
+ [exports.zkLink]: `${baseLogoUrlBlack}/zklink.webp`,
254
+ [exports.zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
255
+ [exports.bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
256
+ [exports.neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
231
257
  };
@@ -1,14 +1,21 @@
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);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isTestnetChain = exports.isChainSupported = exports.isAaSupportedChain = exports.isEvmChain = exports.prodApiUrl = void 0;
4
+ const chains_1 = require("./chains");
5
+ exports.prodApiUrl = "https://prod.tria.so";
6
+ const isEvmChain = (chainName) => {
7
+ return chains_1.SUPPORTED_EVM_CHAINS.includes(chainName);
5
8
  };
6
- export const isAaSupportedChain = (chainName) => {
7
- return AA_SUPPORTED_EVM_CHAINS.includes(chainName);
9
+ exports.isEvmChain = isEvmChain;
10
+ const isAaSupportedChain = (chainName) => {
11
+ return chains_1.AA_SUPPORTED_EVM_CHAINS.includes(chainName);
8
12
  };
9
- export const isChainSupported = (chainName) => {
10
- return ALLCHAINS.includes(chainName);
13
+ exports.isAaSupportedChain = isAaSupportedChain;
14
+ const isChainSupported = (chainName) => {
15
+ return chains_1.ALLCHAINS.includes(chainName);
11
16
  };
12
- export const isTestnetChain = (chainName) => {
13
- return TESTNET_CHAINS.includes(chainName);
17
+ exports.isChainSupported = isChainSupported;
18
+ const isTestnetChain = (chainName) => {
19
+ return chains_1.TESTNET_CHAINS.includes(chainName);
14
20
  };
21
+ exports.isTestnetChain = isTestnetChain;
@@ -1,4 +1,7 @@
1
- export const eventTypes = {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.triaAuthUrl = exports.storageKeys = exports.TRIA_WALLET_SELECTED_CHAIN = exports.TRIA_WALLET_STORE = exports.eventTypes = void 0;
4
+ exports.eventTypes = {
2
5
  logIn: "Log in",
3
6
  triaSignUp: "Tria Sign up",
4
7
  emailPwSignUp: "Email Pwd Sign up",
@@ -15,12 +18,12 @@ export const eventTypes = {
15
18
  saveToAuth: "Save to Auth Iframe",
16
19
  triaStoreSet: "triaStoreSet",
17
20
  };
18
- export const TRIA_WALLET_STORE = "tria.wallet.store";
19
- export const TRIA_WALLET_SELECTED_CHAIN = "tria.wallet.selectedChain";
20
- export const storageKeys = {
21
+ exports.TRIA_WALLET_STORE = "tria.wallet.store";
22
+ exports.TRIA_WALLET_SELECTED_CHAIN = "tria.wallet.selectedChain";
23
+ exports.storageKeys = {
21
24
  TRIA_WALLET_STORE: "tria.wallet.store",
22
25
  TRIA_WALLET_SELECTED_CHAIN: "tria.wallet.selectedChain",
23
26
  PERSIST_ROOT: "persist:root",
24
27
  };
25
- export const triaAuthUrl = "https://auth.tria.so";
28
+ exports.triaAuthUrl = "https://auth.tria.so";
26
29
  // export const PARENT_URL = document?.referrer || window?.parent?.[0]?.location?.ancestorOrigins?.[0];
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
@@ -1,7 +1,12 @@
1
- import { bitlayerTestnet, neoxTestnet, zkLink, zkLinkTestnet } from "./chains";
2
- export const explorerBaseUrls = {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.chainIdToChainName = exports.chainNameToChainId = exports.rpcUrls = exports.nativeTokenDetails = exports.txnBaseUrl = exports.explorerBaseUrls = void 0;
4
+ const chains_1 = require("./chains");
5
+ exports.explorerBaseUrls = {
3
6
  ETH: "https://etherscan.io",
7
+ [chains_1.sepolia]: "https://sepolia.etherscan.io",
4
8
  POLYGON: "https://polygonscan.com",
9
+ [chains_1.polygonAmoy]: "https://www.oklink.com/amoy",
5
10
  AVALANCHE: "https://snowtrace.io",
6
11
  ARBITRUM: "https://arbiscan.io",
7
12
  BINANCE: "https://bscscan.com",
@@ -20,44 +25,56 @@ export const explorerBaseUrls = {
20
25
  "MANTLE-TESTNET": "https://explorer.testnet.mantle.xyz",
21
26
  MANTA: "https://pacific-explorer.manta.network",
22
27
  "MANTA-TESTNET": "https://manta-testnet.calderaexplorer.xyz",
23
- [zkLink]: "https://explorer.zklink.io",
24
- [zkLinkTestnet]: "https://goerli.explorer.zklink.io",
25
- [bitlayerTestnet]: "https://testnet-scan.bitlayer.org/en-us",
26
- [neoxTestnet]: "https://xt2scan.ngd.network",
28
+ [chains_1.zkLink]: "https://explorer.zklink.io",
29
+ [chains_1.zkLinkTestnet]: "https://goerli.explorer.zklink.io",
30
+ [chains_1.bitlayerTestnet]: "https://testnet-scan.bitlayer.org/en-us",
31
+ [chains_1.neoxTestnet]: "https://xt2scan.ngd.network",
27
32
  };
28
- export const txnBaseUrl = {
29
- ETH: `${explorerBaseUrls.ETH}/tx`, // /txHash
30
- POLYGON: `${explorerBaseUrls.POLYGON}/tx`,
31
- AVALANCHE: `${explorerBaseUrls.AVALANCHE}/tx`,
32
- ARBITRUM: `${explorerBaseUrls.ARBITRUM}/tx`,
33
- BINANCE: `${explorerBaseUrls.BINANCE}/tx`,
34
- OPTIMISM: `${explorerBaseUrls.OPTIMISM}/tx`,
35
- FANTOM: `${explorerBaseUrls.FANTOM}/tx`,
36
- FUSE: `${explorerBaseUrls.FUSE}/tx`,
37
- FUSESPARK: `${explorerBaseUrls.FUSESPARK}/tx`,
38
- MUMBAI: `${explorerBaseUrls.MUMBAI}/tx`,
39
- METIS: `${explorerBaseUrls.METIS}/tx`,
40
- "METIS-TESTNET": `${explorerBaseUrls["METIS-TESTNET"]}/tx`,
41
- MANTLE: `${explorerBaseUrls.MANTLE}/tx`,
42
- "MANTLE-TESTNET": `${explorerBaseUrls["MANTLE-TESTNET"]}/tx`,
43
- MANTA: `${explorerBaseUrls.MANTA}/tx`,
44
- "MANTA-TESTNET": `${explorerBaseUrls["MANTA-TESTNET"]}/tx`,
45
- [zkLink]: `${explorerBaseUrls[zkLink]}/tx`,
46
- [zkLinkTestnet]: `${explorerBaseUrls[zkLinkTestnet]}/tx`,
47
- [bitlayerTestnet]: `${explorerBaseUrls[bitlayerTestnet]}/tx`,
48
- [neoxTestnet]: `${explorerBaseUrls[neoxTestnet]}/tx`,
33
+ exports.txnBaseUrl = {
34
+ ETH: `${exports.explorerBaseUrls.ETH}/tx`, // /txHash
35
+ [chains_1.sepolia]: `${exports.explorerBaseUrls[chains_1.sepolia]}/tx`,
36
+ POLYGON: `${exports.explorerBaseUrls.POLYGON}/tx`,
37
+ [chains_1.polygonAmoy]: `${exports.explorerBaseUrls[chains_1.polygonAmoy]}/tx`,
38
+ AVALANCHE: `${exports.explorerBaseUrls.AVALANCHE}/tx`,
39
+ ARBITRUM: `${exports.explorerBaseUrls.ARBITRUM}/tx`,
40
+ BINANCE: `${exports.explorerBaseUrls.BINANCE}/tx`,
41
+ OPTIMISM: `${exports.explorerBaseUrls.OPTIMISM}/tx`,
42
+ FANTOM: `${exports.explorerBaseUrls.FANTOM}/tx`,
43
+ FUSE: `${exports.explorerBaseUrls.FUSE}/tx`,
44
+ FUSESPARK: `${exports.explorerBaseUrls.FUSESPARK}/tx`,
45
+ MUMBAI: `${exports.explorerBaseUrls.MUMBAI}/tx`,
46
+ METIS: `${exports.explorerBaseUrls.METIS}/tx`,
47
+ "METIS-TESTNET": `${exports.explorerBaseUrls["METIS-TESTNET"]}/tx`,
48
+ MANTLE: `${exports.explorerBaseUrls.MANTLE}/tx`,
49
+ "MANTLE-TESTNET": `${exports.explorerBaseUrls["MANTLE-TESTNET"]}/tx`,
50
+ MANTA: `${exports.explorerBaseUrls.MANTA}/tx`,
51
+ "MANTA-TESTNET": `${exports.explorerBaseUrls["MANTA-TESTNET"]}/tx`,
52
+ [chains_1.zkLink]: `${exports.explorerBaseUrls[chains_1.zkLink]}/tx`,
53
+ [chains_1.zkLinkTestnet]: `${exports.explorerBaseUrls[chains_1.zkLinkTestnet]}/tx`,
54
+ [chains_1.bitlayerTestnet]: `${exports.explorerBaseUrls[chains_1.bitlayerTestnet]}/tx`,
55
+ [chains_1.neoxTestnet]: `${exports.explorerBaseUrls[chains_1.neoxTestnet]}/tx`,
49
56
  };
50
- export const nativeTokenDetails = {
57
+ exports.nativeTokenDetails = {
51
58
  ETH: {
52
59
  name: "Ether",
53
60
  symbol: "ETH",
54
61
  logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
55
62
  },
63
+ [chains_1.sepolia]: {
64
+ name: "Ether",
65
+ symbol: "ETH",
66
+ logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
67
+ },
56
68
  POLYGON: {
57
69
  name: "Matic Token",
58
70
  symbol: "MATIC",
59
71
  logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
60
72
  },
73
+ [chains_1.polygonAmoy]: {
74
+ name: "Matic Token",
75
+ symbol: "MATIC",
76
+ logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
77
+ },
61
78
  AVALANCHE: {
62
79
  name: "Avalanche Coin",
63
80
  symbol: "AVAX",
@@ -133,30 +150,32 @@ export const nativeTokenDetails = {
133
150
  symbol: "SOL",
134
151
  logoUrl: "https://static.tria.so/chain-logo-w/Solana.webp",
135
152
  },
136
- [zkLink]: {
153
+ [chains_1.zkLink]: {
137
154
  name: "Ether",
138
155
  symbol: "ETH",
139
156
  logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
140
157
  },
141
- [zkLinkTestnet]: {
158
+ [chains_1.zkLinkTestnet]: {
142
159
  name: "Ether",
143
160
  symbol: "ETH",
144
161
  logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
145
162
  },
146
- [bitlayerTestnet]: {
163
+ [chains_1.bitlayerTestnet]: {
147
164
  name: "Bitcoin",
148
165
  symbol: "BTC",
149
166
  logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp",
150
167
  },
151
- [neoxTestnet]: {
168
+ [chains_1.neoxTestnet]: {
152
169
  name: "Gas",
153
170
  symbol: "GAS",
154
171
  logoUrl: "https://assets.coingecko.com/coins/images/858/standard/GAS_512_512.png?1696501992",
155
172
  },
156
173
  };
157
174
  const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
158
- export const rpcUrls = {
175
+ exports.rpcUrls = {
159
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}`,
160
179
  ETH: "https://eth.llamarpc.com",
161
180
  POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
162
181
  AVALANCHE: "https://avalanche-c-chain.publicnode.com",
@@ -172,13 +191,15 @@ export const rpcUrls = {
172
191
  "METIS-TESTNET": "https://goerli.gateway.metisdevops.link",
173
192
  MANTLE: "https://rpc.mantle.xyz",
174
193
  "MANTLE-TESTNET": "https://rpc.testnet.mantle.xyz",
175
- [zkLink]: "https://rpc.zklink.io",
176
- [zkLinkTestnet]: "https://goerli.rpc.zklink.io",
177
- [bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
178
- [neoxTestnet]: "https://neoxseed1.ngd.network",
194
+ [chains_1.zkLink]: "https://rpc.zklink.io",
195
+ [chains_1.zkLinkTestnet]: "https://goerli.rpc.zklink.io",
196
+ [chains_1.bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
197
+ [chains_1.neoxTestnet]: "https://neoxseed1.ngd.network",
179
198
  };
180
- export const chainNameToChainId = {
199
+ exports.chainNameToChainId = {
181
200
  MUMBAI: 80001,
201
+ [chains_1.polygonAmoy]: 80002,
202
+ [chains_1.sepolia]: 11155111,
182
203
  POLYGON: 137,
183
204
  ETH: 1,
184
205
  AVALANCHE: 43114,
@@ -194,13 +215,15 @@ export const chainNameToChainId = {
194
215
  "METIS-TESTNET": 599,
195
216
  MANTLE: 5000,
196
217
  "MANTLE-TESTNET": 5001,
197
- [zkLink]: 810180,
198
- [zkLinkTestnet]: 810182,
199
- [bitlayerTestnet]: 200810,
200
- [neoxTestnet]: 12227330,
218
+ [chains_1.zkLink]: 810180,
219
+ [chains_1.zkLinkTestnet]: 810182,
220
+ [chains_1.bitlayerTestnet]: 200810,
221
+ [chains_1.neoxTestnet]: 12227330,
201
222
  };
202
- export const chainIdToChainName = {
223
+ exports.chainIdToChainName = {
203
224
  80001: "MUMBAI",
225
+ 80002: chains_1.polygonAmoy,
226
+ 11155111: chains_1.sepolia,
204
227
  137: "POLYGON",
205
228
  1: "ETH",
206
229
  43114: "AVALANCHE",
@@ -216,8 +239,8 @@ export const chainIdToChainName = {
216
239
  599: "METIS-TESTNET",
217
240
  169: "MANTA",
218
241
  3441005: "MANTA-TESTNET",
219
- 810180: zkLink,
220
- 810182: zkLinkTestnet,
221
- 200810: bitlayerTestnet,
222
- 12227330: neoxTestnet,
242
+ 810180: chains_1.zkLink,
243
+ 810182: chains_1.zkLinkTestnet,
244
+ 200810: chains_1.bitlayerTestnet,
245
+ 12227330: chains_1.neoxTestnet,
223
246
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tria-sdk/constants",
3
- "version": "1.0.18",
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",
package/tsconfig.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ES6",
4
- "module": "ES6", // "CommonJS",
4
+ "module": "CommonJS", // "CommonJS",
5
5
  "lib": ["ES2022"],
6
6
  "skipLibCheck": true,
7
7
  "strict": true,