@jup-ag/lend 0.1.9 → 0.1.10-beta.0

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.
@@ -1,5 +1,5 @@
1
- import { V as Vaults, L as LiquidateParams } from '../shared/lend.B1GEdPEJ.mjs';
2
- export { C as ConnectionParams, I as InitPositionIxParams, e as LiquidateContextParams, O as OperateContextParams, a as OperateParams, c as getInitPositionContext, b as getInitPositionIx, f as getLiquidateContext, h as getLiquidateIx, g as getOperateContext, d as getOperateIx } from '../shared/lend.B1GEdPEJ.mjs';
1
+ import { V as Vaults, L as LiquidateParams } from '../shared/lend.34CmCyWr.mjs';
2
+ export { C as ConnectionParams, I as InitPositionIxParams, e as LiquidateContextParams, O as OperateContextParams, a as OperateParams, c as getInitPositionContext, b as getInitPositionIx, f as getLiquidateContext, h as getLiquidateIx, g as getOperateContext, d as getOperateIx } from '../shared/lend.34CmCyWr.mjs';
3
3
  import { Program } from '@coral-xyz/anchor';
4
4
  import BN__default from 'bn.js';
5
5
  import * as _solana_web3_js from '@solana/web3.js';
@@ -11,15 +11,17 @@ type GetCurrentPositionParams = {
11
11
  vaultId: number;
12
12
  positionId: number;
13
13
  connection: Connection;
14
+ market: "main" | "ethena";
14
15
  };
15
16
  type GetCurrentPositionStateParams = {
16
17
  vaultId: number;
17
18
  position: PositionData;
18
19
  program: Program<Vaults>;
19
20
  };
