@xoxno/types 1.0.484 → 1.0.486
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/requests/lending/stellar-lending-events.dto.d.ts +15 -0
- package/dist/requests/lending/stellar-lending-events.dto.js +17 -2
- package/dist/stellar-lending/context.d.ts +7 -0
- package/dist/stellar-lending/documents/cursor.doc.d.ts +6 -0
- package/dist/stellar-lending/documents/cursor.doc.js +6 -0
- package/dist/stellar-lending/documents/spoke-asset.doc.d.ts +8 -0
- package/dist/stellar-lending/documents/spoke-asset.doc.js +8 -0
- package/dist/stellar-lending/enums/activity.enum.d.ts +20 -0
- package/dist/stellar-lending/enums/activity.enum.js +20 -0
- package/dist/stellar-lending/kusto/activity-data.d.ts +26 -8
- package/dist/stellar-lending/list.d.ts +2 -0
- package/package.json +1 -1
|
@@ -69,6 +69,21 @@ export declare class StellarUpdateMarketParamsBatchEvent {
|
|
|
69
69
|
export declare class StellarUpdateMarketStateBatchEvent {
|
|
70
70
|
updates: StellarMarketStateSnapshot[];
|
|
71
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* One account's net position deltas for a transaction.
|
|
74
|
+
*
|
|
75
|
+
* A transaction may emit MORE THAN ONE of these. A share-credit liquidation
|
|
76
|
+
* (`SeizeMode::Credit`) emits exactly two — the liquidated account first, then
|
|
77
|
+
* the liquidator's receiving account — and both precede any `debt:bad_debt`.
|
|
78
|
+
* A transfer-mode liquidation emits exactly one. Consumers must key on
|
|
79
|
+
* `accountId` per event rather than assuming one batch per transaction.
|
|
80
|
+
*
|
|
81
|
+
* The receiver's batch is supply-side only and omits any leg whose net credit
|
|
82
|
+
* rounds to zero. It is also the ONLY announcement of a `Credit(0)`-created
|
|
83
|
+
* account: there is no account-creation event, so an indexer that discovers
|
|
84
|
+
* accounts from a creation event alone will never see it — take the identity
|
|
85
|
+
* from `accountAttributes`.
|
|
86
|
+
*/
|
|
72
87
|
export declare class StellarUpdatePositionBatchEvent {
|
|
73
88
|
accountId: string;
|
|
74
89
|
accountAttributes: StellarEventAccountAttributes;
|
|
@@ -314,6 +314,21 @@ __decorate([
|
|
|
314
314
|
__metadata("design:type", Array)
|
|
315
315
|
], StellarUpdateMarketStateBatchEvent.prototype, "updates", void 0);
|
|
316
316
|
// ---------- topic: position:batch_update ----------
|
|
317
|
+
/**
|
|
318
|
+
* One account's net position deltas for a transaction.
|
|
319
|
+
*
|
|
320
|
+
* A transaction may emit MORE THAN ONE of these. A share-credit liquidation
|
|
321
|
+
* (`SeizeMode::Credit`) emits exactly two — the liquidated account first, then
|
|
322
|
+
* the liquidator's receiving account — and both precede any `debt:bad_debt`.
|
|
323
|
+
* A transfer-mode liquidation emits exactly one. Consumers must key on
|
|
324
|
+
* `accountId` per event rather than assuming one batch per transaction.
|
|
325
|
+
*
|
|
326
|
+
* The receiver's batch is supply-side only and omits any leg whose net credit
|
|
327
|
+
* rounds to zero. It is also the ONLY announcement of a `Credit(0)`-created
|
|
328
|
+
* account: there is no account-creation event, so an indexer that discovers
|
|
329
|
+
* accounts from a creation event alone will never see it — take the identity
|
|
330
|
+
* from `accountAttributes`.
|
|
331
|
+
*/
|
|
317
332
|
class StellarUpdatePositionBatchEvent {
|
|
318
333
|
}
|
|
319
334
|
exports.StellarUpdatePositionBatchEvent = StellarUpdatePositionBatchEvent;
|
|
@@ -616,13 +631,13 @@ __decorate([
|
|
|
616
631
|
], StellarLiquidationEvent.prototype, "accountId", void 0);
|
|
617
632
|
__decorate([
|
|
618
633
|
(0, swagger_1.ApiProperty)({
|
|
619
|
-
description: 'Aggregate debt repaid, USD WAD decimal string',
|
|
634
|
+
description: 'Aggregate debt actually repaid, USD WAD decimal string. Measured receipt — net of refunds and of any shortfall from an under-delivering debt token — so it agrees with the LiqRepay legs of the position batch, not with the liquidator requested payment',
|
|
620
635
|
}),
|
|
621
636
|
__metadata("design:type", String)
|
|
622
637
|
], StellarLiquidationEvent.prototype, "repaidUsdWad", void 0);
|
|
623
638
|
__decorate([
|
|
624
639
|
(0, swagger_1.ApiProperty)({
|
|
625
|
-
description: 'Applied liquidation bonus, bps decimal string;
|
|
640
|
+
description: 'Applied liquidation bonus, bps decimal string; gross seized USD is repaid * (1 + bonus), with the protocol fee still inside that figure',
|
|
626
641
|
}),
|
|
627
642
|
__metadata("design:type", String)
|
|
628
643
|
], StellarLiquidationEvent.prototype, "bonusBps", void 0);
|
|
@@ -50,6 +50,13 @@ export interface StellarReserveDetailItem {
|
|
|
50
50
|
isBorrowable: boolean;
|
|
51
51
|
paused: boolean;
|
|
52
52
|
frozen: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Spoke-asset `no_seize`: the reserve cannot be taken as liquidation
|
|
55
|
+
* collateral. Gates only the seizure leg — supply/borrow/withdraw/repay stay
|
|
56
|
+
* open, so a liquidator must exclude this reserve from expected proceeds or
|
|
57
|
+
* the call reverts (`SpokeError::SpokeAssetSeizureHalted`).
|
|
58
|
+
*/
|
|
59
|
+
noSeize: boolean;
|
|
53
60
|
useAsCollateral: boolean;
|
|
54
61
|
targetHealthFactorWad: string;
|
|
55
62
|
healthFactorForMaxBonusWad: string;
|
|
@@ -20,6 +20,12 @@ export declare class StellarLendingCursorDoc {
|
|
|
20
20
|
poolAddress: string | null;
|
|
21
21
|
priceAggregatorAddress: string | null;
|
|
22
22
|
governanceAddress: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Position-NFT contract bound to this cursor position. NFT transfers change
|
|
25
|
+
* account ownership without any controller event, so the indexer watches it;
|
|
26
|
+
* a repoint invalidates the cursor like every other watched address.
|
|
27
|
+
*/
|
|
28
|
+
positionNftAddress: string | null;
|
|
23
29
|
/**
|
|
24
30
|
* Decode-logic version. Bumping it discards the cursor and replays everything
|
|
25
31
|
* within RPC retention, so a decoder fix reaches already-indexed events.
|
|
@@ -23,6 +23,12 @@ class StellarLendingCursorDoc {
|
|
|
23
23
|
this.poolAddress = null;
|
|
24
24
|
this.priceAggregatorAddress = null;
|
|
25
25
|
this.governanceAddress = null;
|
|
26
|
+
/**
|
|
27
|
+
* Position-NFT contract bound to this cursor position. NFT transfers change
|
|
28
|
+
* account ownership without any controller event, so the indexer watches it;
|
|
29
|
+
* a repoint invalidates the cursor like every other watched address.
|
|
30
|
+
*/
|
|
31
|
+
this.positionNftAddress = null;
|
|
26
32
|
/**
|
|
27
33
|
* Decode-logic version. Bumping it discards the cursor and replays everything
|
|
28
34
|
* within RPC retention, so a decoder fix reaches already-indexed events.
|
|
@@ -17,6 +17,14 @@ export declare class StellarSpokeAssetDoc {
|
|
|
17
17
|
isBorrowable: boolean;
|
|
18
18
|
paused: boolean;
|
|
19
19
|
frozen: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* On-chain `SpokeAssetConfig.no_seize`. Gates ONLY the liquidation seizure
|
|
22
|
+
* leg — the asset stays fully usable for supply/borrow/withdraw/repay.
|
|
23
|
+
* Independent of `paused` (blocks every user verb) and `frozen` (blocks new
|
|
24
|
+
* exposure, permits exits); seizure is deliberately not gated by `paused`
|
|
25
|
+
* because it is pro-rata across the whole collateral set.
|
|
26
|
+
*/
|
|
27
|
+
noSeize: boolean;
|
|
20
28
|
loanToValueBps: number;
|
|
21
29
|
liquidationThresholdBps: number;
|
|
22
30
|
liquidationBonusBps: number;
|
|
@@ -17,6 +17,14 @@ class StellarSpokeAssetDoc {
|
|
|
17
17
|
this.isBorrowable = false;
|
|
18
18
|
this.paused = false;
|
|
19
19
|
this.frozen = false;
|
|
20
|
+
/**
|
|
21
|
+
* On-chain `SpokeAssetConfig.no_seize`. Gates ONLY the liquidation seizure
|
|
22
|
+
* leg — the asset stays fully usable for supply/borrow/withdraw/repay.
|
|
23
|
+
* Independent of `paused` (blocks every user verb) and `frozen` (blocks new
|
|
24
|
+
* exposure, permits exits); seizure is deliberately not gated by `paused`
|
|
25
|
+
* because it is pro-rata across the whole collateral set.
|
|
26
|
+
*/
|
|
27
|
+
this.noSeize = false;
|
|
20
28
|
this.loanToValueBps = 0;
|
|
21
29
|
this.liquidationThresholdBps = 0;
|
|
22
30
|
this.liquidationBonusBps = 0;
|
|
@@ -13,6 +13,26 @@ export declare enum StellarLendingActivity {
|
|
|
13
13
|
RepayWithCollateral = "repayWithCollateral",
|
|
14
14
|
CloseWithdraw = "closeWithdraw",
|
|
15
15
|
Migrate = "migrate",
|
|
16
|
+
/**
|
|
17
|
+
* On-chain `PositionAction::LiqCredit` (15) — the collateral credited to a
|
|
18
|
+
* share-credit liquidator's receiving account. Emitted only under
|
|
19
|
+
* `SeizeMode::Credit`, on the second (receiver) position batch.
|
|
20
|
+
*
|
|
21
|
+
* Gross vs net, and the reason this is a separate tag from `LiqSeize`:
|
|
22
|
+
* `liqSeize` is the liquidated account's debit, **gross** of the protocol fee
|
|
23
|
+
* (in both seize modes); `liqCredit` is the receiver's credit, **net** of it.
|
|
24
|
+
* The fee is `liqSeize.amount - liqCredit.amount`. Summing both tags as one
|
|
25
|
+
* quantity double-counts the seizure, and reading the gross `liqSeize` figure
|
|
26
|
+
* as liquidator proceeds overstates them by the fee.
|
|
27
|
+
*/
|
|
28
|
+
LiqCredit = "liqCredit",
|
|
29
|
+
/**
|
|
30
|
+
* Position-NFT `transfer` — the whole account (collateral AND debt) changed
|
|
31
|
+
* hands outside the controller. `owner` is the receiving wallet; the row's
|
|
32
|
+
* address is the sender. Not an on-chain `PositionAction`: emitted by the
|
|
33
|
+
* position-NFT contract, not the controller.
|
|
34
|
+
*/
|
|
35
|
+
NftTransfer = "nftTransfer",
|
|
16
36
|
FlashLoan = "flashLoan",
|
|
17
37
|
BadDebt = "badDebt",
|
|
18
38
|
StrategyFee = "strategyFee",
|
|
@@ -17,6 +17,26 @@ var StellarLendingActivity;
|
|
|
17
17
|
StellarLendingActivity["RepayWithCollateral"] = "repayWithCollateral";
|
|
18
18
|
StellarLendingActivity["CloseWithdraw"] = "closeWithdraw";
|
|
19
19
|
StellarLendingActivity["Migrate"] = "migrate";
|
|
20
|
+
/**
|
|
21
|
+
* On-chain `PositionAction::LiqCredit` (15) — the collateral credited to a
|
|
22
|
+
* share-credit liquidator's receiving account. Emitted only under
|
|
23
|
+
* `SeizeMode::Credit`, on the second (receiver) position batch.
|
|
24
|
+
*
|
|
25
|
+
* Gross vs net, and the reason this is a separate tag from `LiqSeize`:
|
|
26
|
+
* `liqSeize` is the liquidated account's debit, **gross** of the protocol fee
|
|
27
|
+
* (in both seize modes); `liqCredit` is the receiver's credit, **net** of it.
|
|
28
|
+
* The fee is `liqSeize.amount - liqCredit.amount`. Summing both tags as one
|
|
29
|
+
* quantity double-counts the seizure, and reading the gross `liqSeize` figure
|
|
30
|
+
* as liquidator proceeds overstates them by the fee.
|
|
31
|
+
*/
|
|
32
|
+
StellarLendingActivity["LiqCredit"] = "liqCredit";
|
|
33
|
+
/**
|
|
34
|
+
* Position-NFT `transfer` — the whole account (collateral AND debt) changed
|
|
35
|
+
* hands outside the controller. `owner` is the receiving wallet; the row's
|
|
36
|
+
* address is the sender. Not an on-chain `PositionAction`: emitted by the
|
|
37
|
+
* position-NFT contract, not the controller.
|
|
38
|
+
*/
|
|
39
|
+
StellarLendingActivity["NftTransfer"] = "nftTransfer";
|
|
20
40
|
StellarLendingActivity["FlashLoan"] = "flashLoan";
|
|
21
41
|
StellarLendingActivity["BadDebt"] = "badDebt";
|
|
22
42
|
StellarLendingActivity["StrategyFee"] = "strategyFee";
|
|
@@ -14,7 +14,14 @@ export interface StellarLendingActivityData {
|
|
|
14
14
|
accountId: string | null;
|
|
15
15
|
owner: string | null;
|
|
16
16
|
token: string;
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Action delta amount (this tx), big-int string.
|
|
19
|
+
*
|
|
20
|
+
* Liquidation caveat: a share-credit liquidation emits BOTH a `liqSeize` leg
|
|
21
|
+
* on the liquidated account (gross of the protocol fee) and a `liqCredit` leg
|
|
22
|
+
* on the receiving account (net of it) for the same seizure. Summing the two
|
|
23
|
+
* tags double-counts it — pick one side per query.
|
|
24
|
+
*/
|
|
18
25
|
amount: string;
|
|
19
26
|
/**
|
|
20
27
|
* Display-unit delta. `null` when the asset header decimals are not yet
|
|
@@ -77,21 +84,32 @@ export interface StellarLendingActivityData {
|
|
|
77
84
|
loanToValueBps: number | null;
|
|
78
85
|
liquidationFeesBps: number | null;
|
|
79
86
|
/**
|
|
80
|
-
* Liquidator (caller) address on liquidation legs
|
|
81
|
-
* correlated by tx from the on-chain
|
|
82
|
-
* rows. Enables a top-liquidators
|
|
83
|
-
*
|
|
87
|
+
* Liquidator (caller) address on liquidation legs
|
|
88
|
+
* (`liqRepay`/`liqSeize`/`liqCredit`), correlated by tx from the on-chain
|
|
89
|
+
* `LiquidationEvent`. `null` on all other rows. Enables a top-liquidators
|
|
90
|
+
* leaderboard.
|
|
91
|
+
*
|
|
92
|
+
* Whose account the leg belongs to differs by tag: on `liqRepay`/`liqSeize`
|
|
93
|
+
* the `accountId`/`owner` are the liquidatee, on `liqCredit` they are the
|
|
94
|
+
* liquidator's own receiving account (share-credit mode). Do not treat
|
|
95
|
+
* `owner` as the liquidatee without filtering the tag.
|
|
84
96
|
*/
|
|
85
97
|
liquidator: string | null;
|
|
86
98
|
/**
|
|
87
99
|
* Aggregate debt repaid (USD WAD string) from `position:liquidation`, stamped
|
|
88
|
-
* onto same-tx `liqRepay`/`liqSeize` legs. `null` on
|
|
100
|
+
* onto same-tx `liqRepay`/`liqSeize`/`liqCredit` legs. `null` on
|
|
101
|
+
* non-liquidation rows.
|
|
102
|
+
*
|
|
103
|
+
* This is the MEASURED receipt — net of refunds and of any shortfall from an
|
|
104
|
+
* under-delivering debt token — so it agrees with the `liqRepay` legs, not
|
|
105
|
+
* with the liquidator's requested payment.
|
|
89
106
|
*/
|
|
90
107
|
repaidUsdWad?: string | null;
|
|
91
108
|
/**
|
|
92
109
|
* Applied liquidation bonus (bps string) from `position:liquidation`, stamped
|
|
93
|
-
* onto same-tx `liqRepay`/`liqSeize` legs.
|
|
94
|
-
* repaid * (1 + bonus / 10_000)
|
|
110
|
+
* onto same-tx `liqRepay`/`liqSeize`/`liqCredit` legs. Gross seized USD ≈
|
|
111
|
+
* repaid * (1 + bonus / 10_000) — the protocol fee is still inside that
|
|
112
|
+
* figure. `null` on non-liquidation rows.
|
|
95
113
|
*/
|
|
96
114
|
bonusBps?: string | null;
|
|
97
115
|
/**
|
|
@@ -76,6 +76,8 @@ export interface StellarAssetPageMarket {
|
|
|
76
76
|
isBorrowable: boolean;
|
|
77
77
|
paused: boolean;
|
|
78
78
|
frozen: boolean;
|
|
79
|
+
/** Spoke-asset `no_seize`: cannot be taken as liquidation collateral. */
|
|
80
|
+
noSeize: boolean;
|
|
79
81
|
supplyCapShort: number;
|
|
80
82
|
borrowCapShort: number;
|
|
81
83
|
depositCapFilledPct: number;
|