@hyperlane-xyz/sdk 1.3.8 → 1.4.1

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.
Files changed (85) hide show
  1. package/dist/consts/chainMetadata.d.ts +73 -304
  2. package/dist/consts/chainMetadata.d.ts.map +1 -1
  3. package/dist/consts/chainMetadata.js +176 -211
  4. package/dist/consts/chainMetadata.js.map +1 -1
  5. package/dist/consts/environments/index.d.ts +35 -18
  6. package/dist/consts/environments/index.d.ts.map +1 -1
  7. package/dist/consts/environments/index.js.map +1 -1
  8. package/dist/consts/environments/mainnet.json +19 -18
  9. package/dist/consts/environments/testnet.json +19 -17
  10. package/dist/core/HyperlaneCoreChecker.d.ts.map +1 -1
  11. package/dist/core/HyperlaneCoreChecker.js +2 -1
  12. package/dist/core/HyperlaneCoreChecker.js.map +1 -1
  13. package/dist/core/HyperlaneCoreDeployer.d.ts +1 -1
  14. package/dist/core/HyperlaneCoreDeployer.d.ts.map +1 -1
  15. package/dist/core/HyperlaneCoreDeployer.js +10 -16
  16. package/dist/core/HyperlaneCoreDeployer.js.map +1 -1
  17. package/dist/gas/token-prices.d.ts +56 -2
  18. package/dist/gas/token-prices.d.ts.map +1 -1
  19. package/dist/gas/token-prices.js.map +1 -1
  20. package/dist/hook/HyperlaneHookDeployer.d.ts +17 -0
  21. package/dist/hook/HyperlaneHookDeployer.d.ts.map +1 -0
  22. package/dist/hook/HyperlaneHookDeployer.js +116 -0
  23. package/dist/hook/HyperlaneHookDeployer.js.map +1 -0
  24. package/dist/hook/config.d.ts +4 -0
  25. package/dist/hook/config.d.ts.map +1 -0
  26. package/dist/hook/config.js +9 -0
  27. package/dist/hook/config.js.map +1 -0
  28. package/dist/hook/contracts.d.ts +20 -0
  29. package/dist/hook/contracts.d.ts.map +1 -0
  30. package/dist/hook/contracts.js +15 -0
  31. package/dist/hook/contracts.js.map +1 -0
  32. package/dist/hook/types.d.ts +17 -0
  33. package/dist/hook/types.d.ts.map +1 -0
  34. package/dist/hook/types.js +9 -0
  35. package/dist/hook/types.js.map +1 -0
  36. package/dist/index.d.ts +9 -5
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +31 -18
  39. package/dist/index.js.map +1 -1
  40. package/dist/ism/HyperlaneIsmFactory.d.ts +1 -1
  41. package/dist/ism/HyperlaneIsmFactory.d.ts.map +1 -1
  42. package/dist/ism/HyperlaneIsmFactory.js +13 -9
  43. package/dist/ism/HyperlaneIsmFactory.js.map +1 -1
  44. package/dist/metadata/agentConfig.d.ts +344 -0
  45. package/dist/metadata/agentConfig.d.ts.map +1 -0
  46. package/dist/metadata/agentConfig.js +77 -0
  47. package/dist/metadata/agentConfig.js.map +1 -0
  48. package/dist/metadata/chainMetadata.test.d.ts.map +1 -0
  49. package/dist/metadata/chainMetadata.test.js +43 -0
  50. package/dist/metadata/chainMetadata.test.js.map +1 -0
  51. package/dist/metadata/chainMetadataTypes.d.ts +242 -0
  52. package/dist/metadata/chainMetadataTypes.d.ts.map +1 -0
  53. package/dist/metadata/chainMetadataTypes.js +170 -0
  54. package/dist/metadata/chainMetadataTypes.js.map +1 -0
  55. package/dist/metadata/deploymentArtifacts.d.ts +249 -0
  56. package/dist/metadata/deploymentArtifacts.d.ts.map +1 -0
  57. package/dist/metadata/deploymentArtifacts.js +20 -0
  58. package/dist/metadata/deploymentArtifacts.js.map +1 -0
  59. package/dist/middleware/account/InterchainAccountDeployer.js +1 -1
  60. package/dist/middleware/account/InterchainAccountDeployer.js.map +1 -1
  61. package/dist/providers/MultiProvider.d.ts +2 -2
  62. package/dist/providers/MultiProvider.d.ts.map +1 -1
  63. package/dist/providers/MultiProvider.js +9 -8
  64. package/dist/providers/MultiProvider.js.map +1 -1
  65. package/dist/utils/objects.d.ts +2 -0
  66. package/dist/utils/objects.d.ts.map +1 -1
  67. package/dist/utils/objects.js +10 -2
  68. package/dist/utils/objects.js.map +1 -1
  69. package/dist/utils/wagmi.d.ts +3 -1
  70. package/dist/utils/wagmi.d.ts.map +1 -1
  71. package/dist/utils/wagmi.js +6 -3
  72. package/dist/utils/wagmi.js.map +1 -1
  73. package/logos/black/eclipse.svg +3 -0
  74. package/logos/black/solana.svg +1 -0
  75. package/logos/color/eclipse.svg +3 -0
  76. package/logos/color/solana.svg +1 -0
  77. package/package.json +4 -4
  78. package/dist/agents/types.d.ts +0 -57
  79. package/dist/agents/types.d.ts.map +0 -1
  80. package/dist/agents/types.js +0 -37
  81. package/dist/agents/types.js.map +0 -1
  82. package/dist/consts/chainMetadata.test.d.ts.map +0 -1
  83. package/dist/consts/chainMetadata.test.js +0 -41
  84. package/dist/consts/chainMetadata.test.js.map +0 -1
  85. /package/dist/{consts → metadata}/chainMetadata.test.d.ts +0 -0
