@0dotxyz/p0-ts-sdk 2.4.0 → 2.4.1
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/{dto-rate-model.types-DWB7J91n.d.cts → dto-rate-model.types-CfqbDcgG.d.cts} +9 -0
- package/dist/{dto-rate-model.types-DWB7J91n.d.ts → dto-rate-model.types-CfqbDcgG.d.ts} +9 -0
- package/dist/index.cjs +9 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.cts +2 -2
- package/dist/instructions.d.ts +2 -2
- package/dist/{types-DDP4jEc9.d.cts → types-BnW15JjT.d.cts} +1 -1
- package/dist/{types-rBQYamIi.d.ts → types-CviIoob4.d.ts} +1 -1
- package/dist/vendor.cjs +9 -2
- package/dist/vendor.cjs.map +1 -1
- package/dist/vendor.d.cts +2 -2
- package/dist/vendor.d.ts +2 -2
- package/dist/vendor.js +9 -2
- package/dist/vendor.js.map +1 -1
- package/package.json +1 -1
|
@@ -51,6 +51,10 @@ interface KaminoReserveConfig {
|
|
|
51
51
|
protocolTakeRatePct: number;
|
|
52
52
|
/** Flat rate that goes to the host */
|
|
53
53
|
hostFixedInterestRateBps: number;
|
|
54
|
+
/** Maximum deposit limit of liquidity in native units, u64::MAX for inf */
|
|
55
|
+
depositLimit: BN;
|
|
56
|
+
/** Maximum amount borrowed, u64::MAX for inf, 0 to disable borrows (protected deposits) */
|
|
57
|
+
borrowLimit: BN;
|
|
54
58
|
/** Borrow rate curve based on utilization */
|
|
55
59
|
borrowRateCurve: KaminoBorrowRateCurve;
|
|
56
60
|
/** Oracle configurations */
|
|
@@ -114,6 +118,8 @@ interface KaminoReserveCollateralJSON {
|
|
|
114
118
|
interface KaminoReserveConfigJSON {
|
|
115
119
|
protocolTakeRatePct: number;
|
|
116
120
|
hostFixedInterestRateBps: number;
|
|
121
|
+
depositLimit: string;
|
|
122
|
+
borrowLimit: string;
|
|
117
123
|
borrowRateCurve: KaminoBorrowRateCurveJSON;
|
|
118
124
|
tokenInfo: KaminoReserveTokenInfoJSON;
|
|
119
125
|
}
|
|
@@ -210,6 +216,8 @@ interface KaminoFarmTokenInfo {
|
|
|
210
216
|
}
|
|
211
217
|
interface KaminoFarmRewardInfo {
|
|
212
218
|
token: KaminoFarmTokenInfo;
|
|
219
|
+
/** Amount of rewards remaining in the rewards vault */
|
|
220
|
+
rewardsAvailable: BN;
|
|
213
221
|
rewardsPerSecondDecimals: number;
|
|
214
222
|
rewardScheduleCurve: KaminoRewardScheduleCurve;
|
|
215
223
|
}
|
|
@@ -240,6 +248,7 @@ interface KaminoFarmTokenInfoJSON {
|
|
|
240
248
|
}
|
|
241
249
|
interface KaminoFarmRewardInfoJSON {
|
|
242
250
|
token: KaminoFarmTokenInfoJSON;
|
|
251
|
+
rewardsAvailable: string;
|
|
243
252
|
rewardsPerSecondDecimals: number;
|
|
244
253
|
rewardScheduleCurve: KaminoRewardScheduleCurveJSON;
|
|
245
254
|
}
|
|
@@ -51,6 +51,10 @@ interface KaminoReserveConfig {
|
|
|
51
51
|
protocolTakeRatePct: number;
|
|
52
52
|
/** Flat rate that goes to the host */
|
|
53
53
|
hostFixedInterestRateBps: number;
|
|
54
|
+
/** Maximum deposit limit of liquidity in native units, u64::MAX for inf */
|
|
55
|
+
depositLimit: BN;
|
|
56
|
+
/** Maximum amount borrowed, u64::MAX for inf, 0 to disable borrows (protected deposits) */
|
|
57
|
+
borrowLimit: BN;
|
|
54
58
|
/** Borrow rate curve based on utilization */
|
|
55
59
|
borrowRateCurve: KaminoBorrowRateCurve;
|
|
56
60
|
/** Oracle configurations */
|
|
@@ -114,6 +118,8 @@ interface KaminoReserveCollateralJSON {
|
|
|
114
118
|
interface KaminoReserveConfigJSON {
|
|
115
119
|
protocolTakeRatePct: number;
|
|
116
120
|
hostFixedInterestRateBps: number;
|
|
121
|
+
depositLimit: string;
|
|
122
|
+
borrowLimit: string;
|
|
117
123
|
borrowRateCurve: KaminoBorrowRateCurveJSON;
|
|
118
124
|
tokenInfo: KaminoReserveTokenInfoJSON;
|
|
119
125
|
}
|
|
@@ -210,6 +216,8 @@ interface KaminoFarmTokenInfo {
|
|
|
210
216
|
}
|
|
211
217
|
interface KaminoFarmRewardInfo {
|
|
212
218
|
token: KaminoFarmTokenInfo;
|
|
219
|
+
/** Amount of rewards remaining in the rewards vault */
|
|
220
|
+
rewardsAvailable: BN;
|
|
213
221
|
rewardsPerSecondDecimals: number;
|
|
214
222
|
rewardScheduleCurve: KaminoRewardScheduleCurve;
|
|
215
223
|
}
|
|
@@ -240,6 +248,7 @@ interface KaminoFarmTokenInfoJSON {
|
|
|
240
248
|
}
|
|
241
249
|
interface KaminoFarmRewardInfoJSON {
|
|
242
250
|
token: KaminoFarmTokenInfoJSON;
|
|
251
|
+
rewardsAvailable: string;
|
|
243
252
|
rewardsPerSecondDecimals: number;
|
|
244
253
|
rewardScheduleCurve: KaminoRewardScheduleCurveJSON;
|
|
245
254
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -36493,6 +36493,8 @@ function kaminoReserveToDto(reserve) {
|
|
|
36493
36493
|
config: {
|
|
36494
36494
|
protocolTakeRatePct: reserve.config.protocolTakeRatePct,
|
|
36495
36495
|
hostFixedInterestRateBps: reserve.config.hostFixedInterestRateBps,
|
|
36496
|
+
depositLimit: reserve.config.depositLimit.toString(),
|
|
36497
|
+
borrowLimit: reserve.config.borrowLimit.toString(),
|
|
36496
36498
|
borrowRateCurve: {
|
|
36497
36499
|
points: reserve.config.borrowRateCurve.points.map((item) => ({
|
|
36498
36500
|
utilizationRateBps: item.utilizationRateBps,
|
|
@@ -43013,12 +43015,13 @@ function dtoToKaminoObligation(obligationDto) {
|
|
|
43013
43015
|
return {
|
|
43014
43016
|
lendingMarket: new web3_js.PublicKey(obligationDto.lendingMarket),
|
|
43015
43017
|
owner: new web3_js.PublicKey(obligationDto.owner),
|
|
43016
|
-
|
|
43018
|
+
// Hosted endpoints may prune empty position arrays from the payload
|
|
43019
|
+
deposits: (obligationDto.deposits ?? []).map((item) => ({
|
|
43017
43020
|
depositReserve: new web3_js.PublicKey(item.depositReserve),
|
|
43018
43021
|
depositedAmount: new BN8__default.default(item.depositedAmount),
|
|
43019
43022
|
marketValueSf: new BN8__default.default(item.marketValueSf)
|
|
43020
43023
|
})),
|
|
43021
|
-
borrows: obligationDto.borrows.map((item) => ({
|
|
43024
|
+
borrows: (obligationDto.borrows ?? []).map((item) => ({
|
|
43022
43025
|
borrowReserve: new web3_js.PublicKey(item.borrowReserve),
|
|
43023
43026
|
borrowedAmountSf: new BN8__default.default(item.borrowedAmountSf),
|
|
43024
43027
|
marketValueSf: new BN8__default.default(item.marketValueSf)
|
|
@@ -43051,6 +43054,8 @@ function dtoToKaminoReserve(reserveDto) {
|
|
|
43051
43054
|
config: {
|
|
43052
43055
|
protocolTakeRatePct: reserveDto.config.protocolTakeRatePct,
|
|
43053
43056
|
hostFixedInterestRateBps: reserveDto.config.hostFixedInterestRateBps,
|
|
43057
|
+
depositLimit: new BN8__default.default(reserveDto.config.depositLimit),
|
|
43058
|
+
borrowLimit: new BN8__default.default(reserveDto.config.borrowLimit),
|
|
43054
43059
|
borrowRateCurve: {
|
|
43055
43060
|
points: reserveDto.config.borrowRateCurve.points.map((item) => ({
|
|
43056
43061
|
utilizationRateBps: item.utilizationRateBps,
|
|
@@ -57904,6 +57909,7 @@ function kaminoFarmStateToDto(farmState) {
|
|
|
57904
57909
|
mint: item.token.mint.toBase58(),
|
|
57905
57910
|
decimals: item.token.decimals.toString()
|
|
57906
57911
|
},
|
|
57912
|
+
rewardsAvailable: item.rewardsAvailable.toString(),
|
|
57907
57913
|
rewardsPerSecondDecimals: item.rewardsPerSecondDecimals,
|
|
57908
57914
|
rewardScheduleCurve: {
|
|
57909
57915
|
points: item.rewardScheduleCurve.points.map((p) => ({
|
|
@@ -58017,6 +58023,7 @@ function dtoToKaminoFarmState(dto) {
|
|
|
58017
58023
|
mint: new web3_js.PublicKey(item.token.mint),
|
|
58018
58024
|
decimals: new BN8__default.default(item.token.decimals)
|
|
58019
58025
|
},
|
|
58026
|
+
rewardsAvailable: new BN8__default.default(item.rewardsAvailable),
|
|
58020
58027
|
rewardsPerSecondDecimals: item.rewardsPerSecondDecimals,
|
|
58021
58028
|
rewardScheduleCurve: {
|
|
58022
58029
|
points: item.rewardScheduleCurve.points.map((p) => ({
|