@tria-sdk/constants 1.0.17 → 1.0.18

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,20 +1,4 @@
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);
1
+ export * from "./src/config";
2
+ export * from "./src/chains";
3
+ export * from "./src/txn";
4
+ export * from "./src/connect";
@@ -1,21 +1,18 @@
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.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.TESTNET_CHAINS = [
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 = [
9
6
  "MUMBAI",
10
7
  "FUSESPARK",
11
8
  "MANTA-TESTNET",
12
9
  "METIS-TESTNET",
13
10
  "MANTLE-TESTNET",
14
- exports.zkLinkTestnet,
15
- exports.bitlayerTestnet,
16
- exports.neoxTestnet,
11
+ zkLinkTestnet,
12
+ bitlayerTestnet,
13
+ neoxTestnet,
17
14
  ];
18
- exports.SUPPORTED_EVM_CHAINS = [
15
+ export const SUPPORTED_EVM_CHAINS = [
19
16
  "ETH",
20
17
  "POLYGON",
21
18
  "AVALANCHE",
@@ -32,12 +29,12 @@ exports.SUPPORTED_EVM_CHAINS = [
32
29
  "METIS-TESTNET",
33
30
  "MANTLE",
34
31
  "MANTLE-TESTNET",
35
- exports.zkLink,
36
- exports.zkLinkTestnet,
37
- exports.bitlayerTestnet,
38
- exports.neoxTestnet,
32
+ zkLink,
33
+ zkLinkTestnet,
34
+ bitlayerTestnet,
35
+ neoxTestnet,
39
36
  ];
40
- exports.AA_SUPPORTED_EVM_CHAINS = [
37
+ export const AA_SUPPORTED_EVM_CHAINS = [
41
38
  // "ETH",
42
39
  "POLYGON",
43
40
  // "AVALANCHE",
@@ -48,7 +45,7 @@ exports.AA_SUPPORTED_EVM_CHAINS = [
48
45
  "MUMBAI",
49
46
  // "MANTLE",
50
47
  ];
51
- exports.ALLCHAINS = [
48
+ export const ALLCHAINS = [
52
49
  "ETH",
53
50
  "POLYGON",
54
51
  "AVALANCHE",
@@ -66,14 +63,14 @@ exports.ALLCHAINS = [
66
63
  "MANTLE",
67
64
  "MANTLE-TESTNET",
68
65
  "SOLANA",
69
- exports.zkLink,
70
- exports.zkLinkTestnet,
71
- exports.bitlayerTestnet,
72
- exports.neoxTestnet,
66
+ zkLink,
67
+ zkLinkTestnet,
68
+ bitlayerTestnet,
69
+ neoxTestnet,
73
70
  ];
74
71
  const baseLogoUrl = "https://static.tria.so/chain-logo-w";
75
72
  const baseLogoUrlBlack = "https://static.tria.so/chain-logo-b";
76
- exports.networks = [
73
+ export const networks = [
77
74
  {
78
75
  chainName: "ETH",
79
76
  logo: `${baseLogoUrl}/Ethereum.webp`,
@@ -164,27 +161,27 @@ exports.networks = [
164
161
  type: "mainnet",
165
162
  },
166
163
  {
167
- chainName: exports.zkLink,
164
+ chainName: zkLink,
168
165
  logo: `${baseLogoUrl}/zklink.webp`,
169
166
  type: "mainnet",
170
167
  },
171
168
  {
172
- chainName: exports.zkLinkTestnet,
169
+ chainName: zkLinkTestnet,
173
170
  logo: `${baseLogoUrl}/zklink.webp`,
174
171
  type: "testnet",
175
172
  },
176
173
  {
177
- chainName: exports.bitlayerTestnet,
174
+ chainName: bitlayerTestnet,
178
175
  logo: `${baseLogoUrl}/bitlayer.webp`,
179
176
  type: "testnet",
180
177
  },
181
178
  {
182
- chainName: exports.neoxTestnet,
179
+ chainName: neoxTestnet,
183
180
  logo: `${baseLogoUrl}/neox.webp`,
184
181
  type: "testnet",
185
182
  },
186
183
  ];
187
- exports.chainNameToLogo = {
184
+ export const chainNameToLogo = {
188
185
  ETH: `${baseLogoUrl}/Ethereum.webp`,
189
186
  FANTOM: `${baseLogoUrl}/Fantom.webp`,
190
187
  POLYGON: `${baseLogoUrl}/Polygon.webp`,
@@ -203,12 +200,12 @@ exports.chainNameToLogo = {
203
200
  MANTLE: `${baseLogoUrl}/Mantle.webp`,
204
201
  "MANTLE-TESTNET": `${baseLogoUrl}/Mantle.webp`,
205
202
  SOLANA: `${baseLogoUrl}/Solana.webp`,
206
- [exports.zkLink]: `${baseLogoUrl}/zklink.webp`,
207
- [exports.zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
208
- [exports.bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
209
- [exports.neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
203
+ [zkLink]: `${baseLogoUrl}/zklink.webp`,
204
+ [zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
205
+ [bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
206
+ [neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
210
207
  };
211
- exports.chainNameToLogoBlack = {
208
+ export const chainNameToLogoBlack = {
212
209
  ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
213
210
  BINANCE: `${baseLogoUrlBlack}/binance.webp`,
214
211
  FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
@@ -227,8 +224,8 @@ exports.chainNameToLogoBlack = {
227
224
  MANTLE: `${baseLogoUrlBlack}/Mantle.webp`,
228
225
  "MANTLE-TESTNET": `${baseLogoUrlBlack}/Mantle.webp`,
229
226
  SOLANA: `${baseLogoUrlBlack}/Solana.webp`,
230
- [exports.zkLink]: `${baseLogoUrlBlack}/zklink.webp`,
231
- [exports.zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
232
- [exports.bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
233
- [exports.neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
227
+ [zkLink]: `${baseLogoUrlBlack}/zklink.webp`,
228
+ [zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
229
+ [bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
230
+ [neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
234
231
  };
@@ -1,21 +1,14 @@
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);
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);
8
5
  };
9
- exports.isEvmChain = isEvmChain;
10
- const isAaSupportedChain = (chainName) => {
11
- return chains_1.AA_SUPPORTED_EVM_CHAINS.includes(chainName);
6
+ export const isAaSupportedChain = (chainName) => {
7
+ return AA_SUPPORTED_EVM_CHAINS.includes(chainName);
12
8
  };
13
- exports.isAaSupportedChain = isAaSupportedChain;
14
- const isChainSupported = (chainName) => {
15
- return chains_1.ALLCHAINS.includes(chainName);
9
+ export const isChainSupported = (chainName) => {
10
+ return ALLCHAINS.includes(chainName);
16
11
  };
17
- exports.isChainSupported = isChainSupported;
18
- const isTestnetChain = (chainName) => {
19
- return chains_1.TESTNET_CHAINS.includes(chainName);
12
+ export const isTestnetChain = (chainName) => {
13
+ return TESTNET_CHAINS.includes(chainName);
20
14
  };
21
- exports.isTestnetChain = isTestnetChain;
@@ -1,7 +1,4 @@
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 = {
1
+ export const eventTypes = {
5
2
  logIn: "Log in",
6
3
  triaSignUp: "Tria Sign up",
7
4
  emailPwSignUp: "Email Pwd Sign up",
@@ -18,12 +15,12 @@ exports.eventTypes = {
18
15
  saveToAuth: "Save to Auth Iframe",
19
16
  triaStoreSet: "triaStoreSet",
20
17
  };
21
- exports.TRIA_WALLET_STORE = "tria.wallet.store";
22
- exports.TRIA_WALLET_SELECTED_CHAIN = "tria.wallet.selectedChain";
23
- exports.storageKeys = {
18
+ export const TRIA_WALLET_STORE = "tria.wallet.store";
19
+ export const TRIA_WALLET_SELECTED_CHAIN = "tria.wallet.selectedChain";
20
+ export const storageKeys = {
24
21
  TRIA_WALLET_STORE: "tria.wallet.store",
25
22
  TRIA_WALLET_SELECTED_CHAIN: "tria.wallet.selectedChain",
26
23
  PERSIST_ROOT: "persist:root",
27
24
  };
28
- exports.triaAuthUrl = "https://auth.tria.so";
25
+ export const triaAuthUrl = "https://auth.tria.so";
29
26
  // export const PARENT_URL = document?.referrer || window?.parent?.[0]?.location?.ancestorOrigins?.[0];
package/dist/src/txn.js CHANGED
@@ -1,8 +1,5 @@
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 = {
1
+ import { bitlayerTestnet, neoxTestnet, zkLink, zkLinkTestnet } from "./chains";
2
+ export const explorerBaseUrls = {
6
3
  ETH: "https://etherscan.io",
7
4
  POLYGON: "https://polygonscan.com",
8
5
  AVALANCHE: "https://snowtrace.io",
@@ -23,34 +20,34 @@ exports.explorerBaseUrls = {
23
20
  "MANTLE-TESTNET": "https://explorer.testnet.mantle.xyz",
24
21
  MANTA: "https://pacific-explorer.manta.network",
25
22
  "MANTA-TESTNET": "https://manta-testnet.calderaexplorer.xyz",
26
- [chains_1.zkLink]: "https://explorer.zklink.io",
27
- [chains_1.zkLinkTestnet]: "https://goerli.explorer.zklink.io",
28
- [chains_1.bitlayerTestnet]: "https://testnet-scan.bitlayer.org/en-us",
29
- [chains_1.neoxTestnet]: "https://xt2scan.ngd.network",
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",
30
27
  };
31
- exports.txnBaseUrl = {
32
- ETH: `${exports.explorerBaseUrls.ETH}/tx`, // /txHash
33
- POLYGON: `${exports.explorerBaseUrls.POLYGON}/tx`,
34
- AVALANCHE: `${exports.explorerBaseUrls.AVALANCHE}/tx`,
35
- ARBITRUM: `${exports.explorerBaseUrls.ARBITRUM}/tx`,
36
- BINANCE: `${exports.explorerBaseUrls.BINANCE}/tx`,
37
- OPTIMISM: `${exports.explorerBaseUrls.OPTIMISM}/tx`,
38
- FANTOM: `${exports.explorerBaseUrls.FANTOM}/tx`,
39
- FUSE: `${exports.explorerBaseUrls.FUSE}/tx`,
40
- FUSESPARK: `${exports.explorerBaseUrls.FUSESPARK}/tx`,
41
- MUMBAI: `${exports.explorerBaseUrls.MUMBAI}/tx`,
42
- METIS: `${exports.explorerBaseUrls.METIS}/tx`,
43
- "METIS-TESTNET": `${exports.explorerBaseUrls["METIS-TESTNET"]}/tx`,
44
- MANTLE: `${exports.explorerBaseUrls.MANTLE}/tx`,
45
- "MANTLE-TESTNET": `${exports.explorerBaseUrls["MANTLE-TESTNET"]}/tx`,
46
- MANTA: `${exports.explorerBaseUrls.MANTA}/tx`,
47
- "MANTA-TESTNET": `${exports.explorerBaseUrls["MANTA-TESTNET"]}/tx`,
48
- [chains_1.zkLink]: `${exports.explorerBaseUrls[chains_1.zkLink]}/tx`,
49
- [chains_1.zkLinkTestnet]: `${exports.explorerBaseUrls[chains_1.zkLinkTestnet]}/tx`,
50
- [chains_1.bitlayerTestnet]: `${exports.explorerBaseUrls[chains_1.bitlayerTestnet]}/tx`,
51
- [chains_1.neoxTestnet]: `${exports.explorerBaseUrls[chains_1.neoxTestnet]}/tx`,
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`,
52
49
  };
53
- exports.nativeTokenDetails = {
50
+ export const nativeTokenDetails = {
54
51
  ETH: {
55
52
  name: "Ether",
56
53
  symbol: "ETH",
@@ -136,29 +133,29 @@ exports.nativeTokenDetails = {
136
133
  symbol: "SOL",
137
134
  logoUrl: "https://static.tria.so/chain-logo-w/Solana.webp",
138
135
  },
139
- [chains_1.zkLink]: {
136
+ [zkLink]: {
140
137
  name: "Ether",
141
138
  symbol: "ETH",
142
139
  logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
143
140
  },
144
- [chains_1.zkLinkTestnet]: {
141
+ [zkLinkTestnet]: {
145
142
  name: "Ether",
146
143
  symbol: "ETH",
147
144
  logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
148
145
  },
149
- [chains_1.bitlayerTestnet]: {
146
+ [bitlayerTestnet]: {
150
147
  name: "Bitcoin",
151
148
  symbol: "BTC",
152
149
  logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp",
153
150
  },
154
- [chains_1.neoxTestnet]: {
151
+ [neoxTestnet]: {
155
152
  name: "Gas",
156
153
  symbol: "GAS",
157
154
  logoUrl: "https://assets.coingecko.com/coins/images/858/standard/GAS_512_512.png?1696501992",
158
155
  },
159
156
  };
160
157
  const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
161
- exports.rpcUrls = {
158
+ export const rpcUrls = {
162
159
  MUMBAI: `https://polygon-mumbai.g.alchemy.com/v2/${alchemyKey}`, //'https://polygon-mumbai.blockpi.network/v1/rpc/public',
163
160
  ETH: "https://eth.llamarpc.com",
164
161
  POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
@@ -175,12 +172,12 @@ exports.rpcUrls = {
175
172
  "METIS-TESTNET": "https://goerli.gateway.metisdevops.link",
176
173
  MANTLE: "https://rpc.mantle.xyz",
177
174
  "MANTLE-TESTNET": "https://rpc.testnet.mantle.xyz",
178
- [chains_1.zkLink]: "https://rpc.zklink.io",
179
- [chains_1.zkLinkTestnet]: "https://goerli.rpc.zklink.io",
180
- [chains_1.bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
181
- [chains_1.neoxTestnet]: "https://neoxseed1.ngd.network",
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",
182
179
  };
183
- exports.chainNameToChainId = {
180
+ export const chainNameToChainId = {
184
181
  MUMBAI: 80001,
185
182
  POLYGON: 137,
186
183
  ETH: 1,
@@ -197,12 +194,12 @@ exports.chainNameToChainId = {
197
194
  "METIS-TESTNET": 599,
198
195
  MANTLE: 5000,
199
196
  "MANTLE-TESTNET": 5001,
200
- [chains_1.zkLink]: 810180,
201
- [chains_1.zkLinkTestnet]: 810182,
202
- [chains_1.bitlayerTestnet]: 200810,
203
- [chains_1.neoxTestnet]: 12227330,
197
+ [zkLink]: 810180,
198
+ [zkLinkTestnet]: 810182,
199
+ [bitlayerTestnet]: 200810,
200
+ [neoxTestnet]: 12227330,
204
201
  };
205
- exports.chainIdToChainName = {
202
+ export const chainIdToChainName = {
206
203
  80001: "MUMBAI",
207
204
  137: "POLYGON",
208
205
  1: "ETH",
@@ -219,8 +216,8 @@ exports.chainIdToChainName = {
219
216
  599: "METIS-TESTNET",
220
217
  169: "MANTA",
221
218
  3441005: "MANTA-TESTNET",
222
- 810180: chains_1.zkLink,
223
- 810182: chains_1.zkLinkTestnet,
224
- 200810: chains_1.bitlayerTestnet,
225
- 12227330: chains_1.neoxTestnet,
219
+ 810180: zkLink,
220
+ 810182: zkLinkTestnet,
221
+ 200810: bitlayerTestnet,
222
+ 12227330: neoxTestnet,
226
223
  };
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.18",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/tsconfig.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ES6",
4
- "module": "CommonJS", // "CommonJS",
4
+ "module": "ES6", // "CommonJS",
5
5
  "lib": ["ES2022"],
6
6
  "skipLibCheck": true,
7
7
  "strict": true,