@xoxno/sdk-js 1.0.233 → 1.0.234
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/cjs/sdk/stellar/lending-api-types.d.ts +20 -0
- package/dist/cjs/sdk/stellar/read/schemas.d.ts +37 -1
- package/dist/cjs/sdk/stellar/read/types.d.ts +9 -0
- package/dist/esm/sdk/stellar/read/schemas.js +19 -5
- package/dist/index.cjs +1 -1
- package/dist/sdk/stellar/index.cjs +1 -1
- package/dist/sdk/stellar/index.esm.js +1 -1
- package/dist/sdk/stellar/lending-api-types.d.ts +20 -0
- package/dist/sdk/stellar/read/index.cjs +1 -1
- package/dist/sdk/stellar/read/index.esm.js +1 -1
- package/dist/sdk/stellar/read/schemas.d.ts +37 -1
- package/dist/sdk/stellar/read/types.d.ts +9 -0
- package/package.json +1 -1
|
@@ -29,6 +29,8 @@ export type StellarAssetListItemDto = {
|
|
|
29
29
|
"marketCount": number;
|
|
30
30
|
/** The two underlying token SACs when this asset is an AMM LP share, so clients can render the pair instead of the share itself, which has no logo. Present only when both oracle legs are Token price keys — a Ref leg is registry-only and has no SAC — so "present" means "renderable pair", with no partial case to handle. */
|
|
31
31
|
"lpUnderlying"?: StellarDomain.StellarLpUnderlying;
|
|
32
|
+
/** Estimated underlying annualized yield, separate from base lending APY. Fractions: 0.05 = 5%. */
|
|
33
|
+
"extraApy"?: (MarketExtraApy);
|
|
32
34
|
};
|
|
33
35
|
export type StellarLendingContextDto = {
|
|
34
36
|
"assets": Array<StellarAssetListItemDto>;
|
|
@@ -128,6 +130,8 @@ export type StellarReserveListItemDto = {
|
|
|
128
130
|
"useAsCollateral": boolean;
|
|
129
131
|
/** Interest-rate-model curve (ray-scaled) for APY simulation in supply/borrow modals. */
|
|
130
132
|
"irm"?: (ReserveIrmCurveDto);
|
|
133
|
+
/** Estimated underlying annualized yield, separate from base lending APY. Fractions: 0.05 = 5%. */
|
|
134
|
+
"extraApy"?: (MarketExtraApy);
|
|
131
135
|
};
|
|
132
136
|
export type ReserveDto = {
|
|
133
137
|
"spokeId": number;
|
|
@@ -200,6 +204,8 @@ export type ReserveDto = {
|
|
|
200
204
|
"supportedCollateral": Array<string>;
|
|
201
205
|
/** Assets borrowable in this spoke (token addresses). */
|
|
202
206
|
"borrowable": Array<string>;
|
|
207
|
+
/** Estimated underlying annualized yield, separate from base lending APY. Fractions: 0.05 = 5%. */
|
|
208
|
+
"extraApy"?: (MarketExtraApy);
|
|
203
209
|
};
|
|
204
210
|
export type TopHoldersDto = {
|
|
205
211
|
"spokeId"?: number;
|
|
@@ -241,6 +247,8 @@ export type AssetDto = {
|
|
|
241
247
|
"maxBorrowApy": number;
|
|
242
248
|
/** Current indexed oracle configuration; null until first configure. */
|
|
243
249
|
"oracleProvider": ((AssetOracleConfigDto)) | null;
|
|
250
|
+
/** Estimated underlying annualized yield, separate from base lending APY. Fractions: 0.05 = 5%. */
|
|
251
|
+
"extraApy"?: (MarketExtraApy);
|
|
244
252
|
};
|
|
245
253
|
export type AssetPageDto = {
|
|
246
254
|
"asset": string;
|
|
@@ -327,6 +335,8 @@ export type AssetMarketDto = {
|
|
|
327
335
|
"liveSupplyIndexRay": string;
|
|
328
336
|
/** Live borrow index applied (ray, 1e27). */
|
|
329
337
|
"liveBorrowIndexRay": string;
|
|
338
|
+
/** Estimated underlying annualized yield, separate from base lending APY. Fractions: 0.05 = 5%. */
|
|
339
|
+
"extraApy"?: (MarketExtraApy);
|
|
330
340
|
};
|
|
331
341
|
export type HubDto = {
|
|
332
342
|
"hubId": number;
|
|
@@ -512,6 +522,12 @@ export type StellarActivityPageDto = {
|
|
|
512
522
|
"hasMoreResults": boolean;
|
|
513
523
|
"continuationToken"?: string;
|
|
514
524
|
};
|
|
525
|
+
export type MarketExtraApy = {
|
|
526
|
+
/** Native APY for derivatives tokes */
|
|
527
|
+
"nativeApy"?: number;
|
|
528
|
+
/** LP fees APR */
|
|
529
|
+
"feesApr"?: number;
|
|
530
|
+
};
|
|
515
531
|
export type StellarMarketIndexByHub = {
|
|
516
532
|
"hubId": number;
|
|
517
533
|
"asset": string;
|
|
@@ -603,6 +619,8 @@ export type HubAssetDto = {
|
|
|
603
619
|
"liveSupplyIndexRay": string;
|
|
604
620
|
/** Live borrow index applied (ray, 1e27). */
|
|
605
621
|
"liveBorrowIndexRay": string;
|
|
622
|
+
/** Estimated underlying annualized yield, separate from base lending APY. Fractions: 0.05 = 5%. */
|
|
623
|
+
"extraApy"?: (MarketExtraApy);
|
|
606
624
|
};
|
|
607
625
|
export type SpokeConnectedHubDto = {
|
|
608
626
|
"hubId": number;
|
|
@@ -651,6 +669,8 @@ export type SpokeMarketDto = {
|
|
|
651
669
|
"liveSupplyIndexRay": string;
|
|
652
670
|
/** Live borrow index applied (ray, 1e27). */
|
|
653
671
|
"liveBorrowIndexRay": string;
|
|
672
|
+
/** Estimated underlying annualized yield, separate from base lending APY. Fractions: 0.05 = 5%. */
|
|
673
|
+
"extraApy"?: (MarketExtraApy);
|
|
654
674
|
};
|
|
655
675
|
export type AccountPositionDto = {
|
|
656
676
|
"accountId": string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** OpenAPI response schema for LendingPosition[].
|
|
1
|
+
/** OpenAPI response schema for LendingPosition[]. Nullable data remains explicit; underlying yield is optional. */
|
|
2
2
|
export declare const lendingPositionsSchema: {
|
|
3
3
|
type: "array";
|
|
4
4
|
items: {
|
|
@@ -108,6 +108,18 @@ export declare const lendingPositionsSchema: {
|
|
|
108
108
|
nullable: boolean;
|
|
109
109
|
type: "string";
|
|
110
110
|
};
|
|
111
|
+
extraApy: {
|
|
112
|
+
type: "object";
|
|
113
|
+
properties: {
|
|
114
|
+
nativeApy: {
|
|
115
|
+
type: "number";
|
|
116
|
+
};
|
|
117
|
+
feesApr: {
|
|
118
|
+
type: "number";
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
description: string;
|
|
122
|
+
};
|
|
111
123
|
};
|
|
112
124
|
};
|
|
113
125
|
};
|
|
@@ -191,6 +203,18 @@ export declare const lendingPositionsSchema: {
|
|
|
191
203
|
nullable: boolean;
|
|
192
204
|
type: "string";
|
|
193
205
|
};
|
|
206
|
+
extraApy: {
|
|
207
|
+
type: "object";
|
|
208
|
+
properties: {
|
|
209
|
+
nativeApy: {
|
|
210
|
+
type: "number";
|
|
211
|
+
};
|
|
212
|
+
feesApr: {
|
|
213
|
+
type: "number";
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
description: string;
|
|
217
|
+
};
|
|
194
218
|
};
|
|
195
219
|
};
|
|
196
220
|
};
|
|
@@ -370,6 +394,18 @@ export declare const lendingAssetsSchema: {
|
|
|
370
394
|
nullable: boolean;
|
|
371
395
|
type: "string";
|
|
372
396
|
};
|
|
397
|
+
extraApy: {
|
|
398
|
+
type: "object";
|
|
399
|
+
properties: {
|
|
400
|
+
nativeApy: {
|
|
401
|
+
type: "number";
|
|
402
|
+
};
|
|
403
|
+
feesApr: {
|
|
404
|
+
type: "number";
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
description: string;
|
|
408
|
+
};
|
|
373
409
|
};
|
|
374
410
|
};
|
|
375
411
|
};
|
|
@@ -14,7 +14,14 @@ export interface LendingPriceStatus {
|
|
|
14
14
|
deviation: boolean;
|
|
15
15
|
timestamp: number | null;
|
|
16
16
|
}
|
|
17
|
+
/** Yield fractions: 0.05 means 5%; separate from base lending interest. */
|
|
18
|
+
export interface LendingExtraApy {
|
|
19
|
+
nativeApy?: number;
|
|
20
|
+
feesApr?: number;
|
|
21
|
+
}
|
|
17
22
|
export interface PositionAsset extends LendingToken {
|
|
23
|
+
/** Embedded annualized yield; apy remains base lending interest. */
|
|
24
|
+
extraApy?: LendingExtraApy;
|
|
18
25
|
hubId: number;
|
|
19
26
|
hubName: string;
|
|
20
27
|
/** Integer token base units, never scaled shares. */
|
|
@@ -68,6 +75,8 @@ export interface AssetSpoke {
|
|
|
68
75
|
canOpenAccount: boolean;
|
|
69
76
|
}
|
|
70
77
|
export interface LendingAsset extends LendingToken {
|
|
78
|
+
/** Embedded annualized yield; supplyApy/borrowApy remain base lending interest. */
|
|
79
|
+
extraApy?: LendingExtraApy;
|
|
71
80
|
hubId: number;
|
|
72
81
|
hubName: string;
|
|
73
82
|
network: 'mainnet' | 'testnet';
|
|
@@ -31,10 +31,10 @@ const dataStatus = {
|
|
|
31
31
|
'incomplete'
|
|
32
32
|
]
|
|
33
33
|
};
|
|
34
|
-
function object(properties) {
|
|
34
|
+
function object(properties, optional = []) {
|
|
35
35
|
return {
|
|
36
36
|
type: 'object',
|
|
37
|
-
required: Object.keys(properties),
|
|
37
|
+
required: Object.keys(properties).filter((key)=>!optional.includes(key)),
|
|
38
38
|
properties
|
|
39
39
|
};
|
|
40
40
|
}
|
|
@@ -51,7 +51,16 @@ const priceStatus = object({
|
|
|
51
51
|
deviation: boolean,
|
|
52
52
|
timestamp: nullableNumber
|
|
53
53
|
});
|
|
54
|
+
const extraApy = {
|
|
55
|
+
type: 'object',
|
|
56
|
+
properties: {
|
|
57
|
+
nativeApy: number,
|
|
58
|
+
feesApr: number
|
|
59
|
+
},
|
|
60
|
+
description: 'Embedded annualized yield fractions, separate from base lending interest.'
|
|
61
|
+
};
|
|
54
62
|
const positionAsset = object({
|
|
63
|
+
extraApy,
|
|
55
64
|
...token,
|
|
56
65
|
hubId: number,
|
|
57
66
|
hubName: string,
|
|
@@ -70,7 +79,9 @@ const positionAsset = object({
|
|
|
70
79
|
indexRay: nullableString,
|
|
71
80
|
indexedAt: number,
|
|
72
81
|
indexedLedger: number
|
|
73
|
-
}
|
|
82
|
+
}, [
|
|
83
|
+
'extraApy'
|
|
84
|
+
]);
|
|
74
85
|
const capacity = object({
|
|
75
86
|
amountRaw: nullableString,
|
|
76
87
|
amount: nullableString,
|
|
@@ -90,7 +101,7 @@ const spoke = object({
|
|
|
90
101
|
description: 'Spoke admits new accounts; other entry gates still apply.'
|
|
91
102
|
}
|
|
92
103
|
});
|
|
93
|
-
/** OpenAPI response schema for LendingPosition[].
|
|
104
|
+
/** OpenAPI response schema for LendingPosition[]. Nullable data remains explicit; underlying yield is optional. */ export const lendingPositionsSchema = {
|
|
94
105
|
type: 'array',
|
|
95
106
|
items: object({
|
|
96
107
|
accountId: string,
|
|
@@ -135,6 +146,7 @@ const spoke = object({
|
|
|
135
146
|
/** OpenAPI response schema for LendingAsset[]. Capacities are indexed estimates. */ export const lendingAssetsSchema = {
|
|
136
147
|
type: 'array',
|
|
137
148
|
items: object({
|
|
149
|
+
extraApy,
|
|
138
150
|
...token,
|
|
139
151
|
hubId: number,
|
|
140
152
|
hubName: string,
|
|
@@ -159,5 +171,7 @@ const spoke = object({
|
|
|
159
171
|
description: 'Pool state timestamp. Capacities are indexed snapshot estimates; prepare/simulate before signing.'
|
|
160
172
|
},
|
|
161
173
|
indexedLedger: number
|
|
162
|
-
}
|
|
174
|
+
}, [
|
|
175
|
+
'extraApy'
|
|
176
|
+
])
|
|
163
177
|
};
|