@jup-ag/lend 0.0.63 → 0.0.64
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/borrow/index.d.mts +9 -3
- package/dist/borrow/index.d.ts +9 -3
- package/dist/borrow/index.mjs +9 -3
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/borrow/index.d.mts
CHANGED
|
@@ -4829,13 +4829,19 @@ declare function readTickHasDebtArray({ vaultId, index, program, }: {
|
|
|
4829
4829
|
}>;
|
|
4830
4830
|
declare function findNextTickWithDebt(vaultId: number, startTick: number, program: Program<Vaults>): Promise<number>;
|
|
4831
4831
|
|
|
4832
|
-
declare const simulateLiquidate: (params: LiquidateParams
|
|
4833
|
-
|
|
4832
|
+
declare const simulateLiquidate: (params: Omit<LiquidateParams, "signer"> & {
|
|
4833
|
+
signer?: PublicKey;
|
|
4834
|
+
}) => Promise<_solana_web3_js.SimulatedTransactionResponse>;
|
|
4835
|
+
declare const getLiquidations: (params: Omit<LiquidateParams, "debtAmount" | "signer"> & {
|
|
4836
|
+
signer?: PublicKey;
|
|
4837
|
+
}) => Promise<{
|
|
4834
4838
|
amtOut: string;
|
|
4835
4839
|
amtIn: string;
|
|
4836
4840
|
topTick: string;
|
|
4837
4841
|
}[]>;
|
|
4838
|
-
declare const getAllLiquidations: (params: Omit<LiquidateParams, "debtAmount" | "vaultId">
|
|
4842
|
+
declare const getAllLiquidations: (params: Omit<LiquidateParams, "debtAmount" | "vaultId" | "signer"> & {
|
|
4843
|
+
signer?: PublicKey;
|
|
4844
|
+
}) => Promise<{
|
|
4839
4845
|
vaultId: number;
|
|
4840
4846
|
liquidations: never[] | {
|
|
4841
4847
|
amtOut: string;
|
package/dist/borrow/index.d.ts
CHANGED
|
@@ -4829,13 +4829,19 @@ declare function readTickHasDebtArray({ vaultId, index, program, }: {
|
|
|
4829
4829
|
}>;
|
|
4830
4830
|
declare function findNextTickWithDebt(vaultId: number, startTick: number, program: Program<Vaults>): Promise<number>;
|
|
4831
4831
|
|
|
4832
|
-
declare const simulateLiquidate: (params: LiquidateParams
|
|
4833
|
-
|
|
4832
|
+
declare const simulateLiquidate: (params: Omit<LiquidateParams, "signer"> & {
|
|
4833
|
+
signer?: PublicKey;
|
|
4834
|
+
}) => Promise<_solana_web3_js.SimulatedTransactionResponse>;
|
|
4835
|
+
declare const getLiquidations: (params: Omit<LiquidateParams, "debtAmount" | "signer"> & {
|
|
4836
|
+
signer?: PublicKey;
|
|
4837
|
+
}) => Promise<{
|
|
4834
4838
|
amtOut: string;
|
|
4835
4839
|
amtIn: string;
|
|
4836
4840
|
topTick: string;
|
|
4837
4841
|
}[]>;
|
|
4838
|
-
declare const getAllLiquidations: (params: Omit<LiquidateParams, "debtAmount" | "vaultId">
|
|
4842
|
+
declare const getAllLiquidations: (params: Omit<LiquidateParams, "debtAmount" | "vaultId" | "signer"> & {
|
|
4843
|
+
signer?: PublicKey;
|
|
4844
|
+
}) => Promise<{
|
|
4839
4845
|
vaultId: number;
|
|
4840
4846
|
liquidations: never[] | {
|
|
4841
4847
|
amtOut: string;
|
package/dist/borrow/index.mjs
CHANGED
|
@@ -1984,8 +1984,14 @@ async function getRemainingAccountsLiquidate(vaultId, vaultState, otherIxs, orac
|
|
|
1984
1984
|
}
|
|
1985
1985
|
|
|
1986
1986
|
const simulateLiquidate = async (params) => {
|
|
1987
|
-
const {
|
|
1988
|
-
|
|
1987
|
+
const {
|
|
1988
|
+
connection,
|
|
1989
|
+
signer = new PublicKey("JupRhwjrF5fAcs6dFhLH59r3TJFvbcyLP2NRM8UGH9H")
|
|
1990
|
+
} = params;
|
|
1991
|
+
const { ixs, addressLookupTableAccounts } = await getLiquidateIx({
|
|
1992
|
+
...params,
|
|
1993
|
+
signer
|
|
1994
|
+
});
|
|
1989
1995
|
const latestBlockhash = await connection.getLatestBlockhash();
|
|
1990
1996
|
const messageV0 = new TransactionMessage({
|
|
1991
1997
|
payerKey: signer,
|
|
@@ -2011,7 +2017,7 @@ const getLiquidations = async (params) => {
|
|
|
2011
2017
|
const getAllLiquidations = async (params) => {
|
|
2012
2018
|
const program = getVaultsProgram({
|
|
2013
2019
|
connection: params.connection,
|
|
2014
|
-
signer: params.signer
|
|
2020
|
+
signer: params.signer || new PublicKey("JupRhwjrF5fAcs6dFhLH59r3TJFvbcyLP2NRM8UGH9H")
|
|
2015
2021
|
});
|
|
2016
2022
|
const { nextVaultId: totalVaults } = await program.account.vaultAdmin.fetch(
|
|
2017
2023
|
getVaultAdmin()
|
package/dist/index.mjs
CHANGED