@xoxno/types 1.0.470 → 1.0.472

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.
@@ -49,7 +49,7 @@ __decorate([
49
49
  ], LendingPositionStatus.prototype, "borrowed", void 0);
50
50
  __decorate([
51
51
  (0, swagger_1.ApiProperty)({
52
- description: 'The health factor of the lending account',
52
+ description: 'Health factor of the lending account. Stellar (StellarGetLendingPositions): debt / liquidation-weighted collateral × 100 — higher is riskier; >= 100 is liquidatable. MVX uses the same liquidatable threshold (>= 100) on GetLendingPositions. Do not invert the Stellar formula.',
53
53
  example: 30,
54
54
  }),
55
55
  __metadata("design:type", Number)
@@ -1,6 +1,10 @@
1
1
  /**
2
2
  * Soroban event dispatch keys for the XOXNO Stellar lending controller,
3
3
  * each value joined as `"<domain>:<action>"`.
4
+ *
5
+ * Keep in parity with az-functions `StellarV2DispatchKey` plus known-but-
6
+ * unindexed config topics (approve_token, aggregator, accumulator, …).
7
+ * Governance schedulable fn names like `approve_blend_pool` are NOT topics.
4
8
  */
5
9
  export declare enum StellarLendingTopic {
6
10
  MarketCreate = "market:create",
@@ -10,15 +14,28 @@ export declare enum StellarLendingTopic {
10
14
  PositionBatchUpdate = "position:batch_update",
11
15
  PositionFlashLoan = "position:flash_loan",
12
16
  PositionLiquidation = "position:liquidation",
17
+ ConfigHub = "config:hub",
13
18
  ConfigOracle = "config:oracle",
19
+ ConfigOracleDisabled = "config:oracle_disabled",
20
+ ConfigSpoke = "config:spoke",
21
+ ConfigSpokeAsset = "config:spoke_asset",
22
+ ConfigRemoveSpokeAsset = "config:remove_spoke_asset",
14
23
  DebtBadDebt = "debt:bad_debt",
15
24
  StrategyInitialPayment = "strategy:initial_payment",
16
25
  StrategyFee = "strategy:fee",
26
+ StrategyBlendMigration = "strategy:blend_migration",
27
+ /** Known topic; currently skipped by the indexer (governance surface). */
17
28
  ConfigApproveToken = "config:approve_token",
29
+ /** Known topic; currently skipped by the indexer. */
18
30
  ConfigAggregator = "config:aggregator",
31
+ /** Known topic; currently skipped by the indexer. */
19
32
  ConfigAccumulator = "config:accumulator",
33
+ /** Known topic; currently skipped by the indexer. */
20
34
  ConfigPoolTemplate = "config:pool_template",
35
+ /** Known topic; currently skipped by the indexer. */
21
36
  ConfigPositionLimits = "config:position_limits",
22
- ConfigOracleDisabled = "config:oracle_disabled",
23
- ConfigSpoke = "config:spoke"
37
+ /** Known topic; currently skipped by the indexer. */
38
+ ConfigSwapAggregator = "config:swap_aggregator",
39
+ /** Known topic; currently skipped by the indexer. */
40
+ ConfigPriceAggregator = "config:price_aggregator"
24
41
  }
@@ -4,6 +4,10 @@ exports.StellarLendingTopic = void 0;
4
4
  /**
5
5
  * Soroban event dispatch keys for the XOXNO Stellar lending controller,
6
6
  * each value joined as `"<domain>:<action>"`.
7
+ *
8
+ * Keep in parity with az-functions `StellarV2DispatchKey` plus known-but-
9
+ * unindexed config topics (approve_token, aggregator, accumulator, …).
10
+ * Governance schedulable fn names like `approve_blend_pool` are NOT topics.
7
11
  */
8
12
  var StellarLendingTopic;
9
13
  (function (StellarLendingTopic) {
@@ -14,15 +18,28 @@ var StellarLendingTopic;
14
18
  StellarLendingTopic["PositionBatchUpdate"] = "position:batch_update";
15
19
  StellarLendingTopic["PositionFlashLoan"] = "position:flash_loan";
16
20
  StellarLendingTopic["PositionLiquidation"] = "position:liquidation";
21
+ StellarLendingTopic["ConfigHub"] = "config:hub";
17
22
  StellarLendingTopic["ConfigOracle"] = "config:oracle";
23
+ StellarLendingTopic["ConfigOracleDisabled"] = "config:oracle_disabled";
24
+ StellarLendingTopic["ConfigSpoke"] = "config:spoke";
25
+ StellarLendingTopic["ConfigSpokeAsset"] = "config:spoke_asset";
26
+ StellarLendingTopic["ConfigRemoveSpokeAsset"] = "config:remove_spoke_asset";
18
27
  StellarLendingTopic["DebtBadDebt"] = "debt:bad_debt";
19
28
  StellarLendingTopic["StrategyInitialPayment"] = "strategy:initial_payment";
20
29
  StellarLendingTopic["StrategyFee"] = "strategy:fee";
30
+ StellarLendingTopic["StrategyBlendMigration"] = "strategy:blend_migration";
31
+ /** Known topic; currently skipped by the indexer (governance surface). */
21
32
  StellarLendingTopic["ConfigApproveToken"] = "config:approve_token";
33
+ /** Known topic; currently skipped by the indexer. */
22
34
  StellarLendingTopic["ConfigAggregator"] = "config:aggregator";
35
+ /** Known topic; currently skipped by the indexer. */
23
36
  StellarLendingTopic["ConfigAccumulator"] = "config:accumulator";
37
+ /** Known topic; currently skipped by the indexer. */
24
38
  StellarLendingTopic["ConfigPoolTemplate"] = "config:pool_template";
39
+ /** Known topic; currently skipped by the indexer. */
25
40
  StellarLendingTopic["ConfigPositionLimits"] = "config:position_limits";
26
- StellarLendingTopic["ConfigOracleDisabled"] = "config:oracle_disabled";
27
- StellarLendingTopic["ConfigSpoke"] = "config:spoke";
41
+ /** Known topic; currently skipped by the indexer. */
42
+ StellarLendingTopic["ConfigSwapAggregator"] = "config:swap_aggregator";
43
+ /** Known topic; currently skipped by the indexer. */
44
+ StellarLendingTopic["ConfigPriceAggregator"] = "config:price_aggregator";
28
45
  })(StellarLendingTopic || (exports.StellarLendingTopic = StellarLendingTopic = {}));
package/dist/index.d.ts CHANGED
@@ -212,6 +212,7 @@ export * from './requests/collection/pinned-collections';
212
212
  export * from './requests/collection/ranks';
213
213
  export * from './requests/collection/shareholder.dto';
214
214
  export * from './requests/lending/blend.dto';
215
+ export * from './requests/lending/defillama-lending-export.dto';
215
216
  export * from './requests/lending/hatom-info.dto';
216
217
  export * from './requests/lending/lending-governance-proposal.filter';
217
218
  export * from './requests/lending/lending-indexes.dto';
package/dist/index.js CHANGED
@@ -303,6 +303,7 @@ __exportStar(require("./requests/collection/pinned-collections"), exports);
303
303
  __exportStar(require("./requests/collection/ranks"), exports);
304
304
  __exportStar(require("./requests/collection/shareholder.dto"), exports);
305
305
  __exportStar(require("./requests/lending/blend.dto"), exports);
306
+ __exportStar(require("./requests/lending/defillama-lending-export.dto"), exports);
306
307
  __exportStar(require("./requests/lending/hatom-info.dto"), exports);
307
308
  __exportStar(require("./requests/lending/lending-governance-proposal.filter"), exports);
308
309
  __exportStar(require("./requests/lending/lending-indexes.dto"), exports);
@@ -0,0 +1,238 @@
1
+ import { ActivityChain } from '../../enums/common.enum';
2
+ /**
3
+ * Per-token (aggregated) market row for DeFiLlama / Dune integrations.
4
+ *
5
+ * TVL semantics (P2): two documented measures coexist —
6
+ * - `tvlCash*` / legacy `tvl*` = available pool cash (`hubAsset.cash`) × price
7
+ * - `tvlSupplied*` (= `supplied*`) = total supplied × price (Kusto/stats TVL)
8
+ *
9
+ * APY / utilization (P15): decimal fractions in [0, 1] (e.g. 0.05 = 5%).
10
+ */
11
+ export declare class DefillamaLendingMarketExport {
12
+ chain: ActivityChain;
13
+ project: string;
14
+ symbol: string;
15
+ token: string;
16
+ marketAddress: string;
17
+ decimals: number;
18
+ marketStatus?: string;
19
+ reserveFactorBps: number;
20
+ tvlRaw: string;
21
+ tvlCashRaw: string;
22
+ tvlSuppliedRaw: string;
23
+ suppliedRaw: string;
24
+ borrowedRaw: string;
25
+ tvlUsd: number;
26
+ tvlCashUsd: number;
27
+ tvlSuppliedUsd: number;
28
+ suppliedUsd: number;
29
+ borrowedUsd: number;
30
+ supplyApy: number;
31
+ borrowApy: number;
32
+ utilizationRate: number;
33
+ usdPrice: number;
34
+ cumulativeProtocolRevenueRaw: string;
35
+ cumulativeProtocolRevenueUsd: number;
36
+ participantsCount: number;
37
+ }
38
+ /**
39
+ * Per-(hub, asset) market row. Same fields as the aggregated per-token row
40
+ * plus `hubId` / `poolId` so DeFiLlama can emit one pool per (hub, asset).
41
+ */
42
+ export declare class DefillamaLendingHubMarketExport {
43
+ chain: ActivityChain;
44
+ project: string;
45
+ hubId: number;
46
+ hubName: string | null;
47
+ poolId: string;
48
+ url: string;
49
+ symbol: string;
50
+ token: string;
51
+ marketAddress: string;
52
+ decimals: number;
53
+ marketStatus?: string;
54
+ reserveFactorBps: number;
55
+ tvlRaw: string;
56
+ tvlCashRaw: string;
57
+ tvlSuppliedRaw: string;
58
+ suppliedRaw: string;
59
+ borrowedRaw: string;
60
+ tvlUsd: number;
61
+ tvlCashUsd: number;
62
+ tvlSuppliedUsd: number;
63
+ suppliedUsd: number;
64
+ borrowedUsd: number;
65
+ supplyApy: number;
66
+ borrowApy: number;
67
+ utilizationRate: number;
68
+ usdPrice: number;
69
+ cumulativeProtocolRevenueRaw: string;
70
+ cumulativeProtocolRevenueUsd: number;
71
+ }
72
+ /**
73
+ * Per-(spoke, hub, asset) risk/borrow-routing row for DefiLlama routing pools.
74
+ */
75
+ export declare class DefillamaLendingSpokeMarketExport {
76
+ chain: ActivityChain;
77
+ project: string;
78
+ spokeId: number;
79
+ spokeName: string | null;
80
+ hubId: number;
81
+ hubName: string | null;
82
+ poolId: string;
83
+ url: string;
84
+ symbol: string;
85
+ token: string;
86
+ marketAddress: string;
87
+ decimals: number;
88
+ active: boolean;
89
+ collateral: boolean;
90
+ borrowable: boolean;
91
+ ltv: number;
92
+ liquidationThreshold: number;
93
+ totalBorrowRaw: string;
94
+ totalBorrowUsd: number;
95
+ availableBorrowUsd: number;
96
+ usdPrice: number;
97
+ }
98
+ export declare class DefillamaLendingExportSummary {
99
+ marketCount: number;
100
+ tvlUsd: number;
101
+ tvlCashUsd: number;
102
+ tvlSuppliedUsd: number;
103
+ suppliedUsd: number;
104
+ borrowedUsd: number;
105
+ cumulativeProtocolRevenueUsd: number;
106
+ participantsCount: number;
107
+ uniqueMarketParticipants: number;
108
+ }
109
+ export declare class DefillamaLendingExportMethodology {
110
+ tvl: string;
111
+ tvlCash: string;
112
+ tvlSupplied: string;
113
+ supplied: string;
114
+ borrowed: string;
115
+ apy: string;
116
+ revenue: string;
117
+ participants: string;
118
+ }
119
+ /**
120
+ * Canonical Stellar lending market export for `/integrations/lending/stellar`
121
+ * (and the excluded `/defillama/lending/stellar` alias).
122
+ */
123
+ export declare class DefillamaLendingExport {
124
+ project: string;
125
+ chain: ActivityChain;
126
+ generatedAt: string;
127
+ markets: DefillamaLendingMarketExport[];
128
+ hubMarkets: DefillamaLendingHubMarketExport[];
129
+ spokeMarkets: DefillamaLendingSpokeMarketExport[];
130
+ summary: DefillamaLendingExportSummary;
131
+ methodology: DefillamaLendingExportMethodology;
132
+ }
133
+ export declare class DefillamaLendingHistoryMarketExport {
134
+ chain: ActivityChain;
135
+ project: string;
136
+ token: string;
137
+ twapSupplyApy: number;
138
+ twapBorrowApy: number;
139
+ twapUtilizationRate: number;
140
+ twapSupplyAmount: number;
141
+ twapBorrowAmount: number;
142
+ }
143
+ export declare class DefillamaLendingHistoryPointExport {
144
+ chain: ActivityChain;
145
+ project: string;
146
+ token: string;
147
+ timestamp: string;
148
+ minSupplyApy: number;
149
+ maxSupplyApy: number;
150
+ avgSupplyApy: number;
151
+ minBorrowApy: number;
152
+ maxBorrowApy: number;
153
+ avgBorrowApy: number;
154
+ minUtilizationRate: number;
155
+ maxUtilizationRate: number;
156
+ avgUtilizationRate: number;
157
+ minSupplyAmount: number;
158
+ maxSupplyAmount: number;
159
+ avgSupplyAmount: number;
160
+ minBorrowAmount: number;
161
+ maxBorrowAmount: number;
162
+ avgBorrowAmount: number;
163
+ }
164
+ export declare class DefillamaLendingHistoryExport {
165
+ project: string;
166
+ chain: ActivityChain;
167
+ generatedAt: string;
168
+ startTime: string;
169
+ endTime: string;
170
+ bin: string;
171
+ markets: DefillamaLendingHistoryMarketExport[];
172
+ points: DefillamaLendingHistoryPointExport[];
173
+ }
174
+ export declare class DefillamaLendingRevenuePointExport {
175
+ chain: ActivityChain;
176
+ project: string;
177
+ timestamp: string;
178
+ dailyFeesUsd: number;
179
+ dailyRevenueUsd: number;
180
+ dailyProtocolRevenueUsd: number;
181
+ dailyInterestRevenueUsd: number;
182
+ dailyStrategyFeeRevenueUsd: number;
183
+ dailyFlashLoanRevenueUsd: number;
184
+ dailySupplySideRevenueUsd: number;
185
+ cumulativeProtocolRevenueUsd: number;
186
+ }
187
+ export declare class DefillamaLendingRevenueMarketPointExport {
188
+ chain: ActivityChain;
189
+ project: string;
190
+ timestamp: string;
191
+ token: string;
192
+ symbol: string;
193
+ dailyFeesNative: number;
194
+ dailyFeesUsd: number;
195
+ dailyProtocolRevenueNative: number;
196
+ dailyProtocolRevenueUsd: number;
197
+ dailyInterestRevenueNative: number;
198
+ dailyInterestRevenueUsd: number;
199
+ dailyStrategyFeeRevenueNative: number;
200
+ dailyStrategyFeeRevenueUsd: number;
201
+ dailyFlashLoanRevenueNative: number;
202
+ dailyFlashLoanRevenueUsd: number;
203
+ cumulativeProtocolRevenueNative: number;
204
+ cumulativeProtocolRevenueUsd: number;
205
+ usdPrice: number;
206
+ }
207
+ export declare class DefillamaLendingRevenueMethodology {
208
+ fees: string;
209
+ revenue: string;
210
+ breakdown: string;
211
+ nativeMarketValues: string;
212
+ supplySideRevenue: string;
213
+ }
214
+ export declare class DefillamaLendingRevenueExport {
215
+ project: string;
216
+ chain: ActivityChain;
217
+ generatedAt: string;
218
+ startTime: string;
219
+ endTime: string;
220
+ points: DefillamaLendingRevenuePointExport[];
221
+ markets: DefillamaLendingRevenueMarketPointExport[];
222
+ methodology: DefillamaLendingRevenueMethodology;
223
+ }
224
+ /**
225
+ * Windowed lending user stats. Users are counted by OWNER (wallet address);
226
+ * `activeAccounts` is the sub-account count.
227
+ */
228
+ export declare class StellarLendingUserStatsExport {
229
+ project: string;
230
+ chain: ActivityChain;
231
+ generatedAt: string;
232
+ startTime: string;
233
+ endTime: string;
234
+ activeUsers: number;
235
+ newUsers: number;
236
+ activeAccounts: number;
237
+ transactions: number;
238
+ }
@@ -0,0 +1,862 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.StellarLendingUserStatsExport = exports.DefillamaLendingRevenueExport = exports.DefillamaLendingRevenueMethodology = exports.DefillamaLendingRevenueMarketPointExport = exports.DefillamaLendingRevenuePointExport = exports.DefillamaLendingHistoryExport = exports.DefillamaLendingHistoryPointExport = exports.DefillamaLendingHistoryMarketExport = exports.DefillamaLendingExport = exports.DefillamaLendingExportMethodology = exports.DefillamaLendingExportSummary = exports.DefillamaLendingSpokeMarketExport = exports.DefillamaLendingHubMarketExport = exports.DefillamaLendingMarketExport = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const common_enum_1 = require("../../enums/common.enum");
15
+ /**
16
+ * Per-token (aggregated) market row for DeFiLlama / Dune integrations.
17
+ *
18
+ * TVL semantics (P2): two documented measures coexist —
19
+ * - `tvlCash*` / legacy `tvl*` = available pool cash (`hubAsset.cash`) × price
20
+ * - `tvlSupplied*` (= `supplied*`) = total supplied × price (Kusto/stats TVL)
21
+ *
22
+ * APY / utilization (P15): decimal fractions in [0, 1] (e.g. 0.05 = 5%).
23
+ */
24
+ class DefillamaLendingMarketExport {
25
+ }
26
+ exports.DefillamaLendingMarketExport = DefillamaLendingMarketExport;
27
+ __decorate([
28
+ (0, swagger_1.ApiProperty)({ enum: common_enum_1.ActivityChain, enumName: 'ActivityChain' }),
29
+ __metadata("design:type", String)
30
+ ], DefillamaLendingMarketExport.prototype, "chain", void 0);
31
+ __decorate([
32
+ (0, swagger_1.ApiProperty)({ example: 'xoxno-lending' }),
33
+ __metadata("design:type", String)
34
+ ], DefillamaLendingMarketExport.prototype, "project", void 0);
35
+ __decorate([
36
+ (0, swagger_1.ApiProperty)({ example: 'USDC' }),
37
+ __metadata("design:type", String)
38
+ ], DefillamaLendingMarketExport.prototype, "symbol", void 0);
39
+ __decorate([
40
+ (0, swagger_1.ApiProperty)({ description: 'Stellar market token contract id' }),
41
+ __metadata("design:type", String)
42
+ ], DefillamaLendingMarketExport.prototype, "token", void 0);
43
+ __decorate([
44
+ (0, swagger_1.ApiProperty)({ description: 'Market / hub-asset contract address' }),
45
+ __metadata("design:type", String)
46
+ ], DefillamaLendingMarketExport.prototype, "marketAddress", void 0);
47
+ __decorate([
48
+ (0, swagger_1.ApiProperty)({ example: 7 }),
49
+ __metadata("design:type", Number)
50
+ ], DefillamaLendingMarketExport.prototype, "decimals", void 0);
51
+ __decorate([
52
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Market status when known' }),
53
+ __metadata("design:type", String)
54
+ ], DefillamaLendingMarketExport.prototype, "marketStatus", void 0);
55
+ __decorate([
56
+ (0, swagger_1.ApiProperty)({ example: 1000 }),
57
+ __metadata("design:type", Number)
58
+ ], DefillamaLendingMarketExport.prototype, "reserveFactorBps", void 0);
59
+ __decorate([
60
+ (0, swagger_1.ApiProperty)({
61
+ description: 'Legacy alias of `tvlCashRaw` (available pool cash, base units)',
62
+ }),
63
+ __metadata("design:type", String)
64
+ ], DefillamaLendingMarketExport.prototype, "tvlRaw", void 0);
65
+ __decorate([
66
+ (0, swagger_1.ApiProperty)({
67
+ description: 'Available pool cash (`hubAsset.cash`), base units',
68
+ }),
69
+ __metadata("design:type", String)
70
+ ], DefillamaLendingMarketExport.prototype, "tvlCashRaw", void 0);
71
+ __decorate([
72
+ (0, swagger_1.ApiProperty)({
73
+ description: 'Total supplied balance, base units. Same as `suppliedRaw`',
74
+ }),
75
+ __metadata("design:type", String)
76
+ ], DefillamaLendingMarketExport.prototype, "tvlSuppliedRaw", void 0);
77
+ __decorate([
78
+ (0, swagger_1.ApiProperty)(),
79
+ __metadata("design:type", String)
80
+ ], DefillamaLendingMarketExport.prototype, "suppliedRaw", void 0);
81
+ __decorate([
82
+ (0, swagger_1.ApiProperty)(),
83
+ __metadata("design:type", String)
84
+ ], DefillamaLendingMarketExport.prototype, "borrowedRaw", void 0);
85
+ __decorate([
86
+ (0, swagger_1.ApiProperty)({
87
+ description: 'Legacy alias of `tvlCashUsd`',
88
+ example: 1000000,
89
+ }),
90
+ __metadata("design:type", Number)
91
+ ], DefillamaLendingMarketExport.prototype, "tvlUsd", void 0);
92
+ __decorate([
93
+ (0, swagger_1.ApiProperty)({
94
+ description: 'Available pool cash × oracle USD price',
95
+ example: 1000000,
96
+ }),
97
+ __metadata("design:type", Number)
98
+ ], DefillamaLendingMarketExport.prototype, "tvlCashUsd", void 0);
99
+ __decorate([
100
+ (0, swagger_1.ApiProperty)({
101
+ description: 'Total supplied × oracle USD price. Same as `suppliedUsd` / Kusto TVL',
102
+ example: 1250000,
103
+ }),
104
+ __metadata("design:type", Number)
105
+ ], DefillamaLendingMarketExport.prototype, "tvlSuppliedUsd", void 0);
106
+ __decorate([
107
+ (0, swagger_1.ApiProperty)(),
108
+ __metadata("design:type", Number)
109
+ ], DefillamaLendingMarketExport.prototype, "suppliedUsd", void 0);
110
+ __decorate([
111
+ (0, swagger_1.ApiProperty)(),
112
+ __metadata("design:type", Number)
113
+ ], DefillamaLendingMarketExport.prototype, "borrowedUsd", void 0);
114
+ __decorate([
115
+ (0, swagger_1.ApiProperty)({
116
+ description: 'Decimal fraction in [0, 1], not percent',
117
+ example: 0.05,
118
+ }),
119
+ __metadata("design:type", Number)
120
+ ], DefillamaLendingMarketExport.prototype, "supplyApy", void 0);
121
+ __decorate([
122
+ (0, swagger_1.ApiProperty)({
123
+ description: 'Decimal fraction in [0, 1], not percent',
124
+ example: 0.08,
125
+ }),
126
+ __metadata("design:type", Number)
127
+ ], DefillamaLendingMarketExport.prototype, "borrowApy", void 0);
128
+ __decorate([
129
+ (0, swagger_1.ApiProperty)({
130
+ description: 'Decimal fraction in [0, 1], not percent',
131
+ example: 0.72,
132
+ }),
133
+ __metadata("design:type", Number)
134
+ ], DefillamaLendingMarketExport.prototype, "utilizationRate", void 0);
135
+ __decorate([
136
+ (0, swagger_1.ApiProperty)(),
137
+ __metadata("design:type", Number)
138
+ ], DefillamaLendingMarketExport.prototype, "usdPrice", void 0);
139
+ __decorate([
140
+ (0, swagger_1.ApiProperty)(),
141
+ __metadata("design:type", String)
142
+ ], DefillamaLendingMarketExport.prototype, "cumulativeProtocolRevenueRaw", void 0);
143
+ __decorate([
144
+ (0, swagger_1.ApiProperty)(),
145
+ __metadata("design:type", Number)
146
+ ], DefillamaLendingMarketExport.prototype, "cumulativeProtocolRevenueUsd", void 0);
147
+ __decorate([
148
+ (0, swagger_1.ApiProperty)({
149
+ description: 'Distinct participants for this token across hubs (per-market count)',
150
+ }),
151
+ __metadata("design:type", Number)
152
+ ], DefillamaLendingMarketExport.prototype, "participantsCount", void 0);
153
+ /**
154
+ * Per-(hub, asset) market row. Same fields as the aggregated per-token row
155
+ * plus `hubId` / `poolId` so DeFiLlama can emit one pool per (hub, asset).
156
+ */
157
+ class DefillamaLendingHubMarketExport {
158
+ }
159
+ exports.DefillamaLendingHubMarketExport = DefillamaLendingHubMarketExport;
160
+ __decorate([
161
+ (0, swagger_1.ApiProperty)({ enum: common_enum_1.ActivityChain, enumName: 'ActivityChain' }),
162
+ __metadata("design:type", String)
163
+ ], DefillamaLendingHubMarketExport.prototype, "chain", void 0);
164
+ __decorate([
165
+ (0, swagger_1.ApiProperty)(),
166
+ __metadata("design:type", String)
167
+ ], DefillamaLendingHubMarketExport.prototype, "project", void 0);
168
+ __decorate([
169
+ (0, swagger_1.ApiProperty)(),
170
+ __metadata("design:type", Number)
171
+ ], DefillamaLendingHubMarketExport.prototype, "hubId", void 0);
172
+ __decorate([
173
+ (0, swagger_1.ApiPropertyOptional)({ nullable: true, type: String }),
174
+ __metadata("design:type", Object)
175
+ ], DefillamaLendingHubMarketExport.prototype, "hubName", void 0);
176
+ __decorate([
177
+ (0, swagger_1.ApiProperty)({ description: 'Stable DeFiLlama pool id for (hub, asset)' }),
178
+ __metadata("design:type", String)
179
+ ], DefillamaLendingHubMarketExport.prototype, "poolId", void 0);
180
+ __decorate([
181
+ (0, swagger_1.ApiProperty)(),
182
+ __metadata("design:type", String)
183
+ ], DefillamaLendingHubMarketExport.prototype, "url", void 0);
184
+ __decorate([
185
+ (0, swagger_1.ApiProperty)(),
186
+ __metadata("design:type", String)
187
+ ], DefillamaLendingHubMarketExport.prototype, "symbol", void 0);
188
+ __decorate([
189
+ (0, swagger_1.ApiProperty)(),
190
+ __metadata("design:type", String)
191
+ ], DefillamaLendingHubMarketExport.prototype, "token", void 0);
192
+ __decorate([
193
+ (0, swagger_1.ApiProperty)(),
194
+ __metadata("design:type", String)
195
+ ], DefillamaLendingHubMarketExport.prototype, "marketAddress", void 0);
196
+ __decorate([
197
+ (0, swagger_1.ApiProperty)(),
198
+ __metadata("design:type", Number)
199
+ ], DefillamaLendingHubMarketExport.prototype, "decimals", void 0);
200
+ __decorate([
201
+ (0, swagger_1.ApiPropertyOptional)(),
202
+ __metadata("design:type", String)
203
+ ], DefillamaLendingHubMarketExport.prototype, "marketStatus", void 0);
204
+ __decorate([
205
+ (0, swagger_1.ApiProperty)(),
206
+ __metadata("design:type", Number)
207
+ ], DefillamaLendingHubMarketExport.prototype, "reserveFactorBps", void 0);
208
+ __decorate([
209
+ (0, swagger_1.ApiProperty)({ description: 'Legacy alias of `tvlCashRaw`' }),
210
+ __metadata("design:type", String)
211
+ ], DefillamaLendingHubMarketExport.prototype, "tvlRaw", void 0);
212
+ __decorate([
213
+ (0, swagger_1.ApiProperty)(),
214
+ __metadata("design:type", String)
215
+ ], DefillamaLendingHubMarketExport.prototype, "tvlCashRaw", void 0);
216
+ __decorate([
217
+ (0, swagger_1.ApiProperty)(),
218
+ __metadata("design:type", String)
219
+ ], DefillamaLendingHubMarketExport.prototype, "tvlSuppliedRaw", void 0);
220
+ __decorate([
221
+ (0, swagger_1.ApiProperty)(),
222
+ __metadata("design:type", String)
223
+ ], DefillamaLendingHubMarketExport.prototype, "suppliedRaw", void 0);
224
+ __decorate([
225
+ (0, swagger_1.ApiProperty)(),
226
+ __metadata("design:type", String)
227
+ ], DefillamaLendingHubMarketExport.prototype, "borrowedRaw", void 0);
228
+ __decorate([
229
+ (0, swagger_1.ApiProperty)({ description: 'Legacy alias of `tvlCashUsd`' }),
230
+ __metadata("design:type", Number)
231
+ ], DefillamaLendingHubMarketExport.prototype, "tvlUsd", void 0);
232
+ __decorate([
233
+ (0, swagger_1.ApiProperty)(),
234
+ __metadata("design:type", Number)
235
+ ], DefillamaLendingHubMarketExport.prototype, "tvlCashUsd", void 0);
236
+ __decorate([
237
+ (0, swagger_1.ApiProperty)(),
238
+ __metadata("design:type", Number)
239
+ ], DefillamaLendingHubMarketExport.prototype, "tvlSuppliedUsd", void 0);
240
+ __decorate([
241
+ (0, swagger_1.ApiProperty)(),
242
+ __metadata("design:type", Number)
243
+ ], DefillamaLendingHubMarketExport.prototype, "suppliedUsd", void 0);
244
+ __decorate([
245
+ (0, swagger_1.ApiProperty)(),
246
+ __metadata("design:type", Number)
247
+ ], DefillamaLendingHubMarketExport.prototype, "borrowedUsd", void 0);
248
+ __decorate([
249
+ (0, swagger_1.ApiProperty)({ description: 'Decimal fraction in [0, 1], not percent' }),
250
+ __metadata("design:type", Number)
251
+ ], DefillamaLendingHubMarketExport.prototype, "supplyApy", void 0);
252
+ __decorate([
253
+ (0, swagger_1.ApiProperty)({ description: 'Decimal fraction in [0, 1], not percent' }),
254
+ __metadata("design:type", Number)
255
+ ], DefillamaLendingHubMarketExport.prototype, "borrowApy", void 0);
256
+ __decorate([
257
+ (0, swagger_1.ApiProperty)({ description: 'Decimal fraction in [0, 1], not percent' }),
258
+ __metadata("design:type", Number)
259
+ ], DefillamaLendingHubMarketExport.prototype, "utilizationRate", void 0);
260
+ __decorate([
261
+ (0, swagger_1.ApiProperty)(),
262
+ __metadata("design:type", Number)
263
+ ], DefillamaLendingHubMarketExport.prototype, "usdPrice", void 0);
264
+ __decorate([
265
+ (0, swagger_1.ApiProperty)(),
266
+ __metadata("design:type", String)
267
+ ], DefillamaLendingHubMarketExport.prototype, "cumulativeProtocolRevenueRaw", void 0);
268
+ __decorate([
269
+ (0, swagger_1.ApiProperty)(),
270
+ __metadata("design:type", Number)
271
+ ], DefillamaLendingHubMarketExport.prototype, "cumulativeProtocolRevenueUsd", void 0);
272
+ /**
273
+ * Per-(spoke, hub, asset) risk/borrow-routing row for DefiLlama routing pools.
274
+ */
275
+ class DefillamaLendingSpokeMarketExport {
276
+ }
277
+ exports.DefillamaLendingSpokeMarketExport = DefillamaLendingSpokeMarketExport;
278
+ __decorate([
279
+ (0, swagger_1.ApiProperty)({ enum: common_enum_1.ActivityChain, enumName: 'ActivityChain' }),
280
+ __metadata("design:type", String)
281
+ ], DefillamaLendingSpokeMarketExport.prototype, "chain", void 0);
282
+ __decorate([
283
+ (0, swagger_1.ApiProperty)(),
284
+ __metadata("design:type", String)
285
+ ], DefillamaLendingSpokeMarketExport.prototype, "project", void 0);
286
+ __decorate([
287
+ (0, swagger_1.ApiProperty)(),
288
+ __metadata("design:type", Number)
289
+ ], DefillamaLendingSpokeMarketExport.prototype, "spokeId", void 0);
290
+ __decorate([
291
+ (0, swagger_1.ApiPropertyOptional)({ nullable: true, type: String }),
292
+ __metadata("design:type", Object)
293
+ ], DefillamaLendingSpokeMarketExport.prototype, "spokeName", void 0);
294
+ __decorate([
295
+ (0, swagger_1.ApiProperty)(),
296
+ __metadata("design:type", Number)
297
+ ], DefillamaLendingSpokeMarketExport.prototype, "hubId", void 0);
298
+ __decorate([
299
+ (0, swagger_1.ApiPropertyOptional)({ nullable: true, type: String }),
300
+ __metadata("design:type", Object)
301
+ ], DefillamaLendingSpokeMarketExport.prototype, "hubName", void 0);
302
+ __decorate([
303
+ (0, swagger_1.ApiProperty)(),
304
+ __metadata("design:type", String)
305
+ ], DefillamaLendingSpokeMarketExport.prototype, "poolId", void 0);
306
+ __decorate([
307
+ (0, swagger_1.ApiProperty)(),
308
+ __metadata("design:type", String)
309
+ ], DefillamaLendingSpokeMarketExport.prototype, "url", void 0);
310
+ __decorate([
311
+ (0, swagger_1.ApiProperty)(),
312
+ __metadata("design:type", String)
313
+ ], DefillamaLendingSpokeMarketExport.prototype, "symbol", void 0);
314
+ __decorate([
315
+ (0, swagger_1.ApiProperty)(),
316
+ __metadata("design:type", String)
317
+ ], DefillamaLendingSpokeMarketExport.prototype, "token", void 0);
318
+ __decorate([
319
+ (0, swagger_1.ApiProperty)(),
320
+ __metadata("design:type", String)
321
+ ], DefillamaLendingSpokeMarketExport.prototype, "marketAddress", void 0);
322
+ __decorate([
323
+ (0, swagger_1.ApiProperty)(),
324
+ __metadata("design:type", Number)
325
+ ], DefillamaLendingSpokeMarketExport.prototype, "decimals", void 0);
326
+ __decorate([
327
+ (0, swagger_1.ApiProperty)(),
328
+ __metadata("design:type", Boolean)
329
+ ], DefillamaLendingSpokeMarketExport.prototype, "active", void 0);
330
+ __decorate([
331
+ (0, swagger_1.ApiProperty)(),
332
+ __metadata("design:type", Boolean)
333
+ ], DefillamaLendingSpokeMarketExport.prototype, "collateral", void 0);
334
+ __decorate([
335
+ (0, swagger_1.ApiProperty)(),
336
+ __metadata("design:type", Boolean)
337
+ ], DefillamaLendingSpokeMarketExport.prototype, "borrowable", void 0);
338
+ __decorate([
339
+ (0, swagger_1.ApiProperty)({ description: 'LTV as decimal fraction or protocol scale' }),
340
+ __metadata("design:type", Number)
341
+ ], DefillamaLendingSpokeMarketExport.prototype, "ltv", void 0);
342
+ __decorate([
343
+ (0, swagger_1.ApiProperty)(),
344
+ __metadata("design:type", Number)
345
+ ], DefillamaLendingSpokeMarketExport.prototype, "liquidationThreshold", void 0);
346
+ __decorate([
347
+ (0, swagger_1.ApiProperty)(),
348
+ __metadata("design:type", String)
349
+ ], DefillamaLendingSpokeMarketExport.prototype, "totalBorrowRaw", void 0);
350
+ __decorate([
351
+ (0, swagger_1.ApiProperty)(),
352
+ __metadata("design:type", Number)
353
+ ], DefillamaLendingSpokeMarketExport.prototype, "totalBorrowUsd", void 0);
354
+ __decorate([
355
+ (0, swagger_1.ApiProperty)(),
356
+ __metadata("design:type", Number)
357
+ ], DefillamaLendingSpokeMarketExport.prototype, "availableBorrowUsd", void 0);
358
+ __decorate([
359
+ (0, swagger_1.ApiProperty)(),
360
+ __metadata("design:type", Number)
361
+ ], DefillamaLendingSpokeMarketExport.prototype, "usdPrice", void 0);
362
+ class DefillamaLendingExportSummary {
363
+ }
364
+ exports.DefillamaLendingExportSummary = DefillamaLendingExportSummary;
365
+ __decorate([
366
+ (0, swagger_1.ApiProperty)(),
367
+ __metadata("design:type", Number)
368
+ ], DefillamaLendingExportSummary.prototype, "marketCount", void 0);
369
+ __decorate([
370
+ (0, swagger_1.ApiProperty)({
371
+ description: 'Legacy alias of `tvlCashUsd` (cash-liquidity TVL)',
372
+ }),
373
+ __metadata("design:type", Number)
374
+ ], DefillamaLendingExportSummary.prototype, "tvlUsd", void 0);
375
+ __decorate([
376
+ (0, swagger_1.ApiProperty)({
377
+ description: 'Sum of market `tvlCashUsd` (available pool cash × price)',
378
+ }),
379
+ __metadata("design:type", Number)
380
+ ], DefillamaLendingExportSummary.prototype, "tvlCashUsd", void 0);
381
+ __decorate([
382
+ (0, swagger_1.ApiProperty)({
383
+ description: 'Sum of market `tvlSuppliedUsd` / `suppliedUsd` (Kusto-style TVL)',
384
+ }),
385
+ __metadata("design:type", Number)
386
+ ], DefillamaLendingExportSummary.prototype, "tvlSuppliedUsd", void 0);
387
+ __decorate([
388
+ (0, swagger_1.ApiProperty)(),
389
+ __metadata("design:type", Number)
390
+ ], DefillamaLendingExportSummary.prototype, "suppliedUsd", void 0);
391
+ __decorate([
392
+ (0, swagger_1.ApiProperty)(),
393
+ __metadata("design:type", Number)
394
+ ], DefillamaLendingExportSummary.prototype, "borrowedUsd", void 0);
395
+ __decorate([
396
+ (0, swagger_1.ApiProperty)(),
397
+ __metadata("design:type", Number)
398
+ ], DefillamaLendingExportSummary.prototype, "cumulativeProtocolRevenueUsd", void 0);
399
+ __decorate([
400
+ (0, swagger_1.ApiProperty)({
401
+ description: 'Protocol-wide unique participants (same as `uniqueMarketParticipants`). Not the sum of per-token `markets[].participantsCount`.',
402
+ }),
403
+ __metadata("design:type", Number)
404
+ ], DefillamaLendingExportSummary.prototype, "participantsCount", void 0);
405
+ __decorate([
406
+ (0, swagger_1.ApiProperty)({
407
+ description: 'Protocol-wide unique participant addresses',
408
+ }),
409
+ __metadata("design:type", Number)
410
+ ], DefillamaLendingExportSummary.prototype, "uniqueMarketParticipants", void 0);
411
+ class DefillamaLendingExportMethodology {
412
+ }
413
+ exports.DefillamaLendingExportMethodology = DefillamaLendingExportMethodology;
414
+ __decorate([
415
+ (0, swagger_1.ApiProperty)({
416
+ description: 'Legacy TVL methodology (cash liquidity)',
417
+ }),
418
+ __metadata("design:type", String)
419
+ ], DefillamaLendingExportMethodology.prototype, "tvl", void 0);
420
+ __decorate([
421
+ (0, swagger_1.ApiProperty)({ description: 'Cash-liquidity TVL methodology' }),
422
+ __metadata("design:type", String)
423
+ ], DefillamaLendingExportMethodology.prototype, "tvlCash", void 0);
424
+ __decorate([
425
+ (0, swagger_1.ApiProperty)({ description: 'Supplied×price (Kusto) TVL methodology' }),
426
+ __metadata("design:type", String)
427
+ ], DefillamaLendingExportMethodology.prototype, "tvlSupplied", void 0);
428
+ __decorate([
429
+ (0, swagger_1.ApiProperty)(),
430
+ __metadata("design:type", String)
431
+ ], DefillamaLendingExportMethodology.prototype, "supplied", void 0);
432
+ __decorate([
433
+ (0, swagger_1.ApiProperty)(),
434
+ __metadata("design:type", String)
435
+ ], DefillamaLendingExportMethodology.prototype, "borrowed", void 0);
436
+ __decorate([
437
+ (0, swagger_1.ApiProperty)({
438
+ description: 'APY scale: decimal fractions in [0, 1]',
439
+ }),
440
+ __metadata("design:type", String)
441
+ ], DefillamaLendingExportMethodology.prototype, "apy", void 0);
442
+ __decorate([
443
+ (0, swagger_1.ApiProperty)(),
444
+ __metadata("design:type", String)
445
+ ], DefillamaLendingExportMethodology.prototype, "revenue", void 0);
446
+ __decorate([
447
+ (0, swagger_1.ApiProperty)({
448
+ description: 'Participants = protocol-wide unique addresses',
449
+ }),
450
+ __metadata("design:type", String)
451
+ ], DefillamaLendingExportMethodology.prototype, "participants", void 0);
452
+ /**
453
+ * Canonical Stellar lending market export for `/integrations/lending/stellar`
454
+ * (and the excluded `/defillama/lending/stellar` alias).
455
+ */
456
+ class DefillamaLendingExport {
457
+ }
458
+ exports.DefillamaLendingExport = DefillamaLendingExport;
459
+ __decorate([
460
+ (0, swagger_1.ApiProperty)(),
461
+ __metadata("design:type", String)
462
+ ], DefillamaLendingExport.prototype, "project", void 0);
463
+ __decorate([
464
+ (0, swagger_1.ApiProperty)({ enum: common_enum_1.ActivityChain, enumName: 'ActivityChain' }),
465
+ __metadata("design:type", String)
466
+ ], DefillamaLendingExport.prototype, "chain", void 0);
467
+ __decorate([
468
+ (0, swagger_1.ApiProperty)({ description: 'ISO-8601 generation timestamp' }),
469
+ __metadata("design:type", String)
470
+ ], DefillamaLendingExport.prototype, "generatedAt", void 0);
471
+ __decorate([
472
+ (0, swagger_1.ApiProperty)({ type: [DefillamaLendingMarketExport] }),
473
+ __metadata("design:type", Array)
474
+ ], DefillamaLendingExport.prototype, "markets", void 0);
475
+ __decorate([
476
+ (0, swagger_1.ApiProperty)({ type: [DefillamaLendingHubMarketExport] }),
477
+ __metadata("design:type", Array)
478
+ ], DefillamaLendingExport.prototype, "hubMarkets", void 0);
479
+ __decorate([
480
+ (0, swagger_1.ApiProperty)({ type: [DefillamaLendingSpokeMarketExport] }),
481
+ __metadata("design:type", Array)
482
+ ], DefillamaLendingExport.prototype, "spokeMarkets", void 0);
483
+ __decorate([
484
+ (0, swagger_1.ApiProperty)({ type: DefillamaLendingExportSummary }),
485
+ __metadata("design:type", DefillamaLendingExportSummary)
486
+ ], DefillamaLendingExport.prototype, "summary", void 0);
487
+ __decorate([
488
+ (0, swagger_1.ApiProperty)({ type: DefillamaLendingExportMethodology }),
489
+ __metadata("design:type", DefillamaLendingExportMethodology)
490
+ ], DefillamaLendingExport.prototype, "methodology", void 0);
491
+ class DefillamaLendingHistoryMarketExport {
492
+ }
493
+ exports.DefillamaLendingHistoryMarketExport = DefillamaLendingHistoryMarketExport;
494
+ __decorate([
495
+ (0, swagger_1.ApiProperty)({ enum: common_enum_1.ActivityChain, enumName: 'ActivityChain' }),
496
+ __metadata("design:type", String)
497
+ ], DefillamaLendingHistoryMarketExport.prototype, "chain", void 0);
498
+ __decorate([
499
+ (0, swagger_1.ApiProperty)(),
500
+ __metadata("design:type", String)
501
+ ], DefillamaLendingHistoryMarketExport.prototype, "project", void 0);
502
+ __decorate([
503
+ (0, swagger_1.ApiProperty)(),
504
+ __metadata("design:type", String)
505
+ ], DefillamaLendingHistoryMarketExport.prototype, "token", void 0);
506
+ __decorate([
507
+ (0, swagger_1.ApiProperty)({ description: 'TWAP supply APY as [0, 1] fraction' }),
508
+ __metadata("design:type", Number)
509
+ ], DefillamaLendingHistoryMarketExport.prototype, "twapSupplyApy", void 0);
510
+ __decorate([
511
+ (0, swagger_1.ApiProperty)({ description: 'TWAP borrow APY as [0, 1] fraction' }),
512
+ __metadata("design:type", Number)
513
+ ], DefillamaLendingHistoryMarketExport.prototype, "twapBorrowApy", void 0);
514
+ __decorate([
515
+ (0, swagger_1.ApiProperty)({ description: 'TWAP utilization as [0, 1] fraction' }),
516
+ __metadata("design:type", Number)
517
+ ], DefillamaLendingHistoryMarketExport.prototype, "twapUtilizationRate", void 0);
518
+ __decorate([
519
+ (0, swagger_1.ApiProperty)(),
520
+ __metadata("design:type", Number)
521
+ ], DefillamaLendingHistoryMarketExport.prototype, "twapSupplyAmount", void 0);
522
+ __decorate([
523
+ (0, swagger_1.ApiProperty)(),
524
+ __metadata("design:type", Number)
525
+ ], DefillamaLendingHistoryMarketExport.prototype, "twapBorrowAmount", void 0);
526
+ class DefillamaLendingHistoryPointExport {
527
+ }
528
+ exports.DefillamaLendingHistoryPointExport = DefillamaLendingHistoryPointExport;
529
+ __decorate([
530
+ (0, swagger_1.ApiProperty)({ enum: common_enum_1.ActivityChain, enumName: 'ActivityChain' }),
531
+ __metadata("design:type", String)
532
+ ], DefillamaLendingHistoryPointExport.prototype, "chain", void 0);
533
+ __decorate([
534
+ (0, swagger_1.ApiProperty)(),
535
+ __metadata("design:type", String)
536
+ ], DefillamaLendingHistoryPointExport.prototype, "project", void 0);
537
+ __decorate([
538
+ (0, swagger_1.ApiProperty)(),
539
+ __metadata("design:type", String)
540
+ ], DefillamaLendingHistoryPointExport.prototype, "token", void 0);
541
+ __decorate([
542
+ (0, swagger_1.ApiProperty)({ description: 'Bin timestamp (ISO-8601)' }),
543
+ __metadata("design:type", String)
544
+ ], DefillamaLendingHistoryPointExport.prototype, "timestamp", void 0);
545
+ __decorate([
546
+ (0, swagger_1.ApiProperty)(),
547
+ __metadata("design:type", Number)
548
+ ], DefillamaLendingHistoryPointExport.prototype, "minSupplyApy", void 0);
549
+ __decorate([
550
+ (0, swagger_1.ApiProperty)(),
551
+ __metadata("design:type", Number)
552
+ ], DefillamaLendingHistoryPointExport.prototype, "maxSupplyApy", void 0);
553
+ __decorate([
554
+ (0, swagger_1.ApiProperty)(),
555
+ __metadata("design:type", Number)
556
+ ], DefillamaLendingHistoryPointExport.prototype, "avgSupplyApy", void 0);
557
+ __decorate([
558
+ (0, swagger_1.ApiProperty)(),
559
+ __metadata("design:type", Number)
560
+ ], DefillamaLendingHistoryPointExport.prototype, "minBorrowApy", void 0);
561
+ __decorate([
562
+ (0, swagger_1.ApiProperty)(),
563
+ __metadata("design:type", Number)
564
+ ], DefillamaLendingHistoryPointExport.prototype, "maxBorrowApy", void 0);
565
+ __decorate([
566
+ (0, swagger_1.ApiProperty)(),
567
+ __metadata("design:type", Number)
568
+ ], DefillamaLendingHistoryPointExport.prototype, "avgBorrowApy", void 0);
569
+ __decorate([
570
+ (0, swagger_1.ApiProperty)(),
571
+ __metadata("design:type", Number)
572
+ ], DefillamaLendingHistoryPointExport.prototype, "minUtilizationRate", void 0);
573
+ __decorate([
574
+ (0, swagger_1.ApiProperty)(),
575
+ __metadata("design:type", Number)
576
+ ], DefillamaLendingHistoryPointExport.prototype, "maxUtilizationRate", void 0);
577
+ __decorate([
578
+ (0, swagger_1.ApiProperty)(),
579
+ __metadata("design:type", Number)
580
+ ], DefillamaLendingHistoryPointExport.prototype, "avgUtilizationRate", void 0);
581
+ __decorate([
582
+ (0, swagger_1.ApiProperty)(),
583
+ __metadata("design:type", Number)
584
+ ], DefillamaLendingHistoryPointExport.prototype, "minSupplyAmount", void 0);
585
+ __decorate([
586
+ (0, swagger_1.ApiProperty)(),
587
+ __metadata("design:type", Number)
588
+ ], DefillamaLendingHistoryPointExport.prototype, "maxSupplyAmount", void 0);
589
+ __decorate([
590
+ (0, swagger_1.ApiProperty)(),
591
+ __metadata("design:type", Number)
592
+ ], DefillamaLendingHistoryPointExport.prototype, "avgSupplyAmount", void 0);
593
+ __decorate([
594
+ (0, swagger_1.ApiProperty)(),
595
+ __metadata("design:type", Number)
596
+ ], DefillamaLendingHistoryPointExport.prototype, "minBorrowAmount", void 0);
597
+ __decorate([
598
+ (0, swagger_1.ApiProperty)(),
599
+ __metadata("design:type", Number)
600
+ ], DefillamaLendingHistoryPointExport.prototype, "maxBorrowAmount", void 0);
601
+ __decorate([
602
+ (0, swagger_1.ApiProperty)(),
603
+ __metadata("design:type", Number)
604
+ ], DefillamaLendingHistoryPointExport.prototype, "avgBorrowAmount", void 0);
605
+ class DefillamaLendingHistoryExport {
606
+ }
607
+ exports.DefillamaLendingHistoryExport = DefillamaLendingHistoryExport;
608
+ __decorate([
609
+ (0, swagger_1.ApiProperty)(),
610
+ __metadata("design:type", String)
611
+ ], DefillamaLendingHistoryExport.prototype, "project", void 0);
612
+ __decorate([
613
+ (0, swagger_1.ApiProperty)({ enum: common_enum_1.ActivityChain, enumName: 'ActivityChain' }),
614
+ __metadata("design:type", String)
615
+ ], DefillamaLendingHistoryExport.prototype, "chain", void 0);
616
+ __decorate([
617
+ (0, swagger_1.ApiProperty)(),
618
+ __metadata("design:type", String)
619
+ ], DefillamaLendingHistoryExport.prototype, "generatedAt", void 0);
620
+ __decorate([
621
+ (0, swagger_1.ApiProperty)(),
622
+ __metadata("design:type", String)
623
+ ], DefillamaLendingHistoryExport.prototype, "startTime", void 0);
624
+ __decorate([
625
+ (0, swagger_1.ApiProperty)(),
626
+ __metadata("design:type", String)
627
+ ], DefillamaLendingHistoryExport.prototype, "endTime", void 0);
628
+ __decorate([
629
+ (0, swagger_1.ApiProperty)({ example: '1d' }),
630
+ __metadata("design:type", String)
631
+ ], DefillamaLendingHistoryExport.prototype, "bin", void 0);
632
+ __decorate([
633
+ (0, swagger_1.ApiProperty)({ type: [DefillamaLendingHistoryMarketExport] }),
634
+ __metadata("design:type", Array)
635
+ ], DefillamaLendingHistoryExport.prototype, "markets", void 0);
636
+ __decorate([
637
+ (0, swagger_1.ApiProperty)({ type: [DefillamaLendingHistoryPointExport] }),
638
+ __metadata("design:type", Array)
639
+ ], DefillamaLendingHistoryExport.prototype, "points", void 0);
640
+ class DefillamaLendingRevenuePointExport {
641
+ }
642
+ exports.DefillamaLendingRevenuePointExport = DefillamaLendingRevenuePointExport;
643
+ __decorate([
644
+ (0, swagger_1.ApiProperty)({ enum: common_enum_1.ActivityChain, enumName: 'ActivityChain' }),
645
+ __metadata("design:type", String)
646
+ ], DefillamaLendingRevenuePointExport.prototype, "chain", void 0);
647
+ __decorate([
648
+ (0, swagger_1.ApiProperty)(),
649
+ __metadata("design:type", String)
650
+ ], DefillamaLendingRevenuePointExport.prototype, "project", void 0);
651
+ __decorate([
652
+ (0, swagger_1.ApiProperty)(),
653
+ __metadata("design:type", String)
654
+ ], DefillamaLendingRevenuePointExport.prototype, "timestamp", void 0);
655
+ __decorate([
656
+ (0, swagger_1.ApiProperty)(),
657
+ __metadata("design:type", Number)
658
+ ], DefillamaLendingRevenuePointExport.prototype, "dailyFeesUsd", void 0);
659
+ __decorate([
660
+ (0, swagger_1.ApiProperty)(),
661
+ __metadata("design:type", Number)
662
+ ], DefillamaLendingRevenuePointExport.prototype, "dailyRevenueUsd", void 0);
663
+ __decorate([
664
+ (0, swagger_1.ApiProperty)(),
665
+ __metadata("design:type", Number)
666
+ ], DefillamaLendingRevenuePointExport.prototype, "dailyProtocolRevenueUsd", void 0);
667
+ __decorate([
668
+ (0, swagger_1.ApiProperty)(),
669
+ __metadata("design:type", Number)
670
+ ], DefillamaLendingRevenuePointExport.prototype, "dailyInterestRevenueUsd", void 0);
671
+ __decorate([
672
+ (0, swagger_1.ApiProperty)(),
673
+ __metadata("design:type", Number)
674
+ ], DefillamaLendingRevenuePointExport.prototype, "dailyStrategyFeeRevenueUsd", void 0);
675
+ __decorate([
676
+ (0, swagger_1.ApiProperty)(),
677
+ __metadata("design:type", Number)
678
+ ], DefillamaLendingRevenuePointExport.prototype, "dailyFlashLoanRevenueUsd", void 0);
679
+ __decorate([
680
+ (0, swagger_1.ApiProperty)(),
681
+ __metadata("design:type", Number)
682
+ ], DefillamaLendingRevenuePointExport.prototype, "dailySupplySideRevenueUsd", void 0);
683
+ __decorate([
684
+ (0, swagger_1.ApiProperty)(),
685
+ __metadata("design:type", Number)
686
+ ], DefillamaLendingRevenuePointExport.prototype, "cumulativeProtocolRevenueUsd", void 0);
687
+ class DefillamaLendingRevenueMarketPointExport {
688
+ }
689
+ exports.DefillamaLendingRevenueMarketPointExport = DefillamaLendingRevenueMarketPointExport;
690
+ __decorate([
691
+ (0, swagger_1.ApiProperty)({ enum: common_enum_1.ActivityChain, enumName: 'ActivityChain' }),
692
+ __metadata("design:type", String)
693
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "chain", void 0);
694
+ __decorate([
695
+ (0, swagger_1.ApiProperty)(),
696
+ __metadata("design:type", String)
697
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "project", void 0);
698
+ __decorate([
699
+ (0, swagger_1.ApiProperty)(),
700
+ __metadata("design:type", String)
701
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "timestamp", void 0);
702
+ __decorate([
703
+ (0, swagger_1.ApiProperty)(),
704
+ __metadata("design:type", String)
705
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "token", void 0);
706
+ __decorate([
707
+ (0, swagger_1.ApiProperty)(),
708
+ __metadata("design:type", String)
709
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "symbol", void 0);
710
+ __decorate([
711
+ (0, swagger_1.ApiProperty)(),
712
+ __metadata("design:type", Number)
713
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "dailyFeesNative", void 0);
714
+ __decorate([
715
+ (0, swagger_1.ApiProperty)(),
716
+ __metadata("design:type", Number)
717
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "dailyFeesUsd", void 0);
718
+ __decorate([
719
+ (0, swagger_1.ApiProperty)(),
720
+ __metadata("design:type", Number)
721
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "dailyProtocolRevenueNative", void 0);
722
+ __decorate([
723
+ (0, swagger_1.ApiProperty)(),
724
+ __metadata("design:type", Number)
725
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "dailyProtocolRevenueUsd", void 0);
726
+ __decorate([
727
+ (0, swagger_1.ApiProperty)(),
728
+ __metadata("design:type", Number)
729
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "dailyInterestRevenueNative", void 0);
730
+ __decorate([
731
+ (0, swagger_1.ApiProperty)(),
732
+ __metadata("design:type", Number)
733
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "dailyInterestRevenueUsd", void 0);
734
+ __decorate([
735
+ (0, swagger_1.ApiProperty)(),
736
+ __metadata("design:type", Number)
737
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "dailyStrategyFeeRevenueNative", void 0);
738
+ __decorate([
739
+ (0, swagger_1.ApiProperty)(),
740
+ __metadata("design:type", Number)
741
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "dailyStrategyFeeRevenueUsd", void 0);
742
+ __decorate([
743
+ (0, swagger_1.ApiProperty)(),
744
+ __metadata("design:type", Number)
745
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "dailyFlashLoanRevenueNative", void 0);
746
+ __decorate([
747
+ (0, swagger_1.ApiProperty)(),
748
+ __metadata("design:type", Number)
749
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "dailyFlashLoanRevenueUsd", void 0);
750
+ __decorate([
751
+ (0, swagger_1.ApiProperty)(),
752
+ __metadata("design:type", Number)
753
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "cumulativeProtocolRevenueNative", void 0);
754
+ __decorate([
755
+ (0, swagger_1.ApiProperty)(),
756
+ __metadata("design:type", Number)
757
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "cumulativeProtocolRevenueUsd", void 0);
758
+ __decorate([
759
+ (0, swagger_1.ApiProperty)(),
760
+ __metadata("design:type", Number)
761
+ ], DefillamaLendingRevenueMarketPointExport.prototype, "usdPrice", void 0);
762
+ class DefillamaLendingRevenueMethodology {
763
+ }
764
+ exports.DefillamaLendingRevenueMethodology = DefillamaLendingRevenueMethodology;
765
+ __decorate([
766
+ (0, swagger_1.ApiProperty)(),
767
+ __metadata("design:type", String)
768
+ ], DefillamaLendingRevenueMethodology.prototype, "fees", void 0);
769
+ __decorate([
770
+ (0, swagger_1.ApiProperty)(),
771
+ __metadata("design:type", String)
772
+ ], DefillamaLendingRevenueMethodology.prototype, "revenue", void 0);
773
+ __decorate([
774
+ (0, swagger_1.ApiProperty)(),
775
+ __metadata("design:type", String)
776
+ ], DefillamaLendingRevenueMethodology.prototype, "breakdown", void 0);
777
+ __decorate([
778
+ (0, swagger_1.ApiProperty)(),
779
+ __metadata("design:type", String)
780
+ ], DefillamaLendingRevenueMethodology.prototype, "nativeMarketValues", void 0);
781
+ __decorate([
782
+ (0, swagger_1.ApiProperty)(),
783
+ __metadata("design:type", String)
784
+ ], DefillamaLendingRevenueMethodology.prototype, "supplySideRevenue", void 0);
785
+ class DefillamaLendingRevenueExport {
786
+ }
787
+ exports.DefillamaLendingRevenueExport = DefillamaLendingRevenueExport;
788
+ __decorate([
789
+ (0, swagger_1.ApiProperty)(),
790
+ __metadata("design:type", String)
791
+ ], DefillamaLendingRevenueExport.prototype, "project", void 0);
792
+ __decorate([
793
+ (0, swagger_1.ApiProperty)({ enum: common_enum_1.ActivityChain, enumName: 'ActivityChain' }),
794
+ __metadata("design:type", String)
795
+ ], DefillamaLendingRevenueExport.prototype, "chain", void 0);
796
+ __decorate([
797
+ (0, swagger_1.ApiProperty)(),
798
+ __metadata("design:type", String)
799
+ ], DefillamaLendingRevenueExport.prototype, "generatedAt", void 0);
800
+ __decorate([
801
+ (0, swagger_1.ApiProperty)(),
802
+ __metadata("design:type", String)
803
+ ], DefillamaLendingRevenueExport.prototype, "startTime", void 0);
804
+ __decorate([
805
+ (0, swagger_1.ApiProperty)(),
806
+ __metadata("design:type", String)
807
+ ], DefillamaLendingRevenueExport.prototype, "endTime", void 0);
808
+ __decorate([
809
+ (0, swagger_1.ApiProperty)({ type: [DefillamaLendingRevenuePointExport] }),
810
+ __metadata("design:type", Array)
811
+ ], DefillamaLendingRevenueExport.prototype, "points", void 0);
812
+ __decorate([
813
+ (0, swagger_1.ApiProperty)({ type: [DefillamaLendingRevenueMarketPointExport] }),
814
+ __metadata("design:type", Array)
815
+ ], DefillamaLendingRevenueExport.prototype, "markets", void 0);
816
+ __decorate([
817
+ (0, swagger_1.ApiProperty)({ type: DefillamaLendingRevenueMethodology }),
818
+ __metadata("design:type", DefillamaLendingRevenueMethodology)
819
+ ], DefillamaLendingRevenueExport.prototype, "methodology", void 0);
820
+ /**
821
+ * Windowed lending user stats. Users are counted by OWNER (wallet address);
822
+ * `activeAccounts` is the sub-account count.
823
+ */
824
+ class StellarLendingUserStatsExport {
825
+ }
826
+ exports.StellarLendingUserStatsExport = StellarLendingUserStatsExport;
827
+ __decorate([
828
+ (0, swagger_1.ApiProperty)(),
829
+ __metadata("design:type", String)
830
+ ], StellarLendingUserStatsExport.prototype, "project", void 0);
831
+ __decorate([
832
+ (0, swagger_1.ApiProperty)({ enum: common_enum_1.ActivityChain, enumName: 'ActivityChain' }),
833
+ __metadata("design:type", String)
834
+ ], StellarLendingUserStatsExport.prototype, "chain", void 0);
835
+ __decorate([
836
+ (0, swagger_1.ApiProperty)(),
837
+ __metadata("design:type", String)
838
+ ], StellarLendingUserStatsExport.prototype, "generatedAt", void 0);
839
+ __decorate([
840
+ (0, swagger_1.ApiProperty)(),
841
+ __metadata("design:type", String)
842
+ ], StellarLendingUserStatsExport.prototype, "startTime", void 0);
843
+ __decorate([
844
+ (0, swagger_1.ApiProperty)(),
845
+ __metadata("design:type", String)
846
+ ], StellarLendingUserStatsExport.prototype, "endTime", void 0);
847
+ __decorate([
848
+ (0, swagger_1.ApiProperty)({ description: 'Distinct owner wallets active in the window' }),
849
+ __metadata("design:type", Number)
850
+ ], StellarLendingUserStatsExport.prototype, "activeUsers", void 0);
851
+ __decorate([
852
+ (0, swagger_1.ApiProperty)({ description: 'Owners first seen in the window' }),
853
+ __metadata("design:type", Number)
854
+ ], StellarLendingUserStatsExport.prototype, "newUsers", void 0);
855
+ __decorate([
856
+ (0, swagger_1.ApiProperty)({ description: 'Distinct lending sub-accounts in the window' }),
857
+ __metadata("design:type", Number)
858
+ ], StellarLendingUserStatsExport.prototype, "activeAccounts", void 0);
859
+ __decorate([
860
+ (0, swagger_1.ApiProperty)(),
861
+ __metadata("design:type", Number)
862
+ ], StellarLendingUserStatsExport.prototype, "transactions", void 0);
@@ -108,10 +108,19 @@ export interface HolderDistributionDto {
108
108
  export interface RateSpreadSeriesDto {
109
109
  points: unknown[];
110
110
  }
111
+ /**
112
+ * Protocol-wide DefiLlama *dimensions* series (`/stellar-lending/defillama`).
113
+ * Distinct from the integrations market export (`DefillamaLendingExport` on
114
+ * `@xoxno/types` root — `/integrations/lending/stellar`).
115
+ */
111
116
  export interface DefiLlamaDimensionsDto {
112
- protocol: string;
113
- chain: string;
114
- version: string;
117
+ points: Array<{
118
+ timestamp: string;
119
+ tvl: number;
120
+ borrowed: number;
121
+ fees: number;
122
+ revenue: number;
123
+ }>;
115
124
  }
116
125
  export interface GovernanceProposalsPageDto {
117
126
  resources: unknown[];
@@ -6,6 +6,8 @@ export declare enum StellarLendingActivity {
6
6
  LiqRepay = "liqRepay",
7
7
  LiqSeize = "liqSeize",
8
8
  Multiply = "multiply",
9
+ /** On-chain `PositionAction::ParamUpd` (7) — risk-param refresh without flow. */
10
+ ParamUpdate = "paramUpdate",
9
11
  SwapDebt = "swapDebt",
10
12
  SwapCollateral = "swapCollateral",
11
13
  RepayWithCollateral = "repayWithCollateral",
@@ -10,6 +10,8 @@ var StellarLendingActivity;
10
10
  StellarLendingActivity["LiqRepay"] = "liqRepay";
11
11
  StellarLendingActivity["LiqSeize"] = "liqSeize";
12
12
  StellarLendingActivity["Multiply"] = "multiply";
13
+ /** On-chain `PositionAction::ParamUpd` (7) — risk-param refresh without flow. */
14
+ StellarLendingActivity["ParamUpdate"] = "paramUpdate";
13
15
  StellarLendingActivity["SwapDebt"] = "swapDebt";
14
16
  StellarLendingActivity["SwapCollateral"] = "swapCollateral";
15
17
  StellarLendingActivity["RepayWithCollateral"] = "repayWithCollateral";
@@ -14,7 +14,11 @@ export interface StellarLendingActivityData {
14
14
  token: string;
15
15
  /** Action delta amount (this tx), big-int string. */
16
16
  amount: string;
17
- amountShort: number;
17
+ /**
18
+ * Display-unit delta. `null` when the asset header decimals are not yet
19
+ * known — never fabricated from a default (append-only activity).
20
+ */
21
+ amountShort: number | null;
18
22
  oraclePrice: number | null;
19
23
  usd: number | null;
20
24
  feeShort?: number;
@@ -65,6 +69,17 @@ export interface StellarLendingActivityData {
65
69
  * are the liquidatee).
66
70
  */
67
71
  liquidator: string | null;
72
+ /**
73
+ * Aggregate debt repaid (USD WAD string) from `position:liquidation`, stamped
74
+ * onto same-tx `liqRepay`/`liqSeize` legs. `null` on non-liquidation rows.
75
+ */
76
+ repaidUsdWad?: string | null;
77
+ /**
78
+ * Applied liquidation bonus (bps string) from `position:liquidation`, stamped
79
+ * onto same-tx `liqRepay`/`liqSeize` legs. Total seized USD ≈
80
+ * repaid * (1 + bonus / 10_000). `null` on non-liquidation rows.
81
+ */
82
+ bonusBps?: string | null;
68
83
  /**
69
84
  * Raw on-chain `PositionAction` discriminant (u32) for position legs — kept
70
85
  * verbatim so Kusto can distinguish codes that collapse to one
@@ -190,7 +190,7 @@ export interface StellarUserActivityItem {
190
190
  spokeId: number | null;
191
191
  reserveKey: string | null;
192
192
  /** Action delta this tx, human-readable token units. */
193
- amountShort: number;
193
+ amountShort: number | null;
194
194
  /** Action delta valued in USD at event-time oracle price. */
195
195
  usd: number;
196
196
  /** Liquidator (caller) address on liquidation legs; `null` otherwise. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoxno/types",
3
- "version": "1.0.470",
3
+ "version": "1.0.472",
4
4
  "description": "Shared types and utilities for XOXNO API.",
5
5
  "exports": {
6
6
  ".": {