@hyperlane-xyz/sdk 5.0.0 → 5.1.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.
- package/dist/aws/validator.js +1 -1
- package/dist/aws/validator.js.map +1 -1
- package/dist/consts/multisigIsm.d.ts.map +1 -1
- package/dist/consts/multisigIsm.js +129 -14
- package/dist/consts/multisigIsm.js.map +1 -1
- package/dist/consts/multisigIsm.test.d.ts +2 -0
- package/dist/consts/multisigIsm.test.d.ts.map +1 -0
- package/dist/consts/multisigIsm.test.js +13 -0
- package/dist/consts/multisigIsm.test.js.map +1 -0
- package/dist/consts/testChains.js +6 -6
- package/dist/consts/testChains.js.map +1 -1
- package/dist/contracts/contracts.d.ts.map +1 -1
- package/dist/contracts/contracts.js +24 -1
- package/dist/contracts/contracts.js.map +1 -1
- package/dist/core/CoreDeployer.hardhat-test.js +1 -1
- package/dist/core/CoreDeployer.hardhat-test.js.map +1 -1
- package/dist/core/HyperlaneCore.d.ts.map +1 -1
- package/dist/core/HyperlaneCore.js +1 -0
- package/dist/core/HyperlaneCore.js.map +1 -1
- package/dist/core/HyperlaneCoreChecker.d.ts +2 -1
- package/dist/core/HyperlaneCoreChecker.d.ts.map +1 -1
- package/dist/core/HyperlaneCoreChecker.js +39 -13
- package/dist/core/HyperlaneCoreChecker.js.map +1 -1
- package/dist/core/HyperlaneRelayer.d.ts +42 -2
- package/dist/core/HyperlaneRelayer.d.ts.map +1 -1
- package/dist/core/HyperlaneRelayer.js +6 -3
- package/dist/core/HyperlaneRelayer.js.map +1 -1
- package/dist/core/schemas.d.ts +318 -3
- package/dist/core/schemas.d.ts.map +1 -1
- package/dist/deploy/HyperlaneAppChecker.d.ts +2 -1
- package/dist/deploy/HyperlaneAppChecker.d.ts.map +1 -1
- package/dist/deploy/HyperlaneAppChecker.js +39 -17
- package/dist/deploy/HyperlaneAppChecker.js.map +1 -1
- package/dist/deploy/types.d.ts +1 -0
- package/dist/deploy/types.d.ts.map +1 -1
- package/dist/gas/HyperlaneIgpChecker.js +1 -1
- package/dist/gas/HyperlaneIgpChecker.js.map +1 -1
- package/dist/hook/EvmHookModule.d.ts +5 -2
- package/dist/hook/EvmHookModule.d.ts.map +1 -1
- package/dist/hook/EvmHookModule.hardhat-test.js +14 -2
- package/dist/hook/EvmHookModule.hardhat-test.js.map +1 -1
- package/dist/hook/EvmHookModule.js +55 -1
- package/dist/hook/EvmHookModule.js.map +1 -1
- package/dist/hook/EvmHookReader.d.ts +3 -1
- package/dist/hook/EvmHookReader.d.ts.map +1 -1
- package/dist/hook/EvmHookReader.js +16 -1
- package/dist/hook/EvmHookReader.js.map +1 -1
- package/dist/hook/HyperlaneHookDeployer.d.ts.map +1 -1
- package/dist/hook/HyperlaneHookDeployer.js +15 -0
- package/dist/hook/HyperlaneHookDeployer.js.map +1 -1
- package/dist/hook/contracts.d.ts +2 -1
- package/dist/hook/contracts.d.ts.map +1 -1
- package/dist/hook/contracts.js +2 -1
- package/dist/hook/contracts.js.map +1 -1
- package/dist/hook/schemas.d.ts +32 -1
- package/dist/hook/schemas.d.ts.map +1 -1
- package/dist/hook/schemas.js +12 -0
- package/dist/hook/schemas.js.map +1 -1
- package/dist/hook/types.d.ts +7 -3
- package/dist/hook/types.d.ts.map +1 -1
- package/dist/hook/types.js +3 -0
- package/dist/hook/types.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/ism/EvmIsmModule.d.ts.map +1 -1
- package/dist/ism/EvmIsmModule.js +8 -1
- package/dist/ism/EvmIsmModule.js.map +1 -1
- package/dist/ism/EvmIsmReader.d.ts +3 -1
- package/dist/ism/EvmIsmReader.d.ts.map +1 -1
- package/dist/ism/EvmIsmReader.js +14 -1
- package/dist/ism/EvmIsmReader.js.map +1 -1
- package/dist/ism/metadata/aggregation.test.js +1 -0
- package/dist/ism/metadata/aggregation.test.js.map +1 -1
- package/dist/ism/metadata/arbL2ToL1.d.ts +25 -0
- package/dist/ism/metadata/arbL2ToL1.d.ts.map +1 -0
- package/dist/ism/metadata/arbL2ToL1.hardhat-test.d.ts +2 -0
- package/dist/ism/metadata/arbL2ToL1.hardhat-test.d.ts.map +1 -0
- package/dist/ism/metadata/arbL2ToL1.hardhat-test.js +154 -0
- package/dist/ism/metadata/arbL2ToL1.hardhat-test.js.map +1 -0
- package/dist/ism/metadata/arbL2ToL1.js +134 -0
- package/dist/ism/metadata/arbL2ToL1.js.map +1 -0
- package/dist/ism/metadata/builder.d.ts +3 -1
- package/dist/ism/metadata/builder.d.ts.map +1 -1
- package/dist/ism/metadata/builder.js +17 -1
- package/dist/ism/metadata/builder.js.map +1 -1
- package/dist/ism/metadata/multisig.test.js +3 -1
- package/dist/ism/metadata/multisig.test.js.map +1 -1
- package/dist/ism/schemas.d.ts +20 -1
- package/dist/ism/schemas.d.ts.map +1 -1
- package/dist/ism/schemas.js +5 -0
- package/dist/ism/schemas.js.map +1 -1
- package/dist/ism/types.d.ts +8 -4
- package/dist/ism/types.d.ts.map +1 -1
- package/dist/ism/types.js +4 -0
- package/dist/ism/types.js.map +1 -1
- package/dist/middleware/account/InterchainAccount.d.ts +2 -0
- package/dist/middleware/account/InterchainAccount.d.ts.map +1 -1
- package/dist/middleware/account/InterchainAccount.js +11 -0
- package/dist/middleware/account/InterchainAccount.js.map +1 -1
- package/dist/middleware/account/InterchainAccountDeployer.d.ts +1 -1
- package/dist/middleware/account/InterchainAccountDeployer.d.ts.map +1 -1
- package/dist/middleware/account/InterchainAccountDeployer.js +2 -1
- package/dist/middleware/account/InterchainAccountDeployer.js.map +1 -1
- package/dist/providers/SmartProvider/SmartProvider.d.ts +1 -1
- package/dist/providers/SmartProvider/SmartProvider.d.ts.map +1 -1
- package/dist/providers/SmartProvider/SmartProvider.foundry-test.js +45 -0
- package/dist/providers/SmartProvider/SmartProvider.foundry-test.js.map +1 -1
- package/dist/providers/SmartProvider/SmartProvider.js +23 -5
- package/dist/providers/SmartProvider/SmartProvider.js.map +1 -1
- package/dist/router/HyperlaneRouterChecker.d.ts.map +1 -1
- package/dist/router/HyperlaneRouterChecker.js +23 -18
- package/dist/router/HyperlaneRouterChecker.js.map +1 -1
- package/dist/router/ProxiedRouterChecker.d.ts +3 -0
- package/dist/router/ProxiedRouterChecker.d.ts.map +1 -1
- package/dist/router/ProxiedRouterChecker.js +11 -4
- package/dist/router/ProxiedRouterChecker.js.map +1 -1
- package/dist/router/schemas.d.ts +126 -6
- package/dist/router/schemas.d.ts.map +1 -1
- package/dist/token/EvmERC20WarpModule.hardhat-test.js +2 -2
- package/dist/token/EvmERC20WarpModule.hardhat-test.js.map +1 -1
- package/dist/token/EvmERC20WarpRouteReader.js +2 -2
- package/dist/token/EvmERC20WarpRouteReader.js.map +1 -1
- package/dist/token/Token.d.ts.map +1 -1
- package/dist/token/Token.js +5 -0
- package/dist/token/Token.js.map +1 -1
- package/dist/token/Token.test.js +9 -0
- package/dist/token/Token.test.js.map +1 -1
- package/dist/token/TokenStandard.d.ts +1 -0
- package/dist/token/TokenStandard.d.ts.map +1 -1
- package/dist/token/TokenStandard.js +4 -1
- package/dist/token/TokenStandard.js.map +1 -1
- package/dist/token/app.d.ts +6 -3
- package/dist/token/app.d.ts.map +1 -1
- package/dist/token/app.js +4 -3
- package/dist/token/app.js.map +1 -1
- package/dist/token/checker.d.ts +3 -2
- package/dist/token/checker.d.ts.map +1 -1
- package/dist/token/checker.js +13 -4
- package/dist/token/checker.js.map +1 -1
- package/dist/token/contracts.d.ts +2 -2
- package/dist/token/contracts.d.ts.map +1 -1
- package/dist/token/contracts.js +2 -2
- package/dist/token/contracts.js.map +1 -1
- package/dist/token/schemas.d.ts +100 -4
- package/dist/token/schemas.d.ts.map +1 -1
- package/dist/utils/cosmos.d.ts +616 -1932
- package/dist/utils/cosmos.d.ts.map +1 -1
- package/dist/utils/cosmos.js +363 -79
- package/dist/utils/cosmos.js.map +1 -1
- package/dist/warp/WarpCore.test.js +1 -0
- package/dist/warp/WarpCore.test.js.map +1 -1
- package/package.json +4 -3
package/dist/utils/cosmos.js
CHANGED
|
@@ -6,45 +6,87 @@ export const CosmosChainSchema = z
|
|
|
6
6
|
$schema: z
|
|
7
7
|
.string()
|
|
8
8
|
.regex(new RegExp('^(\\.\\./)+chain\\.schema\\.json$'))
|
|
9
|
+
.min(1)
|
|
9
10
|
.optional(),
|
|
10
|
-
chain_name: z.string().regex(new RegExp('[a-z0-9]+')),
|
|
11
|
-
chain_type: z
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
chain_name: z.string().regex(new RegExp('[a-z0-9]+')).min(1),
|
|
12
|
+
chain_type: z
|
|
13
|
+
.enum([
|
|
14
|
+
'cosmos',
|
|
15
|
+
'eip155',
|
|
16
|
+
'bip122',
|
|
17
|
+
'polkadot',
|
|
18
|
+
'solana',
|
|
19
|
+
'algorand',
|
|
20
|
+
'arweave',
|
|
21
|
+
'ergo',
|
|
22
|
+
'fil',
|
|
23
|
+
'hedera',
|
|
24
|
+
'monero',
|
|
25
|
+
'reef',
|
|
26
|
+
'stacks',
|
|
27
|
+
'starknet',
|
|
28
|
+
'stellar',
|
|
29
|
+
'tezos',
|
|
30
|
+
'vechain',
|
|
31
|
+
'waves',
|
|
32
|
+
'xrpl',
|
|
33
|
+
'unknown',
|
|
34
|
+
])
|
|
35
|
+
.describe("The 'type' of chain as the corresponding CAIP-2 Namespace value. E.G., 'cosmos' or 'eip155'. Namespaces can be found here: https://github.com/ChainAgnostic/namespaces/tree/main."),
|
|
36
|
+
chain_id: z.string().min(1).optional(),
|
|
37
|
+
pre_fork_chain_name: z
|
|
38
|
+
.string()
|
|
39
|
+
.regex(new RegExp('[a-z0-9]+'))
|
|
40
|
+
.min(1)
|
|
41
|
+
.optional(),
|
|
42
|
+
pretty_name: z.string().min(1).optional(),
|
|
43
|
+
website: z.string().url().min(1).optional(),
|
|
44
|
+
update_link: z.string().url().min(1).optional(),
|
|
17
45
|
status: z.enum(['live', 'upcoming', 'killed']).optional(),
|
|
18
46
|
network_type: z.enum(['mainnet', 'testnet', 'devnet']).optional(),
|
|
19
47
|
bech32_prefix: z
|
|
20
48
|
.string()
|
|
21
|
-
.
|
|
49
|
+
.min(1)
|
|
50
|
+
.describe("The default prefix for the human-readable part of addresses that identifies the coin type. Must be registered with SLIP-0173. E.g., 'cosmos'")
|
|
51
|
+
.optional(),
|
|
22
52
|
bech32_config: z
|
|
23
53
|
.object({
|
|
24
|
-
bech32PrefixAccAddr: z
|
|
25
|
-
|
|
54
|
+
bech32PrefixAccAddr: z
|
|
55
|
+
.string()
|
|
56
|
+
.min(1)
|
|
57
|
+
.describe("e.g., 'cosmos'")
|
|
58
|
+
.optional(),
|
|
59
|
+
bech32PrefixAccPub: z
|
|
60
|
+
.string()
|
|
61
|
+
.min(1)
|
|
62
|
+
.describe("e.g., 'cosmospub'")
|
|
63
|
+
.optional(),
|
|
26
64
|
bech32PrefixValAddr: z
|
|
27
65
|
.string()
|
|
66
|
+
.min(1)
|
|
28
67
|
.describe("e.g., 'cosmosvaloper'")
|
|
29
68
|
.optional(),
|
|
30
69
|
bech32PrefixValPub: z
|
|
31
70
|
.string()
|
|
71
|
+
.min(1)
|
|
32
72
|
.describe("e.g., 'cosmosvaloperpub'")
|
|
33
73
|
.optional(),
|
|
34
74
|
bech32PrefixConsAddr: z
|
|
35
75
|
.string()
|
|
76
|
+
.min(1)
|
|
36
77
|
.describe("e.g., 'cosmosvalcons'")
|
|
37
78
|
.optional(),
|
|
38
79
|
bech32PrefixConsPub: z
|
|
39
80
|
.string()
|
|
81
|
+
.min(1)
|
|
40
82
|
.describe("e.g., 'cosmosvalconspub'")
|
|
41
83
|
.optional(),
|
|
42
84
|
})
|
|
43
85
|
.strict()
|
|
44
86
|
.describe('Used to override the bech32_prefix for specific uses.')
|
|
45
87
|
.optional(),
|
|
46
|
-
daemon_name: z.string().optional(),
|
|
47
|
-
node_home: z.string().optional(),
|
|
88
|
+
daemon_name: z.string().min(1).optional(),
|
|
89
|
+
node_home: z.string().min(1).optional(),
|
|
48
90
|
key_algos: z
|
|
49
91
|
.array(z.enum(['secp256k1', 'ethsecp256k1', 'ed25519', 'sr25519', 'bn254']))
|
|
50
92
|
.optional(),
|
|
@@ -54,7 +96,7 @@ export const CosmosChainSchema = z
|
|
|
54
96
|
.object({
|
|
55
97
|
fee_tokens: z.array(z
|
|
56
98
|
.object({
|
|
57
|
-
denom: z.string(),
|
|
99
|
+
denom: z.string().min(1),
|
|
58
100
|
fixed_min_gas_price: z.number().optional(),
|
|
59
101
|
low_gas_price: z.number().optional(),
|
|
60
102
|
average_gas_price: z.number().optional(),
|
|
@@ -73,7 +115,7 @@ export const CosmosChainSchema = z
|
|
|
73
115
|
.optional(),
|
|
74
116
|
staking: z
|
|
75
117
|
.object({
|
|
76
|
-
staking_tokens: z.array(z.object({ denom: z.string() }).strict()),
|
|
118
|
+
staking_tokens: z.array(z.object({ denom: z.string().min(1) }).strict()),
|
|
77
119
|
lock_duration: z
|
|
78
120
|
.object({
|
|
79
121
|
blocks: z
|
|
@@ -82,6 +124,7 @@ export const CosmosChainSchema = z
|
|
|
82
124
|
.optional(),
|
|
83
125
|
time: z
|
|
84
126
|
.string()
|
|
127
|
+
.min(1)
|
|
85
128
|
.describe('The approximate time for which the staked tokens are locked.')
|
|
86
129
|
.optional(),
|
|
87
130
|
})
|
|
@@ -92,60 +135,177 @@ export const CosmosChainSchema = z
|
|
|
92
135
|
.optional(),
|
|
93
136
|
codebase: z
|
|
94
137
|
.object({
|
|
95
|
-
git_repo: z.string().url().optional(),
|
|
96
|
-
recommended_version: z.string().optional(),
|
|
138
|
+
git_repo: z.string().url().min(1).optional(),
|
|
139
|
+
recommended_version: z.string().min(1).optional(),
|
|
140
|
+
compatible_versions: z.array(z.string().min(1)).optional(),
|
|
97
141
|
go_version: z
|
|
98
142
|
.string()
|
|
99
143
|
.regex(new RegExp('^[0-9]+\\.[0-9]+(\\.[0-9]+)?$'))
|
|
144
|
+
.min(1)
|
|
100
145
|
.describe('Minimum accepted go version to build the binary.')
|
|
101
146
|
.optional(),
|
|
102
|
-
|
|
147
|
+
language: z
|
|
148
|
+
.object({
|
|
149
|
+
type: z.enum(['go', 'rust', 'solidity', 'other']),
|
|
150
|
+
version: z
|
|
151
|
+
.string()
|
|
152
|
+
.min(1)
|
|
153
|
+
.describe("Simple version string (e.g., 'v1.0.0').")
|
|
154
|
+
.optional(),
|
|
155
|
+
repo: z
|
|
156
|
+
.string()
|
|
157
|
+
.url()
|
|
158
|
+
.min(1)
|
|
159
|
+
.describe('URL of the code repository.')
|
|
160
|
+
.optional(),
|
|
161
|
+
tag: z
|
|
162
|
+
.string()
|
|
163
|
+
.min(1)
|
|
164
|
+
.describe("Detailed version identifier (e.g., 'v1.0.0-a1s2f43g').")
|
|
165
|
+
.optional(),
|
|
166
|
+
})
|
|
167
|
+
.strict()
|
|
168
|
+
.optional(),
|
|
103
169
|
binaries: z
|
|
104
170
|
.object({
|
|
105
|
-
'linux/amd64': z.string().url().optional(),
|
|
106
|
-
'linux/arm64': z.string().url().optional(),
|
|
107
|
-
'darwin/amd64': z.string().url().optional(),
|
|
108
|
-
'darwin/arm64': z.string().url().optional(),
|
|
109
|
-
'windows/amd64': z.string().url().optional(),
|
|
110
|
-
'windows/arm64': z.string().url().optional(),
|
|
171
|
+
'linux/amd64': z.string().url().min(1).optional(),
|
|
172
|
+
'linux/arm64': z.string().url().min(1).optional(),
|
|
173
|
+
'darwin/amd64': z.string().url().min(1).optional(),
|
|
174
|
+
'darwin/arm64': z.string().url().min(1).optional(),
|
|
175
|
+
'windows/amd64': z.string().url().min(1).optional(),
|
|
176
|
+
'windows/arm64': z.string().url().min(1).optional(),
|
|
177
|
+
})
|
|
178
|
+
.strict()
|
|
179
|
+
.optional(),
|
|
180
|
+
cosmos_sdk_version: z.string().min(1).optional(),
|
|
181
|
+
sdk: z
|
|
182
|
+
.object({
|
|
183
|
+
type: z.enum(['cosmos', 'penumbra', 'other']),
|
|
184
|
+
version: z
|
|
185
|
+
.string()
|
|
186
|
+
.min(1)
|
|
187
|
+
.describe("Simple version string (e.g., 'v1.0.0').")
|
|
188
|
+
.optional(),
|
|
189
|
+
repo: z
|
|
190
|
+
.string()
|
|
191
|
+
.url()
|
|
192
|
+
.min(1)
|
|
193
|
+
.describe('URL of the code repository.')
|
|
194
|
+
.optional(),
|
|
195
|
+
tag: z
|
|
196
|
+
.string()
|
|
197
|
+
.min(1)
|
|
198
|
+
.describe("Detailed version identifier (e.g., 'v1.0.0-a1s2f43g').")
|
|
199
|
+
.optional(),
|
|
111
200
|
})
|
|
112
201
|
.strict()
|
|
113
202
|
.optional(),
|
|
114
|
-
cosmos_sdk_version: z.string().optional(),
|
|
115
203
|
consensus: z
|
|
116
204
|
.object({
|
|
117
205
|
type: z.enum(['tendermint', 'cometbft', 'sei-tendermint']),
|
|
118
|
-
version: z
|
|
206
|
+
version: z
|
|
207
|
+
.string()
|
|
208
|
+
.min(1)
|
|
209
|
+
.describe("Simple version string (e.g., 'v1.0.0').")
|
|
210
|
+
.optional(),
|
|
211
|
+
repo: z
|
|
212
|
+
.string()
|
|
213
|
+
.url()
|
|
214
|
+
.min(1)
|
|
215
|
+
.describe('URL of the code repository.')
|
|
216
|
+
.optional(),
|
|
217
|
+
tag: z
|
|
218
|
+
.string()
|
|
219
|
+
.min(1)
|
|
220
|
+
.describe("Detailed version identifier (e.g., 'v1.0.0-a1s2f43g').")
|
|
221
|
+
.optional(),
|
|
119
222
|
})
|
|
120
223
|
.strict()
|
|
121
224
|
.optional(),
|
|
122
|
-
cosmwasm_version: z.string().optional(),
|
|
225
|
+
cosmwasm_version: z.string().min(1).optional(),
|
|
123
226
|
cosmwasm_enabled: z.boolean().optional(),
|
|
124
227
|
cosmwasm_path: z
|
|
125
228
|
.string()
|
|
126
229
|
.regex(new RegExp('^\\$HOME.*$'))
|
|
230
|
+
.min(1)
|
|
127
231
|
.describe('Relative path to the cosmwasm directory. ex. $HOME/.juno/data/wasm')
|
|
128
232
|
.optional(),
|
|
129
|
-
|
|
233
|
+
cosmwasm: z
|
|
234
|
+
.object({
|
|
235
|
+
version: z
|
|
236
|
+
.string()
|
|
237
|
+
.min(1)
|
|
238
|
+
.describe("Simple version string (e.g., 'v1.0.0').")
|
|
239
|
+
.optional(),
|
|
240
|
+
repo: z
|
|
241
|
+
.string()
|
|
242
|
+
.url()
|
|
243
|
+
.min(1)
|
|
244
|
+
.describe('URL of the code repository.')
|
|
245
|
+
.optional(),
|
|
246
|
+
tag: z
|
|
247
|
+
.string()
|
|
248
|
+
.min(1)
|
|
249
|
+
.describe("Detailed version identifier (e.g., 'v1.0.0-a1s2f43g').")
|
|
250
|
+
.optional(),
|
|
251
|
+
enabled: z.boolean().optional(),
|
|
252
|
+
path: z
|
|
253
|
+
.string()
|
|
254
|
+
.regex(new RegExp('^\\$HOME.*$'))
|
|
255
|
+
.min(1)
|
|
256
|
+
.describe('Relative path to the cosmwasm directory. ex. $HOME/.juno/data/wasm')
|
|
257
|
+
.optional(),
|
|
258
|
+
})
|
|
259
|
+
.strict()
|
|
260
|
+
.optional(),
|
|
261
|
+
ibc_go_version: z.string().min(1).optional(),
|
|
130
262
|
ics_enabled: z
|
|
131
263
|
.array(z
|
|
132
264
|
.enum(['ics20-1', 'ics27-1', 'mauth'])
|
|
133
265
|
.describe('IBC app or ICS standard.'))
|
|
134
266
|
.describe('List of IBC apps (usually corresponding to a ICS standard) which have been enabled on the network.')
|
|
135
267
|
.optional(),
|
|
268
|
+
ibc: z
|
|
269
|
+
.object({
|
|
270
|
+
type: z.enum(['go', 'rust', 'other']),
|
|
271
|
+
version: z
|
|
272
|
+
.string()
|
|
273
|
+
.min(1)
|
|
274
|
+
.describe("Simple version string (e.g., 'v1.0.0').")
|
|
275
|
+
.optional(),
|
|
276
|
+
repo: z
|
|
277
|
+
.string()
|
|
278
|
+
.url()
|
|
279
|
+
.min(1)
|
|
280
|
+
.describe('URL of the code repository.')
|
|
281
|
+
.optional(),
|
|
282
|
+
tag: z
|
|
283
|
+
.string()
|
|
284
|
+
.min(1)
|
|
285
|
+
.describe("Detailed version identifier (e.g., 'v1.0.0-a1s2f43g').")
|
|
286
|
+
.optional(),
|
|
287
|
+
ics_enabled: z
|
|
288
|
+
.array(z
|
|
289
|
+
.enum(['ics20-1', 'ics27-1', 'mauth'])
|
|
290
|
+
.describe('IBC app or ICS standard.'))
|
|
291
|
+
.describe('List of IBC apps (usually corresponding to a ICS standard) which have been enabled on the network.')
|
|
292
|
+
.optional(),
|
|
293
|
+
})
|
|
294
|
+
.strict()
|
|
295
|
+
.optional(),
|
|
136
296
|
genesis: z
|
|
137
297
|
.object({
|
|
138
|
-
name: z.string().optional(),
|
|
139
|
-
genesis_url: z.string().url(),
|
|
140
|
-
ics_ccv_url: z.string().url().optional(),
|
|
298
|
+
name: z.string().min(1).optional(),
|
|
299
|
+
genesis_url: z.string().url().min(1),
|
|
300
|
+
ics_ccv_url: z.string().url().min(1).optional(),
|
|
141
301
|
})
|
|
142
302
|
.strict()
|
|
143
303
|
.optional(),
|
|
144
304
|
versions: z
|
|
145
305
|
.array(z
|
|
146
306
|
.object({
|
|
147
|
-
name: z.string().describe('Official Upgrade Name'),
|
|
148
|
-
tag: z.string().describe('Git Upgrade Tag').optional(),
|
|
307
|
+
name: z.string().min(1).describe('Official Upgrade Name'),
|
|
308
|
+
tag: z.string().min(1).describe('Git Upgrade Tag').optional(),
|
|
149
309
|
height: z.number().describe('Block Height').optional(),
|
|
150
310
|
proposal: z
|
|
151
311
|
.number()
|
|
@@ -153,49 +313,168 @@ export const CosmosChainSchema = z
|
|
|
153
313
|
.optional(),
|
|
154
314
|
previous_version_name: z
|
|
155
315
|
.string()
|
|
316
|
+
.min(1)
|
|
156
317
|
.describe('[Optional] Name of the previous version')
|
|
157
318
|
.optional(),
|
|
158
319
|
next_version_name: z
|
|
159
320
|
.string()
|
|
321
|
+
.min(0)
|
|
160
322
|
.describe('[Optional] Name of the following version')
|
|
161
323
|
.optional(),
|
|
162
|
-
recommended_version: z.string().optional(),
|
|
324
|
+
recommended_version: z.string().min(1).optional(),
|
|
325
|
+
compatible_versions: z.array(z.string().min(1)).optional(),
|
|
163
326
|
go_version: z
|
|
164
327
|
.string()
|
|
165
328
|
.regex(new RegExp('^[0-9]+\\.[0-9]+(\\.[0-9]+)?$'))
|
|
329
|
+
.min(1)
|
|
166
330
|
.describe('Minimum accepted go version to build the binary.')
|
|
167
331
|
.optional(),
|
|
168
|
-
|
|
169
|
-
|
|
332
|
+
language: z
|
|
333
|
+
.object({
|
|
334
|
+
type: z.enum(['go', 'rust', 'solidity', 'other']),
|
|
335
|
+
version: z
|
|
336
|
+
.string()
|
|
337
|
+
.min(1)
|
|
338
|
+
.describe("Simple version string (e.g., 'v1.0.0').")
|
|
339
|
+
.optional(),
|
|
340
|
+
repo: z
|
|
341
|
+
.string()
|
|
342
|
+
.url()
|
|
343
|
+
.min(1)
|
|
344
|
+
.describe('URL of the code repository.')
|
|
345
|
+
.optional(),
|
|
346
|
+
tag: z
|
|
347
|
+
.string()
|
|
348
|
+
.min(1)
|
|
349
|
+
.describe("Detailed version identifier (e.g., 'v1.0.0-a1s2f43g').")
|
|
350
|
+
.optional(),
|
|
351
|
+
})
|
|
352
|
+
.strict()
|
|
353
|
+
.optional(),
|
|
354
|
+
cosmos_sdk_version: z.string().min(1).optional(),
|
|
355
|
+
sdk: z
|
|
356
|
+
.object({
|
|
357
|
+
type: z.enum(['cosmos', 'penumbra', 'other']),
|
|
358
|
+
version: z
|
|
359
|
+
.string()
|
|
360
|
+
.min(1)
|
|
361
|
+
.describe("Simple version string (e.g., 'v1.0.0').")
|
|
362
|
+
.optional(),
|
|
363
|
+
repo: z
|
|
364
|
+
.string()
|
|
365
|
+
.url()
|
|
366
|
+
.min(1)
|
|
367
|
+
.describe('URL of the code repository.')
|
|
368
|
+
.optional(),
|
|
369
|
+
tag: z
|
|
370
|
+
.string()
|
|
371
|
+
.min(1)
|
|
372
|
+
.describe("Detailed version identifier (e.g., 'v1.0.0-a1s2f43g').")
|
|
373
|
+
.optional(),
|
|
374
|
+
})
|
|
375
|
+
.strict()
|
|
376
|
+
.optional(),
|
|
170
377
|
consensus: z
|
|
171
378
|
.object({
|
|
172
379
|
type: z.enum(['tendermint', 'cometbft', 'sei-tendermint']),
|
|
173
|
-
version: z
|
|
380
|
+
version: z
|
|
381
|
+
.string()
|
|
382
|
+
.min(1)
|
|
383
|
+
.describe("Simple version string (e.g., 'v1.0.0').")
|
|
384
|
+
.optional(),
|
|
385
|
+
repo: z
|
|
386
|
+
.string()
|
|
387
|
+
.url()
|
|
388
|
+
.min(1)
|
|
389
|
+
.describe('URL of the code repository.')
|
|
390
|
+
.optional(),
|
|
391
|
+
tag: z
|
|
392
|
+
.string()
|
|
393
|
+
.min(1)
|
|
394
|
+
.describe("Detailed version identifier (e.g., 'v1.0.0-a1s2f43g').")
|
|
395
|
+
.optional(),
|
|
174
396
|
})
|
|
175
397
|
.strict()
|
|
176
398
|
.optional(),
|
|
177
|
-
cosmwasm_version: z.string().optional(),
|
|
399
|
+
cosmwasm_version: z.string().min(1).optional(),
|
|
178
400
|
cosmwasm_enabled: z.boolean().optional(),
|
|
179
401
|
cosmwasm_path: z
|
|
180
402
|
.string()
|
|
181
403
|
.regex(new RegExp('^\\$HOME.*$'))
|
|
404
|
+
.min(1)
|
|
182
405
|
.describe('Relative path to the cosmwasm directory. ex. $HOME/.juno/data/wasm')
|
|
183
406
|
.optional(),
|
|
184
|
-
|
|
407
|
+
cosmwasm: z
|
|
408
|
+
.object({
|
|
409
|
+
version: z
|
|
410
|
+
.string()
|
|
411
|
+
.min(1)
|
|
412
|
+
.describe("Simple version string (e.g., 'v1.0.0').")
|
|
413
|
+
.optional(),
|
|
414
|
+
repo: z
|
|
415
|
+
.string()
|
|
416
|
+
.url()
|
|
417
|
+
.min(1)
|
|
418
|
+
.describe('URL of the code repository.')
|
|
419
|
+
.optional(),
|
|
420
|
+
tag: z
|
|
421
|
+
.string()
|
|
422
|
+
.min(1)
|
|
423
|
+
.describe("Detailed version identifier (e.g., 'v1.0.0-a1s2f43g').")
|
|
424
|
+
.optional(),
|
|
425
|
+
enabled: z.boolean().optional(),
|
|
426
|
+
path: z
|
|
427
|
+
.string()
|
|
428
|
+
.regex(new RegExp('^\\$HOME.*$'))
|
|
429
|
+
.min(1)
|
|
430
|
+
.describe('Relative path to the cosmwasm directory. ex. $HOME/.juno/data/wasm')
|
|
431
|
+
.optional(),
|
|
432
|
+
})
|
|
433
|
+
.strict()
|
|
434
|
+
.optional(),
|
|
435
|
+
ibc_go_version: z.string().min(1).optional(),
|
|
185
436
|
ics_enabled: z
|
|
186
437
|
.array(z
|
|
187
438
|
.enum(['ics20-1', 'ics27-1', 'mauth'])
|
|
188
439
|
.describe('IBC app or ICS standard.'))
|
|
189
440
|
.describe('List of IBC apps (usually corresponding to a ICS standard) which have been enabled on the network.')
|
|
190
441
|
.optional(),
|
|
442
|
+
ibc: z
|
|
443
|
+
.object({
|
|
444
|
+
type: z.enum(['go', 'rust', 'other']),
|
|
445
|
+
version: z
|
|
446
|
+
.string()
|
|
447
|
+
.min(1)
|
|
448
|
+
.describe("Simple version string (e.g., 'v1.0.0').")
|
|
449
|
+
.optional(),
|
|
450
|
+
repo: z
|
|
451
|
+
.string()
|
|
452
|
+
.url()
|
|
453
|
+
.min(1)
|
|
454
|
+
.describe('URL of the code repository.')
|
|
455
|
+
.optional(),
|
|
456
|
+
tag: z
|
|
457
|
+
.string()
|
|
458
|
+
.min(1)
|
|
459
|
+
.describe("Detailed version identifier (e.g., 'v1.0.0-a1s2f43g').")
|
|
460
|
+
.optional(),
|
|
461
|
+
ics_enabled: z
|
|
462
|
+
.array(z
|
|
463
|
+
.enum(['ics20-1', 'ics27-1', 'mauth'])
|
|
464
|
+
.describe('IBC app or ICS standard.'))
|
|
465
|
+
.describe('List of IBC apps (usually corresponding to a ICS standard) which have been enabled on the network.')
|
|
466
|
+
.optional(),
|
|
467
|
+
})
|
|
468
|
+
.strict()
|
|
469
|
+
.optional(),
|
|
191
470
|
binaries: z
|
|
192
471
|
.object({
|
|
193
|
-
'linux/amd64': z.string().url().optional(),
|
|
194
|
-
'linux/arm64': z.string().url().optional(),
|
|
195
|
-
'darwin/amd64': z.string().url().optional(),
|
|
196
|
-
'darwin/arm64': z.string().url().optional(),
|
|
197
|
-
'windows/amd64': z.string().url().optional(),
|
|
198
|
-
'windows/arm64': z.string().url().optional(),
|
|
472
|
+
'linux/amd64': z.string().url().min(1).optional(),
|
|
473
|
+
'linux/arm64': z.string().url().min(1).optional(),
|
|
474
|
+
'darwin/amd64': z.string().url().min(1).optional(),
|
|
475
|
+
'darwin/arm64': z.string().url().min(1).optional(),
|
|
476
|
+
'windows/amd64': z.string().url().min(1).optional(),
|
|
477
|
+
'windows/arm64': z.string().url().min(1).optional(),
|
|
199
478
|
})
|
|
200
479
|
.strict()
|
|
201
480
|
.optional(),
|
|
@@ -212,9 +491,11 @@ export const CosmosChainSchema = z
|
|
|
212
491
|
.object({
|
|
213
492
|
chain_name: z
|
|
214
493
|
.string()
|
|
494
|
+
.min(1)
|
|
215
495
|
.describe("The chain name or platform from which the object resides. E.g., 'cosmoshub', 'ethereum', 'forex', or 'nasdaq'"),
|
|
216
496
|
base_denom: z
|
|
217
497
|
.string()
|
|
498
|
+
.min(1)
|
|
218
499
|
.describe("The base denom of the asset from which the object originates. E.g., when describing ATOM from Cosmos Hub, specify 'uatom', NOT 'atom' nor 'ATOM'; base units are unique per platform.")
|
|
219
500
|
.optional(),
|
|
220
501
|
})
|
|
@@ -224,36 +505,31 @@ export const CosmosChainSchema = z
|
|
|
224
505
|
png: z
|
|
225
506
|
.string()
|
|
226
507
|
.regex(new RegExp('^https://raw\\.githubusercontent\\.com/cosmos/chain-registry/master/(|testnets/|_non-cosmos/)[a-z0-9]+/images/.+\\.png$'))
|
|
508
|
+
.min(1)
|
|
227
509
|
.optional(),
|
|
228
510
|
svg: z
|
|
229
511
|
.string()
|
|
230
512
|
.regex(new RegExp('^https://raw\\.githubusercontent\\.com/cosmos/chain-registry/master/(|testnets/|_non-cosmos/)[a-z0-9]+/images/.+\\.svg$'))
|
|
513
|
+
.min(1)
|
|
231
514
|
.optional(),
|
|
232
515
|
theme: z
|
|
233
516
|
.object({
|
|
234
517
|
primary_color_hex: z
|
|
235
518
|
.string()
|
|
236
|
-
.min(1)
|
|
237
519
|
.regex(new RegExp('^#([0-9a-fA-F]{6}|[0-9a-fA-F]{8})$'))
|
|
520
|
+
.min(1)
|
|
238
521
|
.optional(),
|
|
239
522
|
background_color_hex: z
|
|
240
523
|
.string()
|
|
241
|
-
.min(1)
|
|
242
524
|
.regex(new RegExp('^(#([0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none)$'))
|
|
525
|
+
.min(1)
|
|
243
526
|
.optional(),
|
|
244
527
|
circle: z.boolean().optional(),
|
|
245
528
|
dark_mode: z.boolean().optional(),
|
|
529
|
+
monochrome: z.boolean().optional(),
|
|
246
530
|
})
|
|
247
531
|
.strict()
|
|
248
532
|
.optional(),
|
|
249
|
-
layout: z
|
|
250
|
-
.enum(['logo', 'logomark', 'logotype'])
|
|
251
|
-
.describe('logomark == icon only; logotype == text only; logo == icon + text.')
|
|
252
|
-
.optional(),
|
|
253
|
-
text_position: z
|
|
254
|
-
.enum(['top', 'bottom', 'left', 'right', 'integrated'])
|
|
255
|
-
.describe("Indicates in which position the text is placed, in case the layout is 'icon' type, it's required only in this case.")
|
|
256
|
-
.optional(),
|
|
257
533
|
})
|
|
258
534
|
.strict()
|
|
259
535
|
.and(z.union([z.any(), z.any()])))
|
|
@@ -263,32 +539,34 @@ export const CosmosChainSchema = z
|
|
|
263
539
|
png: z
|
|
264
540
|
.string()
|
|
265
541
|
.regex(new RegExp('^https://raw\\.githubusercontent\\.com/cosmos/chain-registry/master/(|testnets/|_non-cosmos/)[a-z0-9]+/images/.+\\.png$'))
|
|
542
|
+
.min(1)
|
|
266
543
|
.optional(),
|
|
267
544
|
svg: z
|
|
268
545
|
.string()
|
|
269
546
|
.regex(new RegExp('^https://raw\\.githubusercontent\\.com/cosmos/chain-registry/master/(|testnets/|_non-cosmos/)[a-z0-9]+/images/.+\\.svg$'))
|
|
547
|
+
.min(1)
|
|
270
548
|
.optional(),
|
|
271
549
|
})
|
|
272
550
|
.strict()
|
|
273
551
|
.optional(),
|
|
274
|
-
description: z.string().max(3000).optional(),
|
|
552
|
+
description: z.string().min(1).max(3000).optional(),
|
|
275
553
|
peers: z
|
|
276
554
|
.object({
|
|
277
555
|
seeds: z
|
|
278
556
|
.array(z
|
|
279
557
|
.object({
|
|
280
|
-
id: z.string(),
|
|
281
|
-
address: z.string(),
|
|
282
|
-
provider: z.string().optional(),
|
|
558
|
+
id: z.string().min(1),
|
|
559
|
+
address: z.string().min(1),
|
|
560
|
+
provider: z.string().min(1).optional(),
|
|
283
561
|
})
|
|
284
562
|
.strict())
|
|
285
563
|
.optional(),
|
|
286
564
|
persistent_peers: z
|
|
287
565
|
.array(z
|
|
288
566
|
.object({
|
|
289
|
-
id: z.string(),
|
|
290
|
-
address: z.string(),
|
|
291
|
-
provider: z.string().optional(),
|
|
567
|
+
id: z.string().min(1),
|
|
568
|
+
address: z.string().min(1),
|
|
569
|
+
provider: z.string().min(1).optional(),
|
|
292
570
|
})
|
|
293
571
|
.strict())
|
|
294
572
|
.optional(),
|
|
@@ -300,8 +578,8 @@ export const CosmosChainSchema = z
|
|
|
300
578
|
rpc: z
|
|
301
579
|
.array(z
|
|
302
580
|
.object({
|
|
303
|
-
address: z.string(),
|
|
304
|
-
provider: z.string().optional(),
|
|
581
|
+
address: z.string().min(1),
|
|
582
|
+
provider: z.string().min(1).optional(),
|
|
305
583
|
archive: z.boolean().default(false),
|
|
306
584
|
})
|
|
307
585
|
.strict())
|
|
@@ -309,8 +587,8 @@ export const CosmosChainSchema = z
|
|
|
309
587
|
rest: z
|
|
310
588
|
.array(z
|
|
311
589
|
.object({
|
|
312
|
-
address: z.string(),
|
|
313
|
-
provider: z.string().optional(),
|
|
590
|
+
address: z.string().min(1),
|
|
591
|
+
provider: z.string().min(1).optional(),
|
|
314
592
|
archive: z.boolean().default(false),
|
|
315
593
|
})
|
|
316
594
|
.strict())
|
|
@@ -318,8 +596,8 @@ export const CosmosChainSchema = z
|
|
|
318
596
|
grpc: z
|
|
319
597
|
.array(z
|
|
320
598
|
.object({
|
|
321
|
-
address: z.string(),
|
|
322
|
-
provider: z.string().optional(),
|
|
599
|
+
address: z.string().min(1),
|
|
600
|
+
provider: z.string().min(1).optional(),
|
|
323
601
|
archive: z.boolean().default(false),
|
|
324
602
|
})
|
|
325
603
|
.strict())
|
|
@@ -327,8 +605,8 @@ export const CosmosChainSchema = z
|
|
|
327
605
|
wss: z
|
|
328
606
|
.array(z
|
|
329
607
|
.object({
|
|
330
|
-
address: z.string(),
|
|
331
|
-
provider: z.string().optional(),
|
|
608
|
+
address: z.string().min(1),
|
|
609
|
+
provider: z.string().min(1).optional(),
|
|
332
610
|
archive: z.boolean().default(false),
|
|
333
611
|
})
|
|
334
612
|
.strict())
|
|
@@ -336,8 +614,8 @@ export const CosmosChainSchema = z
|
|
|
336
614
|
'grpc-web': z
|
|
337
615
|
.array(z
|
|
338
616
|
.object({
|
|
339
|
-
address: z.string(),
|
|
340
|
-
provider: z.string().optional(),
|
|
617
|
+
address: z.string().min(1),
|
|
618
|
+
provider: z.string().min(1).optional(),
|
|
341
619
|
archive: z.boolean().default(false),
|
|
342
620
|
})
|
|
343
621
|
.strict())
|
|
@@ -345,8 +623,8 @@ export const CosmosChainSchema = z
|
|
|
345
623
|
'evm-http-jsonrpc': z
|
|
346
624
|
.array(z
|
|
347
625
|
.object({
|
|
348
|
-
address: z.string(),
|
|
349
|
-
provider: z.string().optional(),
|
|
626
|
+
address: z.string().min(1),
|
|
627
|
+
provider: z.string().min(1).optional(),
|
|
350
628
|
archive: z.boolean().default(false),
|
|
351
629
|
})
|
|
352
630
|
.strict())
|
|
@@ -357,18 +635,24 @@ export const CosmosChainSchema = z
|
|
|
357
635
|
explorers: z
|
|
358
636
|
.array(z
|
|
359
637
|
.object({
|
|
360
|
-
kind: z.string().optional(),
|
|
361
|
-
url: z.string().optional(),
|
|
362
|
-
tx_page: z.string().optional(),
|
|
363
|
-
account_page: z.string().optional(),
|
|
638
|
+
kind: z.string().min(1).optional(),
|
|
639
|
+
url: z.string().min(1).optional(),
|
|
640
|
+
tx_page: z.string().min(1).optional(),
|
|
641
|
+
account_page: z.string().min(1).optional(),
|
|
642
|
+
validator_page: z.string().min(1).optional(),
|
|
643
|
+
proposal_page: z.string().min(1).optional(),
|
|
644
|
+
block_page: z.string().min(1).optional(),
|
|
364
645
|
})
|
|
365
646
|
.strict())
|
|
366
647
|
.optional(),
|
|
367
|
-
keywords: z.array(z.string()).optional(),
|
|
648
|
+
keywords: z.array(z.string().min(1)).optional(),
|
|
368
649
|
extra_codecs: z.array(z.enum(['ethermint', 'injective'])).optional(),
|
|
369
650
|
})
|
|
370
|
-
.
|
|
651
|
+
.strict()
|
|
652
|
+
.and(z.intersection(z.any(), z.any()))
|
|
371
653
|
.describe('Cosmos Chain.json is a metadata file that contains information about a cosmos sdk based chain.');
|
|
654
|
+
// .strict().and(z.intersection(z.any(), z.any())) is similar to .passthrough()
|
|
655
|
+
// using this way as it's exactly as generated by the tool
|
|
372
656
|
export async function getCosmosRegistryChain(chain) {
|
|
373
657
|
const json = await fetch(`https://raw.githubusercontent.com/cosmos/chain-registry/master/${chain}/chain.json`);
|
|
374
658
|
const data = await json.json();
|