@chain-registry/utils 0.6.0 → 0.6.1
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.
- package/CHANGELOG.md +8 -0
- package/README.md +16 -7
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.1](https://github.com/cosmology-tech/chain-registry/compare/@chain-registry/utils@0.6.0...@chain-registry/utils@0.6.1) (2022-08-31)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @chain-registry/utils
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [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
15
|
|
|
8
16
|
**Note:** Version bump only for package @chain-registry/utils
|
package/README.md
CHANGED
|
@@ -61,24 +61,33 @@ await registry.fetch('https://some-json-schema.com/some-schema.json');
|
|
|
61
61
|
|
|
62
62
|
```js
|
|
63
63
|
// generated asset lists
|
|
64
|
-
const generated = registry.getGeneratedAssetLists('osmosis');
|
|
64
|
+
const generated: AssetList[] = registry.getGeneratedAssetLists('osmosis');
|
|
65
65
|
|
|
66
66
|
// you can also get generated assets from ChainInfo object
|
|
67
|
-
const chainInfo = registry.getChainInfo('osmosis');
|
|
68
|
-
const generatedAssets = chainInfo.assetLists();
|
|
67
|
+
const chainInfo: Chain = registry.getChainInfo('osmosis');
|
|
68
|
+
const generatedAssets: AssetList[] = chainInfo.assetLists();
|
|
69
69
|
```
|
|
70
70
|
## Chain info
|
|
71
71
|
|
|
72
|
+
You can get `Chain` object directly from the regsitry via `getChain`
|
|
73
|
+
|
|
74
|
+
```js
|
|
75
|
+
// get Chain from registry
|
|
76
|
+
const chain: Chain = registry.getChain('osmosis');
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
or get the `ChainInfo` object:
|
|
80
|
+
|
|
72
81
|
```js
|
|
73
|
-
const chainInfo = registry.getChainInfo('osmosis');
|
|
82
|
+
const chainInfo: ChainInfo = registry.getChainInfo('osmosis');
|
|
74
83
|
|
|
75
84
|
// AssetList[] of the generated assets
|
|
76
|
-
chainInfo.assetLists();
|
|
85
|
+
const assetes: AssetList[] = chainInfo.assetLists();
|
|
77
86
|
|
|
78
87
|
// Chain
|
|
79
|
-
chainInfo.chain();
|
|
88
|
+
const chain: Chain = chainInfo.chain();
|
|
80
89
|
|
|
81
90
|
// AssetList[] of the native assets
|
|
82
|
-
chainInfo.nativeAssetLists();
|
|
91
|
+
const assetes: AssetList[] = chainInfo.nativeAssetLists();
|
|
83
92
|
```
|
|
84
93
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chain-registry/utils",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
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": "
|
|
85
|
+
"gitHead": "a09e68e6397e979882e732f4fc833d28c4151293"
|
|
86
86
|
}
|