@hyperlane-xyz/registry 10.8.1 → 10.10.0

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.
@@ -4,6 +4,55 @@
4
4
  "hyperlaneChainMetadata": {
5
5
  "type": "object",
6
6
  "properties": {
7
+ "availability": {
8
+ "anyOf": [
9
+ {
10
+ "type": "object",
11
+ "properties": {
12
+ "status": {
13
+ "type": "string",
14
+ "const": "disabled",
15
+ "description": "The status that represents the chain availability. See ChainStatus for valid values."
16
+ },
17
+ "reasons": {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "string",
21
+ "enum": [
22
+ "badrpc",
23
+ "deprecated",
24
+ "private",
25
+ "unavailable",
26
+ "other"
27
+ ]
28
+ },
29
+ "minItems": 1,
30
+ "description": "List of reasons explaining why the chain is disabled."
31
+ }
32
+ },
33
+ "required": [
34
+ "status",
35
+ "reasons"
36
+ ],
37
+ "additionalProperties": false
38
+ },
39
+ {
40
+ "type": "object",
41
+ "properties": {
42
+ "status": {
43
+ "type": "string",
44
+ "const": "live",
45
+ "description": "The status that represents the chain availability. See ChainStatus for valid values."
46
+ }
47
+ },
48
+ "required": [
49
+ "status"
50
+ ],
51
+ "additionalProperties": false
52
+ }
53
+ ],
54
+ "description": "Specifies if the chain is available and the reasons why it is disabled."
55
+ },
7
56
  "bech32Prefix": {
8
57
  "type": "string",
9
58
  "description": "The human readable address prefix for the chains using bech32."
package/dist/consts.d.ts CHANGED
@@ -6,3 +6,4 @@ export declare const WARP_ROUTE_SYMBOL_DIRECTORY_REGEX: RegExp;
6
6
  export declare const WARP_ROUTE_CONFIG_FILE_REGEX: RegExp;
7
7
  export declare const WARP_ROUTE_DEPLOY_FILE_REGEX: RegExp;
8
8
  export declare const ABACUS_WORKS_DEPLOYER_NAME = "Abacus Works";
9
+ export declare const PROXY_DEPLOYED_URL = "https://proxy.hyperlane.xyz";
package/dist/consts.js CHANGED
@@ -6,3 +6,4 @@ export const WARP_ROUTE_SYMBOL_DIRECTORY_REGEX = /warp_routes\/([a-zA-Z0-9]+)$/;
6
6
  export const WARP_ROUTE_CONFIG_FILE_REGEX = /warp_routes\/([a-zA-Z0-9]+)\/([a-z0-9-]+)-config.yaml/;
7
7
  export const WARP_ROUTE_DEPLOY_FILE_REGEX = /warp_routes\/([a-zA-Z0-9]+)\/([a-z0-9-]+)-deploy.yaml/;
8
8
  export const ABACUS_WORKS_DEPLOYER_NAME = 'Abacus Works';
9
+ export const PROXY_DEPLOYED_URL = 'https://proxy.hyperlane.xyz';
@@ -10,7 +10,7 @@ export const warpRouteConfig = {
10
10
  }
11
11
  ],
12
12
  "decimals": 18,
13
- "logoURI": "/deployments/warp_routes/pumpBTCsei/pumpBTCsei-logo.svg",
13
+ "logoURI": "/deployments/warp_routes/REZ/REZ-logo.svg",
14
14
  "name": "Renzo",
15
15
  "standard": "EvmHypXERC20",
16
16
  "symbol": "REZ"
@@ -26,7 +26,7 @@ export const warpRouteConfig = {
26
26
  }
27
27
  ],
28
28
  "decimals": 18,
29
- "logoURI": "/deployments/warp_routes/pumpBTCsei/pumpBTCsei-logo.svg",
29
+ "logoURI": "/deployments/warp_routes/REZ/REZ-logo.svg",
30
30
  "name": "Renzo",
31
31
  "standard": "EvmHypXERC20Lockbox",
32
32
  "symbol": "REZ"
@@ -10,7 +10,7 @@
10
10
  }
11
11
  ],
12
12
  "decimals": 18,
13
- "logoURI": "/deployments/warp_routes/pumpBTCsei/pumpBTCsei-logo.svg",
13
+ "logoURI": "/deployments/warp_routes/REZ/REZ-logo.svg",
14
14
  "name": "Renzo",
15
15
  "standard": "EvmHypXERC20",
16
16
  "symbol": "REZ"
@@ -26,7 +26,7 @@
26
26
  }
27
27
  ],
28
28
  "decimals": 18,
29
- "logoURI": "/deployments/warp_routes/pumpBTCsei/pumpBTCsei-logo.svg",
29
+ "logoURI": "/deployments/warp_routes/REZ/REZ-logo.svg",
30
30
  "name": "Renzo",
31
31
  "standard": "EvmHypXERC20Lockbox",
32
32
  "symbol": "REZ"
@@ -6,7 +6,7 @@ tokens:
6
6
  connections:
7
7
  - token: ethereum|ethereum|0xc32848c38Dd5A5098Cd53d33e425c1013a4E06A8
8
8
  decimals: 18
