@xoxno/types 1.0.427 → 1.0.428

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.
Files changed (39) hide show
  1. package/dist/stellar-lending/documents/account-position.doc.d.ts +35 -0
  2. package/dist/stellar-lending/documents/account-position.doc.js +31 -0
  3. package/dist/stellar-lending/documents/asset.doc.d.ts +23 -0
  4. package/dist/stellar-lending/documents/asset.doc.js +23 -0
  5. package/dist/stellar-lending/documents/cursor.doc.d.ts +11 -0
  6. package/dist/stellar-lending/documents/cursor.doc.js +16 -0
  7. package/dist/stellar-lending/documents/governance-proposal.doc.d.ts +49 -0
  8. package/dist/stellar-lending/documents/governance-proposal.doc.js +22 -0
  9. package/dist/stellar-lending/documents/hub-asset.doc.d.ts +45 -0
  10. package/dist/stellar-lending/documents/hub-asset.doc.js +48 -0
  11. package/dist/stellar-lending/documents/hub.doc.d.ts +18 -0
  12. package/dist/stellar-lending/documents/hub.doc.js +22 -0
  13. package/dist/stellar-lending/documents/index.d.ts +9 -0
  14. package/dist/stellar-lending/documents/index.js +25 -0
  15. package/dist/stellar-lending/documents/spoke-asset.doc.d.ts +34 -0
  16. package/dist/stellar-lending/documents/spoke-asset.doc.js +35 -0
  17. package/dist/stellar-lending/documents/spoke.doc.d.ts +20 -0
  18. package/dist/stellar-lending/documents/spoke.doc.js +24 -0
  19. package/dist/stellar-lending/documents/top-holders.doc.d.ts +22 -0
  20. package/dist/stellar-lending/documents/top-holders.doc.js +16 -0
  21. package/dist/stellar-lending/enums/activity.enum.d.ts +17 -0
  22. package/dist/stellar-lending/enums/activity.enum.js +21 -0
  23. package/dist/stellar-lending/enums/data-type.enum.d.ts +11 -0
  24. package/dist/stellar-lending/enums/data-type.enum.js +15 -0
  25. package/dist/stellar-lending/enums/governance.enum.d.ts +60 -0
  26. package/dist/stellar-lending/enums/governance.enum.js +66 -0
  27. package/dist/stellar-lending/enums/index.d.ts +3 -0
  28. package/dist/stellar-lending/enums/index.js +19 -0
  29. package/dist/stellar-lending/index.d.ts +4 -0
  30. package/dist/stellar-lending/index.js +20 -0
  31. package/dist/stellar-lending/kusto/activity-data.d.ts +20 -0
  32. package/dist/stellar-lending/kusto/activity-data.js +2 -0
  33. package/dist/stellar-lending/kusto/index.d.ts +2 -0
  34. package/dist/stellar-lending/kusto/index.js +18 -0
  35. package/dist/stellar-lending/kusto/market-snapshot-row.d.ts +25 -0
  36. package/dist/stellar-lending/kusto/market-snapshot-row.js +2 -0
  37. package/dist/stellar-lending/oracle-provider.d.ts +40 -0
  38. package/dist/stellar-lending/oracle-provider.js +2 -0
  39. package/package.json +8 -2
