@xoxno/types 1.0.433 → 1.0.435
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.
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./enums"), exports);
|
|
18
18
|
__exportStar(require("./oracle-provider"), exports);
|
|
19
19
|
__exportStar(require("./documents"), exports);
|
|
20
|
+
__exportStar(require("./list"), exports);
|
|
20
21
|
__exportStar(require("./kusto"), exports);
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global list-item contracts for the Stellar-lending read API. These are the
|
|
3
|
+
* row shapes the SDK and UI consume for the Aave-V4 style Deposit/Borrow tables,
|
|
4
|
+
* the All Hubs / All Markets pages, and global search. Persistence shape only
|
|
5
|
+
* (no swagger decorators) — api-v2 owns the response DTOs.
|
|
6
|
+
*
|
|
7
|
+
* Unit conventions mirror the detail contracts: APY/utilization are decimals in
|
|
8
|
+
* `[0,1]`, `*Usd` are USD numbers, `*Native` are human-readable token amounts
|
|
9
|
+
* (live), and `*Bps` are basis points.
|
|
10
|
+
*/
|
|
11
|
+
/** `[min, max]` inclusive range. */
|
|
12
|
+
export type StellarApyRange = [min: number, max: number];
|
|
13
|
+
/**
|
|
14
|
+
* One asset aggregated across every hub/market it lists on — a row in the
|
|
15
|
+
* Deposit/Borrow asset tables. USD/native totals and APY ranges are summed/taken
|
|
16
|
+
* over the asset's hub-assets at live indexes.
|
|
17
|
+
*/
|
|
18
|
+
export interface StellarAssetListItem {
|
|
19
|
+
asset: string;
|
|
20
|
+
symbol: string;
|
|
21
|
+
name: string;
|
|
22
|
+
decimals: number;
|
|
23
|
+
/** Live spot USD price per whole unit. */
|
|
24
|
+
price: number;
|
|
25
|
+
totalDepositsUsd: number;
|
|
26
|
+
/** Total supplied across hubs, human-readable token units (live). */
|
|
27
|
+
totalDepositsNative: number;
|
|
28
|
+
totalBorrowsUsd: number;
|
|
29
|
+
/** Total borrowed across hubs, human-readable token units (live). */
|
|
30
|
+
totalBorrowsNative: number;
|
|
31
|
+
availableLiquidityUsd: number;
|
|
32
|
+
/** `[min, max]` supply APY across the asset's hubs. */
|
|
33
|
+
supplyApyRange: StellarApyRange;
|
|
34
|
+
/** `[min, max]` borrow APY across the asset's hubs. */
|
|
35
|
+
borrowApyRange: StellarApyRange;
|
|
36
|
+
/** Number of hubs listing this asset. */
|
|
37
|
+
hubCount: number;
|
|
38
|
+
/** Number of reserves (spoke,hub) for this asset. */
|
|
39
|
+
marketCount: number;
|
|
40
|
+
}
|
|
41
|
+
/** One hub aggregated over its hub-assets — a row in the All Hubs table. */
|
|
42
|
+
export interface StellarHubListItem {
|
|
43
|
+
hubId: number;
|
|
44
|
+
name: string | null;
|
|
45
|
+
/** Total value locked (USD); equals total deposits. */
|
|
46
|
+
tvlUsd: number;
|
|
47
|
+
totalDepositsUsd: number;
|
|
48
|
+
totalBorrowsUsd: number;
|
|
49
|
+
/** Number of assets listed on the hub. */
|
|
50
|
+
assetCount: number;
|
|
51
|
+
/** Number of spokes connected to the hub. */
|
|
52
|
+
spokeCount: number;
|
|
53
|
+
}
|
|
54
|
+
/** One spoke aggregated over its reserves — a row in the All Markets table. */
|
|
55
|
+
export interface StellarSpokeListItem {
|
|
56
|
+
spokeId: number;
|
|
57
|
+
name: string | null;
|
|
58
|
+
/** Primary connected hub (`connectedHubIds[0]`); a spoke may span hubs. */
|
|
59
|
+
hubId: number;
|
|
60
|
+
/** Total value locked (USD); equals total deposits across reserves. */
|
|
61
|
+
tvlUsd: number;
|
|
62
|
+
totalBorrowsUsd: number;
|
|
63
|
+
/** Number of assets configured in the spoke. */
|
|
64
|
+
assetCount: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* One reserve — an asset in a spoke on a hub. Risk config (CF/threshold/flags)
|
|
68
|
+
* is the spoke-asset truth; APY/utilization/liquidity/USD are the hub-asset
|
|
69
|
+
* liquidity truth at live indexes. Capacity reflects the supply (deposit) cap.
|
|
70
|
+
*/
|
|
71
|
+
export interface StellarReserveListItem {
|
|
72
|
+
spokeId: number;
|
|
73
|
+
hubId: number;
|
|
74
|
+
asset: string;
|
|
75
|
+
symbol: string;
|
|
76
|
+
decimals: number;
|
|
77
|
+
supplyApy: number;
|
|
78
|
+
borrowApy: number;
|
|
79
|
+
/** Utilization rate in `[0,1]`. */
|
|
80
|
+
utilizationRate: number;
|
|
81
|
+
totalDepositsUsd: number;
|
|
82
|
+
totalBorrowsUsd: number;
|
|
83
|
+
availableLiquidityUsd: number;
|
|
84
|
+
/** Supply (deposit) capacity filled, percentage `[0,100]`; 0 when uncapped. */
|
|
85
|
+
capacityFilledPct: number;
|
|
86
|
+
/** Remaining supply capacity valued in USD; 0 when uncapped. */
|
|
87
|
+
remainingCapacityUsd: number;
|
|
88
|
+
/** Collateral factor (LTV) in basis points. */
|
|
89
|
+
collateralFactorBps: number;
|
|
90
|
+
liquidationThresholdBps: number;
|
|
91
|
+
/** Whether the asset can be used as collateral in this spoke. */
|
|
92
|
+
useAsCollateral: boolean;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* One row in a user's lending action feed — a single position leg the user
|
|
96
|
+
* performed, newest first. Sourced from `StellarLendingPositionActivity()`
|
|
97
|
+
* filtered by `Owner`; `usd` is the action delta valued at the event-time
|
|
98
|
+
* oracle price (`amountShort * oraclePrice`).
|
|
99
|
+
*/
|
|
100
|
+
export interface StellarUserActivityItem {
|
|
101
|
+
/** Event time (ISO-8601). */
|
|
102
|
+
timestamp: string;
|
|
103
|
+
/** Monotonic event ordinal (`ledger * 1e6 + indexInLedger`); feed sort key. */
|
|
104
|
+
seq: number;
|
|
105
|
+
/** Action kind (supply/borrow/withdraw/repay/liqRepay/liqSeize/multiply/…). */
|
|
106
|
+
action: string;
|
|
107
|
+
/** Position side this leg mutated; `null` for non-position rows. */
|
|
108
|
+
side: 'supply' | 'borrow' | null;
|
|
109
|
+
/** Asset (token) contract address. */
|
|
110
|
+
token: string;
|
|
111
|
+
symbol: string;
|
|
112
|
+
decimals: number;
|
|
113
|
+
hubId: number;
|
|
114
|
+
spokeId: number | null;
|
|
115
|
+
reserveKey: string | null;
|
|
116
|
+
/** Action delta this tx, human-readable token units. */
|
|
117
|
+
amountShort: number;
|
|
118
|
+
/** Action delta valued in USD at event-time oracle price. */
|
|
119
|
+
usd: number;
|
|
120
|
+
/** Liquidator (caller) address on liquidation legs; `null` otherwise. */
|
|
121
|
+
liquidator: string | null;
|
|
122
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Global list-item contracts for the Stellar-lending read API. These are the
|
|
4
|
+
* row shapes the SDK and UI consume for the Aave-V4 style Deposit/Borrow tables,
|
|
5
|
+
* the All Hubs / All Markets pages, and global search. Persistence shape only
|
|
6
|
+
* (no swagger decorators) — api-v2 owns the response DTOs.
|
|
7
|
+
*
|
|
8
|
+
* Unit conventions mirror the detail contracts: APY/utilization are decimals in
|
|
9
|
+
* `[0,1]`, `*Usd` are USD numbers, `*Native` are human-readable token amounts
|
|
10
|
+
* (live), and `*Bps` are basis points.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|