@jup-ag/lend 0.1.10-beta.1 → 0.1.10-beta.2

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,11 +1,11 @@
1
- import { g as getLiquidateIx, a as getVaultsProgram } from '../shared/lend.TsM0oFXS.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.TsM0oFXS.mjs';
1
+ import { g as getLiquidateIx, a as getVaultsProgram } from '../shared/lend.DUkMIKcH.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.DUkMIKcH.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.tU-yHdcH.mjs';
5
+ import { g as getVaultAdmin } from '../shared/lend.BsvjWilv.mjs';
6
6
  import '@coral-xyz/anchor';
7
7
  import '@solana/spl-token';
8
- import '../shared/lend.BjhqzIWk.mjs';
8
+ import '../shared/lend.BhQGaP3o.mjs';
9
9
 
10
10
  const simulateLiquidate = async (params) => {
11
11
  const { connection, signer } = params;
@@ -2,8 +2,8 @@ import { PublicKey, SYSVAR_INSTRUCTIONS_PUBKEY, SystemProgram } from '@solana/we
2
2
  import { getAssociatedTokenAddress, getAccount, createAssociatedTokenAccountInstruction, ASSOCIATED_TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync } from '@solana/spl-token';
3
3
  import { Program } from '@coral-xyz/anchor';
4
4
  import BN$1, { BN } from 'bn.js';
5
- import { g as getLendingToken, b as getLending, c as getLendingRewardsRateModel, d as getClaimAccount, e as getLendingAdmin } from '../shared/lend.BKZOr4CM.mjs';
6
- import { g as getLiquidity, a as getRateModel, b as getUserBorrowPosition, c as getUserSupplyPosition, d as getTokenReserveFromAsset, e as getReserve } from '../shared/lend.BjhqzIWk.mjs';
5
+ import { g as getLendingToken, b as getLending, c as getLendingRewardsRateModel, d as getClaimAccount, e as getLendingAdmin } from '../shared/lend.DovweBeJ.mjs';
6
+ import { g as getLiquidity, a as getRateModel, b as getUserBorrowPosition, c as getUserSupplyPosition, d as getTokenReserveFromAsset, e as getReserve } from '../shared/lend.BhQGaP3o.mjs';
7
7
 
8
8
  const address = "jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9";
9
9
  const metadata = {
@@ -2,7 +2,7 @@ import { SYSVAR_INSTRUCTIONS_PUBKEY, SystemProgram, PublicKey } from '@solana/we
2
2
  import BN from 'bn.js';
3
3
  import { ASSOCIATED_TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync } from '@solana/spl-token';
4
4
  import { Program } from '@coral-xyz/anchor';
5
- import { g as getLiquidity, a as getRateModel, b as getFlashloanBorrowPosition, c as getLiquidityReserve, d as getFlashloanAdmin } from '../shared/lend.0Rjy1SRf.mjs';
5
+ import { g as getLiquidity, a as getRateModel, b as getFlashloanBorrowPosition, c as getLiquidityReserve, d as getFlashloanAdmin } from '../shared/lend.BXNM1zms.mjs';
6
6
 
7
7
  const address = "jupgfSgfuAXv4B6R2Uxu85Z1qdzgju79s6MfZekN6XS";
8
8
  const metadata = {
package/dist/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { PublicKey } from '@solana/web3.js';
2
2
 
3
+ declare const getLendingProgramId: (market: "main" | "ethena") => PublicKey;
3
4
  declare const getLendingToken: (assetAddress: PublicKey, market: "main" | "ethena") => PublicKey;
4
5
  declare const getLendingAdmin: (market: "main" | "ethena") => PublicKey;
5
6
  declare const getLending: (assetAddress: PublicKey, market: "main" | "ethena") => PublicKey;
@@ -7,16 +8,19 @@ declare const getClaimAccount$1: (assetAddress: PublicKey, user: PublicKey, mark
7
8
 
8
9
  declare const lending_getLending: typeof getLending;
9
10
  declare const lending_getLendingAdmin: typeof getLendingAdmin;
11
+ declare const lending_getLendingProgramId: typeof getLendingProgramId;
10
12
  declare const lending_getLendingToken: typeof getLendingToken;
11
13
  declare namespace lending {
12
14
  export {
13
15
  getClaimAccount$1 as getClaimAccount,
14
16
  lending_getLending as getLending,
15
17
  lending_getLendingAdmin as getLendingAdmin,
18
+ lending_getLendingProgramId as getLendingProgramId,
16
19
  lending_getLendingToken as getLendingToken,
17
20
  };
18
21
  }
19
22
 
23
+ declare const getLiquidityProgramId: (market: "main" | "ethena") => PublicKey;
20
24
  declare const getSupportedTokenList: (market: "main" | "ethena") => PublicKey;
21
25
  declare const getTokenReserveFromAsset: (asset: PublicKey, market: "main" | "ethena") => PublicKey;
22
26
  declare const getUserSupplyPosition$1: (asset: PublicKey, protocol: PublicKey, market: "main" | "ethena") => PublicKey;
@@ -25,12 +29,14 @@ declare const getRateModel$2: (asset: PublicKey, market: "main" | "ethena") => P
25
29
  declare const getReserve: (asset: PublicKey, market: "main" | "ethena") => PublicKey;
26
30
  declare const getLiquidity$2: (market: "main" | "ethena") => PublicKey;
27
31
 
32
+ declare const liquidity_getLiquidityProgramId: typeof getLiquidityProgramId;
28
33
  declare const liquidity_getReserve: typeof getReserve;
29
34
  declare const liquidity_getSupportedTokenList: typeof getSupportedTokenList;
30
35
  declare const liquidity_getTokenReserveFromAsset: typeof getTokenReserveFromAsset;
31
36
  declare namespace liquidity {
32
37
  export {
33
38
  getLiquidity$2 as getLiquidity,
39
+ liquidity_getLiquidityProgramId as getLiquidityProgramId,
34
40
  getRateModel$2 as getRateModel,
35
41
  liquidity_getReserve as getReserve,
36
42
  liquidity_getSupportedTokenList as getSupportedTokenList,
@@ -52,6 +58,7 @@ declare namespace lendingRewardRateModel {
52
58
  };
53
59
  }
54
60
 
61
+ declare const getVaultsProgramId: (market: "main" | "ethena") => PublicKey;
55
62
  declare const getVaultConfig: (vaultId: number, market: "main" | "ethena") => PublicKey;
56
63
  declare const getVaultMetadata: (vaultId: number, market: "main" | "ethena") => PublicKey;
57
64
  declare const getVaultAdmin: (market: "main" | "ethena") => PublicKey;
@@ -86,6 +93,7 @@ declare const borrow_getVaultAdmin: typeof getVaultAdmin;
86
93
  declare const borrow_getVaultConfig: typeof getVaultConfig;
87
94
  declare const borrow_getVaultMetadata: typeof getVaultMetadata;
88
95
  declare const borrow_getVaultState: typeof getVaultState;
96
+ declare const borrow_getVaultsProgramId: typeof getVaultsProgramId;
89
97
  declare namespace borrow {
90
98
  export {
91
99
  borrow_getBranch as getBranch,
@@ -106,9 +114,11 @@ declare namespace borrow {
106
114
  borrow_getVaultConfig as getVaultConfig,
107
115
  borrow_getVaultMetadata as getVaultMetadata,
108
116
  borrow_getVaultState as getVaultState,
117
+ borrow_getVaultsProgramId as getVaultsProgramId,
109
118
  };
110
119
  }
111
120
 
121
+ declare const getFlashloanProgramId: (market: "main" | "ethena") => PublicKey;
112
122
  declare const getFlashloanAdmin: (market: "main" | "ethena") => PublicKey;
113
123
  declare const getLiquidityReserve: (asset: PublicKey, market: "main" | "ethena") => PublicKey;
114
124
  declare const getLiquidity: (market: "main" | "ethena") => PublicKey;
@@ -118,6 +128,7 @@ declare const getFlashloanBorrowPosition: (asset: PublicKey, market: "main" | "e
118
128
 
119
129
  declare const flashloan_getFlashloanAdmin: typeof getFlashloanAdmin;
120
130
  declare const flashloan_getFlashloanBorrowPosition: typeof getFlashloanBorrowPosition;
131
+ declare const flashloan_getFlashloanProgramId: typeof getFlashloanProgramId;
121
132
  declare const flashloan_getFlashloanSupplyPosition: typeof getFlashloanSupplyPosition;
122
133
  declare const flashloan_getLiquidity: typeof getLiquidity;
123
134
  declare const flashloan_getLiquidityReserve: typeof getLiquidityReserve;
@@ -126,6 +137,7 @@ declare namespace flashloan {
126
137
  export {
127
138
  flashloan_getFlashloanAdmin as getFlashloanAdmin,
128
139
  flashloan_getFlashloanBorrowPosition as getFlashloanBorrowPosition,
140
+ flashloan_getFlashloanProgramId as getFlashloanProgramId,
129
141
  flashloan_getFlashloanSupplyPosition as getFlashloanSupplyPosition,
130
142
  flashloan_getLiquidity as getLiquidity,
131
143
  flashloan_getLiquidityReserve as getLiquidityReserve,
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { PublicKey } from '@solana/web3.js';
2
2
 
3
+ declare const getLendingProgramId: (market: "main" | "ethena") => PublicKey;
3
4
  declare const getLendingToken: (assetAddress: PublicKey, market: "main" | "ethena") => PublicKey;
4
5
  declare const getLendingAdmin: (market: "main" | "ethena") => PublicKey;
5
6
  declare const getLending: (assetAddress: PublicKey, market: "main" | "ethena") => PublicKey;
@@ -7,16 +8,19 @@ declare const getClaimAccount$1: (assetAddress: PublicKey, user: PublicKey, mark
7
8
 
8
9
  declare const lending_getLending: typeof getLending;
9
10
  declare const lending_getLendingAdmin: typeof getLendingAdmin;
11
+ declare const lending_getLendingProgramId: typeof getLendingProgramId;
10
12
  declare const lending_getLendingToken: typeof getLendingToken;
11
13
  declare namespace lending {
12
14
  export {
13
15
  getClaimAccount$1 as getClaimAccount,
14
16
  lending_getLending as getLending,
15
17
  lending_getLendingAdmin as getLendingAdmin,
18
+ lending_getLendingProgramId as getLendingProgramId,
16
19
  lending_getLendingToken as getLendingToken,
17
20
  };
18
21
  }
19
22
 
23
+ declare const getLiquidityProgramId: (market: "main" | "ethena") => PublicKey;
20
24
  declare const getSupportedTokenList: (market: "main" | "ethena") => PublicKey;
21
25
  declare const getTokenReserveFromAsset: (asset: PublicKey, market: "main" | "ethena") => PublicKey;
22
26
  declare const getUserSupplyPosition$1: (asset: PublicKey, protocol: PublicKey, market: "main" | "ethena") => PublicKey;
@@ -25,12 +29,14 @@ declare const getRateModel$2: (asset: PublicKey, market: "main" | "ethena") => P
25
29
  declare const getReserve: (asset: PublicKey, market: "main" | "ethena") => PublicKey;
26
30
  declare const getLiquidity$2: (market: "main" | "ethena") => PublicKey;
27
31
 
32
+ declare const liquidity_getLiquidityProgramId: typeof getLiquidityProgramId;
28
33
  declare const liquidity_getReserve: typeof getReserve;
29
34
  declare const liquidity_getSupportedTokenList: typeof getSupportedTokenList;
30
35
  declare const liquidity_getTokenReserveFromAsset: typeof getTokenReserveFromAsset;
31
36
  declare namespace liquidity {
32
37
  export {
33
38
  getLiquidity$2 as getLiquidity,
39
+ liquidity_getLiquidityProgramId as getLiquidityProgramId,
34
40
  getRateModel$2 as getRateModel,
35
41
  liquidity_getReserve as getReserve,
36
42
  liquidity_getSupportedTokenList as getSupportedTokenList,
@@ -52,6 +58,7 @@ declare namespace lendingRewardRateModel {
52
58
  };
53
59
  }
54
60
 
61
+ declare const getVaultsProgramId: (market: "main" | "ethena") => PublicKey;
55
62
  declare const getVaultConfig: (vaultId: number, market: "main" | "ethena") => PublicKey;
56
63
  declare const getVaultMetadata: (vaultId: number, market: "main" | "ethena") => PublicKey;
57
64
  declare const getVaultAdmin: (market: "main" | "ethena") => PublicKey;
@@ -86,6 +93,7 @@ declare const borrow_getVaultAdmin: typeof getVaultAdmin;
86
93
  declare const borrow_getVaultConfig: typeof getVaultConfig;
87
94
  declare const borrow_getVaultMetadata: typeof getVaultMetadata;
88
95
  declare const borrow_getVaultState: typeof getVaultState;
96
+ declare const borrow_getVaultsProgramId: typeof getVaultsProgramId;
89
97
  declare namespace borrow {
90
98
  export {
91
99
  borrow_getBranch as getBranch,
@@ -106,9 +114,11 @@ declare namespace borrow {
106
114
  borrow_getVaultConfig as getVaultConfig,
107
115
  borrow_getVaultMetadata as getVaultMetadata,
108
116
  borrow_getVaultState as getVaultState,
117
+ borrow_getVaultsProgramId as getVaultsProgramId,
109
118
  };
110
119
  }
111
120
 
121
+ declare const getFlashloanProgramId: (market: "main" | "ethena") => PublicKey;
112
122
  declare const getFlashloanAdmin: (market: "main" | "ethena") => PublicKey;
113
123
  declare const getLiquidityReserve: (asset: PublicKey, market: "main" | "ethena") => PublicKey;
114
124
  declare const getLiquidity: (market: "main" | "ethena") => PublicKey;
@@ -118,6 +128,7 @@ declare const getFlashloanBorrowPosition: (asset: PublicKey, market: "main" | "e
118
128
 
119
129
  declare const flashloan_getFlashloanAdmin: typeof getFlashloanAdmin;
120
130
  declare const flashloan_getFlashloanBorrowPosition: typeof getFlashloanBorrowPosition;
131
+ declare const flashloan_getFlashloanProgramId: typeof getFlashloanProgramId;
121
132
  declare const flashloan_getFlashloanSupplyPosition: typeof getFlashloanSupplyPosition;
122
133
  declare const flashloan_getLiquidity: typeof getLiquidity;
123
134
  declare const flashloan_getLiquidityReserve: typeof getLiquidityReserve;
@@ -126,6 +137,7 @@ declare namespace flashloan {
126
137
  export {
127
138
  flashloan_getFlashloanAdmin as getFlashloanAdmin,
128
139
  flashloan_getFlashloanBorrowPosition as getFlashloanBorrowPosition,
140
+ flashloan_getFlashloanProgramId as getFlashloanProgramId,
129
141
  flashloan_getFlashloanSupplyPosition as getFlashloanSupplyPosition,
130
142
  flashloan_getLiquidity as getLiquidity,
131
143
  flashloan_getLiquidityReserve as getLiquidityReserve,
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
- export { l as lendingPda, a as lendingRewardRateModelPda } from './shared/lend.BKZOr4CM.mjs';
2
- export { l as liquidityPda } from './shared/lend.BjhqzIWk.mjs';
3
- export { b as borrowPda } from './shared/lend.tU-yHdcH.mjs';
4
- export { f as flashloanPda } from './shared/lend.0Rjy1SRf.mjs';
1
+ export { l as lendingPda, a as lendingRewardRateModelPda } from './shared/lend.DovweBeJ.mjs';
2
+ export { l as liquidityPda } from './shared/lend.BhQGaP3o.mjs';
3
+ export { b as borrowPda } from './shared/lend.BsvjWilv.mjs';
4
+ export { f as flashloanPda } from './shared/lend.BXNM1zms.mjs';
5
5
  export { m as merkleDistributorPda } from './shared/lend.Bpqe1Iia.mjs';
6
6
  import '@solana/web3.js';
7
7
  import '@solana/spl-token';
8
8
  import 'bn.js';
9
9
 
10
- const version = "0.1.10-beta.1";
10
+ const version = "0.1.10-beta.2";
11
11
 
12
12
  export { version };
@@ -1,10 +1,10 @@
1
- import { e as getOperateIx, F as vaultsIdl } from '../shared/lend.TsM0oFXS.mjs';
1
+ import { e as getOperateIx, F as vaultsIdl } from '../shared/lend.DUkMIKcH.mjs';
2
2
  import { PublicKey } from '@solana/web3.js';
3
3
  import { Program } from '@coral-xyz/anchor';
4
4
  import 'bn.js';
5
5
  import '@solana/spl-token';
6
- import '../shared/lend.tU-yHdcH.mjs';
7
- import '../shared/lend.BjhqzIWk.mjs';
6
+ import '../shared/lend.BsvjWilv.mjs';
7
+ import '../shared/lend.BhQGaP3o.mjs';
8
8
 
9
9
  const address = "jup8QcdtqecBGw1iXHW3hQAsHQbTgEqbLbNMvvULmeK";
10
10
  const metadata = {
@@ -61,6 +61,7 @@ const flashloan = {
61
61
  __proto__: null,
62
62
  getFlashloanAdmin: getFlashloanAdmin,
63
63
  getFlashloanBorrowPosition: getFlashloanBorrowPosition,
64
+ getFlashloanProgramId: getFlashloanProgramId,
64
65
  getFlashloanSupplyPosition: getFlashloanSupplyPosition,
65
66
  getLiquidity: getLiquidity,
66
67
  getLiquidityReserve: getLiquidityReserve,
@@ -57,6 +57,7 @@ const getLiquidity = (market) => {
57
57
  const liquidity = {
58
58
  __proto__: null,
59
59
  getLiquidity: getLiquidity,
60
+ getLiquidityProgramId: getLiquidityProgramId,
60
61
  getRateModel: getRateModel,
61
62
  getReserve: getReserve,
62
63
  getSupportedTokenList: getSupportedTokenList,
@@ -198,7 +198,8 @@ const borrow = {
198
198
  getVaultAdmin: getVaultAdmin,
199
199
  getVaultConfig: getVaultConfig,
200
200
  getVaultMetadata: getVaultMetadata,
201
- getVaultState: getVaultState
201
+ getVaultState: getVaultState,
202
+ getVaultsProgramId: getVaultsProgramId
202
203
  };
203
204
 
204
205
  export { getTickHasDebt as a, borrow as b, getPosition as c, getTick as d, getTickIdLiquidation as e, getVaultConfig as f, getVaultAdmin as g, getBranch as h, getVaultState as i, getVaultMetadata as j, getLiquidity as k, getRateModel as l, getUserBorrowPosition as m, getUserSupplyPosition as n, getLiquidityReserve as o, getPositionTokenAccount as p, getPositionMetadata as q, getPositionMint as r, getClaimAccount as s };
@@ -2,8 +2,8 @@ import { PublicKey, Transaction, SystemProgram, SYSVAR_RENT_PUBKEY, SYSVAR_INSTR
2
2
  import BN from 'bn.js';
3
3
  import { Program, AnchorProvider } from '@coral-xyz/anchor';
4
4
  import { getAssociatedTokenAddressSync, ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID, NATIVE_MINT } from '@solana/spl-token';
5
- import { a as getTickHasDebt, c as getPosition, d as getTick, e as getTickIdLiquidation, f as getVaultConfig, h as getBranch, i as getVaultState, j as getVaultMetadata, k as getLiquidity, l as getRateModel, m as getUserBorrowPosition, n as getUserSupplyPosition, o as getLiquidityReserve, p as getPositionTokenAccount, q as getPositionMetadata, r as getPositionMint, g as getVaultAdmin, s as getClaimAccount } from './lend.tU-yHdcH.mjs';
6
- import { e as getReserve } from './lend.BjhqzIWk.mjs';
5
+ import { a as getTickHasDebt, c as getPosition, d as getTick, e as getTickIdLiquidation, f as getVaultConfig, h as getBranch, i as getVaultState, j as getVaultMetadata, k as getLiquidity, l as getRateModel, m as getUserBorrowPosition, n as getUserSupplyPosition, o as getLiquidityReserve, p as getPositionTokenAccount, q as getPositionMetadata, r as getPositionMint, g as getVaultAdmin, s as getClaimAccount } from './lend.BsvjWilv.mjs';
6
+ import { e as getReserve } from './lend.BhQGaP3o.mjs';
7
7
 
8
8
  const address$1 = "jupnw4B6Eqs7ft6rxpzYLJZYSnrpRgPcr589n5Kv4oc";
9
9
  const metadata$1 = {
@@ -44,6 +44,7 @@ const lending = {
44
44
  getClaimAccount: getClaimAccount,
45
45
  getLending: getLending,
46
46
  getLendingAdmin: getLendingAdmin,
47
+ getLendingProgramId: getLendingProgramId,
47
48
  getLendingToken: getLendingToken
48
49
  };
49
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jup-ag/lend",
3
- "version": "0.1.10-beta.1",
3
+ "version": "0.1.10-beta.2",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "type": "module",