@xoxno/types 1.0.403 → 1.0.405

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.
@@ -1,11 +1,6 @@
1
1
  /**
2
- * Soroban event dispatch keys for the XOXNO Stellar lending controller.
3
- *
4
- * Each value is the `"<domain>:<action>"` join of a `#[contractevent]`'s two
5
- * topic symbols (see `rs-lending-xlm/common/src/events.rs`). This is the single
6
- * source of truth shared by the `@xoxno/sdk-js` decoder registry and every
7
- * consumer; it is intentionally distinct from the MVX-named
8
- * `LendingScEventIdentifier`, whose values do not match the Soroban topics.
2
+ * Soroban event dispatch keys for the XOXNO Stellar lending controller,
3
+ * each value joined as `"<domain>:<action>"`.
9
4
  */
10
5
  export declare enum StellarLendingTopic {
11
6
  MarketCreate = "market:create",
@@ -2,13 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StellarLendingTopic = void 0;
4
4
  /**
5
- * Soroban event dispatch keys for the XOXNO Stellar lending controller.
6
- *
7
- * Each value is the `"<domain>:<action>"` join of a `#[contractevent]`'s two
8
- * topic symbols (see `rs-lending-xlm/common/src/events.rs`). This is the single
9
- * source of truth shared by the `@xoxno/sdk-js` decoder registry and every
10
- * consumer; it is intentionally distinct from the MVX-named
11
- * `LendingScEventIdentifier`, whose values do not match the Soroban topics.
5
+ * Soroban event dispatch keys for the XOXNO Stellar lending controller,
6
+ * each value joined as `"<domain>:<action>"`.
12
7
  */
13
8
  var StellarLendingTopic;
14
9
  (function (StellarLendingTopic) {
@@ -1,12 +1,10 @@
1
1
  import { LendingOracleProviderKind, LendingOracleReadMode, LendingOracleStrategy } from '../../enums/lending.enum';
2
2
  import { LendingOracleAssetRef } from '../../cosmos-db/documents/lending/lending-oracle';
3
3
  /**
4
- * Admin / config / keeper argument DTOs for the Stellar lending controller.
4
+ * Admin/config argument DTOs for the Stellar lending controller.
5
5
  *
6
- * These mirror the on-chain Rust structs in
7
- * `rs-lending-xlm/common/src/types/{pool,controller,oracle}.rs`. RAY/WAD i128
8
- * values are decimal strings; bps and counts are numbers; addresses/feed ids
9
- * are strings. The `@xoxno/sdk-js` Soroban builders encode them to ScVal.
6
+ * RAY/WAD integers cross as decimal strings; bps and counts are numbers;
7
+ * addresses and feed ids are strings.
10
8
  */
11
9
  export declare class InterestRateModelDto {
12
10
  maxBorrowRateRay: string;
@@ -20,9 +18,7 @@ export declare class InterestRateModelDto {
20
18
  reserveFactorBps: number;
21
19
  }
22
20
  /**
23
- * Interest rate model plus the pool asset identity, as taken by
24
- * `create_liquidity_pool`. `upgrade_liquidity_pool_params` takes only the
25
- * `InterestRateModelDto` portion (asset is addressed separately).
21
+ * Interest rate model plus the pool asset identity.
26
22
  */
27
23
  export declare class MarketParamsRawDto extends InterestRateModelDto {
28
24
  assetId: string;
@@ -14,12 +14,10 @@ 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");
16
16
  /**
17
- * Admin / config / keeper argument DTOs for the Stellar lending controller.
17
+ * Admin/config argument DTOs for the Stellar lending controller.
18
18
  *
19
- * These mirror the on-chain Rust structs in
20
- * `rs-lending-xlm/common/src/types/{pool,controller,oracle}.rs`. RAY/WAD i128
21
- * values are decimal strings; bps and counts are numbers; addresses/feed ids
22
- * are strings. The `@xoxno/sdk-js` Soroban builders encode them to ScVal.
19
+ * RAY/WAD integers cross as decimal strings; bps and counts are numbers;
20
+ * addresses and feed ids are strings.
23
21
  */
24
22
  class InterestRateModelDto {
25
23
  }
@@ -67,9 +65,7 @@ __decorate([
67
65
  __metadata("design:type", Number)
68
66
  ], InterestRateModelDto.prototype, "reserveFactorBps", void 0);
69
67
  /**
70
- * Interest rate model plus the pool asset identity, as taken by
71
- * `create_liquidity_pool`. `upgrade_liquidity_pool_params` takes only the
72
- * `InterestRateModelDto` portion (asset is addressed separately).
68
+ * Interest rate model plus the pool asset identity.
73
69
  */
74
70
  class MarketParamsRawDto extends InterestRateModelDto {
75
71
  }
@@ -1,21 +1,13 @@
1
1
  /**
2
- * Chain-agnostic argument DTOs for the lending protocol.
2
+ * Chain-agnostic argument DTOs for the lending protocol, decoupled from
3
+ * chain-specific types:
3
4
  *
4
- * These shapes mirror the Stellar controller entry points
5
- * (see /rs-lending/stellar/controller/src/lib.rs) but are deliberately
6
- * decoupled from any chain-specific types:
7
- *
8
- * - `token` is a string (MVX uses ESDT ticker, Stellar uses contract
9
- * address, SUI uses coin type) — callers pass whatever their chain
10
- * uses, the SDK builder interprets it.
11
- * - `amount` is a string to preserve precision across u64 / u128 /
12
- * i128 backends.
5
+ * - `token` is a string (an ESDT ticker, a Soroban contract address, a
6
+ * SUI coin type whatever the target chain uses).
7
+ * - `amount` is a decimal string to preserve precision across
8
+ * u64 / u128 / i128 backends.
13
9
  * - `steps`, `data` are `unknown` — the concrete swap-path / callback
14
- * struct is chain-specific and encoded by the SDK transaction
15
- * builder.
16
- *
17
- * MVX flows can reuse these via a thin adapter; Stellar flows consume
18
- * them directly in the `@xoxno/sdk-js` Soroban transaction builders.
10
+ * struct is chain-specific and encoded by the transaction builder.
19
11
  */
20
12
  export declare class SupplyArgs {
21
13
  token: string;
@@ -12,23 +12,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.FlashLoanArgs = exports.RepayDebtWithCollateralArgs = exports.SwapCollateralArgs = exports.SwapDebtArgs = exports.MultiplyArgs = exports.LiquidateArgs = exports.LiquidateDebtPayment = exports.WithdrawArgs = exports.RepayArgs = exports.BorrowArgs = exports.SupplyArgs = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  /**
15
- * Chain-agnostic argument DTOs for the lending protocol.
15
+ * Chain-agnostic argument DTOs for the lending protocol, decoupled from
16
+ * chain-specific types:
16
17
  *
17
- * These shapes mirror the Stellar controller entry points
18
- * (see /rs-lending/stellar/controller/src/lib.rs) but are deliberately
19
- * decoupled from any chain-specific types:
20
- *
21
- * - `token` is a string (MVX uses ESDT ticker, Stellar uses contract
22
- * address, SUI uses coin type) — callers pass whatever their chain
23
- * uses, the SDK builder interprets it.
24
- * - `amount` is a string to preserve precision across u64 / u128 /
25
- * i128 backends.
18
+ * - `token` is a string (an ESDT ticker, a Soroban contract address, a
19
+ * SUI coin type whatever the target chain uses).
20
+ * - `amount` is a decimal string to preserve precision across
21
+ * u64 / u128 / i128 backends.
26
22
  * - `steps`, `data` are `unknown` — the concrete swap-path / callback
27
- * struct is chain-specific and encoded by the SDK transaction
28
- * builder.
29
- *
30
- * MVX flows can reuse these via a thin adapter; Stellar flows consume
31
- * them directly in the `@xoxno/sdk-js` Soroban transaction builders.
23
+ * struct is chain-specific and encoded by the transaction builder.
32
24
  */
33
25
  class SupplyArgs {
34
26
  }
@@ -212,14 +204,14 @@ __decorate([
212
204
  ], MultiplyArgs.prototype, "accountNonce", void 0);
213
205
  __decorate([
214
206
  (0, swagger_1.ApiProperty)({
215
- description: 'Optional initial collateral payment seeding the leverage entry (maps to the controller `initial_payment: Option<(Address, i128)>`)',
207
+ description: 'Optional initial collateral payment seeding the leverage entry',
216
208
  required: false,
217
209
  }),
218
210
  __metadata("design:type", Object)
219
211
  ], MultiplyArgs.prototype, "initialPayment", void 0);
220
212
  __decorate([
221
213
  (0, swagger_1.ApiProperty)({
222
- description: 'Optional secondary swap converting the initial payment into the collateral token (maps to `convert_swap: Option<AggregatorSwap>`); chain-specific shape encoded by the SDK builder',
214
+ description: 'Optional secondary swap converting the initial payment into the collateral token',
223
215
  required: false,
224
216
  }),
225
217
  __metadata("design:type", Object)
@@ -1,22 +1,7 @@
1
- import { AccountPositionType, PositionMode } from '../../enums/lending.enum';
2
- import { StellarLendingTopic } from '../../enums/stellar-lending-topic.enum';
3
1
  import { AssetConfigRawDto } from './stellar-lending-admin-args.dto';
4
2
  import { StellarLendingOracleUpdateStruct } from '../../cosmos-db/documents/lending/lending-oracle';
5
3
  /**
6
- * Decoded payloads for the 21 XOXNO Stellar lending controller
7
- * `#[contractevent]`s (see `rs-lending-xlm/common/src/events.rs`).
8
- *
9
- * These are the normalized shapes the `@xoxno/sdk-js` decoder registry
10
- * produces after funnelling the Soroban event `data` through
11
- * `scValToNative`: i128/u128/u64 ids and amounts are decimal strings,
12
- * u32 counts/bps are numbers, addresses/symbols are strings, int-enums are
13
- * mapped to their string enum, and absent Soroban `Option`s are `undefined`.
14
- *
15
- * Borrow-side position deltas carry no collateral risk parameters: the
16
- * contract zeroes `liquidation_threshold`/`liquidation_bonus`/`loan_to_value`
17
- * for debt positions, so the decoder surfaces them as `undefined` (not 0) to
18
- * stop consumers recording a spurious 0% threshold. There is no
19
- * `liquidationFeesBps` on the delta — that field does not exist on-chain.
4
+ * Decoded Stellar lending event payload types.
20
5
  */
21
6
  export declare class StellarMarketStateSnapshot {
22
7
  asset: string;
@@ -33,12 +18,12 @@ export declare class StellarEventAccountAttributes {
33
18
  owner: string;
34
19
  isIsolatedPosition: boolean;
35
20
  eModeCategoryId: number;
36
- mode: PositionMode;
21
+ mode: 'None' | 'Multiply' | 'Long' | 'Short';
37
22
  isolatedToken?: string;
38
23
  }
39
24
  export declare class StellarEventPositionDelta {
40
25
  action: string;
41
- positionType: AccountPositionType;
26
+ positionType: 'Deposit' | 'Borrow';
42
27
  asset: string;
43
28
  scaledAmountRay: string;
44
29
  indexRay: string;
@@ -169,66 +154,66 @@ export declare class StellarOracleTwapDegradedEvent {
169
154
  * `"<domain>:<action>"` topic. Narrow on `topic` to access the typed `data`.
170
155
  */
171
156
  export type StellarLendingDecodedEvent = {
172
- topic: StellarLendingTopic.MarketCreate;
157
+ topic: 'market:create';
173
158
  data: StellarCreateMarketEvent;
174
159
  } | {
175
- topic: StellarLendingTopic.MarketParamsUpdate;
160
+ topic: 'market:params_update';
176
161
  data: StellarUpdateMarketParamsEvent;
177
162
  } | {
178
- topic: StellarLendingTopic.MarketStateBatchUpdate;
163
+ topic: 'market:batch_state_update';
179
164
  data: StellarUpdateMarketStateBatchEvent;
180
165
  } | {
181
- topic: StellarLendingTopic.PositionBatchUpdate;
166
+ topic: 'position:batch_update';
182
167
  data: StellarUpdatePositionBatchEvent;
183
168
  } | {
184
- topic: StellarLendingTopic.PositionFlashLoan;
169
+ topic: 'position:flash_loan';
185
170
  data: StellarFlashLoanEvent;
186
171
  } | {
187
- topic: StellarLendingTopic.ConfigAsset;
172
+ topic: 'config:asset';
188
173
  data: StellarUpdateAssetConfigEvent;
189
174
  } | {
190
- topic: StellarLendingTopic.ConfigOracle;
175
+ topic: 'config:oracle';
191
176
  data: StellarUpdateAssetOracleEvent;
192
177
  } | {
193
- topic: StellarLendingTopic.ConfigEModeCategory;
178
+ topic: 'config:emode_category';
194
179
  data: StellarUpdateEModeCategoryEvent;
195
180
  } | {
196
- topic: StellarLendingTopic.ConfigEModeAsset;
181
+ topic: 'config:emode_asset';
197
182
  data: StellarUpdateEModeAssetEvent;
198
183
  } | {
199
- topic: StellarLendingTopic.ConfigRemoveEModeAsset;
184
+ topic: 'config:remove_emode_asset';
200
185
  data: StellarRemoveEModeAssetEvent;
201
186
  } | {
202
- topic: StellarLendingTopic.DebtCeilingUpdate;
187
+ topic: 'debt:ceiling_update';
203
188
  data: StellarUpdateDebtCeilingEvent;
204
189
  } | {
205
- topic: StellarLendingTopic.DebtCeilingBatchUpdate;
190
+ topic: 'debt:ceiling_batch_update';
206
191
  data: StellarUpdateDebtCeilingBatchEvent;
207
192
  } | {
208
- topic: StellarLendingTopic.DebtBadDebt;
193
+ topic: 'debt:bad_debt';
209
194
  data: StellarCleanBadDebtEvent;
210
195
  } | {
211
- topic: StellarLendingTopic.StrategyInitialPayment;
196
+ topic: 'strategy:initial_payment';
212
197
  data: StellarInitialMultiplyPaymentEvent;
213
198
  } | {
214
- topic: StellarLendingTopic.ConfigApproveToken;
199
+ topic: 'config:approve_token';
215
200
  data: StellarApproveTokenEvent;
216
201
  } | {
217
- topic: StellarLendingTopic.ConfigAggregator;
202
+ topic: 'config:aggregator';
218
203
  data: StellarUpdateAggregatorEvent;
219
204
  } | {
220
- topic: StellarLendingTopic.ConfigAccumulator;
205
+ topic: 'config:accumulator';
221
206
  data: StellarUpdateAccumulatorEvent;
222
207
  } | {
223
- topic: StellarLendingTopic.ConfigPoolTemplate;
208
+ topic: 'config:pool_template';
224
209
  data: StellarUpdatePoolTemplateEvent;
225
210
  } | {
226
- topic: StellarLendingTopic.ConfigPositionLimits;
211
+ topic: 'config:position_limits';
227
212
  data: StellarUpdatePositionLimitsEvent;
228
213
  } | {
229
- topic: StellarLendingTopic.ConfigOracleDisabled;
214
+ topic: 'config:oracle_disabled';
230
215
  data: StellarOracleDisabledEvent;
231
216
  } | {
232
- topic: StellarLendingTopic.OracleTwapDegraded;
217
+ topic: 'oracle:twap_degraded';
233
218
  data: StellarOracleTwapDegradedEvent;
234
219
  };
@@ -15,20 +15,7 @@ const lending_enum_1 = require("../../enums/lending.enum");
15
15
  const stellar_lending_admin_args_dto_1 = require("./stellar-lending-admin-args.dto");
16
16
  const lending_oracle_1 = require("../../cosmos-db/documents/lending/lending-oracle");
17
17
  /**
18
- * Decoded payloads for the 21 XOXNO Stellar lending controller
19
- * `#[contractevent]`s (see `rs-lending-xlm/common/src/events.rs`).
20
- *
21
- * These are the normalized shapes the `@xoxno/sdk-js` decoder registry
22
- * produces after funnelling the Soroban event `data` through
23
- * `scValToNative`: i128/u128/u64 ids and amounts are decimal strings,
24
- * u32 counts/bps are numbers, addresses/symbols are strings, int-enums are
25
- * mapped to their string enum, and absent Soroban `Option`s are `undefined`.
26
- *
27
- * Borrow-side position deltas carry no collateral risk parameters: the
28
- * contract zeroes `liquidation_threshold`/`liquidation_bonus`/`loan_to_value`
29
- * for debt positions, so the decoder surfaces them as `undefined` (not 0) to
30
- * stop consumers recording a spurious 0% threshold. There is no
31
- * `liquidationFeesBps` on the delta — that field does not exist on-chain.
18
+ * Decoded Stellar lending event payload types.
32
19
  */
33
20
  class StellarMarketStateSnapshot {
34
21
  }
@@ -483,7 +470,7 @@ __decorate([
483
470
  (0, swagger_1.ApiProperty)({ type: 'integer', description: 'E-mode category id' }),
484
471
  __metadata("design:type", Number)
485
472
  ], StellarRemoveEModeAssetEvent.prototype, "categoryId", void 0);
486
- // ---------- topic: debt:ceiling_update (legacy single; not emitted on-chain) ----------
473
+ // ---------- topic: debt:ceiling_update ----------
487
474
  class StellarUpdateDebtCeilingEvent {
488
475
  }
489
476
  exports.StellarUpdateDebtCeilingEvent = StellarUpdateDebtCeilingEvent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoxno/types",
3
- "version": "1.0.403",
3
+ "version": "1.0.405",
4
4
  "description": "Shared types and utilities for XOXNO API.",
5
5
  "exports": {
6
6
  ".": {