@metamask-previews/controller-utils 12.3.0-preview-4f4c98e → 12.3.0-preview-5b293ee50
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/CHANGELOG.md +0 -4
- package/dist/abi.cjs +58 -0
- package/dist/abi.cjs.map +1 -0
- package/dist/{abi.d.ts → abi.d.cts} +3 -3
- package/dist/abi.d.cts.map +1 -0
- package/dist/abi.d.mts +16 -0
- package/dist/abi.d.mts.map +1 -0
- package/dist/{abi.js → abi.mjs} +3 -3
- package/dist/{abi.js.map → abi.mjs.map} +1 -1
- package/dist/constants.cjs +308 -0
- package/dist/constants.cjs.map +1 -0
- package/dist/{constants.d.ts → constants.d.cts} +3 -3
- package/dist/constants.d.cts.map +1 -0
- package/dist/constants.d.mts +283 -0
- package/dist/constants.d.mts.map +1 -0
- package/dist/{constants.js → constants.mjs} +2 -2
- package/dist/constants.mjs.map +1 -0
- package/dist/create-service-policy.cjs +250 -0
- package/dist/create-service-policy.cjs.map +1 -0
- package/dist/{create-service-policy.d.ts → create-service-policy.d.cts} +3 -3
- package/dist/create-service-policy.d.cts.map +1 -0
- package/dist/create-service-policy.d.mts +249 -0
- package/dist/create-service-policy.d.mts.map +1 -0
- package/dist/{create-service-policy.js → create-service-policy.mjs} +3 -3
- package/dist/create-service-policy.mjs.map +1 -0
- package/dist/index.cjs +102 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{index.d.ts → index.d.cts} +9 -9
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +9 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/{index.js → index.mjs} +7 -7
- package/dist/index.mjs.map +1 -0
- package/dist/logger.cjs +7 -0
- package/dist/logger.cjs.map +1 -0
- package/dist/logger.d.cts +5 -0
- package/dist/logger.d.cts.map +1 -0
- package/dist/logger.d.mts +5 -0
- package/dist/logger.d.mts.map +1 -0
- package/dist/logger.mjs +4 -0
- package/dist/logger.mjs.map +1 -0
- package/dist/siwe.cjs +131 -0
- package/dist/siwe.cjs.map +1 -0
- package/dist/{siwe.d.ts → siwe.d.cts} +2 -2
- package/dist/siwe.d.cts.map +1 -0
- package/dist/siwe.d.mts +69 -0
- package/dist/siwe.d.mts.map +1 -0
- package/dist/{siwe.js → siwe.mjs} +4 -4
- package/dist/siwe.mjs.map +1 -0
- package/dist/types.cjs +232 -0
- package/dist/types.cjs.map +1 -0
- package/dist/{types.d.ts → types.d.cts} +98 -98
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +267 -0
- package/dist/types.d.mts.map +1 -0
- package/dist/{types.js → types.mjs} +1 -1
- package/dist/types.mjs.map +1 -0
- package/dist/util.cjs +569 -0
- package/dist/util.cjs.map +1 -0
- package/dist/{util.d.ts → util.d.cts} +6 -6
- package/dist/util.d.cts.map +1 -0
- package/dist/util.d.mts +261 -0
- package/dist/util.d.mts.map +1 -0
- package/dist/{util.js → util.mjs} +18 -8
- package/dist/util.mjs.map +1 -0
- package/package.json +18 -14
- package/dist/abi.d.ts.map +0 -1
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js.map +0 -1
- package/dist/create-service-policy.d.ts.map +0 -1
- package/dist/create-service-policy.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/logger.d.ts +0 -4
- package/dist/logger.d.ts.map +0 -1
- package/dist/logger.js +0 -4
- package/dist/logger.js.map +0 -1
- package/dist/siwe.d.ts.map +0 -1
- package/dist/siwe.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/util.d.ts.map +0 -1
- package/dist/util.js.map +0 -1
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
* The names of built-in Infura networks
|
|
3
3
|
*/
|
|
4
4
|
export declare const InfuraNetworkType: {
|
|
5
|
-
readonly mainnet:
|
|
6
|
-
readonly goerli:
|
|
7
|
-
readonly sepolia:
|
|
8
|
-
readonly 'linea-goerli':
|
|
9
|
-
readonly 'linea-sepolia':
|
|
10
|
-
readonly 'linea-mainnet':
|
|
11
|
-
readonly 'base-mainnet':
|
|
12
|
-
readonly 'arbitrum-mainnet':
|
|
13
|
-
readonly 'bsc-mainnet':
|
|
14
|
-
readonly 'optimism-mainnet':
|
|
15
|
-
readonly 'polygon-mainnet':
|
|
16
|
-
readonly 'sei-mainnet':
|
|
17
|
-
readonly 'monad-mainnet':
|
|
18
|
-
readonly 'megaeth-mainnet':
|
|
19
|
-
readonly 'avalanche-mainnet':
|
|
20
|
-
readonly 'zksync-mainnet':
|
|
5
|
+
readonly mainnet: "mainnet";
|
|
6
|
+
readonly goerli: "goerli";
|
|
7
|
+
readonly sepolia: "sepolia";
|
|
8
|
+
readonly 'linea-goerli': "linea-goerli";
|
|
9
|
+
readonly 'linea-sepolia': "linea-sepolia";
|
|
10
|
+
readonly 'linea-mainnet': "linea-mainnet";
|
|
11
|
+
readonly 'base-mainnet': "base-mainnet";
|
|
12
|
+
readonly 'arbitrum-mainnet': "arbitrum-mainnet";
|
|
13
|
+
readonly 'bsc-mainnet': "bsc-mainnet";
|
|
14
|
+
readonly 'optimism-mainnet': "optimism-mainnet";
|
|
15
|
+
readonly 'polygon-mainnet': "polygon-mainnet";
|
|
16
|
+
readonly 'sei-mainnet': "sei-mainnet";
|
|
17
|
+
readonly 'monad-mainnet': "monad-mainnet";
|
|
18
|
+
readonly 'megaeth-mainnet': "megaeth-mainnet";
|
|
19
|
+
readonly 'avalanche-mainnet': "avalanche-mainnet";
|
|
20
|
+
readonly 'zksync-mainnet': "zksync-mainnet";
|
|
21
21
|
};
|
|
22
22
|
export type InfuraNetworkType = (typeof InfuraNetworkType)[keyof typeof InfuraNetworkType];
|
|
23
23
|
/**
|
|
@@ -34,9 +34,9 @@ export declare const CustomNetworkType: {
|
|
|
34
34
|
/**
|
|
35
35
|
* @deprecated `megaeth-testnet` is migrated to `megaeth-testnet-v2`.
|
|
36
36
|
*/
|
|
37
|
-
readonly 'megaeth-testnet':
|
|
38
|
-
readonly 'megaeth-testnet-v2':
|
|
39
|
-
readonly 'monad-testnet':
|
|
37
|
+
readonly 'megaeth-testnet': "megaeth-testnet";
|
|
38
|
+
readonly 'megaeth-testnet-v2': "megaeth-testnet-v2";
|
|
39
|
+
readonly 'monad-testnet': "monad-testnet";
|
|
40
40
|
};
|
|
41
41
|
export type CustomNetworkType = (typeof CustomNetworkType)[keyof typeof CustomNetworkType];
|
|
42
42
|
/**
|
|
@@ -47,29 +47,29 @@ export type BuiltInNetworkType = InfuraNetworkType | CustomNetworkType;
|
|
|
47
47
|
* The "network type"; either the name of a built-in network, or "rpc" for custom networks.
|
|
48
48
|
*/
|
|
49
49
|
export declare const NetworkType: {
|
|
50
|
-
readonly
|
|
51
|
-
readonly goerli: 'goerli';
|
|
52
|
-
readonly sepolia: 'sepolia';
|
|
53
|
-
readonly 'linea-goerli': 'linea-goerli';
|
|
54
|
-
readonly 'linea-sepolia': 'linea-sepolia';
|
|
55
|
-
readonly 'linea-mainnet': 'linea-mainnet';
|
|
56
|
-
readonly 'base-mainnet': 'base-mainnet';
|
|
57
|
-
readonly 'arbitrum-mainnet': 'arbitrum-mainnet';
|
|
58
|
-
readonly 'bsc-mainnet': 'bsc-mainnet';
|
|
59
|
-
readonly 'optimism-mainnet': 'optimism-mainnet';
|
|
60
|
-
readonly 'polygon-mainnet': 'polygon-mainnet';
|
|
61
|
-
readonly 'sei-mainnet': 'sei-mainnet';
|
|
62
|
-
readonly 'monad-mainnet': 'monad-mainnet';
|
|
63
|
-
readonly 'megaeth-mainnet': 'megaeth-mainnet';
|
|
64
|
-
readonly 'avalanche-mainnet': 'avalanche-mainnet';
|
|
65
|
-
readonly 'zksync-mainnet': 'zksync-mainnet';
|
|
50
|
+
readonly rpc: "rpc";
|
|
66
51
|
/**
|
|
67
52
|
* @deprecated `megaeth-testnet` is migrated to `megaeth-testnet-v2`.
|
|
68
53
|
*/
|
|
69
|
-
readonly 'megaeth-testnet':
|
|
70
|
-
readonly 'megaeth-testnet-v2':
|
|
71
|
-
readonly 'monad-testnet':
|
|
72
|
-
readonly
|
|
54
|
+
readonly 'megaeth-testnet': "megaeth-testnet";
|
|
55
|
+
readonly 'megaeth-testnet-v2': "megaeth-testnet-v2";
|
|
56
|
+
readonly 'monad-testnet': "monad-testnet";
|
|
57
|
+
readonly mainnet: "mainnet";
|
|
58
|
+
readonly goerli: "goerli";
|
|
59
|
+
readonly sepolia: "sepolia";
|
|
60
|
+
readonly 'linea-goerli': "linea-goerli";
|
|
61
|
+
readonly 'linea-sepolia': "linea-sepolia";
|
|
62
|
+
readonly 'linea-mainnet': "linea-mainnet";
|
|
63
|
+
readonly 'base-mainnet': "base-mainnet";
|
|
64
|
+
readonly 'arbitrum-mainnet': "arbitrum-mainnet";
|
|
65
|
+
readonly 'bsc-mainnet': "bsc-mainnet";
|
|
66
|
+
readonly 'optimism-mainnet': "optimism-mainnet";
|
|
67
|
+
readonly 'polygon-mainnet': "polygon-mainnet";
|
|
68
|
+
readonly 'sei-mainnet': "sei-mainnet";
|
|
69
|
+
readonly 'monad-mainnet': "monad-mainnet";
|
|
70
|
+
readonly 'megaeth-mainnet': "megaeth-mainnet";
|
|
71
|
+
readonly 'avalanche-mainnet': "avalanche-mainnet";
|
|
72
|
+
readonly 'zksync-mainnet': "zksync-mainnet";
|
|
73
73
|
};
|
|
74
74
|
export type NetworkType = (typeof NetworkType)[keyof typeof NetworkType];
|
|
75
75
|
/**
|
|
@@ -123,29 +123,29 @@ export declare enum BuiltInNetworkName {
|
|
|
123
123
|
* `toHex` not invoked to avoid cyclic dependency
|
|
124
124
|
*/
|
|
125
125
|
export declare const ChainId: {
|
|
126
|
-
readonly mainnet:
|
|
127
|
-
readonly goerli:
|
|
128
|
-
readonly sepolia:
|
|
129
|
-
readonly aurora:
|
|
130
|
-
readonly "linea-goerli":
|
|
131
|
-
readonly "linea-sepolia":
|
|
132
|
-
readonly "linea-mainnet":
|
|
126
|
+
readonly mainnet: "0x1";
|
|
127
|
+
readonly goerli: "0x5";
|
|
128
|
+
readonly sepolia: "0xaa36a7";
|
|
129
|
+
readonly aurora: "0x4e454152";
|
|
130
|
+
readonly "linea-goerli": "0xe704";
|
|
131
|
+
readonly "linea-sepolia": "0xe705";
|
|
132
|
+
readonly "linea-mainnet": "0xe708";
|
|
133
133
|
/**
|
|
134
134
|
* @deprecated `MegaETHTestnet` is migrated to `MegaETHTestnetV2`.
|
|
135
135
|
*/
|
|
136
|
-
readonly "megaeth-testnet":
|
|
137
|
-
readonly "megaeth-testnet-v2":
|
|
138
|
-
readonly "monad-testnet":
|
|
139
|
-
readonly "base-mainnet":
|
|
140
|
-
readonly "arbitrum-mainnet":
|
|
141
|
-
readonly "bsc-mainnet":
|
|
142
|
-
readonly "optimism-mainnet":
|
|
143
|
-
readonly "polygon-mainnet":
|
|
144
|
-
readonly "sei-mainnet":
|
|
145
|
-
readonly "megaeth-mainnet":
|
|
146
|
-
readonly "monad-mainnet":
|
|
147
|
-
readonly "avalanche-mainnet":
|
|
148
|
-
readonly "zksync-mainnet":
|
|
136
|
+
readonly "megaeth-testnet": "0x18c6";
|
|
137
|
+
readonly "megaeth-testnet-v2": "0x18c7";
|
|
138
|
+
readonly "monad-testnet": "0x279f";
|
|
139
|
+
readonly "base-mainnet": "0x2105";
|
|
140
|
+
readonly "arbitrum-mainnet": "0xa4b1";
|
|
141
|
+
readonly "bsc-mainnet": "0x38";
|
|
142
|
+
readonly "optimism-mainnet": "0xa";
|
|
143
|
+
readonly "polygon-mainnet": "0x89";
|
|
144
|
+
readonly "sei-mainnet": "0x531";
|
|
145
|
+
readonly "megaeth-mainnet": "0x10e6";
|
|
146
|
+
readonly "monad-mainnet": "0x8f";
|
|
147
|
+
readonly "avalanche-mainnet": "0xa86a";
|
|
148
|
+
readonly "zksync-mainnet": "0x144";
|
|
149
149
|
};
|
|
150
150
|
export type ChainId = (typeof ChainId)[keyof typeof ChainId];
|
|
151
151
|
export declare enum NetworksTicker {
|
|
@@ -174,53 +174,53 @@ export declare enum NetworksTicker {
|
|
|
174
174
|
rpc = ""
|
|
175
175
|
}
|
|
176
176
|
export declare const BlockExplorerUrl: {
|
|
177
|
-
readonly mainnet:
|
|
178
|
-
readonly goerli:
|
|
179
|
-
readonly sepolia:
|
|
180
|
-
readonly "linea-goerli":
|
|
181
|
-
readonly "linea-sepolia":
|
|
182
|
-
readonly "linea-mainnet":
|
|
177
|
+
readonly mainnet: "https://etherscan.io";
|
|
178
|
+
readonly goerli: "https://goerli.etherscan.io";
|
|
179
|
+
readonly sepolia: "https://sepolia.etherscan.io";
|
|
180
|
+
readonly "linea-goerli": "https://goerli.lineascan.build";
|
|
181
|
+
readonly "linea-sepolia": "https://sepolia.lineascan.build";
|
|
182
|
+
readonly "linea-mainnet": "https://lineascan.build";
|
|
183
183
|
/**
|
|
184
184
|
* @deprecated `MegaETHTestnet` is migrated to `MegaETHTestnetV2`.
|
|
185
185
|
*/
|
|
186
|
-
readonly "megaeth-testnet":
|
|
187
|
-
readonly "megaeth-testnet-v2":
|
|
188
|
-
readonly "monad-testnet":
|
|
189
|
-
readonly "base-mainnet":
|
|
190
|
-
readonly "arbitrum-mainnet":
|
|
191
|
-
readonly "bsc-mainnet":
|
|
192
|
-
readonly "optimism-mainnet":
|
|
193
|
-
readonly "polygon-mainnet":
|
|
194
|
-
readonly "sei-mainnet":
|
|
195
|
-
readonly "megaeth-mainnet":
|
|
196
|
-
readonly "monad-mainnet":
|
|
197
|
-
readonly "avalanche-mainnet":
|
|
198
|
-
readonly "zksync-mainnet":
|
|
186
|
+
readonly "megaeth-testnet": "https://megaexplorer.xyz";
|
|
187
|
+
readonly "megaeth-testnet-v2": "https://megaeth-testnet-v2.blockscout.com";
|
|
188
|
+
readonly "monad-testnet": "https://testnet.monadexplorer.com";
|
|
189
|
+
readonly "base-mainnet": "https://basescan.org";
|
|
190
|
+
readonly "arbitrum-mainnet": "https://arbiscan.io";
|
|
191
|
+
readonly "bsc-mainnet": "https://bscscan.com";
|
|
192
|
+
readonly "optimism-mainnet": "https://optimistic.etherscan.io";
|
|
193
|
+
readonly "polygon-mainnet": "https://polygonscan.com";
|
|
194
|
+
readonly "sei-mainnet": "https://seiscan.io";
|
|
195
|
+
readonly "megaeth-mainnet": "https://megaeth.blockscout.com";
|
|
196
|
+
readonly "monad-mainnet": "https://monadscan.com";
|
|
197
|
+
readonly "avalanche-mainnet": "https://snowtrace.io";
|
|
198
|
+
readonly "zksync-mainnet": "https://explorer.zksync.io";
|
|
199
199
|
};
|
|
200
200
|
export type BlockExplorerUrl = (typeof BlockExplorerUrl)[keyof typeof BlockExplorerUrl];
|
|
201
201
|
export declare const NetworkNickname: {
|
|
202
|
-
readonly mainnet:
|
|
203
|
-
readonly goerli:
|
|
204
|
-
readonly sepolia:
|
|
205
|
-
readonly "linea-goerli":
|
|
206
|
-
readonly "linea-sepolia":
|
|
207
|
-
readonly "linea-mainnet":
|
|
202
|
+
readonly mainnet: "Ethereum";
|
|
203
|
+
readonly goerli: "Goerli";
|
|
204
|
+
readonly sepolia: "Sepolia";
|
|
205
|
+
readonly "linea-goerli": "Linea Goerli";
|
|
206
|
+
readonly "linea-sepolia": "Linea Sepolia";
|
|
207
|
+
readonly "linea-mainnet": "Linea";
|
|
208
208
|
/**
|
|
209
209
|
* @deprecated `MegaETHTestnet` is migrated to `MegaETHTestnetV2`.
|
|
210
210
|
*/
|
|
211
|
-
readonly "megaeth-testnet":
|
|
212
|
-
readonly "megaeth-testnet-v2":
|
|
213
|
-
readonly "monad-testnet":
|
|
214
|
-
readonly "base-mainnet":
|
|
215
|
-
readonly "arbitrum-mainnet":
|
|
216
|
-
readonly "bsc-mainnet":
|
|
217
|
-
readonly "optimism-mainnet":
|
|
218
|
-
readonly "polygon-mainnet":
|
|
219
|
-
readonly "sei-mainnet":
|
|
220
|
-
readonly "megaeth-mainnet":
|
|
221
|
-
readonly "monad-mainnet":
|
|
222
|
-
readonly "avalanche-mainnet":
|
|
223
|
-
readonly "zksync-mainnet":
|
|
211
|
+
readonly "megaeth-testnet": "Mega Testnet";
|
|
212
|
+
readonly "megaeth-testnet-v2": "MegaETH Testnet";
|
|
213
|
+
readonly "monad-testnet": "Monad Testnet";
|
|
214
|
+
readonly "base-mainnet": "Base";
|
|
215
|
+
readonly "arbitrum-mainnet": "Arbitrum";
|
|
216
|
+
readonly "bsc-mainnet": "BNB Chain";
|
|
217
|
+
readonly "optimism-mainnet": "OP";
|
|
218
|
+
readonly "polygon-mainnet": "Polygon";
|
|
219
|
+
readonly "sei-mainnet": "Sei Mainnet";
|
|
220
|
+
readonly "megaeth-mainnet": "MegaETH Mainnet";
|
|
221
|
+
readonly "monad-mainnet": "Monad";
|
|
222
|
+
readonly "avalanche-mainnet": "Avalanche Mainnet";
|
|
223
|
+
readonly "zksync-mainnet": "ZKsync Era";
|
|
224
224
|
};
|
|
225
225
|
export type NetworkNickname = (typeof NetworkNickname)[keyof typeof NetworkNickname];
|
|
226
226
|
/**
|
|
@@ -264,4 +264,4 @@ request: TraceRequest,
|
|
|
264
264
|
* @param context - The context in which the operation is running.
|
|
265
265
|
*/
|
|
266
266
|
fn?: (context?: TraceContext) => ReturnType) => Promise<ReturnType>;
|
|
267
|
-
//# sourceMappingURL=types.d.
|
|
267
|
+
//# sourceMappingURL=types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;CAiBpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,+LAaI,CAAC;AAEzC;;GAEG;AACH,eAAO,MAAM,iBAAiB;IAC5B;;OAEG;;;;CAIK,CAAC;AACX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,iBAAiB,CAAC,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iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IAEjD;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,4DAA4D;AAC5D,MAAM,MAAM,aAAa,GAAG,CAAC,UAAU;AACrC,wDAAwD;AACxD,OAAO,EAAE,YAAY;AAErB;;;;;GAKG;AACH,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,YAAY,KAAK,UAAU,KACxC,OAAO,CAAC,UAAU,CAAC,CAAC"}
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The names of built-in Infura networks
|
|
3
|
+
*/
|
|
4
|
+
export declare const InfuraNetworkType: {
|
|
5
|
+
readonly mainnet: "mainnet";
|
|
6
|
+
readonly goerli: "goerli";
|
|
7
|
+
readonly sepolia: "sepolia";
|
|
8
|
+
readonly 'linea-goerli': "linea-goerli";
|
|
9
|
+
readonly 'linea-sepolia': "linea-sepolia";
|
|
10
|
+
readonly 'linea-mainnet': "linea-mainnet";
|
|
11
|
+
readonly 'base-mainnet': "base-mainnet";
|
|
12
|
+
readonly 'arbitrum-mainnet': "arbitrum-mainnet";
|
|
13
|
+
readonly 'bsc-mainnet': "bsc-mainnet";
|
|
14
|
+
readonly 'optimism-mainnet': "optimism-mainnet";
|
|
15
|
+
readonly 'polygon-mainnet': "polygon-mainnet";
|
|
16
|
+
readonly 'sei-mainnet': "sei-mainnet";
|
|
17
|
+
readonly 'monad-mainnet': "monad-mainnet";
|
|
18
|
+
readonly 'megaeth-mainnet': "megaeth-mainnet";
|
|
19
|
+
readonly 'avalanche-mainnet': "avalanche-mainnet";
|
|
20
|
+
readonly 'zksync-mainnet': "zksync-mainnet";
|
|
21
|
+
};
|
|
22
|
+
export type InfuraNetworkType = (typeof InfuraNetworkType)[keyof typeof InfuraNetworkType];
|
|
23
|
+
/**
|
|
24
|
+
* The default set of Infura networks to include in the wallet.
|
|
25
|
+
*
|
|
26
|
+
* This is a subset of the full list of {@link InfuraNetworkType}, and can be used to determine
|
|
27
|
+
* which Infura networks to enable by default.
|
|
28
|
+
*/
|
|
29
|
+
export declare const DEFAULT_INFURA_NETWORKS: ["mainnet", "goerli", "sepolia", "linea-goerli", "linea-sepolia", "linea-mainnet", "base-mainnet", "arbitrum-mainnet", "bsc-mainnet", "optimism-mainnet", "polygon-mainnet", "monad-mainnet"];
|
|
30
|
+
/**
|
|
31
|
+
* Custom network types that are not part of Infura.
|
|
32
|
+
*/
|
|
33
|
+
export declare const CustomNetworkType: {
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated `megaeth-testnet` is migrated to `megaeth-testnet-v2`.
|
|
36
|
+
*/
|
|
37
|
+
readonly 'megaeth-testnet': "megaeth-testnet";
|
|
38
|
+
readonly 'megaeth-testnet-v2': "megaeth-testnet-v2";
|
|
39
|
+
readonly 'monad-testnet': "monad-testnet";
|
|
40
|
+
};
|
|
41
|
+
export type CustomNetworkType = (typeof CustomNetworkType)[keyof typeof CustomNetworkType];
|
|
42
|
+
/**
|
|
43
|
+
* Network types supported including both Infura networks and other networks.
|
|
44
|
+
*/
|
|
45
|
+
export type BuiltInNetworkType = InfuraNetworkType | CustomNetworkType;
|
|
46
|
+
/**
|
|
47
|
+
* The "network type"; either the name of a built-in network, or "rpc" for custom networks.
|
|
48
|
+
*/
|
|
49
|
+
export declare const NetworkType: {
|
|
50
|
+
readonly rpc: "rpc";
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated `megaeth-testnet` is migrated to `megaeth-testnet-v2`.
|
|
53
|
+
*/
|
|
54
|
+
readonly 'megaeth-testnet': "megaeth-testnet";
|
|
55
|
+
readonly 'megaeth-testnet-v2': "megaeth-testnet-v2";
|
|
56
|
+
readonly 'monad-testnet': "monad-testnet";
|
|
57
|
+
readonly mainnet: "mainnet";
|
|
58
|
+
readonly goerli: "goerli";
|
|
59
|
+
readonly sepolia: "sepolia";
|
|
60
|
+
readonly 'linea-goerli': "linea-goerli";
|
|
61
|
+
readonly 'linea-sepolia': "linea-sepolia";
|
|
62
|
+
readonly 'linea-mainnet': "linea-mainnet";
|
|
63
|
+
readonly 'base-mainnet': "base-mainnet";
|
|
64
|
+
readonly 'arbitrum-mainnet': "arbitrum-mainnet";
|
|
65
|
+
readonly 'bsc-mainnet': "bsc-mainnet";
|
|
66
|
+
readonly 'optimism-mainnet': "optimism-mainnet";
|
|
67
|
+
readonly 'polygon-mainnet': "polygon-mainnet";
|
|
68
|
+
readonly 'sei-mainnet': "sei-mainnet";
|
|
69
|
+
readonly 'monad-mainnet': "monad-mainnet";
|
|
70
|
+
readonly 'megaeth-mainnet': "megaeth-mainnet";
|
|
71
|
+
readonly 'avalanche-mainnet': "avalanche-mainnet";
|
|
72
|
+
readonly 'zksync-mainnet': "zksync-mainnet";
|
|
73
|
+
};
|
|
74
|
+
export type NetworkType = (typeof NetworkType)[keyof typeof NetworkType];
|
|
75
|
+
/**
|
|
76
|
+
* A helper to determine whether a given input is NetworkType.
|
|
77
|
+
*
|
|
78
|
+
* @param val - the value to check whether it is NetworkType or not.
|
|
79
|
+
* @returns boolean indicating whether or not the argument is NetworkType.
|
|
80
|
+
*/
|
|
81
|
+
export declare function isNetworkType(val: string): val is NetworkType;
|
|
82
|
+
/**
|
|
83
|
+
* A type guard to determine whether the input is an InfuraNetworkType.
|
|
84
|
+
*
|
|
85
|
+
* @param value - The value to check.
|
|
86
|
+
* @returns True if the given value is within the InfuraNetworkType enum,
|
|
87
|
+
* false otherwise.
|
|
88
|
+
*/
|
|
89
|
+
export declare function isInfuraNetworkType(value: unknown): value is InfuraNetworkType;
|
|
90
|
+
/**
|
|
91
|
+
* Names of networks built into the wallet.
|
|
92
|
+
*
|
|
93
|
+
* This includes both Infura and non-Infura networks.
|
|
94
|
+
*/
|
|
95
|
+
export declare enum BuiltInNetworkName {
|
|
96
|
+
Mainnet = "mainnet",
|
|
97
|
+
Goerli = "goerli",
|
|
98
|
+
Sepolia = "sepolia",
|
|
99
|
+
LineaGoerli = "linea-goerli",
|
|
100
|
+
LineaSepolia = "linea-sepolia",
|
|
101
|
+
LineaMainnet = "linea-mainnet",
|
|
102
|
+
Aurora = "aurora",
|
|
103
|
+
/**
|
|
104
|
+
* @deprecated `MegaETHTestnet` is migrated to `MegaETHTestnetV2`.
|
|
105
|
+
*/
|
|
106
|
+
MegaETHTestnet = "megaeth-testnet",
|
|
107
|
+
MegaETHTestnetV2 = "megaeth-testnet-v2",
|
|
108
|
+
MonadTestnet = "monad-testnet",
|
|
109
|
+
BaseMainnet = "base-mainnet",
|
|
110
|
+
ArbitrumOne = "arbitrum-mainnet",
|
|
111
|
+
BscMainnet = "bsc-mainnet",
|
|
112
|
+
OptimismMainnet = "optimism-mainnet",
|
|
113
|
+
PolygonMainnet = "polygon-mainnet",
|
|
114
|
+
SeiMainnet = "sei-mainnet",
|
|
115
|
+
MegaETHMainnet = "megaeth-mainnet",
|
|
116
|
+
MonadMainnet = "monad-mainnet",
|
|
117
|
+
AvalancheMainnet = "avalanche-mainnet",
|
|
118
|
+
ZksyncMainnet = "zksync-mainnet"
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Decimal string chain IDs of built-in networks, by name.
|
|
122
|
+
*
|
|
123
|
+
* `toHex` not invoked to avoid cyclic dependency
|
|
124
|
+
*/
|
|
125
|
+
export declare const ChainId: {
|
|
126
|
+
readonly mainnet: "0x1";
|
|
127
|
+
readonly goerli: "0x5";
|
|
128
|
+
readonly sepolia: "0xaa36a7";
|
|
129
|
+
readonly aurora: "0x4e454152";
|
|
130
|
+
readonly "linea-goerli": "0xe704";
|
|
131
|
+
readonly "linea-sepolia": "0xe705";
|
|
132
|
+
readonly "linea-mainnet": "0xe708";
|
|
133
|
+
/**
|
|
134
|
+
* @deprecated `MegaETHTestnet` is migrated to `MegaETHTestnetV2`.
|
|
135
|
+
*/
|
|
136
|
+
readonly "megaeth-testnet": "0x18c6";
|
|
137
|
+
readonly "megaeth-testnet-v2": "0x18c7";
|
|
138
|
+
readonly "monad-testnet": "0x279f";
|
|
139
|
+
readonly "base-mainnet": "0x2105";
|
|
140
|
+
readonly "arbitrum-mainnet": "0xa4b1";
|
|
141
|
+
readonly "bsc-mainnet": "0x38";
|
|
142
|
+
readonly "optimism-mainnet": "0xa";
|
|
143
|
+
readonly "polygon-mainnet": "0x89";
|
|
144
|
+
readonly "sei-mainnet": "0x531";
|
|
145
|
+
readonly "megaeth-mainnet": "0x10e6";
|
|
146
|
+
readonly "monad-mainnet": "0x8f";
|
|
147
|
+
readonly "avalanche-mainnet": "0xa86a";
|
|
148
|
+
readonly "zksync-mainnet": "0x144";
|
|
149
|
+
};
|
|
150
|
+
export type ChainId = (typeof ChainId)[keyof typeof ChainId];
|
|
151
|
+
export declare enum NetworksTicker {
|
|
152
|
+
mainnet = "ETH",
|
|
153
|
+
goerli = "GoerliETH",
|
|
154
|
+
sepolia = "SepoliaETH",
|
|
155
|
+
'linea-goerli' = "LineaETH",
|
|
156
|
+
'linea-sepolia' = "LineaETH",
|
|
157
|
+
'linea-mainnet' = "ETH",
|
|
158
|
+
/**
|
|
159
|
+
* @deprecated `megaeth-testnet` is migrated to `megaeth-testnet-v2`.
|
|
160
|
+
*/
|
|
161
|
+
'megaeth-testnet' = "MegaETH",
|
|
162
|
+
'megaeth-testnet-v2' = "MegaETH",
|
|
163
|
+
'monad-testnet' = "MON",
|
|
164
|
+
'base-mainnet' = "ETH",
|
|
165
|
+
'arbitrum-mainnet' = "ETH",
|
|
166
|
+
'bsc-mainnet' = "BNB",
|
|
167
|
+
'optimism-mainnet' = "ETH",
|
|
168
|
+
'polygon-mainnet' = "POL",
|
|
169
|
+
'sei-mainnet' = "SEI",
|
|
170
|
+
'megaeth-mainnet' = "ETH",
|
|
171
|
+
'monad-mainnet' = "MON",
|
|
172
|
+
'avalanche-mainnet' = "AVAX",
|
|
173
|
+
'zksync-mainnet' = "ETH",
|
|
174
|
+
rpc = ""
|
|
175
|
+
}
|
|
176
|
+
export declare const BlockExplorerUrl: {
|
|
177
|
+
readonly mainnet: "https://etherscan.io";
|
|
178
|
+
readonly goerli: "https://goerli.etherscan.io";
|
|
179
|
+
readonly sepolia: "https://sepolia.etherscan.io";
|
|
180
|
+
readonly "linea-goerli": "https://goerli.lineascan.build";
|
|
181
|
+
readonly "linea-sepolia": "https://sepolia.lineascan.build";
|
|
182
|
+
readonly "linea-mainnet": "https://lineascan.build";
|
|
183
|
+
/**
|
|
184
|
+
* @deprecated `MegaETHTestnet` is migrated to `MegaETHTestnetV2`.
|
|
185
|
+
*/
|
|
186
|
+
readonly "megaeth-testnet": "https://megaexplorer.xyz";
|
|
187
|
+
readonly "megaeth-testnet-v2": "https://megaeth-testnet-v2.blockscout.com";
|
|
188
|
+
readonly "monad-testnet": "https://testnet.monadexplorer.com";
|
|
189
|
+
readonly "base-mainnet": "https://basescan.org";
|
|
190
|
+
readonly "arbitrum-mainnet": "https://arbiscan.io";
|
|
191
|
+
readonly "bsc-mainnet": "https://bscscan.com";
|
|
192
|
+
readonly "optimism-mainnet": "https://optimistic.etherscan.io";
|
|
193
|
+
readonly "polygon-mainnet": "https://polygonscan.com";
|
|
194
|
+
readonly "sei-mainnet": "https://seiscan.io";
|
|
195
|
+
readonly "megaeth-mainnet": "https://megaeth.blockscout.com";
|
|
196
|
+
readonly "monad-mainnet": "https://monadscan.com";
|
|
197
|
+
readonly "avalanche-mainnet": "https://snowtrace.io";
|
|
198
|
+
readonly "zksync-mainnet": "https://explorer.zksync.io";
|
|
199
|
+
};
|
|
200
|
+
export type BlockExplorerUrl = (typeof BlockExplorerUrl)[keyof typeof BlockExplorerUrl];
|
|
201
|
+
export declare const NetworkNickname: {
|
|
202
|
+
readonly mainnet: "Ethereum";
|
|
203
|
+
readonly goerli: "Goerli";
|
|
204
|
+
readonly sepolia: "Sepolia";
|
|
205
|
+
readonly "linea-goerli": "Linea Goerli";
|
|
206
|
+
readonly "linea-sepolia": "Linea Sepolia";
|
|
207
|
+
readonly "linea-mainnet": "Linea";
|
|
208
|
+
/**
|
|
209
|
+
* @deprecated `MegaETHTestnet` is migrated to `MegaETHTestnetV2`.
|
|
210
|
+
*/
|
|
211
|
+
readonly "megaeth-testnet": "Mega Testnet";
|
|
212
|
+
readonly "megaeth-testnet-v2": "MegaETH Testnet";
|
|
213
|
+
readonly "monad-testnet": "Monad Testnet";
|
|
214
|
+
readonly "base-mainnet": "Base";
|
|
215
|
+
readonly "arbitrum-mainnet": "Arbitrum";
|
|
216
|
+
readonly "bsc-mainnet": "BNB Chain";
|
|
217
|
+
readonly "optimism-mainnet": "OP";
|
|
218
|
+
readonly "polygon-mainnet": "Polygon";
|
|
219
|
+
readonly "sei-mainnet": "Sei Mainnet";
|
|
220
|
+
readonly "megaeth-mainnet": "MegaETH Mainnet";
|
|
221
|
+
readonly "monad-mainnet": "Monad";
|
|
222
|
+
readonly "avalanche-mainnet": "Avalanche Mainnet";
|
|
223
|
+
readonly "zksync-mainnet": "ZKsync Era";
|
|
224
|
+
};
|
|
225
|
+
export type NetworkNickname = (typeof NetworkNickname)[keyof typeof NetworkNickname];
|
|
226
|
+
/**
|
|
227
|
+
* Makes a selection of keys in a Record optional.
|
|
228
|
+
*
|
|
229
|
+
* @template Type - The Record that you want to operate on.
|
|
230
|
+
* @template Key - The union of keys you want to make optional.
|
|
231
|
+
*/
|
|
232
|
+
export type Partialize<Type, Key extends keyof Type> = Omit<Type, Key> & Partial<Pick<Type, Key>>;
|
|
233
|
+
/** A context in which to execute a trace, in order to generate nested timings. */
|
|
234
|
+
export type TraceContext = unknown;
|
|
235
|
+
/** Request to trace an operation. */
|
|
236
|
+
export type TraceRequest = {
|
|
237
|
+
/** Additional data to include in the trace. */
|
|
238
|
+
data?: Record<string, number | string | boolean>;
|
|
239
|
+
/** Name of the operation. */
|
|
240
|
+
name: string;
|
|
241
|
+
/**
|
|
242
|
+
* Unique identifier for the trace.
|
|
243
|
+
* Required if starting a trace and not providing a callback.
|
|
244
|
+
*/
|
|
245
|
+
id?: string;
|
|
246
|
+
/** Trace context in which to execute the operation. */
|
|
247
|
+
parentContext?: TraceContext;
|
|
248
|
+
/** Additional tags to include in the trace to filter results. */
|
|
249
|
+
tags?: Record<string, number | string | boolean>;
|
|
250
|
+
/**
|
|
251
|
+
* Override the start time of the trace, in milliseconds.
|
|
252
|
+
* Useful to backdate a span when the traced work has already completed.
|
|
253
|
+
*/
|
|
254
|
+
startTime?: number;
|
|
255
|
+
};
|
|
256
|
+
/** Callback that traces the performance of an operation. */
|
|
257
|
+
export type TraceCallback = <ReturnType>(
|
|
258
|
+
/** Request to trace the performance of an operation. */
|
|
259
|
+
request: TraceRequest,
|
|
260
|
+
/**
|
|
261
|
+
* Callback to trace.
|
|
262
|
+
* Thrown errors will not be caught, but the trace will still be recorded.
|
|
263
|
+
*
|
|
264
|
+
* @param context - The context in which the operation is running.
|
|
265
|
+
*/
|
|
266
|
+
fn?: (context?: TraceContext) => ReturnType) => Promise<ReturnType>;
|
|
267
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;CAiBpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,+LAaI,CAAC;AAEzC;;GAEG;AACH,eAAO,MAAM,iBAAiB;IAC5B;;OAEG;;;;CAIK,CAAC;AACX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG,iBAA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AAM;IACxC,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,UAAU;IAC5C,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE,WAAW;IAC5C,CAAC,kBAAkB,CAAC,eAAe,CAAC,EAAE,IAAI;IAC1C,CAAC,kBAAkB,CAAC,cAAc,CAAC,EAAE,SAAS;IAC9C,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE,aAAa;IAC9C,CAAC,kBAAkB,CAAC,cAAc,CAAC,EAAE,iBAAiB;IACtD,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAE,OAAO;IAC1C,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,EAAE,mBAAmB;IAC1D,CAAC,kBAAkB,CAAC,aAAa,CAAC,EAAE,YAAY;CACK,CAAC","sourcesContent":["/**\n * The names of built-in Infura networks\n */\nexport const InfuraNetworkType = {\n mainnet: 'mainnet',\n goerli: 'goerli',\n sepolia: 'sepolia',\n 'linea-goerli': 'linea-goerli',\n 'linea-sepolia': 'linea-sepolia',\n 'linea-mainnet': 'linea-mainnet',\n 'base-mainnet': 'base-mainnet',\n 'arbitrum-mainnet': 'arbitrum-mainnet',\n 'bsc-mainnet': 'bsc-mainnet',\n 'optimism-mainnet': 'optimism-mainnet',\n 'polygon-mainnet': 'polygon-mainnet',\n 'sei-mainnet': 'sei-mainnet',\n 'monad-mainnet': 'monad-mainnet',\n 'megaeth-mainnet': 'megaeth-mainnet',\n 'avalanche-mainnet': 'avalanche-mainnet',\n 'zksync-mainnet': 'zksync-mainnet',\n} as const;\n\nexport type InfuraNetworkType =\n (typeof InfuraNetworkType)[keyof typeof InfuraNetworkType];\n\n/**\n * The default set of Infura networks to include in the wallet.\n *\n * This is a subset of the full list of {@link InfuraNetworkType}, and can be used to determine\n * which Infura networks to enable by default.\n */\nexport const DEFAULT_INFURA_NETWORKS = [\n InfuraNetworkType.mainnet,\n InfuraNetworkType.goerli,\n InfuraNetworkType.sepolia,\n InfuraNetworkType['linea-goerli'],\n InfuraNetworkType['linea-sepolia'],\n InfuraNetworkType['linea-mainnet'],\n InfuraNetworkType['base-mainnet'],\n InfuraNetworkType['arbitrum-mainnet'],\n InfuraNetworkType['bsc-mainnet'],\n InfuraNetworkType['optimism-mainnet'],\n InfuraNetworkType['polygon-mainnet'],\n InfuraNetworkType['monad-mainnet'],\n] as const satisfies InfuraNetworkType[];\n\n/**\n * Custom network types that are not part of Infura.\n */\nexport const CustomNetworkType = {\n /**\n * @deprecated `megaeth-testnet` is migrated to `megaeth-testnet-v2`.\n */\n 'megaeth-testnet': 'megaeth-testnet',\n 'megaeth-testnet-v2': 'megaeth-testnet-v2',\n 'monad-testnet': 'monad-testnet',\n} as const;\nexport type CustomNetworkType =\n (typeof CustomNetworkType)[keyof typeof CustomNetworkType];\n\n/**\n * Network types supported including both Infura networks and other networks.\n */\nexport type BuiltInNetworkType = InfuraNetworkType | CustomNetworkType;\n\n/**\n * The \"network type\"; either the name of a built-in network, or \"rpc\" for custom networks.\n */\nexport const NetworkType = {\n ...InfuraNetworkType,\n ...CustomNetworkType,\n rpc: 'rpc',\n} as const;\n\nexport type NetworkType = (typeof NetworkType)[keyof typeof NetworkType];\n\n/**\n * A helper to determine whether a given input is NetworkType.\n *\n * @param val - the value to check whether it is NetworkType or not.\n * @returns boolean indicating whether or not the argument is NetworkType.\n */\nexport function isNetworkType(val: string): val is NetworkType {\n return Object.values(NetworkType).includes(val as NetworkType);\n}\n\n/**\n * A type guard to determine whether the input is an InfuraNetworkType.\n *\n * @param value - The value to check.\n * @returns True if the given value is within the InfuraNetworkType enum,\n * false otherwise.\n */\nexport function isInfuraNetworkType(\n value: unknown,\n): value is InfuraNetworkType {\n const infuraNetworkTypes: unknown[] = Object.keys(InfuraNetworkType);\n return infuraNetworkTypes.includes(value);\n}\n\n/**\n * Names of networks built into the wallet.\n *\n * This includes both Infura and non-Infura networks.\n */\nexport enum BuiltInNetworkName {\n Mainnet = 'mainnet',\n Goerli = 'goerli',\n Sepolia = 'sepolia',\n LineaGoerli = 'linea-goerli',\n LineaSepolia = 'linea-sepolia',\n LineaMainnet = 'linea-mainnet',\n Aurora = 'aurora',\n /**\n * @deprecated `MegaETHTestnet` is migrated to `MegaETHTestnetV2`.\n */\n MegaETHTestnet = 'megaeth-testnet',\n MegaETHTestnetV2 = 'megaeth-testnet-v2',\n MonadTestnet = 'monad-testnet',\n BaseMainnet = 'base-mainnet',\n ArbitrumOne = 'arbitrum-mainnet',\n BscMainnet = 'bsc-mainnet',\n OptimismMainnet = 'optimism-mainnet',\n PolygonMainnet = 'polygon-mainnet',\n SeiMainnet = 'sei-mainnet',\n MegaETHMainnet = 'megaeth-mainnet',\n MonadMainnet = 'monad-mainnet',\n AvalancheMainnet = 'avalanche-mainnet',\n ZksyncMainnet = 'zksync-mainnet',\n}\n\n/**\n * Decimal string chain IDs of built-in networks, by name.\n *\n * `toHex` not invoked to avoid cyclic dependency\n */\nexport const ChainId = {\n [BuiltInNetworkName.Mainnet]: '0x1', // toHex(1)\n [BuiltInNetworkName.Goerli]: '0x5', // toHex(5)\n [BuiltInNetworkName.Sepolia]: '0xaa36a7', // toHex(11155111)\n [BuiltInNetworkName.Aurora]: '0x4e454152', // toHex(1313161554)\n [BuiltInNetworkName.LineaGoerli]: '0xe704', // toHex(59140)\n [BuiltInNetworkName.LineaSepolia]: '0xe705', // toHex(59141)\n [BuiltInNetworkName.LineaMainnet]: '0xe708', // toHex(59144)\n /**\n * @deprecated `MegaETHTestnet` is migrated to `MegaETHTestnetV2`.\n */\n [BuiltInNetworkName.MegaETHTestnet]: '0x18c6', // toHex(6342)\n [BuiltInNetworkName.MegaETHTestnetV2]: '0x18c7', // toHex(6343)\n [BuiltInNetworkName.MonadTestnet]: '0x279f', // toHex(10143)\n [BuiltInNetworkName.BaseMainnet]: '0x2105', // toHex(8453)\n [BuiltInNetworkName.ArbitrumOne]: '0xa4b1', // toHex(42161)\n [BuiltInNetworkName.BscMainnet]: '0x38', // toHex(56)\n [BuiltInNetworkName.OptimismMainnet]: '0xa', // toHex(10)\n [BuiltInNetworkName.PolygonMainnet]: '0x89', // toHex(137)\n [BuiltInNetworkName.SeiMainnet]: '0x531', // toHex(1329)\n [BuiltInNetworkName.MegaETHMainnet]: '0x10e6', // toHex(4326)\n [BuiltInNetworkName.MonadMainnet]: '0x8f', // toHex(143)\n [BuiltInNetworkName.AvalancheMainnet]: '0xa86a', // toHex(43114)\n [BuiltInNetworkName.ZksyncMainnet]: '0x144', // toHex(324)\n} as const;\nexport type ChainId = (typeof ChainId)[keyof typeof ChainId];\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum NetworksTicker {\n mainnet = 'ETH',\n goerli = 'GoerliETH',\n sepolia = 'SepoliaETH',\n 'linea-goerli' = 'LineaETH',\n // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values\n 'linea-sepolia' = 'LineaETH',\n // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values\n 'linea-mainnet' = 'ETH',\n /**\n * @deprecated `megaeth-testnet` is migrated to `megaeth-testnet-v2`.\n */\n 'megaeth-testnet' = 'MegaETH',\n // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values\n 'megaeth-testnet-v2' = 'MegaETH',\n 'monad-testnet' = 'MON',\n // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values\n 'base-mainnet' = 'ETH',\n // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values\n 'arbitrum-mainnet' = 'ETH',\n 'bsc-mainnet' = 'BNB',\n // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values\n 'optimism-mainnet' = 'ETH',\n 'polygon-mainnet' = 'POL',\n 'sei-mainnet' = 'SEI',\n // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values\n 'megaeth-mainnet' = 'ETH',\n // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values\n 'monad-mainnet' = 'MON',\n 'avalanche-mainnet' = 'AVAX',\n // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values\n 'zksync-mainnet' = 'ETH',\n rpc = '',\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport const BlockExplorerUrl = {\n [BuiltInNetworkName.Mainnet]: 'https://etherscan.io',\n [BuiltInNetworkName.Goerli]: 'https://goerli.etherscan.io',\n [BuiltInNetworkName.Sepolia]: 'https://sepolia.etherscan.io',\n [BuiltInNetworkName.LineaGoerli]: 'https://goerli.lineascan.build',\n [BuiltInNetworkName.LineaSepolia]: 'https://sepolia.lineascan.build',\n [BuiltInNetworkName.LineaMainnet]: 'https://lineascan.build',\n /**\n * @deprecated `MegaETHTestnet` is migrated to `MegaETHTestnetV2`.\n */\n [BuiltInNetworkName.MegaETHTestnet]: 'https://megaexplorer.xyz',\n [BuiltInNetworkName.MegaETHTestnetV2]:\n 'https://megaeth-testnet-v2.blockscout.com',\n [BuiltInNetworkName.MonadTestnet]: 'https://testnet.monadexplorer.com',\n [BuiltInNetworkName.BaseMainnet]: 'https://basescan.org',\n [BuiltInNetworkName.ArbitrumOne]: 'https://arbiscan.io',\n [BuiltInNetworkName.BscMainnet]: 'https://bscscan.com',\n [BuiltInNetworkName.OptimismMainnet]: 'https://optimistic.etherscan.io',\n [BuiltInNetworkName.PolygonMainnet]: 'https://polygonscan.com',\n [BuiltInNetworkName.SeiMainnet]: 'https://seiscan.io',\n [BuiltInNetworkName.MegaETHMainnet]: 'https://megaeth.blockscout.com',\n [BuiltInNetworkName.MonadMainnet]: 'https://monadscan.com',\n [BuiltInNetworkName.AvalancheMainnet]: 'https://snowtrace.io',\n [BuiltInNetworkName.ZksyncMainnet]: 'https://explorer.zksync.io',\n} as const satisfies Record<BuiltInNetworkType, string>;\nexport type BlockExplorerUrl =\n (typeof BlockExplorerUrl)[keyof typeof BlockExplorerUrl];\n\nexport const NetworkNickname = {\n [BuiltInNetworkName.Mainnet]: 'Ethereum',\n [BuiltInNetworkName.Goerli]: 'Goerli',\n [BuiltInNetworkName.Sepolia]: 'Sepolia',\n [BuiltInNetworkName.LineaGoerli]: 'Linea Goerli',\n [BuiltInNetworkName.LineaSepolia]: 'Linea Sepolia',\n [BuiltInNetworkName.LineaMainnet]: 'Linea',\n /**\n * @deprecated `MegaETHTestnet` is migrated to `MegaETHTestnetV2`.\n */\n [BuiltInNetworkName.MegaETHTestnet]: 'Mega Testnet',\n [BuiltInNetworkName.MegaETHTestnetV2]: 'MegaETH Testnet',\n [BuiltInNetworkName.MonadTestnet]: 'Monad Testnet',\n [BuiltInNetworkName.BaseMainnet]: 'Base',\n [BuiltInNetworkName.ArbitrumOne]: 'Arbitrum',\n [BuiltInNetworkName.BscMainnet]: 'BNB Chain',\n [BuiltInNetworkName.OptimismMainnet]: 'OP',\n [BuiltInNetworkName.PolygonMainnet]: 'Polygon',\n [BuiltInNetworkName.SeiMainnet]: 'Sei Mainnet',\n [BuiltInNetworkName.MegaETHMainnet]: 'MegaETH Mainnet',\n [BuiltInNetworkName.MonadMainnet]: 'Monad',\n [BuiltInNetworkName.AvalancheMainnet]: 'Avalanche Mainnet',\n [BuiltInNetworkName.ZksyncMainnet]: 'ZKsync Era',\n} as const satisfies Record<BuiltInNetworkType, string>;\nexport type NetworkNickname =\n (typeof NetworkNickname)[keyof typeof NetworkNickname];\n\n/**\n * Makes a selection of keys in a Record optional.\n *\n * @template Type - The Record that you want to operate on.\n * @template Key - The union of keys you want to make optional.\n */\n// TODO: Move to @metamask/utils\nexport type Partialize<Type, Key extends keyof Type> = Omit<Type, Key> &\n Partial<Pick<Type, Key>>;\n\n/** A context in which to execute a trace, in order to generate nested timings. */\nexport type TraceContext = unknown;\n\n/** Request to trace an operation. */\nexport type TraceRequest = {\n /** Additional data to include in the trace. */\n data?: Record<string, number | string | boolean>;\n\n /** Name of the operation. */\n name: string;\n\n /**\n * Unique identifier for the trace.\n * Required if starting a trace and not providing a callback.\n */\n id?: string;\n\n /** Trace context in which to execute the operation. */\n parentContext?: TraceContext;\n\n /** Additional tags to include in the trace to filter results. */\n tags?: Record<string, number | string | boolean>;\n\n /**\n * Override the start time of the trace, in milliseconds.\n * Useful to backdate a span when the traced work has already completed.\n */\n startTime?: number;\n};\n\n/** Callback that traces the performance of an operation. */\nexport type TraceCallback = <ReturnType>(\n /** Request to trace the performance of an operation. */\n request: TraceRequest,\n\n /**\n * Callback to trace.\n * Thrown errors will not be caught, but the trace will still be recorded.\n *\n * @param context - The context in which the operation is running.\n */\n fn?: (context?: TraceContext) => ReturnType,\n) => Promise<ReturnType>;\n"]}
|