@xoxno/types 1.0.465 → 1.0.466

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.
@@ -2,6 +2,10 @@ import { StellarLendingDataType } from '../enums';
2
2
  /**
3
3
  * Liquidity truth for one asset on one hub (`hubAsset:{hubId}:{asset}`). IRM +
4
4
  * state + derived APY/utilization are event-sourced from the pool contract.
5
+ * `suppliedScaledRay`/`borrowedScaledRay`/`revenueScaledRay` hold the RAY-scaled
6
+ * shares straight from the event; multiply by the live supply/borrow index and
7
+ * denominate on read to recover token amounts. `cash` is the plain token
8
+ * base-unit balance (not index-scaled).
5
9
  */
6
10
  export declare class StellarHubAssetDoc {
7
11
  dataType: StellarLendingDataType;
@@ -21,12 +25,9 @@ export declare class StellarHubAssetDoc {
21
25
  supplyIndexRay: string;
22
26
  borrowIndexRay: string;
23
27
  cash: string;
24
- supplied: string;
25
- borrowed: string;
26
- revenue: string;
27
- suppliedShort: number;
28
- borrowedShort: number;
29
- cashShort: number;
28
+ suppliedScaledRay: string;
29
+ borrowedScaledRay: string;
30
+ revenueScaledRay: string;
30
31
  supplyApy: number;
31
32
  borrowApy: number;
32
33
  utilization: number;
@@ -5,6 +5,10 @@ const enums_1 = require("../enums");
5
5
  /**
6
6
  * Liquidity truth for one asset on one hub (`hubAsset:{hubId}:{asset}`). IRM +
7
7
  * state + derived APY/utilization are event-sourced from the pool contract.
8
+ * `suppliedScaledRay`/`borrowedScaledRay`/`revenueScaledRay` hold the RAY-scaled
9
+ * shares straight from the event; multiply by the live supply/borrow index and
10
+ * denominate on read to recover token amounts. `cash` is the plain token
11
+ * base-unit balance (not index-scaled).
8
12
  */
9
13
  class StellarHubAssetDoc {
10
14
  constructor(props) {
@@ -23,12 +27,9 @@ class StellarHubAssetDoc {
23
27
  this.supplyIndexRay = '0';
24
28
  this.borrowIndexRay = '0';
25
29
  this.cash = '0';
26
- this.supplied = '0';
27
- this.borrowed = '0';
28
- this.revenue = '0';
29
- this.suppliedShort = 0;
30
- this.borrowedShort = 0;
31
- this.cashShort = 0;
30
+ this.suppliedScaledRay = '0';
31
+ this.borrowedScaledRay = '0';
32
+ this.revenueScaledRay = '0';
32
33
  this.supplyApy = 0;
33
34
  this.borrowApy = 0;
34
35
  this.utilization = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoxno/types",
3
- "version": "1.0.465",
3
+ "version": "1.0.466",
4
4
  "description": "Shared types and utilities for XOXNO API.",
5
5
  "exports": {
6
6
  ".": {