@tria-sdk/constants 1.0.6 → 1.0.7

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