@xoxno/types 1.0.430 → 1.0.432
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/requests/lending/lending-indexes.dto.d.ts +2 -0
- package/dist/requests/lending/lending-indexes.dto.js +18 -0
- package/dist/stellar-lending/kusto/activity-data.d.ts +16 -0
- package/dist/stellar-lending/kusto/index.d.ts +1 -1
- package/dist/stellar-lending/kusto/index.js +1 -1
- package/dist/stellar-lending/kusto/market-state-data.d.ts +35 -0
- package/dist/stellar-lending/kusto/market-state-data.js +10 -0
- package/package.json +1 -1
- package/dist/stellar-lending/kusto/market-snapshot-row.d.ts +0 -25
- package/dist/stellar-lending/kusto/market-snapshot-row.js +0 -2
|
@@ -143,6 +143,24 @@ __decorate([
|
|
|
143
143
|
}),
|
|
144
144
|
__metadata("design:type", Number)
|
|
145
145
|
], LendingIndexesDto.prototype, "aggregatorPriceUsdShort", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, swagger_1.ApiProperty)({
|
|
148
|
+
description: 'Whether the oracle price is within the first (tightest) deviation tolerance band. MVX-only; absent for chains whose oracle does not expose tolerance bands (e.g. Stellar). The UI borrow/withdraw flow reads this flag.',
|
|
149
|
+
required: false,
|
|
150
|
+
type: Boolean,
|
|
151
|
+
example: true,
|
|
152
|
+
}),
|
|
153
|
+
__metadata("design:type", Boolean)
|
|
154
|
+
], LendingIndexesDto.prototype, "withinFirstTolerance", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
(0, swagger_1.ApiProperty)({
|
|
157
|
+
description: 'Whether the oracle price is within the second (wider) deviation tolerance band. MVX-only; absent for chains whose oracle does not expose tolerance bands (e.g. Stellar). The UI borrow/withdraw flow reads this flag.',
|
|
158
|
+
required: false,
|
|
159
|
+
type: Boolean,
|
|
160
|
+
example: true,
|
|
161
|
+
}),
|
|
162
|
+
__metadata("design:type", Boolean)
|
|
163
|
+
], LendingIndexesDto.prototype, "withinSecondTolerance", void 0);
|
|
146
164
|
__decorate([
|
|
147
165
|
(0, swagger_1.ApiProperty)({
|
|
148
166
|
description: 'Blockchain network the indexes belong to (optional, defaults downstream to MVX when absent)',
|
|
@@ -41,4 +41,20 @@ export interface StellarLendingActivityData {
|
|
|
41
41
|
* pick each holder's latest balance deterministically.
|
|
42
42
|
*/
|
|
43
43
|
seq: number;
|
|
44
|
+
/**
|
|
45
|
+
* Pool index (27-dec RAY) on `side` at event time — supply index for supply
|
|
46
|
+
* legs, borrow index for borrow legs. With `balanceShort` (scaled, denominated)
|
|
47
|
+
* the actual balance is `balanceShort * index / 1e27`; interval growth across
|
|
48
|
+
* events yields realized PnL. `null` for non-position events.
|
|
49
|
+
*/
|
|
50
|
+
index: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* Entry risk params for a collateral (supply) leg, in basis points — carried
|
|
53
|
+
* to Kusto so health factor is computed there (collateral-weighted), matching
|
|
54
|
+
* the MVX `LiquidationThreshold`-in-activity pattern. `null` on borrow and
|
|
55
|
+
* non-position rows.
|
|
56
|
+
*/
|
|
57
|
+
liquidationThresholdBps: number | null;
|
|
58
|
+
liquidationBonusBps: number | null;
|
|
59
|
+
loanToValueBps: number | null;
|
|
44
60
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './activity-data';
|
|
2
|
-
export * from './market-
|
|
2
|
+
export * from './market-state-data';
|
|
@@ -15,4 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./activity-data"), exports);
|
|
18
|
-
__exportStar(require("./market-
|
|
18
|
+
__exportStar(require("./market-state-data"), exports);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ActivityType for Stellar-lending market-state activity rows. Deliberately
|
|
3
|
+
* DISTINCT from the MVX `lendingUpdateMarketState` so the existing MVX Kusto
|
|
4
|
+
* update policies (which filter only on `Source=='xoxnoLending'`) never ingest
|
|
5
|
+
* Stellar rows. The new Stellar Kusto functions filter on this + `Chain=='STELLAR'`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const STELLAR_LENDING_MARKET_STATE_ACTIVITY = "stellarLendingUpdateMarketState";
|
|
8
|
+
/**
|
|
9
|
+
* Dynamic JSON written into `NftActivityData.ActivityData` for a Stellar
|
|
10
|
+
* market-state update (emitted on every `market:batch_state_update`). One row
|
|
11
|
+
* per `(hub, asset)`; carries the point-in-time market metrics + price so all
|
|
12
|
+
* market time-series (TVL, APY, utilization, protocol revenue) are derived
|
|
13
|
+
* on-the-fly via Kusto — no snapshot table.
|
|
14
|
+
*
|
|
15
|
+
* Amounts are ACTUAL token units, denominated (display numbers); `*Ray` are
|
|
16
|
+
* 27-dec RAY big-int strings.
|
|
17
|
+
*/
|
|
18
|
+
export interface StellarLendingMarketStateData {
|
|
19
|
+
hubId: number;
|
|
20
|
+
spokeId: number | null;
|
|
21
|
+
token: string;
|
|
22
|
+
symbol: string;
|
|
23
|
+
decimals: number;
|
|
24
|
+
supplyAmount: number;
|
|
25
|
+
borrowAmount: number;
|
|
26
|
+
availableLiquidity: number;
|
|
27
|
+
revenue: number;
|
|
28
|
+
supplyApy: number;
|
|
29
|
+
borrowApy: number;
|
|
30
|
+
utilizationRate: number;
|
|
31
|
+
supplyIndexRay: string;
|
|
32
|
+
borrowIndexRay: string;
|
|
33
|
+
oraclePrice: number | null;
|
|
34
|
+
seq: number;
|
|
35
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.STELLAR_LENDING_MARKET_STATE_ACTIVITY = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* ActivityType for Stellar-lending market-state activity rows. Deliberately
|
|
6
|
+
* DISTINCT from the MVX `lendingUpdateMarketState` so the existing MVX Kusto
|
|
7
|
+
* update policies (which filter only on `Source=='xoxnoLending'`) never ingest
|
|
8
|
+
* Stellar rows. The new Stellar Kusto functions filter on this + `Chain=='STELLAR'`.
|
|
9
|
+
*/
|
|
10
|
+
exports.STELLAR_LENDING_MARKET_STATE_ACTIVITY = 'stellarLendingUpdateMarketState';
|
package/package.json
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* One row of the Kusto `StellarLendingMarketSnapshot` table, written by the
|
|
3
|
-
* hub-aware snapshot cron. `SpokeId` is null for hub/asset-scoped rows and set
|
|
4
|
-
* for spoke/reserve-scoped rows.
|
|
5
|
-
*/
|
|
6
|
-
export interface StellarLendingMarketSnapshotRow {
|
|
7
|
-
SnapshotAt: string;
|
|
8
|
-
Chain: 'STELLAR';
|
|
9
|
-
HubId: number;
|
|
10
|
-
SpokeId: number | null;
|
|
11
|
-
Token: string;
|
|
12
|
-
Symbol: string;
|
|
13
|
-
Decimals: number;
|
|
14
|
-
UsdPrice: number;
|
|
15
|
-
SupplyApy: number;
|
|
16
|
-
BorrowApy: number;
|
|
17
|
-
Utilization: number;
|
|
18
|
-
TotalDepositsRaw: string;
|
|
19
|
-
TotalDepositsUsd: number;
|
|
20
|
-
TotalBorrowsRaw: string;
|
|
21
|
-
TotalBorrowsUsd: number;
|
|
22
|
-
AvailableLiquidityUsd: number;
|
|
23
|
-
SupplyIndexRay: string;
|
|
24
|
-
BorrowIndexRay: string;
|
|
25
|
-
}
|