@tria-sdk/constants 1.0.7 → 1.0.8

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,19 +1,16 @@
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.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.TESTNET_CHAINS = [
1
+ export const zkLink = "ZKLINK-NOVA";
2
+ export const zkLinkTestnet = "ZKLINK-NOVA-TESTNET";
3
+ export const bitlayerTestnet = "BITLAYER-TESTNET";
4
+ export const TESTNET_CHAINS = [
8
5
  "MUMBAI",
9
6
  "FUSESPARK",
10
7
  "MANTA-TESTNET",
11
8
  "METIS-TESTNET",
12
9
  "MANTLE-TESTNET",
13
- exports.zkLinkTestnet,
14
- exports.bitlayerTestnet,
10
+ zkLinkTestnet,
11
+ bitlayerTestnet,
15
12
  ];
16
- exports.SUPPORTED_EVM_CHAINS = [
13
+ export const SUPPORTED_EVM_CHAINS = [
17
14
  "ETH",
18
15
  "POLYGON",
19
16
  "AVALANCHE",
@@ -30,11 +27,11 @@ exports.SUPPORTED_EVM_CHAINS = [
30
27
  "METIS-TESTNET",
31
28
  "MANTLE",
32
29
  "MANTLE-TESTNET",
33
- exports.zkLink,
34
- exports.zkLinkTestnet,
35
- exports.bitlayerTestnet,
30
+ zkLink,
31
+ zkLinkTestnet,
32
+ bitlayerTestnet,
36
33
  ];
37
- exports.AA_SUPPORTED_EVM_CHAINS = [
34
+ export const AA_SUPPORTED_EVM_CHAINS = [
38
35
  "ETH",
39
36
  "POLYGON",
40
37
  "AVALANCHE",
@@ -45,7 +42,7 @@ exports.AA_SUPPORTED_EVM_CHAINS = [
45
42
  "FUSE",
46
43
  "MUMBAI",
47
44
  ];
48
- exports.ALLCHAINS = [
45
+ export const ALLCHAINS = [
49
46
  "ETH",
50
47
  "POLYGON",
51
48
  "AVALANCHE",
@@ -63,13 +60,13 @@ exports.ALLCHAINS = [
63
60
  "MANTLE",
64
61
  "MANTLE-TESTNET",
65
62
  "SOLANA",
66
- exports.zkLink,
67
- exports.zkLinkTestnet,
68
- exports.bitlayerTestnet,
63
+ zkLink,
64
+ zkLinkTestnet,
65
+ bitlayerTestnet,
69
66
  ];
70
67
  const baseLogoUrl = "https://static.tria.so/chain-logo-w";
71
68
  const baseLogoUrlBlack = "https://static.tria.so/chain-logo-b";
72
- exports.networks = [
69
+ export const networks = [
73
70
  {
74
71
  chainName: "ETH",
75
72
  logo: `${baseLogoUrl}/Ethereum.webp`,
@@ -143,19 +140,19 @@ exports.networks = [
143
140
  logo: `${baseLogoUrl}/Solana.webp`,
144
141
  },
145
142
  {
146
- chainName: exports.zkLink,
143
+ chainName: zkLink,
147
144
  logo: ``,
148
145
  },
149
146
  {
150
- chainName: exports.zkLinkTestnet,
147
+ chainName: zkLinkTestnet,
151
148
  logo: ``,
152
149
  },
153
150
  {
154
- chainName: exports.bitlayerTestnet,
151
+ chainName: bitlayerTestnet,
155
152
  logo: ``,
156
153
  },
157
154
  ];
158
- exports.chainNameToLogo = {
155
+ export const chainNameToLogo = {
159
156
  ETH: `${baseLogoUrl}/Ethereum.webp`,
160
157
  FANTOM: `${baseLogoUrl}/Fantom.webp`,
161
158
  POLYGON: `${baseLogoUrl}/Polygon.webp`,
@@ -174,11 +171,11 @@ exports.chainNameToLogo = {
174
171
  MANTLE: `${baseLogoUrl}/Mantle.webp`,
175
172
  "MANTLE-TESTNET": `${baseLogoUrl}/Mantle.webp`,
176
173
  SOLANA: `${baseLogoUrl}/Solana.webp`,
177
- [exports.zkLink]: `${baseLogoUrl}/Ethereum.webp`,
178
- [exports.zkLinkTestnet]: `${baseLogoUrl}/Ethereum.webp`,
179
- [exports.bitlayerTestnet]: `${baseLogoUrl}/Ethereum.webp`,
174
+ [zkLink]: `${baseLogoUrl}/Ethereum.webp`,
175
+ [zkLinkTestnet]: `${baseLogoUrl}/Ethereum.webp`,
176
+ [bitlayerTestnet]: `${baseLogoUrl}/Ethereum.webp`,
180
177
  };
181
- exports.chainNameToLogoBlack = {
178
+ export const chainNameToLogoBlack = {
182
179
  ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
183
180
  BINANCE: `${baseLogoUrlBlack}/binance.webp`,
184
181
  FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
@@ -197,7 +194,7 @@ exports.chainNameToLogoBlack = {
197
194
  MANTLE: `${baseLogoUrlBlack}/Mantle.webp`,
198
195
  "MANTLE-TESTNET": `${baseLogoUrlBlack}/Mantle.webp`,
199
196
  SOLANA: `${baseLogoUrlBlack}/Solana.webp`,
200
- [exports.zkLink]: `${baseLogoUrlBlack}/Ethereum.webp`,
201
- [exports.zkLinkTestnet]: `${baseLogoUrlBlack}/Ethereum.webp`,
202
- [exports.bitlayerTestnet]: `${baseLogoUrlBlack}/Ethereum.webp`,
197
+ [zkLink]: `${baseLogoUrlBlack}/Ethereum.webp`,
198
+ [zkLinkTestnet]: `${baseLogoUrlBlack}/Ethereum.webp`,
199
+ [bitlayerTestnet]: `${baseLogoUrlBlack}/Ethereum.webp`,
203
200
  };
@@ -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
  socialSignUp: "Social Sign up",
@@ -16,12 +13,12 @@ exports.eventTypes = {
16
13
  idTokenPass: "Id Token Pass",
17
14
  saveToAuth: "Save to Auth Iframe",
18
15
  };
19
- exports.TRIA_WALLET_STORE = "tria.wallet.store";
20
- exports.TRIA_WALLET_SELECTED_CHAIN = "tria.wallet.selectedChain";
21
- exports.storageKeys = {
16
+ export const TRIA_WALLET_STORE = "tria.wallet.store";
17
+ export const TRIA_WALLET_SELECTED_CHAIN = "tria.wallet.selectedChain";
18
+ export const storageKeys = {
22
19
  TRIA_WALLET_STORE: "tria.wallet.store",
23
20
  TRIA_WALLET_SELECTED_CHAIN: "tria.wallet.selectedChain",
24
21
  PERSIST_ROOT: "persist:root",
25
22
  };
26
- exports.triaAuthUrl = "https://auth.tria.so";
23
+ export const triaAuthUrl = "https://auth.tria.so";
27
24
  // 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, 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,32 +20,32 @@ 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",
23
+ [zkLink]: "https://explorer.zklink.io",
24
+ [zkLinkTestnet]: "https://goerli.explorer.zklink.io",
25
+ [bitlayerTestnet]: "https://testnet-scan.bitlayer.org/en-us",
29
26
  };
30
- exports.txnBaseUrl = {
31
- ETH: `${exports.explorerBaseUrls.ETH}/tx`, // /txHash
32
- POLYGON: `${exports.explorerBaseUrls.POLYGON}/tx`,
33
- AVALANCHE: `${exports.explorerBaseUrls.AVALANCHE}/tx`,
34
- ARBITRUM: `${exports.explorerBaseUrls.ARBITRUM}/tx`,
35
- BINANCE: `${exports.explorerBaseUrls.BINANCE}/tx`,
36
- OPTIMISM: `${exports.explorerBaseUrls.OPTIMISM}/tx`,
37
- FANTOM: `${exports.explorerBaseUrls.FANTOM}/tx`,
38
- FUSE: `${exports.explorerBaseUrls.FUSE}/tx`,
39
- FUSESPARK: `${exports.explorerBaseUrls.FUSESPARK}/tx`,
40
- MUMBAI: `${exports.explorerBaseUrls.MUMBAI}/tx`,
41
- METIS: `${exports.explorerBaseUrls.METIS}/tx`,
42
- "METIS-TESTNET": `${exports.explorerBaseUrls["METIS-TESTNET"]}/tx`,
43
- MANTLE: `${exports.explorerBaseUrls.MANTLE}/tx`,
44
- "MANTLE-TESTNET": `${exports.explorerBaseUrls["MANTLE-TESTNET"]}/tx`,
45
- MANTA: `${exports.explorerBaseUrls.MANTA}/tx`,
46
- "MANTA-TESTNET": `${exports.explorerBaseUrls["MANTA-TESTNET"]}/tx`,
47
- [chains_1.zkLink]: `${exports.explorerBaseUrls[chains_1.zkLink]}/tx`,
48
- [chains_1.zkLinkTestnet]: `${exports.explorerBaseUrls[chains_1.zkLinkTestnet]}/tx`,
49
- [chains_1.bitlayerTestnet]: `${exports.explorerBaseUrls[chains_1.bitlayerTestnet]}/tx`,
27
+ export const txnBaseUrl = {
28
+ ETH: `${explorerBaseUrls.ETH}/tx`, // /txHash
29
+ POLYGON: `${explorerBaseUrls.POLYGON}/tx`,
30
+ AVALANCHE: `${explorerBaseUrls.AVALANCHE}/tx`,
31
+ ARBITRUM: `${explorerBaseUrls.ARBITRUM}/tx`,
32
+ BINANCE: `${explorerBaseUrls.BINANCE}/tx`,
33
+ OPTIMISM: `${explorerBaseUrls.OPTIMISM}/tx`,
34
+ FANTOM: `${explorerBaseUrls.FANTOM}/tx`,
35
+ FUSE: `${explorerBaseUrls.FUSE}/tx`,
36
+ FUSESPARK: `${explorerBaseUrls.FUSESPARK}/tx`,
37
+ MUMBAI: `${explorerBaseUrls.MUMBAI}/tx`,
38
+ METIS: `${explorerBaseUrls.METIS}/tx`,
39
+ "METIS-TESTNET": `${explorerBaseUrls["METIS-TESTNET"]}/tx`,
40
+ MANTLE: `${explorerBaseUrls.MANTLE}/tx`,
41
+ "MANTLE-TESTNET": `${explorerBaseUrls["MANTLE-TESTNET"]}/tx`,
42
+ MANTA: `${explorerBaseUrls.MANTA}/tx`,
43
+ "MANTA-TESTNET": `${explorerBaseUrls["MANTA-TESTNET"]}/tx`,
44
+ [zkLink]: `${explorerBaseUrls[zkLink]}/tx`,
45
+ [zkLinkTestnet]: `${explorerBaseUrls[zkLinkTestnet]}/tx`,
46
+ [bitlayerTestnet]: `${explorerBaseUrls[bitlayerTestnet]}/tx`,
50
47
  };
51
- exports.nativeTokenDetails = {
48
+ export const nativeTokenDetails = {
52
49
  ETH: {
53
50
  name: "Ether",
54
51
  symbol: "ETH",
@@ -134,24 +131,24 @@ exports.nativeTokenDetails = {
134
131
  symbol: "SOL",
135
132
  logoUrl: "https://static.tria.so/chain-logo-w/Solana.webp",
136
133
  },
137
- [chains_1.zkLink]: {
134
+ [zkLink]: {
138
135
  name: "Ether",
139
136
  symbol: "ETH",
140
137
  logoUrl: "https://static.tria.so/chain-logo-w/Ethereum.webp",
141
138
  },
142
- [chains_1.zkLinkTestnet]: {
139
+ [zkLinkTestnet]: {
143
140
  name: "Ether",
144
141
  symbol: "ETH",
145
142
  logoUrl: "https://static.tria.so/chain-logo-w/bitcoin.webp",
146
143
  },
147
- [chains_1.bitlayerTestnet]: {
144
+ [bitlayerTestnet]: {
148
145
  name: "Bitcoin",
149
146
  symbol: "BTC",
150
147
  logoUrl: "https://static.tria.so/chain-logo-w/bitcoin.webp",
151
148
  },
152
149
  };
153
150
  const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
154
- exports.rpcUrls = {
151
+ export const rpcUrls = {
155
152
  MUMBAI: `https://polygon-mumbai.g.alchemy.com/v2/${alchemyKey}`, //'https://polygon-mumbai.blockpi.network/v1/rpc/public',
156
153
  ETH: "https://eth.llamarpc.com",
157
154
  POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
@@ -168,11 +165,11 @@ exports.rpcUrls = {
168
165
  "METIS-TESTNET": "https://goerli.gateway.metisdevops.link",
169
166
  MANTLE: "https://rpc.mantle.xyz",
170
167
  "MANTLE-TESTNET": "https://rpc.testnet.mantle.xyz",
171
- [chains_1.zkLink]: "https://rpc.zklink.io",
172
- [chains_1.zkLinkTestnet]: "https://goerli.rpc.zklink.io",
173
- [chains_1.bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
168
+ [zkLink]: "https://rpc.zklink.io",
169
+ [zkLinkTestnet]: "https://goerli.rpc.zklink.io",
170
+ [bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
174
171
  };
175
- exports.chainNameToChainId = {
172
+ export const chainNameToChainId = {
176
173
  MUMBAI: 80001,
177
174
  POLYGON: 137,
178
175
  ETH: 1,
@@ -189,11 +186,11 @@ exports.chainNameToChainId = {
189
186
  "METIS-TESTNET": 599,
190
187
  MANTLE: 5000,
191
188
  "MANTLE-TESTNET": 5001,
192
- [chains_1.zkLink]: 810180,
193
- [chains_1.zkLinkTestnet]: 810182,
194
- [chains_1.bitlayerTestnet]: 200810,
189
+ [zkLink]: 810180,
190
+ [zkLinkTestnet]: 810182,
191
+ [bitlayerTestnet]: 200810,
195
192
  };
196
- exports.chainIdToChainName = {
193
+ export const chainIdToChainName = {
197
194
  80001: "MUMBAI",
198
195
  137: "POLYGON",
199
196
  1: "ETH",
@@ -210,7 +207,7 @@ exports.chainIdToChainName = {
210
207
  599: "METIS-TESTNET",
211
208
  169: "MANTA",
212
209
  3441005: "MANTA-TESTNET",
213
- 810180: chains_1.zkLink,
214
- 810182: chains_1.zkLinkTestnet,
215
- 200810: chains_1.bitlayerTestnet,
210
+ 810180: zkLink,
211
+ 810182: zkLinkTestnet,
212
+ 200810: bitlayerTestnet,
216
213
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tria-sdk/constants",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
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,