@xoxno/sdk-js 1.0.212 → 1.0.214

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.
Files changed (52) hide show
  1. package/README.md +73 -42
  2. package/dist/cjs/index.d.ts +3 -3
  3. package/dist/cjs/sdk/index.d.ts +4 -4
  4. package/dist/cjs/sdk/stellar/__tests__/integration.test.d.ts +1 -0
  5. package/dist/cjs/sdk/stellar/admin.d.ts +28 -28
  6. package/dist/cjs/sdk/stellar/cctp.d.ts +2 -2
  7. package/dist/cjs/sdk/stellar/contracts.d.ts +98 -61
  8. package/dist/cjs/sdk/stellar/events/index.d.ts +2 -2
  9. package/dist/cjs/sdk/stellar/governance.d.ts +50 -49
  10. package/dist/cjs/sdk/stellar/index.d.ts +22 -14
  11. package/dist/cjs/sdk/stellar/lending-api-types.d.ts +943 -0
  12. package/dist/cjs/sdk/stellar/lending-read-types.d.ts +54 -269
  13. package/dist/cjs/sdk/stellar/lending-read.d.ts +279 -131
  14. package/dist/cjs/sdk/stellar/lending.d.ts +134 -63
  15. package/dist/cjs/sdk/stellar/prepare.d.ts +27 -7
  16. package/dist/cjs/sdk/stellar/quote.d.ts +16 -9
  17. package/dist/cjs/sdk/stellar/swap.d.ts +4 -5
  18. package/dist/cjs/sdk/stellar-schema.d.ts +5 -0
  19. package/dist/cjs/sdk/swagger.d.ts +96 -51
  20. package/dist/cjs/sdk/types.d.ts +2 -2
  21. package/dist/cjs/utils/api.d.ts +14 -4
  22. package/dist/cjs/utils/const.d.ts +0 -2
  23. package/dist/index.cjs +2 -1
  24. package/dist/index.cjs.LICENSE.txt +8 -0
  25. package/dist/index.d.ts +3 -3
  26. package/dist/index.esm.js +2 -1
  27. package/dist/index.esm.js.LICENSE.txt +8 -0
  28. package/dist/sdk/index.d.ts +4 -4
  29. package/dist/sdk/stellar/__tests__/integration.test.d.ts +1 -0
  30. package/dist/sdk/stellar/admin.d.ts +28 -28
  31. package/dist/sdk/stellar/cctp.d.ts +2 -2
  32. package/dist/sdk/stellar/contracts.d.ts +98 -61
  33. package/dist/sdk/stellar/events/index.d.ts +2 -2
  34. package/dist/sdk/stellar/governance.d.ts +50 -49
  35. package/dist/sdk/stellar/index.cjs +2 -1
  36. package/dist/sdk/stellar/index.cjs.LICENSE.txt +8 -0
  37. package/dist/sdk/stellar/index.d.ts +22 -14
  38. package/dist/sdk/stellar/index.esm.js +2 -1
  39. package/dist/sdk/stellar/index.esm.js.LICENSE.txt +8 -0
  40. package/dist/sdk/stellar/lending-api-types.d.ts +943 -0
  41. package/dist/sdk/stellar/lending-read-types.d.ts +54 -269
  42. package/dist/sdk/stellar/lending-read.d.ts +279 -131
  43. package/dist/sdk/stellar/lending.d.ts +134 -63
  44. package/dist/sdk/stellar/prepare.d.ts +27 -7
  45. package/dist/sdk/stellar/quote.d.ts +16 -9
  46. package/dist/sdk/stellar/swap.d.ts +4 -5
  47. package/dist/sdk/stellar-schema.d.ts +5 -0
  48. package/dist/sdk/swagger.d.ts +96 -51
  49. package/dist/sdk/types.d.ts +2 -2
  50. package/dist/utils/api.d.ts +14 -4
  51. package/dist/utils/const.d.ts +0 -2
  52. package/package.json +9 -4