@@ -1,123 +1,41 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDomainId = exports.isValidChainMetadata = exports.testnetChainsMetadata = exports.mainnetChainsMetadata = exports.chainIdToMetadata = exports.wagmiChainMetadata = exports.chainMetadata = exports.test3 = exports.test2 = exports.test1 = exports.zbctestnet = exports.solanadevnet = exports.gnosis = exports.polygon = exports.optimismgoerli = exports.optimism = exports.mumbai = exports.moonbeam = exports.moonbasealpha = exports.sepolia = exports.goerli = exports.fuji = exports.ethereum = exports.celo = exports.bsctestnet = exports.bsc = exports.avalanche = exports.arbitrumgoerli = exports.arbitrum = exports.alfajores = exports.xDaiToken = exports.maticToken = exports.etherToken = exports.celoToken = exports.bnbToken = exports.avaxToken = exports.ChainMetadataSchema = exports.ProtocolType = exports.ExplorerFamily = void 0;
4
- const zod_1 = require("zod");
5
- const objects_1 = require("../utils/objects");
6
- const wagmi_1 = require("../utils/wagmi");
3
+ exports.testnetChainsMetadata = exports.mainnetChainsMetadata = exports.chainIdToMetadata = exports.chainMetadata = exports.zbctestnet = exports.solanadevnet = exports.solanatestnet = exports.solana = exports.test3 = exports.test2 = exports.test1 = exports.gnosis = exports.polygon = exports.optimismgoerli = exports.optimism = exports.mumbai = exports.moonbeam = exports.moonbasealpha = exports.sepolia = exports.goerli = exports.fuji = exports.ethereum = exports.celo = exports.bsctestnet = exports.bsc = exports.avalanche = exports.arbitrumgoerli = exports.arbitrum = exports.alfajores = exports.solToken = exports.xDaiToken = exports.maticToken = exports.etherToken = exports.celoToken = exports.bnbToken = exports.avaxToken = void 0;
4
+ const chainMetadataTypes_1 = require("../metadata/chainMetadataTypes");
7
5
  const chains_1 = require("./chains");
8
- var ExplorerFamily;
9
- (function (ExplorerFamily) {
10
- ExplorerFamily["Etherscan"] = "etherscan";
11
- ExplorerFamily["Blockscout"] = "blockscout";
12
- ExplorerFamily["Other"] = "other";
13
- })(ExplorerFamily = exports.ExplorerFamily || (exports.ExplorerFamily = {}));
14
- var ProtocolType;
15
- (function (ProtocolType) {
16
- ProtocolType["Ethereum"] = "ethereum";
17
- ProtocolType["Sealevel"] = "sealevel";
18
- ProtocolType["Fuel"] = "fuel";
19
- })(ProtocolType = exports.ProtocolType || (exports.ProtocolType = {}));
20
- /**
21
- * Zod schema for ChainMetadata validation
22
- * Keep in sync with ChainMetadata above
23
- */
24
- exports.ChainMetadataSchema = zod_1.z.object({
25
- chainId: zod_1.z.number().positive(),
26
- domainId: zod_1.z.number().positive().optional(),
27
- name: zod_1.z.string(),
28
- protocol: zod_1.z.string(),
29
- displayName: zod_1.z.string().optional(),
30
- displayNameShort: zod_1.z.string().optional(),
31
- nativeToken: zod_1.z
32
- .object({
33
- name: zod_1.z.string(),
34
- symbol: zod_1.z.string(),
35
- decimals: zod_1.z.number().positive(),
36
- })
37
- .optional(),
38
- publicRpcUrls: zod_1.z
39
- .array(zod_1.z.object({
40
- http: zod_1.z.string().url(),
41
- webSocket: zod_1.z.string().optional(),
42
- pagination: zod_1.z
43
- .object({
44
- maxBlockRange: zod_1.z.number().positive().optional(),
45
- minBlockNumber: zod_1.z.number().positive().optional(),
46
- maxBlockAge: zod_1.z.number().positive().optional(),
47
- })
48
- .optional(),
49
- retry: zod_1.z
50
- .object({
51
- maxRequests: zod_1.z.number().positive(),
52
- baseRetryMs: zod_1.z.number().positive(),
53
- })
54
- .optional(),
55
- }))
56
- .nonempty(),
57
- blockExplorers: zod_1.z
58
- .array(zod_1.z.object({
59
- name: zod_1.z.string(),
60
- url: zod_1.z.string().url(),
61
- apiUrl: zod_1.z.string().url(),
62
- apiKey: zod_1.z.string().optional(),
63
- family: zod_1.z.nativeEnum(ExplorerFamily).optional(),
64
- }))
65
- .optional(),
66
- blocks: zod_1.z
67
- .object({
68
- confirmations: zod_1.z.number(),
69
- reorgPeriod: zod_1.z.number().optional(),
70
- estimateBlockTime: zod_1.z.number().positive().optional(),
71
- })
72
- .optional(),
73
- transactionOverrides: zod_1.z.object({}).optional(),
74
- gasCurrencyCoinGeckoId: zod_1.z.string().optional(),
75
- gnosisSafeTransactionServiceUrl: zod_1.z.string().optional(),
76
- isTestnet: zod_1.z.boolean().optional(),
77
- });
78
6
  /**
79
7
  * Common native currencies
80
8
  */
