@jup-ag/lend 0.0.59 → 0.0.60

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.
@@ -4676,8 +4676,46 @@ declare function getLiquidateContext({ vaultId, to, sources, program, connection
4676
4676
  lookupTable: PublicKey;
4677
4677
  }>;
4678
4678
  declare const getLiquidateIx: ({ vaultId, debtAmount, colPerUnitDebt, absorb, to, signer, connection, }: LiquidateParams) => Promise<{
4679
- lookupTable: PublicKey;
4679
+ accounts: {
4680
+ signer: PublicKey;
4681
+ signerTokenAccount: PublicKey;
4682
+ to: PublicKey;
4683
+ toTokenAccount: PublicKey;
4684
+ vaultAdmin: PublicKey;
4685
+ vaultConfig: PublicKey;
4686
+ vaultState: PublicKey;
4687
+ supplyToken: PublicKey;
4688
+ borrowToken: PublicKey;
4689
+ oracle: PublicKey;
4690
+ tickHasDebt: PublicKey;
4691
+ newBranch: PublicKey;
4692
+ supplyTokenReservesLiquidity: PublicKey;
4693
+ borrowTokenReservesLiquidity: PublicKey;
4694
+ vaultSupplyPositionOnLiquidity: PublicKey;
4695
+ vaultBorrowPositionOnLiquidity: PublicKey;
4696
+ supplyRateModel: PublicKey;
4697
+ borrowRateModel: PublicKey;
4698
+ supplyTokenClaimAccount: PublicKey;
4699
+ borrowTokenClaimAccount: PublicKey;
4700
+ liquidity: PublicKey;
4701
+ liquidityProgram: PublicKey;
4702
+ vaultSupplyTokenAccount: PublicKey;
4703
+ vaultBorrowTokenAccount: PublicKey;
4704
+ oracleProgram: PublicKey;
4705
+ supplyTokenProgram: PublicKey;
4706
+ borrowTokenProgram: PublicKey;
4707
+ systemProgram: PublicKey;
4708
+ associatedTokenProgram: PublicKey;
4709
+ };
4710
+ remainingAccounts: {
4711
+ pubkey: PublicKey;
4712
+ isWritable: boolean;
4713
+ isSigner: boolean;
4714
+ }[];
4715
+ remainingAccountsIndices: number[];
4680
4716
  ixs: TransactionInstruction[];
4717
+ addressLookupTableAddresses: PublicKey[];
4718
+ addressLookupTableAccounts: _solana_web3_js.AddressLookupTableAccount[];
4681
4719
  }>;
4682
4720
 
4683
4721
  type PositionData = Awaited<ReturnType<Program<Vaults>["account"]["position"]["fetch"]>>;
@@ -4676,8 +4676,46 @@ declare function getLiquidateContext({ vaultId, to, sources, program, connection
4676
4676
  lookupTable: PublicKey;
4677
4677
  }>;
4678
4678
  declare const getLiquidateIx: ({ vaultId, debtAmount, colPerUnitDebt, absorb, to, signer, connection, }: LiquidateParams) => Promise<{
4679
- lookupTable: PublicKey;
4679
+ accounts: {
4680
+ signer: PublicKey;
4681
+ signerTokenAccount: PublicKey;
4682
+ to: PublicKey;
4683
+ toTokenAccount: PublicKey;
4684
+ vaultAdmin: PublicKey;
4685
+ vaultConfig: PublicKey;
4686
+ vaultState: PublicKey;
4687
+ supplyToken: PublicKey;
4688
+ borrowToken: PublicKey;
4689
+ oracle: PublicKey;
4690
+ tickHasDebt: PublicKey;
4691
+ newBranch: PublicKey;
4692
+ supplyTokenReservesLiquidity: PublicKey;
4693
+ borrowTokenReservesLiquidity: PublicKey;
4694
+ vaultSupplyPositionOnLiquidity: PublicKey;
4695
+ vaultBorrowPositionOnLiquidity: PublicKey;
4696
+ supplyRateModel: PublicKey;
4697
+ borrowRateModel: PublicKey;
4698
+ supplyTokenClaimAccount: PublicKey;
4699
+ borrowTokenClaimAccount: PublicKey;
4700
+ liquidity: PublicKey;
4701
+ liquidityProgram: PublicKey;
4702
+ vaultSupplyTokenAccount: PublicKey;
4703
+ vaultBorrowTokenAccount: PublicKey;
4704
+ oracleProgram: PublicKey;
4705
+ supplyTokenProgram: PublicKey;
4706
+ borrowTokenProgram: PublicKey;
4707
+ systemProgram: PublicKey;
4708
+ associatedTokenProgram: PublicKey;
4709
+ };
4710
+ remainingAccounts: {
4711
+ pubkey: PublicKey;
4712
+ isWritable: boolean;
4713
+ isSigner: boolean;
4714
+ }[];
4715
+ remainingAccountsIndices: number[];
4680
4716
  ixs: TransactionInstruction[];
4717
+ addressLookupTableAddresses: PublicKey[];
4718
+ addressLookupTableAccounts: _solana_web3_js.AddressLookupTableAccount[];
4681
4719
  }>;
4682
4720
 
4683
4721
  type PositionData = Awaited<ReturnType<Program<Vaults>["account"]["position"]["fetch"]>>;
@@ -1842,17 +1842,24 @@ const getLiquidateIx = async ({
1842
1842
  if (otherIxs.length > 0) {
1843
1843
  ixs.push(...otherIxs);
1844
1844
  }
1845
- const ix = await program.methods.liquidate(
1846
- debtAmount,
1847
- colPerUnitDebt,
1848
- absorb,
1849
- { direct: {} },
1850
- Buffer.from(remainingAccountsIndices)
1851
- ).accounts(accounts).remainingAccounts(remainingAccounts).instruction();
1845
+ const [ix, addressLookupTable] = await Promise.all([
1846
+ program.methods.liquidate(
1847
+ debtAmount,
1848
+ colPerUnitDebt,
1849
+ absorb,
1850
+ { direct: {} },
1851
+ Buffer.from(remainingAccountsIndices)
1852
+ ).accounts(accounts).remainingAccounts(remainingAccounts).instruction(),
1853
+ connection.getAddressLookupTable(lookupTable)
1854
+ ]);
1852
1855
  ixs.push(ix);
1853
1856
  return {
1854
- lookupTable,
1855
- ixs
1857
+ accounts,
1858
+ remainingAccounts,
1859
+ remainingAccountsIndices,
1860
+ ixs,
1861
+ addressLookupTableAddresses: lookupTable ? [lookupTable] : [],
1862
+ addressLookupTableAccounts: addressLookupTable.value ? [addressLookupTable.value] : []
1856
1863
  };
1857
1864
  };
1858
1865
  async function getOtherInstructionsLiquidate(vaultId, vaultState, program, signer) {
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.59";
8
+ const version = "0.0.60";
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.59",
3
+ "version": "0.0.60",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "type": "module",