@xoxno/types 1.0.425 → 1.0.427
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cache/cache-keys.d.ts +1 -0
- package/dist/cache/cache-keys.js +4 -0
- package/dist/common/kusto/lending-stats-history.d.ts +5 -0
- package/dist/common/kusto/lending-stats-history.js +47 -0
- package/dist/cosmos-db/documents/lending/lending-oracle.d.ts +2 -4
- package/dist/cosmos-db/documents/lending/lending-oracle.js +4 -18
- package/dist/enums/stellar-lending-topic.enum.d.ts +1 -2
- package/dist/enums/stellar-lending-topic.enum.js +0 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/requests/lending/lending-indexes.dto.d.ts +0 -2
- package/dist/requests/lending/lending-indexes.dto.js +0 -16
- package/dist/requests/lending/stellar-lending-admin-args.dto.d.ts +1 -2
- package/dist/requests/lending/stellar-lending-admin-args.dto.js +2 -9
- package/dist/requests/lending/stellar-lending-events.dto.d.ts +0 -7
- package/dist/requests/lending/stellar-lending-events.dto.js +1 -19
- package/package.json +1 -1
|
@@ -98,6 +98,7 @@ export declare const CacheKeys: {
|
|
|
98
98
|
LendingPositionLeaderboard: (hash: string) => CacheKeyConfig;
|
|
99
99
|
LendingEModeCategoryProfileDoc: (id: string) => CacheKeyConfig;
|
|
100
100
|
LendingMarketStatsGraphData: (startTime: string, endTime: string, bin: string, token?: string) => CacheKeyConfig;
|
|
101
|
+
LendingStatsHistory: (startTime: string, endTime: string, bin: string, chain: string) => CacheKeyConfig;
|
|
101
102
|
LendingMarketAverageGraphData: (token: string) => CacheKeyConfig;
|
|
102
103
|
LendingMarketQuery: (filterHash: string) => CacheKeyConfig;
|
|
103
104
|
UserLendingPositions: (address: string, token?: string) => CacheKeyConfig;
|
package/dist/cache/cache-keys.js
CHANGED
|
@@ -362,6 +362,10 @@ exports.CacheKeys = {
|
|
|
362
362
|
key: `lending:market:${token}:stats:graph:${startTime}:${endTime}:${bin}`,
|
|
363
363
|
ttl: ttl_1.TTLS.ONE_MINUTE * 15,
|
|
364
364
|
}),
|
|
365
|
+
LendingStatsHistory: (startTime, endTime, bin, chain) => ({
|
|
366
|
+
key: `lending:global:stats:history:${chain}:${startTime}:${endTime}:${bin}`,
|
|
367
|
+
ttl: ttl_1.TTLS.ONE_MINUTE * 15,
|
|
368
|
+
}),
|
|
365
369
|
LendingMarketAverageGraphData: (token) => ({
|
|
366
370
|
key: `lending:market:${token}:stats`,
|
|
367
371
|
ttl: ttl_1.TTLS.ONE_HOUR * 4,
|
|
@@ -0,0 +1,47 @@
|
|
|
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.LendingStatsHistory = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
class LendingStatsHistory {
|
|
15
|
+
}
|
|
16
|
+
exports.LendingStatsHistory = LendingStatsHistory;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, swagger_1.ApiProperty)({
|
|
19
|
+
description: 'Bin-start timestamp of each point, ISO 8601',
|
|
20
|
+
example: [
|
|
21
|
+
'2026-05-26T00:00:00Z',
|
|
22
|
+
'2026-05-27T00:00:00Z',
|
|
23
|
+
'2026-05-28T00:00:00Z',
|
|
24
|
+
],
|
|
25
|
+
isArray: true,
|
|
26
|
+
items: { type: 'string' },
|
|
27
|
+
}),
|
|
28
|
+
__metadata("design:type", Array)
|
|
29
|
+
], LendingStatsHistory.prototype, "timestamp", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, swagger_1.ApiProperty)({
|
|
32
|
+
description: 'Total deposits (supplied) in USD at each timestamp',
|
|
33
|
+
example: [1156010.01, 1133263.57, 1104721.64],
|
|
34
|
+
isArray: true,
|
|
35
|
+
items: { type: 'number' },
|
|
36
|
+
}),
|
|
37
|
+
__metadata("design:type", Array)
|
|
38
|
+
], LendingStatsHistory.prototype, "supplied", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, swagger_1.ApiProperty)({
|
|
41
|
+
description: 'Active loans (borrowed) in USD at each timestamp',
|
|
42
|
+
example: [265017.92, 261174.28, 252766.49],
|
|
43
|
+
isArray: true,
|
|
44
|
+
items: { type: 'number' },
|
|
45
|
+
}),
|
|
46
|
+
__metadata("design:type", Array)
|
|
47
|
+
], LendingStatsHistory.prototype, "borrowed", void 0);
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ExchangeSource, LendingOracleAssetRefKind, LendingOracleProviderKind, LendingOracleReadMode, LendingOracleStrategy, OracleType, PricingMethod } from '../../../enums/lending.enum';
|
|
2
2
|
export declare class OraclePriceFluctuation {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
lastUpperRatio: number;
|
|
6
|
-
lastLowerRatio: number;
|
|
3
|
+
upperRatio: number;
|
|
4
|
+
lowerRatio: number;
|
|
7
5
|
constructor(init?: Partial<OraclePriceFluctuation>);
|
|
8
6
|
}
|
|
9
7
|
export declare class LendingOracleAssetRef {
|
|
@@ -21,31 +21,17 @@ exports.OraclePriceFluctuation = OraclePriceFluctuation;
|
|
|
21
21
|
__decorate([
|
|
22
22
|
(0, swagger_1.ApiProperty)({
|
|
23
23
|
type: 'integer',
|
|
24
|
-
description: '
|
|
24
|
+
description: 'Upper ratio threshold for the primary/anchor price band',
|
|
25
25
|
}),
|
|
26
26
|
__metadata("design:type", Number)
|
|
27
|
-
], OraclePriceFluctuation.prototype, "
|
|
27
|
+
], OraclePriceFluctuation.prototype, "upperRatio", void 0);
|
|
28
28
|
__decorate([
|
|
29
29
|
(0, swagger_1.ApiProperty)({
|
|
30
30
|
type: 'integer',
|
|
31
|
-
description: '
|
|
31
|
+
description: 'Lower ratio threshold for the primary/anchor price band',
|
|
32
32
|
}),
|
|
33
33
|
__metadata("design:type", Number)
|
|
34
|
-
], OraclePriceFluctuation.prototype, "
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, swagger_1.ApiProperty)({
|
|
37
|
-
type: 'integer',
|
|
38
|
-
description: 'Last upper ratio threshold for price fluctuation',
|
|
39
|
-
}),
|
|
40
|
-
__metadata("design:type", Number)
|
|
41
|
-
], OraclePriceFluctuation.prototype, "lastUpperRatio", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, swagger_1.ApiProperty)({
|
|
44
|
-
type: 'integer',
|
|
45
|
-
description: 'Last lower ratio threshold for price fluctuation',
|
|
46
|
-
}),
|
|
47
|
-
__metadata("design:type", Number)
|
|
48
|
-
], OraclePriceFluctuation.prototype, "lastLowerRatio", void 0);
|
|
34
|
+
], OraclePriceFluctuation.prototype, "lowerRatio", void 0);
|
|
49
35
|
class LendingOracleAssetRef {
|
|
50
36
|
constructor(init) {
|
|
51
37
|
Object.assign(this, init);
|
|
@@ -22,6 +22,5 @@ export declare enum StellarLendingTopic {
|
|
|
22
22
|
ConfigAccumulator = "config:accumulator",
|
|
23
23
|
ConfigPoolTemplate = "config:pool_template",
|
|
24
24
|
ConfigPositionLimits = "config:position_limits",
|
|
25
|
-
ConfigOracleDisabled = "config:oracle_disabled"
|
|
26
|
-
OracleTwapDegraded = "oracle:twap_degraded"
|
|
25
|
+
ConfigOracleDisabled = "config:oracle_disabled"
|
|
27
26
|
}
|
|
@@ -27,5 +27,4 @@ var StellarLendingTopic;
|
|
|
27
27
|
StellarLendingTopic["ConfigPoolTemplate"] = "config:pool_template";
|
|
28
28
|
StellarLendingTopic["ConfigPositionLimits"] = "config:position_limits";
|
|
29
29
|
StellarLendingTopic["ConfigOracleDisabled"] = "config:oracle_disabled";
|
|
30
|
-
StellarLendingTopic["OracleTwapDegraded"] = "oracle:twap_degraded";
|
|
31
30
|
})(StellarLendingTopic || (exports.StellarLendingTopic = StellarLendingTopic = {}));
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './common/kusto/lending-market-analytics';
|
|
|
4
4
|
export * from './common/kusto/lending-market-average';
|
|
5
5
|
export * from './common/kusto/lending-overall-stats';
|
|
6
6
|
export * from './common/kusto/lending-position-status';
|
|
7
|
+
export * from './common/kusto/lending-stats-history';
|
|
7
8
|
export * from './common/kusto/user-trading-summary';
|
|
8
9
|
export * from './common/kusto/volume-graph';
|
|
9
10
|
export * from './common/kusto/wallet-stats';
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ __exportStar(require("./common/kusto/lending-market-analytics"), exports);
|
|
|
20
20
|
__exportStar(require("./common/kusto/lending-market-average"), exports);
|
|
21
21
|
__exportStar(require("./common/kusto/lending-overall-stats"), exports);
|
|
22
22
|
__exportStar(require("./common/kusto/lending-position-status"), exports);
|
|
23
|
+
__exportStar(require("./common/kusto/lending-stats-history"), exports);
|
|
23
24
|
__exportStar(require("./common/kusto/user-trading-summary"), exports);
|
|
24
25
|
__exportStar(require("./common/kusto/volume-graph"), exports);
|
|
25
26
|
__exportStar(require("./common/kusto/wallet-stats"), exports);
|
|
@@ -143,22 +143,6 @@ __decorate([
|
|
|
143
143
|
}),
|
|
144
144
|
__metadata("design:type", Number)
|
|
145
145
|
], LendingIndexesDto.prototype, "aggregatorPriceUsdShort", void 0);
|
|
146
|
-
__decorate([
|
|
147
|
-
(0, swagger_1.ApiProperty)({
|
|
148
|
-
description: 'Within first tolerance',
|
|
149
|
-
example: true,
|
|
150
|
-
type: Boolean,
|
|
151
|
-
}),
|
|
152
|
-
__metadata("design:type", Boolean)
|
|
153
|
-
], LendingIndexesDto.prototype, "withinFirstTolerance", void 0);
|
|
154
|
-
__decorate([
|
|
155
|
-
(0, swagger_1.ApiProperty)({
|
|
156
|
-
description: 'Within second tolerance',
|
|
157
|
-
example: true,
|
|
158
|
-
type: Boolean,
|
|
159
|
-
}),
|
|
160
|
-
__metadata("design:type", Boolean)
|
|
161
|
-
], LendingIndexesDto.prototype, "withinSecondTolerance", void 0);
|
|
162
146
|
__decorate([
|
|
163
147
|
(0, swagger_1.ApiProperty)({
|
|
164
148
|
description: 'Blockchain network the indexes belong to (optional, defaults downstream to MVX when absent)',
|
|
@@ -57,8 +57,7 @@ export declare class OracleSourceConfigInputDto {
|
|
|
57
57
|
}
|
|
58
58
|
export declare class MarketOracleConfigInputDto {
|
|
59
59
|
maxPriceStaleSeconds: number;
|
|
60
|
-
|
|
61
|
-
lastToleranceBps: number;
|
|
60
|
+
toleranceBps: number;
|
|
62
61
|
strategy: LendingOracleStrategy;
|
|
63
62
|
primary: OracleSourceConfigInputDto;
|
|
64
63
|
anchor?: OracleSourceConfigInputDto;
|
|
@@ -238,17 +238,10 @@ __decorate([
|
|
|
238
238
|
__decorate([
|
|
239
239
|
(0, swagger_1.ApiProperty)({
|
|
240
240
|
type: 'integer',
|
|
241
|
-
description: '
|
|
241
|
+
description: 'Primary/anchor deviation tolerance band, bps',
|
|
242
242
|
}),
|
|
243
243
|
__metadata("design:type", Number)
|
|
244
|
-
], MarketOracleConfigInputDto.prototype, "
|
|
245
|
-
__decorate([
|
|
246
|
-
(0, swagger_1.ApiProperty)({
|
|
247
|
-
type: 'integer',
|
|
248
|
-
description: 'Last (wide) tolerance band, bps',
|
|
249
|
-
}),
|
|
250
|
-
__metadata("design:type", Number)
|
|
251
|
-
], MarketOracleConfigInputDto.prototype, "lastToleranceBps", void 0);
|
|
244
|
+
], MarketOracleConfigInputDto.prototype, "toleranceBps", void 0);
|
|
252
245
|
__decorate([
|
|
253
246
|
(0, swagger_1.ApiProperty)({
|
|
254
247
|
enum: lending_enum_1.LendingOracleStrategy,
|
|
@@ -148,10 +148,6 @@ export declare class StellarUpdatePositionLimitsEvent {
|
|
|
148
148
|
export declare class StellarOracleDisabledEvent {
|
|
149
149
|
asset: string;
|
|
150
150
|
}
|
|
151
|
-
export declare class StellarOracleTwapDegradedEvent {
|
|
152
|
-
oracle: string;
|
|
153
|
-
reasonCode: number;
|
|
154
|
-
}
|
|
155
151
|
/**
|
|
156
152
|
* Discriminated union of every decoded Stellar lending event, keyed by the
|
|
157
153
|
* `"<domain>:<action>"` topic. Narrow on `topic` to access the typed `data`.
|
|
@@ -216,7 +212,4 @@ export type StellarLendingDecodedEvent = {
|
|
|
216
212
|
} | {
|
|
217
213
|
topic: 'config:oracle_disabled';
|
|
218
214
|
data: StellarOracleDisabledEvent;
|
|
219
|
-
} | {
|
|
220
|
-
topic: 'oracle:twap_degraded';
|
|
221
|
-
data: StellarOracleTwapDegradedEvent;
|
|
222
215
|
};
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.StellarOracleDisabledEvent = exports.StellarUpdatePositionLimitsEvent = exports.StellarUpdatePoolTemplateEvent = exports.StellarUpdateAccumulatorEvent = exports.StellarUpdateAggregatorEvent = exports.StellarApproveTokenEvent = exports.StellarInitialMultiplyPaymentEvent = exports.StellarStrategyFeeEvent = exports.StellarCleanBadDebtEvent = exports.StellarRemoveEModeAssetEvent = exports.StellarUpdateEModeAssetEvent = exports.StellarUpdateEModeCategoryEvent = exports.StellarUpdateAssetOracleEvent = exports.StellarUpdateAssetConfigEvent = exports.StellarFlashLoanEvent = exports.StellarUpdatePositionBatchEvent = exports.StellarUpdateMarketStateBatchEvent = exports.StellarUpdateMarketParamsBatchEvent = exports.StellarPoolMarketParamsUpdate = exports.StellarUpdateMarketParamsEvent = exports.StellarCreateMarketEvent = exports.StellarEModeAssetConfig = exports.StellarEventEModeCategory = exports.StellarEventPositionDelta = exports.StellarEventAccountAttributes = exports.StellarMarketStateSnapshot = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const lending_enum_1 = require("../../enums/lending.enum");
|
|
15
15
|
const stellar_lending_admin_args_dto_1 = require("./stellar-lending-admin-args.dto");
|
|
@@ -639,21 +639,3 @@ __decorate([
|
|
|
639
639
|
(0, swagger_1.ApiProperty)({ type: String, description: 'Asset whose oracle was disabled' }),
|
|
640
640
|
__metadata("design:type", String)
|
|
641
641
|
], StellarOracleDisabledEvent.prototype, "asset", void 0);
|
|
642
|
-
// ---------- topic: oracle:twap_degraded ----------
|
|
643
|
-
class StellarOracleTwapDegradedEvent {
|
|
644
|
-
}
|
|
645
|
-
exports.StellarOracleTwapDegradedEvent = StellarOracleTwapDegradedEvent;
|
|
646
|
-
__decorate([
|
|
647
|
-
(0, swagger_1.ApiProperty)({
|
|
648
|
-
type: String,
|
|
649
|
-
description: 'Oracle contract address that degraded',
|
|
650
|
-
}),
|
|
651
|
-
__metadata("design:type", String)
|
|
652
|
-
], StellarOracleTwapDegradedEvent.prototype, "oracle", void 0);
|
|
653
|
-
__decorate([
|
|
654
|
-
(0, swagger_1.ApiProperty)({
|
|
655
|
-
type: 'integer',
|
|
656
|
-
description: 'Provider-specific degradation reason code',
|
|
657
|
-
}),
|
|
658
|
-
__metadata("design:type", Number)
|
|
659
|
-
], StellarOracleTwapDegradedEvent.prototype, "reasonCode", void 0);
|