20
- declare const getVaultsProgram: ({ connection, signer, }: {
21
+ declare const getVaultsProgram: ({ connection, signer, market, }: {
21
22
  connection: Connection;
22
23
  signer: PublicKey;
24
+ market: "main" | "ethena";
23
25
  }) => Program<Vaults>;
24
26
  declare const INIT_TICK = -2147483648;
25
27
  declare const MIN_I128: BN__default;
@@ -28,7 +30,7 @@ declare const MAX_REPAY_AMOUNT: BN__default;
28
30
  /** Use as `colAmount` in getOperateIx to withdraw all collateral (subject to LTV). */
29
31
  declare const MAX_WITHDRAW_AMOUNT: BN__default;
30
32
  declare const getAccountOwner: (account: PublicKey, connection: Connection) => Promise<PublicKey>;
31
- declare const getCurrentPosition: ({ vaultId, positionId, connection, }: GetCurrentPositionParams) => Promise<{
33
+ declare const getCurrentPosition: ({ vaultId, positionId, connection, market, }: GetCurrentPositionParams) => Promise<{
32
34
  tick: number;
33
35
  tickId: number;
34
36
  colRaw: BN__default;
@@ -172,6 +174,7 @@ declare function readOraclePrice({ connection, signer, oracle, }: {
172
174
  });
173
175
  }[];
174
176
  }>;
177
+ declare const getLiquidityProgramId: (market: "main" | "ethena") => PublicKey;
175
178
 
176
179
  declare const MIN_TICK = -16383;
177
180
  declare const MAX_TICK = 16383;
@@ -218,4 +221,4 @@ declare const getAllLiquidations: (params: Omit<LiquidateParams, "debtAmount" |
218
221
  }[];
219
222
  }[]>;
220
223
 
221
- export { INIT_TICK, LiquidateParams, MAX_REPAY_AMOUNT, MAX_TICK, MAX_WITHDRAW_AMOUNT, MIN_I128, MIN_TICK, TICKS_PER_TICK_HAS_DEBT, TICK_HAS_DEBT_ARRAY_SIZE, TICK_HAS_DEBT_CHILDREN_SIZE, TICK_HAS_DEBT_CHILDREN_SIZE_IN_BITS, TOTAL_INDICES_NEEDED, ZERO_TICK_SCALED_RATIO, findNextTickWithDebt, getAccountOwner, getAllLiquidations, getCurrentPosition, getCurrentPositionState, getFinalPosition, getFirstTickForIndex, getLiquidations, getRatioAtTick, getTickAtRatio, getTickIndices, getVaultsProgram, loadRelevantBranches, loadRelevantBranchesForLiquidate, loadRelevantTicksHasDebtArrays, loadRelevantTicksHasDebtArraysLiquidate, readOraclePrice, readTickHasDebtArray, simulateLiquidate };
224
+ export { INIT_TICK, LiquidateParams, MAX_REPAY_AMOUNT, MAX_TICK, MAX_WITHDRAW_AMOUNT, MIN_I128, MIN_TICK, TICKS_PER_TICK_HAS_DEBT, TICK_HAS_DEBT_ARRAY_SIZE, TICK_HAS_DEBT_CHILDREN_SIZE, TICK_HAS_DEBT_CHILDREN_SIZE_IN_BITS, TOTAL_INDICES_NEEDED, ZERO_TICK_SCALED_RATIO, findNextTickWithDebt, getAccountOwner, getAllLiquidations, getCurrentPosition, getCurrentPositionState, getFinalPosition, getFirstTickForIndex, getLiquidations, getLiquidityProgramId, getRatioAtTick, getTickAtRatio, getTickIndices, getVaultsProgram, loadRelevantBranches, loadRelevantBranchesForLiquidate, loadRelevantTicksHasDebtArrays, loadRelevantTicksHasDebtArraysLiquidate, readOraclePrice, readTickHasDebtArray, simulateLiquidate };
@@ -1,5 +1,5 @@
1
- import { V as Vaults, L as LiquidateParams } from '../shared/lend.B1GEdPEJ.js';
2
- export { C as ConnectionParams, I as InitPositionIxParams, e as LiquidateContextParams, O as OperateContextParams, a as OperateParams, c as getInitPositionContext, b as getInitPositionIx, f as getLiquidateContext, h as getLiquidateIx, g as getOperateContext, d as getOperateIx } from '../shared/lend.B1GEdPEJ.js';
1
+ import { V as Vaults, L as LiquidateParams } from '../shared/lend.34CmCyWr.js';
2
+ export { C as ConnectionParams, I as InitPositionIxParams, e as LiquidateContextParams, O as OperateContextParams, a as OperateParams, c as getInitPositionContext, b as getInitPositionIx, f as getLiquidateContext, h as getLiquidateIx, g as getOperateContext, d as getOperateIx } from '../shared/lend.34CmCyWr.js';
3
3
  import { Program } from '@coral-xyz/anchor';
4
4
  import BN__default from 'bn.js';
5
5
  import * as _solana_web3_js from '@solana/web3.js';
@@ -11,15 +11,17 @@ type GetCurrentPositionParams = {
11
11
  vaultId: number;
12
12
  positionId: number;
13
13
  connection: Connection;
14
+ market: "main" | "ethena";
14
15
  };
15
16
  type GetCurrentPositionStateParams = {
16
17
  vaultId: number;
17
18
  position: PositionData;
18
19
  program: Program<Vaults>;
19
20
  };
20
- declare const getVaultsProgram: ({ connection, signer, }: {
21
+ declare const getVaultsProgram: ({ connection, signer, market, }: {
21
22
  connection: Connection;
22
23
  signer: PublicKey;
24
+ market: "main" | "ethena";
23
25
  }) => Program<Vaults>;
24
26
  declare const INIT_TICK = -2147483648;
25
27
  declare const MIN_I128: BN__default;
@@ -28,7 +30,7 @@ declare const MAX_REPAY_AMOUNT: BN__default;
28
30
  /** Use as `colAmount` in getOperateIx to withdraw all collateral (subject to LTV). */
29
31
  declare const MAX_WITHDRAW_AMOUNT: BN__default;
30
32
  declare const getAccountOwner: (account: PublicKey, connection: Connection) => Promise<PublicKey>;
31
- declare const getCurrentPosition: ({ vaultId, positionId, connection, }: GetCurrentPositionParams) => Promise<{
33
+ declare const getCurrentPosition: ({ vaultId, positionId, connection, market, }: GetCurrentPositionParams) => Promise<{
32
34
  tick: number;
33
35
  tickId: number;
34
36
  colRaw: BN__default;
@@ -172,6 +174,7 @@ declare function readOraclePrice({ connection, signer, oracle, }: {
172
174
  });
173
175
  }[];
174
176
  }>;
177
+ declare const getLiquidityProgramId: (market: "main" | "ethena") => PublicKey;
175
178
 
176
179
  declare const MIN_TICK = -16383;
177
180
  declare const MAX_TICK = 16383;
@@ -218,4 +221,4 @@ declare const getAllLiquidations: (params: Omit<LiquidateParams, "debtAmount" |
218
221
  }[];
219
222
  }[]>;
220
223
 
221
- export { INIT_TICK, LiquidateParams, MAX_REPAY_AMOUNT, MAX_TICK, MAX_WITHDRAW_AMOUNT, MIN_I128, MIN_TICK, TICKS_PER_TICK_HAS_DEBT, TICK_HAS_DEBT_ARRAY_SIZE, TICK_HAS_DEBT_CHILDREN_SIZE, TICK_HAS_DEBT_CHILDREN_SIZE_IN_BITS, TOTAL_INDICES_NEEDED, ZERO_TICK_SCALED_RATIO, findNextTickWithDebt, getAccountOwner, getAllLiquidations, getCurrentPosition, getCurrentPositionState, getFinalPosition, getFirstTickForIndex, getLiquidations, getRatioAtTick, getTickAtRatio, getTickIndices, getVaultsProgram, loadRelevantBranches, loadRelevantBranchesForLiquidate, loadRelevantTicksHasDebtArrays, loadRelevantTicksHasDebtArraysLiquidate, readOraclePrice, readTickHasDebtArray, simulateLiquidate };
224
+ export { INIT_TICK, LiquidateParams, MAX_REPAY_AMOUNT, MAX_TICK, MAX_WITHDRAW_AMOUNT, MIN_I128, MIN_TICK, TICKS_PER_TICK_HAS_DEBT, TICK_HAS_DEBT_ARRAY_SIZE, TICK_HAS_DEBT_CHILDREN_SIZE, TICK_HAS_DEBT_CHILDREN_SIZE_IN_BITS, TOTAL_INDICES_NEEDED, ZERO_TICK_SCALED_RATIO, findNextTickWithDebt, getAccountOwner, getAllLiquidations, getCurrentPosition, getCurrentPositionState, getFinalPosition, getFirstTickForIndex, getLiquidations, getLiquidityProgramId, getRatioAtTick, getTickAtRatio, getTickIndices, getVaultsProgram, loadRelevantBranches, loadRelevantBranchesForLiquidate, loadRelevantTicksHasDebtArrays, loadRelevantTicksHasDebtArraysLiquidate, readOraclePrice, readTickHasDebtArray, simulateLiquidate };
@@ -1,12 +1,11 @@
1
- import { g as getLiquidateIx, a as getVaultsProgram } from '../shared/lend.BaZsInAi.mjs';
2
- export { I as INIT_TICK, h as MAX_REPAY_AMOUNT, t as MAX_TICK, i as MAX_WITHDRAW_AMOUNT, M as MIN_I128, s as MIN_TICK, u as TICKS_PER_TICK_HAS_DEBT, T as TICK_HAS_DEBT_ARRAY_SIZE, v as TICK_HAS_DEBT_CHILDREN_SIZE, w as TICK_HAS_DEBT_CHILDREN_SIZE_IN_BITS, x as TOTAL_INDICES_NEEDED, Z as ZERO_TICK_SCALED_RATIO, D as findNextTickWithDebt, j as getAccountOwner, k as getCurrentPosition, l as getCurrentPositionState, m as getFinalPosition, A as getFirstTickForIndex, d as getInitPositionContext, c as getInitPositionIx, f as getLiquidateContext, b as getOperateContext, e as getOperateIx, y as getRatioAtTick, z as getTickAtRatio, B as getTickIndices, n as loadRelevantBranches, q as loadRelevantBranchesForLiquidate, o as loadRelevantTicksHasDebtArrays, p as loadRelevantTicksHasDebtArraysLiquidate, r as readOraclePrice, C as readTickHasDebtArray } from '../shared/lend.BaZsInAi.mjs';
1
+ import { g as getLiquidateIx, a as getVaultsProgram } from '../shared/lend.COO39gwN.mjs';
2
+ export { I as INIT_TICK, h as MAX_REPAY_AMOUNT, u as MAX_TICK, i as MAX_WITHDRAW_AMOUNT, M as MIN_I128, t as MIN_TICK, v as TICKS_PER_TICK_HAS_DEBT, T as TICK_HAS_DEBT_ARRAY_SIZE, w as TICK_HAS_DEBT_CHILDREN_SIZE, x as TICK_HAS_DEBT_CHILDREN_SIZE_IN_BITS, y as TOTAL_INDICES_NEEDED, Z as ZERO_TICK_SCALED_RATIO, E as findNextTickWithDebt, j as getAccountOwner, k as getCurrentPosition, l as getCurrentPositionState, m as getFinalPosition, B as getFirstTickForIndex, d as getInitPositionContext, c as getInitPositionIx, f as getLiquidateContext, s as getLiquidityProgramId, b as getOperateContext, e as getOperateIx, z as getRatioAtTick, A as getTickAtRatio, C as getTickIndices, n as loadRelevantBranches, q as loadRelevantBranchesForLiquidate, o as loadRelevantTicksHasDebtArrays, p as loadRelevantTicksHasDebtArraysLiquidate, r as readOraclePrice, D as readTickHasDebtArray } from '../shared/lend.COO39gwN.mjs';
3
3
  import { PublicKey, TransactionMessage, ComputeBudgetProgram, VersionedTransaction } from '@solana/web3.js';
4
4
  import BN from 'bn.js';
5
- import { g as getVaultAdmin } from '../shared/lend.Cw-khlBI.mjs';
5
+ import { g as getVaultAdmin } from '../shared/lend.tU-yHdcH.mjs';
6
6
  import '@coral-xyz/anchor';
7
- import '../shared/lend.CioR9-te.mjs';
8
7
  import '@solana/spl-token';
9
- import '../shared/lend.BzG5ldOV.mjs';
8
+ import '../shared/lend.BjhqzIWk.mjs';
10
9
 
11
10
  const simulateLiquidate = async (params) => {
12
11
  const { connection, signer } = params;
@@ -6,6 +6,7 @@ import { Program } from '@coral-xyz/anchor';
6
6
  type ConnectionParams = {
7
7
  connection: Connection;
8
8
  signer: PublicKey;
9
+ market: "main" | "ethena";
9
10
  };
10
11
  type DepositContextParams = {
11
12
  asset: PublicKey;
@@ -13,11 +14,13 @@ type DepositContextParams = {
13
14
  } & ConnectionParams;
14
15
  type DepositParams = {
15
16
  amount: BN__default;
16
- } & DepositContextParams;
17
+ market?: "main" | "ethena";
18
+ } & Omit<DepositContextParams, "market">;
17
19
  type MintParams = {
18
20
  shares: BN__default;
19
- } & DepositContextParams;
20
- declare function getDepositContext({ asset, signer, connection, }: DepositContextParams): Promise<{
21
+ market?: "main" | "ethena";
22
+ } & Omit<DepositContextParams, "market">;
23
+ declare function getDepositContext({ asset, signer, connection, market, }: DepositContextParams): Promise<{
21
24
  signer: PublicKey;
22
25
  depositorTokenAccount: PublicKey;
23
26
  recipientTokenAccount: PublicKey;
@@ -47,7 +50,7 @@ declare function getDepositContext({ asset, signer, connection, }: DepositContex
47
50
  * @param connection - The connection
48
51
  * @returns { ixs: TransactionInstruction[] } - The instructions to deposit the assets
49
52
  */
50
- declare const getDepositIxs: ({ amount, asset, signer, connection, }: DepositParams) => Promise<{
53
+ declare const getDepositIxs: ({ amount, asset, signer, connection, market, }: DepositParams) => Promise<{
51
54
  ixs: TransactionInstruction[];
52
55
  }>;
53
56
  /**
@@ -57,7 +60,7 @@ declare const getDepositIxs: ({ amount, asset, signer, connection, }: DepositPar
57
60
  * @param connection - The connection
58
61
  * @returns { ixs: TransactionInstruction[] } - The instructions to mint the shares
59
62
  */
60
- declare const getMintIxs: ({ shares, asset, signer, connection, }: MintParams) => Promise<{
63
+ declare const getMintIxs: ({ shares, asset, signer, connection, market, }: MintParams) => Promise<{
61
64
  ixs: TransactionInstruction[];
62
65
  }>;
63
66
  type WithdrawContextParams = {
@@ -66,11 +69,13 @@ type WithdrawContextParams = {
66
69
  } & ConnectionParams;
67
70
  type WithdrawParams = {
68
71
  amount: BN__default;
69
- } & WithdrawContextParams;
72
+ market?: "main" | "ethena";
73
+ } & Omit<WithdrawContextParams, "market">;
70
74
  type RedeemParams = {
71
75
  shares: BN__default;
72
- } & WithdrawContextParams;
73
- declare function getWithdrawContext({ asset, signer, connection, }: WithdrawContextParams): Promise<{
76
+ market?: "main" | "ethena";
77
+ } & Omit<WithdrawContextParams, "market">;
78
+ declare function getWithdrawContext({ asset, signer, connection, market, }: WithdrawContextParams): Promise<{
74
79
  signer: PublicKey;
75
80
  ownerTokenAccount: PublicKey;
76
81
  recipientTokenAccount: PublicKey;
@@ -98,7 +103,7 @@ declare function getWithdrawContext({ asset, signer, connection, }: WithdrawCont
98
103
  * @param connection - The connection
99
104
  * @returns { ixs: TransactionInstruction[] } - The instructions to withdraw the assets
100
105
  */
101
- declare const getWithdrawIxs: ({ amount, asset, signer, connection, }: WithdrawParams) => Promise<{
106
+ declare const getWithdrawIxs: ({ amount, asset, signer, connection, market, }: WithdrawParams) => Promise<{
102
107
  ixs: TransactionInstruction[];
103
108
  }>;
104
109
  /**
@@ -108,7 +113,7 @@ declare const getWithdrawIxs: ({ amount, asset, signer, connection, }: WithdrawP
108
113
  * @param connection - The connection
109
114
  * @returns { ixs: TransactionInstruction[] } - The instructions to redeem the shares
110
115
  */
111
- declare const getRedeemIxs: ({ shares, asset, signer, connection, }: RedeemParams) => Promise<{
116
+ declare const getRedeemIxs: ({ shares, asset, signer, connection, market, }: RedeemParams) => Promise<{
112
117
  ixs: TransactionInstruction[];
113
118
  }>;
114
119
 
@@ -1858,19 +1863,23 @@ type Lending = {
1858
1863
  declare const U64_MAX: BN;
1859
1864
  declare const MAX_DEPOSIT: BN;
1860
1865
  declare const MAX_WITHDRAW: BN;
1861
- declare const getLendingProgram: ({ connection, signer, }: {
1866
+ declare const getLendingProgram: ({ connection, signer, market, }: {
1862
1867
  connection: Connection;
1863
1868
  signer?: PublicKey;
1869
+ market: "main" | "ethena";
1864
1870
  }) => Program<Lending>;
1865
1871
  declare const getAccountOwner: (account: PublicKey, connection: Connection) => Promise<PublicKey>;
1866
1872
  declare const getOrCreateATAInstruction: (owner: PublicKey, mint: PublicKey, connection: Connection) => Promise<TransactionInstruction[]>;
1873
+ declare const getLiquidityProgramId: (market: "main" | "ethena") => PublicKey;
1867
1874
 
1868
- declare const getLendingTokens: ({ connection, }: {
1875
+ declare const getLendingTokens: ({ connection, market, }: {
1869
1876
  connection: Connection;
1877
+ market: "main" | "ethena";
1870
1878
  }) => Promise<PublicKey[]>;
1871
- declare const getLendingTokenDetails: ({ lendingToken, connection, }: {
1879
+ declare const getLendingTokenDetails: ({ lendingToken, connection, market, }: {
1872
1880
  lendingToken: PublicKey;
1873
1881
  connection: Connection;
1882
+ market: "main" | "ethena";
1874
1883
  }) => Promise<{
1875
1884
  id: number;
1876
1885
  address: PublicKey;
@@ -1883,15 +1892,16 @@ declare const getLendingTokenDetails: ({ lendingToken, connection, }: {
1883
1892
  rewardsRate: BN__default;
1884
1893
  supplyRate: BN__default;
1885
1894
  }>;
1886
- declare const getUserLendingPositionByAsset: ({ user, asset, connection, }: {
1895
+ declare const getUserLendingPositionByAsset: ({ user, asset, connection, market, }: {
1887
1896
  user: PublicKey;
1888
1897
  asset: PublicKey;
1889
1898
  connection: Connection;
1899
+ market: "main" | "ethena";
1890
1900
  }) => Promise<{
1891
1901
  lendingTokenShares: BN__default;
1892
1902
  underlyingAssets: BN__default;
1893
1903
  underlyingBalance: BN__default;
1894
1904
  }>;
1895
1905
 
1896
- export { MAX_DEPOSIT, MAX_WITHDRAW, U64_MAX, getAccountOwner, getDepositContext, getDepositIxs, getLendingProgram, getLendingTokenDetails, getLendingTokens, getMintIxs, getOrCreateATAInstruction, getRedeemIxs, getUserLendingPositionByAsset, getWithdrawContext, getWithdrawIxs };
1906
+ export { MAX_DEPOSIT, MAX_WITHDRAW, U64_MAX, getAccountOwner, getDepositContext, getDepositIxs, getLendingProgram, getLendingTokenDetails, getLendingTokens, getLiquidityProgramId, getMintIxs, getOrCreateATAInstruction, getRedeemIxs, getUserLendingPositionByAsset, getWithdrawContext, getWithdrawIxs };
1897
1907
  export type { ConnectionParams, DepositContextParams, DepositParams, MintParams, RedeemParams, WithdrawContextParams, WithdrawParams };
@@ -6,6 +6,7 @@ import { Program } from '@coral-xyz/anchor';
6
6
  type ConnectionParams = {
7
7
  connection: Connection;
8
8
  signer: PublicKey;
9
+ market: "main" | "ethena";
9
10
  };
10
11
  type DepositContextParams = {
11
12
  asset: PublicKey;
@@ -13,11 +14,13 @@ type DepositContextParams = {
13
14
  } & ConnectionParams;
14
15
  type DepositParams = {
15
16
  amount: BN__default;
16
- } & DepositContextParams;
17
+ market?: "main" | "ethena";
18
+ } & Omit<DepositContextParams, "market">;
17
19
  type MintParams = {
18
20
  shares: BN__default;
19
- } & DepositContextParams;
20
- declare function getDepositContext({ asset, signer, connection, }: DepositContextParams): Promise<{
21
+ market?: "main" | "ethena";
22
+ } & Omit<DepositContextParams, "market">;
23
+ declare function getDepositContext({ asset, signer, connection, market, }: DepositContextParams): Promise<{
21
24
  signer: PublicKey;
22
25
  depositorTokenAccount: PublicKey;
23
26
  recipientTokenAccount: PublicKey;
@@ -47,7 +50,7 @@ declare function getDepositContext({ asset, signer, connection, }: DepositContex
47
50
  * @param connection - The connection
48
51
  * @returns { ixs: TransactionInstruction[] } - The instructions to deposit the assets
49
52
  */
50
- declare const getDepositIxs: ({ amount, asset, signer, connection, }: DepositParams) => Promise<{
53
+ declare const getDepositIxs: ({ amount, asset, signer, connection, market, }: DepositParams) => Promise<{
51
54
  ixs: TransactionInstruction[];
52
55
  }>;
53
56
  /**
@@ -57,7 +60,7 @@ declare const getDepositIxs: ({ amount, asset, signer, connection, }: DepositPar
57
60
  * @param connection - The connection
58
61
  * @returns { ixs: TransactionInstruction[] } - The instructions to mint the shares
59
62
  */
60
- declare const getMintIxs: ({ shares, asset, signer, connection, }: MintParams) => Promise<{
63
+ declare const getMintIxs: ({ shares, asset, signer, connection, market, }: MintParams) => Promise<{
61
64
  ixs: TransactionInstruction[];
62
65
  }>;
63
66
  type WithdrawContextParams = {
@@ -66,11 +69,13 @@ type WithdrawContextParams = {
66
69
  } & ConnectionParams;
67
70
  type WithdrawParams = {
68
71
  amount: BN__default;
69
- } & WithdrawContextParams;
72
+ market?: "main" | "ethena";
73
+ } & Omit<WithdrawContextParams, "market">;
70
74
  type RedeemParams = {
71
75
  shares: BN__default;
72
- } & WithdrawContextParams;
73
- declare function getWithdrawContext({ asset, signer, connection, }: WithdrawContextParams): Promise<{
76
+ market?: "main" | "ethena";
77
+ } & Omit<WithdrawContextParams, "market">;
78
+ declare function getWithdrawContext({ asset, signer, connection, market, }: WithdrawContextParams): Promise<{
74
79
  signer: PublicKey;
75
80
  ownerTokenAccount: PublicKey;
76
81
  recipientTokenAccount: PublicKey;
@@ -98,7 +103,7 @@ declare function getWithdrawContext({ asset, signer, connection, }: WithdrawCont
98
103
  * @param connection - The connection
99
104
  * @returns { ixs: TransactionInstruction[] } - The instructions to withdraw the assets
100
105
  */
101
- declare const getWithdrawIxs: ({ amount, asset, signer, connection, }: WithdrawParams) => Promise<{
106
+ declare const getWithdrawIxs: ({ amount, asset, signer, connection, market, }: WithdrawParams) => Promise<{
102
107
  ixs: TransactionInstruction[];
103
108
  }>;
104
109
  /**
@@ -108,7 +113,7 @@ declare const getWithdrawIxs: ({ amount, asset, signer, connection, }: WithdrawP
108
113
  * @param connection - The connection
109
114
  * @returns { ixs: TransactionInstruction[] } - The instructions to redeem the shares
110
115
  */
111
- declare const getRedeemIxs: ({ shares, asset, signer, connection, }: RedeemParams) => Promise<{
116
+ declare const getRedeemIxs: ({ shares, asset, signer, connection, market, }: RedeemParams) => Promise<{
112
117
  ixs: TransactionInstruction[];
113
118
  }>;
114
119
 
@@ -1858,19 +1863,23 @@ type Lending = {
1858
1863
  declare const U64_MAX: BN;
1859
1864
  declare const MAX_DEPOSIT: BN;
1860
1865
  declare const MAX_WITHDRAW: BN;
1861
- declare const getLendingProgram: ({ connection, signer, }: {
1866
+ declare const getLendingProgram: ({ connection, signer, market, }: {
1862
1867
  connection: Connection;
1863
1868
  signer?: PublicKey;
1869
+ market: "main" | "ethena";
1864
1870
  }) => Program<Lending>;
1865
1871
  declare const getAccountOwner: (account: PublicKey, connection: Connection) => Promise<PublicKey>;
1866
1872
  declare const getOrCreateATAInstruction: (owner: PublicKey, mint: PublicKey, connection: Connection) => Promise<TransactionInstruction[]>;
1873
+ declare const getLiquidityProgramId: (market: "main" | "ethena") => PublicKey;
1867
1874
 
1868
- declare const getLendingTokens: ({ connection, }: {
1875
+ declare const getLendingTokens: ({ connection, market, }: {
1869
1876
  connection: Connection;
1877
+ market: "main" | "ethena";
1870
1878
  }) => Promise<PublicKey[]>;
1871
- declare const getLendingTokenDetails: ({ lendingToken, connection, }: {
1879
+ declare const getLendingTokenDetails: ({ lendingToken, connection, market, }: {
1872
1880
  lendingToken: PublicKey;
1873
1881
  connection: Connection;
1882
+ market: "main" | "ethena";
1874
1883
  }) => Promise<{
1875
1884
  id: number;
1876
1885
  address: PublicKey;
@@ -1883,15 +1892,16 @@ declare const getLendingTokenDetails: ({ lendingToken, connection, }: {
1883
1892
  rewardsRate: BN__default;
1884
1893
  supplyRate: BN__default;
1885
1894
  }>;
1886
- declare const getUserLendingPositionByAsset: ({ user, asset, connection, }: {
1895
+ declare const getUserLendingPositionByAsset: ({ user, asset, connection, market, }: {
1887
1896
  user: PublicKey;
1888
1897
  asset: PublicKey;
1889
1898
  connection: Connection;
1899
+ market: "main" | "ethena";
1890
1900
  }) => Promise<{
1891
1901
  lendingTokenShares: BN__default;
1892
1902
  underlyingAssets: BN__default;
1893
1903
  underlyingBalance: BN__default;
1894
1904
  }>;
1895
1905
 
1896
- export { MAX_DEPOSIT, MAX_WITHDRAW, U64_MAX, getAccountOwner, getDepositContext, getDepositIxs, getLendingProgram, getLendingTokenDetails, getLendingTokens, getMintIxs, getOrCreateATAInstruction, getRedeemIxs, getUserLendingPositionByAsset, getWithdrawContext, getWithdrawIxs };
1906
+ export { MAX_DEPOSIT, MAX_WITHDRAW, U64_MAX, getAccountOwner, getDepositContext, getDepositIxs, getLendingProgram, getLendingTokenDetails, getLendingTokens, getLiquidityProgramId, getMintIxs, getOrCreateATAInstruction, getRedeemIxs, getUserLendingPositionByAsset, getWithdrawContext, getWithdrawIxs };
1897
1907
  export type { ConnectionParams, DepositContextParams, DepositParams, MintParams, RedeemParams, WithdrawContextParams, WithdrawParams };