@chain-registry/workflows 1.27.0 → 1.29.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.
Files changed (2) hide show
  1. package/README.md +79 -2
  2. package/package.json +4 -5
package/README.md CHANGED
@@ -9,11 +9,88 @@
9
9
  <img height="20" src="https://github.com/cosmology-tech/chain-registry/actions/workflows/run-tests.yml/badge.svg" />
10
10
  </a>
11
11
  <a href="https://github.com/cosmology-tech/chain-registry/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
12
- <a href="https://www.npmjs.com/package/@chain-registry/workflows"><img height="20" src="https://img.shields.io/github/package-json/v/cosmology-tech/chain-registry?filename=packages%2Fworkflows%2Fpackage.json"></a>
12
+ <a href="https://www.npmjs.com/package/@chain-registry/workflows"><img height="20" src="https://img.shields.io/github/package-json/v/cosmology-tech/chain-registry?filename=workflows%2Fworkflows%2Fpackage.json"></a>
13
13
  </p>
14
14
 
15
- TODO
15
+ The `@chain-registry/workflows` is a powerful library that powers our command-line interface ([`@chain-registry/cli`](https://github.com/cosmology-tech/chain-registry/tree/main/workflows/cli)) designed to interact with the Chain Registry, allowing users to fetch information, validate data, and generate TypeScript interfaces directly from JSON schemas.
16
16
 
17
+ ## Features
18
+
19
+ 🔍 **Info**: Retrieve detailed information about chains, assets, and asset lists.
20
+
21
+ ✅ **Validate**: Check the integrity and validity of the registry data against its schemas.
22
+
23
+ 🛠️ **Codegen**: Generate TypeScript definitions for use in development, ensuring type safety and adherence to the schema definitions.
24
+
25
+
26
+ ## Installation
27
+
28
+ We recommend using the CLI to use workflows. To get started with `@chain-registry/cli`, install it via npm or yarn:
29
+
30
+ ```js
31
+ npm install @chain-registry/cli
32
+ # or
33
+ yarn add @chain-registry/cli
34
+ ```
35
+
36
+ ## Table of Contents
37
+
38
+ - [Features](#features)
39
+ - [Installation](#installation)
40
+ - [Command Details](#command-details)
41
+ - [Info](#info)
42
+ - [Validate](#validate)
43
+ - [Codegen](#codegen)
44
+ - [Related Projects](#related)
45
+ - [Credits](#credits)
46
+ - [Disclaimer](#disclaimer)
47
+
48
+ ## Command Details
49
+
50
+ ### Info
51
+
52
+ Fetch and display information about entities in the chain registry:
53
+
54
+ ```sh
55
+ chain-registry info
56
+ ```
57
+
58
+ Options:
59
+
60
+ - `chain`: Fetch information specific to a chain.
61
+ - `asset-list`: Fetch asset lists associated with a specific chain.
62
+ - `asset`: Fetch detailed information about a specific asset.
63
+ - `--registryDir`: Path to the chain registry directory.
64
+
65
+ ### Validate
66
+
67
+ Validate the data in the registry against the provided JSON schemas:
68
+
69
+ ```sh
70
+ chain-registry validate
71
+ ```
72
+
73
+ Options:
74
+
75
+ - `--registryDir`: Path to the chain registry directory (required).
76
+ - `--useStrict`: Enables strict mode in the schema validation process, ensuring that only explicitly permitted properties are present in the data (default: false).
77
+ - `--allErrors`: Configures the validator to return all errors found during validation instead of stopping at the first error (default: true).
78
+ - `--useDefaults`: Applies default values defined in the schema during validation, filling in missing data as needed (default: true).
79
+
80
+ ### Codegen
81
+
82
+ Generate TypeScript interfaces for the registry:
83
+
84
+ ```sh
85
+ chain-registry codegen --outputDir ./src --registryDir /path/to/registry
86
+ ```
87
+
88
+ Options:
89
+
90
+ - `--outputDir`: Directory to output the generated TypeScript files.
91
+ - `--registryDir`: Path to the chain registry directory.
92
+ - `--strictTypeSafety`: Enables strict TypeScript type definitions.
93
+ - `--useCamelCase`: Converts JSON schema properties to camelCase in the generated TypeScript files.
17
94
 
18
95
  ## Related
19
96
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chain-registry/workflows",
3
- "version": "1.27.0",
3
+ "version": "1.29.0",
4
4
  "description": "Chain Registry Workflows",
5
5
  "author": "Dan Lynch <pyramation@gmail.com>",
6
6
  "homepage": "https://github.com/cosmology-tech/chain-registry",
@@ -32,7 +32,7 @@
32
32
  "strfy-js": "^2.2.2"
33
33
  },
34
34
  "dependencies": {
35
- "@chain-registry/interfaces": "^0.26.0",
35
+ "@chain-registry/interfaces": "^0.28.0",
36
36
  "ajv": "^8.12.0",
37
37
  "ajv-formats": "^3.0.1",
38
38
  "bignumber.js": "9.1.1",
@@ -42,8 +42,7 @@
42
42
  "minimatch": "^9.0.4",
43
43
  "mkdirp": "3.0.1",
44
44
  "schema-typescript": "^0.2.5",
45
- "sha.js": "^2.4.11",
46
- "strfy-js": "^2.2.2"
45
+ "sha.js": "^2.4.11"
47
46
  },
48
47
  "keywords": [
49
48
  "chain-registry",
@@ -51,5 +50,5 @@
51
50
  "cosmos",
52
51
  "interchain"
53
52
  ],
54
- "gitHead": "bef55160d9bd8290980354c99963da3f3b12b94e"
53
+ "gitHead": "df00cf702adec71eeaf5238046cc39e88a305f49"
55
54
  }