9
- logoURI: /deployments/warp_routes/pumpBTCsei/pumpBTCsei-logo.svg
9
+ logoURI: /deployments/warp_routes/REZ/REZ-logo.svg
10
10
  name: Renzo
11
11
  standard: EvmHypXERC20
12
12
  symbol: REZ
@@ -17,7 +17,7 @@ tokens:
17
17
  connections:
18
18
  - token: ethereum|base|0xF4eae2f139D8032b8410Fef46f6873cD71A0FD76
19
19
  decimals: 18
20
- logoURI: /deployments/warp_routes/pumpBTCsei/pumpBTCsei-logo.svg
20
+ logoURI: /deployments/warp_routes/REZ/REZ-logo.svg
21
21
  name: Renzo
22
22
  standard: EvmHypXERC20Lockbox
23
23
  symbol: REZ
@@ -1 +1,2 @@
1
1
  export { FileSystemRegistry } from './registry/FileSystemRegistry.js';
2
+ export { getRegistry } from './registry/registry-utils.js';
package/dist/index-fs.js CHANGED
@@ -1,2 +1,3 @@
1
1
  // Exports for utilities that require fs access and are not suitable for browser use
2
2
  export { FileSystemRegistry } from './registry/FileSystemRegistry.js';
3
+ export { getRegistry } from './registry/registry-utils.js';
@@ -0,0 +1,3 @@
1
+ import type { Logger } from 'pino';
2
+ import { IRegistry } from './IRegistry.js';
3
+ export declare function getRegistry(registryUris: string[], enableProxy: boolean, branch?: string, logger?: Logger): IRegistry;
@@ -0,0 +1,45 @@
1
+ import { GithubRegistry } from './GithubRegistry.js';
2
+ import { FileSystemRegistry } from './FileSystemRegistry.js';
3
+ import { DEFAULT_GITHUB_REGISTRY, PROXY_DEPLOYED_URL } from '../consts.js';
4
+ import { MergedRegistry } from './MergedRegistry.js';
5
+ const isHttpsUrl = (value) => {
6
+ try {
7
+ if (!value)
8
+ return false;
9
+ const url = new URL(value);
10
+ return url.protocol === 'https:';
11
+ }
12
+ catch {
13
+ return false;
14
+ }
15
+ };
16
+ const isCanonicalRepoUrl = (url) => {
17
+ return url === DEFAULT_GITHUB_REGISTRY;
18
+ };
19
+ export function getRegistry(registryUris, enableProxy, branch, logger) {
20
+ const registryLogger = logger?.child({ module: 'MergedRegistry' });
21
+ const registries = registryUris
22
+ .map((uri) => uri.trim())
23
+ .filter((uri) => !!uri)
24
+ .map((uri, index) => {
25
+ const childLogger = registryLogger?.child({ uri, index });
26
+ if (isHttpsUrl(uri)) {
27
+ return new GithubRegistry({
28
+ uri,
29
+ branch,
30
+ logger: childLogger,
31
+ proxyUrl: enableProxy && isCanonicalRepoUrl(uri) ? PROXY_DEPLOYED_URL : undefined,
32
+ });
33
+ }
34
+ else {
35
+ return new FileSystemRegistry({
36
+ uri,
37
+ logger: childLogger,
38
+ });
39
+ }
40
+ });
41
+ return new MergedRegistry({
42
+ registries,
43
+ logger,
44
+ });
45
+ }
@@ -4404,7 +4404,7 @@ export const warpRouteConfigs = {
4404
4404
  }
4405
4405
  ],
4406
4406
  "decimals": 18,
4407
- "logoURI": "/deployments/warp_routes/pumpBTCsei/pumpBTCsei-logo.svg",
4407
+ "logoURI": "/deployments/warp_routes/REZ/REZ-logo.svg",
4408
4408
  "name": "Renzo",
4409
4409
  "standard": "EvmHypXERC20",
4410
4410
  "symbol": "REZ"
@@ -4420,7 +4420,7 @@ export const warpRouteConfigs = {
4420
4420
  }
4421
4421
  ],
4422
4422
  "decimals": 18,
4423
- "logoURI": "/deployments/warp_routes/pumpBTCsei/pumpBTCsei-logo.svg",
4423
+ "logoURI": "/deployments/warp_routes/REZ/REZ-logo.svg",
4424
4424
  "name": "Renzo",
4425
4425
  "standard": "EvmHypXERC20Lockbox",
4426
4426
  "symbol": "REZ"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hyperlane-xyz/registry",
3
3
  "description": "A collection of configs, artifacts, and schemas for Hyperlane",
4
- "version": "10.8.1",
4
+ "version": "10.10.0",
5
5
  "dependencies": {
6
6
  "yaml": "2.4.5",
7
7
  "zod": "^3.21.2"
@@ -9,7 +9,7 @@
9
9
  "devDependencies": {
10
10
  "@changesets/cli": "^2.26.2",
11
11
  "@eslint/js": "^9.1.1",
12
- "@hyperlane-xyz/sdk": "7.0.0",
12
+ "@hyperlane-xyz/sdk": "8.8.1",
13
13
  "@types/mocha": "^10.0.1",
14
14
  "@types/node": "^16.9.1",
15
15
  "@typescript-eslint/parser": "^7.7.0",