@chain-registry/client
Advanced tools
Comparing version 1.14.0 to 1.14.1
@@ -6,2 +6,10 @@ # Change Log | ||
## [1.14.1](https://github.com/cosmology-tech/chain-registry/compare/@chain-registry/client@1.14.0...@chain-registry/client@1.14.1) (2023-07-12) | ||
**Note:** Version bump only for package @chain-registry/client | ||
# [1.14.0](https://github.com/cosmology-tech/chain-registry/compare/@chain-registry/client@1.13.0...@chain-registry/client@1.14.0) (2023-07-11) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "@chain-registry/client", | ||
"version": "1.14.0", | ||
"version": "1.14.1", | ||
"description": "Chain Registry Client", | ||
@@ -77,7 +77,7 @@ "author": "Dan Lynch <pyramation@gmail.com>", | ||
"@chain-registry/types": "^0.16.0", | ||
"@chain-registry/utils": "^1.13.0", | ||
"@chain-registry/utils": "^1.13.1", | ||
"bfs-path": "^1.0.2", | ||
"cross-fetch": "^3.1.5" | ||
}, | ||
"gitHead": "235baabaa618def6fc1bd1de9cd84660c30d1d71" | ||
"gitHead": "6660513da7c427a1b8166f1a68a1c3af6079ab11" | ||
} |
import { AssetList, Chain, IBCInfo } from '@chain-registry/types'; | ||
import { ChainRegistryFetcher } from './fetcher'; | ||
export interface ChainInfoOptions { | ||
chain_name: string; | ||
fetcher: ChainRegistryFetcher; | ||
chain_name: string; | ||
fetcher: ChainRegistryFetcher; | ||
} | ||
export declare class ChainInfo { | ||
chain_name: string; | ||
fetcher: ChainRegistryFetcher; | ||
protected _chain: Chain; | ||
protected _asset_list: AssetList; | ||
protected _asset_lists: AssetList[]; | ||
protected _ibc_data: IBCInfo[]; | ||
constructor(options: ChainInfoOptions); | ||
refresh(): void; | ||
get chain(): Chain; | ||
get nativeAssetLists(): AssetList; | ||
get assetLists(): AssetList[]; | ||
chain_name: string; | ||
fetcher: ChainRegistryFetcher; | ||
protected _chain: Chain; | ||
protected _asset_list: AssetList; | ||
protected _asset_lists: AssetList[]; | ||
protected _ibc_data: IBCInfo[]; | ||
constructor(options: ChainInfoOptions); | ||
refresh(): void; | ||
get chain(): Chain; | ||
get nativeAssetLists(): AssetList; | ||
get assetLists(): any[]; | ||
} |
import { Asset } from '@chain-registry/types'; | ||
import type { | ||
CoinDenom, | ||
CoinGeckoUSD, | ||
Exponent, | ||
PriceHash | ||
} from '@chain-registry/utils'; | ||
import type { CoinDenom, CoinGeckoUSD, Exponent, PriceHash } from '@chain-registry/utils'; | ||
import { ChainInfo } from './chain-info'; | ||
export interface ChainRegistryChainUtilOptions { | ||
chain_name: string; | ||
chain_info: ChainInfo; | ||
chain_name: string; | ||
chain_info: ChainInfo; | ||
} | ||
export declare class ChainRegistryChainUtil { | ||
chain_name: string; | ||
chain_info: ChainInfo; | ||
all_Asset: Asset[]; | ||
constructor(options: ChainRegistryChainUtilOptions); | ||
getAssetByDenom(denom: CoinDenom): Asset; | ||
getDenomByCoinGeckoId(coinGeckoId: string): CoinDenom; | ||
getSymbolByChainDenom(denom: CoinDenom): string; | ||
getChainDenomBySymbol(token: string): CoinDenom; | ||
getExponentByDenom(denom: CoinDenom): Exponent; | ||
convertCoinGeckoPricesToDenomPriceMap( | ||
prices: Record<string, CoinGeckoUSD> | ||
): PriceHash; | ||
noDecimals(num: number | string): string; | ||
convertBaseUnitsToDollarValue( | ||
prices: PriceHash, | ||
symbol: string, | ||
amount: string | number | ||
): string; | ||
convertDollarValueToDenomUnits( | ||
prices: PriceHash, | ||
symbol: string, | ||
value: string | number | ||
): string; | ||
convertBaseUnitsToDisplayUnits( | ||
symbol: string, | ||
amount: string | number | ||
): string; | ||
chain_name: string; | ||
chain_info: ChainInfo; | ||
_all_Asset: Asset[]; | ||
constructor(options: ChainRegistryChainUtilOptions); | ||
getAssetByDenom(denom: CoinDenom): Asset; | ||
getDenomByCoinGeckoId(coinGeckoId: string): CoinDenom; | ||
getSymbolByChainDenom(denom: CoinDenom): string; | ||
getChainDenomBySymbol(token: string): CoinDenom; | ||
getExponentByDenom(denom: CoinDenom): Exponent; | ||
convertCoinGeckoPricesToDenomPriceMap(prices: Record<string, CoinGeckoUSD>): PriceHash; | ||
noDecimals(num: number | string): string; | ||
convertBaseUnitsToDollarValue(prices: PriceHash, symbol: string, amount: string | number): string; | ||
convertDollarValueToDenomUnits(prices: PriceHash, symbol: string, value: string | number): string; | ||
convertBaseUnitsToDisplayUnits(symbol: string, amount: string | number): string; | ||
} |
@@ -1,38 +0,30 @@ | ||
import { | ||
AssetList, | ||
Chain, | ||
ChainRegistry, | ||
IBCInfo | ||
} from '@chain-registry/types'; | ||
import { AssetList, Chain, ChainRegistry, IBCInfo } from '@chain-registry/types'; | ||
import { ChainInfo } from './chain-info'; | ||
export interface ChainRegistryFetcherOptions { | ||
assetLists?: AssetList[]; | ||
chains?: Chain[]; | ||
ibcData?: IBCInfo[]; | ||
urls?: string[]; | ||
assetLists?: AssetList[]; | ||
chains?: Chain[]; | ||
ibcData?: IBCInfo[]; | ||
urls?: string[]; | ||
} | ||
export declare class ChainRegistryFetcher implements ChainRegistry { | ||
urls: string[]; | ||
protected _asset_lists: AssetList[]; | ||
protected _chains: Chain[]; | ||
protected _ibc_data: IBCInfo[]; | ||
private chainInfoList: ChainInfo[]; | ||
constructor(options: ChainRegistryFetcherOptions); | ||
get chains(): Chain[]; | ||
get assetLists(): AssetList[]; | ||
get ibcData(): IBCInfo[]; | ||
getChain(chainName: string): Chain; | ||
getChainAssetList(chainName: string): AssetList; | ||
getGeneratedAssetLists(chainName: string): AssetList[]; | ||
getChainIbcData(chainName: string): IBCInfo; | ||
getChainInfo(chainName: string): ChainInfo; | ||
upsertChain(data: Chain): void; | ||
updateAssetList(data: AssetList): void; | ||
upsertIbcData(data: IBCInfo): void; | ||
update(data: Chain | AssetList | IBCInfo): void; | ||
fetch(url): Promise<void>; | ||
fetchUrls(): Promise<void[]>; | ||
urls: string[]; | ||
protected _asset_lists: AssetList[]; | ||
protected _chains: Chain[]; | ||
protected _ibc_data: IBCInfo[]; | ||
private chainInfoList; | ||
constructor(options?: ChainRegistryFetcherOptions); | ||
get chains(): Chain[]; | ||
get assetLists(): AssetList[]; | ||
get ibcData(): IBCInfo[]; | ||
getChain(chainName: string): Chain; | ||
getChainAssetList(chainName: string): AssetList; | ||
getGeneratedAssetLists(chainName: string): AssetList[]; | ||
getChainIbcData(chainName: string): IBCInfo[]; | ||
getChainInfo(chainName: string): ChainInfo; | ||
upsertChain(data: Chain): void; | ||
updateAssetList(data: AssetList): void; | ||
upsertIbcData(data: IBCInfo): void; | ||
update(data: Chain | AssetList | IBCInfo): void; | ||
fetch(url: any): Promise<void>; | ||
fetchUrls(): Promise<void[]>; | ||
} |
import { ChainRegistryChainUtil } from './chain-util'; | ||
import { ChainRegistryFetcher, ChainRegistryFetcherOptions } from './fetcher'; | ||
export interface ChainRegistryClientOptions | ||
extends ChainRegistryFetcherOptions { | ||
chainNames: string[]; | ||
assetListNames?: string[]; | ||
ibcNamePairs?: string[][]; | ||
baseUrl?: string; | ||
export interface ChainRegistryClientOptions extends ChainRegistryFetcherOptions { | ||
chainNames: string[]; | ||
assetListNames?: string[]; | ||
ibcNamePairs?: string[][]; | ||
baseUrl?: string; | ||
} | ||
export declare class ChainRegistryClient extends ChainRegistryFetcher { | ||
protected _options: ChainRegistryClientOptions; | ||
constructor(options: ChainRegistryClientOptions); | ||
generateUrls(): void; | ||
getChainUtil(chainName: string): ChainRegistryChainUtil; | ||
protected _options: ChainRegistryClientOptions; | ||
constructor(options: ChainRegistryClientOptions); | ||
generateUrls(): void; | ||
getChainUtil(chainName: string): ChainRegistryChainUtil; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
36216
1
590