@panoptic-eng/sdk 1.0.3 → 1.0.5
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/README.md +167 -95
- package/dist/index.d.ts +1765 -131
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1136 -244
- package/dist/index.js.map +1 -1
- package/dist/panoptic/v2/index.d.ts +9402 -0
- package/dist/panoptic/v2/index.d.ts.map +1 -0
- package/dist/panoptic/v2/index.js +12903 -0
- package/dist/panoptic/v2/index.js.map +1 -0
- package/dist/rates-BQ91Bbn6.d.ts +38 -0
- package/dist/rates-BQ91Bbn6.d.ts.map +1 -0
- package/dist/rates-D-7EWaPS.js +8659 -0
- package/dist/rates-D-7EWaPS.js.map +1 -0
- package/package.json +10 -5
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region src/panoptic/v2/formatters/rates.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Per-second rate helpers.
|
|
4
|
+
*
|
|
5
|
+
* Collateral tracker rates are returned as WAD-scaled per-second rates.
|
|
6
|
+
* These helpers annualize them for display.
|
|
7
|
+
*
|
|
8
|
+
* @module v2/formatters/rates
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Annualize a per-second WAD-scaled rate to annual WAD.
|
|
12
|
+
*
|
|
13
|
+
* @param ratePerSecondWad - Rate in WAD per second
|
|
14
|
+
* @returns Annualized rate in WAD
|
|
15
|
+
*/
|
|
16
|
+
declare function annualizePerSecondRateWad(ratePerSecondWad: bigint): bigint;
|
|
17
|
+
/**
|
|
18
|
+
* Format a per-second WAD rate as APY percentage text.
|
|
19
|
+
* Uses linear annualization, then formats as WAD percent.
|
|
20
|
+
*
|
|
21
|
+
* @param ratePerSecondWad - Rate in WAD per second
|
|
22
|
+
* @param precision - Decimal places
|
|
23
|
+
* @returns Percentage string, e.g. "2.41%"
|
|
24
|
+
*/
|
|
25
|
+
declare function formatPerSecondRateWadAsApyPct(ratePerSecondWad: bigint, precision: bigint): string;
|
|
26
|
+
/**
|
|
27
|
+
* Format a per-second WAD rate as APR percentage text.
|
|
28
|
+
* For this rate model, APR presentation uses the same annualized output.
|
|
29
|
+
*
|
|
30
|
+
* @param ratePerSecondWad - Rate in WAD per second
|
|
31
|
+
* @param precision - Decimal places
|
|
32
|
+
* @returns Percentage string, e.g. "2.41%"
|
|
33
|
+
*/
|
|
34
|
+
declare function formatPerSecondRateWadAsAprPct(ratePerSecondWad: bigint, precision: bigint): string;
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { annualizePerSecondRateWad as annualizePerSecondRateWad$1, formatPerSecondRateWadAsAprPct as formatPerSecondRateWadAsAprPct$1, formatPerSecondRateWadAsApyPct as formatPerSecondRateWadAsApyPct$1 };
|
|
38
|
+
//# sourceMappingURL=rates-BQ91Bbn6.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rates-BQ91Bbn6.d.ts","names":["annualizePerSecondRateWad","formatPerSecondRateWadAsApyPct","formatPerSecondRateWadAsAprPct"],"sources":["../src/panoptic/v2/formatters/rates.d.ts"],"sourcesContent":null,"mappings":";;;;;;;;;;;;;;;iBAcwBA,yBAAAA;AAAxB;;;;;;;;iBASwBC,8BAAAA;AAAxB;;;;;;;;iBASwBC,8BAAAA"}
|