@xoxno/types 1.0.432 → 1.0.434

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.
@@ -1,4 +1,5 @@
1
1
  export * from './enums';
2
2
  export * from './oracle-provider';
3
3
  export * from './documents';
4
+ export * from './list';
4
5
  export * from './kusto';
@@ -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);
@@ -57,4 +57,11 @@ export interface StellarLendingActivityData {
57
57
  liquidationThresholdBps: number | null;
58
58
  liquidationBonusBps: number | null;
59
59
  loanToValueBps: number | null;
60
+ /**
61
+ * Liquidator (caller) address on liquidation legs (`liqRepay`/`liqSeize`),
62
+ * correlated by tx from the on-chain `LiquidationEvent`. `null` on all other
63
+ * rows. Enables a top-liquidators leaderboard (the legs' `accountId`/`owner`
64
+ * are the liquidatee).
65
+ */
66
+ liquidator: string | null;
60
67
  }
@@ -0,0 +1,93 @@
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
+ }
@@ -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 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoxno/types",
3
- "version": "1.0.432",
3
+ "version": "1.0.434",
4
4
  "description": "Shared types and utilities for XOXNO API.",
5
5
  "exports": {
6
6
  ".": {