@xoxno/types 1.0.394 → 1.0.397
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/cosmos-db/documents/lending/lending-market-profile.doc.d.ts +2 -2
- package/dist/cosmos-db/documents/lending/lending-market-profile.doc.js +11 -4
- package/dist/cosmos-db/documents/lending/lending-oracle.d.ts +30 -1
- package/dist/cosmos-db/documents/lending/lending-oracle.js +182 -5
- package/dist/enums/lending.enum.d.ts +17 -0
- package/dist/enums/lending.enum.js +22 -1
- package/dist/requests/aggregator/stellar-aggregator.dto.d.ts +8 -1
- package/dist/requests/aggregator/stellar-aggregator.dto.js +67 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LendingDataType } from '../../../enums/lending-data-type.enum';
|
|
2
2
|
import { OwnerDto } from '../../../common/owner.dto';
|
|
3
3
|
import { LendingEModeCategoryProfileDoc } from './lending-emode-category-profile.doc';
|
|
4
|
-
import {
|
|
4
|
+
import { LendingOracleProvider } from './lending-oracle';
|
|
5
5
|
import { LendingIndexesDto } from '../../../requests/lending/lending-indexes.dto';
|
|
6
6
|
import { ActivityChain } from '../../../enums/common.enum';
|
|
7
7
|
export declare class LendingMarketProfileDoc {
|
|
@@ -53,7 +53,7 @@ export declare class LendingMarketProfileDoc {
|
|
|
53
53
|
flashLoan: boolean;
|
|
54
54
|
flashLoanFee: string;
|
|
55
55
|
canBorrowInIsolation: boolean;
|
|
56
|
-
oracleProvider:
|
|
56
|
+
oracleProvider: LendingOracleProvider;
|
|
57
57
|
chain: ActivityChain;
|
|
58
58
|
id: string;
|
|
59
59
|
pk: string;
|
|
@@ -19,7 +19,7 @@ const lending_oracle_1 = require("./lending-oracle");
|
|
|
19
19
|
const lending_indexes_dto_1 = require("../../../requests/lending/lending-indexes.dto");
|
|
20
20
|
const common_enum_1 = require("../../../enums/common.enum");
|
|
21
21
|
const lending_chain_1 = require("./lending-chain");
|
|
22
|
-
class LendingMarketProfileDoc {
|
|
22
|
+
let LendingMarketProfileDoc = class LendingMarketProfileDoc {
|
|
23
23
|
constructor(props) {
|
|
24
24
|
this.dataType = lending_data_type_enum_1.LendingDataType.MARKET_PROFILE;
|
|
25
25
|
this.rewardsReserve = '0';
|
|
@@ -49,7 +49,7 @@ class LendingMarketProfileDoc {
|
|
|
49
49
|
this.id = `${this.token}_${this.dataType}`;
|
|
50
50
|
this.chain = (0, lending_chain_1.normalizeLendingChain)(this.chain);
|
|
51
51
|
}
|
|
52
|
-
}
|
|
52
|
+
};
|
|
53
53
|
exports.LendingMarketProfileDoc = LendingMarketProfileDoc;
|
|
54
54
|
__decorate([
|
|
55
55
|
(0, swagger_1.ApiProperty)({
|
|
@@ -296,9 +296,12 @@ __decorate([
|
|
|
296
296
|
__decorate([
|
|
297
297
|
(0, swagger_1.ApiProperty)({
|
|
298
298
|
description: 'Oracle provider data',
|
|
299
|
-
|
|
299
|
+
oneOf: [
|
|
300
|
+
{ $ref: (0, swagger_1.getSchemaPath)(lending_oracle_1.LendingOracleUpdateStruct) },
|
|
301
|
+
{ $ref: (0, swagger_1.getSchemaPath)(lending_oracle_1.StellarLendingOracleUpdateStruct) },
|
|
302
|
+
],
|
|
300
303
|
}),
|
|
301
|
-
__metadata("design:type",
|
|
304
|
+
__metadata("design:type", Object)
|
|
302
305
|
], LendingMarketProfileDoc.prototype, "oracleProvider", void 0);
|
|
303
306
|
__decorate([
|
|
304
307
|
(0, swagger_1.ApiProperty)({
|
|
@@ -330,6 +333,10 @@ __decorate([
|
|
|
330
333
|
}),
|
|
331
334
|
__metadata("design:type", Number)
|
|
332
335
|
], LendingMarketProfileDoc.prototype, "_ts", void 0);
|
|
336
|
+
exports.LendingMarketProfileDoc = LendingMarketProfileDoc = __decorate([
|
|
337
|
+
(0, swagger_1.ApiExtraModels)(lending_oracle_1.LendingOracleUpdateStruct, lending_oracle_1.StellarLendingOracleUpdateStruct),
|
|
338
|
+
__metadata("design:paramtypes", [Object])
|
|
339
|
+
], LendingMarketProfileDoc);
|
|
333
340
|
class LendingMarketParticipants {
|
|
334
341
|
}
|
|
335
342
|
exports.LendingMarketParticipants = LendingMarketParticipants;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExchangeSource, OracleType, PricingMethod } from '../../../enums/lending.enum';
|
|
1
|
+
import { ExchangeSource, LendingOracleAssetRefKind, LendingOracleProviderKind, LendingOracleReadMode, LendingOracleStrategy, OracleType, PricingMethod } from '../../../enums/lending.enum';
|
|
2
2
|
export declare class OraclePriceFluctuation {
|
|
3
3
|
firstUpperRatio: number;
|
|
4
4
|
firstLowerRatio: number;
|
|
@@ -6,6 +6,23 @@ export declare class OraclePriceFluctuation {
|
|
|
6
6
|
lastLowerRatio: number;
|
|
7
7
|
constructor(init?: Partial<OraclePriceFluctuation>);
|
|
8
8
|
}
|
|
9
|
+
export declare class LendingOracleAssetRef {
|
|
10
|
+
kind: LendingOracleAssetRefKind;
|
|
11
|
+
value: string;
|
|
12
|
+
constructor(init?: Partial<LendingOracleAssetRef>);
|
|
13
|
+
}
|
|
14
|
+
export declare class LendingOracleSource {
|
|
15
|
+
provider: LendingOracleProviderKind;
|
|
16
|
+
contractAddress: string;
|
|
17
|
+
asset?: LendingOracleAssetRef;
|
|
18
|
+
feedId?: string;
|
|
19
|
+
readMode: LendingOracleReadMode;
|
|
20
|
+
twapRecords?: number;
|
|
21
|
+
decimals?: number;
|
|
22
|
+
resolutionSeconds?: number;
|
|
23
|
+
maxStaleSeconds?: number;
|
|
24
|
+
constructor(init?: Partial<LendingOracleSource>);
|
|
25
|
+
}
|
|
9
26
|
export declare class LendingOracleUpdateStruct {
|
|
10
27
|
baseTokenId: string;
|
|
11
28
|
quoteTokenId: string;
|
|
@@ -19,3 +36,15 @@ export declare class LendingOracleUpdateStruct {
|
|
|
19
36
|
maxPriceStaleSeconds: number;
|
|
20
37
|
constructor(init?: Partial<LendingOracleUpdateStruct>);
|
|
21
38
|
}
|
|
39
|
+
export declare class StellarLendingOracleUpdateStruct {
|
|
40
|
+
baseTokenId: string;
|
|
41
|
+
quoteTokenId: string;
|
|
42
|
+
tolerance: OraclePriceFluctuation;
|
|
43
|
+
assetDecimals: number;
|
|
44
|
+
maxPriceStaleSeconds: number;
|
|
45
|
+
strategy: LendingOracleStrategy;
|
|
46
|
+
primary: LendingOracleSource;
|
|
47
|
+
anchor?: LendingOracleSource;
|
|
48
|
+
constructor(init?: Partial<StellarLendingOracleUpdateStruct>);
|
|
49
|
+
}
|
|
50
|
+
export type LendingOracleProvider = LendingOracleUpdateStruct | StellarLendingOracleUpdateStruct;
|
|
@@ -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.LendingOracleUpdateStruct = exports.OraclePriceFluctuation = void 0;
|
|
12
|
+
exports.StellarLendingOracleUpdateStruct = exports.LendingOracleUpdateStruct = exports.LendingOracleSource = exports.LendingOracleAssetRef = exports.OraclePriceFluctuation = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const lending_enum_1 = require("../../../enums/lending.enum");
|
|
15
15
|
class OraclePriceFluctuation {
|
|
@@ -46,9 +46,113 @@ __decorate([
|
|
|
46
46
|
}),
|
|
47
47
|
__metadata("design:type", Number)
|
|
48
48
|
], OraclePriceFluctuation.prototype, "lastLowerRatio", void 0);
|
|
49
|
+
class LendingOracleAssetRef {
|
|
50
|
+
constructor(init) {
|
|
51
|
+
Object.assign(this, init);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.LendingOracleAssetRef = LendingOracleAssetRef;
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, swagger_1.ApiProperty)({
|
|
57
|
+
enum: lending_enum_1.LendingOracleAssetRefKind,
|
|
58
|
+
enumName: 'LendingOracleAssetRefKind',
|
|
59
|
+
description: 'Oracle-native asset reference discriminator',
|
|
60
|
+
}),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], LendingOracleAssetRef.prototype, "kind", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, swagger_1.ApiProperty)({
|
|
65
|
+
type: String,
|
|
66
|
+
description: 'Oracle-native asset reference value',
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], LendingOracleAssetRef.prototype, "value", void 0);
|
|
70
|
+
class LendingOracleSource {
|
|
71
|
+
constructor(init) {
|
|
72
|
+
Object.assign(this, init);
|
|
73
|
+
if (init?.asset) {
|
|
74
|
+
this.asset = new LendingOracleAssetRef(init.asset);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.LendingOracleSource = LendingOracleSource;
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, swagger_1.ApiProperty)({
|
|
81
|
+
enum: lending_enum_1.LendingOracleProviderKind,
|
|
82
|
+
enumName: 'LendingOracleProviderKind',
|
|
83
|
+
description: 'Oracle provider used by this source',
|
|
84
|
+
}),
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], LendingOracleSource.prototype, "provider", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, swagger_1.ApiProperty)({
|
|
89
|
+
type: String,
|
|
90
|
+
description: 'Provider contract address',
|
|
91
|
+
}),
|
|
92
|
+
__metadata("design:type", String)
|
|
93
|
+
], LendingOracleSource.prototype, "contractAddress", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, swagger_1.ApiProperty)({
|
|
96
|
+
type: LendingOracleAssetRef,
|
|
97
|
+
required: false,
|
|
98
|
+
description: 'Provider-specific asset reference',
|
|
99
|
+
}),
|
|
100
|
+
__metadata("design:type", LendingOracleAssetRef)
|
|
101
|
+
], LendingOracleSource.prototype, "asset", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, swagger_1.ApiProperty)({
|
|
104
|
+
type: String,
|
|
105
|
+
required: false,
|
|
106
|
+
description: 'Provider-specific feed identifier',
|
|
107
|
+
}),
|
|
108
|
+
__metadata("design:type", String)
|
|
109
|
+
], LendingOracleSource.prototype, "feedId", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, swagger_1.ApiProperty)({
|
|
112
|
+
enum: lending_enum_1.LendingOracleReadMode,
|
|
113
|
+
enumName: 'LendingOracleReadMode',
|
|
114
|
+
description: 'Read mode used for this source',
|
|
115
|
+
}),
|
|
116
|
+
__metadata("design:type", String)
|
|
117
|
+
], LendingOracleSource.prototype, "readMode", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, swagger_1.ApiProperty)({
|
|
120
|
+
type: 'integer',
|
|
121
|
+
required: false,
|
|
122
|
+
description: 'Number of records used when readMode is Twap',
|
|
123
|
+
}),
|
|
124
|
+
__metadata("design:type", Number)
|
|
125
|
+
], LendingOracleSource.prototype, "twapRecords", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, swagger_1.ApiProperty)({
|
|
128
|
+
type: 'integer',
|
|
129
|
+
required: false,
|
|
130
|
+
description: 'Provider-reported price decimals',
|
|
131
|
+
}),
|
|
132
|
+
__metadata("design:type", Number)
|
|
133
|
+
], LendingOracleSource.prototype, "decimals", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, swagger_1.ApiProperty)({
|
|
136
|
+
type: 'integer',
|
|
137
|
+
required: false,
|
|
138
|
+
description: 'Provider-reported resolution in seconds',
|
|
139
|
+
}),
|
|
140
|
+
__metadata("design:type", Number)
|
|
141
|
+
], LendingOracleSource.prototype, "resolutionSeconds", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, swagger_1.ApiProperty)({
|
|
144
|
+
type: 'integer',
|
|
145
|
+
required: false,
|
|
146
|
+
description: 'Maximum seconds before this source is considered stale',
|
|
147
|
+
}),
|
|
148
|
+
__metadata("design:type", Number)
|
|
149
|
+
], LendingOracleSource.prototype, "maxStaleSeconds", void 0);
|
|
49
150
|
class LendingOracleUpdateStruct {
|
|
50
151
|
constructor(init) {
|
|
51
152
|
Object.assign(this, init);
|
|
153
|
+
if (init?.tolerance) {
|
|
154
|
+
this.tolerance = new OraclePriceFluctuation(init.tolerance);
|
|
155
|
+
}
|
|
52
156
|
}
|
|
53
157
|
}
|
|
54
158
|
exports.LendingOracleUpdateStruct = LendingOracleUpdateStruct;
|
|
@@ -76,7 +180,7 @@ __decorate([
|
|
|
76
180
|
__decorate([
|
|
77
181
|
(0, swagger_1.ApiProperty)({
|
|
78
182
|
type: String,
|
|
79
|
-
description: '
|
|
183
|
+
description: 'MultiversX oracle contract address',
|
|
80
184
|
}),
|
|
81
185
|
__metadata("design:type", String)
|
|
82
186
|
], LendingOracleUpdateStruct.prototype, "oracleContractAddress", void 0);
|
|
@@ -84,7 +188,7 @@ __decorate([
|
|
|
84
188
|
(0, swagger_1.ApiProperty)({
|
|
85
189
|
enum: lending_enum_1.PricingMethod,
|
|
86
190
|
enumName: 'PricingMethod',
|
|
87
|
-
description: '
|
|
191
|
+
description: 'MultiversX pricing method',
|
|
88
192
|
}),
|
|
89
193
|
__metadata("design:type", String)
|
|
90
194
|
], LendingOracleUpdateStruct.prototype, "pricingMethod", void 0);
|
|
@@ -92,7 +196,7 @@ __decorate([
|
|
|
92
196
|
(0, swagger_1.ApiProperty)({
|
|
93
197
|
enum: lending_enum_1.OracleType,
|
|
94
198
|
enumName: 'OracleType',
|
|
95
|
-
description: '
|
|
199
|
+
description: 'MultiversX oracle type',
|
|
96
200
|
}),
|
|
97
201
|
__metadata("design:type", String)
|
|
98
202
|
], LendingOracleUpdateStruct.prototype, "oracleType", void 0);
|
|
@@ -100,7 +204,7 @@ __decorate([
|
|
|
100
204
|
(0, swagger_1.ApiProperty)({
|
|
101
205
|
enum: lending_enum_1.ExchangeSource,
|
|
102
206
|
enumName: 'ExchangeSource',
|
|
103
|
-
description: '
|
|
207
|
+
description: 'MultiversX exchange source',
|
|
104
208
|
}),
|
|
105
209
|
__metadata("design:type", String)
|
|
106
210
|
], LendingOracleUpdateStruct.prototype, "exchangeSource", void 0);
|
|
@@ -125,3 +229,76 @@ __decorate([
|
|
|
125
229
|
}),
|
|
126
230
|
__metadata("design:type", Number)
|
|
127
231
|
], LendingOracleUpdateStruct.prototype, "maxPriceStaleSeconds", void 0);
|
|
232
|
+
class StellarLendingOracleUpdateStruct {
|
|
233
|
+
constructor(init) {
|
|
234
|
+
Object.assign(this, init);
|
|
235
|
+
if (init?.tolerance) {
|
|
236
|
+
this.tolerance = new OraclePriceFluctuation(init.tolerance);
|
|
237
|
+
}
|
|
238
|
+
if (init?.primary) {
|
|
239
|
+
this.primary = new LendingOracleSource(init.primary);
|
|
240
|
+
}
|
|
241
|
+
if (init?.anchor) {
|
|
242
|
+
this.anchor = new LendingOracleSource(init.anchor);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
exports.StellarLendingOracleUpdateStruct = StellarLendingOracleUpdateStruct;
|
|
247
|
+
__decorate([
|
|
248
|
+
(0, swagger_1.ApiProperty)({
|
|
249
|
+
type: String,
|
|
250
|
+
description: 'Base token identifier',
|
|
251
|
+
}),
|
|
252
|
+
__metadata("design:type", String)
|
|
253
|
+
], StellarLendingOracleUpdateStruct.prototype, "baseTokenId", void 0);
|
|
254
|
+
__decorate([
|
|
255
|
+
(0, swagger_1.ApiProperty)({
|
|
256
|
+
type: String,
|
|
257
|
+
description: 'Quote token identifier',
|
|
258
|
+
}),
|
|
259
|
+
__metadata("design:type", String)
|
|
260
|
+
], StellarLendingOracleUpdateStruct.prototype, "quoteTokenId", void 0);
|
|
261
|
+
__decorate([
|
|
262
|
+
(0, swagger_1.ApiProperty)({
|
|
263
|
+
type: OraclePriceFluctuation,
|
|
264
|
+
description: 'Price fluctuation tolerance thresholds',
|
|
265
|
+
}),
|
|
266
|
+
__metadata("design:type", OraclePriceFluctuation)
|
|
267
|
+
], StellarLendingOracleUpdateStruct.prototype, "tolerance", void 0);
|
|
268
|
+
__decorate([
|
|
269
|
+
(0, swagger_1.ApiProperty)({
|
|
270
|
+
type: 'integer',
|
|
271
|
+
description: 'Number of decimals for the asset',
|
|
272
|
+
}),
|
|
273
|
+
__metadata("design:type", Number)
|
|
274
|
+
], StellarLendingOracleUpdateStruct.prototype, "assetDecimals", void 0);
|
|
275
|
+
__decorate([
|
|
276
|
+
(0, swagger_1.ApiProperty)({
|
|
277
|
+
type: 'integer',
|
|
278
|
+
description: 'Maximum seconds before price is considered stale',
|
|
279
|
+
}),
|
|
280
|
+
__metadata("design:type", Number)
|
|
281
|
+
], StellarLendingOracleUpdateStruct.prototype, "maxPriceStaleSeconds", void 0);
|
|
282
|
+
__decorate([
|
|
283
|
+
(0, swagger_1.ApiProperty)({
|
|
284
|
+
enum: lending_enum_1.LendingOracleStrategy,
|
|
285
|
+
enumName: 'LendingOracleStrategy',
|
|
286
|
+
description: 'Oracle composition strategy',
|
|
287
|
+
}),
|
|
288
|
+
__metadata("design:type", String)
|
|
289
|
+
], StellarLendingOracleUpdateStruct.prototype, "strategy", void 0);
|
|
290
|
+
__decorate([
|
|
291
|
+
(0, swagger_1.ApiProperty)({
|
|
292
|
+
type: LendingOracleSource,
|
|
293
|
+
description: 'Primary oracle source',
|
|
294
|
+
}),
|
|
295
|
+
__metadata("design:type", LendingOracleSource)
|
|
296
|
+
], StellarLendingOracleUpdateStruct.prototype, "primary", void 0);
|
|
297
|
+
__decorate([
|
|
298
|
+
(0, swagger_1.ApiProperty)({
|
|
299
|
+
type: LendingOracleSource,
|
|
300
|
+
required: false,
|
|
301
|
+
description: 'Optional anchor oracle source',
|
|
302
|
+
}),
|
|
303
|
+
__metadata("design:type", LendingOracleSource)
|
|
304
|
+
], StellarLendingOracleUpdateStruct.prototype, "anchor", void 0);
|
|
@@ -26,3 +26,20 @@ export declare enum ExchangeSource {
|
|
|
26
26
|
LEGLD = "LEGLD",
|
|
27
27
|
Onedex = "Onedex"
|
|
28
28
|
}
|
|
29
|
+
export declare enum LendingOracleProviderKind {
|
|
30
|
+
ReflectorSep40 = "ReflectorSep40",
|
|
31
|
+
RedStonePriceFeed = "RedStonePriceFeed"
|
|
32
|
+
}
|
|
33
|
+
export declare enum LendingOracleAssetRefKind {
|
|
34
|
+
Stellar = "Stellar",
|
|
35
|
+
Symbol = "Symbol",
|
|
36
|
+
String = "String"
|
|
37
|
+
}
|
|
38
|
+
export declare enum LendingOracleReadMode {
|
|
39
|
+
Spot = "Spot",
|
|
40
|
+
Twap = "Twap"
|
|
41
|
+
}
|
|
42
|
+
export declare enum LendingOracleStrategy {
|
|
43
|
+
Single = "Single",
|
|
44
|
+
PrimaryWithAnchor = "PrimaryWithAnchor"
|
|
45
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExchangeSource = exports.OracleType = exports.PricingMethod = exports.PositionMode = void 0;
|
|
3
|
+
exports.LendingOracleStrategy = exports.LendingOracleReadMode = exports.LendingOracleAssetRefKind = exports.LendingOracleProviderKind = exports.ExchangeSource = exports.OracleType = exports.PricingMethod = exports.PositionMode = void 0;
|
|
4
4
|
var PositionMode;
|
|
5
5
|
(function (PositionMode) {
|
|
6
6
|
PositionMode["None"] = "None";
|
|
@@ -33,3 +33,24 @@ var ExchangeSource;
|
|
|
33
33
|
ExchangeSource["LEGLD"] = "LEGLD";
|
|
34
34
|
ExchangeSource["Onedex"] = "Onedex";
|
|
35
35
|
})(ExchangeSource || (exports.ExchangeSource = ExchangeSource = {}));
|
|
36
|
+
var LendingOracleProviderKind;
|
|
37
|
+
(function (LendingOracleProviderKind) {
|
|
38
|
+
LendingOracleProviderKind["ReflectorSep40"] = "ReflectorSep40";
|
|
39
|
+
LendingOracleProviderKind["RedStonePriceFeed"] = "RedStonePriceFeed";
|
|
40
|
+
})(LendingOracleProviderKind || (exports.LendingOracleProviderKind = LendingOracleProviderKind = {}));
|
|
41
|
+
var LendingOracleAssetRefKind;
|
|
42
|
+
(function (LendingOracleAssetRefKind) {
|
|
43
|
+
LendingOracleAssetRefKind["Stellar"] = "Stellar";
|
|
44
|
+
LendingOracleAssetRefKind["Symbol"] = "Symbol";
|
|
45
|
+
LendingOracleAssetRefKind["String"] = "String";
|
|
46
|
+
})(LendingOracleAssetRefKind || (exports.LendingOracleAssetRefKind = LendingOracleAssetRefKind = {}));
|
|
47
|
+
var LendingOracleReadMode;
|
|
48
|
+
(function (LendingOracleReadMode) {
|
|
49
|
+
LendingOracleReadMode["Spot"] = "Spot";
|
|
50
|
+
LendingOracleReadMode["Twap"] = "Twap";
|
|
51
|
+
})(LendingOracleReadMode || (exports.LendingOracleReadMode = LendingOracleReadMode = {}));
|
|
52
|
+
var LendingOracleStrategy;
|
|
53
|
+
(function (LendingOracleStrategy) {
|
|
54
|
+
LendingOracleStrategy["Single"] = "Single";
|
|
55
|
+
LendingOracleStrategy["PrimaryWithAnchor"] = "PrimaryWithAnchor";
|
|
56
|
+
})(LendingOracleStrategy || (exports.LendingOracleStrategy = LendingOracleStrategy = {}));
|
|
@@ -117,7 +117,7 @@ export declare class StellarAggregatorQuoteRequestDto {
|
|
|
117
117
|
export declare class StellarQuoteSwapHopDto {
|
|
118
118
|
dex: SwapVenue;
|
|
119
119
|
kind: string;
|
|
120
|
-
|
|
120
|
+
address: string;
|
|
121
121
|
feeBps: number;
|
|
122
122
|
from: string;
|
|
123
123
|
tokenInKind: StellarTokenKind;
|
|
@@ -193,4 +193,11 @@ export declare class StellarAggregatorQuoteResponseDto {
|
|
|
193
193
|
transaction?: StellarQuoteTransactionPayloadDto;
|
|
194
194
|
platform: StellarQuotePlatform;
|
|
195
195
|
alternatives?: StellarQuoteAlternativeDto[];
|
|
196
|
+
feeBps?: number;
|
|
197
|
+
feeAmount?: string;
|
|
198
|
+
feeAmountShort?: number;
|
|
199
|
+
feeOnInput?: boolean;
|
|
200
|
+
amountInUsd?: number;
|
|
201
|
+
amountOutUsd?: number;
|
|
202
|
+
amountOutMinUsd?: number;
|
|
196
203
|
}
|
|
@@ -382,11 +382,11 @@ __decorate([
|
|
|
382
382
|
], StellarQuoteSwapHopDto.prototype, "kind", void 0);
|
|
383
383
|
__decorate([
|
|
384
384
|
(0, swagger_1.ApiProperty)({
|
|
385
|
-
description: 'Canonical pool identifier. C-strkey for Soroban pools, L-strkey for native AMM pools.',
|
|
385
|
+
description: 'Canonical pool identifier. C-strkey for Soroban pools, L-strkey for native AMM pools. Field name `address` mirrors MVX QuoteSwapResponse exactly so chain-agnostic clients can iterate hops without branching on chain.',
|
|
386
386
|
}),
|
|
387
387
|
(0, class_validator_1.IsString)(),
|
|
388
388
|
__metadata("design:type", String)
|
|
389
|
-
], StellarQuoteSwapHopDto.prototype, "
|
|
389
|
+
], StellarQuoteSwapHopDto.prototype, "address", void 0);
|
|
390
390
|
__decorate([
|
|
391
391
|
(0, swagger_1.ApiProperty)({ description: 'Pool fee in basis points.', example: 30 }),
|
|
392
392
|
(0, class_validator_1.IsInt)(),
|
|
@@ -718,3 +718,68 @@ __decorate([
|
|
|
718
718
|
(0, class_transformer_1.Type)(() => StellarQuoteAlternativeDto),
|
|
719
719
|
__metadata("design:type", Array)
|
|
720
720
|
], StellarAggregatorQuoteResponseDto.prototype, "alternatives", void 0);
|
|
721
|
+
__decorate([
|
|
722
|
+
(0, swagger_1.ApiProperty)({
|
|
723
|
+
description: 'Combined static + referral fee in basis points (1 bps = 0.01%) the router will charge for this swap. Absent when `referralId == 0` (no fee — matches rs-aggregator MVX semantics).',
|
|
724
|
+
required: false,
|
|
725
|
+
example: 30,
|
|
726
|
+
}),
|
|
727
|
+
(0, class_validator_1.IsOptional)(),
|
|
728
|
+
(0, class_validator_1.IsInt)(),
|
|
729
|
+
(0, class_validator_1.Min)(0),
|
|
730
|
+
__metadata("design:type", Number)
|
|
731
|
+
], StellarAggregatorQuoteResponseDto.prototype, "feeBps", void 0);
|
|
732
|
+
__decorate([
|
|
733
|
+
(0, swagger_1.ApiProperty)({
|
|
734
|
+
description: 'Fee amount the router will deduct (i128 string). Charged on the input token when `feeOnInput=true`, otherwise on the output token. The `amountOut` / `amountOutMin` fields already reflect this deduction.',
|
|
735
|
+
required: false,
|
|
736
|
+
}),
|
|
737
|
+
(0, class_validator_1.IsOptional)(),
|
|
738
|
+
(0, class_validator_1.IsString)(),
|
|
739
|
+
__metadata("design:type", String)
|
|
740
|
+
], StellarAggregatorQuoteResponseDto.prototype, "feeAmount", void 0);
|
|
741
|
+
__decorate([
|
|
742
|
+
(0, swagger_1.ApiProperty)({
|
|
743
|
+
description: 'Display value of `feeAmount` (decimals applied; loses precision above 2^53).',
|
|
744
|
+
required: false,
|
|
745
|
+
}),
|
|
746
|
+
(0, class_validator_1.IsOptional)(),
|
|
747
|
+
(0, class_validator_1.IsNumber)(),
|
|
748
|
+
__metadata("design:type", Number)
|
|
749
|
+
], StellarAggregatorQuoteResponseDto.prototype, "feeAmountShort", void 0);
|
|
750
|
+
__decorate([
|
|
751
|
+
(0, swagger_1.ApiProperty)({
|
|
752
|
+
description: '`true` if the fee is charged on the input token, `false` if charged on the output. Mirrors the contract\'s `fee_on_input = !out_whitelisted || in_whitelisted` rule.',
|
|
753
|
+
required: false,
|
|
754
|
+
}),
|
|
755
|
+
(0, class_validator_1.IsOptional)(),
|
|
756
|
+
(0, class_validator_1.IsBoolean)(),
|
|
757
|
+
__metadata("design:type", Boolean)
|
|
758
|
+
], StellarAggregatorQuoteResponseDto.prototype, "feeOnInput", void 0);
|
|
759
|
+
__decorate([
|
|
760
|
+
(0, swagger_1.ApiProperty)({
|
|
761
|
+
description: 'USD value of `amountIn`. Absent when the input token has no Reflector oracle price on the active network.',
|
|
762
|
+
required: false,
|
|
763
|
+
}),
|
|
764
|
+
(0, class_validator_1.IsOptional)(),
|
|
765
|
+
(0, class_validator_1.IsNumber)(),
|
|
766
|
+
__metadata("design:type", Number)
|
|
767
|
+
], StellarAggregatorQuoteResponseDto.prototype, "amountInUsd", void 0);
|
|
768
|
+
__decorate([
|
|
769
|
+
(0, swagger_1.ApiProperty)({
|
|
770
|
+
description: 'USD value of `amountOut`.',
|
|
771
|
+
required: false,
|
|
772
|
+
}),
|
|
773
|
+
(0, class_validator_1.IsOptional)(),
|
|
774
|
+
(0, class_validator_1.IsNumber)(),
|
|
775
|
+
__metadata("design:type", Number)
|
|
776
|
+
], StellarAggregatorQuoteResponseDto.prototype, "amountOutUsd", void 0);
|
|
777
|
+
__decorate([
|
|
778
|
+
(0, swagger_1.ApiProperty)({
|
|
779
|
+
description: 'USD value of `amountOutMin` (only set when `slippage` was requested and the output token has a price).',
|
|
780
|
+
required: false,
|
|
781
|
+
}),
|
|
782
|
+
(0, class_validator_1.IsOptional)(),
|
|
783
|
+
(0, class_validator_1.IsNumber)(),
|
|
784
|
+
__metadata("design:type", Number)
|
|
785
|
+
], StellarAggregatorQuoteResponseDto.prototype, "amountOutMinUsd", void 0);
|