@chain-registry/client 1.0.1 → 1.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.
- package/CHANGELOG.md +8 -0
- package/package.json +4 -4
- package/types/index.d.ts +1 -0
- package/types/registry.d.ts +45 -0
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
|
+
# [1.1.0](https://github.com/cosmology-tech/chain-registry/compare/@chain-registry/client@1.0.1...@chain-registry/client@1.1.0) (2022-10-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @chain-registry/client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## 1.0.1 (2022-10-20)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @chain-registry/client
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chain-registry/client",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Chain Registry Client",
|
|
5
5
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/cosmology-tech/chain-registry",
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@babel/runtime": "^7.19.0",
|
|
76
|
-
"@chain-registry/types": "^0.
|
|
77
|
-
"@chain-registry/utils": "^1.0
|
|
76
|
+
"@chain-registry/types": "^0.12.0",
|
|
77
|
+
"@chain-registry/utils": "^1.1.0",
|
|
78
78
|
"bfs-path": "^1.0.2",
|
|
79
79
|
"cross-fetch": "^3.1.5"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "1f570daf2ee8e4a86cd7addf97f453a322b2e9b3"
|
|
82
82
|
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './registry';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AssetList, Chain, ChainRegistry, IBCInfo } from '@chain-registry/types';
|
|
2
|
+
export interface ChainRegistryFetcherOptions {
|
|
3
|
+
assetLists?: AssetList[];
|
|
4
|
+
chains?: Chain[];
|
|
5
|
+
ibcData?: IBCInfo[];
|
|
6
|
+
urls?: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface ChainInfoOptions {
|
|
9
|
+
chain_name: string;
|
|
10
|
+
fetcher: ChainRegistryFetcher;
|
|
11
|
+
}
|
|
12
|
+
export declare class ChainInfo {
|
|
13
|
+
chain_name: string;
|
|
14
|
+
fetcher: ChainRegistryFetcher;
|
|
15
|
+
protected _asset_list: AssetList;
|
|
16
|
+
protected _asset_lists: AssetList[];
|
|
17
|
+
protected _chain: Chain;
|
|
18
|
+
protected _ibc_data: IBCInfo[];
|
|
19
|
+
constructor(options: ChainInfoOptions);
|
|
20
|
+
refresh(): void;
|
|
21
|
+
get nativeAssetLists(): AssetList;
|
|
22
|
+
get chain(): Chain;
|
|
23
|
+
get assetLists(): any[];
|
|
24
|
+
}
|
|
25
|
+
export declare class ChainRegistryFetcher implements ChainRegistry {
|
|
26
|
+
protected _asset_lists: AssetList[];
|
|
27
|
+
protected _chains: Chain[];
|
|
28
|
+
protected _ibc_data: IBCInfo[];
|
|
29
|
+
urls: string[];
|
|
30
|
+
constructor(options?: ChainRegistryFetcherOptions);
|
|
31
|
+
get assetLists(): AssetList[];
|
|
32
|
+
getChainAssetList(chainName: string): AssetList;
|
|
33
|
+
getGeneratedAssetLists(chainName: string): AssetList[];
|
|
34
|
+
get chains(): Chain[];
|
|
35
|
+
getChain(chainName: string): Chain;
|
|
36
|
+
get ibcData(): IBCInfo[];
|
|
37
|
+
getChainIbcData(chainName: string): IBCInfo[];
|
|
38
|
+
getChainInfo(chainName: string): ChainInfo;
|
|
39
|
+
upsertChain(data: Chain): void;
|
|
40
|
+
updateAssetList(data: AssetList): void;
|
|
41
|
+
upsertIbcData(data: IBCInfo): void;
|
|
42
|
+
update(data: Chain | AssetList | IBCInfo): void;
|
|
43
|
+
fetch(url: any): Promise<void>;
|
|
44
|
+
fetchUrls(): Promise<void[]>;
|
|
45
|
+
}
|