@tria-sdk/constants 1.0.2 → 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.
@@ -0,0 +1,4 @@
1
+ export * from "./src/config";
2
+ export * from "./src/chains";
3
+ export * from "./src/txn";
4
+ export * from "./src/connect";
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
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);
@@ -0,0 +1,60 @@
1
+ export declare const zkLink = "ZKLINK-NOVA";
2
+ export declare const zkLinkTestnet = "ZKLINK-NOVA-TESTNET";
3
+ export declare const bitlayerTestnet = "BITLAYER-TESTNET";
4
+ export type ZKLINK = "ZKLINK-NOVA";
5
+ export type ZKLINK_TESTNET = "ZKLINK-NOVA-TESTNET";
6
+ export type BITLAYER_TESTNET = "BITLAYER-TESTNET";
7
+ export declare const TESTNET_CHAINS: string[];
8
+ export declare const SUPPORTED_EVM_CHAINS: string[];
9
+ export declare const AA_SUPPORTED_EVM_CHAINS: string[];
10
+ export declare const ALLCHAINS: string[];
11
+ export declare const networks: {
12
+ chainName: string;
13
+ logo: string;
14
+ }[];
15
+ export declare const chainNameToLogo: {
16
+ ETH: string;
17
+ FANTOM: string;
18
+ POLYGON: string;
19
+ AVALANCHE: string;
20
+ OPTIMISM: string;
21
+ ARBITRUM: string;
22
+ LINEA: string;
23
+ MUMBAI: string;
24
+ FUSE: string;
25
+ FUSESPARK: string;
26
+ BINANCE: string;
27
+ MANTA: string;
28
+ "MANTA-TESTNET": string;
29
+ METIS: string;
30
+ "METIS-TESTNET": string;
31
+ MANTLE: string;
32
+ "MANTLE-TESTNET": string;
33
+ SOLANA: string;
34
+ "ZKLINK-NOVA": string;
35
+ "ZKLINK-NOVA-TESTNET": string;
36
+ "BITLAYER-TESTNET": string;
37
+ };
38
+ export declare const chainNameToLogoBlack: {
39
+ ETH: string;
40
+ BINANCE: string;
41
+ FANTOM: string;
42
+ POLYGON: string;
43
+ AVALANCHE: string;
44
+ OPTIMISM: string;
45
+ ARBITRUM: string;
46
+ LINEA: string;
47
+ MUMBAI: string;
48
+ FUSE: string;
49
+ FUSESPARK: string;
50
+ MANTA: string;
51
+ "MANTA-TESTNET": string;
52
+ METIS: string;
53
+ "METIS-TESTNET": string;
54
+ MANTLE: string;
55
+ "MANTLE-TESTNET": string;
56
+ SOLANA: string;
57
+ "ZKLINK-NOVA": string;
58
+ "ZKLINK-NOVA-TESTNET": string;
59
+ "BITLAYER-TESTNET": string;
60
+ };
@@ -0,0 +1,203 @@
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 = [
8
+ "MUMBAI",
9
+ "FUSESPARK",
10
+ "MANTA-TESTNET",
11
+ "METIS-TESTNET",
12
+ "MANTLE-TESTNET",
13
+ exports.zkLinkTestnet,
14
+ exports.bitlayerTestnet,
15
+ ];
16
+ exports.SUPPORTED_EVM_CHAINS = [
17
+ "ETH",
18
+ "POLYGON",
19
+ "AVALANCHE",
20
+ "ARBITRUM",
21
+ "BINANCE",
22
+ "OPTIMISM",
23
+ "FANTOM",
24
+ "FUSE",
25
+ "FUSESPARK",
26
+ "MUMBAI",
27
+ "MANTA",
28
+ "MANTA-TESTNET",
29
+ "METIS",
30
+ "METIS-TESTNET",
31
+ "MANTLE",
32
+ "MANTLE-TESTNET",
33
+ exports.zkLink,
34
+ exports.zkLinkTestnet,
35
+ exports.bitlayerTestnet,
36
+ ];
37
+ exports.AA_SUPPORTED_EVM_CHAINS = [
38
+ "ETH",
39
+ "POLYGON",
40
+ "AVALANCHE",
41
+ "ARBITRUM",
42
+ "BINANCE",
43
+ "OPTIMISM",
44
+ "FANTOM",
45
+ "FUSE",
46
+ "MUMBAI",
47
+ ];
48
+ exports.ALLCHAINS = [
49
+ "ETH",
50
+ "POLYGON",
51
+ "AVALANCHE",
52
+ "ARBITRUM",
53
+ "BINANCE",
54
+ "OPTIMISM",
55
+ "FANTOM",
56
+ "FUSE",
57
+ "FUSESPARK",
58
+ "MUMBAI",
59
+ "MANTA",
60
+ "MANTA-TESTNET",
61
+ "METIS",
62
+ "METIS-TESTNET",
63
+ "MANTLE",
64
+ "MANTLE-TESTNET",
65
+ "SOLANA",
66
+ exports.zkLink,
67
+ exports.zkLinkTestnet,
68
+ exports.bitlayerTestnet,
69
+ ];
70
+ const baseLogoUrl = "https://static.tria.so/chain-logo-w";
71
+ const baseLogoUrlBlack = "https://static.tria.so/chain-logo-b";
72
+ exports.networks = [
73
+ {
74
+ chainName: "ETH",
75
+ logo: `${baseLogoUrl}/Ethereum.webp`,
76
+ },
77
+ {
78
+ chainName: "FANTOM",
79
+ logo: `${baseLogoUrl}/Fantom.webp`,
80
+ },
81
+ {
82
+ chainName: "POLYGON",
83
+ logo: `${baseLogoUrl}/Polygon.svg`,
84
+ },
85
+ {
86
+ chainName: "AVALANCHE",
87
+ logo: `${baseLogoUrl}/Avalanche.webp`,
88
+ },
89
+ {
90
+ chainName: "OPTIMISM",
91
+ logo: `${baseLogoUrl}/Optimism.webp`,
92
+ },
93
+ {
94
+ chainName: "ARBITRUM",
95
+ logo: `${baseLogoUrl}/Arbitrum.webp`,
96
+ },
97
+ {
98
+ chainName: "FUSE",
99
+ logo: `${baseLogoUrl}/Fuse.webp`,
100
+ },
101
+ {
102
+ chainName: "FUSESPARK",
103
+ logo: `${baseLogoUrl}/Fuse.webp`,
104
+ },
105
+ {
106
+ chainName: "MUMBAI",
107
+ logo: `${baseLogoUrl}/Polygon.svg`,
108
+ },
109
+ {
110
+ chainName: "BINANCE",
111
+ logo: `${baseLogoUrl}/Binance.svg`,
112
+ },
113
+ // {
114
+ // chainName: 'LINEA',
115
+ // logo: `${baseLogoUrl}/Linea.svg`,
116
+ // },
117
+ {
118
+ chainName: "METIS",
119
+ logo: `${baseLogoUrl}/Metis.webp`,
120
+ },
121
+ {
122
+ chainName: "METIS-TESTNET",
123
+ logo: `${baseLogoUrl}/Metis.webp`,
124
+ },
125
+ {
126
+ chainName: "MANTA",
127
+ logo: `${baseLogoUrl}/Manta.webp`,
128
+ },
129
+ {
130
+ chainName: "MANTA-TESTNET",
131
+ logo: `${baseLogoUrl}/Manta.webp`,
132
+ },
133
+ {
134
+ chainName: "MANTLE",
135
+ logo: `${baseLogoUrl}/Mantle.webp`,
136
+ },
137
+ {
138
+ chainName: "MANTLE-TESTNET",
139
+ logo: `${baseLogoUrl}/Mantle.webp`,
140
+ },
141
+ {
142
+ chainName: "SOLANA",
143
+ logo: `${baseLogoUrl}/Solana.webp`,
144
+ },
145
+ {
146
+ chainName: exports.zkLink,
147
+ logo: ``,
148
+ },
149
+ {
150
+ chainName: exports.zkLinkTestnet,
151
+ logo: ``,
152
+ },
153
+ {
154
+ chainName: exports.bitlayerTestnet,
155
+ logo: ``,
156
+ },
157
+ ];
158
+ exports.chainNameToLogo = {
159
+ ETH: `${baseLogoUrl}/Ethereum.webp`,
160
+ FANTOM: `${baseLogoUrl}/Fantom.webp`,
161
+ POLYGON: `${baseLogoUrl}/Polygon.webp`,
162
+ AVALANCHE: `${baseLogoUrl}/Avalanche.webp`,
163
+ OPTIMISM: `${baseLogoUrl}/Optimism.webp`,
164
+ ARBITRUM: `${baseLogoUrl}/Arbitrum.webp`,
165
+ LINEA: `${baseLogoUrl}/Linea.webp`,
166
+ MUMBAI: `${baseLogoUrl}/Polygon.webp`,
167
+ FUSE: `${baseLogoUrl}/Fuse.webp`,
168
+ FUSESPARK: `${baseLogoUrl}/Fuse.webp`,
169
+ BINANCE: `${baseLogoUrl}/Binance.svg`,
170
+ MANTA: `${baseLogoUrl}/Manta.webp`,
171
+ "MANTA-TESTNET": `${baseLogoUrl}/Manta.webp`,
172
+ METIS: `${baseLogoUrl}/Metis.webp`,
173
+ "METIS-TESTNET": `${baseLogoUrl}/Metis.webp`,
174
+ MANTLE: `${baseLogoUrl}/Mantle.webp`,
175
+ "MANTLE-TESTNET": `${baseLogoUrl}/Mantle.webp`,
176
+ SOLANA: `${baseLogoUrl}/Solana.webp`,
177
+ [exports.zkLink]: `${baseLogoUrl}/Ethereum.webp`,
178
+ [exports.zkLinkTestnet]: `${baseLogoUrl}/Ethereum.webp`,
179
+ [exports.bitlayerTestnet]: `${baseLogoUrl}/Ethereum.webp`,
180
+ };
181
+ exports.chainNameToLogoBlack = {
182
+ ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
183
+ BINANCE: `${baseLogoUrlBlack}/binance.webp`,
184
+ FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
185
+ POLYGON: `${baseLogoUrlBlack}/Polygon.webp`,
186
+ AVALANCHE: `${baseLogoUrlBlack}/Avalanche.webp`,
187
+ OPTIMISM: `${baseLogoUrlBlack}/Optimism.webp`,
188
+ ARBITRUM: `${baseLogoUrlBlack}/Arbitrum.webp`,
189
+ LINEA: `${baseLogoUrlBlack}/Linea.webp`,
190
+ MUMBAI: `${baseLogoUrlBlack}/Polygon.webp`,
191
+ FUSE: `${baseLogoUrlBlack}/fuse.webp`,
192
+ FUSESPARK: `${baseLogoUrlBlack}/fuse.webp`,
193
+ MANTA: `${baseLogoUrlBlack}/Manta.webp`,
194
+ "MANTA-TESTNET": `${baseLogoUrlBlack}/Manta.webp`,
195
+ METIS: `${baseLogoUrlBlack}/Metis.webp`,
196
+ "METIS-TESTNET": `${baseLogoUrlBlack}/Metis.webp`,
197
+ MANTLE: `${baseLogoUrlBlack}/Mantle.webp`,
198
+ "MANTLE-TESTNET": `${baseLogoUrlBlack}/Mantle.webp`,
199
+ SOLANA: `${baseLogoUrlBlack}/Solana.webp`,
200
+ [exports.zkLink]: `${baseLogoUrlBlack}/Ethereum.webp`,
201
+ [exports.zkLinkTestnet]: `${baseLogoUrlBlack}/Ethereum.webp`,
202
+ [exports.bitlayerTestnet]: `${baseLogoUrlBlack}/Ethereum.webp`,
203
+ };
@@ -0,0 +1,5 @@
1
+ export declare const prodApiUrl = "https://prod.tria.so";
2
+ export declare const isEvmChain: (chainName: string) => boolean;
3
+ export declare const isAaSupportedChain: (chainName: string) => boolean;
4
+ export declare const isChainSupported: (chainName: string) => boolean;
5
+ export declare const isTestnetChain: (chainName: string) => boolean;
@@ -0,0 +1,21 @@
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);
8
+ };
9
+ exports.isEvmChain = isEvmChain;
10
+ const isAaSupportedChain = (chainName) => {
11
+ return chains_1.AA_SUPPORTED_EVM_CHAINS.includes(chainName);
12
+ };
13
+ exports.isAaSupportedChain = isAaSupportedChain;
14
+ const isChainSupported = (chainName) => {
15
+ return chains_1.ALLCHAINS.includes(chainName);
16
+ };
17
+ exports.isChainSupported = isChainSupported;
18
+ const isTestnetChain = (chainName) => {
19
+ return chains_1.TESTNET_CHAINS.includes(chainName);
20
+ };
21
+ exports.isTestnetChain = isTestnetChain;
@@ -0,0 +1,23 @@
1
+ export declare const eventTypes: {
2
+ logIn: string;
3
+ triaSignUp: string;
4
+ socialSignUp: string;
5
+ signMessage: string;
6
+ send: string;
7
+ disconnect: string;
8
+ switchChain: string;
9
+ detected: string;
10
+ logout: string;
11
+ passMessage: string;
12
+ accessToken: string;
13
+ idTokenPass: string;
14
+ saveToAuth: string;
15
+ };
16
+ export declare const TRIA_WALLET_STORE = "tria.wallet.store";
17
+ export declare const TRIA_WALLET_SELECTED_CHAIN = "tria.wallet.selectedChain";
18
+ export declare const storageKeys: {
19
+ TRIA_WALLET_STORE: string;
20
+ TRIA_WALLET_SELECTED_CHAIN: string;
21
+ PERSIST_ROOT: string;
22
+ };
23
+ export declare const triaAuthUrl = "https://auth.tria.so";
@@ -0,0 +1,27 @@
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 = {
5
+ logIn: "Log in",
6
+ triaSignUp: "Tria Sign up",
7
+ socialSignUp: "Social Sign up",
8
+ signMessage: "Sign Message",
9
+ send: "Send",
10
+ disconnect: "Disconnect",
11
+ switchChain: "Switch chain",
12
+ detected: "Detected Logged in Tria account",
13
+ logout: "Logout",
14
+ passMessage: "Pass Message",
15
+ accessToken: "Access Token Pass",
16
+ idTokenPass: "Id Token Pass",
17
+ saveToAuth: "Save to Auth Iframe",
18
+ };
19
+ exports.TRIA_WALLET_STORE = "tria.wallet.store";
20
+ exports.TRIA_WALLET_SELECTED_CHAIN = "tria.wallet.selectedChain";
21
+ exports.storageKeys = {
22
+ TRIA_WALLET_STORE: "tria.wallet.store",
23
+ TRIA_WALLET_SELECTED_CHAIN: "tria.wallet.selectedChain",
24
+ PERSIST_ROOT: "persist:root",
25
+ };
26
+ exports.triaAuthUrl = "https://auth.tria.so";
27
+ // export const PARENT_URL = document?.referrer || window?.parent?.[0]?.location?.ancestorOrigins?.[0];
@@ -0,0 +1,211 @@
1
+ export declare const explorerBaseUrls: {
2
+ ETH: string;
3
+ POLYGON: string;
4
+ AVALANCHE: string;
5
+ ARBITRUM: string;
6
+ BINANCE: string;
7
+ OPTIMISM: string;
8
+ FANTOM: string;
9
+ SOLANA: string;
10
+ APTOS: string;
11
+ NEO: string;
12
+ SUI: string;
13
+ FUSE: string;
14
+ FUSESPARK: string;
15
+ MUMBAI: string;
16
+ METIS: string;
17
+ "METIS-TESTNET": string;
18
+ MANTLE: string;
19
+ "MANTLE-TESTNET": string;
20
+ MANTA: string;
21
+ "MANTA-TESTNET": string;
22
+ "ZKLINK-NOVA": string;
23
+ "ZKLINK-NOVA-TESTNET": string;
24
+ "BITLAYER-TESTNET": string;
25
+ };
26
+ export declare const txnBaseUrl: {
27
+ ETH: string;
28
+ POLYGON: string;
29
+ AVALANCHE: string;
30
+ ARBITRUM: string;
31
+ BINANCE: string;
32
+ OPTIMISM: string;
33
+ FANTOM: string;
34
+ FUSE: string;
35
+ FUSESPARK: string;
36
+ MUMBAI: string;
37
+ METIS: string;
38
+ "METIS-TESTNET": string;
39
+ MANTLE: string;
40
+ "MANTLE-TESTNET": string;
41
+ MANTA: string;
42
+ "MANTA-TESTNET": string;
43
+ "ZKLINK-NOVA": string;
44
+ "ZKLINK-NOVA-TESTNET": string;
45
+ "BITLAYER-TESTNET": string;
46
+ };
47
+ export declare const nativeTokenDetails: {
48
+ ETH: {
49
+ name: string;
50
+ symbol: string;
51
+ logoUrl: string;
52
+ };
53
+ POLYGON: {
54
+ name: string;
55
+ symbol: string;
56
+ logoUrl: string;
57
+ };
58
+ AVALANCHE: {
59
+ name: string;
60
+ symbol: string;
61
+ logoUrl: string;
62
+ };
63
+ ARBITRUM: {
64
+ name: string;
65
+ symbol: string;
66
+ logoUrl: string;
67
+ };
68
+ BINANCE: {
69
+ name: string;
70
+ symbol: string;
71
+ logoUrl: string;
72
+ };
73
+ OPTIMISM: {
74
+ name: string;
75
+ symbol: string;
76
+ logoUrl: string;
77
+ };
78
+ FANTOM: {
79
+ name: string;
80
+ symbol: string;
81
+ logoUrl: string;
82
+ };
83
+ FUSE: {
84
+ name: string;
85
+ symbol: string;
86
+ logoUrl: string;
87
+ };
88
+ FUSESPARK: {
89
+ name: string;
90
+ symbol: string;
91
+ logoUrl: string;
92
+ };
93
+ MUMBAI: {
94
+ name: string;
95
+ symbol: string;
96
+ logoUrl: string;
97
+ };
98
+ METIS: {
99
+ name: string;
100
+ symbol: string;
101
+ logoUrl: string;
102
+ };
103
+ "METIS-TESTNET": {
104
+ name: string;
105
+ symbol: string;
106
+ logoUrl: string;
107
+ };
108
+ MANTLE: {
109
+ name: string;
110
+ symbol: string;
111
+ logoUrl: string;
112
+ };
113
+ "MANTLE-TESTNET": {
114
+ name: string;
115
+ symbol: string;
116
+ logoUrl: string;
117
+ };
118
+ MANTA: {
119
+ name: string;
120
+ symbol: string;
121
+ logoUrl: string;
122
+ };
123
+ "MANTA-TESTNET": {
124
+ name: string;
125
+ symbol: string;
126
+ logoUrl: string;
127
+ };
128
+ SOLANA: {
129
+ name: string;
130
+ symbol: string;
131
+ logoUrl: string;
132
+ };
133
+ "ZKLINK-NOVA": {
134
+ name: string;
135
+ symbol: string;
136
+ logoUrl: string;
137
+ };
138
+ "ZKLINK-NOVA-TESTNET": {
139
+ name: string;
140
+ symbol: string;
141
+ logoUrl: string;
142
+ };
143
+ "BITLAYER-TESTNET": {
144
+ name: string;
145
+ symbol: string;
146
+ logoUrl: string;
147
+ };
148
+ };
149
+ export declare const rpcUrls: {
150
+ MUMBAI: string;
151
+ ETH: string;
152
+ POLYGON: string;
153
+ AVALANCHE: string;
154
+ ARBITRUM: string;
155
+ BINANCE: string;
156
+ OPTIMISM: string;
157
+ FANTOM: string;
158
+ FUSE: string;
159
+ FUSESPARK: string;
160
+ MANTA: string;
161
+ "MANTA-TESTNET": string;
162
+ METIS: string;
163
+ "METIS-TESTNET": string;
164
+ MANTLE: string;
165
+ "MANTLE-TESTNET": string;
166
+ "ZKLINK-NOVA": string;
167
+ "ZKLINK-NOVA-TESTNET": string;
168
+ "BITLAYER-TESTNET": string;
169
+ };
170
+ export declare const chainNameToChainId: {
171
+ MUMBAI: number;
172
+ POLYGON: number;
173
+ ETH: number;
174
+ AVALANCHE: number;
175
+ ARBITRUM: number;
176
+ BINANCE: number;
177
+ OPTIMISM: number;
178
+ FANTOM: number;
179
+ FUSE: number;
180
+ FUSESPARK: number;
181
+ MANTA: number;
182
+ "MANTA-TESTNET": number;
183
+ METIS: number;
184
+ "METIS-TESTNET": number;
185
+ MANTLE: number;
186
+ "MANTLE-TESTNET": number;
187
+ "ZKLINK-NOVA": number;
188
+ "ZKLINK-NOVA-TESTNET": number;
189
+ "BITLAYER-TESTNET": number;
190
+ };
191
+ export declare const chainIdToChainName: {
192
+ 80001: string;
193
+ 137: string;
194
+ 1: string;
195
+ 43114: string;
196
+ 42161: string;
197
+ 56: string;
198
+ 10: string;
199
+ 250: string;
200
+ 122: string;
201
+ 123: string;
202
+ 5000: string;
203
+ 5001: string;
204
+ 1088: string;
205
+ 599: string;
206
+ 169: string;
207
+ 3441005: string;
208
+ 810180: string;
209
+ 810182: string;
210
+ 200810: string;
211
+ };
@@ -0,0 +1,216 @@
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 = {
6
+ ETH: "https://etherscan.io",
7
+ POLYGON: "https://polygonscan.com",
8
+ AVALANCHE: "https://snowtrace.io",
9
+ ARBITRUM: "https://arbiscan.io",
10
+ BINANCE: "https://bscscan.com",
11
+ OPTIMISM: "https://optimistic.etherscan.io",
12
+ FANTOM: "https://ftmscan.com",
13
+ SOLANA: "https://solscan.io",
14
+ APTOS: "https://explorer.aptoslabs.com",
15
+ NEO: "https://neo3.neotube.io",
16
+ SUI: "https://suiexplorer.com/?network=mainnet",
17
+ FUSE: "https://explorer.fuse.io",
18
+ FUSESPARK: "https://explorer.fusespark.io",
19
+ MUMBAI: "https://mumbai.polygonscan.com",
20
+ METIS: "https://andromeda-explorer.metis.io",
21
+ "METIS-TESTNET": "https://sepolia.explorer.metisdevops.link",
22
+ MANTLE: "https://explorer.mantle.xyz",
23
+ "MANTLE-TESTNET": "https://explorer.testnet.mantle.xyz",
24
+ MANTA: "https://pacific-explorer.manta.network",
25
+ "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
+ };
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`,
50
+ };
51
+ exports.nativeTokenDetails = {
52
+ ETH: {
53
+ name: "Ether",
54
+ symbol: "ETH",
55
+ logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
56
+ },
57
+ POLYGON: {
58
+ name: "Matic Token",
59
+ symbol: "MATIC",
60
+ logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
61
+ },
62
+ AVALANCHE: {
63
+ name: "Avalanche Coin",
64
+ symbol: "AVAX",
65
+ logoUrl: "https://www.datocms-assets.com/86369/1686152997-avalanche-colour.png",
66
+ },
67
+ ARBITRUM: {
68
+ name: "Arbitrum Mainnet Ether",
69
+ symbol: "ETH",
70
+ logoUrl: "https://www.datocms-assets.com/86369/1669925028-arbitrum.png",
71
+ },
72
+ BINANCE: {
73
+ name: "Binance Coin",
74
+ symbol: "BNB",
75
+ logoUrl: "https://www.datocms-assets.com/86369/1670003837-biance-smart-chain-colour.png",
76
+ },
77
+ OPTIMISM: {
78
+ name: "Ether",
79
+ symbol: "ETH",
80
+ logoUrl: "https://www.datocms-assets.com/86369/1670347461-optimisim-colour.png",
81
+ },
82
+ FANTOM: {
83
+ name: "Fantom",
84
+ symbol: "FTM",
85
+ logoUrl: "https://www.datocms-assets.com/86369/1669925359-fantom-1.png",
86
+ },
87
+ FUSE: {
88
+ name: "Fuse",
89
+ symbol: "FUSE",
90
+ logoUrl: "https://assets.coingecko.com/coins/images/10347/standard/fuse.png",
91
+ },
92
+ FUSESPARK: {
93
+ name: "Spark",
94
+ symbol: "SPARK",
95
+ logoUrl: "https://assets.coingecko.com/coins/images/10347/standard/fuse.png",
96
+ },
97
+ MUMBAI: {
98
+ name: "Matic Token",
99
+ symbol: "MATIC",
100
+ logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
101
+ },
102
+ METIS: {
103
+ name: "Metis Token",
104
+ symbol: "METIS",
105
+ logoUrl: "https://static.tria.so/chain-logo-w/Metis.webp",
106
+ },
107
+ "METIS-TESTNET": {
108
+ name: "Metis Token",
109
+ symbol: "METIS",
110
+ logoUrl: "https://static.tria.so/chain-logo-w/Metis.webp",
111
+ },
112
+ MANTLE: {
113
+ name: "Mantle",
114
+ symbol: "MNT",
115
+ logoUrl: "https://static.tria.so/chain-logo-w/Mantle.webp",
116
+ },
117
+ "MANTLE-TESTNET": {
118
+ name: "Mantle",
119
+ symbol: "MNT",
120
+ logoUrl: "https://static.tria.so/chain-logo-w/Mantle.webp",
121
+ },
122
+ MANTA: {
123
+ name: "Ether",
124
+ symbol: "ETH",
125
+ logoUrl: "https://static.tria.so/chain-logo-w/Manta.webp",
126
+ },
127
+ "MANTA-TESTNET": {
128
+ name: "Ether",
129
+ symbol: "ETH",
130
+ logoUrl: "https://static.tria.so/chain-logo-w/Manta.webp",
131
+ },
132
+ SOLANA: {
133
+ name: "Solana",
134
+ symbol: "SOL",
135
+ logoUrl: "https://static.tria.so/chain-logo-w/Solana.webp",
136
+ },
137
+ [chains_1.zkLink]: {
138
+ name: "Ether",
139
+ symbol: "ETH",
140
+ logoUrl: "https://static.tria.so/chain-logo-w/Ethereum.webp",
141
+ },
142
+ [chains_1.zkLinkTestnet]: {
143
+ name: "Ether",
144
+ symbol: "ETH",
145
+ logoUrl: "https://static.tria.so/chain-logo-w/bitcoin.webp",
146
+ },
147
+ [chains_1.bitlayerTestnet]: {
148
+ name: "Bitcoin",
149
+ symbol: "BTC",
150
+ logoUrl: "https://static.tria.so/chain-logo-w/bitcoin.webp",
151
+ },
152
+ };
153
+ const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
154
+ exports.rpcUrls = {
155
+ MUMBAI: `https://polygon-mumbai.g.alchemy.com/v2/${alchemyKey}`, //'https://polygon-mumbai.blockpi.network/v1/rpc/public',
156
+ ETH: "https://eth.llamarpc.com",
157
+ POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
158
+ AVALANCHE: "https://avalanche-c-chain.publicnode.com",
159
+ ARBITRUM: "https://arbitrum-one.publicnode.com",
160
+ BINANCE: "https://bsc.publicnode.com",
161
+ OPTIMISM: "https://optimism.meowrpc.com",
162
+ FANTOM: "https://fantom.publicnode.com",
163
+ FUSE: "https://rpc.fuse.io",
164
+ FUSESPARK: "https://rpc.fusespark.io",
165
+ MANTA: "https://1rpc.io/manta",
166
+ "MANTA-TESTNET": "https://manta-testnet.calderachain.xyz/http",
167
+ METIS: "https://metis-pokt.nodies.app",
168
+ "METIS-TESTNET": "https://goerli.gateway.metisdevops.link",
169
+ MANTLE: "https://rpc.mantle.xyz",
170
+ "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",
174
+ };
175
+ exports.chainNameToChainId = {
176
+ MUMBAI: 80001,
177
+ POLYGON: 137,
178
+ ETH: 1,
179
+ AVALANCHE: 43114,
180
+ ARBITRUM: 42161,
181
+ BINANCE: 56,
182
+ OPTIMISM: 10,
183
+ FANTOM: 250,
184
+ FUSE: 122,
185
+ FUSESPARK: 123,
186
+ MANTA: 169,
187
+ "MANTA-TESTNET": 3441005,
188
+ METIS: 1088,
189
+ "METIS-TESTNET": 599,
190
+ MANTLE: 5000,
191
+ "MANTLE-TESTNET": 5001,
192
+ [chains_1.zkLink]: 810180,
193
+ [chains_1.zkLinkTestnet]: 810182,
194
+ [chains_1.bitlayerTestnet]: 200810,
195
+ };
196
+ exports.chainIdToChainName = {
197
+ 80001: "MUMBAI",
198
+ 137: "POLYGON",
199
+ 1: "ETH",
200
+ 43114: "AVALANCHE",
201
+ 42161: "ARBITRUM",
202
+ 56: "BINANCE",
203
+ 10: "OPTIMISM",
204
+ 250: "FANTOM",
205
+ 122: "FUSE",
206
+ 123: "FUSESPARK",
207
+ 5000: "MANTLE",
208
+ 5001: "MANTLE-TESTNET",
209
+ 1088: "METIS",
210
+ 599: "METIS-TESTNET",
211
+ 169: "MANTA",
212
+ 3441005: "MANTA-TESTNET",
213
+ 810180: chains_1.zkLink,
214
+ 810182: chains_1.zkLinkTestnet,
215
+ 200810: chains_1.bitlayerTestnet,
216
+ };
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@tria-sdk/constants",
3
- "version": "1.0.2",
3
+ "version": "1.0.7",
4
4
  "description": "",
5
- "main": "index.js",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
6
7
  "scripts": {
7
8
  "test": "echo \"Error: no test specified\" && exit 1",
8
9
  "build": "tsc --project tsconfig.json"
package/tsconfig.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "ES2022", // "CommonJS",
3
+ "target": "ES6",
4
+ "module": "CommonJS", // "CommonJS",
5
+ "lib": ["ES2022"],
5
6
  "skipLibCheck": true,
6
7
  "strict": true,
7
8
  "esModuleInterop": true,
@@ -12,5 +13,5 @@
12
13
  "declaration": true
13
14
  },
14
15
  "include": ["**/*.ts", "**/*.js"],
15
- "exclude": ["**/*.d.ts"]
16
+ "exclude": ["tests", "**/*.d.ts", "**/extra.ts"]
16
17
  }