@hyperlane-xyz/registry 7.0.0 → 7.1.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.
@@ -1,5 +1,5 @@
1
1
  import type { Logger } from 'pino';
2
- import type { ChainMap, ChainMetadata, ChainName, WarpCoreConfig } from '@hyperlane-xyz/sdk';
2
+ import type { ChainMap, ChainMetadata, ChainName, WarpCoreConfig, WarpRouteDeployConfig } from '@hyperlane-xyz/sdk';
3
3
  import { ChainAddresses, WarpRouteId } from '../types.js';
4
4
  import { RegistryType, UpdateChainParams, type AddWarpRouteOptions, type ChainFiles, type IRegistry, type RegistryContent } from './IRegistry.js';
5
5
  import { SynchronousRegistry } from './SynchronousRegistry.js';
@@ -20,6 +20,7 @@ export declare class FileSystemRegistry extends SynchronousRegistry implements I
20
20
  getAddresses(): ChainMap<ChainAddresses>;
21
21
  removeChain(chainName: ChainName): void;
22
22
  addWarpRoute(config: WarpCoreConfig, options?: AddWarpRouteOptions): void;
23
+ addWarpRouteConfig(warpConfig: WarpRouteDeployConfig, fileName: string): void;
23
24
  protected listFiles(dirPath: string): string[];
24
25
  protected createOrUpdateChain(chain: UpdateChainParams): void;
25
26
  protected createChainFile(chainName: ChainName, fileName: keyof ChainFiles, data: any, cache: ChainMap<any>, prefix?: string): void;
@@ -84,6 +84,10 @@ export class FileSystemRegistry extends SynchronousRegistry {
84
84
  const addresses = warpConfigToWarpAddresses(config);
85
85
  this.createFile({ filePath: addressesPath, data: toYamlString(addresses) });
86
86
  }
87
+ addWarpRouteConfig(warpConfig, fileName) {
88
+ const filePath = path.join(this.uri, this.getWarpRoutesPath(), fileName);
89
+ this.createFile({ filePath, data: toYamlString(warpConfig) });
90
+ }
87
91
  listFiles(dirPath) {
88
92
  if (!fs.existsSync(dirPath))
89
93
  return [];
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": "7.0.0",
4
+ "version": "7.1.0",
5
5
  "dependencies": {
6
6
  "yaml": "2.4.5",
7
7
  "zod": "^3.21.2"