@@ -0,0 +1,943 @@
1
+ /** @module Stellar lending API types
2
+ * Generated from src/sdk/swagger.json; do not edit by hand.
3
+ */
4
+ import type * as StellarDomain from '@xoxno/types/stellar-lending';
5
+ export type StellarAssetListItemDto = {
6
+ "asset": string;
7
+ "symbol": string;
8
+ "name": string;
9
+ "decimals": number;
10
+ /** Live spot USD price per whole unit. */
11
+ "price": number;
12
+ /** Total supplied across hubs valued in USD (live). */
13
+ "totalDepositsUsd": number;
14
+ /** Total supplied across hubs, human-readable token units (live). */
15
+ "totalDepositsNative": number;
16
+ /** Total borrowed across hubs valued in USD (live). */
17
+ "totalBorrowsUsd": number;
18
+ /** Total borrowed across hubs, human-readable token units (live). */
19
+ "totalBorrowsNative": number;
20
+ /** Available liquidity across hubs in USD (live). */
21
+ "availableLiquidityUsd": number;
22
+ /** [min, max] supply APY across the asset hubs. */
23
+ "supplyApyRange": StellarDomain.StellarApyRange;
24
+ /** [min, max] borrow APY across the asset hubs. */
25
+ "borrowApyRange": StellarDomain.StellarApyRange;
26
+ /** Number of hubs listing this asset. */
27
+ "hubCount": number;
28
+ /** Number of reserves (spoke,hub) for this asset. */
29
+ "marketCount": number;
30
+ /** The two underlying token SACs when this asset is an AMM LP share, so clients can render the pair instead of the share itself, which has no logo. Present only when both oracle legs are Token price keys — a Ref leg is registry-only and has no SAC — so "present" means "renderable pair", with no partial case to handle. */
31
+ "lpUnderlying"?: StellarDomain.StellarLpUnderlying;
32
+ };
33
+ export type StellarLendingContextDto = {
34
+ "assets": Array<StellarAssetListItemDto>;
35
+ "hubs": Array<StellarHubListItemDto>;
36
+ "spokes": Array<StellarSpokeListItemDto>;
37
+ "reserves": Array<StellarReserveListItemDto>;
38
+ /** Reserve details keyed as `${spokeId}:${hubId}:${asset}`. */
39
+ "reserveDetailsByKey": {
40
+ [key: string]: ReserveDto;
41
+ };
42
+ };
43
+ export type StellarLendingLiveStateDto = {
44
+ "indexes": Array<StellarMarketIndexByHub>;
45
+ /** Raw 18-decimal WAD from get_min_borrow_collateral_usd; null when initial controller read fails. */
46
+ "minBorrowCollateralUsdWad": (string) | null;
47
+ };
48
+ export type StellarDetailedMarketDto = {
49
+ "hubId": number;
50
+ "asset": string;
51
+ /** Raw 27-decimal RAY. */
52
+ "supplyIndex": string;
53
+ "supplyIndexShort": number;
54
+ /** Raw 27-decimal RAY. */
55
+ "borrowIndex": string;
56
+ "borrowIndexShort": number;
57
+ /** Composed final USD price, raw 18-decimal WAD. */
58
+ "usdPrice": string;
59
+ "usdPriceShort": number;
60
+ /** Primary oracle leg, raw 18-decimal WAD. */
61
+ "primaryPriceUsd": string;
62
+ "primaryPriceUsdShort": number;
63
+ /** Anchor oracle leg, raw 18-decimal WAD. */
64
+ "anchorPriceUsd": string;
65
+ "anchorPriceUsdShort": number;
66
+ /** Freshest-leg unix-seconds timestamp of the composed price; 0 if unusable. */
67
+ "priceTimestamp": number;
68
+ /** A price leg exceeded its staleness limit. */
69
+ "stale": boolean;
70
+ /** Primary/anchor prices outside the tolerance band. */
71
+ "deviation": boolean;
72
+ /** Fresh, in-band, and within sanity bounds — the only trustworthy state. */
73
+ "valid": boolean;
74
+ "chain": import('@xoxno/types/enums').ActivityChain;
75
+ };
76
+ export type StellarHubListItemDto = {
77
+ "hubId": number;
78
+ "name": (string) | null;
79
+ /** Total value locked (USD); equals deposits. */
80
+ "tvlUsd": number;
81
+ /** Total supplied valued in USD (live). */
82
+ "totalDepositsUsd": number;
83
+ /** Total borrowed valued in USD (live). */
84
+ "totalBorrowsUsd": number;
85
+ /** Number of assets listed on the hub. */
86
+ "assetCount": number;
87
+ /** Number of spokes connected to the hub. */
88
+ "spokeCount": number;
89
+ };
90
+ export type StellarSpokeListItemDto = {
91
+ "spokeId": number;
92
+ "name": (string) | null;
93
+ /** Primary connected hub (connectedHubIds[0]); spokes may span hubs. */
94
+ "hubId": number;
95
+ /** Every hub connected to the spoke. */
96
+ "connectedHubIds": Array<number>;
97
+ /** Total value locked (USD); equals deposits. */
98
+ "tvlUsd": number;
99
+ /** Total borrowed across reserves in USD (live). */
100
+ "totalBorrowsUsd": number;
101
+ /** Number of assets configured in the spoke. */
102
+ "assetCount": number;
103
+ };
104
+ export type StellarReserveListItemDto = {
105
+ "spokeId": number;
106
+ "hubId": number;
107
+ "asset": string;
108
+ "symbol": string;
109
+ "decimals": number;
110
+ "supplyApy": number;
111
+ "borrowApy": number;
112
+ /** Utilization rate in [0,1]. */
113
+ "utilizationRate": number;
114
+ /** Total supplied valued in USD (live). */
115
+ "totalDepositsUsd": number;
116
+ /** Total borrowed valued in USD (live). */
117
+ "totalBorrowsUsd": number;
118
+ /** Available liquidity valued in USD (live). */
119
+ "availableLiquidityUsd": number;
120
+ /** Supply (deposit) capacity filled, percentage [0,100]. A closed reserve (cap 0) reports 100 — it has no room. There is no uncapped state. */
121
+ "capacityFilledPct": number;
122
+ /** Remaining supply capacity valued in USD. 0 means no room left (full or closed), never unlimited. */
123
+ "remainingCapacityUsd": number;
124
+ /** Collateral factor (LTV) in basis points. */
125
+ "collateralFactorBps": number;
126
+ "liquidationThresholdBps": number;
127
+ /** Whether the asset is collateral in this spoke. */
128
+ "useAsCollateral": boolean;
129
+ /** Interest-rate-model curve (ray-scaled) for APY simulation in supply/borrow modals. */
130
+ "irm"?: (ReserveIrmCurveDto);
131
+ };
132
+ export type ReserveDto = {
133
+ "spokeId": number;
134
+ "hubId": number;
135
+ /** Reserve asset (Stellar token C-address). */
136
+ "asset": string;
137
+ /** Reserve asset decimals. */
138
+ "assetDecimals": number;
139
+ /** Hub-scoped supply APY. */
140
+ "supplyApy": number;
141
+ /** Hub-scoped borrow APY. */
142
+ "borrowApy": number;
143
+ /** Hub-pool utilization rate in [0,1] — counts every spoke on the hub. */
144
+ "utilization": number;
145
+ /** This spoke's supplied balance (human-readable units). Spoke-scoped. */
146
+ "suppliedShort": number;
147
+ /** This spoke's borrowed balance (human-readable units). Spoke-scoped. */
148
+ "borrowedShort": number;
149
+ /** Available liquidity / cash (human-readable units). */
150
+ "availableLiquidityShort": number;
151
+ /** Live spot USD price per whole unit. */
152
+ "usdPrice": number;
153
+ /** Total supplied valued in USD (live). */
154
+ "depositsUsd": number;
155
+ /** Total borrowed valued in USD (live). */
156
+ "borrowsUsd": number;
157
+ /** Available liquidity valued in USD (live). */
158
+ "availableLiquidityUsd": number;
159
+ /** Totals for the shared hub pool this reserve draws on — what the IRM and the utilization guard price. The supplied/borrowed totals above are spoke-scoped. */
160
+ "hubPool": (HubPoolDto);
161
+ /** Raw asset-native i128 spoke supply cap. Always an enforced ceiling; 0 means the reserve accepts no new supply (there is no unlimited sentinel). */
162
+ "supplyCap": string;
163
+ /** Raw asset-native i128 spoke borrow cap. Always an enforced ceiling; 0 means the reserve accepts no new borrows (there is no unlimited sentinel). */
164
+ "borrowCap": string;
165
+ /** Spoke supply cap for this reserve (human-readable units). Always an enforced ceiling; 0 means closed to new supply. */
166
+ "supplyCapShort": number;
167
+ /** Spoke borrow cap for this reserve (human-readable units). Always an enforced ceiling; 0 means closed to new borrows. */
168
+ "borrowCapShort": number;
169
+ /** Spoke deposit capacity filled, percentage [0,100]. */
170
+ "depositCapFilledPct": number;
171
+ /** Spoke borrow capacity filled, percentage [0,100]. */
172
+ "borrowCapFilledPct": number;
173
+ "isFlashloanable": boolean;
174
+ "flashloanFeeBps": number;
175
+ /** Live supply index applied to this reserve (ray, 1e27); stored index on fallback. */
176
+ "liveSupplyIndexRay": string;
177
+ /** Live borrow index applied to this reserve (ray, 1e27); stored index on fallback. */
178
+ "liveBorrowIndexRay": string;
179
+ /** Collateral factor (LTV) in basis points. */
180
+ "collateralFactorBps": number;
181
+ "liquidationThresholdBps": number;
182
+ /** Liquidation penalty (bonus) in basis points. */
183
+ "liquidationPenaltyBps": number;
184
+ "liquidationFeesBps": number;
185
+ "isCollateralizable": boolean;
186
+ "isBorrowable": boolean;
187
+ "paused": boolean;
188
+ "frozen": boolean;
189
+ /** Blocks only the liquidation seizure leg. Unlike paused, supply, borrow, withdraw and repay stay open; a liquidator simply cannot take this asset as collateral, so a quote naming it reverts with SpokeAssetSeizureHalted. */
190
+ "noSeize": boolean;
191
+ /** Whether the asset can be used as collateral here. */
192
+ "useAsCollateral": boolean;
193
+ /** Target health factor (wad, 1e18). */
194
+ "targetHealthFactorWad": string;
195
+ /** Health factor at which max bonus applies (wad). */
196
+ "healthFactorForMaxBonusWad": string;
197
+ "liquidationBonusFactorBps": number;
198
+ "irm": ReserveIrmCurveDto;
199
+ /** Assets usable as collateral in this spoke (token addresses). */
200
+ "supportedCollateral": Array<string>;
201
+ /** Assets borrowable in this spoke (token addresses). */
202
+ "borrowable": Array<string>;
203
+ };
204
+ export type TopHoldersDto = {
205
+ "spokeId"?: number;
206
+ "hubId"?: number;
207
+ "asset"?: string;
208
+ "side": "deposits" | "borrows";
209
+ /** Total scaled balance for the side (ray). */
210
+ "totalScaledRay": string;
211
+ "holders": Array<TopHolderDto>;
212
+ };
213
+ export type AssetDto = {
214
+ "asset": string;
215
+ "symbol": string;
216
+ "name": string;
217
+ "decimals": number;
218
+ /** Live spot USD price per whole unit. */
219
+ "usdPrice": number;
220
+ /** Total supplied across hubs valued in USD (live). */
221
+ "totalDepositsUsd": number;
222
+ /** Total borrowed across hubs valued in USD (live). */
223
+ "totalBorrowsUsd": number;
224
+ /** Total supplied across every hub listing this asset (human-readable units). Same quantity the assets list serves. */
225
+ "totalDepositsNative": number;
226
+ /** Total borrowed across every hub listing this asset (human-readable units). Same quantity the assets list serves. */
227
+ "totalBorrowsNative": number;
228
+ /** Available liquidity across hubs valued in USD (live). */
229
+ "availableLiquidityUsd": number;
230
+ /** Number of hubs listing this asset. */
231
+ "hubCount": number;
232
+ /** Number of reserves (spoke,hub) for this asset. */
233
+ "reserveCount": number;
234
+ /** Lowest supply APY across hubs. */
235
+ "minSupplyApy": number;
236
+ /** Highest supply APY across hubs. */
237
+ "maxSupplyApy": number;
238
+ /** Lowest borrow APY across hubs. */
239
+ "minBorrowApy": number;
240
+ /** Highest borrow APY across hubs. */
241
+ "maxBorrowApy": number;
242
+ /** Current indexed oracle configuration; null until first configure. */
243
+ "oracleProvider": ((AssetOracleConfigDto)) | null;
244
+ };
245
+ export type AssetPageDto = {
246
+ "asset": string;
247
+ "symbol": string;
248
+ "name": string;
249
+ "decimals": number;
250
+ /** Live spot USD price per whole unit. */
251
+ "usdPrice": number;
252
+ /** Total supplied across hubs valued in USD (live). */
253
+ "totalDepositsUsd": number;
254
+ /** Total borrowed across hubs valued in USD (live). */
255
+ "totalBorrowsUsd": number;
256
+ /** Total supplied across every hub listing this asset (human-readable units). Same quantity the assets list serves. */
257
+ "totalDepositsNative": number;
258
+ /** Total borrowed across every hub listing this asset (human-readable units). Same quantity the assets list serves. */
259
+ "totalBorrowsNative": number;
260
+ /** Available liquidity across hubs valued in USD (live). */
261
+ "availableLiquidityUsd": number;
262
+ /** Number of hubs listing this asset. */
263
+ "hubCount": number;
264
+ /** Number of reserves (spoke,hub) for this asset. */
265
+ "reserveCount": number;
266
+ /** Lowest supply APY across hubs. */
267
+ "minSupplyApy": number;
268
+ /** Highest supply APY across hubs. */
269
+ "maxSupplyApy": number;
270
+ /** Lowest borrow APY across hubs. */
271
+ "minBorrowApy": number;
272
+ /** Highest borrow APY across hubs. */
273
+ "maxBorrowApy": number;
274
+ /** Current indexed oracle configuration; null until first configure. */
275
+ "oracleProvider": ((AssetOracleConfigDto)) | null;
276
+ "depositMarkets": Array<AssetMarketDto>;
277
+ "borrowMarkets": Array<AssetMarketDto>;
278
+ "graphSeries": Array<AssetPageGraphSeriesDto>;
279
+ };
280
+ export type AssetMarketDto = {
281
+ "spokeId": number;
282
+ "hubId": number;
283
+ "asset": string;
284
+ "spokeName": (string) | null;
285
+ "hubName": (string) | null;
286
+ "supplyApy": number;
287
+ "borrowApy": number;
288
+ "utilization": number;
289
+ /** Total supplied on the hub (human-readable). */
290
+ "suppliedShort": number;
291
+ /** Total borrowed on the hub (human-readable). */
292
+ "borrowedShort": number;
293
+ /** Available liquidity / cash (human-readable). */
294
+ "availableLiquidityShort": number;
295
+ /** Live spot USD price per whole unit. */
296
+ "usdPrice": number;
297
+ /** Total supplied valued in USD (live). */
298
+ "depositsUsd": number;
299
+ /** Total borrowed valued in USD (live). */
300
+ "borrowsUsd": number;
301
+ /** Available liquidity valued in USD (live). */
302
+ "availableLiquidityUsd": number;
303
+ /** Totals for the shared hub pool this reserve draws on — what the IRM and the utilization guard price. The supplied/borrowed totals above are spoke-scoped. */
304
+ "hubPool": (HubPoolDto);
305
+ /** Collateral factor (LTV) in basis points. */
306
+ "collateralFactorBps": number;
307
+ "liquidationThresholdBps": number;
308
+ "isCollateralizable": boolean;
309
+ "isBorrowable": boolean;
310
+ "paused": boolean;
311
+ "frozen": boolean;
312
+ /** Blocks only the liquidation seizure leg; all user verbs stay open. */
313
+ "noSeize": boolean;
314
+ "supplyCapShort": number;
315
+ "borrowCapShort": number;
316
+ "depositCapFilledPct": number;
317
+ "borrowCapFilledPct": number;
318
+ "remainingSupplyCapacityUsd": number;
319
+ "remainingBorrowCapacityUsd": number;
320
+ "supportedCollateral": Array<string>;
321
+ "borrowableAssets": Array<string>;
322
+ "userSuppliedNative": number;
323
+ "userBorrowedNative": number;
324
+ "userSuppliedUsd": number;
325
+ "userBorrowedUsd": number;
326
+ /** Live supply index applied (ray, 1e27). */
327
+ "liveSupplyIndexRay": string;
328
+ /** Live borrow index applied (ray, 1e27). */
329
+ "liveBorrowIndexRay": string;
330
+ };
331
+ export type HubDto = {
332
+ "hubId": number;
333
+ "isActive": boolean;
334
+ "name": (string) | null;
335
+ /** Total supplied valued in USD (live). */
336
+ "totalDepositsUsd": number;
337
+ /** Total borrowed valued in USD (live). */
338
+ "totalBorrowsUsd": number;
339
+ /** Available liquidity valued in USD (live). */
340
+ "availableLiquidityUsd": number;
341
+ /** USD utilization (borrows/deposits); 0 when no deposits. */
342
+ "utilization": number;
343
+ "assetCount": number;
344
+ "assets": Array<HubAssetDto>;
345
+ };
346
+ export type SpokeDto = {
347
+ "spokeId": number;
348
+ "isDeprecated": boolean;
349
+ "name": (string) | null;
350
+ /** Total supplied across reserves valued in USD (live). */
351
+ "totalDepositsUsd": number;
352
+ /** Total borrowed across reserves valued in USD (live). */
353
+ "totalBorrowsUsd": number;
354
+ "assetCount": number;
355
+ /** Hub IDs this spoke connects to. */
356
+ "connectedHubIds": Array<number>;
357
+ /** Count of connected hubs. */
358
+ "connectedHubCount": number;
359
+ /** Target health factor (wad, 1e18). */
360
+ "liquidationTargetHfWad": string;
361
+ /** Health factor at which max liquidation bonus applies (wad). */
362
+ "healthFactorForMaxBonusWad": string;
363
+ "liquidationBonusFactorBps": number;
364
+ "connectedHubs": Array<SpokeConnectedHubDto>;
365
+ "markets": Array<SpokeMarketDto>;
366
+ };
367
+ export type AccountPositionsDto = {
368
+ "positions": Array<AccountPositionDto>;
369
+ };
370
+ export type StellarUserActivityItemDto = {
371
+ /** Event time (ISO-8601). */
372
+ "timestamp": string;
373
+ /** Monotonic event ordinal; feed sort key. */
374
+ "seq": number;
375
+ /** Action kind (supply/borrow/withdraw/repay/liqRepay/...). */
376
+ "action": string;
377
+ /** Position side this leg mutated; null for non-position rows. */
378
+ "side": ("supply" | "borrow") | null;
379
+ /** Asset (token) contract address. */
380
+ "token": string;
381
+ "symbol": string;
382
+ "decimals": number;
383
+ "hubId": number;
384
+ "spokeId": (number) | null;
385
+ "reserveKey": (string) | null;
386
+ /** Action delta this tx, human-readable token units. */
387
+ "amountShort": number;
388
+ /** Action delta valued in USD at event-time price. */
389
+ "usd": number;
390
+ /** Liquidator (caller) address on liquidation legs. */
391
+ "liquidator": (string) | null;
392
+ };
393
+ export type GovernanceProposalsPageDto = {
394
+ "resources": Array<GovernanceProposalDto>;
395
+ "hasMoreResults": boolean;
396
+ /** Opaque continuation token. */
397
+ "continuationToken": (string) | null;
398
+ };
399
+ export type MarketGraphDto = {
400
+ "points": Array<MarketGraphPointDto>;
401
+ "fees"?: Array<FeeGraphPointDto>;
402
+ };
403
+ export type SpokeGraphDto = {
404
+ "spokeId": number;
405
+ "points": Array<SpokeGraphPointDto>;
406
+ };
407
+ export type StellarStatsHistoryDto = {
408
+ /** Bin timestamps (ISO-8601). */
409
+ "timestamps": Array<string>;
410
+ /** Total supplied USD per bin. */
411
+ "supplied": Array<number>;
412
+ /** Total borrowed USD per bin. */
413
+ "borrowed": Array<number>;
414
+ /** Total protocol revenue USD per bin. */
415
+ "revenue": Array<number>;
416
+ };
417
+ export type StellarPositionsPnlDto = {
418
+ "positions": Array<StellarPositionPnlDto>;
419
+ };
420
+ export type StellarCampaignLeaderboardDto = {
421
+ "rows": Array<StellarCampaignRowDto>;
422
+ "campaignStart": string;
423
+ "campaignEnd": string;
424
+ "prizePool": number;
425
+ };
426
+ export type StellarCampaignMeDto = {
427
+ /** 1-based rank among all scorers. */
428
+ "rank": number;
429
+ /** Wallet (Owner). Empty Owner falls back to AccountId. */
430
+ "owner": string;
431
+ /** Campaign points (USD-days + quests). */
432
+ "score": number;
433
+ /** Haircut equity USD-days (max(supply-borrow, 0)). */
434
+ "twEquity": number;
435
+ /** Borrow USD-days, capped at 3x equity. */
436
+ "twBorrow": number;
437
+ /** Estimated prize-pool share (1e6 units proportional to score). */
438
+ "allocation": number;
439
+ "questsCompleted": number;
440
+ "questsTotal": number;
441
+ "quests": StellarCampaignQuestsDto;
442
+ "firstMigrateAt"?: (string) | null;
443
+ "accounts": number;
444
+ "campaignStart": string;
445
+ "campaignEnd": string;
446
+ "prizePool": number;
447
+ };
448
+ export type StellarPositionsRankDto = {
449
+ "positions": Array<StellarPositionRankDto>;
450
+ };
451
+ export type UserHistoryDto = {
452
+ "accountId": string;
453
+ "points": Array<UserHistoryPointDto>;
454
+ };
455
+ export type PnlByScopeDto = {
456
+ "rows": Array<PnlScopeRowDto>;
457
+ };
458
+ export type RevenueSeriesDto = {
459
+ "points": Array<RevenuePointDto>;
460
+ };
461
+ export type FeeRevenueSeriesDto = {
462
+ "points": Array<FeeRevenuePointDto>;
463
+ };
464
+ export type ParticipantCountsDto = {
465
+ "suppliers": number;
466
+ "borrowers": number;
467
+ "total": number;
468
+ };
469
+ export type LiquidationsSeriesDto = {
470
+ "points": Array<LiquidationPointDto>;
471
+ };
472
+ export type LiquidationsLeaderboardDto = {
473
+ "liquidators": Array<LiquidationLeaderRowDto>;
474
+ };
475
+ export type VolumeSeriesDto = {
476
+ "points": Array<VolumePointDto>;
477
+ };
478
+ export type ActiveUsersSeriesDto = {
479
+ "points": Array<ActiveUsersPointDto>;
480
+ };
481
+ export type HolderDistributionDto = {
482
+ "side": "supply" | "borrow";
483
+ "holders": number;
484
+ "totalUsd": number;
485
+ "avgUsd": number;
486
+ "medianUsd": number;
487
+ "p90Usd": number;
488
+ "top1Usd": number;
489
+ "top10Usd": number;
490
+ /** Top-1 holder share of the total, percent. */
491
+ "top1SharePct": number;
492
+ /** Top-10 holders share of the total, percent. */
493
+ "top10SharePct": number;
494
+ };
495
+ export type RateSpreadSeriesDto = {
496
+ "points": Array<RateSpreadPointDto>;
497
+ };
498
+ export type DefiLlamaDimensionsDto = {
499
+ "points": Array<DefiLlamaPointDto>;
500
+ };
501
+ export type StellarWalletBalanceDto = {
502
+ "owner": string;
503
+ /** Deployment-selected Stellar network: mainnet or testnet */
504
+ "network": string;
505
+ "asset": string;
506
+ /** Exact nonnegative i128 token base units. Raw holdings, not guaranteed spendable funds. */
507
+ "amount": string;
508
+ "decimals": number;
509
+ };
510
+ export type StellarActivityPageDto = {
511
+ "resources": Array<StellarActivityEntryDto>;
512
+ "hasMoreResults": boolean;
513
+ "continuationToken"?: string;
514
+ };
515
+ export type StellarMarketIndexByHub = {
516
+ "hubId": number;
517
+ "asset": string;
518
+ /** Raw 27-decimal RAY. */
519
+ "supplyIndex": string;
520
+ "supplyIndexShort": number;
521
+ /** Raw 27-decimal RAY. */
522
+ "borrowIndex": string;
523
+ "borrowIndexShort": number;
524
+ /** Raw 18-decimal WAD. */
525
+ "usdPrice": string;
526
+ "usdPriceShort": number;
527
+ /** Raw 18-decimal WAD. */
528
+ "primaryPriceUsd": string;
529
+ "primaryPriceUsdShort": number;
530
+ /** Raw 18-decimal WAD. */
531
+ "anchorPriceUsd": string;
532
+ "anchorPriceUsdShort": number;
533
+ "chain": import('@xoxno/types/enums').ActivityChain;
534
+ };
535
+ export type ReserveIrmCurveDto = {
536
+ /** Base borrow rate (ray, 1e27). */
537
+ "baseRateRay": string;
538
+ /** Slope below the optimal utilization (ray). */
539
+ "slope1Ray": string;
540
+ /** Slope between optimal and mid utilization (ray). */
541
+ "slope2Ray": string;
542
+ /** Slope above the mid utilization (ray). */
543
+ "slope3Ray": string;
544
+ /** Optimal utilization kink (ray). */
545
+ "optimalUtilizationRay": string;
546
+ /** Mid utilization kink (ray). */
547
+ "midUtilizationRay": string;
548
+ /** Maximum utilization (ray). */
549
+ "maxUtilizationRay": string;
550
+ /** Maximum borrow rate at full utilization (ray). */
551
+ "maxBorrowRateRay": string;
552
+ /** Protocol reserve factor in basis points. */
553
+ "reserveFactorBps": number;
554
+ };
555
+ export type HubPoolDto = {
556
+ /** Hub-wide supplied (human-readable units). */
557
+ "suppliedShort": number;
558
+ /** Hub-wide borrowed (human-readable units). */
559
+ "borrowedShort": number;
560
+ /** Hub-wide supplied valued in USD (live). */
561
+ "depositsUsd": number;
562
+ /** Hub-wide borrowed valued in USD (live). */
563
+ "borrowsUsd": number;
564
+ };
565
+ export type TopHolderDto = {
566
+ "owner": string;
567
+ "accountId": string;
568
+ /** Scaled balance (ray, 1e27). */
569
+ "scaledRay": string;
570
+ /** Balance in human-readable units. */
571
+ "amountShort": number;
572
+ /** Share of the side total, percentage [0,100]. */
573
+ "sharePct": number;
574
+ };
575
+ export type AssetOracleConfigDto = StellarDomain.StellarAssetOracle;
576
+ export type AssetPageGraphSeriesDto = {
577
+ "spokeId": number;
578
+ "hubId": number;
579
+ "spokeName": (string) | null;
580
+ "hubName": (string) | null;
581
+ "points": Array<AssetPageGraphPointDto>;
582
+ };
583
+ export type HubAssetDto = {
584
+ "hubId": number;
585
+ "asset": string;
586
+ "supplyApy": number;
587
+ "borrowApy": number;
588
+ "utilization": number;
589
+ "suppliedShort": number;
590
+ "borrowedShort": number;
591
+ /** Available liquidity / cash (human-readable). */
592
+ "availableLiquidityShort": number;
593
+ /** Live spot USD price per whole unit. */
594
+ "usdPrice": number;
595
+ /** Total supplied valued in USD (live). */
596
+ "depositsUsd": number;
597
+ /** Total borrowed valued in USD (live). */
598
+ "borrowsUsd": number;
599
+ /** Available liquidity valued in USD (live). */
600
+ "availableLiquidityUsd": number;
601
+ "isFlashloanable": boolean;
602
+ /** Live supply index applied (ray, 1e27). */
603
+ "liveSupplyIndexRay": string;
604
+ /** Live borrow index applied (ray, 1e27). */
605
+ "liveBorrowIndexRay": string;
606
+ };
607
+ export type SpokeConnectedHubDto = {
608
+ "hubId": number;
609
+ "name": (string) | null;
610
+ /** Total supplied on this hub through this spoke, USD. */
611
+ "depositsUsd": number;
612
+ /** Total borrowed on this hub through this spoke, USD. */
613
+ "borrowsUsd": number;
614
+ /** Borrowing capacity from collateral on this hub (sum of depositsUsd × LTV). */
615
+ "creditLineUsd": number;
616
+ /** borrowsUsd / creditLineUsd as a percentage (0 when no line). */
617
+ "creditUsedPct": number;
618
+ "assetCount": number;
619
+ /** Asset addresses on this hub. */
620
+ "assets": Array<string>;
621
+ };
622
+ export type SpokeMarketDto = {
623
+ "spokeId": number;
624
+ "hubId": number;
625
+ "asset": string;
626
+ "supplyApy": number;
627
+ "borrowApy": number;
628
+ "utilization": number;
629
+ /** Available liquidity / cash (human-readable). */
630
+ "availableLiquidityShort": number;
631
+ /** Live spot USD price per whole unit. */
632
+ "usdPrice": number;
633
+ /** This spoke's supplied balance for the asset (human-readable units). Spoke-scoped, not the hub-wide total — the hub pool this market draws on is larger. */
634
+ "suppliedShort": number;
635
+ /** This spoke's borrowed balance for the asset (human-readable units). Spoke-scoped; `utilization` above is hub-scoped, so this will not divide into it. */
636
+ "borrowedShort": number;
637
+ /** This spoke's supplied balance valued in USD (live). Spoke-scoped. */
638
+ "depositsUsd": number;
639
+ /** This spoke's borrowed balance valued in USD (live). Spoke-scoped. */
640
+ "borrowsUsd": number;
641
+ /** Available liquidity valued in USD (live). */
642
+ "availableLiquidityUsd": number;
643
+ /** Collateral factor (LTV) in basis points. */
644
+ "collateralFactorBps": number;
645
+ "liquidationThresholdBps": number;
646
+ "isCollateralizable": boolean;
647
+ "isBorrowable": boolean;
648
+ "paused": boolean;
649
+ "frozen": boolean;
650
+ /** Live supply index applied (ray, 1e27). */
651
+ "liveSupplyIndexRay": string;
652
+ /** Live borrow index applied (ray, 1e27). */
653
+ "liveBorrowIndexRay": string;
654
+ };
655
+ export type AccountPositionDto = {
656
+ "accountId": string;
657
+ "owner": string;
658
+ "spokeId": number;
659
+ "hubId": number;
660
+ "asset": string;
661
+ /** Stellar position mode: 0 normal, 1 multiply, 2 long, 3 short. */
662
+ "positionMode": number;
663
+ /** Scaled supply balance (ray, 1e27). */
664
+ "supplyScaledRay": string;
665
+ /** Scaled borrow balance (ray, 1e27). */
666
+ "borrowScaledRay": string;
667
+ "supplyIndexRay": (string) | null;
668
+ "borrowIndexRay": (string) | null;
669
+ /** Actual token quantity in RAY (1e27), not token base units: floor(scaledBalanceRay * appliedIndexRay / 1e27). */
670
+ "supplyAmount": string;
671
+ /** Actual token quantity in RAY (1e27), not token base units: floor(scaledBalanceRay * appliedIndexRay / 1e27). */
672
+ "borrowAmount": string;
673
+ /** Live supply index applied (ray, 1e27); stored index on fallback. */
674
+ "liveSupplyIndexRay": (string) | null;
675
+ /** Live borrow index applied (ray, 1e27); stored index on fallback. */
676
+ "liveBorrowIndexRay": (string) | null;
677
+ /** LTV snapshotted at open time, basis points. */
678
+ "entryLtvBps": number;
679
+ "entryLiquidationThresholdBps": number;
680
+ "entryLiquidationBonusBps": number;
681
+ "entryLiquidationFeesBps": number;
682
+ "initialPaymentMultiplier": (StellarDomain.StellarInitialPaymentMultiplier) | null;
683
+ "updatedAt": number;
684
+ "ledger": number;
685
+ };
686
+ export type GovernanceProposalDto = {
687
+ "operationId": string;
688
+ "kind": StellarDomain.StellarGovernanceProposalKind;
689
+ "status": StellarDomain.StellarGovernanceProposalStatus;
690
+ "target": StellarDomain.StellarGovernanceProposalTarget;
691
+ "targetAddress": string;
692
+ "functionName": string;
693
+ "summary": string;
694
+ "fields": Array<StellarDomain.StellarGovernanceProposalField>;
695
+ "assetAddress"?: string;
696
+ "assetSymbol"?: string;
697
+ "proposer": string;
698
+ "scheduledLedger": number;
699
+ "readyLedger": number;
700
+ "delayLedgers": number;
701
+ "expiresLedger": number;
702
+ "executedLedger"?: number;
703
+ "cancelledLedger"?: number;
704
+ "scheduledAt": number;
705
+ "executedAt"?: number;
706
+ "cancelledAt"?: number;
707
+ "scheduledTxHash": string;
708
+ "executedTxHash"?: string;
709
+ "cancelledTxHash"?: string;
710
+ };
711
+ export type MarketGraphPointDto = {
712
+ /** Bin timestamp (ISO-8601). */
713
+ "timestamp": string;
714
+ "hubId": number;
715
+ "spokeId": (number) | null;
716
+ "token": string;
717
+ "supplyApy": number;
718
+ "borrowApy": number;
719
+ "utilization": number;
720
+ "totalDepositsUsd": number;
721
+ "totalBorrowsUsd": number;
722
+ "availableLiquidityUsd": number;
723
+ "usdPrice": number;
724
+ };
725
+ export type FeeGraphPointDto = {
726
+ /** Bin timestamp (ISO-8601). */
727
+ "timestamp": string;
728
+ /** Summed fee in human-readable units. */
729
+ "feeShort": number;
730
+ /** Summed USD value. */
731
+ "usd": number;
732
+ };
733
+ export type SpokeGraphPointDto = {
734
+ /** Bin timestamp (ISO-8601). */
735
+ "timestamp": string;
736
+ /** Spoke-attributed supplied USD. */
737
+ "suppliedUsd": number;
738
+ /** Spoke-attributed borrowed USD. */
739
+ "borrowedUsd": number;
740
+ /** Spoke-attributed supplied, native units. */
741
+ "suppliedNative": number;
742
+ /** Spoke-attributed borrowed, native units. */
743
+ "borrowedNative": number;
744
+ /** USD-weighted blended supply APY. */
745
+ "supplyApy": number;
746
+ /** USD-weighted blended borrow APY. */
747
+ "borrowApy": number;
748
+ };
749
+ export type StellarPositionPnlDto = {
750
+ "accountId": string;
751
+ "token": string;
752
+ /** Net PnL in USD (interest earned − interest owed). */
753
+ "pnlUsd": number;
754
+ /** Net PnL in token units. */
755
+ "pnlToken": number;
756
+ /** Supply-side interest earned, USD. */
757
+ "interestUsd": number;
758
+ /** Supply-side interest earned, token units. */
759
+ "interest": number;
760
+ /** Borrow-side interest owed, USD (negative). */
761
+ "debtUsd": number;
762
+ /** Borrow-side interest owed, token units (negative). */
763
+ "debt": number;
764
+ };
765
+ export type StellarCampaignRowDto = {
766
+ /** 1-based rank among all scorers. */
767
+ "rank": number;
768
+ /** Wallet (Owner). Empty Owner falls back to AccountId. */
769
+ "owner": string;
770
+ /** Campaign points (USD-days + quests). */
771
+ "score": number;
772
+ /** Haircut equity USD-days (max(supply-borrow, 0)). */
773
+ "twEquity": number;
774
+ /** Borrow USD-days, capped at 3x equity. */
775
+ "twBorrow": number;
776
+ /** Estimated prize-pool share (1e6 units proportional to score). */
777
+ "allocation": number;
778
+ "questsCompleted": number;
779
+ "questsTotal": number;
780
+ "quests": StellarCampaignQuestsDto;
781
+ "firstMigrateAt"?: (string) | null;
782
+ "accounts": number;
783
+ };
784
+ export type StellarCampaignQuestsDto = {
785
+ "supply": boolean;
786
+ "borrow": boolean;
787
+ "multiply": boolean;
788
+ "swapCollateral": boolean;
789
+ "swapDebt": boolean;
790
+ "repayCollateral": boolean;
791
+ "migrate": boolean;
792
+ };
793
+ export type StellarPositionRankDto = {
794
+ /** 1-based rank within the ordered result. */
795
+ "position": number;
796
+ "accountId": string;
797
+ "owner"?: string;
798
+ /** Total supplied USD (or for `token` when filtered). */
799
+ "supplied": number;
800
+ /** Total borrowed USD (or for `token` when filtered). */
801
+ "borrowed": number;
802
+ /** Health factor from StellarGetLendingPositions: debt / liquidation-weighted collateral × 100 (higher = riskier). Debt with zero collateral uses a large sentinel. Liquidatable when >= 100 under that definition — do not invert to Aave-style collateral/debt. */
803
+ "healthFactor": number;
804
+ };
805
+ export type UserHistoryPointDto = {
806
+ /** Bin timestamp (ISO-8601). */
807
+ "timestamp": string;
808
+ "token": string;
809
+ "side": "supply" | "borrow";
810
+ /** Balance in native units. */
811
+ "native": number;
812
+ /** Balance in USD. */
813
+ "usd": number;
814
+ };
815
+ export type PnlScopeRowDto = {
816
+ "scope": "asset" | "hub" | "protocol";
817
+ /** Token, hubId, or "protocol" depending on scope. */
818
+ "groupKey": string;
819
+ "interestToken": number;
820
+ "debtToken": number;
821
+ "pnlToken": number;
822
+ "interestUsd": number;
823
+ "debtUsd": number;
824
+ "pnlUsd": number;
825
+ };
826
+ export type RevenuePointDto = {
827
+ /** Bin timestamp (ISO-8601). */
828
+ "timestamp": string;
829
+ "scope": "asset" | "hub" | "protocol";
830
+ "groupKey": string;
831
+ /** Cumulative revenue USD as of the bin. */
832
+ "cumulativeUsd": number;
833
+ /** Per-bin revenue USD delta (>= 0). */
834
+ "deltaUsd": number;
835
+ /** Cumulative native revenue (asset scope only). */
836
+ "cumulativeNative": number;
837
+ };
838
+ export type FeeRevenuePointDto = {
839
+ /** Bin timestamp (ISO-8601). */
840
+ "timestamp": string;
841
+ "action": "flashLoan" | "strategyFee";
842
+ "token": string;
843
+ /** Fee in native units. */
844
+ "feeNative": number;
845
+ /** Fee in USD (fee x oracle price). */
846
+ "feeUsd": number;
847
+ };
848
+ export type LiquidationPointDto = {
849
+ /** Bin timestamp (ISO-8601). */
850
+ "timestamp": string;
851
+ "repaidUsd": number;
852
+ /** GROSS collateral removed from liquidatees, protocol liquidation fee still inside. This is liquidation volume, NOT liquidator payout — the payout is lower by that fee under both seize modes. Do not add creditedNetUsd to it: they are two views of the same collateral. */
853
+ "seizedUsd": number;
854
+ /** NET collateral actually credited to liquidators, fee removed. Only SeizeMode::Credit liquidations expose it; under SeizeMode::Transfer the fee is withheld inside the pool and never reaches the event stream, so this reads 0 there. Not a substitute for seizedUsd. */
855
+ "creditedNetUsd": number;
856
+ "repaidNative": number;
857
+ "seizedNative": number;
858
+ /** NET collateral credited to liquidators, in native units — the counterpart of seizedNative. 0 under SeizeMode::Transfer. */
859
+ "creditedNetNative": number;
860
+ /** Distinct liquidation events in the bin. Excludes the share-credit receiver leg, which is a second position batch for the same liquidation. */
861
+ "liquidations": number;
862
+ };
863
+ export type LiquidationLeaderRowDto = {
864
+ /** Liquidator (caller) address. */
865
+ "liquidator": string;
866
+ /** Distinct liquidation events executed. */
867
+ "liquidations": number;
868
+ /** Distinct liquidatee accounts touched. */
869
+ "accountsLiquidated": number;
870
+ "repaidUsd": number;
871
+ /** GROSS collateral removed from liquidatees, protocol liquidation fee still inside. This is liquidation volume, NOT liquidator payout — the payout is lower by that fee under both seize modes. Do not add creditedNetUsd to it: they are two views of the same collateral. */
872
+ "seizedUsd": number;
873
+ /** NET collateral actually credited to liquidators, fee removed. Only SeizeMode::Credit liquidations expose it; under SeizeMode::Transfer the fee is withheld inside the pool and never reaches the event stream, so this reads 0 there. Not a substitute for seizedUsd. */
874
+ "creditedNetUsd": number;
875
+ };
876
+ export type VolumePointDto = {
877
+ /** Bin timestamp (ISO-8601). */
878
+ "timestamp": string;
879
+ "supplyUsd": number;
880
+ "borrowUsd": number;
881
+ "withdrawUsd": number;
882
+ "repayUsd": number;
883
+ "supplyNative": number;
884
+ "borrowNative": number;
885
+ "withdrawNative": number;
886
+ "repayNative": number;
887
+ /** (supply + repay) - (withdraw + borrow), USD. */
888
+ "netFlowUsd": number;
889
+ };
890
+ export type ActiveUsersPointDto = {
891
+ /** Bin timestamp (ISO-8601). */
892
+ "timestamp": string;
893
+ "activeAccounts": number;
894
+ "activeOwners": number;
895
+ /** Accounts first seen in this bin. */
896
+ "newUsers": number;
897
+ };
898
+ export type RateSpreadPointDto = {
899
+ /** Bin timestamp (ISO-8601). */
900
+ "timestamp": string;
901
+ "hubId": number;
902
+ "token": string;
903
+ "supplyApy": number;
904
+ "borrowApy": number;
905
+ /** borrowApy - supplyApy. */
906
+ "spread": number;
907
+ };
908
+ export type DefiLlamaPointDto = {
909
+ /** Bin timestamp (ISO-8601). */
910
+ "timestamp": string;
911
+ "tvl": number;
912
+ "borrowed": number;
913
+ /** Borrow interest accrued in the bin. */
914
+ "fees": number;
915
+ /** Reserve revenue accrued in the bin. */
916
+ "revenue": number;
917
+ };
918
+ export type StellarActivityEntryDto = {
919
+ "id": string;
920
+ "network": string;
921
+ "owner": string;
922
+ "transactionHash": string;
923
+ "timestamp": string;
924
+ "action": string;
925
+ "side": string;
926
+ "token": string;
927
+ "seq": number;
928
+ /** Exact signed token base-unit delta. */
929
+ "amount": string;
930
+ "tokenDecimals": (number) | null;
931
+ "symbol": (string) | null;
932
+ "name": (string) | null;
933
+ };
934
+ export type AssetPageGraphPointDto = {
935
+ /** Bin timestamp (ISO-8601). */
936
+ "timestamp": string;
937
+ "supplyApy": number;
938
+ "borrowApy": number;
939
+ "totalDepositsUsd": number;
940
+ "totalBorrowsUsd": number;
941
+ "suppliedNative": number;
942
+ "borrowedNative": number;
943
+ };