@xoxno/sdk-js 1.0.212 → 1.0.214

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 (52) hide show
  1. package/README.md +73 -42
  2. package/dist/cjs/index.d.ts +3 -3
  3. package/dist/cjs/sdk/index.d.ts +4 -4
  4. package/dist/cjs/sdk/stellar/__tests__/integration.test.d.ts +1 -0
  5. package/dist/cjs/sdk/stellar/admin.d.ts +28 -28
  6. package/dist/cjs/sdk/stellar/cctp.d.ts +2 -2
  7. package/dist/cjs/sdk/stellar/contracts.d.ts +98 -61
  8. package/dist/cjs/sdk/stellar/events/index.d.ts +2 -2
  9. package/dist/cjs/sdk/stellar/governance.d.ts +50 -49
  10. package/dist/cjs/sdk/stellar/index.d.ts +22 -14
  11. package/dist/cjs/sdk/stellar/lending-api-types.d.ts +943 -0
  12. package/dist/cjs/sdk/stellar/lending-read-types.d.ts +54 -269
  13. package/dist/cjs/sdk/stellar/lending-read.d.ts +279 -131
  14. package/dist/cjs/sdk/stellar/lending.d.ts +134 -63
  15. package/dist/cjs/sdk/stellar/prepare.d.ts +27 -7
  16. package/dist/cjs/sdk/stellar/quote.d.ts +16 -9
  17. package/dist/cjs/sdk/stellar/swap.d.ts +4 -5
  18. package/dist/cjs/sdk/stellar-schema.d.ts +5 -0
  19. package/dist/cjs/sdk/swagger.d.ts +96 -51
  20. package/dist/cjs/sdk/types.d.ts +2 -2
  21. package/dist/cjs/utils/api.d.ts +14 -4
  22. package/dist/cjs/utils/const.d.ts +0 -2
  23. package/dist/index.cjs +2 -1
  24. package/dist/index.cjs.LICENSE.txt +8 -0
  25. package/dist/index.d.ts +3 -3
  26. package/dist/index.esm.js +2 -1
  27. package/dist/index.esm.js.LICENSE.txt +8 -0
  28. package/dist/sdk/index.d.ts +4 -4
  29. package/dist/sdk/stellar/__tests__/integration.test.d.ts +1 -0
  30. package/dist/sdk/stellar/admin.d.ts +28 -28
  31. package/dist/sdk/stellar/cctp.d.ts +2 -2
  32. package/dist/sdk/stellar/contracts.d.ts +98 -61
  33. package/dist/sdk/stellar/events/index.d.ts +2 -2
  34. package/dist/sdk/stellar/governance.d.ts +50 -49
  35. package/dist/sdk/stellar/index.cjs +2 -1
  36. package/dist/sdk/stellar/index.cjs.LICENSE.txt +8 -0
  37. package/dist/sdk/stellar/index.d.ts +22 -14
  38. package/dist/sdk/stellar/index.esm.js +2 -1
  39. package/dist/sdk/stellar/index.esm.js.LICENSE.txt +8 -0
  40. package/dist/sdk/stellar/lending-api-types.d.ts +943 -0
  41. package/dist/sdk/stellar/lending-read-types.d.ts +54 -269
  42. package/dist/sdk/stellar/lending-read.d.ts +279 -131
  43. package/dist/sdk/stellar/lending.d.ts +134 -63
  44. package/dist/sdk/stellar/prepare.d.ts +27 -7
  45. package/dist/sdk/stellar/quote.d.ts +16 -9
  46. package/dist/sdk/stellar/swap.d.ts +4 -5
  47. package/dist/sdk/stellar-schema.d.ts +5 -0
  48. package/dist/sdk/swagger.d.ts +96 -51
  49. package/dist/sdk/types.d.ts +2 -2
  50. package/dist/utils/api.d.ts +14 -4
  51. package/dist/utils/const.d.ts +0 -2
  52. package/package.json +9 -4