@@ -0,0 +1,35 @@
1
+ import { StellarLendingDataType } from '../enums';
2
+ export interface StellarInitialPaymentMultiplier {
3
+ initialPaymentAmount: string;
4
+ initialPaymentToken: string;
5
+ usdValue: string;
6
+ }
7
+ /**
8
+ * One account's position in one reserve (`account:{accountId}:{hubId}:{asset}`).
9
+ * Partitioned by `accountId` so a full account loads single-partition. Entry
10
+ * risk params are snapshotted at open time.
11
+ */
12
+ export declare class StellarAccountPositionDoc {
13
+ dataType: StellarLendingDataType;
14
+ accountId: string;
15
+ owner: string;
16
+ spokeId: number;
17
+ positionMode: number;
18
+ hubId: number;
19
+ asset: string;
20
+ supplyScaledRay: string;
21
+ borrowScaledRay: string;
22
+ supplyIndexRay: string | null;
23
+ borrowIndexRay: string | null;
24
+ entryLtvBps: number;
25
+ entryLiquidationThresholdBps: number;
26
+ entryLiquidationBonusBps: number;
27
+ entryLiquidationFeesBps: number;
28
+ initialPaymentMultiplier: StellarInitialPaymentMultiplier | null;
29
+ updatedAt: number;
30
+ ledger: number;
31
+ id: string;
32
+ pk: string;
33
+ _ts?: number;
34
+ constructor(props?: Partial<StellarAccountPositionDoc>);
35
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StellarAccountPositionDoc = void 0;
4
+ const enums_1 = require("../enums");
5
+ /**
6
+ * One account's position in one reserve (`account:{accountId}:{hubId}:{asset}`).
7
+ * Partitioned by `accountId` so a full account loads single-partition. Entry
8
+ * risk params are snapshotted at open time.
9
+ */
10
+ class StellarAccountPositionDoc {
11
+ constructor(props) {
12
+ this.dataType = enums_1.StellarLendingDataType.ACCOUNT_POSITION;
13
+ this.spokeId = 0;
14
+ this.positionMode = 0;
15
+ this.supplyScaledRay = '0';
16
+ this.borrowScaledRay = '0';
17
+ this.supplyIndexRay = null;
18
+ this.borrowIndexRay = null;
19
+ this.entryLtvBps = 0;
20
+ this.entryLiquidationThresholdBps = 0;
21
+ this.entryLiquidationBonusBps = 0;
22
+ this.entryLiquidationFeesBps = 0;
23
+ this.initialPaymentMultiplier = null;
24
+ this.updatedAt = 0;
25
+ this.ledger = 0;
26
+ Object.assign(this, props);
27
+ this.pk = this.accountId;
28
+ this.id = `account:${this.accountId}:${this.hubId}:${this.asset}`;
29
+ }
30
+ }
31
+ exports.StellarAccountPositionDoc = StellarAccountPositionDoc;
@@ -0,0 +1,23 @@
1
+ import { StellarLendingDataType } from '../enums';
2
+ import type { StellarOracleProvider } from '../oracle-provider';
3
+ export declare class StellarAssetDoc {
4
+ dataType: StellarLendingDataType;
5
+ asset: string;
6
+ symbol: string;
7
+ name: string;
8
+ decimals: number;
9
+ oracleProvider: StellarOracleProvider | null;
10
+ usdPriceWad: string;
11
+ usdPriceShort: number;
12
+ totalDepositsUsd: string;
13
+ totalBorrowsUsd: string;
14
+ availableLiquidityUsd: string;
15
+ hubCount: number;
16
+ reserveCount: number;
17
+ updatedAt: number;
18
+ ledger: number;
19
+ id: string;
20
+ pk: string;
21
+ _ts?: number;
22
+ constructor(props?: Partial<StellarAssetDoc>);
23
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StellarAssetDoc = void 0;
4
+ const enums_1 = require("../enums");
5
+ class StellarAssetDoc {
6
+ constructor(props) {
7
+ this.dataType = enums_1.StellarLendingDataType.ASSET;
8
+ this.oracleProvider = null;
9
+ this.usdPriceWad = '0';
10
+ this.usdPriceShort = 0;
11
+ this.totalDepositsUsd = '0';
12
+ this.totalBorrowsUsd = '0';
13
+ this.availableLiquidityUsd = '0';
14
+ this.hubCount = 0;
15
+ this.reserveCount = 0;
16
+ this.updatedAt = 0;
17
+ this.ledger = 0;
18
+ Object.assign(this, props);
19
+ this.pk = this.dataType;
20
+ this.id = `asset:${this.asset}`;
21
+ }
22
+ }
23
+ exports.StellarAssetDoc = StellarAssetDoc;
@@ -0,0 +1,11 @@
1
+ import { StellarLendingDataType } from '../enums';
2
+ export declare class StellarLendingCursorDoc {
3
+ dataType: StellarLendingDataType;
4
+ lastLedger: number;
5
+ lastPagingToken: string | null;
6
+ updatedAt: number;
7
+ id: string;
8
+ pk: string;
9
+ _ts?: number;
10
+ constructor(props?: Partial<StellarLendingCursorDoc>);
11
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StellarLendingCursorDoc = void 0;
4
+ const enums_1 = require("../enums");
5
+ class StellarLendingCursorDoc {
6
+ constructor(props) {
7
+ this.dataType = enums_1.StellarLendingDataType.CURSOR;
8
+ this.lastLedger = 0;
9
+ this.lastPagingToken = null;
10
+ this.updatedAt = 0;
11
+ Object.assign(this, props);
12
+ this.pk = this.dataType;
13
+ this.id = 'cursor:stellar-lending';
14
+ }
15
+ }
16
+ exports.StellarLendingCursorDoc = StellarLendingCursorDoc;
@@ -0,0 +1,49 @@
1
+ import { StellarGovernanceProposalKind, StellarGovernanceProposalStatus, StellarGovernanceProposalTarget, StellarLendingDataType } from '../enums';
2
+ /**
3
+ * One decoded "what will change" row for a governance proposal, rendered as a
4
+ * label/value pair by the indexer.
5
+ */
6
+ export interface StellarGovernanceProposalField {
7
+ label: string;
8
+ value: string;
9
+ }
10
+ /**
11
+ * A timelock proposal on the Stellar lending governance contract. Persistence
12
+ * shape (no swagger decorators); api-v2 owns the response DTO.
13
+ *
14
+ * `status` is the coarse event-derived state (Pending/Executed/Cancelled);
15
+ * Waiting/Ready/Expired are derived client-side from the ledger fields.
16
+ */
17
+ export declare class StellarGovernanceProposalDoc {
18
+ dataType: StellarLendingDataType;
19
+ operationId: string;
20
+ kind: StellarGovernanceProposalKind;
21
+ status: StellarGovernanceProposalStatus;
22
+ target: StellarGovernanceProposalTarget;
23
+ targetAddress: string;
24
+ functionName: string;
25
+ argsXdr: string[];
26
+ salt: string;
27
+ predecessor: string;
28
+ proposer: string;
29
+ assetAddress?: string;
30
+ assetSymbol?: string;
31
+ summary: string;
32
+ fields: StellarGovernanceProposalField[];
33
+ scheduledLedger: number;
34
+ readyLedger: number;
35
+ delayLedgers: number;
36
+ expiresLedger: number;
37
+ executedLedger?: number;
38
+ cancelledLedger?: number;
39
+ scheduledAt: number;
40
+ executedAt?: number;
41
+ cancelledAt?: number;
42
+ scheduledTxHash: string;
43
+ executedTxHash?: string;
44
+ cancelledTxHash?: string;
45
+ id: string;
46
+ pk: string;
47
+ _ts?: number;
48
+ constructor(props?: Partial<StellarGovernanceProposalDoc>);
49
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StellarGovernanceProposalDoc = void 0;
4
+ const enums_1 = require("../enums");
5
+ /**
6
+ * A timelock proposal on the Stellar lending governance contract. Persistence
7
+ * shape (no swagger decorators); api-v2 owns the response DTO.
8
+ *
9
+ * `status` is the coarse event-derived state (Pending/Executed/Cancelled);
10
+ * Waiting/Ready/Expired are derived client-side from the ledger fields.
11
+ */
12
+ class StellarGovernanceProposalDoc {
13
+ constructor(props) {
14
+ this.dataType = enums_1.StellarLendingDataType.GOVERNANCE_PROPOSAL;
15
+ this.argsXdr = [];
16
+ this.fields = [];
17
+ Object.assign(this, props);
18
+ this.pk = this.dataType;
19
+ this.id = this.operationId;
20
+ }
21
+ }
22
+ exports.StellarGovernanceProposalDoc = StellarGovernanceProposalDoc;
@@ -0,0 +1,45 @@
1
+ import { StellarLendingDataType } from '../enums';
2
+ /**
3
+ * Liquidity truth for one asset on one hub (`hubAsset:{hubId}:{asset}`). IRM +
4
+ * state + derived APY/utilization are event-sourced from the pool contract.
5
+ */
6
+ export declare class StellarHubAssetDoc {
7
+ dataType: StellarLendingDataType;
8
+ hubId: number;
9
+ asset: string;
10
+ assetDecimals: number;
11
+ marketAddress: string;
12
+ maxBorrowRateRay: string;
13
+ baseBorrowRateRay: string;
14
+ slope1Ray: string;
15
+ slope2Ray: string;
16
+ slope3Ray: string;
17
+ midUtilizationRay: string;
18
+ optimalUtilizationRay: string;
19
+ maxUtilizationRay: string;
20
+ reserveFactorBps: number;
21
+ supplyIndexRay: string;
22
+ borrowIndexRay: string;
23
+ cash: string;
24
+ supplied: string;
25
+ borrowed: string;
26
+ revenue: string;
27
+ suppliedShort: number;
28
+ borrowedShort: number;
29
+ cashShort: number;
30
+ supplyApy: number;
31
+ borrowApy: number;
32
+ utilization: number;
33
+ supplyCap: string;
34
+ borrowCap: string;
35
+ supplyCapShort: number;
36
+ borrowCapShort: number;
37
+ isFlashloanable: boolean;
38
+ flashloanFeeBps: number;
39
+ updatedAt: number;
40
+ ledger: number;
41
+ id: string;
42
+ pk: string;
43
+ _ts?: number;
44
+ constructor(props?: Partial<StellarHubAssetDoc>);
45
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StellarHubAssetDoc = void 0;
4
+ const enums_1 = require("../enums");
5
+ /**
6
+ * Liquidity truth for one asset on one hub (`hubAsset:{hubId}:{asset}`). IRM +
7
+ * state + derived APY/utilization are event-sourced from the pool contract.
8
+ */
9
+ class StellarHubAssetDoc {
10
+ constructor(props) {
11
+ this.dataType = enums_1.StellarLendingDataType.HUB_ASSET;
12
+ this.assetDecimals = 0;
13
+ this.marketAddress = '';
14
+ this.maxBorrowRateRay = '0';
15
+ this.baseBorrowRateRay = '0';
16
+ this.slope1Ray = '0';
17
+ this.slope2Ray = '0';
18
+ this.slope3Ray = '0';
19
+ this.midUtilizationRay = '0';
20
+ this.optimalUtilizationRay = '0';
21
+ this.maxUtilizationRay = '0';
22
+ this.reserveFactorBps = 0;
23
+ this.supplyIndexRay = '0';
24
+ this.borrowIndexRay = '0';
25
+ 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;
32
+ this.supplyApy = 0;
33
+ this.borrowApy = 0;
34
+ this.utilization = 0;
35
+ this.supplyCap = '0';
36
+ this.borrowCap = '0';
37
+ this.supplyCapShort = 0;
38
+ this.borrowCapShort = 0;
39
+ this.isFlashloanable = false;
40
+ this.flashloanFeeBps = 0;
41
+ this.updatedAt = 0;
42
+ this.ledger = 0;
43
+ Object.assign(this, props);
44
+ this.pk = this.dataType;
45
+ this.id = `hubAsset:${this.hubId}:${this.asset}`;
46
+ }
47
+ }
48
+ exports.StellarHubAssetDoc = StellarHubAssetDoc;
@@ -0,0 +1,18 @@
1
+ import { StellarLendingDataType } from '../enums';
2
+ export declare class StellarHubDoc {
3
+ dataType: StellarLendingDataType;
4
+ hubId: number;
5
+ isActive: boolean;
6
+ name: string | null;
7
+ totalDepositsUsd: string;
8
+ totalBorrowsUsd: string;
9
+ availableLiquidityUsd: string;
10
+ utilization: number;
11
+ assetCount: number;
12
+ updatedAt: number;
13
+ ledger: number;
14
+ id: string;
15
+ pk: string;
16
+ _ts?: number;
17
+ constructor(props?: Partial<StellarHubDoc>);
18
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StellarHubDoc = void 0;
4
+ const enums_1 = require("../enums");
5
+ class StellarHubDoc {
6
+ constructor(props) {
7
+ this.dataType = enums_1.StellarLendingDataType.HUB;
8
+ this.isActive = true;
9
+ this.name = null;
10
+ this.totalDepositsUsd = '0';
11
+ this.totalBorrowsUsd = '0';
12
+ this.availableLiquidityUsd = '0';
13
+ this.utilization = 0;
14
+ this.assetCount = 0;
15
+ this.updatedAt = 0;
16
+ this.ledger = 0;
17
+ Object.assign(this, props);
18
+ this.pk = this.dataType;
19
+ this.id = `hub:${this.hubId}`;
20
+ }
21
+ }
22
+ exports.StellarHubDoc = StellarHubDoc;
@@ -0,0 +1,9 @@
1
+ export * from './asset.doc';
2
+ export * from './hub.doc';
3
+ export * from './hub-asset.doc';
4
+ export * from './spoke.doc';
5
+ export * from './spoke-asset.doc';
6
+ export * from './account-position.doc';
7
+ export * from './top-holders.doc';
8
+ export * from './governance-proposal.doc';
9
+ export * from './cursor.doc';
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./asset.doc"), exports);
18
+ __exportStar(require("./hub.doc"), exports);
19
+ __exportStar(require("./hub-asset.doc"), exports);
20
+ __exportStar(require("./spoke.doc"), exports);
21
+ __exportStar(require("./spoke-asset.doc"), exports);
22
+ __exportStar(require("./account-position.doc"), exports);
23
+ __exportStar(require("./top-holders.doc"), exports);
24
+ __exportStar(require("./governance-proposal.doc"), exports);
25
+ __exportStar(require("./cursor.doc"), exports);
@@ -0,0 +1,34 @@
1
+ import { StellarLendingDataType } from '../enums';
2
+ import type { StellarOracleProvider } from '../oracle-provider';
3
+ /**
4
+ * Risk truth for one asset in one spoke on one hub
5
+ * (`spokeAsset:{spokeId}:{hubId}:{asset}`). LTV, liquidation params, flags, and
6
+ * per-spoke usage are event-sourced from the controller contract.
7
+ */
8
+ export declare class StellarSpokeAssetDoc {
9
+ dataType: StellarLendingDataType;
10
+ spokeId: number;
11
+ hubId: number;
12
+ asset: string;
13
+ isCollateralizable: boolean;
14
+ isBorrowable: boolean;
15
+ paused: boolean;
16
+ frozen: boolean;
17
+ loanToValueBps: number;
18
+ liquidationThresholdBps: number;
19
+ liquidationBonusBps: number;
20
+ liquidationFeesBps: number;
21
+ supplyCap: string;
22
+ borrowCap: string;
23
+ supplyCapShort: number;
24
+ borrowCapShort: number;
25
+ oracleOverride: StellarOracleProvider | null;
26
+ suppliedScaledRay: string;
27
+ borrowedScaledRay: string;
28
+ updatedAt: number;
29
+ ledger: number;
30
+ id: string;
31
+ pk: string;
32
+ _ts?: number;
33
+ constructor(props?: Partial<StellarSpokeAssetDoc>);
34
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StellarSpokeAssetDoc = void 0;
4
+ const enums_1 = require("../enums");
5
+ /**
6
+ * Risk truth for one asset in one spoke on one hub
7
+ * (`spokeAsset:{spokeId}:{hubId}:{asset}`). LTV, liquidation params, flags, and
8
+ * per-spoke usage are event-sourced from the controller contract.
9
+ */
10
+ class StellarSpokeAssetDoc {
11
+ constructor(props) {
12
+ this.dataType = enums_1.StellarLendingDataType.SPOKE_ASSET;
13
+ this.isCollateralizable = false;
14
+ this.isBorrowable = false;
15
+ this.paused = false;
16
+ this.frozen = false;
17
+ this.loanToValueBps = 0;
18
+ this.liquidationThresholdBps = 0;
19
+ this.liquidationBonusBps = 0;
20
+ this.liquidationFeesBps = 0;
21
+ this.supplyCap = '0';
22
+ this.borrowCap = '0';
23
+ this.supplyCapShort = 0;
24
+ this.borrowCapShort = 0;
25
+ this.oracleOverride = null;
26
+ this.suppliedScaledRay = '0';
27
+ this.borrowedScaledRay = '0';
28
+ this.updatedAt = 0;
29
+ this.ledger = 0;
30
+ Object.assign(this, props);
31
+ this.pk = this.dataType;
32
+ this.id = `spokeAsset:${this.spokeId}:${this.hubId}:${this.asset}`;
33
+ }
34
+ }
35
+ exports.StellarSpokeAssetDoc = StellarSpokeAssetDoc;
@@ -0,0 +1,20 @@
1
+ import { StellarLendingDataType } from '../enums';
2
+ export declare class StellarSpokeDoc {
3
+ dataType: StellarLendingDataType;
4
+ spokeId: number;
5
+ isDeprecated: boolean;
6
+ name: string | null;
7
+ liquidationTargetHfWad: string;
8
+ healthFactorForMaxBonusWad: string;
9
+ liquidationBonusFactorBps: number;
10
+ totalDepositsUsd: string;
11
+ totalBorrowsUsd: string;
12
+ assetCount: number;
13
+ connectedHubIds: number[];
14
+ updatedAt: number;
15
+ ledger: number;
16
+ id: string;
17
+ pk: string;
18
+ _ts?: number;
19
+ constructor(props?: Partial<StellarSpokeDoc>);
20
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StellarSpokeDoc = void 0;
4
+ const enums_1 = require("../enums");
5
+ class StellarSpokeDoc {
6
+ constructor(props) {
7
+ this.dataType = enums_1.StellarLendingDataType.SPOKE;
8
+ this.isDeprecated = false;
9
+ this.name = null;
10
+ this.liquidationTargetHfWad = '0';
11
+ this.healthFactorForMaxBonusWad = '0';
12
+ this.liquidationBonusFactorBps = 0;
13
+ this.totalDepositsUsd = '0';
14
+ this.totalBorrowsUsd = '0';
15
+ this.assetCount = 0;
16
+ this.connectedHubIds = [];
17
+ this.updatedAt = 0;
18
+ this.ledger = 0;
19
+ Object.assign(this, props);
20
+ this.pk = this.dataType;
21
+ this.id = `spoke:${this.spokeId}`;
22
+ }
23
+ }
24
+ exports.StellarSpokeDoc = StellarSpokeDoc;
@@ -0,0 +1,22 @@
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
+ }
@@ -0,0 +1,16 @@
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;
@@ -0,0 +1,17 @@
1
+ export declare enum StellarLendingActivity {
2
+ Supply = "supply",
3
+ Borrow = "borrow",
4
+ Withdraw = "withdraw",
5
+ Repay = "repay",
6
+ LiqRepay = "liqRepay",
7
+ LiqSeize = "liqSeize",
8
+ Multiply = "multiply",
9
+ SwapDebt = "swapDebt",
10
+ SwapCollateral = "swapCollateral",
11
+ RepayWithCollateral = "repayWithCollateral",
12
+ CloseWithdraw = "closeWithdraw",
13
+ Migrate = "migrate",
14
+ FlashLoan = "flashLoan",
15
+ BadDebt = "badDebt",
16
+ StrategyFee = "strategyFee"
17
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StellarLendingActivity = void 0;
4
+ var StellarLendingActivity;
5
+ (function (StellarLendingActivity) {
6
+ StellarLendingActivity["Supply"] = "supply";
7
+ StellarLendingActivity["Borrow"] = "borrow";
8
+ StellarLendingActivity["Withdraw"] = "withdraw";
9
+ StellarLendingActivity["Repay"] = "repay";
10
+ StellarLendingActivity["LiqRepay"] = "liqRepay";
11
+ StellarLendingActivity["LiqSeize"] = "liqSeize";
12
+ StellarLendingActivity["Multiply"] = "multiply";
13
+ StellarLendingActivity["SwapDebt"] = "swapDebt";
14
+ StellarLendingActivity["SwapCollateral"] = "swapCollateral";
15
+ StellarLendingActivity["RepayWithCollateral"] = "repayWithCollateral";
16
+ StellarLendingActivity["CloseWithdraw"] = "closeWithdraw";
17
+ StellarLendingActivity["Migrate"] = "migrate";
18
+ StellarLendingActivity["FlashLoan"] = "flashLoan";
19
+ StellarLendingActivity["BadDebt"] = "badDebt";
20
+ StellarLendingActivity["StrategyFee"] = "strategyFee";
21
+ })(StellarLendingActivity || (exports.StellarLendingActivity = StellarLendingActivity = {}));
@@ -0,0 +1,11 @@
1
+ export declare enum StellarLendingDataType {
2
+ ASSET = "asset",
3
+ HUB = "hub",
4
+ HUB_ASSET = "hubAsset",
5
+ SPOKE = "spoke",
6
+ SPOKE_ASSET = "spokeAsset",
7
+ ACCOUNT_POSITION = "accountPosition",
8
+ TOP_HOLDERS = "topHolders",
9
+ GOVERNANCE_PROPOSAL = "governanceProposal",
10
+ CURSOR = "cursor"
11
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StellarLendingDataType = void 0;
4
+ var StellarLendingDataType;
5
+ (function (StellarLendingDataType) {
6
+ StellarLendingDataType["ASSET"] = "asset";
7
+ StellarLendingDataType["HUB"] = "hub";
8
+ StellarLendingDataType["HUB_ASSET"] = "hubAsset";
9
+ StellarLendingDataType["SPOKE"] = "spoke";
10
+ StellarLendingDataType["SPOKE_ASSET"] = "spokeAsset";
11
+ StellarLendingDataType["ACCOUNT_POSITION"] = "accountPosition";
12
+ StellarLendingDataType["TOP_HOLDERS"] = "topHolders";
13
+ StellarLendingDataType["GOVERNANCE_PROPOSAL"] = "governanceProposal";
14
+ StellarLendingDataType["CURSOR"] = "cursor";
15
+ })(StellarLendingDataType || (exports.StellarLendingDataType = StellarLendingDataType = {}));
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Stellar lending governance (timelock) proposal taxonomy. Self-contained copy
3
+ * for the independent Stellar-lending subtree (no MVX coupling).
4
+ *
5
+ * `StellarGovernanceProposalKind` mirrors the `AdminOperation` variants the
6
+ * governance contract schedules; the indexer maps a scheduled operation's
7
+ * invoked function symbol to one of these.
8
+ */
9
+ export declare enum StellarGovernanceProposalKind {
10
+ SetAggregator = "SetAggregator",
11
+ SetAccumulator = "SetAccumulator",
12
+ SetPoolTemplate = "SetPoolTemplate",
13
+ EditAssetConfig = "EditAssetConfig",
14
+ SetPositionLimits = "SetPositionLimits",
15
+ SetMinBorrowCollateral = "SetMinBorrowCollateral",
16
+ AddEModeCategory = "AddEModeCategory",
17
+ RemoveEModeCategory = "RemoveEModeCategory",
18
+ AddAssetToEModeCategory = "AddAssetToEModeCategory",
19
+ EditAssetInEModeCategory = "EditAssetInEModeCategory",
20
+ RemoveAssetFromEMode = "RemoveAssetFromEMode",
21
+ ApproveToken = "ApproveToken",
22
+ RevokeToken = "RevokeToken",
23
+ ApproveBlendPool = "ApproveBlendPool",
24
+ RevokeBlendPool = "RevokeBlendPool",
25
+ CreateLiquidityPool = "CreateLiquidityPool",
26
+ UpgradeLiquidityPoolParams = "UpgradeLiquidityPoolParams",
27
+ UpdatePoolCaps = "UpdatePoolCaps",
28
+ DeployPool = "DeployPool",
29
+ UpgradePool = "UpgradePool",
30
+ DisableTokenOracle = "DisableTokenOracle",
31
+ UpgradeController = "UpgradeController",
32
+ MigrateController = "MigrateController",
33
+ TransferControllerOwnership = "TransferControllerOwnership",
34
+ ConfigureMarketOracle = "ConfigureMarketOracle",
35
+ EditOracleTolerance = "EditOracleTolerance",
36
+ GovernanceUpgrade = "GovernanceUpgrade",
37
+ UpdateDelay = "UpdateDelay",
38
+ GrantGovernanceRole = "GrantGovernanceRole",
39
+ RevokeGovernanceRole = "RevokeGovernanceRole",
40
+ TransferGovernanceOwnership = "TransferGovernanceOwnership",
41
+ Unknown = "Unknown"
42
+ }
43
+ /**
44
+ * Coarse, event-derived proposal status. `Waiting`/`Ready`/`Expired` are NOT
45
+ * stored on-chain — clients derive them from `readyLedger`, `expiresLedger`,
46
+ * and the current ledger.
47
+ */
48
+ export declare enum StellarGovernanceProposalStatus {
49
+ Pending = "Pending",
50
+ Executed = "Executed",
51
+ Cancelled = "Cancelled"
52
+ }
53
+ /**
54
+ * Whether executing the proposal invokes the lending controller (generic
55
+ * `execute`) or the governance contract itself (`execute_self`).
56
+ */
57
+ export declare enum StellarGovernanceProposalTarget {
58
+ Controller = "Controller",
59
+ Governance = "Governance"
60
+ }
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StellarGovernanceProposalTarget = exports.StellarGovernanceProposalStatus = exports.StellarGovernanceProposalKind = void 0;
4
+ /**
5
+ * Stellar lending governance (timelock) proposal taxonomy. Self-contained copy
6
+ * for the independent Stellar-lending subtree (no MVX coupling).
7
+ *
8
+ * `StellarGovernanceProposalKind` mirrors the `AdminOperation` variants the
9
+ * governance contract schedules; the indexer maps a scheduled operation's
10
+ * invoked function symbol to one of these.
11
+ */
12
+ var StellarGovernanceProposalKind;
13
+ (function (StellarGovernanceProposalKind) {
14
+ StellarGovernanceProposalKind["SetAggregator"] = "SetAggregator";
15
+ StellarGovernanceProposalKind["SetAccumulator"] = "SetAccumulator";
16
+ StellarGovernanceProposalKind["SetPoolTemplate"] = "SetPoolTemplate";
17
+ StellarGovernanceProposalKind["EditAssetConfig"] = "EditAssetConfig";
18
+ StellarGovernanceProposalKind["SetPositionLimits"] = "SetPositionLimits";
19
+ StellarGovernanceProposalKind["SetMinBorrowCollateral"] = "SetMinBorrowCollateral";
20
+ StellarGovernanceProposalKind["AddEModeCategory"] = "AddEModeCategory";
21
+ StellarGovernanceProposalKind["RemoveEModeCategory"] = "RemoveEModeCategory";
22
+ StellarGovernanceProposalKind["AddAssetToEModeCategory"] = "AddAssetToEModeCategory";
23
+ StellarGovernanceProposalKind["EditAssetInEModeCategory"] = "EditAssetInEModeCategory";
24
+ StellarGovernanceProposalKind["RemoveAssetFromEMode"] = "RemoveAssetFromEMode";
25
+ StellarGovernanceProposalKind["ApproveToken"] = "ApproveToken";
26
+ StellarGovernanceProposalKind["RevokeToken"] = "RevokeToken";
27
+ StellarGovernanceProposalKind["ApproveBlendPool"] = "ApproveBlendPool";
28
+ StellarGovernanceProposalKind["RevokeBlendPool"] = "RevokeBlendPool";
29
+ StellarGovernanceProposalKind["CreateLiquidityPool"] = "CreateLiquidityPool";
30
+ StellarGovernanceProposalKind["UpgradeLiquidityPoolParams"] = "UpgradeLiquidityPoolParams";
31
+ StellarGovernanceProposalKind["UpdatePoolCaps"] = "UpdatePoolCaps";
32
+ StellarGovernanceProposalKind["DeployPool"] = "DeployPool";
33
+ StellarGovernanceProposalKind["UpgradePool"] = "UpgradePool";
34
+ StellarGovernanceProposalKind["DisableTokenOracle"] = "DisableTokenOracle";
35
+ StellarGovernanceProposalKind["UpgradeController"] = "UpgradeController";
36
+ StellarGovernanceProposalKind["MigrateController"] = "MigrateController";
37
+ StellarGovernanceProposalKind["TransferControllerOwnership"] = "TransferControllerOwnership";
38
+ StellarGovernanceProposalKind["ConfigureMarketOracle"] = "ConfigureMarketOracle";
39
+ StellarGovernanceProposalKind["EditOracleTolerance"] = "EditOracleTolerance";
40
+ StellarGovernanceProposalKind["GovernanceUpgrade"] = "GovernanceUpgrade";
41
+ StellarGovernanceProposalKind["UpdateDelay"] = "UpdateDelay";
42
+ StellarGovernanceProposalKind["GrantGovernanceRole"] = "GrantGovernanceRole";
43
+ StellarGovernanceProposalKind["RevokeGovernanceRole"] = "RevokeGovernanceRole";
44
+ StellarGovernanceProposalKind["TransferGovernanceOwnership"] = "TransferGovernanceOwnership";
45
+ StellarGovernanceProposalKind["Unknown"] = "Unknown";
46
+ })(StellarGovernanceProposalKind || (exports.StellarGovernanceProposalKind = StellarGovernanceProposalKind = {}));
47
+ /**
48
+ * Coarse, event-derived proposal status. `Waiting`/`Ready`/`Expired` are NOT
49
+ * stored on-chain — clients derive them from `readyLedger`, `expiresLedger`,
50
+ * and the current ledger.
51
+ */
52
+ var StellarGovernanceProposalStatus;
53
+ (function (StellarGovernanceProposalStatus) {
54
+ StellarGovernanceProposalStatus["Pending"] = "Pending";
55
+ StellarGovernanceProposalStatus["Executed"] = "Executed";
56
+ StellarGovernanceProposalStatus["Cancelled"] = "Cancelled";
57
+ })(StellarGovernanceProposalStatus || (exports.StellarGovernanceProposalStatus = StellarGovernanceProposalStatus = {}));
58
+ /**
59
+ * Whether executing the proposal invokes the lending controller (generic
60
+ * `execute`) or the governance contract itself (`execute_self`).
61
+ */
62
+ var StellarGovernanceProposalTarget;
63
+ (function (StellarGovernanceProposalTarget) {
64
+ StellarGovernanceProposalTarget["Controller"] = "Controller";
65
+ StellarGovernanceProposalTarget["Governance"] = "Governance";
66
+ })(StellarGovernanceProposalTarget || (exports.StellarGovernanceProposalTarget = StellarGovernanceProposalTarget = {}));
@@ -0,0 +1,3 @@
1
+ export * from './data-type.enum';
2
+ export * from './activity.enum';
3
+ export * from './governance.enum';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./data-type.enum"), exports);
18
+ __exportStar(require("./activity.enum"), exports);
19
+ __exportStar(require("./governance.enum"), exports);
@@ -0,0 +1,4 @@
1
+ export * from './enums';
2
+ export * from './oracle-provider';
3
+ export * from './documents';
4
+ export * from './kusto';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./enums"), exports);
18
+ __exportStar(require("./oracle-provider"), exports);
19
+ __exportStar(require("./documents"), exports);
20
+ __exportStar(require("./kusto"), exports);
@@ -0,0 +1,20 @@
1
+ import type { StellarLendingActivity } from '../enums';
2
+ /**
3
+ * Dynamic JSON written into the existing `NftActivityData.ActivityData` column
4
+ * for Stellar-lending activity (`Source='xoxnoLending'`, `Chain='STELLAR'`).
5
+ * Not a Cosmos document — rides the existing activity → Kusto change-feed.
6
+ */
7
+ export interface StellarLendingActivityData {
8
+ action: StellarLendingActivity;
9
+ hubId: number;
10
+ spokeId: number | null;
11
+ reserveKey: string | null;
12
+ accountId: string | null;
13
+ owner: string | null;
14
+ token: string;
15
+ amount: string;
16
+ amountShort: number;
17
+ oraclePrice: number | null;
18
+ usd: number | null;
19
+ feeShort?: number;
20
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from './activity-data';
2
+ export * from './market-snapshot-row';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./activity-data"), exports);
18
+ __exportStar(require("./market-snapshot-row"), exports);
@@ -0,0 +1,25 @@
1
+ /**
2
+ * One row of the Kusto `StellarLendingMarketSnapshot` table, written by the
3
+ * hub-aware snapshot cron. `SpokeId` is null for hub/asset-scoped rows and set
4
+ * for spoke/reserve-scoped rows.
5
+ */
6
+ export interface StellarLendingMarketSnapshotRow {
7
+ SnapshotAt: string;
8
+ Chain: 'STELLAR';
9
+ HubId: number;
10
+ SpokeId: number | null;
11
+ Token: string;
12
+ Symbol: string;
13
+ Decimals: number;
14
+ UsdPrice: number;
15
+ SupplyApy: number;
16
+ BorrowApy: number;
17
+ Utilization: number;
18
+ TotalDepositsRaw: string;
19
+ TotalDepositsUsd: number;
20
+ TotalBorrowsRaw: string;
21
+ TotalBorrowsUsd: number;
22
+ AvailableLiquidityUsd: number;
23
+ SupplyIndexRay: string;
24
+ BorrowIndexRay: string;
25
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,40 @@
1
+ /**
2
+ * TS mirror of the on-chain `controller::events::EventOracleProvider`. All
3
+ * `i128` → string, `u32/u64` → number, `Option<T>` → `T | null`. Persistence
4
+ * shape only (no swagger decorators); api-v2 owns the response DTOs.
5
+ */
6
+ export interface StellarOracleProvider {
7
+ baseTokenId: string;
8
+ quoteTokenSymbol: string;
9
+ toleranceUpperBps: number;
10
+ toleranceLowerBps: number;
11
+ pricingMethod: number;
12
+ oracleType: number;
13
+ strategy: number;
14
+ assetDecimals: number;
15
+ maxPriceStaleSeconds: number;
16
+ primaryProvider: number;
17
+ primaryContract: string;
18
+ primaryAsset: string | null;
19
+ primarySymbol: string | null;
20
+ primaryFeedId: string | null;
21
+ primaryQuoteToken: string | null;
22
+ primaryReadMode: number;
23
+ primaryTwapRecords: number;
24
+ primaryDecimals: number;
25
+ primaryResolutionSeconds: number;
26
+ primaryMaxStaleSeconds: number;
27
+ anchorProvider: number | null;
28
+ anchorContract: string | null;
29
+ anchorAsset: string | null;
30
+ anchorSymbol: string | null;
31
+ anchorFeedId: string | null;
32
+ anchorQuoteToken: string | null;
33
+ anchorReadMode: number;
34
+ anchorTwapRecords: number;
35
+ anchorDecimals: number;
36
+ anchorResolutionSeconds: number;
37
+ anchorMaxStaleSeconds: number;
38
+ minSanityPriceWad: string;
39
+ maxSanityPriceWad: string;
40
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoxno/types",
3
- "version": "1.0.427",
3
+ "version": "1.0.428",
4
4
  "description": "Shared types and utilities for XOXNO API.",
5
5
  "exports": {
6
6
  ".": {
@@ -12,6 +12,11 @@
12
12
  "import": "./dist/enums/index.js",
13
13
  "require": "./dist/enums/index.js",
14
14
  "types": "./dist/enums/index.d.ts"
15
+ },
16
+ "./stellar-lending": {
17
+ "import": "./dist/stellar-lending/index.js",
18
+ "require": "./dist/stellar-lending/index.js",
19
+ "types": "./dist/stellar-lending/index.d.ts"
15
20
  }
16
21
  },
17
22
  "types": "./dist/index.d.ts",
@@ -28,7 +33,8 @@
28
33
  "lint": "eslint 'src/**/*.ts'",
29
34
  "lint:fix": "eslint 'src/**/*.ts' --fix",
30
35
  "test": "echo \"Error: no test specified\" && exit 1",
31
- "test:lending-chain": "npm run build && node test/lending-chain.test.mjs"
36
+ "test:lending-chain": "npm run build && node test/lending-chain.test.mjs",
37
+ "test:stellar-lending": "npm run build && node test/stellar-lending.test.mjs"
32
38
  },
33
39
  "repository": {
34
40
  "type": "git",