@0dotxyz/p0-ts-sdk 2.4.1 → 2.4.2
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-CfqbDcgG.d.cts → dto-rate-model.types-IT8wckYH.d.cts} +7 -38
- package/dist/{dto-rate-model.types-CfqbDcgG.d.ts → dto-rate-model.types-IT8wckYH.d.ts} +7 -38
- package/dist/index.cjs +4 -32
- 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 +4 -32
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.cts +2 -2
- package/dist/instructions.d.ts +2 -2
- package/dist/{types-BnW15JjT.d.cts → types-BkXrDBCr.d.cts} +1 -1
- package/dist/{types-CviIoob4.d.ts → types-Ci3ayYQ2.d.ts} +1 -1
- package/dist/vendor.cjs +4 -32
- 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 +4 -32
- package/dist/vendor.js.map +1 -1
- package/package.json +1 -1
|
@@ -752,48 +752,32 @@ interface JupLendingState {
|
|
|
752
752
|
*/
|
|
753
753
|
interface JupTokenReserve {
|
|
754
754
|
pubkey: PublicKey;
|
|
755
|
-
mint: PublicKey;
|
|
756
|
-
vault: PublicKey;
|
|
757
755
|
borrowRate: number;
|
|
758
756
|
feeOnInterest: number;
|
|
759
757
|
lastUtilization: number;
|
|
760
|
-
lastUpdateTimestamp: BN;
|
|
761
758
|
supplyExchangePrice: BN;
|
|
762
759
|
borrowExchangePrice: BN;
|
|
763
|
-
maxUtilization: number;
|
|
764
760
|
totalSupplyWithInterest: BN;
|
|
765
761
|
totalSupplyInterestFree: BN;
|
|
766
762
|
totalBorrowWithInterest: BN;
|
|
767
763
|
totalBorrowInterestFree: BN;
|
|
768
|
-
totalClaimAmount: BN;
|
|
769
|
-
interactingProtocol: PublicKey;
|
|
770
|
-
interactingTimestamp: BN;
|
|
771
|
-
interactingBalance: BN;
|
|
772
764
|
}
|
|
773
765
|
|
|
774
766
|
/**
|
|
775
|
-
* JSON-serializable DTO for the TokenReserve
|
|
767
|
+
* JSON-serializable DTO for the curated TokenReserve.
|
|
776
768
|
* PublicKey → string, BN → string.
|
|
777
769
|
*/
|
|
778
770
|
interface JupTokenReserveJSON {
|
|
779
771
|
pubkey: string;
|
|
780
|
-
mint: string;
|
|
781
|
-
vault: string;
|
|
782
772
|
borrowRate: number;
|
|
783
773
|
feeOnInterest: number;
|
|
784
774
|
lastUtilization: number;
|
|
785
|
-
lastUpdateTimestamp: string;
|
|
786
775
|
supplyExchangePrice: string;
|
|
787
776
|
borrowExchangePrice: string;
|
|
788
|
-
maxUtilization: number;
|
|
789
777
|
totalSupplyWithInterest: string;
|
|
790
778
|
totalSupplyInterestFree: string;
|
|
791
779
|
totalBorrowWithInterest: string;
|
|
792
780
|
totalBorrowInterestFree: string;
|
|
793
|
-
totalClaimAmount: string;
|
|
794
|
-
interactingProtocol: string;
|
|
795
|
-
interactingTimestamp: string;
|
|
796
|
-
interactingBalance: string;
|
|
797
781
|
}
|
|
798
782
|
|
|
799
783
|
/**
|
|
@@ -802,9 +786,6 @@ interface JupTokenReserveJSON {
|
|
|
802
786
|
* Controls the rewards distribution parameters for a jup-lend market.
|
|
803
787
|
*/
|
|
804
788
|
interface JupLendingRewardsRateModel {
|
|
805
|
-
pubkey: PublicKey;
|
|
806
|
-
/** Mint address */
|
|
807
|
-
mint: PublicKey;
|
|
808
789
|
/** TVL below which rewards rate is 0 */
|
|
809
790
|
startTvl: BN;
|
|
810
791
|
/** Duration for which current rewards should run */
|
|
@@ -813,34 +794,25 @@ interface JupLendingRewardsRateModel {
|
|
|
813
794
|
startTime: BN;
|
|
814
795
|
/** Annualized reward based on input params (duration, rewardAmount) */
|
|
815
796
|
yearlyReward: BN;
|
|
816
|
-
/** Duration for the next rewards phase */
|
|
817
|
-
nextDuration: BN;
|
|
818
|
-
/** Amount of rewards for the next phase */
|
|
819
|
-
nextRewardAmount: BN;
|
|
820
797
|
}
|
|
821
798
|
|
|
822
799
|
/**
|
|
823
|
-
* JSON-serializable DTO for the LendingRewardsRateModel
|
|
824
|
-
*
|
|
800
|
+
* JSON-serializable DTO for the curated LendingRewardsRateModel.
|
|
801
|
+
* BN → string.
|
|
825
802
|
*/
|
|
826
803
|
interface JupLendingRewardsRateModelJSON {
|
|
827
|
-
pubkey: string;
|
|
828
|
-
mint: string;
|
|
829
804
|
startTvl: string;
|
|
830
805
|
duration: string;
|
|
831
806
|
startTime: string;
|
|
832
807
|
yearlyReward: string;
|
|
833
|
-
nextDuration: string;
|
|
834
|
-
nextRewardAmount: string;
|
|
835
|
-
bump?: number;
|
|
836
808
|
}
|
|
837
809
|
|
|
838
810
|
/**
|
|
839
|
-
* Curated RateModel
|
|
811
|
+
* Curated RateModel used throughout the codebase.
|
|
812
|
+
*
|
|
813
|
+
* Interest-rate curve parameters (all bps values).
|
|
840
814
|
*/
|
|
841
815
|
interface JupRateModel {
|
|
842
|
-
pubkey: PublicKey;
|
|
843
|
-
mint: PublicKey;
|
|
844
816
|
version: number;
|
|
845
817
|
rateAtZero: number;
|
|
846
818
|
kink1Utilization: number;
|
|
@@ -851,12 +823,9 @@ interface JupRateModel {
|
|
|
851
823
|
}
|
|
852
824
|
|
|
853
825
|
/**
|
|
854
|
-
* JSON-serializable DTO for the RateModel
|
|
855
|
-
* PublicKey → string.
|
|
826
|
+
* JSON-serializable DTO for the curated RateModel.
|
|
856
827
|
*/
|
|
857
828
|
interface JupRateModelJSON {
|
|
858
|
-
pubkey: string;
|
|
859
|
-
mint: string;
|
|
860
829
|
version: number;
|
|
861
830
|
rateAtZero: number;
|
|
862
831
|
kink1Utilization: number;
|
|
@@ -752,48 +752,32 @@ interface JupLendingState {
|
|
|
752
752
|
*/
|
|
753
753
|
interface JupTokenReserve {
|
|
754
754
|
pubkey: PublicKey;
|
|
755
|
-
mint: PublicKey;
|
|
756
|
-
vault: PublicKey;
|
|
757
755
|
borrowRate: number;
|
|
758
756
|
feeOnInterest: number;
|
|
759
757
|
lastUtilization: number;
|
|
760
|
-
lastUpdateTimestamp: BN;
|
|
761
758
|
supplyExchangePrice: BN;
|
|
762
759
|
borrowExchangePrice: BN;
|
|
763
|
-
maxUtilization: number;
|
|
764
760
|
totalSupplyWithInterest: BN;
|
|
765
761
|
totalSupplyInterestFree: BN;
|
|
766
762
|
totalBorrowWithInterest: BN;
|
|
767
763
|
totalBorrowInterestFree: BN;
|
|
768
|
-
totalClaimAmount: BN;
|
|
769
|
-
interactingProtocol: PublicKey;
|
|
770
|
-
interactingTimestamp: BN;
|
|
771
|
-
interactingBalance: BN;
|
|
772
764
|
}
|
|
773
765
|
|
|
774
766
|
/**
|
|
775
|
-
* JSON-serializable DTO for the TokenReserve
|
|
767
|
+
* JSON-serializable DTO for the curated TokenReserve.
|
|
776
768
|
* PublicKey → string, BN → string.
|
|
777
769
|
*/
|
|
778
770
|
interface JupTokenReserveJSON {
|
|
779
771
|
pubkey: string;
|
|
780
|
-
mint: string;
|
|
781
|
-
vault: string;
|
|
782
772
|
borrowRate: number;
|
|
783
773
|
feeOnInterest: number;
|
|
784
774
|
lastUtilization: number;
|
|
785
|
-
lastUpdateTimestamp: string;
|
|
786
775
|
supplyExchangePrice: string;
|
|
787
776
|
borrowExchangePrice: string;
|
|
788
|
-
maxUtilization: number;
|
|
789
777
|
totalSupplyWithInterest: string;
|
|
790
778
|
totalSupplyInterestFree: string;
|
|
791
779
|
totalBorrowWithInterest: string;
|
|
792
780
|
totalBorrowInterestFree: string;
|
|
793
|
-
totalClaimAmount: string;
|
|
794
|
-
interactingProtocol: string;
|
|
795
|
-
interactingTimestamp: string;
|
|
796
|
-
interactingBalance: string;
|
|
797
781
|
}
|
|
798
782
|
|
|
799
783
|
/**
|
|
@@ -802,9 +786,6 @@ interface JupTokenReserveJSON {
|
|
|
802
786
|
* Controls the rewards distribution parameters for a jup-lend market.
|
|
803
787
|
*/
|
|
804
788
|
interface JupLendingRewardsRateModel {
|
|
805
|
-
pubkey: PublicKey;
|
|
806
|
-
/** Mint address */
|
|
807
|
-
mint: PublicKey;
|
|
808
789
|
/** TVL below which rewards rate is 0 */
|
|
809
790
|
startTvl: BN;
|
|
810
791
|
/** Duration for which current rewards should run */
|
|
@@ -813,34 +794,25 @@ interface JupLendingRewardsRateModel {
|
|
|
813
794
|
startTime: BN;
|
|
814
795
|
/** Annualized reward based on input params (duration, rewardAmount) */
|
|
815
796
|
yearlyReward: BN;
|
|
816
|
-
/** Duration for the next rewards phase */
|
|
817
|
-
nextDuration: BN;
|
|
818
|
-
/** Amount of rewards for the next phase */
|
|
819
|
-
nextRewardAmount: BN;
|
|
820
797
|
}
|
|
821
798
|
|
|
822
799
|
/**
|
|
823
|
-
* JSON-serializable DTO for the LendingRewardsRateModel
|
|
824
|
-
*
|
|
800
|
+
* JSON-serializable DTO for the curated LendingRewardsRateModel.
|
|
801
|
+
* BN → string.
|
|
825
802
|
*/
|
|
826
803
|
interface JupLendingRewardsRateModelJSON {
|
|
827
|
-
pubkey: string;
|
|
828
|
-
mint: string;
|
|
829
804
|
startTvl: string;
|
|
830
805
|
duration: string;
|
|
831
806
|
startTime: string;
|
|
832
807
|
yearlyReward: string;
|
|
833
|
-
nextDuration: string;
|
|
834
|
-
nextRewardAmount: string;
|
|
835
|
-
bump?: number;
|
|
836
808
|
}
|
|
837
809
|
|
|
838
810
|
/**
|
|
839
|
-
* Curated RateModel
|
|
811
|
+
* Curated RateModel used throughout the codebase.
|
|
812
|
+
*
|
|
813
|
+
* Interest-rate curve parameters (all bps values).
|
|
840
814
|
*/
|
|
841
815
|
interface JupRateModel {
|
|
842
|
-
pubkey: PublicKey;
|
|
843
|
-
mint: PublicKey;
|
|
844
816
|
version: number;
|
|
845
817
|
rateAtZero: number;
|
|
846
818
|
kink1Utilization: number;
|
|
@@ -851,12 +823,9 @@ interface JupRateModel {
|
|
|
851
823
|
}
|
|
852
824
|
|
|
853
825
|
/**
|
|
854
|
-
* JSON-serializable DTO for the RateModel
|
|
855
|
-
* PublicKey → string.
|
|
826
|
+
* JSON-serializable DTO for the curated RateModel.
|
|
856
827
|
*/
|
|
857
828
|
interface JupRateModelJSON {
|
|
858
|
-
pubkey: string;
|
|
859
|
-
mint: string;
|
|
860
829
|
version: number;
|
|
861
830
|
rateAtZero: number;
|
|
862
831
|
kink1Utilization: number;
|
package/dist/index.cjs
CHANGED
|
@@ -43700,41 +43700,27 @@ function jupLendingStateRawToDto(raw) {
|
|
|
43700
43700
|
function jupTokenReserveRawToDto(raw) {
|
|
43701
43701
|
return {
|
|
43702
43702
|
pubkey: raw.pubkey.toBase58(),
|
|
43703
|
-
mint: raw.mint.toBase58(),
|
|
43704
|
-
vault: raw.vault.toBase58(),
|
|
43705
43703
|
borrowRate: raw.borrowRate,
|
|
43706
43704
|
feeOnInterest: raw.feeOnInterest,
|
|
43707
43705
|
lastUtilization: raw.lastUtilization,
|
|
43708
|
-
lastUpdateTimestamp: raw.lastUpdateTimestamp.toString(),
|
|
43709
43706
|
supplyExchangePrice: raw.supplyExchangePrice.toString(),
|
|
43710
43707
|
borrowExchangePrice: raw.borrowExchangePrice.toString(),
|
|
43711
|
-
maxUtilization: raw.maxUtilization,
|
|
43712
43708
|
totalSupplyWithInterest: raw.totalSupplyWithInterest.toString(),
|
|
43713
43709
|
totalSupplyInterestFree: raw.totalSupplyInterestFree.toString(),
|
|
43714
43710
|
totalBorrowWithInterest: raw.totalBorrowWithInterest.toString(),
|
|
43715
|
-
totalBorrowInterestFree: raw.totalBorrowInterestFree.toString()
|
|
43716
|
-
totalClaimAmount: raw.totalClaimAmount.toString(),
|
|
43717
|
-
interactingProtocol: raw.interactingProtocol.toBase58(),
|
|
43718
|
-
interactingTimestamp: raw.interactingTimestamp.toString(),
|
|
43719
|
-
interactingBalance: raw.interactingBalance.toString()
|
|
43711
|
+
totalBorrowInterestFree: raw.totalBorrowInterestFree.toString()
|
|
43720
43712
|
};
|
|
43721
43713
|
}
|
|
43722
43714
|
function jupLendingRewardsRateModelRawToDto(raw) {
|
|
43723
43715
|
return {
|
|
43724
|
-
pubkey: raw.pubkey.toBase58(),
|
|
43725
|
-
mint: raw.mint.toBase58(),
|
|
43726
43716
|
startTvl: raw.startTvl.toString(),
|
|
43727
43717
|
duration: raw.duration.toString(),
|
|
43728
43718
|
startTime: raw.startTime.toString(),
|
|
43729
|
-
yearlyReward: raw.yearlyReward.toString()
|
|
43730
|
-
nextDuration: raw.nextDuration.toString(),
|
|
43731
|
-
nextRewardAmount: raw.nextRewardAmount.toString()
|
|
43719
|
+
yearlyReward: raw.yearlyReward.toString()
|
|
43732
43720
|
};
|
|
43733
43721
|
}
|
|
43734
43722
|
function jupRateModelRawToDto(raw) {
|
|
43735
43723
|
return {
|
|
43736
|
-
pubkey: raw.pubkey.toBase58(),
|
|
43737
|
-
mint: raw.mint.toBase58(),
|
|
43738
43724
|
version: raw.version,
|
|
43739
43725
|
rateAtZero: raw.rateAtZero,
|
|
43740
43726
|
kink1Utilization: raw.kink1Utilization,
|
|
@@ -43891,41 +43877,27 @@ function dtoToJupLendingStateRaw(dto) {
|
|
|
43891
43877
|
function dtoToJupTokenReserveRaw(dto) {
|
|
43892
43878
|
return {
|
|
43893
43879
|
pubkey: new web3_js.PublicKey(dto.pubkey),
|
|
43894
|
-
mint: new web3_js.PublicKey(dto.mint),
|
|
43895
|
-
vault: new web3_js.PublicKey(dto.vault),
|
|
43896
43880
|
borrowRate: dto.borrowRate,
|
|
43897
43881
|
feeOnInterest: dto.feeOnInterest,
|
|
43898
43882
|
lastUtilization: dto.lastUtilization,
|
|
43899
|
-
lastUpdateTimestamp: new BN8__default.default(dto.lastUpdateTimestamp),
|
|
43900
43883
|
supplyExchangePrice: new BN8__default.default(dto.supplyExchangePrice),
|
|
43901
43884
|
borrowExchangePrice: new BN8__default.default(dto.borrowExchangePrice),
|
|
43902
|
-
maxUtilization: dto.maxUtilization,
|
|
43903
43885
|
totalSupplyWithInterest: new BN8__default.default(dto.totalSupplyWithInterest),
|
|
43904
43886
|
totalSupplyInterestFree: new BN8__default.default(dto.totalSupplyInterestFree),
|
|
43905
43887
|
totalBorrowWithInterest: new BN8__default.default(dto.totalBorrowWithInterest),
|
|
43906
|
-
totalBorrowInterestFree: new BN8__default.default(dto.totalBorrowInterestFree)
|
|
43907
|
-
totalClaimAmount: new BN8__default.default(dto.totalClaimAmount),
|
|
43908
|
-
interactingProtocol: new web3_js.PublicKey(dto.interactingProtocol),
|
|
43909
|
-
interactingTimestamp: new BN8__default.default(dto.interactingTimestamp),
|
|
43910
|
-
interactingBalance: new BN8__default.default(dto.interactingBalance)
|
|
43888
|
+
totalBorrowInterestFree: new BN8__default.default(dto.totalBorrowInterestFree)
|
|
43911
43889
|
};
|
|
43912
43890
|
}
|
|
43913
43891
|
function dtoToJupLendingRewardsRateModelRaw(dto) {
|
|
43914
43892
|
return {
|
|
43915
|
-
pubkey: new web3_js.PublicKey(dto.pubkey),
|
|
43916
|
-
mint: new web3_js.PublicKey(dto.mint),
|
|
43917
43893
|
startTvl: new BN8__default.default(dto.startTvl),
|
|
43918
43894
|
duration: new BN8__default.default(dto.duration),
|
|
43919
43895
|
startTime: new BN8__default.default(dto.startTime),
|
|
43920
|
-
yearlyReward: new BN8__default.default(dto.yearlyReward)
|
|
43921
|
-
nextDuration: new BN8__default.default(dto.nextDuration),
|
|
43922
|
-
nextRewardAmount: new BN8__default.default(dto.nextRewardAmount)
|
|
43896
|
+
yearlyReward: new BN8__default.default(dto.yearlyReward)
|
|
43923
43897
|
};
|
|
43924
43898
|
}
|
|
43925
43899
|
function dtoToJupRateModelRaw(dto) {
|
|
43926
43900
|
return {
|
|
43927
|
-
pubkey: new web3_js.PublicKey(dto.pubkey),
|
|
43928
|
-
mint: new web3_js.PublicKey(dto.mint),
|
|
43929
43901
|
version: dto.version,
|
|
43930
43902
|
rateAtZero: dto.rateAtZero,
|
|
43931
43903
|
kink1Utilization: dto.kink1Utilization,
|