UNPKG

@crypto-dex-sdk/format

Version:

Zenlink Format

24 lines (18 loc) 1.27 kB
interface ZenlinkProtocolPrimitivesAssetId { chainId: number; assetType: number; assetIndex: number; } declare function shortenAddress(address: string, characters?: number): string; declare function isAddress(address: string): boolean; declare function getAddress(address: string): string; declare function isZenlinkAddress(address: string): boolean; declare function addressToZenlinkAssetId(address: string): ZenlinkProtocolPrimitivesAssetId; declare function zenlinkAssetIdToAddress({ chainId, assetType, assetIndex }: ZenlinkProtocolPrimitivesAssetId): string; declare function shortenName(name?: string, characters?: number): string; declare function formatNumber(value: any): string; declare function formatFullNumber(value: any): string; declare function formatTransactionAmount(num: number | undefined | null, maxDigits?: number): string; declare const formatPercent: (value: any) => string; declare function formatUSD(value: string | number, inputString?: string, full?: boolean): string; export { type ZenlinkProtocolPrimitivesAssetId, addressToZenlinkAssetId, formatFullNumber, formatNumber, formatPercent, formatTransactionAmount, formatUSD, getAddress, isAddress, isZenlinkAddress, shortenAddress, shortenName, zenlinkAssetIdToAddress };