@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.
@@ -83,6 +83,11 @@ export declare class StellarFlashLoanEvent {
83
83
  fee: string;
84
84
  }
85
85
  export declare class StellarUpdateAssetOracleEvent {
86
+ key: Record<string, string>;
87
+ oracle: StellarLendingOracleUpdateStruct;
88
+ }
89
+ /** @deprecated Live chain emits `config:asset_oracle`. */
90
+ export declare class StellarLegacyUpdateOracleEvent {
86
91
  asset: string;
87
92
  oracle: StellarLendingOracleUpdateStruct;
88
93
  }
@@ -104,10 +109,22 @@ export declare class StellarInitialMultiplyPaymentEvent {
104
109
  usdValueWad: string;
105
110
  accountId: string;
106
111
  }
112
+ export declare class StellarApproveBlendPoolEvent {
113
+ pool: string;
114
+ approved: boolean;
115
+ }
116
+ /** @deprecated Use StellarApproveBlendPoolEvent / config:approve_blend_pool. */
107
117
  export declare class StellarApproveTokenEvent {
108
118
  wasmHash: string;
109
119
  approved: boolean;
110
120
  }
121
+ export declare class StellarUpdateSwapAggregatorEvent {
122
+ aggregator: string;
123
+ }
124
+ export declare class StellarUpdatePriceAggregatorEvent {
125
+ aggregator: string;
126
+ }
127
+ /** @deprecated Split into swap / price aggregator events. */
111
128
  export declare class StellarUpdateAggregatorEvent {
112
129
  aggregator: string;
113
130
  }
@@ -121,6 +138,10 @@ export declare class StellarUpdatePositionLimitsEvent {
121
138
  maxSupplyPositions: number;
122
139
  maxBorrowPositions: number;
123
140
  }
141
+ export declare class StellarUpdateMinBorrowCollateralEvent {
142
+ minBorrowCollateralUsdWad: string;
143
+ }
144
+ /** @deprecated Not emitted by the composable price-aggregator. */
124
145
  export declare class StellarOracleDisabledEvent {
125
146
  asset: string;
126
147
  }
