@xoxno/types 1.0.472 → 1.0.474
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-oracle.d.ts +12 -11
- package/dist/cosmos-db/documents/lending/lending-oracle.js +19 -62
- package/dist/enums/lending-governance.enum.d.ts +26 -29
- package/dist/enums/lending-governance.enum.js +25 -28
- package/dist/enums/stellar-lending-topic.enum.d.ts +30 -12
- package/dist/enums/stellar-lending-topic.enum.js +30 -12
- package/dist/requests/lending/stellar-lending-admin-args.dto.d.ts +28 -0
- package/dist/requests/lending/stellar-lending-admin-args.dto.js +91 -1
- package/dist/requests/lending/stellar-lending-events.dto.d.ts +37 -1
- package/dist/requests/lending/stellar-lending-events.dto.js +74 -11
- package/dist/stellar-lending/documents/asset.doc.d.ts +6 -2
- package/dist/stellar-lending/documents/asset.doc.js +4 -0
- package/dist/stellar-lending/documents/spoke-asset.doc.d.ts +2 -2
- package/dist/stellar-lending/documents/spoke-asset.doc.js +2 -1
- package/dist/stellar-lending/enums/governance.enum.d.ts +28 -23
- package/dist/stellar-lending/enums/governance.enum.js +27 -22
- package/dist/stellar-lending/live-state.d.ts +21 -1
- package/dist/stellar-lending/oracle-provider.d.ts +102 -33
- package/dist/stellar-lending/oracle-provider.js +8 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExchangeSource, LendingOracleAssetRefKind, LendingOracleProviderKind, LendingOracleReadMode,
|
|
1
|
+
import { ExchangeSource, LendingOracleAssetRefKind, LendingOracleProviderKind, LendingOracleReadMode, OracleType, PricingMethod } from '../../../enums/lending.enum';
|
|
2
2
|
export declare class OraclePriceFluctuation {
|
|
3
3
|
upperRatio: number;
|
|
4
4
|
lowerRatio: number;
|
|
@@ -34,19 +34,20 @@ export declare class LendingOracleUpdateStruct {
|
|
|
34
34
|
maxPriceStaleSeconds: number;
|
|
35
35
|
constructor(init?: Partial<LendingOracleUpdateStruct>);
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* API / swagger projection of on-chain `AssetOracle` for Stellar
|
|
39
|
+
* `config:asset_oracle`. Sources are opaque JSON objects matching
|
|
40
|
+
* {@link import('../../../stellar-lending/oracle-provider').StellarPriceSource}
|
|
41
|
+
* so swagger stays stable without nesting every provider variant.
|
|
42
|
+
*/
|
|
37
43
|
export declare class StellarLendingOracleUpdateStruct {
|
|
38
|
-
baseTokenId: string;
|
|
39
|
-
quoteTokenId: string;
|
|
40
|
-
tolerance: OraclePriceFluctuation;
|
|
41
44
|
assetDecimals: number;
|
|
42
45
|
maxPriceStaleSeconds: number;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
minSanityPriceWad?: string;
|
|
49
|
-
maxSanityPriceWad?: string;
|
|
46
|
+
sources: Record<string, unknown>[];
|
|
47
|
+
tolerance: OraclePriceFluctuation;
|
|
48
|
+
independence: string | Record<string, unknown>;
|
|
49
|
+
minSanityPriceWad: string;
|
|
50
|
+
maxSanityPriceWad: string;
|
|
50
51
|
constructor(init?: Partial<StellarLendingOracleUpdateStruct>);
|
|
51
52
|
}
|
|
52
53
|
export type LendingOracleProvider = LendingOracleUpdateStruct | StellarLendingOracleUpdateStruct;
|
|
@@ -215,101 +215,59 @@ __decorate([
|
|
|
215
215
|
}),
|
|
216
216
|
__metadata("design:type", Number)
|
|
217
217
|
], LendingOracleUpdateStruct.prototype, "maxPriceStaleSeconds", void 0);
|
|
218
|
+
/**
|
|
219
|
+
* API / swagger projection of on-chain `AssetOracle` for Stellar
|
|
220
|
+
* `config:asset_oracle`. Sources are opaque JSON objects matching
|
|
221
|
+
* {@link import('../../../stellar-lending/oracle-provider').StellarPriceSource}
|
|
222
|
+
* so swagger stays stable without nesting every provider variant.
|
|
223
|
+
*/
|
|
218
224
|
class StellarLendingOracleUpdateStruct {
|
|
219
225
|
constructor(init) {
|
|
220
226
|
Object.assign(this, init);
|
|
221
227
|
if (init?.tolerance) {
|
|
222
228
|
this.tolerance = new OraclePriceFluctuation(init.tolerance);
|
|
223
229
|
}
|
|
224
|
-
if (init?.primary) {
|
|
225
|
-
this.primary = new LendingOracleSource(init.primary);
|
|
226
|
-
}
|
|
227
|
-
if (init?.anchor) {
|
|
228
|
-
this.anchor = new LendingOracleSource(init.anchor);
|
|
229
|
-
}
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
exports.StellarLendingOracleUpdateStruct = StellarLendingOracleUpdateStruct;
|
|
233
|
-
__decorate([
|
|
234
|
-
(0, swagger_1.ApiProperty)({
|
|
235
|
-
type: String,
|
|
236
|
-
description: 'Base token identifier',
|
|
237
|
-
}),
|
|
238
|
-
__metadata("design:type", String)
|
|
239
|
-
], StellarLendingOracleUpdateStruct.prototype, "baseTokenId", void 0);
|
|
240
|
-
__decorate([
|
|
241
|
-
(0, swagger_1.ApiProperty)({
|
|
242
|
-
type: String,
|
|
243
|
-
description: 'Quote token identifier',
|
|
244
|
-
}),
|
|
245
|
-
__metadata("design:type", String)
|
|
246
|
-
], StellarLendingOracleUpdateStruct.prototype, "quoteTokenId", void 0);
|
|
247
|
-
__decorate([
|
|
248
|
-
(0, swagger_1.ApiProperty)({
|
|
249
|
-
type: OraclePriceFluctuation,
|
|
250
|
-
description: 'Price fluctuation tolerance thresholds',
|
|
251
|
-
}),
|
|
252
|
-
__metadata("design:type", OraclePriceFluctuation)
|
|
253
|
-
], StellarLendingOracleUpdateStruct.prototype, "tolerance", void 0);
|
|
254
233
|
__decorate([
|
|
255
234
|
(0, swagger_1.ApiProperty)({
|
|
256
235
|
type: 'integer',
|
|
257
|
-
description: '
|
|
236
|
+
description: 'Token decimals (0 for PriceKey::Ref). Matches on-chain asset_decimals.',
|
|
258
237
|
}),
|
|
259
238
|
__metadata("design:type", Number)
|
|
260
239
|
], StellarLendingOracleUpdateStruct.prototype, "assetDecimals", void 0);
|
|
261
240
|
__decorate([
|
|
262
241
|
(0, swagger_1.ApiProperty)({
|
|
263
242
|
type: 'integer',
|
|
264
|
-
description: '
|
|
243
|
+
description: 'Asset-level staleness ceiling in seconds',
|
|
265
244
|
}),
|
|
266
245
|
__metadata("design:type", Number)
|
|
267
246
|
], StellarLendingOracleUpdateStruct.prototype, "maxPriceStaleSeconds", void 0);
|
|
268
247
|
__decorate([
|
|
269
248
|
(0, swagger_1.ApiProperty)({
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
description: '
|
|
273
|
-
}),
|
|
274
|
-
__metadata("design:type", String)
|
|
275
|
-
], StellarLendingOracleUpdateStruct.prototype, "strategy", void 0);
|
|
276
|
-
__decorate([
|
|
277
|
-
(0, swagger_1.ApiProperty)({
|
|
278
|
-
type: LendingOracleSource,
|
|
279
|
-
description: 'Primary oracle source',
|
|
280
|
-
}),
|
|
281
|
-
__metadata("design:type", LendingOracleSource)
|
|
282
|
-
], StellarLendingOracleUpdateStruct.prototype, "primary", void 0);
|
|
283
|
-
__decorate([
|
|
284
|
-
(0, swagger_1.ApiProperty)({
|
|
285
|
-
type: LendingOracleSource,
|
|
286
|
-
required: false,
|
|
287
|
-
description: 'Optional anchor oracle source',
|
|
249
|
+
type: 'array',
|
|
250
|
+
items: { type: 'object', additionalProperties: true },
|
|
251
|
+
description: 'One or two PriceSource variants (Feed / Scaled / LpShare) as decoded from chain',
|
|
288
252
|
}),
|
|
289
|
-
__metadata("design:type",
|
|
290
|
-
], StellarLendingOracleUpdateStruct.prototype, "
|
|
253
|
+
__metadata("design:type", Array)
|
|
254
|
+
], StellarLendingOracleUpdateStruct.prototype, "sources", void 0);
|
|
291
255
|
__decorate([
|
|
292
256
|
(0, swagger_1.ApiProperty)({
|
|
293
|
-
type:
|
|
294
|
-
|
|
295
|
-
required: false,
|
|
296
|
-
description: 'Quote currency of the primary oracle feed. null = USD-quoted (common case) or RedStone source; non-null = Stellar quote token (e.g. USDC SAC) repriced to USD on-chain',
|
|
257
|
+
type: OraclePriceFluctuation,
|
|
258
|
+
description: 'Dual-source agreement band (BPS); ignored for single source',
|
|
297
259
|
}),
|
|
298
|
-
__metadata("design:type",
|
|
299
|
-
], StellarLendingOracleUpdateStruct.prototype, "
|
|
260
|
+
__metadata("design:type", OraclePriceFluctuation)
|
|
261
|
+
], StellarLendingOracleUpdateStruct.prototype, "tolerance", void 0);
|
|
300
262
|
__decorate([
|
|
301
263
|
(0, swagger_1.ApiProperty)({
|
|
302
|
-
|
|
303
|
-
nullable: true,
|
|
304
|
-
required: false,
|
|
305
|
-
description: 'Quote currency of the anchor oracle feed. null = no anchor, USD-quoted, or RedStone source; non-null = Stellar quote token (e.g. USDC SAC) repriced to USD on-chain',
|
|
264
|
+
description: 'Independence policy: string "RequireDisjoint" or object AllowShared domains',
|
|
306
265
|
}),
|
|
307
266
|
__metadata("design:type", Object)
|
|
308
|
-
], StellarLendingOracleUpdateStruct.prototype, "
|
|
267
|
+
], StellarLendingOracleUpdateStruct.prototype, "independence", void 0);
|
|
309
268
|
__decorate([
|
|
310
269
|
(0, swagger_1.ApiProperty)({
|
|
311
270
|
type: String,
|
|
312
|
-
required: false,
|
|
313
271
|
description: 'Inclusive lower sanity bound, USD WAD decimal string',
|
|
314
272
|
}),
|
|
315
273
|
__metadata("design:type", String)
|
|
@@ -317,7 +275,6 @@ __decorate([
|
|
|
317
275
|
__decorate([
|
|
318
276
|
(0, swagger_1.ApiProperty)({
|
|
319
277
|
type: String,
|
|
320
|
-
required: false,
|
|
321
278
|
description: 'Inclusive upper sanity bound, USD WAD decimal string',
|
|
322
279
|
}),
|
|
323
280
|
__metadata("design:type", String)
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Stellar lending governance (timelock) proposal taxonomy.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* symbol to one of these so the dashboard can title and group proposals.
|
|
4
|
+
* Mirrors live `AdminOperation` variants. Shared with MVX-era names kept only
|
|
5
|
+
* as deprecated aliases where the old string matched a renamed variant.
|
|
7
6
|
*/
|
|
8
7
|
export declare enum GovernanceProposalKind {
|
|
9
|
-
|
|
8
|
+
SetSwapAggregator = "SetSwapAggregator",
|
|
9
|
+
SetPriceAggregator = "SetPriceAggregator",
|
|
10
10
|
SetAccumulator = "SetAccumulator",
|
|
11
|
-
SetPoolTemplate = "SetPoolTemplate",
|
|
12
11
|
SetPositionLimits = "SetPositionLimits",
|
|
13
|
-
|
|
12
|
+
SetMinBorrowCollateralUsd = "SetMinBorrowCollateralUsd",
|
|
14
13
|
SetPositionManager = "SetPositionManager",
|
|
15
14
|
CreateHub = "CreateHub",
|
|
16
15
|
AddSpoke = "AddSpoke",
|
|
@@ -19,8 +18,6 @@ export declare enum GovernanceProposalKind {
|
|
|
19
18
|
EditAssetInSpoke = "EditAssetInSpoke",
|
|
20
19
|
RemoveAssetFromSpoke = "RemoveAssetFromSpoke",
|
|
21
20
|
SetSpokeLiquidationCurve = "SetSpokeLiquidationCurve",
|
|
22
|
-
ApproveToken = "ApproveToken",
|
|
23
|
-
RevokeToken = "RevokeToken",
|
|
24
21
|
ApproveBlendPool = "ApproveBlendPool",
|
|
25
22
|
RevokeBlendPool = "RevokeBlendPool",
|
|
26
23
|
CreateLiquidityPool = "CreateLiquidityPool",
|
|
@@ -29,36 +26,36 @@ export declare enum GovernanceProposalKind {
|
|
|
29
26
|
UpgradePool = "UpgradePool",
|
|
30
27
|
UpgradeController = "UpgradeController",
|
|
31
28
|
MigrateController = "MigrateController",
|
|
32
|
-
|
|
33
|
-
ConfigureMarketOracle = "ConfigureMarketOracle",
|
|
29
|
+
TransferCtrlOwnership = "TransferCtrlOwnership",
|
|
34
30
|
EditOracleTolerance = "EditOracleTolerance",
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
*/
|
|
31
|
+
ForceSocializeBadDebt = "ForceSocializeBadDebt",
|
|
32
|
+
Unpause = "Unpause",
|
|
33
|
+
UpgradeGov = "UpgradeGov",
|
|
34
|
+
UpdateGovDelay = "UpdateGovDelay",
|
|
35
|
+
GrantGovRole = "GrantGovRole",
|
|
36
|
+
RevokeGovRole = "RevokeGovRole",
|
|
37
|
+
TransferGovOwnership = "TransferGovOwnership",
|
|
38
|
+
ConfigureAssetOracle = "ConfigureAssetOracle",
|
|
44
39
|
CancellerReset = "CancellerReset",
|
|
40
|
+
/** @deprecated Use `SetSwapAggregator`. */
|
|
41
|
+
SetAggregator = "SetSwapAggregator",
|
|
42
|
+
/** @deprecated Use `ConfigureAssetOracle`. */
|
|
43
|
+
ConfigureMarketOracle = "ConfigureAssetOracle",
|
|
44
|
+
/** @deprecated Use `ApproveBlendPool`. */
|
|
45
|
+
ApproveToken = "ApproveBlendPool",
|
|
46
|
+
/** @deprecated Removed from live AdminOperation. */
|
|
47
|
+
SetPoolTemplate = "SetPoolTemplate",
|
|
48
|
+
/** @deprecated Removed from live AdminOperation. */
|
|
49
|
+
RevokeToken = "RevokeToken",
|
|
45
50
|
Unknown = "Unknown"
|
|
46
51
|
}
|
|
47
|
-
/**
|
|
48
|
-
* Coarse, event-derived proposal status. `Waiting`/`Ready`/`Expired` are NOT
|
|
49
|
-
* stored on-chain — clients derive them from `readyLedger`, `expiresLedger`,
|
|
50
|
-
* and the current ledger.
|
|
51
|
-
*/
|
|
52
52
|
export declare enum GovernanceProposalStatus {
|
|
53
53
|
Pending = "Pending",
|
|
54
54
|
Executed = "Executed",
|
|
55
55
|
Cancelled = "Cancelled"
|
|
56
56
|
}
|
|
57
|
-
/**
|
|
58
|
-
* Whether executing the proposal invokes the lending controller (generic
|
|
59
|
-
* `execute`) or the governance contract itself (`execute_self`).
|
|
60
|
-
*/
|
|
61
57
|
export declare enum GovernanceProposalTarget {
|
|
62
58
|
Controller = "Controller",
|
|
63
|
-
Governance = "Governance"
|
|
59
|
+
Governance = "Governance",
|
|
60
|
+
PriceAggregator = "PriceAggregator"
|
|
64
61
|
}
|
|
@@ -4,17 +4,16 @@ exports.GovernanceProposalTarget = exports.GovernanceProposalStatus = exports.Go
|
|
|
4
4
|
/**
|
|
5
5
|
* Stellar lending governance (timelock) proposal taxonomy.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* symbol to one of these so the dashboard can title and group proposals.
|
|
7
|
+
* Mirrors live `AdminOperation` variants. Shared with MVX-era names kept only
|
|
8
|
+
* as deprecated aliases where the old string matched a renamed variant.
|
|
10
9
|
*/
|
|
11
10
|
var GovernanceProposalKind;
|
|
12
11
|
(function (GovernanceProposalKind) {
|
|
13
|
-
GovernanceProposalKind["
|
|
12
|
+
GovernanceProposalKind["SetSwapAggregator"] = "SetSwapAggregator";
|
|
13
|
+
GovernanceProposalKind["SetPriceAggregator"] = "SetPriceAggregator";
|
|
14
14
|
GovernanceProposalKind["SetAccumulator"] = "SetAccumulator";
|
|
15
|
-
GovernanceProposalKind["SetPoolTemplate"] = "SetPoolTemplate";
|
|
16
15
|
GovernanceProposalKind["SetPositionLimits"] = "SetPositionLimits";
|
|
17
|
-
GovernanceProposalKind["
|
|
16
|
+
GovernanceProposalKind["SetMinBorrowCollateralUsd"] = "SetMinBorrowCollateralUsd";
|
|
18
17
|
GovernanceProposalKind["SetPositionManager"] = "SetPositionManager";
|
|
19
18
|
GovernanceProposalKind["CreateHub"] = "CreateHub";
|
|
20
19
|
GovernanceProposalKind["AddSpoke"] = "AddSpoke";
|
|
@@ -23,8 +22,6 @@ var GovernanceProposalKind;
|
|
|
23
22
|
GovernanceProposalKind["EditAssetInSpoke"] = "EditAssetInSpoke";
|
|
24
23
|
GovernanceProposalKind["RemoveAssetFromSpoke"] = "RemoveAssetFromSpoke";
|
|
25
24
|
GovernanceProposalKind["SetSpokeLiquidationCurve"] = "SetSpokeLiquidationCurve";
|
|
26
|
-
GovernanceProposalKind["ApproveToken"] = "ApproveToken";
|
|
27
|
-
GovernanceProposalKind["RevokeToken"] = "RevokeToken";
|
|
28
25
|
GovernanceProposalKind["ApproveBlendPool"] = "ApproveBlendPool";
|
|
29
26
|
GovernanceProposalKind["RevokeBlendPool"] = "RevokeBlendPool";
|
|
30
27
|
GovernanceProposalKind["CreateLiquidityPool"] = "CreateLiquidityPool";
|
|
@@ -33,38 +30,38 @@ var GovernanceProposalKind;
|
|
|
33
30
|
GovernanceProposalKind["UpgradePool"] = "UpgradePool";
|
|
34
31
|
GovernanceProposalKind["UpgradeController"] = "UpgradeController";
|
|
35
32
|
GovernanceProposalKind["MigrateController"] = "MigrateController";
|
|
36
|
-
GovernanceProposalKind["
|
|
37
|
-
GovernanceProposalKind["ConfigureMarketOracle"] = "ConfigureMarketOracle";
|
|
33
|
+
GovernanceProposalKind["TransferCtrlOwnership"] = "TransferCtrlOwnership";
|
|
38
34
|
GovernanceProposalKind["EditOracleTolerance"] = "EditOracleTolerance";
|
|
39
|
-
GovernanceProposalKind["
|
|
40
|
-
GovernanceProposalKind["
|
|
41
|
-
GovernanceProposalKind["
|
|
42
|
-
GovernanceProposalKind["
|
|
43
|
-
GovernanceProposalKind["
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
*/
|
|
35
|
+
GovernanceProposalKind["ForceSocializeBadDebt"] = "ForceSocializeBadDebt";
|
|
36
|
+
GovernanceProposalKind["Unpause"] = "Unpause";
|
|
37
|
+
GovernanceProposalKind["UpgradeGov"] = "UpgradeGov";
|
|
38
|
+
GovernanceProposalKind["UpdateGovDelay"] = "UpdateGovDelay";
|
|
39
|
+
GovernanceProposalKind["GrantGovRole"] = "GrantGovRole";
|
|
40
|
+
GovernanceProposalKind["RevokeGovRole"] = "RevokeGovRole";
|
|
41
|
+
GovernanceProposalKind["TransferGovOwnership"] = "TransferGovOwnership";
|
|
42
|
+
GovernanceProposalKind["ConfigureAssetOracle"] = "ConfigureAssetOracle";
|
|
48
43
|
GovernanceProposalKind["CancellerReset"] = "CancellerReset";
|
|
44
|
+
/** @deprecated Use `SetSwapAggregator`. */
|
|
45
|
+
GovernanceProposalKind["SetAggregator"] = "SetSwapAggregator";
|
|
46
|
+
/** @deprecated Use `ConfigureAssetOracle`. */
|
|
47
|
+
GovernanceProposalKind["ConfigureMarketOracle"] = "ConfigureAssetOracle";
|
|
48
|
+
/** @deprecated Use `ApproveBlendPool`. */
|
|
49
|
+
GovernanceProposalKind["ApproveToken"] = "ApproveBlendPool";
|
|
50
|
+
/** @deprecated Removed from live AdminOperation. */
|
|
51
|
+
GovernanceProposalKind["SetPoolTemplate"] = "SetPoolTemplate";
|
|
52
|
+
/** @deprecated Removed from live AdminOperation. */
|
|
53
|
+
GovernanceProposalKind["RevokeToken"] = "RevokeToken";
|
|
49
54
|
GovernanceProposalKind["Unknown"] = "Unknown";
|
|
50
55
|
})(GovernanceProposalKind || (exports.GovernanceProposalKind = GovernanceProposalKind = {}));
|
|
51
|
-
/**
|
|
52
|
-
* Coarse, event-derived proposal status. `Waiting`/`Ready`/`Expired` are NOT
|
|
53
|
-
* stored on-chain — clients derive them from `readyLedger`, `expiresLedger`,
|
|
54
|
-
* and the current ledger.
|
|
55
|
-
*/
|
|
56
56
|
var GovernanceProposalStatus;
|
|
57
57
|
(function (GovernanceProposalStatus) {
|
|
58
58
|
GovernanceProposalStatus["Pending"] = "Pending";
|
|
59
59
|
GovernanceProposalStatus["Executed"] = "Executed";
|
|
60
60
|
GovernanceProposalStatus["Cancelled"] = "Cancelled";
|
|
61
61
|
})(GovernanceProposalStatus || (exports.GovernanceProposalStatus = GovernanceProposalStatus = {}));
|
|
62
|
-
/**
|
|
63
|
-
* Whether executing the proposal invokes the lending controller (generic
|
|
64
|
-
* `execute`) or the governance contract itself (`execute_self`).
|
|
65
|
-
*/
|
|
66
62
|
var GovernanceProposalTarget;
|
|
67
63
|
(function (GovernanceProposalTarget) {
|
|
68
64
|
GovernanceProposalTarget["Controller"] = "Controller";
|
|
69
65
|
GovernanceProposalTarget["Governance"] = "Governance";
|
|
66
|
+
GovernanceProposalTarget["PriceAggregator"] = "PriceAggregator";
|
|
70
67
|
})(GovernanceProposalTarget || (exports.GovernanceProposalTarget = GovernanceProposalTarget = {}));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Soroban event dispatch keys for
|
|
3
|
-
*
|
|
2
|
+
* Soroban event dispatch keys for XOXNO Stellar lending contracts
|
|
3
|
+
* (`"<domain>:<action>"`).
|
|
4
4
|
*
|
|
5
|
-
* Keep in parity with az-functions `StellarV2DispatchKey`
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Keep in parity with az-functions `StellarV2DispatchKey` and live
|
|
6
|
+
* `#[contractevent]` topics on pool, controller, and price-aggregator.
|
|
7
|
+
* Legacy topics retained for historical ledger replay are marked deprecated.
|
|
8
8
|
*/
|
|
9
9
|
export declare enum StellarLendingTopic {
|
|
10
10
|
MarketCreate = "market:create",
|
|
@@ -15,7 +15,19 @@ export declare enum StellarLendingTopic {
|
|
|
15
15
|
PositionFlashLoan = "position:flash_loan",
|
|
16
16
|
PositionLiquidation = "position:liquidation",
|
|
17
17
|
ConfigHub = "config:hub",
|
|
18
|
+
/**
|
|
19
|
+
* Live price-aggregator write topic (`set_oracle` / `set_sanity_band` /
|
|
20
|
+
* `set_tolerance`). Payload `{ key: PriceKey, oracle: AssetOracle }`.
|
|
21
|
+
*/
|
|
22
|
+
ConfigAssetOracle = "config:asset_oracle",
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Pre-composable aggregator topic. Keep for historical ledger
|
|
25
|
+
* replay only; live chain emits `config:asset_oracle`.
|
|
26
|
+
*/
|
|
18
27
|
ConfigOracle = "config:oracle",
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Never emitted by the composable aggregator. Historical only.
|
|
30
|
+
*/
|
|
19
31
|
ConfigOracleDisabled = "config:oracle_disabled",
|
|
20
32
|
ConfigSpoke = "config:spoke",
|
|
21
33
|
ConfigSpokeAsset = "config:spoke_asset",
|
|
@@ -24,18 +36,24 @@ export declare enum StellarLendingTopic {
|
|
|
24
36
|
StrategyInitialPayment = "strategy:initial_payment",
|
|
25
37
|
StrategyFee = "strategy:fee",
|
|
26
38
|
StrategyBlendMigration = "strategy:blend_migration",
|
|
27
|
-
/**
|
|
39
|
+
/** Live controller: blend pool approve/revoke. */
|
|
40
|
+
ConfigApproveBlendPool = "config:approve_blend_pool",
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated Replaced by `config:approve_blend_pool`. Historical only.
|
|
43
|
+
*/
|
|
28
44
|
ConfigApproveToken = "config:approve_token",
|
|
29
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Replaced by `config:swap_aggregator` /
|
|
47
|
+
* `config:price_aggregator`. Historical only.
|
|
48
|
+
*/
|
|
30
49
|
ConfigAggregator = "config:aggregator",
|
|
31
|
-
/** Known topic; currently skipped by the indexer. */
|
|
32
50
|
ConfigAccumulator = "config:accumulator",
|
|
33
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated No longer emitted by the controller. Historical only.
|
|
53
|
+
*/
|
|
34
54
|
ConfigPoolTemplate = "config:pool_template",
|
|
35
|
-
/** Known topic; currently skipped by the indexer. */
|
|
36
55
|
ConfigPositionLimits = "config:position_limits",
|
|
37
|
-
|
|
56
|
+
ConfigMinBorrowCollateral = "config:min_borrow_collateral",
|
|
38
57
|
ConfigSwapAggregator = "config:swap_aggregator",
|
|
39
|
-
/** Known topic; currently skipped by the indexer. */
|
|
40
58
|
ConfigPriceAggregator = "config:price_aggregator"
|
|
41
59
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StellarLendingTopic = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* Soroban event dispatch keys for
|
|
6
|
-
*
|
|
5
|
+
* Soroban event dispatch keys for XOXNO Stellar lending contracts
|
|
6
|
+
* (`"<domain>:<action>"`).
|
|
7
7
|
*
|
|
8
|
-
* Keep in parity with az-functions `StellarV2DispatchKey`
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Keep in parity with az-functions `StellarV2DispatchKey` and live
|
|
9
|
+
* `#[contractevent]` topics on pool, controller, and price-aggregator.
|
|
10
|
+
* Legacy topics retained for historical ledger replay are marked deprecated.
|
|
11
11
|
*/
|
|
12
12
|
var StellarLendingTopic;
|
|
13
13
|
(function (StellarLendingTopic) {
|
|
@@ -19,7 +19,19 @@ var StellarLendingTopic;
|
|
|
19
19
|
StellarLendingTopic["PositionFlashLoan"] = "position:flash_loan";
|
|
20
20
|
StellarLendingTopic["PositionLiquidation"] = "position:liquidation";
|
|
21
21
|
StellarLendingTopic["ConfigHub"] = "config:hub";
|
|
22
|
+
/**
|
|
23
|
+
* Live price-aggregator write topic (`set_oracle` / `set_sanity_band` /
|
|
24
|
+
* `set_tolerance`). Payload `{ key: PriceKey, oracle: AssetOracle }`.
|
|
25
|
+
*/
|
|
26
|
+
StellarLendingTopic["ConfigAssetOracle"] = "config:asset_oracle";
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Pre-composable aggregator topic. Keep for historical ledger
|
|
29
|
+
* replay only; live chain emits `config:asset_oracle`.
|
|
30
|
+
*/
|
|
22
31
|
StellarLendingTopic["ConfigOracle"] = "config:oracle";
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Never emitted by the composable aggregator. Historical only.
|
|
34
|
+
*/
|
|
23
35
|
StellarLendingTopic["ConfigOracleDisabled"] = "config:oracle_disabled";
|
|
24
36
|
StellarLendingTopic["ConfigSpoke"] = "config:spoke";
|
|
25
37
|
StellarLendingTopic["ConfigSpokeAsset"] = "config:spoke_asset";
|
|
@@ -28,18 +40,24 @@ var StellarLendingTopic;
|
|
|
28
40
|
StellarLendingTopic["StrategyInitialPayment"] = "strategy:initial_payment";
|
|
29
41
|
StellarLendingTopic["StrategyFee"] = "strategy:fee";
|
|
30
42
|
StellarLendingTopic["StrategyBlendMigration"] = "strategy:blend_migration";
|
|
31
|
-
/**
|
|
43
|
+
/** Live controller: blend pool approve/revoke. */
|
|
44
|
+
StellarLendingTopic["ConfigApproveBlendPool"] = "config:approve_blend_pool";
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Replaced by `config:approve_blend_pool`. Historical only.
|
|
47
|
+
*/
|
|
32
48
|
StellarLendingTopic["ConfigApproveToken"] = "config:approve_token";
|
|
33
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated Replaced by `config:swap_aggregator` /
|
|
51
|
+
* `config:price_aggregator`. Historical only.
|
|
52
|
+
*/
|
|
34
53
|
StellarLendingTopic["ConfigAggregator"] = "config:aggregator";
|
|
35
|
-
/** Known topic; currently skipped by the indexer. */
|
|
36
54
|
StellarLendingTopic["ConfigAccumulator"] = "config:accumulator";
|
|
37
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated No longer emitted by the controller. Historical only.
|
|
57
|
+
*/
|
|
38
58
|
StellarLendingTopic["ConfigPoolTemplate"] = "config:pool_template";
|
|
39
|
-
/** Known topic; currently skipped by the indexer. */
|
|
40
59
|
StellarLendingTopic["ConfigPositionLimits"] = "config:position_limits";
|
|
41
|
-
|
|
60
|
+
StellarLendingTopic["ConfigMinBorrowCollateral"] = "config:min_borrow_collateral";
|
|
42
61
|
StellarLendingTopic["ConfigSwapAggregator"] = "config:swap_aggregator";
|
|
43
|
-
/** Known topic; currently skipped by the indexer. */
|
|
44
62
|
StellarLendingTopic["ConfigPriceAggregator"] = "config:price_aggregator";
|
|
45
63
|
})(StellarLendingTopic || (exports.StellarLendingTopic = StellarLendingTopic = {}));
|
|
@@ -55,6 +55,10 @@ export declare class OracleSourceConfigInputDto {
|
|
|
55
55
|
twapRecords?: number;
|
|
56
56
|
maxStaleSeconds?: number;
|
|
57
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated v1 primary/anchor config. Prefer {@link AssetOracleConfigInputDto}
|
|
60
|
+
* for the composable price-aggregator.
|
|
61
|
+
*/
|
|
58
62
|
export declare class MarketOracleConfigInputDto {
|
|
59
63
|
maxPriceStaleSeconds: number;
|
|
60
64
|
toleranceBps: number;
|
|
@@ -64,3 +68,27 @@ export declare class MarketOracleConfigInputDto {
|
|
|
64
68
|
minSanityPriceWad: string;
|
|
65
69
|
maxSanityPriceWad: string;
|
|
66
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Composable on-chain `AssetOracle` input for governance
|
|
73
|
+
* `ConfigureAssetOracle` / price-aggregator `set_oracle`.
|
|
74
|
+
* `sources` mirror PriceSource tagged unions as JSON objects.
|
|
75
|
+
*/
|
|
76
|
+
export declare class AssetOracleConfigInputDto {
|
|
77
|
+
assetDecimals: number;
|
|
78
|
+
maxPriceStaleSeconds: number;
|
|
79
|
+
sources: Record<string, unknown>[];
|
|
80
|
+
toleranceBps: number;
|
|
81
|
+
independence: string | Record<string, unknown>;
|
|
82
|
+
minSanityPriceWad: string;
|
|
83
|
+
maxSanityPriceWad: string;
|
|
84
|
+
}
|
|
85
|
+
/** `ConfigureAssetOracleArgs` — PriceKey + AssetOracle. */
|
|
86
|
+
export declare class ConfigureAssetOracleArgsDto {
|
|
87
|
+
key: Record<string, string>;
|
|
88
|
+
oracle: AssetOracleConfigInputDto;
|
|
89
|
+
}
|
|
90
|
+
/** `EditToleranceArgs` — PriceKey + tolerance bps. */
|
|
91
|
+
export declare class EditOracleToleranceArgsDto {
|
|
92
|
+
key: Record<string, string>;
|
|
93
|
+
toleranceBps: number;
|
|
94
|
+
}
|
|
@@ -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.MarketOracleConfigInputDto = exports.OracleSourceConfigInputDto = exports.EModeCategoryArgsDto = exports.PositionLimitsDto = exports.AssetConfigRawDto = exports.MarketParamsRawDto = exports.InterestRateModelDto = void 0;
|
|
12
|
+
exports.EditOracleToleranceArgsDto = exports.ConfigureAssetOracleArgsDto = exports.AssetOracleConfigInputDto = exports.MarketOracleConfigInputDto = exports.OracleSourceConfigInputDto = exports.EModeCategoryArgsDto = exports.PositionLimitsDto = exports.AssetConfigRawDto = exports.MarketParamsRawDto = exports.InterestRateModelDto = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const lending_enum_1 = require("../../enums/lending.enum");
|
|
15
15
|
const lending_oracle_1 = require("../../cosmos-db/documents/lending/lending-oracle");
|
|
@@ -219,6 +219,10 @@ __decorate([
|
|
|
219
219
|
}),
|
|
220
220
|
__metadata("design:type", Number)
|
|
221
221
|
], OracleSourceConfigInputDto.prototype, "maxStaleSeconds", void 0);
|
|
222
|
+
/**
|
|
223
|
+
* @deprecated v1 primary/anchor config. Prefer {@link AssetOracleConfigInputDto}
|
|
224
|
+
* for the composable price-aggregator.
|
|
225
|
+
*/
|
|
222
226
|
class MarketOracleConfigInputDto {
|
|
223
227
|
}
|
|
224
228
|
exports.MarketOracleConfigInputDto = MarketOracleConfigInputDto;
|
|
@@ -271,3 +275,89 @@ __decorate([
|
|
|
271
275
|
}),
|
|
272
276
|
__metadata("design:type", String)
|
|
273
277
|
], MarketOracleConfigInputDto.prototype, "maxSanityPriceWad", void 0);
|
|
278
|
+
/**
|
|
279
|
+
* Composable on-chain `AssetOracle` input for governance
|
|
280
|
+
* `ConfigureAssetOracle` / price-aggregator `set_oracle`.
|
|
281
|
+
* `sources` mirror PriceSource tagged unions as JSON objects.
|
|
282
|
+
*/
|
|
283
|
+
class AssetOracleConfigInputDto {
|
|
284
|
+
}
|
|
285
|
+
exports.AssetOracleConfigInputDto = AssetOracleConfigInputDto;
|
|
286
|
+
__decorate([
|
|
287
|
+
(0, swagger_1.ApiProperty)({
|
|
288
|
+
type: 'integer',
|
|
289
|
+
description: 'Token decimals (0 for Ref keys)',
|
|
290
|
+
}),
|
|
291
|
+
__metadata("design:type", Number)
|
|
292
|
+
], AssetOracleConfigInputDto.prototype, "assetDecimals", void 0);
|
|
293
|
+
__decorate([
|
|
294
|
+
(0, swagger_1.ApiProperty)({
|
|
295
|
+
type: 'integer',
|
|
296
|
+
description: 'Asset-level staleness ceiling, seconds',
|
|
297
|
+
}),
|
|
298
|
+
__metadata("design:type", Number)
|
|
299
|
+
], AssetOracleConfigInputDto.prototype, "maxPriceStaleSeconds", void 0);
|
|
300
|
+
__decorate([
|
|
301
|
+
(0, swagger_1.ApiProperty)({
|
|
302
|
+
type: 'array',
|
|
303
|
+
items: { type: 'object', additionalProperties: true },
|
|
304
|
+
description: 'One or two PriceSource variants (Feed / Scaled / LpShare)',
|
|
305
|
+
}),
|
|
306
|
+
__metadata("design:type", Array)
|
|
307
|
+
], AssetOracleConfigInputDto.prototype, "sources", void 0);
|
|
308
|
+
__decorate([
|
|
309
|
+
(0, swagger_1.ApiProperty)({
|
|
310
|
+
type: 'integer',
|
|
311
|
+
description: 'Dual-source deviation tolerance band, bps (upper side of reciprocal pair)',
|
|
312
|
+
}),
|
|
313
|
+
__metadata("design:type", Number)
|
|
314
|
+
], AssetOracleConfigInputDto.prototype, "toleranceBps", void 0);
|
|
315
|
+
__decorate([
|
|
316
|
+
(0, swagger_1.ApiProperty)({
|
|
317
|
+
description: 'Independence: "RequireDisjoint" or { AllowShared: [{ kind, contract }] }',
|
|
318
|
+
}),
|
|
319
|
+
__metadata("design:type", Object)
|
|
320
|
+
], AssetOracleConfigInputDto.prototype, "independence", void 0);
|
|
321
|
+
__decorate([
|
|
322
|
+
(0, swagger_1.ApiProperty)({
|
|
323
|
+
description: 'Inclusive lower sanity bound, USD WAD decimal string',
|
|
324
|
+
}),
|
|
325
|
+
__metadata("design:type", String)
|
|
326
|
+
], AssetOracleConfigInputDto.prototype, "minSanityPriceWad", void 0);
|
|
327
|
+
__decorate([
|
|
328
|
+
(0, swagger_1.ApiProperty)({
|
|
329
|
+
description: 'Inclusive upper sanity bound, USD WAD decimal string',
|
|
330
|
+
}),
|
|
331
|
+
__metadata("design:type", String)
|
|
332
|
+
], AssetOracleConfigInputDto.prototype, "maxSanityPriceWad", void 0);
|
|
333
|
+
/** `ConfigureAssetOracleArgs` — PriceKey + AssetOracle. */
|
|
334
|
+
class ConfigureAssetOracleArgsDto {
|
|
335
|
+
}
|
|
336
|
+
exports.ConfigureAssetOracleArgsDto = ConfigureAssetOracleArgsDto;
|
|
337
|
+
__decorate([
|
|
338
|
+
(0, swagger_1.ApiProperty)({
|
|
339
|
+
description: 'PriceKey: { Token: "C…" } or { Ref: "BTC" }',
|
|
340
|
+
}),
|
|
341
|
+
__metadata("design:type", Object)
|
|
342
|
+
], ConfigureAssetOracleArgsDto.prototype, "key", void 0);
|
|
343
|
+
__decorate([
|
|
344
|
+
(0, swagger_1.ApiProperty)({ type: AssetOracleConfigInputDto }),
|
|
345
|
+
__metadata("design:type", AssetOracleConfigInputDto)
|
|
346
|
+
], ConfigureAssetOracleArgsDto.prototype, "oracle", void 0);
|
|
347
|
+
/** `EditToleranceArgs` — PriceKey + tolerance bps. */
|
|
348
|
+
class EditOracleToleranceArgsDto {
|
|
349
|
+
}
|
|
350
|
+
exports.EditOracleToleranceArgsDto = EditOracleToleranceArgsDto;
|
|
351
|
+
__decorate([
|
|
352
|
+
(0, swagger_1.ApiProperty)({
|
|
353
|
+
description: 'PriceKey: { Token: "C…" } or { Ref: "BTC" }',
|
|
354
|
+
}),
|
|
355
|
+
__metadata("design:type", Object)
|
|
356
|
+
], EditOracleToleranceArgsDto.prototype, "key", void 0);
|
|
357
|
+
__decorate([
|
|
358
|
+
(0, swagger_1.ApiProperty)({
|
|
359
|
+
type: 'integer',
|
|
360
|
+
description: 'Tolerance band half-width, bps',
|
|
361
|
+
}),
|
|
362
|
+
__metadata("design:type", Number)
|
|
363
|
+
], EditOracleToleranceArgsDto.prototype, "toleranceBps", void 0);
|