@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.
@@ -4,6 +4,5 @@ export * from './hub-asset.doc';
4
4
  export * from './spoke.doc';
5
5
  export * from './spoke-asset.doc';
6
6
  export * from './account-position.doc';
7
- export * from './top-holders.doc';
8
7
  export * from './governance-proposal.doc';
9
8
  export * from './cursor.doc';
@@ -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);
@@ -5,7 +5,6 @@ export declare enum StellarLendingDataType {
5
5
  SPOKE = "spoke",
6
6
  SPOKE_ASSET = "spokeAsset",
7
7
  ACCOUNT_POSITION = "accountPosition",
8
- TOP_HOLDERS = "topHolders",
9
8
  GOVERNANCE_PROPOSAL = "governanceProposal",
10
9
  CURSOR = "cursor"
11
10
  }
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoxno/types",
3
- "version": "1.0.429",
3
+ "version": "1.0.430",
4
4
  "description": "Shared types and utilities for XOXNO API.",
5
5
  "exports": {
6
6
  ".": {
@@ -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;