@@ -160,8 +181,11 @@ export type StellarLendingDecodedEvent = {
160
181
  topic: 'position:flash_loan';
161
182
  data: StellarFlashLoanEvent;
162
183
  } | {
163
- topic: 'config:oracle';
184
+ topic: 'config:asset_oracle';
164
185
  data: StellarUpdateAssetOracleEvent;
186
+ } | {
187
+ topic: 'config:oracle';
188
+ data: StellarLegacyUpdateOracleEvent;
165
189
  } | {
166
190
  topic: 'position:liquidation';
167
191
  data: StellarLiquidationEvent;
@@ -174,9 +198,18 @@ export type StellarLendingDecodedEvent = {
174
198
  } | {
175
199
  topic: 'strategy:fee';
176
200
  data: StellarStrategyFeeEvent;
201
+ } | {
202
+ topic: 'config:approve_blend_pool';
203
+ data: StellarApproveBlendPoolEvent;
177
204
  } | {
178
205
  topic: 'config:approve_token';
179
206
  data: StellarApproveTokenEvent;
207
+ } | {
208
+ topic: 'config:swap_aggregator';
209
+ data: StellarUpdateSwapAggregatorEvent;
210
+ } | {
211
+ topic: 'config:price_aggregator';
212
+ data: StellarUpdatePriceAggregatorEvent;
180
213
  } | {
181
214
  topic: 'config:aggregator';
182
215
  data: StellarUpdateAggregatorEvent;
@@ -189,6 +222,9 @@ export type StellarLendingDecodedEvent = {
189
222
  } | {
190
223
  topic: 'config:position_limits';
191
224
  data: StellarUpdatePositionLimitsEvent;
225
+ } | {
226
+ topic: 'config:min_borrow_collateral';
227
+ data: StellarUpdateMinBorrowCollateralEvent;
192
228
  } | {
193
229
  topic: 'config:oracle_disabled';
194
230
  data: StellarOracleDisabledEvent;
@@ -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.StellarUpdateSpokeEvent = exports.StellarLiquidationEvent = exports.StellarOracleDisabledEvent = exports.StellarUpdatePositionLimitsEvent = exports.StellarUpdatePoolTemplateEvent = exports.StellarUpdateAccumulatorEvent = exports.StellarUpdateAggregatorEvent = exports.StellarApproveTokenEvent = exports.StellarInitialMultiplyPaymentEvent = exports.StellarStrategyFeeEvent = exports.StellarCleanBadDebtEvent = exports.StellarUpdateAssetOracleEvent = exports.StellarFlashLoanEvent = exports.StellarUpdatePositionBatchEvent = exports.StellarUpdateMarketStateBatchEvent = exports.StellarUpdateMarketParamsBatchEvent = exports.StellarPoolMarketParamsUpdate = exports.StellarUpdateMarketParamsEvent = exports.StellarCreateMarketEvent = exports.StellarEventPositionDelta = exports.StellarEventAccountAttributes = exports.StellarMarketStateSnapshot = void 0;
12
+ exports.StellarUpdateSpokeEvent = exports.StellarLiquidationEvent = exports.StellarOracleDisabledEvent = exports.StellarUpdateMinBorrowCollateralEvent = exports.StellarUpdatePositionLimitsEvent = exports.StellarUpdatePoolTemplateEvent = exports.StellarUpdateAccumulatorEvent = exports.StellarUpdateAggregatorEvent = exports.StellarUpdatePriceAggregatorEvent = exports.StellarUpdateSwapAggregatorEvent = exports.StellarApproveTokenEvent = exports.StellarApproveBlendPoolEvent = exports.StellarInitialMultiplyPaymentEvent = exports.StellarStrategyFeeEvent = exports.StellarCleanBadDebtEvent = exports.StellarLegacyUpdateOracleEvent = exports.StellarUpdateAssetOracleEvent = exports.StellarFlashLoanEvent = exports.StellarUpdatePositionBatchEvent = exports.StellarUpdateMarketStateBatchEvent = exports.StellarUpdateMarketParamsBatchEvent = exports.StellarPoolMarketParamsUpdate = exports.StellarUpdateMarketParamsEvent = exports.StellarCreateMarketEvent = 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");
@@ -371,21 +371,39 @@ __decorate([
371
371
  }),
372
372
  __metadata("design:type", String)
373
373
  ], StellarFlashLoanEvent.prototype, "fee", void 0);
374
- // ---------- topic: config:oracle ----------
374
+ // ---------- topic: config:asset_oracle ----------
375
375
  class StellarUpdateAssetOracleEvent {
376
376
  }
377
377
  exports.StellarUpdateAssetOracleEvent = StellarUpdateAssetOracleEvent;
378
378
  __decorate([
379
- (0, swagger_1.ApiProperty)({ type: String, description: 'Asset address' }),
380
- __metadata("design:type", String)
381
- ], StellarUpdateAssetOracleEvent.prototype, "asset", void 0);
379
+ (0, swagger_1.ApiProperty)({
380
+ description: 'PriceKey as decoded from chain: `{ Token: "C…" }` or `{ Ref: "BTC" }`',
381
+ }),
382
+ __metadata("design:type", Object)
383
+ ], StellarUpdateAssetOracleEvent.prototype, "key", void 0);
382
384
  __decorate([
383
385
  (0, swagger_1.ApiProperty)({
384
386
  type: lending_oracle_1.StellarLendingOracleUpdateStruct,
385
- description: 'Resolved oracle provider configuration. Sanity bounds and per-source quote tokens live on this nested struct, matching the contract event wire layout.',
387
+ description: 'Composable AssetOracle (`sources`, independence, tolerance, sanity). Emitted by set_oracle / set_sanity_band / set_tolerance.',
386
388
  }),
387
389
  __metadata("design:type", lending_oracle_1.StellarLendingOracleUpdateStruct)
388
390
  ], StellarUpdateAssetOracleEvent.prototype, "oracle", void 0);
391
+ // ---------- topic: config:oracle (legacy historical) ----------
392
+ /** @deprecated Live chain emits `config:asset_oracle`. */
393
+ class StellarLegacyUpdateOracleEvent {
394
+ }
395
+ exports.StellarLegacyUpdateOracleEvent = StellarLegacyUpdateOracleEvent;
396
+ __decorate([
397
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Asset address (legacy payload)' }),
398
+ __metadata("design:type", String)
399
+ ], StellarLegacyUpdateOracleEvent.prototype, "asset", void 0);
400
+ __decorate([
401
+ (0, swagger_1.ApiProperty)({
402
+ type: lending_oracle_1.StellarLendingOracleUpdateStruct,
403
+ description: 'Legacy flat oracle config',
404
+ }),
405
+ __metadata("design:type", lending_oracle_1.StellarLendingOracleUpdateStruct)
406
+ ], StellarLegacyUpdateOracleEvent.prototype, "oracle", void 0);
389
407
  // ---------- topic: debt:bad_debt ----------
390
408
  class StellarCleanBadDebtEvent {
391
409
  }
@@ -466,24 +484,57 @@ __decorate([
466
484
  }),
467
485
  __metadata("design:type", String)
468
486
  ], StellarInitialMultiplyPaymentEvent.prototype, "accountId", void 0);
