@jup-ag/lend 0.0.71 → 0.0.74

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,19 +4829,13 @@ 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: 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<{
4832
+ declare const simulateLiquidate: (params: LiquidateParams) => Promise<_solana_web3_js.SimulatedTransactionResponse>;
4833
+ declare const getLiquidations: (params: Omit<LiquidateParams, "debtAmount">) => Promise<{
4838
4834
  amtOut: string;
4839
4835
  amtIn: string;
4840
4836
  topTick: string;
4841
4837
  }[]>;
4842
- declare const getAllLiquidations: (params: Omit<LiquidateParams, "debtAmount" | "vaultId" | "signer"> & {
4843
- signer?: PublicKey;
4844
- }) => Promise<{
4838
+ declare const getAllLiquidations: (params: Omit<LiquidateParams, "debtAmount" | "vaultId">) => Promise<{
4845
4839
  vaultId: number;
4846
4840
  liquidations: never[] | {
4847
4841
  amtOut: string;
@@ -4829,19 +4829,13 @@ 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: 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<{
4832
+ declare const simulateLiquidate: (params: LiquidateParams) => Promise<_solana_web3_js.SimulatedTransactionResponse>;
4833
+ declare const getLiquidations: (params: Omit<LiquidateParams, "debtAmount">) => Promise<{
4838
4834
  amtOut: string;
4839
4835
  amtIn: string;
4840
4836
  topTick: string;
4841
4837
  }[]>;
4842
- declare const getAllLiquidations: (params: Omit<LiquidateParams, "debtAmount" | "vaultId" | "signer"> & {
4843
- signer?: PublicKey;
4844
- }) => Promise<{
4838
+ declare const getAllLiquidations: (params: Omit<LiquidateParams, "debtAmount" | "vaultId">) => Promise<{
4845
4839
  vaultId: number;
4846
4840
  liquidations: never[] | {
4847
4841
  amtOut: string;
@@ -1822,7 +1822,7 @@ const getLiquidateIx = async ({
1822
1822
  colPerUnitDebt = new BN(0),
1823
1823
  absorb = false,
1824
1824
  signer,
1825
- to = signer,
1825
+ to = new PublicKey("11111111111111111111111111111111"),
1826
1826
  connection
1827
1827
  }) => {
1828
1828
  const program = getVaultsProgram({ connection, signer });
@@ -1995,10 +1995,7 @@ async function getRemainingAccountsLiquidate(vaultId, vaultState, otherIxs, orac
1995
1995
  }
1996
1996
 
1997
1997
  const simulateLiquidate = async (params) => {
1998
- const {
1999
- connection,
2000
- signer = new PublicKey("JupRhwjrF5fAcs6dFhLH59r3TJFvbcyLP2NRM8UGH9H")
2001
- } = params;
1998
+ const { connection, signer } = params;
2002
1999
  const { ixs, addressLookupTableAccounts } = await getLiquidateIx({
2003
2000
  ...params,
2004
2001
  signer
package/dist/index.mjs CHANGED
@@ -2,12 +2,12 @@ export { l as lendingPda, a as lendingRewardRateModelPda } from './shared/lend.B
2
2
  export { l as liquidityPda } from './shared/lend.BzG5ldOV.mjs';
3
3
  export { b as borrowPda } from './shared/lend.uRnzld7B.mjs';
4
4
  export { f as flashloanPda } from './shared/lend.hlqlrp9r.mjs';
5
- export { m as merkleDistributorPda } from './shared/lend.BEoyE4dT.mjs';
5
+ export { m as merkleDistributorPda } from './shared/lend.CIepsiAe.mjs';
6
6
  import '@solana/web3.js';
7
7
  import './shared/lend.CioR9-te.mjs';
8
8
  import '@solana/spl-token';
9
9
  import 'bn.js';
10
10
 
11
- const version = "0.0.71";
11
+ const version = "0.0.74";
12
12
 
13
13
  export { version };
@@ -20,7 +20,7 @@ type ClaimParams = {
20
20
  } & ClaimContextParams;
21
21
  declare function getClaimRewardsContext({ rewardToken, distributorId, positionId, connection, signer, }: ClaimContextParams): Promise<{
22
22
  signer: PublicKey;
23
- distributor: PublicKey;
23
+ merkleDistributor: PublicKey;
24
24
  merkleAdmin: PublicKey;
25
25
  mint: PublicKey;
26
26
  claimStatus: PublicKey;
@@ -20,7 +20,7 @@ type ClaimParams = {
20
20
  } & ClaimContextParams;
21
21
  declare function getClaimRewardsContext({ rewardToken, distributorId, positionId, connection, signer, }: ClaimContextParams): Promise<{
22
22
  signer: PublicKey;
23
- distributor: PublicKey;
23
+ merkleDistributor: PublicKey;
24
24
  merkleAdmin: PublicKey;
25
25
  mint: PublicKey;
26
26
  claimStatus: PublicKey;
@@ -1,5 +1,5 @@
1
1
  import { SystemProgram } from '@solana/web3.js';
2
- import { g as getClaimStatus, a as getMerkleAdmin, b as getRewardsDistributor, c as merkleDistributor } from '../shared/lend.BEoyE4dT.mjs';
2
+ import { g as getClaimStatus, a as getMerkleAdmin, b as getRewardsDistributor, c as merkleDistributor } from '../shared/lend.CIepsiAe.mjs';
3
3
  import { Program } from '@coral-xyz/anchor';
4
4
  import { ASSOCIATED_TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync } from '@solana/spl-token';
5
5
  import 'bn.js';
@@ -20,7 +20,7 @@ async function getClaimRewardsContext({
20
20
  const tokenProgram = await getAccountOwner(rewardToken, connection);
21
21
  return {
22
22
  signer,
23
- distributor: getRewardsDistributor(
23
+ merkleDistributor: getRewardsDistributor(
24
24
  rewardToken,
25
25
  distributorId
26
26
  ),
@@ -30,7 +30,7 @@ const instructions = [
30
30
  name: "merkle_admin"
31
31
  },
32
32
  {
33
- name: "distributor",
33
+ name: "merkle_distributor",
34
34
  writable: true
35
35
  },
36
36
  {
@@ -80,7 +80,7 @@ const instructions = [
80
80
  signer: true
81
81
  },
82
82
  {
83
- name: "distributor",
83
+ name: "merkle_distributor",
84
84
  writable: true
85
85
  },
86
86
  {
@@ -89,7 +89,7 @@ const instructions = [
89
89
  {
90
90
  name: "mint",
91
91
  relations: [
92
- "distributor"
92
+ "merkle_distributor"
93
93
  ]
94
94
  },
95
95
  {
@@ -657,7 +657,7 @@ const instructions = [
657
657
  name: "merkle_admin"
658
658
  },
659
659
  {
660
- name: "distributor",
660
+ name: "merkle_distributor",
661
661
  writable: true
662
662
  },
663
663
  {
@@ -1369,6 +1369,10 @@ const types = [
1369
1369
  name: "mint",
1370
1370
  type: "pubkey"
1371
1371
  },
1372
+ {
1373
+ name: "distributor_id",
1374
+ type: "u32"
1375
+ },
1372
1376
  {
1373
1377
  name: "paused",
1374
1378
  type: "u8"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jup-ag/lend",
3
- "version": "0.0.71",
3
+ "version": "0.0.74",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "type": "module",