81
- exports.avaxToken = {
82
- decimals: 18,
83
- name: 'Avalanche',
84
- symbol: 'AVAX',
85
- };
86
- exports.bnbToken = {
87
- decimals: 18,
88
- name: 'BNB',
89
- symbol: 'BNB',
90
- };
91
- exports.celoToken = {
92
- decimals: 18,
93
- name: 'CELO',
94
- symbol: 'CELO',
95
- };
9
+ exports.avaxToken = { decimals: 18, name: 'Avalanche', symbol: 'AVAX' };
10
+ exports.bnbToken = { decimals: 18, name: 'BNB', symbol: 'BNB' };
11
+ exports.celoToken = { decimals: 18, name: 'CELO', symbol: 'CELO' };
96
12
  exports.etherToken = { name: 'Ether', symbol: 'ETH', decimals: 18 };
97
13
  exports.maticToken = { name: 'MATIC', symbol: 'MATIC', decimals: 18 };
98
14
  exports.xDaiToken = { name: 'xDai', symbol: 'xDai', decimals: 18 };
15
+ exports.solToken = { name: 'Sol', symbol: 'SOL', decimals: 9 };
99
16
  /**
100
- * Chain metadata
17
+ * Metadata for Ethereum chains
101
18
  */
102
19
  exports.alfajores = {
103
20
  chainId: 44787,
21
+ domainId: 44787,
104
22
  name: chains_1.Chains.alfajores,
105
- protocol: ProtocolType.Ethereum,
23
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
106
24
  displayName: 'Alfajores',
107
25
  nativeToken: exports.celoToken,
108
- publicRpcUrls: [{ http: 'https://alfajores-forno.celo-testnet.org' }],
26
+ rpcUrls: [{ http: 'https://alfajores-forno.celo-testnet.org' }],
109
27
  blockExplorers: [
110
28
  {
111
29
  name: 'CeloScan',
112
30
  url: 'https://alfajores.celoscan.io',
113
31
  apiUrl: 'https://api-alfajores.celoscan.io/api',
114
- family: ExplorerFamily.Etherscan,
32
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
115
33
  },
116
34
  {
117
35
  name: 'Blockscout',
118
36
  url: 'https://explorer.celo.org/alfajores',
119
37
  apiUrl: 'https://explorer.celo.org/alfajores/api',
120
- family: ExplorerFamily.Blockscout,
38
+ family: chainMetadataTypes_1.ExplorerFamily.Blockscout,
121
39
  },
122
40
  ],
123
41
  blocks: {
@@ -129,17 +47,18 @@ exports.alfajores = {
129
47
  };
130
48
  exports.arbitrum = {
131
49
  chainId: 42161,
50
+ domainId: 42161,
132
51
  name: chains_1.Chains.arbitrum,
133
- protocol: ProtocolType.Ethereum,
52
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
134
53
  displayName: 'Arbitrum',
135
54
  nativeToken: exports.etherToken,
136
- publicRpcUrls: [{ http: 'https://arb1.arbitrum.io/rpc' }],
55
+ rpcUrls: [{ http: 'https://arb1.arbitrum.io/rpc' }],
137
56
  blockExplorers: [
138
57
  {
139
58
  name: 'Arbiscan',
140
59
  url: 'https://arbiscan.io',
141
60
  apiUrl: 'https://api.arbiscan.io/api',
142
- family: ExplorerFamily.Etherscan,
61
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
143
62
  },
144
63
  ],
145
64
  blocks: {
@@ -148,22 +67,23 @@ exports.arbitrum = {
148
67
  estimateBlockTime: 3,
149
68
  },
150
69
  gasCurrencyCoinGeckoId: 'ethereum',
151
- gnosisSafeTransactionServiceUrl: 'https://safe-transaction.arbitrum.gnosis.io/',
70
+ gnosisSafeTransactionServiceUrl: 'https://safe-transaction-arbitrum.safe.global/',
152
71
  };
153
72
  exports.arbitrumgoerli = {
154
73
  chainId: 421613,
74
+ domainId: 421613,
155
75
  name: chains_1.Chains.arbitrumgoerli,
156
- protocol: ProtocolType.Ethereum,
76
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
157
77
  displayName: 'Arbitrum Goerli',
158
78
  displayNameShort: 'Arb. Goerli',
159
79
  nativeToken: exports.etherToken,
160
- publicRpcUrls: [{ http: 'https://goerli-rollup.arbitrum.io/rpc' }],
80
+ rpcUrls: [{ http: 'https://goerli-rollup.arbitrum.io/rpc' }],
161
81
  blockExplorers: [
162
82
  {
163
83
  name: 'Arbiscan',
164
84
  url: 'https://goerli.arbiscan.io',
165
85
  apiUrl: 'https://api-goerli.arbiscan.io/api',
166
- family: ExplorerFamily.Etherscan,
86
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
167
87
  },
168
88
  ],
169
89
  blocks: {
@@ -175,11 +95,12 @@ exports.arbitrumgoerli = {
175
95
  };
176
96
  exports.avalanche = {
177
97
  chainId: 43114,
98
+ domainId: 43114,
178
99
  name: chains_1.Chains.avalanche,
179
- protocol: ProtocolType.Ethereum,
100
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
180
101
  displayName: 'Avalanche',
181
102
  nativeToken: exports.avaxToken,
182
- publicRpcUrls: [
103
+ rpcUrls: [
183
104
  {
184
105
  http: 'https://api.avax.network/ext/bc/C/rpc',
185
106
  pagination: {
@@ -193,7 +114,7 @@ exports.avalanche = {
193
114
  name: 'SnowTrace',
194
115
  url: 'https://snowtrace.io',
195
116
  apiUrl: 'https://api.snowtrace.io/api',
196
- family: ExplorerFamily.Other,
117
+ family: chainMetadataTypes_1.ExplorerFamily.Other,
197
118
  },
198
119
  ],
199
120
  blocks: {
@@ -202,16 +123,17 @@ exports.avalanche = {
202
123
  estimateBlockTime: 2,
203
124
  },
204
125
  gasCurrencyCoinGeckoId: 'avalanche-2',
205
- gnosisSafeTransactionServiceUrl: 'https://safe-transaction.avalanche.gnosis.io/',
126
+ gnosisSafeTransactionServiceUrl: 'https://safe-transaction-avalanche.safe.global/',
206
127
  };
207
128
  exports.bsc = {
208
129
  chainId: 56,
130
+ domainId: 56,
209
131
  name: chains_1.Chains.bsc,
210
- protocol: ProtocolType.Ethereum,
132
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
211
133
  displayName: 'Binance Smart Chain',
212
134
  displayNameShort: 'Binance',
213
135
  nativeToken: exports.bnbToken,
214
- publicRpcUrls: [
136
+ rpcUrls: [
215
137
  { http: 'https://bsc-dataseed.binance.org' },
216
138
  { http: 'https://rpc.ankr.com/bsc' },
217
139
  ],
@@ -220,7 +142,7 @@ exports.bsc = {
220
142
  name: 'BscScan',
221
143
  url: 'https://bscscan.com',
222
144
  apiUrl: 'https://api.bscscan.com/api',
223
- family: ExplorerFamily.Etherscan,
145
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
224
146
  },
225
147
  ],
226
148
  blocks: {
@@ -229,21 +151,22 @@ exports.bsc = {
229
151
  estimateBlockTime: 3,
230
152
  },
231
153
  gasCurrencyCoinGeckoId: 'binancecoin',
232
- gnosisSafeTransactionServiceUrl: 'https://safe-transaction.bsc.gnosis.io/',
154
+ gnosisSafeTransactionServiceUrl: 'https://safe-transaction-bsc.safe.global/',
233
155
  };
234
156
  exports.bsctestnet = {
235
157
  chainId: 97,
158
+ domainId: 97,
236
159
  name: chains_1.Chains.bsctestnet,
237
- protocol: ProtocolType.Ethereum,
160
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
238
161
  displayName: 'BSC Testnet',
239
162
  nativeToken: exports.bnbToken,
240
- publicRpcUrls: [{ http: 'https://data-seed-prebsc-1-s3.binance.org:8545' }],
163
+ rpcUrls: [{ http: 'https://data-seed-prebsc-1-s3.binance.org:8545' }],
241
164
  blockExplorers: [
242
165
  {
243
166
  name: 'BscScan',
244
167
  url: 'https://testnet.bscscan.com',
245
168
  apiUrl: 'https://api-testnet.bscscan.com/api',
246
- family: ExplorerFamily.Etherscan,
169
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
247
170
  },
248
171
  ],
249
172
  blocks: {
@@ -255,23 +178,24 @@ exports.bsctestnet = {
255
178
  };
256
179
  exports.celo = {
257
180
  chainId: 42220,
181
+ domainId: 42220,
258
182
  name: chains_1.Chains.celo,
259
- protocol: ProtocolType.Ethereum,
183
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
260
184
  displayName: 'Celo',
261
185
  nativeToken: exports.celoToken,
262
- publicRpcUrls: [{ http: 'https://forno.celo.org' }],
186
+ rpcUrls: [{ http: 'https://forno.celo.org' }],
263
187
  blockExplorers: [
264
188
  {
265
189
  name: 'CeloScan',
266
190
  url: 'https://celoscan.io',
267
191
  apiUrl: 'https://api.celoscan.io/api',
268
- family: ExplorerFamily.Etherscan,
192
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
269
193
  },
270
194
  {
271
195
  name: 'Blockscout',
272
196
  url: 'https://explorer.celo.org',
273
197
  apiUrl: 'https://explorer.celo.org/mainnet/api',
274
- family: ExplorerFamily.Blockscout,
198
+ family: chainMetadataTypes_1.ExplorerFamily.Blockscout,
275
199
  },
276
200
  ],
277
201
  blocks: {
@@ -283,11 +207,12 @@ exports.celo = {
283
207
  };
284
208
  exports.ethereum = {
285
209
  chainId: 1,
210
+ domainId: 1,
286
211
  name: chains_1.Chains.ethereum,
287
- protocol: ProtocolType.Ethereum,
212
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
288
213
  displayName: 'Ethereum',
289
214
  nativeToken: exports.etherToken,
290
- publicRpcUrls: [
215
+ rpcUrls: [
291
216
  { http: 'https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161' },
292
217
  { http: 'https://cloudflare-eth.com' },
293
218
  ],
@@ -296,13 +221,13 @@ exports.ethereum = {
296
221
  name: 'Etherscan',
297
222
  url: 'https://etherscan.io',
298
223
  apiUrl: 'https://api.etherscan.io/api',
299
- family: ExplorerFamily.Etherscan,
224
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
300
225
  },
301
226
  {
302
227
  name: 'Blockscout',
303
228
  url: 'https://blockscout.com/eth/mainnet',
304
229
  apiUrl: 'https://blockscout.com/eth/mainnet/api',
305
- family: ExplorerFamily.Blockscout,
230
+ family: chainMetadataTypes_1.ExplorerFamily.Blockscout,
306
231
  },
307
232
  ],
308
233
  blocks: {
@@ -310,15 +235,16 @@ exports.ethereum = {
310
235
  reorgPeriod: 14,
311
236
  estimateBlockTime: 13,
312
237
  },
313
- gnosisSafeTransactionServiceUrl: 'https://safe-transaction.gnosis.io',
238
+ gnosisSafeTransactionServiceUrl: 'https://safe-transaction-mainnet.safe.global/',
314
239
  };
315
240
  exports.fuji = {
316
241
  chainId: 43113,
242
+ domainId: 43113,
317
243
  name: chains_1.Chains.fuji,
318
- protocol: ProtocolType.Ethereum,
244
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
319
245
  displayName: 'Fuji',
320
246
  nativeToken: exports.avaxToken,
321
- publicRpcUrls: [
247
+ rpcUrls: [
322
248
  {
323
249
  http: 'https://api.avax-test.network/ext/bc/C/rpc',
324
250
  pagination: { maxBlockRange: 2048 },
@@ -329,7 +255,7 @@ exports.fuji = {
329
255
  name: 'SnowTrace',
330
256
  url: 'https://testnet.snowtrace.io',
331
257
  apiUrl: 'https://api-testnet.snowtrace.io/api',
332
- family: ExplorerFamily.Etherscan,
258
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
333
259
  },
334
260
  ],
335
261
  blocks: {
@@ -341,11 +267,12 @@ exports.fuji = {
341
267
  };
342
268
  exports.goerli = {
343
269
  chainId: 5,
270
+ domainId: 5,
344
271
  name: chains_1.Chains.goerli,
345
- protocol: ProtocolType.Ethereum,
272
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
346
273
  displayName: 'Goerli',
347
274
  nativeToken: exports.etherToken,
348
- publicRpcUrls: [
275
+ rpcUrls: [
349
276
  { http: 'https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161' },
350
277
  { http: 'https://rpc.ankr.com/eth_goerli' },
351
278
  { http: 'https://eth-goerli.public.blastapi.io' },
@@ -355,7 +282,7 @@ exports.goerli = {
355
282
  name: 'Etherscan',
356
283
  url: 'https://goerli.etherscan.io',
357
284
  apiUrl: 'https://api-goerli.etherscan.io/api',
358
- family: ExplorerFamily.Etherscan,
285
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
359
286
  },
360
287
  ],
361
288
  blocks: {
@@ -367,11 +294,12 @@ exports.goerli = {
367
294
  };
368
295
  exports.sepolia = {
369
296
  chainId: 11155111,
297
+ domainId: 11155111,
370
298
  name: chains_1.Chains.sepolia,
371
- protocol: ProtocolType.Ethereum,
299
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
372
300
  displayName: 'Sepolia',
373
301
  nativeToken: exports.etherToken,
374
- publicRpcUrls: [
302
+ rpcUrls: [
375
303
  { http: 'https://endpoints.omniatech.io/v1/eth/sepolia/public' },
376
304
  { http: 'https://rpc.sepolia.org' },
377
305
  ],
@@ -380,7 +308,7 @@ exports.sepolia = {
380
308
  name: 'Etherscan',
381
309
  url: 'https://sepolia.etherscan.io',
382
310
  apiUrl: 'https://api-sepolia.etherscan.io/api',
383
- family: ExplorerFamily.Etherscan,
311
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
384
312
  },
385
313
  ],
386
314
  blocks: {
@@ -392,8 +320,9 @@ exports.sepolia = {
392
320
  };
393
321
  exports.moonbasealpha = {
394
322
  chainId: 1287,
323
+ domainId: 1287,
395
324
  name: chains_1.Chains.moonbasealpha,
396
- protocol: ProtocolType.Ethereum,
325
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
397
326
  displayName: 'Moonbase Alpha',
398
327
  displayNameShort: 'Moonbase',
399
328
  nativeToken: {
@@ -401,13 +330,13 @@ exports.moonbasealpha = {
401
330
  name: 'DEV',
402
331
  symbol: 'DEV',
403
332
  },
404
- publicRpcUrls: [{ http: 'https://rpc.api.moonbase.moonbeam.network' }],
333
+ rpcUrls: [{ http: 'https://rpc.api.moonbase.moonbeam.network' }],
405
334
  blockExplorers: [
406
335
  {
407
336
  name: 'MoonScan',
408
337
  url: 'https://moonbase.moonscan.io',
409
338
  apiUrl: 'https://api-moonbase.moonscan.io/api',
410
- family: ExplorerFamily.Etherscan,
339
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
411
340
  },
412
341
  ],
413
342
  blocks: {
@@ -419,21 +348,22 @@ exports.moonbasealpha = {
419
348
  };
420
349
  exports.moonbeam = {
421
350
  chainId: 1284,
351
+ domainId: 1284,
422
352
  name: chains_1.Chains.moonbeam,
423
- protocol: ProtocolType.Ethereum,
353
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
424
354
  displayName: 'Moonbeam',
425
355
  nativeToken: {
426
356
  decimals: 18,
427
357
  name: 'GLMR',
428
358
  symbol: 'GLMR',
429
359
  },
430
- publicRpcUrls: [{ http: 'https://rpc.api.moonbeam.network' }],
360
+ rpcUrls: [{ http: 'https://rpc.api.moonbeam.network' }],
431
361
  blockExplorers: [
432
362
  {
433
363
  name: 'MoonScan',
434
364
  url: 'https://moonscan.io',
435
365
  apiUrl: 'https://api-moonbeam.moonscan.io/api',
436
- family: ExplorerFamily.Etherscan,
366
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
437
367
  },
438
368
  ],
439
369
  blocks: {
@@ -445,11 +375,12 @@ exports.moonbeam = {
445
375
  };
446
376
  exports.mumbai = {
447
377
  chainId: 80001,
378
+ domainId: 80001,
448
379
  name: chains_1.Chains.mumbai,
449
- protocol: ProtocolType.Ethereum,
380
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
450
381
  displayName: 'Mumbai',
451
382
  nativeToken: exports.maticToken,
452
- publicRpcUrls: [
383
+ rpcUrls: [
453
384
  {
454
385
  http: 'https://rpc.ankr.com/polygon_mumbai',
455
386
  pagination: {
@@ -467,7 +398,7 @@ exports.mumbai = {
467
398
  name: 'PolygonScan',
468
399
  url: 'https://mumbai.polygonscan.com',
469
400
  apiUrl: 'https://api-testnet.polygonscan.com/api',
470
- family: ExplorerFamily.Etherscan,
401
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
471
402
  },
472
403
  ],
473
404
  blocks: {
@@ -479,17 +410,18 @@ exports.mumbai = {
479
410
  };
480
411
  exports.optimism = {
481
412
  chainId: 10,
413
+ domainId: 10,
482
414
  name: chains_1.Chains.optimism,
483
- protocol: ProtocolType.Ethereum,
415
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
484
416
  displayName: 'Optimism',
485
417
  nativeToken: exports.etherToken,
486
- publicRpcUrls: [{ http: 'https://mainnet.optimism.io' }],
418
+ rpcUrls: [{ http: 'https://mainnet.optimism.io' }],
487
419
  blockExplorers: [
488
420
  {
489
421
  name: 'Etherscan',
490
422
  url: 'https://optimistic.etherscan.io',
491
423
  apiUrl: 'https://api-optimistic.etherscan.io/api',
492
- family: ExplorerFamily.Etherscan,
424
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
493
425
  },
494
426
  ],
495
427
  blocks: {
@@ -498,22 +430,23 @@ exports.optimism = {
498
430
  estimateBlockTime: 3,
499
431
  },
500
432
  gasCurrencyCoinGeckoId: 'ethereum',
501
- gnosisSafeTransactionServiceUrl: 'https://safe-transaction.optimism.gnosis.io/',
433
+ gnosisSafeTransactionServiceUrl: 'https://safe-transaction-optimism.safe.global/',
502
434
  };
503
435
  exports.optimismgoerli = {
504
436
  chainId: 420,
437
+ domainId: 420,
505
438
  name: chains_1.Chains.optimismgoerli,
506
- protocol: ProtocolType.Ethereum,
439
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
507
440
  displayName: 'Optimism Goerli',
508
441
  displayNameShort: 'Opt. Goerli',
509
442
  nativeToken: exports.etherToken,
510
- publicRpcUrls: [{ http: 'https://goerli.optimism.io' }],
443
+ rpcUrls: [{ http: 'https://goerli.optimism.io' }],
511
444
  blockExplorers: [
512
445
  {
513
446
  name: 'Etherscan',
514
447
  url: 'https://goerli-optimism.etherscan.io',
515
448
  apiUrl: 'https://api-goerli-optimism.etherscan.io/api',
516
- family: ExplorerFamily.Etherscan,
449
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
517
450
  },
518
451
  ],
519
452
  blocks: {
@@ -525,11 +458,12 @@ exports.optimismgoerli = {
525
458
  };
526
459
  exports.polygon = {
527
460
  chainId: 137,
461
+ domainId: 137,
528
462
  name: chains_1.Chains.polygon,
529
- protocol: ProtocolType.Ethereum,
463
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
530
464
  displayName: 'Polygon',
531
465
  nativeToken: exports.etherToken,
532
- publicRpcUrls: [
466
+ rpcUrls: [
533
467
  {
534
468
  http: 'https://rpc-mainnet.matic.quiknode.pro',
535
469
  pagination: {
@@ -545,7 +479,7 @@ exports.polygon = {
545
479
  name: 'PolygonScan',
546
480
  url: 'https://polygonscan.com',
547
481
  apiUrl: 'https://api.polygonscan.com/api',
548
- family: ExplorerFamily.Etherscan,
482
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
549
483
  },
550
484
  ],
551
485
  blocks: {
@@ -554,15 +488,16 @@ exports.polygon = {
554
488
  estimateBlockTime: 2,
555
489
  },
556
490
  gasCurrencyCoinGeckoId: 'matic-network',
557
- gnosisSafeTransactionServiceUrl: 'https://safe-transaction.polygon.gnosis.io/',
491
+ gnosisSafeTransactionServiceUrl: 'https://safe-transaction-polygon.safe.global/',
558
492
  };
559
493
  exports.gnosis = {
560
494
  chainId: 100,
495
+ domainId: 100,
561
496
  name: chains_1.Chains.gnosis,
562
- protocol: ProtocolType.Ethereum,
497
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
563
498
  displayName: 'Gnosis',
564
499
  nativeToken: exports.xDaiToken,
565
- publicRpcUrls: [
500
+ rpcUrls: [
566
501
  {
567
502
  http: 'https://rpc.gnosischain.com',
568
503
  pagination: {
@@ -576,7 +511,7 @@ exports.gnosis = {
576
511
  name: 'GnosisScan',
577
512
  url: 'https://gnosisscan.io',
578
513
  apiUrl: 'https://api.gnosisscan.io/api',
579
- family: ExplorerFamily.Etherscan,
514
+ family: chainMetadataTypes_1.ExplorerFamily.Etherscan,
580
515
  },
581
516
  ],
582
517
  blocks: {
@@ -585,55 +520,19 @@ exports.gnosis = {
585
520
  estimateBlockTime: 5,
586
521
  },
587
522
  gasCurrencyCoinGeckoId: 'xdai',
588
- gnosisSafeTransactionServiceUrl: 'https://safe-transaction.xdai.gnosis.io/',
589
- };
590
- exports.solanadevnet = {
591
- chainId: 1399811151,
592
- name: chains_1.Chains.solanadevnet,
593
- protocol: ProtocolType.Sealevel,
594
- displayName: 'Solana Devnet',
595
- displayNameShort: 'Sol Devnet',
596
- nativeToken: {
597
- decimals: 9,
598
- name: 'Solana',
599
- symbol: 'SOL',
600
- },
601
- publicRpcUrls: [{ http: 'https://api.devnet.solana.com' }],
602
- blockExplorers: [],
603
- blocks: {
604
- confirmations: 1,
605
- reorgPeriod: 0,
606
- estimateBlockTime: 0.4,
607
- },
608
- isTestnet: true,
609
- };
610
- exports.zbctestnet = {
611
- chainId: 2053254516,
612
- name: chains_1.Chains.zbctestnet,
613
- protocol: ProtocolType.Sealevel,
614
- displayName: 'Solana Devnet 1',
615
- displayNameShort: 'Sol Devnet 1',
616
- nativeToken: {
617
- decimals: 9,
618
- name: 'Solana',
619
- symbol: 'SOL',
620
- },
621
- publicRpcUrls: [{ http: 'https://api.devnet.solana.com' }],
622
- blockExplorers: [],
623
- blocks: {
624
- confirmations: 1,
625
- reorgPeriod: 0,
626
- estimateBlockTime: 0.4,
627
- },
628
- isTestnet: true,
523
+ gnosisSafeTransactionServiceUrl: 'https://safe-transaction-gnosis-chain.safe.global/',
629
524
  };
525
+ /**
526
+ * Metadata for local test chains
527
+ */
630
528
  exports.test1 = {
631
529
  chainId: 13371,
530
+ domainId: 13371,
632
531
  name: chains_1.Chains.test1,
633
- protocol: ProtocolType.Ethereum,
532
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
634
533
  displayName: 'Test 1',
635
534
  nativeToken: exports.etherToken,
636
- publicRpcUrls: [{ http: 'http://localhost:8545' }],
535
+ rpcUrls: [{ http: 'http://localhost:8545' }],
637
536
  blockExplorers: [],
638
537
  blocks: {
639
538
  confirmations: 1,
@@ -644,11 +543,12 @@ exports.test1 = {
644
543
  };
645
544
  exports.test2 = {
646
545
  chainId: 13372,
546
+ domainId: 13372,
647
547
  name: chains_1.Chains.test2,
648
- protocol: ProtocolType.Ethereum,
548
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
649
549
  displayName: 'Test 2',
650
550
  nativeToken: exports.etherToken,
651
- publicRpcUrls: [{ http: 'http://localhost:8545' }],
551
+ rpcUrls: [{ http: 'http://localhost:8545' }],
652
552
  blockExplorers: [],
653
553
  blocks: {
654
554
  confirmations: 1,
@@ -659,11 +559,12 @@ exports.test2 = {
659
559
  };
660
560
  exports.test3 = {
661
561
  chainId: 13373,
562
+ domainId: 13373,
662
563
  name: chains_1.Chains.test3,
663
- protocol: ProtocolType.Ethereum,
564
+ protocol: chainMetadataTypes_1.ProtocolType.Ethereum,
664
565
  displayName: 'Test 3',
665
566
  nativeToken: exports.etherToken,
666
- publicRpcUrls: [{ http: 'http://localhost:8545' }],
567
+ rpcUrls: [{ http: 'http://localhost:8545' }],
667
568
  blockExplorers: [],
668
569
  blocks: {
669
570
  confirmations: 1,
@@ -672,6 +573,81 @@ exports.test3 = {
672
573
  },
673
574
  isTestnet: true,
674
575
  };
576
+ /**
577
+ * Metadata for Sealevel chains
578
+ */
579
+ exports.solana = {
580
+ protocol: chainMetadataTypes_1.ProtocolType.Sealevel,
581
+ // Uses the same ChainId as https://www.alchemy.com/chain-connect/chain/solana
582
+ chainId: 1399811149,
583
+ domainId: 1399811149,
584
+ name: 'solana',
585
+ displayName: 'Solana',
586
+ nativeToken: exports.solToken,
587
+ rpcUrls: [{ http: 'https://api.mainnet-beta.solana.com' }],
588
+ blockExplorers: [
589
+ {
590
+ name: 'SolScan',
591
+ url: 'https://solscan.io',
592
+ apiUrl: 'https://public-api.solscan.io',
593
+ family: chainMetadataTypes_1.ExplorerFamily.Other,
594
+ },
595
+ ],
596
+ blocks: {
597
+ confirmations: 1,
598
+ reorgPeriod: 0,
599
+ estimateBlockTime: 0.4,
600
+ },
601
+ };
602
+ exports.solanatestnet = {
603
+ protocol: chainMetadataTypes_1.ProtocolType.Sealevel,
604
+ chainId: 1399811150,
605
+ domainId: 1399811150,
606
+ name: 'solanatestnet',
607
+ displayName: 'Solana Testnet',
608
+ displayNameShort: 'Sol Testnet',
609
+ nativeToken: exports.solToken,
610
+ rpcUrls: [{ http: 'https://api.testnet.solana.com' }],
611
+ blocks: {
612
+ confirmations: 1,
613
+ reorgPeriod: 0,
614
+ estimateBlockTime: 0.4,
615
+ },
616
+ isTestnet: true,
617
+ };
618
+ exports.solanadevnet = {
619
+ protocol: chainMetadataTypes_1.ProtocolType.Sealevel,
620
+ chainId: 1399811151,
621
+ domainId: 1399811151,
622
+ name: 'solanadevnet',
623
+ displayName: 'Solana Devnet',
624
+ displayNameShort: 'Sol Devnet',
625
+ nativeToken: exports.solToken,
626
+ rpcUrls: [{ http: 'https://api.devnet.solana.com' }],
627
+ blocks: {
628
+ confirmations: 1,
629
+ reorgPeriod: 0,
630
+ estimateBlockTime: 0.4,
631
+ },
632
+ isTestnet: true,
633
+ };
634
+ exports.zbctestnet = {
635
+ chainId: 2053254516,
636
+ domainId: 2053254516,
637
+ name: chains_1.Chains.zbctestnet,
638
+ protocol: chainMetadataTypes_1.ProtocolType.Sealevel,
639
+ displayName: 'Zebec Devnet',
640
+ displayNameShort: 'Zebec Dev',
641
+ nativeToken: exports.solToken,
642
+ rpcUrls: [{ http: 'https://api.zebec.eclipsenetwork.xyz:8899' }],
643
+ blockExplorers: [],
644
+ blocks: {
645
+ confirmations: 1,
646
+ reorgPeriod: 0,
647
+ estimateBlockTime: 0.4,
648
+ },
649
+ isTestnet: true,
650
+ };
675
651
  /**
676
652
  * Collection maps
677
653
  *
@@ -703,21 +679,10 @@ exports.chainMetadata = {
703
679
  solanadevnet: exports.solanadevnet,
704
680
  zbctestnet: exports.zbctestnet,
705
681
  };
706
- // For convenient use in wagmi-based apps
707
- exports.wagmiChainMetadata = (0, objects_1.objMap)(exports.chainMetadata, (_, metadata) => (0, wagmi_1.chainMetadataToWagmiChain)(metadata));
708
682
  exports.chainIdToMetadata = Object.values(exports.chainMetadata).reduce((result, chain) => {
709
683
  result[chain.chainId] = chain;
710
684
  return result;
711
685
  }, {});
712
686
  exports.mainnetChainsMetadata = chains_1.Mainnets.map((chainName) => exports.chainMetadata[chainName]);
713
687
  exports.testnetChainsMetadata = chains_1.Testnets.map((chainName) => exports.chainMetadata[chainName]);
714
- function isValidChainMetadata(c) {
715
- return exports.ChainMetadataSchema.safeParse(c).success;
716
- }
717
- exports.isValidChainMetadata = isValidChainMetadata;
718
- function getDomainId(chainMetadata) {
719
- var _a;
720
- return (_a = chainMetadata.domainId) !== null && _a !== void 0 ? _a : chainMetadata.chainId;
721
- }
722
- exports.getDomainId = getDomainId;
723
688
  //# sourceMappingURL=chainMetadata.js.map