@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.
- package/dist/borrow/index.d.mts +39 -1
- package/dist/borrow/index.d.ts +39 -1
- package/dist/borrow/index.mjs +16 -9
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/borrow/index.d.mts
CHANGED
|
@@ -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
|
-
|
|
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"]>>;
|
package/dist/borrow/index.d.ts
CHANGED
|
@@ -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
|
-
|
|
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"]>>;
|
package/dist/borrow/index.mjs
CHANGED
|
@@ -1842,17 +1842,24 @@ const getLiquidateIx = async ({
|
|
|
1842
1842
|
if (otherIxs.length > 0) {
|
|
1843
1843
|
ixs.push(...otherIxs);
|
|
1844
1844
|
}
|
|
1845
|
-
const ix = await
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
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
|
-
|
|
1855
|
-
|
|
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