469
- // ---------- topic: config:approve_token ----------
487
+ // ---------- topic: config:approve_blend_pool ----------
488
+ class StellarApproveBlendPoolEvent {
489
+ }
490
+ exports.StellarApproveBlendPoolEvent = StellarApproveBlendPoolEvent;
491
+ __decorate([
492
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Blend pool contract address' }),
493
+ __metadata("design:type", String)
494
+ ], StellarApproveBlendPoolEvent.prototype, "pool", void 0);
495
+ __decorate([
496
+ (0, swagger_1.ApiProperty)({
497
+ description: 'Whether the pool was approved (true) or revoked (false)',
498
+ }),
499
+ __metadata("design:type", Boolean)
500
+ ], StellarApproveBlendPoolEvent.prototype, "approved", void 0);
501
+ /** @deprecated Use StellarApproveBlendPoolEvent / config:approve_blend_pool. */
470
502
  class StellarApproveTokenEvent {
471
503
  }
472
504
  exports.StellarApproveTokenEvent = StellarApproveTokenEvent;
473
505
  __decorate([
474
506
  (0, swagger_1.ApiProperty)({
475
507
  type: String,
476
- description: 'Approved WASM hash, 32-byte hex string',
508
+ description: 'Approved WASM hash or pool address (legacy)',
477
509
  }),
478
510
  __metadata("design:type", String)
479
511
  ], StellarApproveTokenEvent.prototype, "wasmHash", void 0);
480
512
  __decorate([
481
513
  (0, swagger_1.ApiProperty)({
482
- description: 'Whether the hash was approved (true) or revoked (false)',
514
+ description: 'Whether approved (true) or revoked (false)',
483
515
  }),
484
516
  __metadata("design:type", Boolean)
485
517
  ], StellarApproveTokenEvent.prototype, "approved", void 0);
486
- // ---------- topic: config:aggregator ----------
518
+ // ---------- topic: config:swap_aggregator ----------
519
+ class StellarUpdateSwapAggregatorEvent {
520
+ }
521
+ exports.StellarUpdateSwapAggregatorEvent = StellarUpdateSwapAggregatorEvent;
522
+ __decorate([
523
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Swap aggregator contract address' }),
524
+ __metadata("design:type", String)
525
+ ], StellarUpdateSwapAggregatorEvent.prototype, "aggregator", void 0);
526
+ // ---------- topic: config:price_aggregator ----------
527
+ class StellarUpdatePriceAggregatorEvent {
528
+ }
529
+ exports.StellarUpdatePriceAggregatorEvent = StellarUpdatePriceAggregatorEvent;
530
+ __decorate([
531
+ (0, swagger_1.ApiProperty)({
532
+ type: String,
533
+ description: 'Price aggregator (oracle authority) contract address',
534
+ }),
535
+ __metadata("design:type", String)
536
+ ], StellarUpdatePriceAggregatorEvent.prototype, "aggregator", void 0);
537
+ /** @deprecated Split into swap / price aggregator events. */
487
538
  class StellarUpdateAggregatorEvent {
488
539
  }
489
540
  exports.StellarUpdateAggregatorEvent = StellarUpdateAggregatorEvent;
@@ -528,7 +579,19 @@ __decorate([
528
579
  }),
529
580
  __metadata("design:type", Number)
530
581
  ], StellarUpdatePositionLimitsEvent.prototype, "maxBorrowPositions", void 0);
531
- // ---------- topic: config:oracle_disabled ----------
582
+ // ---------- topic: config:min_borrow_collateral ----------
583
+ class StellarUpdateMinBorrowCollateralEvent {
584
+ }
585
+ exports.StellarUpdateMinBorrowCollateralEvent = StellarUpdateMinBorrowCollateralEvent;
586
+ __decorate([
587
+ (0, swagger_1.ApiProperty)({
588
+ type: String,
589
+ description: 'Minimum borrow collateral floor, USD WAD decimal string',
590
+ }),
591
+ __metadata("design:type", String)
592
+ ], StellarUpdateMinBorrowCollateralEvent.prototype, "minBorrowCollateralUsdWad", void 0);
593
+ // ---------- topic: config:oracle_disabled (legacy historical) ----------
594
+ /** @deprecated Not emitted by the composable price-aggregator. */
532
595
  class StellarOracleDisabledEvent {
533
596
  }
534
597
  exports.StellarOracleDisabledEvent = StellarOracleDisabledEvent;
@@ -1,12 +1,16 @@
1
1
  import { StellarLendingDataType } from '../enums';
