@kasufinance/kasu-sdk 2.15.0 → 2.17.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/README.md +17 -1
- package/dist/bundle.cjs.js +1144 -221
- package/dist/bundle.esm.js +1141 -222
- package/dist/domain/index.d.ts +2 -2
- package/dist/domain/index.js +1 -1
- package/dist/domain/index.js.map +1 -1
- package/dist/domain/yield-history.d.ts +25 -1
- package/dist/domain/yield-history.js +41 -11
- package/dist/domain/yield-history.js.map +1 -1
- package/dist/domain/yields.d.ts +200 -15
- package/dist/domain/yields.js +211 -14
- package/dist/domain/yields.js.map +1 -1
- package/dist/services/Locking/locking.d.ts +12 -0
- package/dist/services/Locking/locking.js +16 -0
- package/dist/services/Locking/locking.js.map +1 -1
- package/dist/services/Portfolio/portfolio.d.ts +54 -1
- package/dist/services/Portfolio/portfolio.js +357 -80
- package/dist/services/Portfolio/portfolio.js.map +1 -1
- package/dist/services/Portfolio/queries.d.ts +16 -0
- package/dist/services/Portfolio/queries.js +119 -2
- package/dist/services/Portfolio/queries.js.map +1 -1
- package/dist/services/Portfolio/types.d.ts +94 -6
- package/dist/services/Portfolio/yield-history.d.ts +148 -10
- package/dist/services/Portfolio/yield-history.js +241 -31
- package/dist/services/Portfolio/yield-history.js.map +1 -1
- package/dist/services/UserLending/user-lending.d.ts +16 -0
- package/dist/services/UserLending/user-lending.js +24 -0
- package/dist/services/UserLending/user-lending.js.map +1 -1
- package/dist/services/shared.d.ts +7 -0
- package/dist/services/shared.js +48 -0
- package/dist/services/shared.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/index.ts +5 -1
- package/src/domain/yield-history.ts +47 -11
- package/src/domain/yields.ts +257 -15
- package/src/services/Locking/locking.ts +17 -0
- package/src/services/Portfolio/portfolio.ts +559 -126
- package/src/services/Portfolio/queries.ts +119 -2
- package/src/services/Portfolio/types.ts +91 -6
- package/src/services/Portfolio/yield-history.ts +405 -56
- package/src/services/UserLending/user-lending.ts +46 -0
- package/src/services/shared.ts +48 -0
package/README.md
CHANGED
|
@@ -142,6 +142,22 @@ slightly more than lifetime interest (up to about 0.2 %, top-ups are valued at
|
|
|
142
142
|
today's share price), so show "earned to date" from the lifetime figure, not
|
|
143
143
|
from the sum of the bars.
|
|
144
144
|
|
|
145
|
+
Each cycle's interest is paired with the shares in force when that cycle's
|
|
146
|
+
clearing applied it — before the clearing accepted any request — so a
|
|
147
|
+
withdrawal the pool manager accepted between clearings is out of the next
|
|
148
|
+
cycle's figures, and the newest bar equals `getPositions`' last-epoch figure.
|
|
149
|
+
|
|
150
|
+
The subgraph counts a lender's shares as a ledger of accepted deposits and
|
|
151
|
+
withdrawals. Shares moved to or from a wallet any other way are not on it.
|
|
152
|
+
`getPositions` compares the ledger with the chain AT THE BLOCK THE SUBGRAPH
|
|
153
|
+
ANSWERED AT (so indexing lag is never a fault). Where they disagree it reads
|
|
154
|
+
the tranche balances from the chain, so a balance is never negative, and
|
|
155
|
+
sets `ledgerMismatch` on the pool. `ledger-exceeds-chain` (the wallet sent
|
|
156
|
+
shares away) withholds the pool's last-cycle figures and leaves the pool out
|
|
157
|
+
of `getYieldHistory`. An `investedAmount` raised to 0 carries
|
|
158
|
+
`investedAmountFloored`. Lifetime figures stay ledger figures, which include
|
|
159
|
+
the moved principal.
|
|
160
|
+
|
|
145
161
|
`kasu.strategies.getPoolTvlHistory(poolId, { fromEpoch?, count?, timeoutMs?,
|
|
146
162
|
signal? })` returns the strategy's TVL (total lent by everyone) as
|
|
147
163
|
`{ epochId, timestamp, tvl, kind }[]`, ascending in time: one
|
|
@@ -219,7 +235,7 @@ application formats them in its own design system and language.
|
|
|
219
235
|
| Pools | `selectVisiblePools`, `poolMaxApy`, `pickHighestYieldTranche`, `maxNetRateCeiling` |
|
|
220
236
|
| Partners | `getCreditOriginator`, `getInstitutionalLender`, `getStrategyRegion`, `APXIUM`, `INVOICEMATE`, `RIXON_CAPITAL` (each with a `region`) |
|
|
221
237
|
| Fixed term | `availableFixedTermConfigs`, `isFixedTermConfigId`, `lockDurationDays`, `lockDurationMonths`, `DAYS_PER_EPOCH`, `DAYS_PER_MONTH`, `MIN_DAYS_FOR_MONTHS` |
|
|
222
|
-
| Yields | `weeklyInterest`, `dailyInterest`, `
|
|
238
|
+
| Yields | `weeklyInterest`, `dailyInterest`, `accruedInterestSince`, `epochAccrual`, `epochEndTimestamp`, `MAX_ACCRUAL_EPOCHS`, `accruedInterest` (deprecated), `projectedAnnualEarnings`, `weightedAverageApy`, `SECONDS_PER_WEEK` — NET of the performance fee; one epoch from each pool's last clearing (its epoch end if late), held to the next epoch end, then capped at 4 epochs (owner ruling 2026-11-07: a pool can stop being cleared without being flagged stopped) (`Locking.getInitialEpochStartTimestamp()` gives epoch zero) |
|
|
223
239
|
| Batch proof | `validateDepositBatchCalls`, `proveDepositInReceipt`, `DepositBatchMismatchError`, `ENTRY_POINT_V07` |
|
|
224
240
|
| Tranche display name | `getTrancheDisplayName`, `UPPER_MEZZANINE` |
|
|
225
241
|
| Strategy summary | `pickShortDescription` — the CMS short blurb as one line of plain text, or `undefined` (also on every `Strategy` as `summary`) |
|