@chain-registry/workflows 1.27.0 → 1.28.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 +77 -2
  2. package/package.json +4 -5
package/README.md CHANGED
@@ -9,11 +9,86 @@
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
+ - `--outputDir`: Directory to output the generated TypeScript files.
76
+ - `--registryDir`: Path to the chain registry directory.
77
+
78
+ ### Codegen
79
+
80
+ Generate TypeScript interfaces for the registry:
81
+
82
+ ```sh
83
+ chain-registry codegen --outputDir ./src --registryDir /path/to/registry
84
+ ```
85
+
86
+ Options:
87
+
88
+ - `--outputDir`: Directory to output the generated TypeScript files.
89
+ - `--registryDir`: Path to the chain registry directory.
90
+ - `--strictTypeSafety`: Enables strict TypeScript type definitions.
91
+ - `--useCamelCase`: Converts JSON schema properties to camelCase in the generated TypeScript files.
17
92
 
18
93
  ## Related
19
94
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chain-registry/workflows",
3
- "version": "1.27.0",
3
+ "version": "1.28.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.27.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": "7478b00e390b053976e2a5f502d9b407e861c69d"
55
54
  }