@@ -1,140 +1,288 @@
1
- /**
2
- * Stellar lending read surface.
3
- *
4
- * Hand-written typed wrappers over the api-v2 `stellar-lending` GET routes
5
- * (this is intentionally NOT part of the swagger-generated read SDK). Each
6
- * function takes a `XOXNOClient` plus typed params and resolves to the mirrored
7
- * response shape from `./lending-read-types`. A `stellarLendingRead(client)`
8
- * factory binds the client once for ergonomic call sites.
9
- *
10
- * HTTP plumbing (base URL, query-string assembly, error mapping, caching) is
11
- * delegated to `XOXNOClient.fetchWithTimeout`, the same wrapper the generated
12
- * SDK uses.
13
- */
14
- import type { StellarAssetListItem, StellarAssetPage, StellarHubListItem, StellarLendingLiveStateDto, StellarReserveListItem, StellarSpokeListItem, StellarUserActivityItem } from '@xoxno/types/stellar-lending';
15
- import type { OurRequestInit, XOXNOClient } from '../../utils/api';
16
- import type { StellarAccountDelegate, StellarAccountPositions, StellarAsset, StellarAssetMarket, StellarBlendPool, StellarContractConfig, StellarContractRole, StellarGovernanceProposalsPage, StellarHub, StellarLendingHoldersSide, StellarLendingContext, StellarLendingMarketSide, StellarMarketGraph, StellarMarketGraphQuery, StellarReserve, StellarSpoke, StellarTopHolders } from './lending-read-types';
17
- type StellarReservesParams = {
18
- hubId?: number;
19
- spokeId?: number;
20
- asset?: string;
21
- };
22
- /** Aggregate context for Stellar lending landing/read surfaces. */
23
- export declare const getStellarLendingContext: (client: XOXNOClient, init?: OurRequestInit) => Promise<StellarLendingContext>;
24
- /** Live per-hub indexes and controller borrow-collateral floor. */
25
- export declare const getStellarLendingLiveState: (client: XOXNOClient, init?: OurRequestInit) => Promise<StellarLendingLiveStateDto>;
26
- /** Every asset, aggregated across hubs — rows for the Deposit/Borrow tables. */
27
- export declare const getStellarAssets: (client: XOXNOClient, init?: OurRequestInit) => Promise<StellarAssetListItem[]>;
28
- /** Every hub, aggregated over its hub-assets — rows for the All Hubs table. */
29
- export declare const getStellarHubs: (client: XOXNOClient, init?: OurRequestInit) => Promise<StellarHubListItem[]>;
30
- /** Every spoke, aggregated over its reserves — rows for the All Markets table. */
31
- export declare const getStellarSpokes: (client: XOXNOClient, init?: OurRequestInit) => Promise<StellarSpokeListItem[]>;
32
- /**
33
- * Reserve rows (asset in a spoke on a hub), optionally filtered. Filters are
34
- * omitted from the query string when unset; api-v2 defaults `hubId`/`spokeId`
35
- * to `-1` and `asset` to `''` (no filter).
36
- */
37
- export declare const getStellarReserves: (client: XOXNOClient, params?: StellarReservesParams, init?: OurRequestInit) => Promise<StellarReserveListItem[]>;
38
- /** Reserve detail: one asset, in one spoke, on one hub. */
39
- export declare const getStellarReserve: (client: XOXNOClient, spokeId: number, hubId: number, asset: string, init?: OurRequestInit) => Promise<StellarReserve>;
40
- /** Top holders of a reserve, for one side (deposits or borrows). */
41
- export declare const getStellarReserveHolders: (client: XOXNOClient, spokeId: number, hubId: number, asset: string, side: StellarLendingHoldersSide, init?: OurRequestInit) => Promise<StellarTopHolders>;
42
- /** Asset overview: header totals + APY ranges. */
43
- export declare const getStellarAsset: (client: XOXNOClient, asset: string, init?: OurRequestInit) => Promise<StellarAsset>;
44
- /** Asset detail page: overview + deposit/borrow markets + spoke APY series. */
1
+ /** Typed Stellar lending reads. Configure the API deployment with XOXNOClient.apiUrl.
2
+ * These cached HTTP reads do not simulate transactions or authorize spending.
3
+ */
4
+ import type { OurRequestInit, XOXNOClient } from '../../utils/api.js';
5
+ import type * as Api from './lending-api-types.js';
6
+ import type { StellarLendingMarketSide, StellarLendingHoldersSide, StellarMarketGraphQuery, StellarReservesParams, StellarActivityQuery, StellarActivityPageQuery, StellarGovernanceQuery, StellarPositionsQuery, StellarRevenueQuery, StellarFeeRevenueQuery, StellarParticipantsQuery, StellarLiquidationsQuery, StellarLiquidationsLeaderboardQuery, StellarVolumeQuery, StellarDistributionQuery, StellarRateSpreadQuery } from './lending-read-types.js';
7
+ /** Load assets, hubs, spokes, reserves and keyed reserve details in one response.
8
+ * @category Stellar lending reads
9
+ */
10
+ export declare const getStellarLendingContext: (client: XOXNOClient, init?: OurRequestInit) => Promise<Api.StellarLendingContextDto>;
11
+ /** Read live indexes and the controller collateral floor. Cached data is not transaction simulation.
12
+ * @category Stellar lending reads
13
+ */
14
+ export declare const getStellarLendingLiveState: (client: XOXNOClient, init?: OurRequestInit) => Promise<Api.StellarLendingLiveStateDto>;
15
+ /** Read detailed live market state for every hub and asset.
16
+ * @category Stellar lending reads
17
+ */
18
+ export declare const getStellarDetailedMarkets: (client: XOXNOClient, init?: OurRequestInit) => Promise<Api.StellarDetailedMarketDto[]>;
19
+ /** List lending assets aggregated across hubs.
20
+ * @category Stellar lending reads
21
+ */
22
+ export declare const getStellarAssets: (client: XOXNOClient, init?: OurRequestInit) => Promise<Api.StellarAssetListItemDto[]>;
23
+ /** List liquidity hubs and their aggregate balances.
24
+ * @category Stellar lending reads
25
+ */
26
+ export declare const getStellarHubs: (client: XOXNOClient, init?: OurRequestInit) => Promise<Api.StellarHubListItemDto[]>;
27
+ /** List risk spokes for market selection.
28
+ * @category Stellar lending reads
29
+ */
30
+ export declare const getStellarSpokes: (client: XOXNOClient, init?: OurRequestInit) => Promise<Api.StellarSpokeListItemDto[]>;
31
+ /** List reserves, optionally filtered by hub, spoke and asset. A reserve is one (spokeId, hubId, asset) coordinate.
32
+ * @category Stellar lending reads
33
+ */
34
+ export declare const getStellarReserves: (client: XOXNOClient, params?: StellarReservesParams, init?: OurRequestInit) => Promise<Api.StellarReserveListItemDto[]>;
35
+ /** Read one reserve with risk flags, capacity, rates and liquidity.
36
+ * @category Stellar lending reads
37
+ */
38
+ export declare const getStellarReserve: (client: XOXNOClient, spokeId: number, hubId: number, asset: string, init?: OurRequestInit) => Promise<Api.ReserveDto>;
39
+ /** Read the aggregate overview for one lending token contract.
40
+ * @category Stellar lending reads
41
+ */
42
+ export declare const getStellarAsset: (client: XOXNOClient, asset: string, init?: OurRequestInit) => Promise<Api.AssetDto>;
43
+ /** Read hub totals and typed per-asset opportunities. USD totals are numbers.
44
+ * @category Stellar lending reads
45
+ */
46
+ export declare const getStellarHub: (client: XOXNOClient, hubId: number, init?: OurRequestInit) => Promise<Api.HubDto>;
47
+ /** Read spoke totals, connected hubs and risk-configured markets.
48
+ * @category Stellar lending reads
49
+ */
50
+ export declare const getStellarSpoke: (client: XOXNOClient, spokeId: number, init?: OurRequestInit) => Promise<Api.SpokeDto>;
51
+ /** Read all positions for a wallet. supplyAmount and borrowAmount are RAY token quantities, not transaction base units.
52
+ * @category Stellar lending reads
53
+ */
54
+ export declare const getStellarUserPositions: (client: XOXNOClient, owner: string, init?: OurRequestInit) => Promise<Api.AccountPositionsDto>;
55
+ /** Read a single lending account, identified by its decimal ID; balances use RAY token quantities.
56
+ * @category Stellar lending reads
57
+ */
58
+ export declare const getStellarAccountPositions: (client: XOXNOClient, accountId: string, init?: OurRequestInit) => Promise<Api.AccountPositionsDto>;
59
+ /** Read exact token base-unit holdings for a G or C wallet. Holdings may exceed spendable funds. Requires the API release exposing this route; older deployments return 404.
60
+ * @category Stellar lending reads
61
+ */
62
+ export declare const getStellarWalletBalance: (client: XOXNOClient, owner: string, asset: string, init?: OurRequestInit) => Promise<Api.StellarWalletBalanceDto>;
63
+ /** Load overview, deposit/borrow markets and chart series for an asset page.
64
+ * @category Stellar lending reads
65
+ */
45
66
  export declare const getStellarAssetPage: (client: XOXNOClient, asset: string, query: StellarMarketGraphQuery & {
46
67
  owner?: string;
47
- }, init?: OurRequestInit) => Promise<StellarAssetPage>;
48
- /** Asset markets (per spoke/hub) for one side. */
49
- export declare const getStellarAssetMarkets: (client: XOXNOClient, asset: string, side: StellarLendingMarketSide, init?: OurRequestInit) => Promise<StellarAssetMarket[]>;
50
- /** Hub overview: totals + per-asset opportunities. */
51
- export declare const getStellarHub: (client: XOXNOClient, hubId: number, init?: OurRequestInit) => Promise<StellarHub>;
52
- /** Spoke overview: totals + connected hubs + per-reserve markets. */
53
- export declare const getStellarSpoke: (client: XOXNOClient, spokeId: number, init?: OurRequestInit) => Promise<StellarSpoke>;
54
- /** All positions for an owner (cross-partition portfolio). */
55
- export declare const getStellarUserPositions: (client: XOXNOClient, owner: string, init?: OurRequestInit) => Promise<StellarAccountPositions>;
56
- /**
57
- * A user's lending action feed (newest first), paged. `skip`/`top` are omitted
58
- * from the query string when unset; api-v2 defaults `skip` to `0` and `top` to
59
- * `50` (capped at `200`).
60
- */
61
- export declare const getStellarUserActivity: (client: XOXNOClient, owner: string, params?: {
68
+ }, init?: OurRequestInit) => Promise<Api.AssetPageDto>;
69
+ /** List an asset’s markets, including pause/freeze flags and remaining capacity. side is deposit or borrow.
70
+ * @category Stellar lending reads
71
+ */
72
+ export declare const getStellarAssetMarkets: (client: XOXNOClient, asset: string, side: StellarLendingMarketSide, init?: OurRequestInit) => Promise<Api.AssetMarketDto[]>;
73
+ /** List holders and their shares; side is deposits or borrows.
74
+ * @category Stellar lending reads
75
+ */
76
+ export declare const getStellarReserveHolders: (client: XOXNOClient, spokeId: number, hubId: number, asset: string, side: StellarLendingHoldersSide, init?: OurRequestInit) => Promise<Api.TopHoldersDto>;
77
+ /** List holders and their shares; side is deposits or borrows.
78
+ * @category Stellar lending reads
79
+ */
80
+ export declare const getStellarHubHolders: (client: XOXNOClient, hubId: number, side: StellarLendingHoldersSide, init?: OurRequestInit) => Promise<Api.TopHoldersDto>;
81
+ /** List holders and their shares; side is deposits or borrows.
82
+ * @category Stellar lending reads
83
+ */
84
+ export declare const getStellarSpokeHolders: (client: XOXNOClient, spokeId: number, side: StellarLendingHoldersSide, init?: OurRequestInit) => Promise<Api.TopHoldersDto>;
85
+ /** Read binned market-history points.
86
+ * @category Stellar lending reads
87
+ */
88
+ export declare const getStellarAssetGraph: (client: XOXNOClient, asset: string, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<Api.MarketGraphDto>;
89
+ /** Read binned market-history points.
90
+ * @category Stellar lending reads
91
+ */
92
+ export declare const getStellarHubGraph: (client: XOXNOClient, hubId: number, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<Api.MarketGraphDto>;
93
+ /** Read spoke-attributed suppliedUsd/borrowedUsd and blended APYs.
94
+ * @category Stellar lending reads
95
+ */
96
+ export declare const getStellarSpokeGraph: (client: XOXNOClient, spokeId: number, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<Api.SpokeGraphDto>;
97
+ /** Read binned market-history points.
98
+ * @category Stellar lending reads
99
+ */
100
+ export declare const getStellarReserveGraph: (client: XOXNOClient, spokeId: number, hubId: number, asset: string, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<Api.MarketGraphDto>;
101
+ /** Read the legacy paged action feed. Display amounts are floating point; use userActivityPage for exact amounts and transaction hashes when available.
102
+ * @category Stellar lending reads
103
+ */
104
+ export declare const getStellarUserActivity: (client: XOXNOClient, owner: string, params?: StellarActivityQuery, init?: OurRequestInit) => Promise<Api.StellarUserActivityItemDto[]>;
105
+ /** Read exact owner-attributed activity. Pass the opaque continuationToken unchanged for the next page. Requires the API release exposing this route; older deployments return 404.
106
+ * @category Stellar lending reads
107
+ */
108
+ export declare const getStellarUserActivityPage: (client: XOXNOClient, owner: string, params?: StellarActivityPageQuery, init?: OurRequestInit) => Promise<Api.StellarActivityPageDto>;
109
+ /** Read governance proposals; pass the opaque continuationToken unchanged.
110
+ * @category Stellar lending reads
111
+ */
112
+ export declare const getStellarGovernanceProposals: (client: XOXNOClient, params?: StellarGovernanceQuery, init?: OurRequestInit) => Promise<Api.GovernanceProposalsPageDto>;
113
+ /** Read a paged wallet leaderboard under positions. Its healthFactor is debt / liquidation-weighted collateral × 100; higher is riskier.
114
+ * @category Stellar lending reads
115
+ */
116
+ export declare const getStellarPositionsLeaderboard: (client: XOXNOClient, params?: StellarPositionsQuery, init?: OurRequestInit) => Promise<Api.StellarPositionsRankDto>;
117
+ /** Read distinct supplier, borrower and total account counts.
118
+ * @category Stellar lending reads
119
+ */
120
+ export declare const getStellarParticipantCounts: (client: XOXNOClient, params?: StellarParticipantsQuery, init?: OurRequestInit) => Promise<Api.ParticipantCountsDto>;
121
+ /** Read liquidators ranked by gross seized USD.
122
+ * @category Stellar lending reads
123
+ */
124
+ export declare const getStellarLiquidationsLeaderboard: (client: XOXNOClient, params?: StellarLiquidationsLeaderboardQuery, init?: OurRequestInit) => Promise<Api.LiquidationsLeaderboardDto>;
125
+ /** Read position-size distribution; side is deposits or borrows.
126
+ * @category Stellar lending reads
127
+ */
128
+ export declare const getStellarHolderDistribution: (client: XOXNOClient, params?: StellarDistributionQuery, init?: OurRequestInit) => Promise<Api.HolderDistributionDto>;
129
+ /** Read the paged Stellar campaign leaderboard.
130
+ * @category Stellar lending reads
131
+ */
132
+ export declare const getStellarCampaignLeaderboard: (client: XOXNOClient, params?: {
62
133
  skip?: number;
63
134
  top?: number;
64
- }, init?: OurRequestInit) => Promise<StellarUserActivityItem[]>;
65
- /** All positions for a single account (single-partition). */
66
- export declare const getStellarAccountPositions: (client: XOXNOClient, accountId: string, init?: OurRequestInit) => Promise<StellarAccountPositions>;
67
- /** Governance proposals (cursor-paginated). */
68
- export declare const getStellarGovernanceProposals: (client: XOXNOClient, opts?: {
69
- top?: number;
70
- continuationToken?: string;
71
- }, init?: OurRequestInit) => Promise<StellarGovernanceProposalsPage>;
72
- /** Asset market-history graph. */
73
- export declare const getStellarAssetGraph: (client: XOXNOClient, asset: string, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<StellarMarketGraph>;
74
- /** Hub market-history graph. */
75
- export declare const getStellarHubGraph: (client: XOXNOClient, hubId: number, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<StellarMarketGraph>;
76
- /** Spoke market-history graph. */
77
- export declare const getStellarSpokeGraph: (client: XOXNOClient, spokeId: number, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<StellarMarketGraph>;
78
- /** Reserve market-history graph (+ fee series). */
79
- export declare const getStellarReserveGraph: (client: XOXNOClient, spokeId: number, hubId: number, asset: string, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<StellarMarketGraph>;
80
- /**
81
- * Client-bound Stellar lending read namespace. Binds `client` once so call
82
- * sites read `read.reserve(spokeId, hubId, asset)` instead of threading the
83
- * client through every call.
84
- */
85
- /**
86
- * Config and admin state for every watched contract, or for one address.
87
- *
88
- * Event-sourced by the indexer rather than read live from the chain, so this is
89
- * also where `minBorrowCollateralUsdWad`, position limits and the aggregator
90
- * addresses come from — `liveState` no longer needs an RPC round-trip for them.
91
- */
92
- export declare const getStellarProtocolConfig: (client: XOXNOClient, init?: OurRequestInit) => Promise<StellarContractConfig[]>;
93
- /** Config and admin state for a single contract address. */
94
- export declare const getStellarContractConfig: (client: XOXNOClient, contractAddress: string, init?: OurRequestInit) => Promise<StellarContractConfig>;
95
- /**
96
- * Access-control grants, optionally narrowed to one contract. Revoked grants
97
- * are included with `granted: false` — filter client-side when only current
98
- * holders matter.
99
- */
100
- export declare const getStellarContractRoles: (client: XOXNOClient, contractAddress?: string, init?: OurRequestInit) => Promise<StellarContractRole[]>;
101
- /** Position-authorization grants for one account, including revoked ones. */
102
- export declare const getStellarAccountDelegates: (client: XOXNOClient, accountId: number, init?: OurRequestInit) => Promise<StellarAccountDelegate[]>;
103
- /** Blend pool approval state, including pools whose approval was revoked. */
104
- export declare const getStellarBlendPools: (client: XOXNOClient, init?: OurRequestInit) => Promise<StellarBlendPool[]>;
135
+ }, init?: OurRequestInit) => Promise<Api.StellarCampaignLeaderboardDto>;
136
+ /** Read protocol USD history as parallel arrays sharing timestamps.
137
+ * @category Stellar lending reads
138
+ */
139
+ export declare const getStellarStatsHistory: (client: XOXNOClient, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<Api.StellarStatsHistoryDto>;
140
+ /** Read reserve interest revenue for the selected scope.
141
+ * @category Stellar lending reads
142
+ */
143
+ export declare const getStellarRevenueSeries: (client: XOXNOClient, query: StellarRevenueQuery, init?: OurRequestInit) => Promise<Api.RevenueSeriesDto>;
144
+ /** Read flash-loan and strategy-fee revenue.
145
+ * @category Stellar lending reads
146
+ */
147
+ export declare const getStellarFeeRevenueSeries: (client: XOXNOClient, query: StellarFeeRevenueQuery, init?: OurRequestInit) => Promise<Api.FeeRevenueSeriesDto>;
148
+ /** Read liquidation history. Gross seized collateral differs from net liquidator credit.
149
+ * @category Stellar lending reads
150
+ */
151
+ export declare const getStellarLiquidationsSeries: (client: XOXNOClient, query: StellarLiquidationsQuery, init?: OurRequestInit) => Promise<Api.LiquidationsSeriesDto>;
152
+ /** Read supply, borrow, withdrawal and repayment volume.
153
+ * @category Stellar lending reads
154
+ */
155
+ export declare const getStellarVolumeSeries: (client: XOXNOClient, query: StellarVolumeQuery, init?: OurRequestInit) => Promise<Api.VolumeSeriesDto>;
156
+ /** Read active owners/accounts and new-user history.
157
+ * @category Stellar lending reads
158
+ */
159
+ export declare const getStellarActiveUsersSeries: (client: XOXNOClient, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<Api.ActiveUsersSeriesDto>;
160
+ /** Read per-market borrow-minus-supply APY spreads.
161
+ * @category Stellar lending reads
162
+ */
163
+ export declare const getStellarRateSpreadSeries: (client: XOXNOClient, query: StellarRateSpreadQuery, init?: OurRequestInit) => Promise<Api.RateSpreadSeriesDto>;
164
+ /** Read protocol TVL, borrowing, fees and revenue dimensions.
165
+ * @category Stellar lending reads
166
+ */
167
+ export declare const getStellarDefiLlamaDimensions: (client: XOXNOClient, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<Api.DefiLlamaDimensionsDto>;
168
+ /** Read supplied/borrowed history for a lending account, not a wallet address.
169
+ * @category Stellar lending reads
170
+ */
171
+ export declare const getStellarUserHistory: (client: XOXNOClient, accountId: string, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<Api.UserHistoryDto>;
172
+ /** Read realized and unrealized interest PnL by asset for one account.
173
+ * @category Stellar lending reads
174
+ */
175
+ export declare const getStellarPositionsPnl: (client: XOXNOClient, accountId: string, init?: OurRequestInit) => Promise<Api.StellarPositionsPnlDto>;
176
+ /** Read cross-account PnL grouped by scope.
177
+ * @category Stellar lending reads
178
+ */
179
+ export declare const getStellarPnlByScope: (client: XOXNOClient, scope: "asset" | "hub" | "protocol", init?: OurRequestInit) => Promise<Api.PnlByScopeDto>;
180
+ /** Read one wallet’s Stellar campaign row.
181
+ * @category Stellar lending reads
182
+ */
183
+ export declare const getStellarCampaignMe: (client: XOXNOClient, owner: string, init?: OurRequestInit) => Promise<Api.StellarCampaignMeDto>;
184
+ /** Bind a client once for typed market and portfolio reads.
185
+ * @param client - API client configured for the same Stellar deployment as your RPC/controller.
186
+ * @example
187
+ * ```ts
188
+ * const read = stellarLendingRead(new XOXNOClient({ apiUrl }))
189
+ * const markets = await read.reserves({ spokeId: 1 })
190
+ * const positions = await read.userPositions(walletAddress)
191
+ * ```
192
+ * @category Stellar lending reads
193
+ */
105
194
  export declare const stellarLendingRead: (client: XOXNOClient) => {
106
- context: (init?: OurRequestInit) => Promise<StellarLendingContext>;
107
- liveState: (init?: OurRequestInit) => Promise<StellarLendingLiveStateDto>;
108
- protocolConfig: (init?: OurRequestInit) => Promise<StellarContractConfig[]>;
109
- contractConfig: (contractAddress: string, init?: OurRequestInit) => Promise<StellarContractConfig>;
110
- contractRoles: (contractAddress?: string, init?: OurRequestInit) => Promise<StellarContractRole[]>;
111
- accountDelegates: (accountId: number, init?: OurRequestInit) => Promise<StellarAccountDelegate[]>;
112
- blendPools: (init?: OurRequestInit) => Promise<StellarBlendPool[]>;
113
- assets: (init?: OurRequestInit) => Promise<StellarAssetListItem[]>;
114
- hubs: (init?: OurRequestInit) => Promise<StellarHubListItem[]>;
115
- spokes: (init?: OurRequestInit) => Promise<StellarSpokeListItem[]>;
116
- reserves: (paramsOrInit?: StellarReservesParams | OurRequestInit, init?: OurRequestInit) => Promise<StellarReserveListItem[]>;
117
- reserve: (spokeId: number, hubId: number, asset: string, init?: OurRequestInit) => Promise<import("@xoxno/types").ReserveDto>;
118
- reserveHolders: (spokeId: number, hubId: number, asset: string, side: StellarLendingHoldersSide, init?: OurRequestInit) => Promise<StellarTopHolders>;
119
- asset: (asset: string, init?: OurRequestInit) => Promise<import("@xoxno/types").AssetDto>;
120
- assetMarkets: (asset: string, side: StellarLendingMarketSide, init?: OurRequestInit) => Promise<StellarAssetMarket[]>;
121
- hub: (hubId: number, init?: OurRequestInit) => Promise<StellarHub>;
122
- spoke: (spokeId: number, init?: OurRequestInit) => Promise<StellarSpoke>;
123
- userPositions: (owner: string, init?: OurRequestInit) => Promise<StellarAccountPositions>;
124
- userActivity: (owner: string, params?: {
195
+ /** {@inheritDoc getStellarLendingContext} */
196
+ context: (init?: OurRequestInit) => Promise<Api.StellarLendingContextDto>;
197
+ /** {@inheritDoc getStellarLendingLiveState} */
198
+ liveState: (init?: OurRequestInit) => Promise<Api.StellarLendingLiveStateDto>;
199
+ /** {@inheritDoc getStellarDetailedMarkets} */
200
+ marketsDetailed: (init?: OurRequestInit) => Promise<Api.StellarDetailedMarketDto[]>;
201
+ /** {@inheritDoc getStellarAssets} */
202
+ assets: (init?: OurRequestInit) => Promise<Api.StellarAssetListItemDto[]>;
203
+ /** {@inheritDoc getStellarHubs} */
204
+ hubs: (init?: OurRequestInit) => Promise<Api.StellarHubListItemDto[]>;
205
+ /** {@inheritDoc getStellarSpokes} */
206
+ spokes: (init?: OurRequestInit) => Promise<Api.StellarSpokeListItemDto[]>;
207
+ /** List reserves. The one-argument request-init form is retained for compatibility. */
208
+ reserves: (paramsOrInit?: StellarReservesParams | OurRequestInit, init?: OurRequestInit) => Promise<Api.StellarReserveListItemDto[]>;
209
+ /** {@inheritDoc getStellarReserve} */
210
+ reserve: (spokeId: number, hubId: number, asset: string, init?: OurRequestInit) => Promise<Api.ReserveDto>;
211
+ /** {@inheritDoc getStellarAsset} */
212
+ asset: (asset: string, init?: OurRequestInit) => Promise<Api.AssetDto>;
213
+ /** {@inheritDoc getStellarHub} */
214
+ hub: (hubId: number, init?: OurRequestInit) => Promise<Api.HubDto>;
215
+ /** {@inheritDoc getStellarSpoke} */
216
+ spoke: (spokeId: number, init?: OurRequestInit) => Promise<Api.SpokeDto>;
217
+ /** {@inheritDoc getStellarUserPositions} */
218
+ userPositions: (owner: string, init?: OurRequestInit) => Promise<Api.AccountPositionsDto>;
219
+ /** {@inheritDoc getStellarAccountPositions} */
220
+ accountPositions: (accountId: string, init?: OurRequestInit) => Promise<Api.AccountPositionsDto>;
221
+ /** {@inheritDoc getStellarWalletBalance} */
222
+ walletBalance: (owner: string, asset: string, init?: OurRequestInit) => Promise<Api.StellarWalletBalanceDto>;
223
+ /** {@inheritDoc getStellarAssetPage} */
224
+ assetPage: (asset: string, query: StellarMarketGraphQuery & {
225
+ owner?: string;
226
+ }, init?: OurRequestInit) => Promise<Api.AssetPageDto>;
227
+ /** {@inheritDoc getStellarAssetMarkets} */
228
+ assetMarkets: (asset: string, side: StellarLendingMarketSide, init?: OurRequestInit) => Promise<Api.AssetMarketDto[]>;
229
+ /** {@inheritDoc getStellarReserveHolders} */
230
+ reserveHolders: (spokeId: number, hubId: number, asset: string, side: StellarLendingHoldersSide, init?: OurRequestInit) => Promise<Api.TopHoldersDto>;
231
+ /** {@inheritDoc getStellarHubHolders} */
232
+ hubHolders: (hubId: number, side: StellarLendingHoldersSide, init?: OurRequestInit) => Promise<Api.TopHoldersDto>;
233
+ /** {@inheritDoc getStellarSpokeHolders} */
234
+ spokeHolders: (spokeId: number, side: StellarLendingHoldersSide, init?: OurRequestInit) => Promise<Api.TopHoldersDto>;
235
+ /** {@inheritDoc getStellarAssetGraph} */
236
+ assetGraph: (asset: string, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<Api.MarketGraphDto>;
237
+ /** {@inheritDoc getStellarHubGraph} */
238
+ hubGraph: (hubId: number, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<Api.MarketGraphDto>;
239
+ /** {@inheritDoc getStellarSpokeGraph} */
240
+ spokeGraph: (spokeId: number, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<Api.SpokeGraphDto>;
241
+ /** {@inheritDoc getStellarReserveGraph} */
242
+ reserveGraph: (spokeId: number, hubId: number, asset: string, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<Api.MarketGraphDto>;
243
+ /** {@inheritDoc getStellarUserActivity} */
244
+ userActivity: (owner: string, params?: StellarActivityQuery, init?: OurRequestInit) => Promise<Api.StellarUserActivityItemDto[]>;
245
+ /** {@inheritDoc getStellarUserActivityPage} */
246
+ userActivityPage: (owner: string, params?: StellarActivityPageQuery, init?: OurRequestInit) => Promise<Api.StellarActivityPageDto>;
247
+ /** {@inheritDoc getStellarGovernanceProposals} */
248
+ governanceProposals: (params?: StellarGovernanceQuery, init?: OurRequestInit) => Promise<Api.GovernanceProposalsPageDto>;
249
+ /** {@inheritDoc getStellarPositionsLeaderboard} */
250
+ positionsLeaderboard: (params?: StellarPositionsQuery, init?: OurRequestInit) => Promise<Api.StellarPositionsRankDto>;
251
+ /** {@inheritDoc getStellarParticipantCounts} */
252
+ participants: (params?: StellarParticipantsQuery, init?: OurRequestInit) => Promise<Api.ParticipantCountsDto>;
253
+ /** {@inheritDoc getStellarLiquidationsLeaderboard} */
254
+ liquidationsLeaderboard: (params?: StellarLiquidationsLeaderboardQuery, init?: OurRequestInit) => Promise<Api.LiquidationsLeaderboardDto>;
255
+ /** {@inheritDoc getStellarHolderDistribution} */
256
+ distribution: (params?: StellarDistributionQuery, init?: OurRequestInit) => Promise<Api.HolderDistributionDto>;
257
+ /** {@inheritDoc getStellarCampaignLeaderboard} */
258
+ campaignLeaderboard: (params?: {
125
259
  skip?: number;
126
260
  top?: number;
127
- }, init?: OurRequestInit) => Promise<StellarUserActivityItem[]>;
128
- accountPositions: (accountId: string, init?: OurRequestInit) => Promise<StellarAccountPositions>;
129
- governanceProposals: (opts?: {
130
- top?: number;
131
- continuationToken?: string;
132
- }, init?: OurRequestInit) => Promise<StellarGovernanceProposalsPage>;
133
- assetGraph: (asset: string, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<StellarMarketGraph>;
134
- hubGraph: (hubId: number, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<StellarMarketGraph>;
135
- spokeGraph: (spokeId: number, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<StellarMarketGraph>;
136
- reserveGraph: (spokeId: number, hubId: number, asset: string, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<StellarMarketGraph>;
261
+ }, init?: OurRequestInit) => Promise<Api.StellarCampaignLeaderboardDto>;
262
+ /** {@inheritDoc getStellarStatsHistory} */
263
+ statsHistory: (query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<Api.StellarStatsHistoryDto>;
264
+ /** {@inheritDoc getStellarRevenueSeries} */
265
+ revenue: (query: StellarRevenueQuery, init?: OurRequestInit) => Promise<Api.RevenueSeriesDto>;
266
+ /** {@inheritDoc getStellarFeeRevenueSeries} */
267
+ feeRevenue: (query: StellarFeeRevenueQuery, init?: OurRequestInit) => Promise<Api.FeeRevenueSeriesDto>;
268
+ /** {@inheritDoc getStellarLiquidationsSeries} */
269
+ liquidations: (query: StellarLiquidationsQuery, init?: OurRequestInit) => Promise<Api.LiquidationsSeriesDto>;
270
+ /** {@inheritDoc getStellarVolumeSeries} */
271
+ volume: (query: StellarVolumeQuery, init?: OurRequestInit) => Promise<Api.VolumeSeriesDto>;
272
+ /** {@inheritDoc getStellarActiveUsersSeries} */
273
+ activeUsers: (query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<Api.ActiveUsersSeriesDto>;
274
+ /** {@inheritDoc getStellarRateSpreadSeries} */
275
+ rateSpread: (query: StellarRateSpreadQuery, init?: OurRequestInit) => Promise<Api.RateSpreadSeriesDto>;
276
+ /** {@inheritDoc getStellarDefiLlamaDimensions} */
277
+ defillama: (query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<Api.DefiLlamaDimensionsDto>;
278
+ /** {@inheritDoc getStellarUserHistory} */
279
+ userHistory: (accountId: string, query: StellarMarketGraphQuery, init?: OurRequestInit) => Promise<Api.UserHistoryDto>;
280
+ /** {@inheritDoc getStellarPositionsPnl} */
281
+ positionsPnl: (accountId: string, init?: OurRequestInit) => Promise<Api.StellarPositionsPnlDto>;
282
+ /** {@inheritDoc getStellarPnlByScope} */
283
+ pnlByScope: (scope: "asset" | "hub" | "protocol", init?: OurRequestInit) => Promise<Api.PnlByScopeDto>;
284
+ /** {@inheritDoc getStellarCampaignMe} */
285
+ campaignMe: (owner: string, init?: OurRequestInit) => Promise<Api.StellarCampaignMeDto>;
137
286
  };
138
287
  export type StellarLendingRead = ReturnType<typeof stellarLendingRead>;
139
- export * from './lending-read-types';
140
- export type { StellarApyRange, StellarAssetListItem, StellarHubListItem, StellarReserveListItem, StellarSpokeListItem, StellarUserActivityItem, } from '@xoxno/types/stellar-lending';
288
+ export * from './lending-read-types.js';