@tokemak/utils 0.0.3 → 0.1.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/dist/index.d.ts +5 -3
- package/dist/index.js +33 -1276
- package/dist/index.mjs +314 -0
- package/package.json +19 -7
package/dist/index.d.ts
CHANGED
|
@@ -13,11 +13,11 @@ declare function formatAmount(amount: number | string | undefined, mantissa?: nu
|
|
|
13
13
|
|
|
14
14
|
declare function formatCurrency(amount: number | string, average?: boolean, mantissa?: number): string;
|
|
15
15
|
|
|
16
|
-
declare function formatLargeNumber(amount: number | string,
|
|
16
|
+
declare function formatLargeNumber(amount: number | string, _average?: boolean): string;
|
|
17
17
|
|
|
18
18
|
declare function formatPercent(amount: number | string, mantissa?: number): string;
|
|
19
19
|
|
|
20
|
-
declare function formatTVL(amount: number | string,
|
|
20
|
+
declare function formatTVL(amount: number | string, _average?: boolean): string;
|
|
21
21
|
|
|
22
22
|
declare function formatTOKE(value: bigint): string;
|
|
23
23
|
|
|
@@ -39,6 +39,8 @@ declare const convertNumToBps: (num: number) => number;
|
|
|
39
39
|
|
|
40
40
|
declare const formatUnitsNum: (val: bigint, decimals: number) => number;
|
|
41
41
|
|
|
42
|
+
declare const convertAutoCycleToUnix: (cycle: number) => number;
|
|
43
|
+
|
|
42
44
|
declare const calculateMinAmountWithSlippage: (amount: bigint, slippage: number, decimals?: number) => bigint;
|
|
43
45
|
|
|
44
46
|
declare const getNetwork: (chainId: number | string) => INetwork | undefined;
|
|
@@ -53,4 +55,4 @@ type ExtractAbiFunctionNames<A extends readonly unknown[]> = A extends readonly
|
|
|
53
55
|
name: infer Name extends string;
|
|
54
56
|
} ? Name | ExtractAbiFunctionNames<Tail> : ExtractAbiFunctionNames<Tail> : never;
|
|
55
57
|
|
|
56
|
-
export { ExtractAbiFunctionNames, calculateMinAmountWithSlippage, capitalizeFirstLetter, convertChainCycleToUnix, convertCycleToUnix, convertNumToBps, convertSecondsToRemainingTime, convertStringToBigInt, convertTimestampToDate, formatAmount, formatCurrency, formatDateToReadable, formatEtherNum, formatLargeNumber, formatLessThan, formatPercent, formatPoolName, formatTOKE, formatTVL, formatUnitsNum, getNetwork, getProtocol, getToken, truncateAddress };
|
|
58
|
+
export { ExtractAbiFunctionNames, calculateMinAmountWithSlippage, capitalizeFirstLetter, convertAutoCycleToUnix, convertChainCycleToUnix, convertCycleToUnix, convertNumToBps, convertSecondsToRemainingTime, convertStringToBigInt, convertTimestampToDate, formatAmount, formatCurrency, formatDateToReadable, formatEtherNum, formatLargeNumber, formatLessThan, formatPercent, formatPoolName, formatTOKE, formatTVL, formatUnitsNum, getNetwork, getProtocol, getToken, truncateAddress };
|