@chain-registry/utils 0.6.0 → 0.6.3

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 (3) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +22 -7
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,30 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.6.3](https://github.com/cosmology-tech/chain-registry/compare/@chain-registry/utils@0.6.2...@chain-registry/utils@0.6.3) (2022-08-31)
7
+
8
+ **Note:** Version bump only for package @chain-registry/utils
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.6.2](https://github.com/cosmology-tech/chain-registry/compare/@chain-registry/utils@0.6.1...@chain-registry/utils@0.6.2) (2022-08-31)
15
+
16
+ **Note:** Version bump only for package @chain-registry/utils
17
+
18
+
19
+
20
+
21
+
22
+ ## [0.6.1](https://github.com/cosmology-tech/chain-registry/compare/@chain-registry/utils@0.6.0...@chain-registry/utils@0.6.1) (2022-08-31)
23
+
24
+ **Note:** Version bump only for package @chain-registry/utils
25
+
26
+
27
+
28
+
29
+
6
30
  # [0.6.0](https://github.com/cosmology-tech/chain-registry/compare/@chain-registry/utils@0.5.1...@chain-registry/utils@0.6.0) (2022-08-31)
7
31
 
8
32
  **Note:** Version bump only for package @chain-registry/utils
package/README.md CHANGED
@@ -59,26 +59,41 @@ await registry.fetch('https://some-json-schema.com/some-schema.json');
59
59
 
60
60
  ## Asset lists
61
61
 
62
+ You can get generated asset lists directly from the registry:
63
+
62
64
  ```js
63
65
  // generated asset lists
64
- const generated = registry.getGeneratedAssetLists('osmosis');
66
+ const generated: AssetList[] = registry.getGeneratedAssetLists('osmosis');
67
+ ```
68
+
69
+ You can get generated `AssetList[]` objects directly from the `ChainRegistry` via the `assetLists` method:
65
70
 
71
+ ```js
66
72
  // you can also get generated assets from ChainInfo object
67
- const chainInfo = registry.getChainInfo('osmosis');
68
- const generatedAssets = chainInfo.assetLists();
73
+ const chainInfo: Chain = registry.getChainInfo('osmosis');
74
+ const generatedAssets: AssetList[] = chainInfo.assetLists();
69
75
  ```
70
76
  ## Chain info
71
77
 
78
+ You can get `Chain` object directly from the `ChainRegistry` via the `getChain` method:
79
+
80
+ ```js
81
+ // get Chain from registry
82
+ const chain: Chain = registry.getChain('osmosis');
83
+ ```
84
+
85
+ or get the `ChainInfo` object:
86
+
72
87
  ```js
73
- const chainInfo = registry.getChainInfo('osmosis');
88
+ const chainInfo: ChainInfo = registry.getChainInfo('osmosis');
74
89
 
75
90
  // AssetList[] of the generated assets
76
- chainInfo.assetLists();
91
+ const assetes: AssetList[] = chainInfo.assetLists();
77
92
 
78
93
  // Chain
79
- chainInfo.chain();
94
+ const chain: Chain = chainInfo.chain();
80
95
 
81
96
  // AssetList[] of the native assets
82
- chainInfo.nativeAssetLists();
97
+ const assetes: AssetList[] = chainInfo.nativeAssetLists();
83
98
  ```
84
99
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chain-registry/utils",
3
- "version": "0.6.0",
3
+ "version": "0.6.3",
4
4
  "description": "Chain Registry Utils",
5
5
  "author": "Dan Lynch <pyramation@gmail.com>",
6
6
  "homepage": "https://github.com/cosmology-tech/chain-registry",
@@ -82,5 +82,5 @@
82
82
  "bfs-path": "^1.0.2",
83
83
  "sha.js": "^2.4.11"
84
84
  },
85
- "gitHead": "fd249c670c8952b606da68d26920b8e68a0dbe80"
85
+ "gitHead": "44feb1d68ade1e331f9fcc28d82dd889bb69952d"
86
86
  }