@xoxno/types 1.0.429 → 1.0.430
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/stellar-lending/documents/index.d.ts +0 -1
- package/dist/stellar-lending/documents/index.js +0 -1
- package/dist/stellar-lending/enums/data-type.enum.d.ts +0 -1
- package/dist/stellar-lending/enums/data-type.enum.js +0 -1
- package/dist/stellar-lending/kusto/activity-data.d.ts +24 -0
- package/package.json +1 -1
- package/dist/stellar-lending/documents/top-holders.doc.d.ts +0 -22
- package/dist/stellar-lending/documents/top-holders.doc.js +0 -16
|
@@ -20,6 +20,5 @@ __exportStar(require("./hub-asset.doc"), exports);
|
|
|
20
20
|
__exportStar(require("./spoke.doc"), exports);
|
|
21
21
|
__exportStar(require("./spoke-asset.doc"), exports);
|
|
22
22
|
__exportStar(require("./account-position.doc"), exports);
|
|
23
|
-
__exportStar(require("./top-holders.doc"), exports);
|
|
24
23
|
__exportStar(require("./governance-proposal.doc"), exports);
|
|
25
24
|
__exportStar(require("./cursor.doc"), exports);
|
|
@@ -9,7 +9,6 @@ var StellarLendingDataType;
|
|
|
9
9
|
StellarLendingDataType["SPOKE"] = "spoke";
|
|
10
10
|
StellarLendingDataType["SPOKE_ASSET"] = "spokeAsset";
|
|
11
11
|
StellarLendingDataType["ACCOUNT_POSITION"] = "accountPosition";
|
|
12
|
-
StellarLendingDataType["TOP_HOLDERS"] = "topHolders";
|
|
13
12
|
StellarLendingDataType["GOVERNANCE_PROPOSAL"] = "governanceProposal";
|
|
14
13
|
StellarLendingDataType["CURSOR"] = "cursor";
|
|
15
14
|
})(StellarLendingDataType || (exports.StellarLendingDataType = StellarLendingDataType = {}));
|
|
@@ -12,9 +12,33 @@ export interface StellarLendingActivityData {
|
|
|
12
12
|
accountId: string | null;
|
|
13
13
|
owner: string | null;
|
|
14
14
|
token: string;
|
|
15
|
+
/** Action delta amount (this tx), big-int string. */
|
|
15
16
|
amount: string;
|
|
16
17
|
amountShort: number;
|
|
17
18
|
oraclePrice: number | null;
|
|
18
19
|
usd: number | null;
|
|
19
20
|
feeShort?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Which side of the position this row mutated (`null` for non-position
|
|
23
|
+
* events: flash loan, strategy fee, bad-debt header).
|
|
24
|
+
*/
|
|
25
|
+
side: 'supply' | 'borrow' | null;
|
|
26
|
+
/**
|
|
27
|
+
* Position's RESULTING scaled balance (27-dec RAY) on `side` AFTER the
|
|
28
|
+
* action — `'0'` when the position is closed. `null` for non-position events.
|
|
29
|
+
* Source of truth for current/historical holders via `arg_max(seq)`.
|
|
30
|
+
*/
|
|
31
|
+
balanceScaledRay: string | null;
|
|
32
|
+
/**
|
|
33
|
+
* Denominated resulting balance (display units) — numeric so Kusto can rank
|
|
34
|
+
* holders directly (within a reserve, amount order == scaled order). `null`
|
|
35
|
+
* for non-position events.
|
|
36
|
+
*/
|
|
37
|
+
balanceShort: number | null;
|
|
38
|
+
/**
|
|
39
|
+
* Monotonic event ordinal `ledger * 1e6 + indexInLedger`, derived from the
|
|
40
|
+
* Soroban `getEvents` id `"<ledger>-<index>"`. Use as the `arg_max` key to
|
|
41
|
+
* pick each holder's latest balance deterministically.
|
|
42
|
+
*/
|
|
43
|
+
seq: number;
|
|
20
44
|
}
|
package/package.json
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { StellarLendingDataType } from '../enums';
|
|
2
|
-
export interface StellarTopHolder {
|
|
3
|
-
owner: string;
|
|
4
|
-
accountId: string;
|
|
5
|
-
scaledRay: string;
|
|
6
|
-
amountShort: number;
|
|
7
|
-
sharePct: number;
|
|
8
|
-
}
|
|
9
|
-
export declare class StellarTopHoldersDoc {
|
|
10
|
-
dataType: StellarLendingDataType;
|
|
11
|
-
spokeId: number;
|
|
12
|
-
hubId: number;
|
|
13
|
-
asset: string;
|
|
14
|
-
side: 'deposits' | 'borrows';
|
|
15
|
-
totalScaledRay: string;
|
|
16
|
-
holders: StellarTopHolder[];
|
|
17
|
-
updatedAt: number;
|
|
18
|
-
id: string;
|
|
19
|
-
pk: string;
|
|
20
|
-
_ts?: number;
|
|
21
|
-
constructor(props?: Partial<StellarTopHoldersDoc>);
|
|
22
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StellarTopHoldersDoc = void 0;
|
|
4
|
-
const enums_1 = require("../enums");
|
|
5
|
-
class StellarTopHoldersDoc {
|
|
6
|
-
constructor(props) {
|
|
7
|
-
this.dataType = enums_1.StellarLendingDataType.TOP_HOLDERS;
|
|
8
|
-
this.totalScaledRay = '0';
|
|
9
|
-
this.holders = [];
|
|
10
|
-
this.updatedAt = 0;
|
|
11
|
-
Object.assign(this, props);
|
|
12
|
-
this.pk = this.dataType;
|
|
13
|
-
this.id = `topHolders:${this.spokeId}:${this.hubId}:${this.asset}:${this.side}`;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.StellarTopHoldersDoc = StellarTopHoldersDoc;
|