@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.
@@ -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) => Promise<_solana_web3_js.SimulatedTransactionResponse>;
4833
- declare const getLiquidations: (params: Omit<LiquidateParams, "debtAmount">) => Promise<{
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">) => Promise<{
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;
@@ -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) => Promise<_solana_web3_js.SimulatedTransactionResponse>;
4833
- declare const getLiquidations: (params: Omit<LiquidateParams, "debtAmount">) => Promise<{
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">) => Promise<{
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;
@@ -1984,8 +1984,14 @@ async function getRemainingAccountsLiquidate(vaultId, vaultState, otherIxs, orac
1984
1984
  }
1985
1985
 
1986
1986
  const simulateLiquidate = async (params) => {
1987
- const { connection, signer } = params;
1988
- const { ixs, addressLookupTableAccounts } = await getLiquidateIx(params);
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
@@ -5,6 +5,6 @@ import '@solana/web3.js';
5
5
  import '@solana/spl-token';
6
6
  import 'bn.js';
7
7
 
8
- const version = "0.0.63";
8
+ const version = "0.0.64";
9
9
 
10
10
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jup-ag/lend",
3
- "version": "0.0.63",
3
+ "version": "0.0.64",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "type": "module",