2
- import type { StellarOracleProvider } from '../oracle-provider';
2
+ import type { StellarAssetOracle } from '../oracle-provider';
3
3
  export declare class StellarAssetDoc {
4
4
  dataType: StellarLendingDataType;
5
5
  asset: string;
6
6
  symbol: string;
7
7
  name: string;
8
8
  decimals: number;
9
- oracleProvider: StellarOracleProvider | null;
9
+ /**
10
+ * Price-aggregator `AssetOracle` for `PriceKey::Token(asset)`, event-sourced
11
+ * from `config:asset_oracle`. Null until first configure.
12
+ */
13
+ oracleProvider: StellarAssetOracle | null;
10
14
  hubCount: number;
11
15
  reserveCount: number;
12
16
  updatedAt: number;
@@ -5,6 +5,10 @@ const enums_1 = require("../enums");
5
5
  class StellarAssetDoc {
6
6
  constructor(props) {
7
7
  this.dataType = enums_1.StellarLendingDataType.ASSET;
8
+ /**
9
+ * Price-aggregator `AssetOracle` for `PriceKey::Token(asset)`, event-sourced
10
+ * from `config:asset_oracle`. Null until first configure.
11
+ */
8
12
  this.oracleProvider = null;
9
13
  this.hubCount = 0;
10
14
  this.reserveCount = 0;
@@ -1,9 +1,10 @@
1
1
  import { StellarLendingDataType } from '../enums';
2
- import type { StellarOracleProvider } from '../oracle-provider';
3
2
  /**
4
3
  * Risk truth for one asset in one spoke on one hub
5
4
  * (`spokeAsset:{spokeId}:{hubId}:{asset}`). LTV, liquidation params, flags, and
6
5
  * per-spoke usage are event-sourced from the controller contract.
6
+ * Oracle config is asset-level on the price-aggregator (`StellarAssetDoc`), not
7
+ * per-spoke — there is no on-chain `oracle_override`.
7
8
  */
8
9
  export declare class StellarSpokeAssetDoc {
9
10
  dataType: StellarLendingDataType;
@@ -22,7 +23,6 @@ export declare class StellarSpokeAssetDoc {
22
23
  borrowCap: string;
23
24
  supplyCapShort: number;
24
25
  borrowCapShort: number;
25
- oracleOverride: StellarOracleProvider | null;
26
26
  suppliedScaledRay: string;
27
27
  borrowedScaledRay: string;
28
28
  updatedAt: number;
@@ -6,6 +6,8 @@ const enums_1 = require("../enums");
6
6
  * Risk truth for one asset in one spoke on one hub
7
7
  * (`spokeAsset:{spokeId}:{hubId}:{asset}`). LTV, liquidation params, flags, and
8
8
  * per-spoke usage are event-sourced from the controller contract.
9
+ * Oracle config is asset-level on the price-aggregator (`StellarAssetDoc`), not
10
+ * per-spoke — there is no on-chain `oracle_override`.
9
11
  */
10
12
  class StellarSpokeAssetDoc {
11
13
  constructor(props) {
@@ -22,7 +24,6 @@ class StellarSpokeAssetDoc {
22
24
  this.borrowCap = '0';
23
25
  this.supplyCapShort = 0;
24
26
  this.borrowCapShort = 0;
25
- this.oracleOverride = null;
26
27
  this.suppliedScaledRay = '0';
27
28
  this.borrowedScaledRay = '0';
28
29
  this.updatedAt = 0;
@@ -2,46 +2,50 @@
2
2
  * Stellar lending governance (timelock) proposal taxonomy. Self-contained copy
3
3
  * for the independent Stellar-lending subtree (no MVX coupling).
4
4
  *
5
- * `StellarGovernanceProposalKind` mirrors the `AdminOperation` variants the
6
- * governance contract schedules; the indexer maps a scheduled operation's
7
- * invoked function symbol to one of these.
5
+ * Mirrors live `AdminOperation` variants the governance contract schedules.
8
6
  */
9
7
  export declare enum StellarGovernanceProposalKind {
10
- SetAggregator = "SetAggregator",
8
+ SetSwapAggregator = "SetSwapAggregator",
9
+ SetPriceAggregator = "SetPriceAggregator",
11
10
  SetAccumulator = "SetAccumulator",
12
- SetPoolTemplate = "SetPoolTemplate",
13
- EditAssetConfig = "EditAssetConfig",
14
11
  SetPositionLimits = "SetPositionLimits",
15
- SetMinBorrowCollateral = "SetMinBorrowCollateral",
16
- AddEModeCategory = "AddEModeCategory",
17
- RemoveEModeCategory = "RemoveEModeCategory",
18
- AddAssetToEModeCategory = "AddAssetToEModeCategory",
19
- EditAssetInEModeCategory = "EditAssetInEModeCategory",
20
- RemoveAssetFromEMode = "RemoveAssetFromEMode",
21
- ApproveToken = "ApproveToken",
22
- RevokeToken = "RevokeToken",
12
+ SetMinBorrowCollateralUsd = "SetMinBorrowCollateralUsd",
13
+ CreateHub = "CreateHub",
14
+ AddSpoke = "AddSpoke",
15
+ RemoveSpoke = "RemoveSpoke",
16
+ AddAssetToSpoke = "AddAssetToSpoke",
17
+ EditAssetInSpoke = "EditAssetInSpoke",
18
+ RemoveAssetFromSpoke = "RemoveAssetFromSpoke",
23
19
  ApproveBlendPool = "ApproveBlendPool",
24
20
  RevokeBlendPool = "RevokeBlendPool",
25
21
  CreateLiquidityPool = "CreateLiquidityPool",
26
22
  UpgradeLiquidityPoolParams = "UpgradeLiquidityPoolParams",
27
23
  DeployPool = "DeployPool",
28
24
  UpgradePool = "UpgradePool",
25
+ SetPositionManager = "SetPositionManager",
29
26
  UpgradeController = "UpgradeController",
30
27
  MigrateController = "MigrateController",
31
- TransferControllerOwnership = "TransferControllerOwnership",
32
- ConfigureMarketOracle = "ConfigureMarketOracle",
28
+ TransferCtrlOwnership = "TransferCtrlOwnership",
33
29
  EditOracleTolerance = "EditOracleTolerance",
34
30
  SetSpokeLiquidationCurve = "SetSpokeLiquidationCurve",
35
- GovernanceUpgrade = "GovernanceUpgrade",
36
- UpdateDelay = "UpdateDelay",
37
- GrantGovernanceRole = "GrantGovernanceRole",
38
- RevokeGovernanceRole = "RevokeGovernanceRole",
39
- TransferGovernanceOwnership = "TransferGovernanceOwnership",
31
+ ForceSocializeBadDebt = "ForceSocializeBadDebt",
32
+ Unpause = "Unpause",
33
+ UpgradeGov = "UpgradeGov",
34
+ UpdateGovDelay = "UpdateGovDelay",
35
+ GrantGovRole = "GrantGovRole",
36
+ RevokeGovRole = "RevokeGovRole",
37
+ TransferGovOwnership = "TransferGovOwnership",
38
+ ConfigureAssetOracle = "ConfigureAssetOracle",
40
39
  /**
41
40
  * Owner-only, non-vetoable Recovery-tier council reset (`reset_cancellers`).
42
- * Scheduled at the ~30-day Recovery delay to replace a captured canceller set.
43
41
  */
44
42
  CancellerReset = "CancellerReset",
43
+ /** @deprecated Alias — use `SetSwapAggregator`. */
44
+ SetAggregator = "SetSwapAggregator",
45
+ /** @deprecated Alias — use `ConfigureAssetOracle`. */
46
+ ConfigureMarketOracle = "ConfigureAssetOracle",
47
+ /** @deprecated Alias — use `ApproveBlendPool`. */
48
+ ApproveToken = "ApproveBlendPool",
45
49
  Unknown = "Unknown"
46
50
  }
47
51
  /**
@@ -60,5 +64,6 @@ export declare enum StellarGovernanceProposalStatus {
60
64
  */
61
65
  export declare enum StellarGovernanceProposalTarget {
62
66
  Controller = "Controller",
63
- Governance = "Governance"
67
+ Governance = "Governance",
68
+ PriceAggregator = "PriceAggregator"
64
69
  }
@@ -5,47 +5,51 @@ exports.StellarGovernanceProposalTarget = exports.StellarGovernanceProposalStatu
5
5
  * Stellar lending governance (timelock) proposal taxonomy. Self-contained copy
6
6
  * for the independent Stellar-lending subtree (no MVX coupling).
7
7
  *
8
- * `StellarGovernanceProposalKind` mirrors the `AdminOperation` variants the
9
- * governance contract schedules; the indexer maps a scheduled operation's
10
- * invoked function symbol to one of these.
8
+ * Mirrors live `AdminOperation` variants the governance contract schedules.
11
9
  */
12
10
  var StellarGovernanceProposalKind;
13
11
  (function (StellarGovernanceProposalKind) {
14
- StellarGovernanceProposalKind["SetAggregator"] = "SetAggregator";
12
+ StellarGovernanceProposalKind["SetSwapAggregator"] = "SetSwapAggregator";
13
+ StellarGovernanceProposalKind["SetPriceAggregator"] = "SetPriceAggregator";
15
14
  StellarGovernanceProposalKind["SetAccumulator"] = "SetAccumulator";
16
- StellarGovernanceProposalKind["SetPoolTemplate"] = "SetPoolTemplate";
17
- StellarGovernanceProposalKind["EditAssetConfig"] = "EditAssetConfig";
18
15
  StellarGovernanceProposalKind["SetPositionLimits"] = "SetPositionLimits";
19
- StellarGovernanceProposalKind["SetMinBorrowCollateral"] = "SetMinBorrowCollateral";
20
- StellarGovernanceProposalKind["AddEModeCategory"] = "AddEModeCategory";
21
- StellarGovernanceProposalKind["RemoveEModeCategory"] = "RemoveEModeCategory";
22
- StellarGovernanceProposalKind["AddAssetToEModeCategory"] = "AddAssetToEModeCategory";
23
- StellarGovernanceProposalKind["EditAssetInEModeCategory"] = "EditAssetInEModeCategory";
24
- StellarGovernanceProposalKind["RemoveAssetFromEMode"] = "RemoveAssetFromEMode";
25
- StellarGovernanceProposalKind["ApproveToken"] = "ApproveToken";
26
- StellarGovernanceProposalKind["RevokeToken"] = "RevokeToken";
16
+ StellarGovernanceProposalKind["SetMinBorrowCollateralUsd"] = "SetMinBorrowCollateralUsd";
17
+ StellarGovernanceProposalKind["CreateHub"] = "CreateHub";
18
+ StellarGovernanceProposalKind["AddSpoke"] = "AddSpoke";
19
+ StellarGovernanceProposalKind["RemoveSpoke"] = "RemoveSpoke";
20
+ StellarGovernanceProposalKind["AddAssetToSpoke"] = "AddAssetToSpoke";
21
+ StellarGovernanceProposalKind["EditAssetInSpoke"] = "EditAssetInSpoke";
22
+ StellarGovernanceProposalKind["RemoveAssetFromSpoke"] = "RemoveAssetFromSpoke";
27
23
  StellarGovernanceProposalKind["ApproveBlendPool"] = "ApproveBlendPool";
28
24
  StellarGovernanceProposalKind["RevokeBlendPool"] = "RevokeBlendPool";
29
25
  StellarGovernanceProposalKind["CreateLiquidityPool"] = "CreateLiquidityPool";
30
26
  StellarGovernanceProposalKind["UpgradeLiquidityPoolParams"] = "UpgradeLiquidityPoolParams";
31
27
  StellarGovernanceProposalKind["DeployPool"] = "DeployPool";
32
28
  StellarGovernanceProposalKind["UpgradePool"] = "UpgradePool";
29
+ StellarGovernanceProposalKind["SetPositionManager"] = "SetPositionManager";
33
30
  StellarGovernanceProposalKind["UpgradeController"] = "UpgradeController";
34
31
  StellarGovernanceProposalKind["MigrateController"] = "MigrateController";
35
- StellarGovernanceProposalKind["TransferControllerOwnership"] = "TransferControllerOwnership";
36
- StellarGovernanceProposalKind["ConfigureMarketOracle"] = "ConfigureMarketOracle";
32
+ StellarGovernanceProposalKind["TransferCtrlOwnership"] = "TransferCtrlOwnership";
37
33
  StellarGovernanceProposalKind["EditOracleTolerance"] = "EditOracleTolerance";
38
34
  StellarGovernanceProposalKind["SetSpokeLiquidationCurve"] = "SetSpokeLiquidationCurve";
39
- StellarGovernanceProposalKind["GovernanceUpgrade"] = "GovernanceUpgrade";
40
- StellarGovernanceProposalKind["UpdateDelay"] = "UpdateDelay";
41
- StellarGovernanceProposalKind["GrantGovernanceRole"] = "GrantGovernanceRole";
42
- StellarGovernanceProposalKind["RevokeGovernanceRole"] = "RevokeGovernanceRole";
43
- StellarGovernanceProposalKind["TransferGovernanceOwnership"] = "TransferGovernanceOwnership";
35
+ StellarGovernanceProposalKind["ForceSocializeBadDebt"] = "ForceSocializeBadDebt";
36
+ StellarGovernanceProposalKind["Unpause"] = "Unpause";
37
+ StellarGovernanceProposalKind["UpgradeGov"] = "UpgradeGov";
38
+ StellarGovernanceProposalKind["UpdateGovDelay"] = "UpdateGovDelay";
39
+ StellarGovernanceProposalKind["GrantGovRole"] = "GrantGovRole";
40
+ StellarGovernanceProposalKind["RevokeGovRole"] = "RevokeGovRole";
41
+ StellarGovernanceProposalKind["TransferGovOwnership"] = "TransferGovOwnership";
42
+ StellarGovernanceProposalKind["ConfigureAssetOracle"] = "ConfigureAssetOracle";
44
43
  /**
45
44
  * Owner-only, non-vetoable Recovery-tier council reset (`reset_cancellers`).
46
- * Scheduled at the ~30-day Recovery delay to replace a captured canceller set.
47
45
  */
48
46
  StellarGovernanceProposalKind["CancellerReset"] = "CancellerReset";
47
+ /** @deprecated Alias — use `SetSwapAggregator`. */
48
+ StellarGovernanceProposalKind["SetAggregator"] = "SetSwapAggregator";
49
+ /** @deprecated Alias — use `ConfigureAssetOracle`. */
50
+ StellarGovernanceProposalKind["ConfigureMarketOracle"] = "ConfigureAssetOracle";
51
+ /** @deprecated Alias — use `ApproveBlendPool`. */
52
+ StellarGovernanceProposalKind["ApproveToken"] = "ApproveBlendPool";
49
53
  StellarGovernanceProposalKind["Unknown"] = "Unknown";
50
54
  })(StellarGovernanceProposalKind || (exports.StellarGovernanceProposalKind = StellarGovernanceProposalKind = {}));
51
55
  /**
@@ -67,4 +71,5 @@ var StellarGovernanceProposalTarget;
67
71
  (function (StellarGovernanceProposalTarget) {
68
72
  StellarGovernanceProposalTarget["Controller"] = "Controller";
69
73
  StellarGovernanceProposalTarget["Governance"] = "Governance";
74
+ StellarGovernanceProposalTarget["PriceAggregator"] = "PriceAggregator";
70
75
  })(StellarGovernanceProposalTarget || (exports.StellarGovernanceProposalTarget = StellarGovernanceProposalTarget = {}));
@@ -1,5 +1,10 @@
1
1
  import type { ActivityChain } from '../enums/common.enum';
2
- /** Live controller index for one Stellar `(hub, asset)` market. */
2
+ /**
3
+ * Live controller `MarketIndexView` for one hub market, plus client short
4
+ * scales. `hubId` is client-attached (view has no hub field); price legs keep
5
+ * historical ABI names (`safe_price_wad` / `aggregator_price_wad`) as
6
+ * primary/anchor short aliases for wire compatibility.
7
+ */
3
8
  export interface StellarMarketIndexByHub {
4
9
  hubId: number;
5
10
  asset: string;
@@ -7,12 +12,27 @@ export interface StellarMarketIndexByHub {
7
12
  supplyIndexShort: number;
8
13
  borrowIndex: string;
9
14
  borrowIndexShort: number;
15
+ /** Final composed USD WAD (`price_wad`). */
10
16
  usdPrice: string;
11
17
  usdPriceShort: number;
18
+ /**
19
+ * Primary/first oracle leg WAD (`safe_price_wad` — historical ABI name, not a
20
+ * safety flag).
21
+ */
12
22
  primaryPriceUsd: string;
13
23
  primaryPriceUsdShort: number;
24
+ /**
25
+ * Secondary/second oracle leg WAD (`aggregator_price_wad` — historical ABI
26
+ * name, not the swap aggregator).
27
+ */
14
28
  anchorPriceUsd: string;
15
29
  anchorPriceUsdShort: number;
30
+ /** Freshness timestamp of the final blend (seconds). */
31
+ priceTimestamp: number;
32
+ stale: boolean;
33
+ deviation: boolean;
34
+ /** True when the price would pass the fail-closed solvency path. */
35
+ valid: boolean;
16
36
  chain: ActivityChain;
17
37
  }
18
38
  /** Live controller state needed by Stellar lending clients. */
@@ -1,40 +1,109 @@
1
1
  /**
2
- * TS mirror of the on-chain `controller::events::EventOracleProvider`. All
3
- * `i128` string, `u32/u64` → number, `Option<T>` → `T | null`. Persistence
4
- * shape only (no swagger decorators); api-v2 owns the response DTOs.
2
+ * Persistence / event shapes for the Stellar price-aggregator composable
3
+ * oracle model (`config:asset_oracle`).
4
+ *
5
+ * Mirrors on-chain `PriceKey` + `AssetOracle` (`sources`, independence,
6
+ * tolerance, sanity). `i128` → string; `u32/u64` → number. No Nest
7
+ * decorators — api-v2 owns swagger DTOs; this package owns wire shapes.
5
8
  */
6
- export interface StellarOracleProvider {
7
- baseTokenId: string;
8
- quoteTokenSymbol: string;
9
- toleranceUpperBps: number;
10
- toleranceLowerBps: number;
11
- pricingMethod: number;
12
- oracleType: number;
13
- strategy: number;
9
+ /** On-chain `PriceKey`: Token SAC or registry-only Ref symbol. */
10
+ export type StellarPriceKey = {
11
+ Token: string;
12
+ } | {
13
+ Ref: string;
14
+ };
15
+ /** On-chain `ProviderKind`. */
16
+ export type StellarProviderKind = 'Reflector' | 'RedStone' | 'Xoxno';
17
+ /** On-chain `FeedNature`. */
18
+ export type StellarFeedNature = 'Market' | 'Fundamental';
19
+ /** On-chain `OracleAssetRef` for Reflector legs. */
20
+ export type StellarOracleAssetRef = {
21
+ Stellar: string;
22
+ } | {
23
+ Symbol: string;
24
+ } | {
25
+ String: string;
26
+ };
27
+ /** On-chain `OracleReadMode`. */
28
+ export type StellarOracleReadMode = 'Spot' | {
29
+ Twap: number;
30
+ };
31
+ /** On-chain `OracleTolerance` (BPS band around 10000). */
32
+ export interface StellarOracleTolerance {
33
+ upperRatioBps: number;
34
+ lowerRatioBps: number;
35
+ }
36
+ export interface StellarReflectorFeedRef {
37
+ contract: string;
38
+ asset: StellarOracleAssetRef;
39
+ readMode: StellarOracleReadMode;
40
+ }
41
+ export interface StellarMultiFeedRef {
42
+ contract: string;
43
+ feedId: string;
44
+ kind: StellarProviderKind;
45
+ nature: StellarFeedNature;
46
+ }
47
+ /** On-chain `ProviderRef`. */
48
+ export type StellarProviderRef = {
49
+ Reflector: StellarReflectorFeedRef;
50
+ } | {
51
+ MultiFeed: StellarMultiFeedRef;
52
+ };
53
+ export interface StellarFeedSource {
54
+ provider: StellarProviderRef;
55
+ decimals: number;
56
+ maxStaleSeconds: number;
57
+ }
58
+ export interface StellarScaledSource {
59
+ factor: StellarFeedSource;
60
+ quote: StellarPriceKey;
61
+ minFactorWad: string;
62
+ maxFactorWad: string;
63
+ }
64
+ export type StellarPoolKind = 'ConstantProduct';
65
+ export interface StellarLpShareSource {
66
+ pool: string;
67
+ kind: StellarPoolKind;
68
+ keyA: StellarPriceKey;
69
+ keyB: StellarPriceKey;
70
+ reserveADecimals: number;
71
+ reserveBDecimals: number;
72
+ shareDecimals: number;
73
+ }
74
+ /** On-chain `PriceSource`. */
75
+ export type StellarPriceSource = {
76
+ Feed: StellarFeedSource;
77
+ } | {
78
+ Scaled: StellarScaledSource;
79
+ } | {
80
+ LpShare: StellarLpShareSource;
81
+ };
82
+ export interface StellarTrustDomain {
83
+ kind: StellarProviderKind;
84
+ contract: string;
85
+ }
86
+ /** On-chain `IndependencePolicy`. */
87
+ export type StellarIndependencePolicy = 'RequireDisjoint' | {
88
+ AllowShared: StellarTrustDomain[];
89
+ };
90
+ /**
91
+ * On-chain `AssetOracle` — one or two independent opinions for a `PriceKey`.
92
+ * Stored on `StellarAssetDoc.oracleProvider` and carried by
93
+ * `config:asset_oracle` events.
94
+ */
95
+ export interface StellarAssetOracle {
14
96
  assetDecimals: number;
15
97
  maxPriceStaleSeconds: number;
16
- primaryProvider: number;
17
- primaryContract: string;
18
- primaryAsset: string | null;
19
- primarySymbol: string | null;
20
- primaryFeedId: string | null;
21
- primaryQuoteToken: string | null;
22
- primaryReadMode: number;
23
- primaryTwapRecords: number;
24
- primaryDecimals: number;
25
- primaryResolutionSeconds: number;
26
- primaryMaxStaleSeconds: number;
27
- anchorProvider: number | null;
28
- anchorContract: string | null;
29
- anchorAsset: string | null;
30
- anchorSymbol: string | null;
31
- anchorFeedId: string | null;
32
- anchorQuoteToken: string | null;
33
- anchorReadMode: number;
34
- anchorTwapRecords: number;
35
- anchorDecimals: number;
36
- anchorResolutionSeconds: number;
37
- anchorMaxStaleSeconds: number;
98
+ sources: StellarPriceSource[];
99
+ tolerance: StellarOracleTolerance;
100
+ independence: StellarIndependencePolicy;
38
101
  minSanityPriceWad: string;
39
102
  maxSanityPriceWad: string;
40
103
  }
104
+ /**
105
+ * @deprecated Alias of {@link StellarAssetOracle}. Prefer `StellarAssetOracle`.
106
+ * Kept so existing imports continue to resolve while consumers migrate off the
107
+ * v1 primary/anchor flat projection.
108
+ */
109
+ export type StellarOracleProvider = StellarAssetOracle;
@@ -1,2 +1,10 @@
1
1
  "use strict";
2
+ /**
3
+ * Persistence / event shapes for the Stellar price-aggregator composable
4
+ * oracle model (`config:asset_oracle`).
5
+ *
6
+ * Mirrors on-chain `PriceKey` + `AssetOracle` (`sources`, independence,
7
+ * tolerance, sanity). `i128` → string; `u32/u64` → number. No Nest
8
+ * decorators — api-v2 owns swagger DTOs; this package owns wire shapes.
9
+ */
2
10
  Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoxno/types",
3
- "version": "1.0.472",
3
+ "version": "1.0.474",
4
4
  "description": "Shared types and utilities for XOXNO API.",
5
5
  "exports": {
6
6
  ".": {