@tria-sdk/constants 1.0.27 → 1.0.28

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,21 @@
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);
21
+ // export * from "./src/gasToken";
@@ -19,6 +19,7 @@ export type AMOY = "AMOY";
19
19
  export type VANGUARD_VANAR_TESTNET = "VANGUARD-VANAR-TESTNET";
20
20
  export declare const TESTNET_CHAINS: string[];
21
21
  export declare const SUPPORTED_EVM_CHAINS: string[];
22
+ export declare const GAS_ABS_ENABLED_CHAINS: string[];
22
23
  export declare const AA_SUPPORTED_EVM_CHAINS: string[];
23
24
  export declare const ALLCHAINS: string[];
24
25
  export declare const networks: {
@@ -1,29 +1,33 @@
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 neoxTestnet = "NEOX-TESTNET";
10
- export const sepolia = "SEPOLIA";
11
- export const polygonAmoy = "AMOY";
12
- export const vanarTestnet = "VANGUARD-VANAR-TESTNET";
13
- 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.GAS_ABS_ENABLED_CHAINS = exports.SUPPORTED_EVM_CHAINS = exports.TESTNET_CHAINS = exports.vanarTestnet = exports.polygonAmoy = exports.sepolia = exports.neoxTestnet = exports.bitlayerTestnet = exports.zkLinkTestnet = exports.zkLink = exports.fuseSpark = exports.fuse = exports.ethereum = exports.polygon = exports.mumbai = void 0;
4
+ exports.mumbai = "MUMBAI";
5
+ exports.polygon = "POLYGON";
6
+ exports.ethereum = "ETH";
7
+ exports.fuse = "FUSE";
8
+ exports.fuseSpark = "FUSESPARK";
9
+ exports.zkLink = "ZKLINK-NOVA";
10
+ exports.zkLinkTestnet = "ZKLINK-NOVA-TESTNET";
11
+ exports.bitlayerTestnet = "BITLAYER-TESTNET";
12
+ exports.neoxTestnet = "NEOX-TESTNET";
13
+ exports.sepolia = "SEPOLIA";
14
+ exports.polygonAmoy = "AMOY";
15
+ exports.vanarTestnet = "VANGUARD-VANAR-TESTNET";
16
+ exports.TESTNET_CHAINS = [
17
+ exports.sepolia,
14
18
  "MUMBAI",
15
19
  "FUSESPARK",
16
20
  "MANTA-TESTNET",
17
21
  "METIS-TESTNET",
18
22
  "MANTLE-TESTNET",
19
- zkLinkTestnet,
20
- bitlayerTestnet,
21
- neoxTestnet,
22
- sepolia,
23
- polygonAmoy,
24
- vanarTestnet,
23
+ exports.zkLinkTestnet,
24
+ exports.bitlayerTestnet,
25
+ exports.neoxTestnet,
26
+ exports.sepolia,
27
+ exports.polygonAmoy,
28
+ exports.vanarTestnet,
25
29
  ];
26
- export const SUPPORTED_EVM_CHAINS = [
30
+ exports.SUPPORTED_EVM_CHAINS = [
27
31
  "ETH",
28
32
  "POLYGON",
29
33
  "AVALANCHE",
@@ -34,23 +38,26 @@ export const SUPPORTED_EVM_CHAINS = [
34
38
  "FUSE",
35
39
  "FUSESPARK",
36
40
  "MUMBAI",
41
+ exports.sepolia,
37
42
  "MANTA",
38
43
  "MANTA-TESTNET",
39
44
  "METIS",
40
45
  "METIS-TESTNET",
41
46
  "MANTLE",
42
47
  "MANTLE-TESTNET",
43
- zkLink,
44
- zkLinkTestnet,
45
- bitlayerTestnet,
46
- neoxTestnet,
47
- sepolia,
48
- polygonAmoy,
49
- vanarTestnet,
48
+ exports.zkLink,
49
+ exports.zkLinkTestnet,
50
+ exports.bitlayerTestnet,
51
+ exports.neoxTestnet,
52
+ exports.sepolia,
53
+ exports.polygonAmoy,
54
+ exports.vanarTestnet,
50
55
  ];
51
- export const AA_SUPPORTED_EVM_CHAINS = [
56
+ exports.GAS_ABS_ENABLED_CHAINS = [exports.sepolia, "POLYGON"];
57
+ exports.AA_SUPPORTED_EVM_CHAINS = [
52
58
  // "ETH",
53
59
  "POLYGON",
60
+ exports.sepolia,
54
61
  // "AVALANCHE",
55
62
  // "ARBITRUM",
56
63
  // "BINANCE",
@@ -58,13 +65,13 @@ export const AA_SUPPORTED_EVM_CHAINS = [
58
65
  "FUSE",
59
66
  "MUMBAI",
60
67
  // "MANTLE",
61
- sepolia,
68
+ exports.sepolia,
62
69
  "OPTIMISM",
63
70
  "ARBITRUM",
64
71
  "AVALANCHE",
65
72
  "MANTLE",
66
73
  ];
67
- export const ALLCHAINS = [
74
+ exports.ALLCHAINS = [
68
75
  "ETH",
69
76
  "POLYGON",
70
77
  "AVALANCHE",
@@ -75,6 +82,7 @@ export const ALLCHAINS = [
75
82
  "FUSE",
76
83
  "FUSESPARK",
77
84
  "MUMBAI",
85
+ exports.sepolia,
78
86
  "MANTA",
79
87
  "MANTA-TESTNET",
80
88
  "METIS",
@@ -82,24 +90,24 @@ export const ALLCHAINS = [
82
90
  "MANTLE",
83
91
  "MANTLE-TESTNET",
84
92
  "SOLANA",
85
- zkLink,
86
- zkLinkTestnet,
87
- bitlayerTestnet,
88
- neoxTestnet,
89
- sepolia,
90
- polygonAmoy,
91
- vanarTestnet,
93
+ exports.zkLink,
94
+ exports.zkLinkTestnet,
95
+ exports.bitlayerTestnet,
96
+ exports.neoxTestnet,
97
+ exports.sepolia,
98
+ exports.polygonAmoy,
99
+ exports.vanarTestnet,
92
100
  ];
93
101
  const baseLogoUrl = "https://static.tria.so/chain-logo-w";
94
102
  const baseLogoUrlBlack = "https://static.tria.so/chain-logo-b";
95
- export const networks = [
103
+ exports.networks = [
96
104
  {
97
105
  chainName: "ETH",
98
106
  logo: `${baseLogoUrl}/Ethereum.webp`,
99
107
  type: "mainnet",
100
108
  },
101
109
  {
102
- chainName: sepolia,
110
+ chainName: exports.sepolia,
103
111
  logo: `${baseLogoUrl}/Ethereum.webp`,
104
112
  type: "testnet",
105
113
  },
@@ -114,7 +122,7 @@ export const networks = [
114
122
  type: "mainnet",
115
123
  },
116
124
  {
117
- chainName: polygonAmoy,
125
+ chainName: exports.polygonAmoy,
118
126
  logo: `${baseLogoUrl}/Polygon.svg`,
119
127
  type: "testnet",
120
128
  },
@@ -193,37 +201,37 @@ export const networks = [
193
201
  type: "mainnet",
194
202
  },
195
203
  {
196
- chainName: zkLink,
204
+ chainName: exports.zkLink,
197
205
  logo: `${baseLogoUrl}/zklink.webp`,
198
206
  type: "mainnet",
199
207
  },
200
208
  {
201
- chainName: zkLinkTestnet,
209
+ chainName: exports.zkLinkTestnet,
202
210
  logo: `${baseLogoUrl}/zklink.webp`,
203
211
  type: "testnet",
204
212
  },
205
213
  {
206
- chainName: bitlayerTestnet,
214
+ chainName: exports.bitlayerTestnet,
207
215
  logo: `${baseLogoUrl}/bitlayer.webp`,
208
216
  type: "testnet",
209
217
  },
210
218
  {
211
- chainName: neoxTestnet,
219
+ chainName: exports.neoxTestnet,
212
220
  logo: `${baseLogoUrl}/Neo.webp`,
213
221
  type: "testnet",
214
222
  },
215
223
  {
216
- chainName: vanarTestnet,
224
+ chainName: exports.vanarTestnet,
217
225
  logo: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrl}/Vanguard.webp`,
218
226
  type: "testnet",
219
227
  },
220
228
  ];
221
- export const chainNameToLogo = {
229
+ exports.chainNameToLogo = {
222
230
  ETH: `${baseLogoUrl}/Ethereum.webp`,
223
- [sepolia]: `${baseLogoUrl}/Ethereum.webp`,
231
+ [exports.sepolia]: `${baseLogoUrl}/Ethereum.webp`,
224
232
  FANTOM: `${baseLogoUrl}/Fantom.webp`,
225
233
  POLYGON: `${baseLogoUrl}/Polygon.webp`,
226
- [polygonAmoy]: `${baseLogoUrl}/Polygon.webp`,
234
+ [exports.polygonAmoy]: `${baseLogoUrl}/Polygon.webp`,
227
235
  AVALANCHE: `${baseLogoUrl}/Avalanche.webp`,
228
236
  OPTIMISM: `${baseLogoUrl}/Optimism.webp`,
229
237
  ARBITRUM: `${baseLogoUrl}/Arbitrum.webp`,
@@ -239,19 +247,19 @@ export const chainNameToLogo = {
239
247
  MANTLE: `${baseLogoUrl}/Mantle.webp`,
240
248
  "MANTLE-TESTNET": `${baseLogoUrl}/Mantle.webp`,
241
249
  SOLANA: `${baseLogoUrl}/Solana.webp`,
242
- [zkLink]: `${baseLogoUrl}/zklink.webp`,
243
- [zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
244
- [bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
245
- [neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
246
- [vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrl}/Vanguard.webp`,
250
+ [exports.zkLink]: `${baseLogoUrl}/zklink.webp`,
251
+ [exports.zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
252
+ [exports.bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
253
+ [exports.neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
254
+ [exports.vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrl}/Vanguard.webp`,
247
255
  };
248
- export const chainNameToLogoBlack = {
256
+ exports.chainNameToLogoBlack = {
249
257
  ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
250
- [sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
258
+ [exports.sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
251
259
  BINANCE: `${baseLogoUrlBlack}/binance.webp`,
252
260
  FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
253
261
  POLYGON: `${baseLogoUrlBlack}/Polygon.webp`,
254
- [polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
262
+ [exports.polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
255
263
  AVALANCHE: `${baseLogoUrlBlack}/Avalanche.webp`,
256
264
  OPTIMISM: `${baseLogoUrlBlack}/Optimism.webp`,
257
265
  ARBITRUM: `${baseLogoUrlBlack}/Arbitrum.webp`,
@@ -266,9 +274,9 @@ export const chainNameToLogoBlack = {
266
274
  MANTLE: `${baseLogoUrlBlack}/Mantle.webp`,
267
275
  "MANTLE-TESTNET": `${baseLogoUrlBlack}/Mantle.webp`,
268
276
  SOLANA: `${baseLogoUrlBlack}/Solana.webp`,
269
- [zkLink]: `${baseLogoUrlBlack}/zklink.webp`,
270
- [zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
271
- [bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
272
- [neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
273
- [vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrlBlack}/Vanguard.png`,
277
+ [exports.zkLink]: `${baseLogoUrlBlack}/zklink.webp`,
278
+ [exports.zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
279
+ [exports.bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
280
+ [exports.neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
281
+ [exports.vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrlBlack}/Vanguard.png`,
274
282
  };
@@ -3,3 +3,4 @@ export declare const isEvmChain: (chainName: string) => boolean;
3
3
  export declare const isAaSupportedChain: (chainName: string) => boolean;
4
4
  export declare const isChainSupported: (chainName: string) => boolean;
5
5
  export declare const isTestnetChain: (chainName: string) => boolean;
6
+ export declare const isGasAbsEnabled: (chainName: string) => boolean;
@@ -1,14 +1,25 @@
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.isGasAbsEnabled = 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;
22
+ const isGasAbsEnabled = (chainName) => {
23
+ return chains_1.GAS_ABS_ENABLED_CHAINS.includes(chainName);
24
+ };
25
+ exports.isGasAbsEnabled = isGasAbsEnabled;
@@ -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];
File without changes
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // import { polygonAmoy, sepolia } from "./chains";
3
+ // export const gasTokenAddresses = {
4
+ // [sepolia]: {
5
+ // USDC: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
6
+ // USDT: "",
7
+ // TST: "0xe2fDF4b113552A7bFaD5492D7E68F7479D7DFaCF",
8
+ // },
9
+ // [polygonAmoy]: {
10
+ // USDC: "",
11
+ // USDT: "",
12
+ // },
13
+ // };
package/dist/src/txn.d.ts CHANGED
@@ -171,9 +171,9 @@ export declare const chainNameToChainId: {
171
171
  "MANTLE-TESTNET": number;
172
172
  };
173
173
  export declare const chainIdToChainName: {
174
+ 11155111: string;
174
175
  80001: string;
175
176
  80002: string;
176
- 11155111: string;
177
177
  137: string;
178
178
  1: string;
179
179
  43114: string;
package/dist/src/txn.js CHANGED
@@ -1,9 +1,12 @@
1
- import { bitlayerTestnet, neoxTestnet, polygonAmoy, sepolia, zkLink, zkLinkTestnet, vanarTestnet, } 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",
4
- [sepolia]: "https://sepolia.etherscan.io",
7
+ [chains_1.sepolia]: "https://sepolia.etherscan.io",
5
8
  POLYGON: "https://polygonscan.com",
6
- [polygonAmoy]: "https://www.oklink.com/amoy",
9
+ [chains_1.polygonAmoy]: "https://www.oklink.com/amoy",
7
10
  AVALANCHE: "https://snowtrace.io",
8
11
  ARBITRUM: "https://arbiscan.io",
9
12
  BINANCE: "https://bscscan.com",
@@ -22,44 +25,44 @@ export const explorerBaseUrls = {
22
25
  "MANTLE-TESTNET": "https://explorer.testnet.mantle.xyz",
23
26
  MANTA: "https://pacific-explorer.manta.network",
24
27
  "MANTA-TESTNET": "https://manta-testnet.calderaexplorer.xyz",
25
- [zkLink]: "https://explorer.zklink.io",
26
- [zkLinkTestnet]: "https://goerli.explorer.zklink.io",
27
- [bitlayerTestnet]: "https://testnet-scan.bitlayer.org/en-us",
28
- [neoxTestnet]: "https://xt2scan.ngd.network",
29
- [vanarTestnet]: "https://explorer-vanguard.vanarchain.com",
28
+ [chains_1.zkLink]: "https://explorer.zklink.io",
29
+ [chains_1.zkLinkTestnet]: "https://goerli.explorer.zklink.io",
30
+ [chains_1.bitlayerTestnet]: "https://testnet-scan.bitlayer.org/en-us",
31
+ [chains_1.neoxTestnet]: "https://xt2scan.ngd.network",
32
+ [chains_1.vanarTestnet]: "https://explorer-vanguard.vanarchain.com",
30
33
  };
31
- export const txnBaseUrl = {
32
- ETH: `${explorerBaseUrls.ETH}/tx`, // /txHash
33
- [sepolia]: `${explorerBaseUrls[sepolia]}/tx`,
34
- POLYGON: `${explorerBaseUrls.POLYGON}/tx`,
35
- [polygonAmoy]: `${explorerBaseUrls[polygonAmoy]}/tx`,
36
- AVALANCHE: `${explorerBaseUrls.AVALANCHE}/tx`,
37
- ARBITRUM: `${explorerBaseUrls.ARBITRUM}/tx`,
38
- BINANCE: `${explorerBaseUrls.BINANCE}/tx`,
39
- OPTIMISM: `${explorerBaseUrls.OPTIMISM}/tx`,
40
- FANTOM: `${explorerBaseUrls.FANTOM}/tx`,
41
- FUSE: `${explorerBaseUrls.FUSE}/tx`,
42
- FUSESPARK: `${explorerBaseUrls.FUSESPARK}/tx`,
43
- MUMBAI: `${explorerBaseUrls.MUMBAI}/tx`,
44
- METIS: `${explorerBaseUrls.METIS}/tx`,
45
- "METIS-TESTNET": `${explorerBaseUrls["METIS-TESTNET"]}/tx`,
46
- MANTLE: `${explorerBaseUrls.MANTLE}/tx`,
47
- "MANTLE-TESTNET": `${explorerBaseUrls["MANTLE-TESTNET"]}/tx`,
48
- MANTA: `${explorerBaseUrls.MANTA}/tx`,
49
- "MANTA-TESTNET": `${explorerBaseUrls["MANTA-TESTNET"]}/tx`,
50
- [zkLink]: `${explorerBaseUrls[zkLink]}/tx`,
51
- [zkLinkTestnet]: `${explorerBaseUrls[zkLinkTestnet]}/tx`,
52
- [bitlayerTestnet]: `${explorerBaseUrls[bitlayerTestnet]}/tx`,
53
- [neoxTestnet]: `${explorerBaseUrls[neoxTestnet]}/tx`,
54
- [vanarTestnet]: `${explorerBaseUrls[vanarTestnet]}/tx`,
34
+ exports.txnBaseUrl = {
35
+ ETH: `${exports.explorerBaseUrls.ETH}/tx`, // /txHash
36
+ [chains_1.sepolia]: `${exports.explorerBaseUrls[chains_1.sepolia]}/tx`,
37
+ POLYGON: `${exports.explorerBaseUrls.POLYGON}/tx`,
38
+ [chains_1.polygonAmoy]: `${exports.explorerBaseUrls[chains_1.polygonAmoy]}/tx`,
39
+ AVALANCHE: `${exports.explorerBaseUrls.AVALANCHE}/tx`,
40
+ ARBITRUM: `${exports.explorerBaseUrls.ARBITRUM}/tx`,
41
+ BINANCE: `${exports.explorerBaseUrls.BINANCE}/tx`,
42
+ OPTIMISM: `${exports.explorerBaseUrls.OPTIMISM}/tx`,
43
+ FANTOM: `${exports.explorerBaseUrls.FANTOM}/tx`,
44
+ FUSE: `${exports.explorerBaseUrls.FUSE}/tx`,
45
+ FUSESPARK: `${exports.explorerBaseUrls.FUSESPARK}/tx`,
46
+ MUMBAI: `${exports.explorerBaseUrls.MUMBAI}/tx`,
47
+ METIS: `${exports.explorerBaseUrls.METIS}/tx`,
48
+ "METIS-TESTNET": `${exports.explorerBaseUrls["METIS-TESTNET"]}/tx`,
49
+ MANTLE: `${exports.explorerBaseUrls.MANTLE}/tx`,
50
+ "MANTLE-TESTNET": `${exports.explorerBaseUrls["MANTLE-TESTNET"]}/tx`,
51
+ MANTA: `${exports.explorerBaseUrls.MANTA}/tx`,
52
+ "MANTA-TESTNET": `${exports.explorerBaseUrls["MANTA-TESTNET"]}/tx`,
53
+ [chains_1.zkLink]: `${exports.explorerBaseUrls[chains_1.zkLink]}/tx`,
54
+ [chains_1.zkLinkTestnet]: `${exports.explorerBaseUrls[chains_1.zkLinkTestnet]}/tx`,
55
+ [chains_1.bitlayerTestnet]: `${exports.explorerBaseUrls[chains_1.bitlayerTestnet]}/tx`,
56
+ [chains_1.neoxTestnet]: `${exports.explorerBaseUrls[chains_1.neoxTestnet]}/tx`,
57
+ [chains_1.vanarTestnet]: `${exports.explorerBaseUrls[chains_1.vanarTestnet]}/tx`,
55
58
  };
56
- export const nativeTokenDetails = {
59
+ exports.nativeTokenDetails = {
57
60
  ETH: {
58
61
  name: "Ether",
59
62
  symbol: "ETH",
60
63
  logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
61
64
  },
62
- [sepolia]: {
65
+ [chains_1.sepolia]: {
63
66
  name: "Ether",
64
67
  symbol: "ETH",
65
68
  logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
@@ -69,7 +72,7 @@ export const nativeTokenDetails = {
69
72
  symbol: "MATIC",
70
73
  logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
71
74
  },
72
- [polygonAmoy]: {
75
+ [chains_1.polygonAmoy]: {
73
76
  name: "Matic Token",
74
77
  symbol: "MATIC",
75
78
  logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
@@ -149,38 +152,39 @@ export const nativeTokenDetails = {
149
152
  symbol: "SOL",
150
153
  logoUrl: "https://static.tria.so/chain-logo-w/Solana.webp",
151
154
  },
152
- [zkLink]: {
155
+ [chains_1.zkLink]: {
153
156
  name: "Ether",
154
157
  symbol: "ETH",
155
158
  logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
156
159
  },
157
- [zkLinkTestnet]: {
160
+ [chains_1.zkLinkTestnet]: {
158
161
  name: "Ether",
159
162
  symbol: "ETH",
160
163
  logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
161
164
  },
162
- [bitlayerTestnet]: {
165
+ [chains_1.bitlayerTestnet]: {
163
166
  name: "Bitcoin",
164
167
  symbol: "BTC",
165
168
  logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp",
166
169
  },
167
- [neoxTestnet]: {
170
+ [chains_1.neoxTestnet]: {
168
171
  name: "Gas",
169
172
  symbol: "GAS",
170
173
  logoUrl: "https://assets.coingecko.com/coins/images/858/standard/GAS_512_512.png?1696501992",
171
174
  },
172
- [vanarTestnet]: {
175
+ [chains_1.vanarTestnet]: {
173
176
  name: "Vanry",
174
177
  symbol: "VG",
175
178
  logoUrl: "https://explorer-vanguard.vanarchain.com/assets/network_icon_dark.svg",
176
179
  },
177
180
  };
178
181
  const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
179
- export const rpcUrls = {
182
+ exports.rpcUrls = {
180
183
  MUMBAI: `https://polygon-mumbai.g.alchemy.com/v2/${alchemyKey}`, //'https://polygon-mumbai.blockpi.network/v1/rpc/public',
181
- [polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
182
- [sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
184
+ [chains_1.polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
185
+ [chains_1.sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
183
186
  ETH: "https://eth.llamarpc.com",
187
+ [chains_1.sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
184
188
  POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
185
189
  AVALANCHE: "https://avalanche-c-chain.publicnode.com",
186
190
  ARBITRUM: "https://arbitrum-one.publicnode.com",
@@ -195,16 +199,16 @@ export const rpcUrls = {
195
199
  "METIS-TESTNET": "https://goerli.gateway.metisdevops.link",
196
200
  MANTLE: "https://rpc.mantle.xyz",
197
201
  "MANTLE-TESTNET": "https://rpc.testnet.mantle.xyz",
198
- [zkLink]: "https://rpc.zklink.io",
199
- [zkLinkTestnet]: "https://goerli.rpc.zklink.io",
200
- [bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
201
- [neoxTestnet]: "https://neoxseed1.ngd.network",
202
- [vanarTestnet]: "http://rpc-partners-vanguard.vanarchain.com", // "https://rpc-vanguard.vanarchain.com",
202
+ [chains_1.zkLink]: "https://rpc.zklink.io",
203
+ [chains_1.zkLinkTestnet]: "https://goerli.rpc.zklink.io",
204
+ [chains_1.bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
205
+ [chains_1.neoxTestnet]: "https://neoxseed1.ngd.network",
206
+ [chains_1.vanarTestnet]: "http://rpc-partners-vanguard.vanarchain.com", // "https://rpc-vanguard.vanarchain.com",
203
207
  };
204
- export const chainNameToChainId = {
208
+ exports.chainNameToChainId = {
205
209
  MUMBAI: 80001,
206
- [polygonAmoy]: 80002,
207
- [sepolia]: 11155111,
210
+ [chains_1.polygonAmoy]: 80002,
211
+ [chains_1.sepolia]: 11155111,
208
212
  POLYGON: 137,
209
213
  ETH: 1,
210
214
  AVALANCHE: 43114,
@@ -220,16 +224,16 @@ export const chainNameToChainId = {
220
224
  "METIS-TESTNET": 599,
221
225
  MANTLE: 5000,
222
226
  "MANTLE-TESTNET": 5001,
223
- [zkLink]: 810180,
224
- [zkLinkTestnet]: 810182,
225
- [bitlayerTestnet]: 200810,
226
- [neoxTestnet]: 12227330,
227
- [vanarTestnet]: 78600,
227
+ [chains_1.zkLink]: 810180,
228
+ [chains_1.zkLinkTestnet]: 810182,
229
+ [chains_1.bitlayerTestnet]: 200810,
230
+ [chains_1.neoxTestnet]: 12227330,
231
+ [chains_1.vanarTestnet]: 78600,
228
232
  };
229
- export const chainIdToChainName = {
233
+ exports.chainIdToChainName = {
234
+ 11155111: chains_1.sepolia,
230
235
  80001: "MUMBAI",
231
- 80002: polygonAmoy,
232
- 11155111: sepolia,
236
+ 80002: chains_1.polygonAmoy,
233
237
  137: "POLYGON",
234
238
  1: "ETH",
235
239
  43114: "AVALANCHE",
@@ -245,9 +249,9 @@ export const chainIdToChainName = {
245
249
  599: "METIS-TESTNET",
246
250
  169: "MANTA",
247
251
  3441005: "MANTA-TESTNET",
248
- 810180: zkLink,
249
- 810182: zkLinkTestnet,
250
- 200810: bitlayerTestnet,
251
- 12227330: neoxTestnet,
252
- 78600: vanarTestnet,
252
+ 810180: chains_1.zkLink,
253
+ 810182: chains_1.zkLinkTestnet,
254
+ 200810: chains_1.bitlayerTestnet,
255
+ 12227330: chains_1.neoxTestnet,
256
+ 78600: chains_1.vanarTestnet,
253
257
  };
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@tria-sdk/constants",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/chains.ts CHANGED
@@ -21,6 +21,7 @@ export type AMOY = "AMOY";
21
21
  export type VANGUARD_VANAR_TESTNET = "VANGUARD-VANAR-TESTNET";
22
22
 
23
23
  export const TESTNET_CHAINS = [
24
+ sepolia,
24
25
  "MUMBAI",
25
26
  "FUSESPARK",
26
27
  "MANTA-TESTNET",
@@ -45,6 +46,7 @@ export const SUPPORTED_EVM_CHAINS = [
45
46
  "FUSE",
46
47
  "FUSESPARK",
47
48
  "MUMBAI",
49
+ sepolia,
48
50
  "MANTA",
49
51
  "MANTA-TESTNET",
50
52
  "METIS",
@@ -60,9 +62,12 @@ export const SUPPORTED_EVM_CHAINS = [
60
62
  vanarTestnet,
61
63
  ];
62
64
 
65
+ export const GAS_ABS_ENABLED_CHAINS = [sepolia, "POLYGON"];
66
+
63
67
  export const AA_SUPPORTED_EVM_CHAINS = [
64
68
  // "ETH",
65
69
  "POLYGON",
70
+ sepolia,
66
71
  // "AVALANCHE",
67
72
  // "ARBITRUM",
68
73
  // "BINANCE",
@@ -88,6 +93,7 @@ export const ALLCHAINS = [
88
93
  "FUSE",
89
94
  "FUSESPARK",
90
95
  "MUMBAI",
96
+ sepolia,
91
97
  "MANTA",
92
98
  "MANTA-TESTNET",
93
99
  "METIS",
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
@@ -204,6 +204,7 @@ export const rpcUrls = {
204
204
  [polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
205
205
  [sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
206
206
  ETH: "https://eth.llamarpc.com",
207
+ [sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
207
208
  POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
208
209
  AVALANCHE: "https://avalanche-c-chain.publicnode.com",
209
210
  ARBITRUM: "https://arbitrum-one.publicnode.com",
@@ -252,9 +253,9 @@ export const chainNameToChainId = {
252
253
  };
253
254
 
254
255
  export const chainIdToChainName = {
256
+ 11155111: sepolia,
255
257
  80001: "MUMBAI",
256
258
  80002: polygonAmoy,
257
- 11155111: sepolia,
258
259
  137: "POLYGON",
259
260
  1: "ETH",
260
261
  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,