@jup-ag/lend 0.0.7 → 0.0.9

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,7 +1,8 @@
1
1
  import { SYSVAR_INSTRUCTIONS_PUBKEY, SystemProgram, PublicKey } from '@solana/web3.js';
2
2
  import { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync } from '@solana/spl-token';
3
3
  import { Program } from '@coral-xyz/anchor';
4
- import { g as getLendingToken, c as getLending, d as getLiquidity, e as getLendingRewardsRateModel, f as getRateModel, h as getUserBorrowPosition, i as getUserSupplyPosition, j as getTokenReserveFromAsset, k as getClaimAccount, m as getLendingAdmin, n as liquidity, o as lending } from '../shared/lend.CVUdR9IA.mjs';
4
+ import { g as getLendingToken, c as getLending, d as getLiquidity, e as getLendingRewardsRateModel, f as getRateModel, h as getUserBorrowPosition, i as getUserSupplyPosition, j as getTokenReserveFromAsset, k as getClaimAccount, m as getLendingAdmin, n as lending } from '../shared/lend.Cbyx-MDB.mjs';
5
+ import { l as liquidity } from '../shared/lend.D5fnz2Fg.mjs';
5
6
 
6
7
  function getDepositContext({
7
8
  recipient,
package/dist/index.d.mts CHANGED
@@ -3,15 +3,14 @@ import { PublicKey } from '@solana/web3.js';
3
3
  declare const getLendingToken: (assetAddress: PublicKey) => PublicKey;
4
4
  declare const getLendingAdmin: () => PublicKey;
5
5
  declare const getLending: (assetAddress: PublicKey) => PublicKey;
6
- declare const getClaimAccount: (assetAddress: PublicKey, user: PublicKey) => PublicKey;
6
+ declare const getClaimAccount$1: (assetAddress: PublicKey, user: PublicKey) => PublicKey;
7
7
 
8
- declare const lending_getClaimAccount: typeof getClaimAccount;
9
8
  declare const lending_getLending: typeof getLending;
10
9
  declare const lending_getLendingAdmin: typeof getLendingAdmin;
11
10
  declare const lending_getLendingToken: typeof getLendingToken;
12
11
  declare namespace lending {
13
12
  export {
14
- lending_getClaimAccount as getClaimAccount,
13
+ getClaimAccount$1 as getClaimAccount,
15
14
  lending_getLending as getLending,
16
15
  lending_getLendingAdmin as getLendingAdmin,
17
16
  lending_getLendingToken as getLendingToken,
@@ -20,28 +19,24 @@ declare namespace lending {
20
19
 
21
20
  declare const getSupportedTokenList: () => PublicKey;
22
21
  declare const getTokenReserveFromAsset: (asset: PublicKey) => PublicKey;
23
- declare const getUserSupplyPosition: (asset: PublicKey, protocol: PublicKey) => PublicKey;
24
- declare const getUserBorrowPosition: (asset: PublicKey, protocol: PublicKey) => PublicKey;
25
- declare const getRateModel: (asset: PublicKey) => PublicKey;
22
+ declare const getUserSupplyPosition$1: (asset: PublicKey, protocol: PublicKey) => PublicKey;
23
+ declare const getUserBorrowPosition$1: (asset: PublicKey, protocol: PublicKey) => PublicKey;
24
+ declare const getRateModel$1: (asset: PublicKey) => PublicKey;
26
25
  declare const getReserve: (asset: PublicKey) => PublicKey;
27
- declare const getLiquidity: () => PublicKey;
26
+ declare const getLiquidity$1: () => PublicKey;
28
27
 
29
- declare const liquidity_getLiquidity: typeof getLiquidity;
30
- declare const liquidity_getRateModel: typeof getRateModel;
31
28
  declare const liquidity_getReserve: typeof getReserve;
32
29
  declare const liquidity_getSupportedTokenList: typeof getSupportedTokenList;
33
30
  declare const liquidity_getTokenReserveFromAsset: typeof getTokenReserveFromAsset;
34
- declare const liquidity_getUserBorrowPosition: typeof getUserBorrowPosition;
35
- declare const liquidity_getUserSupplyPosition: typeof getUserSupplyPosition;
36
31
  declare namespace liquidity {
37
32
  export {
38
- liquidity_getLiquidity as getLiquidity,
39
- liquidity_getRateModel as getRateModel,
33
+ getLiquidity$1 as getLiquidity,
34
+ getRateModel$1 as getRateModel,
40
35
  liquidity_getReserve as getReserve,
41
36
  liquidity_getSupportedTokenList as getSupportedTokenList,
42
37
  liquidity_getTokenReserveFromAsset as getTokenReserveFromAsset,
43
- liquidity_getUserBorrowPosition as getUserBorrowPosition,
44
- liquidity_getUserSupplyPosition as getUserSupplyPosition,
38
+ getUserBorrowPosition$1 as getUserBorrowPosition,
39
+ getUserSupplyPosition$1 as getUserSupplyPosition,
45
40
  };
46
41
  }
47
42
 
@@ -54,4 +49,61 @@ declare namespace lendingRewardRateModel {
54
49
  };
55
50
  }
56
51
 
57
- export { lending as lendingPda, lendingRewardRateModel as lendingRewardRateModelPda, liquidity as liquidityPda };
52
+ declare const getVaultConfig: (vaultId: number) => PublicKey;
53
+ declare const getVaultMetadata: (vaultId: number) => PublicKey;
54
+ declare const getVaultAdmin: () => PublicKey;
55
+ declare const getVaultState: (vaultId: number) => PublicKey;
56
+ declare const getLiquidity: () => PublicKey;
57
+ declare const getBranch: (vaultId: number, branchId: number) => PublicKey;
58
+ declare const getPosition: (vaultId: number, positionId: number) => PublicKey;
59
+ declare const getTick: (vaultId: number, tick: number) => PublicKey;
60
+ declare const getTickIdLiquidation: (vaultId: number, tick: number, totalIds: number) => PublicKey;
61
+ declare const getPositionMint: (vaultId: number, positionId: number) => PublicKey;
62
+ declare const getPositionTokenAccount: (vaultId: number, positionId: number, user: PublicKey) => PublicKey;
63
+ declare const getLiquidityReserve: (asset: PublicKey) => PublicKey;
64
+ declare const getRateModel: (asset: PublicKey) => PublicKey;
65
+ declare const getClaimAccount: (asset: PublicKey, user: PublicKey) => PublicKey;
66
+ declare const getUserSupplyPosition: (asset: PublicKey, protocol: PublicKey) => PublicKey;
67
+ declare const getUserBorrowPosition: (asset: PublicKey, protocol: PublicKey) => PublicKey;
68
+ declare const getTickHasDebt: (vaultId: number, index: number) => PublicKey;
69
+
70
+ declare const borrow_getBranch: typeof getBranch;
71
+ declare const borrow_getClaimAccount: typeof getClaimAccount;
72
+ declare const borrow_getLiquidity: typeof getLiquidity;
73
+ declare const borrow_getLiquidityReserve: typeof getLiquidityReserve;
74
+ declare const borrow_getPosition: typeof getPosition;
75
+ declare const borrow_getPositionMint: typeof getPositionMint;
76
+ declare const borrow_getPositionTokenAccount: typeof getPositionTokenAccount;
77
+ declare const borrow_getRateModel: typeof getRateModel;
78
+ declare const borrow_getTick: typeof getTick;
79
+ declare const borrow_getTickHasDebt: typeof getTickHasDebt;
80
+ declare const borrow_getTickIdLiquidation: typeof getTickIdLiquidation;
81
+ declare const borrow_getUserBorrowPosition: typeof getUserBorrowPosition;
82
+ declare const borrow_getUserSupplyPosition: typeof getUserSupplyPosition;
83
+ declare const borrow_getVaultAdmin: typeof getVaultAdmin;
84
+ declare const borrow_getVaultConfig: typeof getVaultConfig;
85
+ declare const borrow_getVaultMetadata: typeof getVaultMetadata;
86
+ declare const borrow_getVaultState: typeof getVaultState;
87
+ declare namespace borrow {
88
+ export {
89
+ borrow_getBranch as getBranch,
90
+ borrow_getClaimAccount as getClaimAccount,
91
+ borrow_getLiquidity as getLiquidity,
92
+ borrow_getLiquidityReserve as getLiquidityReserve,
93
+ borrow_getPosition as getPosition,
94
+ borrow_getPositionMint as getPositionMint,
95
+ borrow_getPositionTokenAccount as getPositionTokenAccount,
96
+ borrow_getRateModel as getRateModel,
97
+ borrow_getTick as getTick,
98
+ borrow_getTickHasDebt as getTickHasDebt,
99
+ borrow_getTickIdLiquidation as getTickIdLiquidation,
100
+ borrow_getUserBorrowPosition as getUserBorrowPosition,
101
+ borrow_getUserSupplyPosition as getUserSupplyPosition,
102
+ borrow_getVaultAdmin as getVaultAdmin,
103
+ borrow_getVaultConfig as getVaultConfig,
104
+ borrow_getVaultMetadata as getVaultMetadata,
105
+ borrow_getVaultState as getVaultState,
106
+ };
107
+ }
108
+
109
+ export { borrow as borrowPda, lending as lendingPda, lendingRewardRateModel as lendingRewardRateModelPda, liquidity as liquidityPda };
package/dist/index.d.ts CHANGED
@@ -3,15 +3,14 @@ import { PublicKey } from '@solana/web3.js';
3
3
  declare const getLendingToken: (assetAddress: PublicKey) => PublicKey;
4
4
  declare const getLendingAdmin: () => PublicKey;
5
5
  declare const getLending: (assetAddress: PublicKey) => PublicKey;
6
- declare const getClaimAccount: (assetAddress: PublicKey, user: PublicKey) => PublicKey;
6
+ declare const getClaimAccount$1: (assetAddress: PublicKey, user: PublicKey) => PublicKey;
7
7
 
8
- declare const lending_getClaimAccount: typeof getClaimAccount;
9
8
  declare const lending_getLending: typeof getLending;
10
9
  declare const lending_getLendingAdmin: typeof getLendingAdmin;
11
10
  declare const lending_getLendingToken: typeof getLendingToken;
12
11
  declare namespace lending {
13
12
  export {
14
- lending_getClaimAccount as getClaimAccount,
13
+ getClaimAccount$1 as getClaimAccount,
15
14
  lending_getLending as getLending,
16
15
  lending_getLendingAdmin as getLendingAdmin,
17
16
  lending_getLendingToken as getLendingToken,
@@ -20,28 +19,24 @@ declare namespace lending {
20
19
 
21
20
  declare const getSupportedTokenList: () => PublicKey;
22
21
  declare const getTokenReserveFromAsset: (asset: PublicKey) => PublicKey;
23
- declare const getUserSupplyPosition: (asset: PublicKey, protocol: PublicKey) => PublicKey;
24
- declare const getUserBorrowPosition: (asset: PublicKey, protocol: PublicKey) => PublicKey;
25
- declare const getRateModel: (asset: PublicKey) => PublicKey;
22
+ declare const getUserSupplyPosition$1: (asset: PublicKey, protocol: PublicKey) => PublicKey;
23
+ declare const getUserBorrowPosition$1: (asset: PublicKey, protocol: PublicKey) => PublicKey;
24
+ declare const getRateModel$1: (asset: PublicKey) => PublicKey;
26
25
  declare const getReserve: (asset: PublicKey) => PublicKey;
27
- declare const getLiquidity: () => PublicKey;
26
+ declare const getLiquidity$1: () => PublicKey;
28
27
 
29
- declare const liquidity_getLiquidity: typeof getLiquidity;
30
- declare const liquidity_getRateModel: typeof getRateModel;
31
28
  declare const liquidity_getReserve: typeof getReserve;
32
29
  declare const liquidity_getSupportedTokenList: typeof getSupportedTokenList;
33
30
  declare const liquidity_getTokenReserveFromAsset: typeof getTokenReserveFromAsset;
34
- declare const liquidity_getUserBorrowPosition: typeof getUserBorrowPosition;
35
- declare const liquidity_getUserSupplyPosition: typeof getUserSupplyPosition;
36
31
  declare namespace liquidity {
37
32
  export {
38
- liquidity_getLiquidity as getLiquidity,
39
- liquidity_getRateModel as getRateModel,
33
+ getLiquidity$1 as getLiquidity,
34
+ getRateModel$1 as getRateModel,
40
35
  liquidity_getReserve as getReserve,
41
36
  liquidity_getSupportedTokenList as getSupportedTokenList,
42
37
  liquidity_getTokenReserveFromAsset as getTokenReserveFromAsset,
43
- liquidity_getUserBorrowPosition as getUserBorrowPosition,
44
- liquidity_getUserSupplyPosition as getUserSupplyPosition,
38
+ getUserBorrowPosition$1 as getUserBorrowPosition,
39
+ getUserSupplyPosition$1 as getUserSupplyPosition,
45
40
  };
46
41
  }
47
42
 
@@ -54,4 +49,61 @@ declare namespace lendingRewardRateModel {
54
49
  };
55
50
  }
56
51
 
57
- export { lending as lendingPda, lendingRewardRateModel as lendingRewardRateModelPda, liquidity as liquidityPda };
52
+ declare const getVaultConfig: (vaultId: number) => PublicKey;
53
+ declare const getVaultMetadata: (vaultId: number) => PublicKey;
54
+ declare const getVaultAdmin: () => PublicKey;
55
+ declare const getVaultState: (vaultId: number) => PublicKey;
56
+ declare const getLiquidity: () => PublicKey;
57
+ declare const getBranch: (vaultId: number, branchId: number) => PublicKey;
58
+ declare const getPosition: (vaultId: number, positionId: number) => PublicKey;
59
+ declare const getTick: (vaultId: number, tick: number) => PublicKey;
60
+ declare const getTickIdLiquidation: (vaultId: number, tick: number, totalIds: number) => PublicKey;
61
+ declare const getPositionMint: (vaultId: number, positionId: number) => PublicKey;
62
+ declare const getPositionTokenAccount: (vaultId: number, positionId: number, user: PublicKey) => PublicKey;
63
+ declare const getLiquidityReserve: (asset: PublicKey) => PublicKey;
64
+ declare const getRateModel: (asset: PublicKey) => PublicKey;
65
+ declare const getClaimAccount: (asset: PublicKey, user: PublicKey) => PublicKey;
66
+ declare const getUserSupplyPosition: (asset: PublicKey, protocol: PublicKey) => PublicKey;
67
+ declare const getUserBorrowPosition: (asset: PublicKey, protocol: PublicKey) => PublicKey;
68
+ declare const getTickHasDebt: (vaultId: number, index: number) => PublicKey;
69
+
70
+ declare const borrow_getBranch: typeof getBranch;
71
+ declare const borrow_getClaimAccount: typeof getClaimAccount;
72
+ declare const borrow_getLiquidity: typeof getLiquidity;
73
+ declare const borrow_getLiquidityReserve: typeof getLiquidityReserve;
74
+ declare const borrow_getPosition: typeof getPosition;
75
+ declare const borrow_getPositionMint: typeof getPositionMint;
76
+ declare const borrow_getPositionTokenAccount: typeof getPositionTokenAccount;
77
+ declare const borrow_getRateModel: typeof getRateModel;
78
+ declare const borrow_getTick: typeof getTick;
79
+ declare const borrow_getTickHasDebt: typeof getTickHasDebt;
80
+ declare const borrow_getTickIdLiquidation: typeof getTickIdLiquidation;
81
+ declare const borrow_getUserBorrowPosition: typeof getUserBorrowPosition;
82
+ declare const borrow_getUserSupplyPosition: typeof getUserSupplyPosition;
83
+ declare const borrow_getVaultAdmin: typeof getVaultAdmin;
84
+ declare const borrow_getVaultConfig: typeof getVaultConfig;
85
+ declare const borrow_getVaultMetadata: typeof getVaultMetadata;
86
+ declare const borrow_getVaultState: typeof getVaultState;
87
+ declare namespace borrow {
88
+ export {
89
+ borrow_getBranch as getBranch,
90
+ borrow_getClaimAccount as getClaimAccount,
91
+ borrow_getLiquidity as getLiquidity,
92
+ borrow_getLiquidityReserve as getLiquidityReserve,
93
+ borrow_getPosition as getPosition,
94
+ borrow_getPositionMint as getPositionMint,
95
+ borrow_getPositionTokenAccount as getPositionTokenAccount,
96
+ borrow_getRateModel as getRateModel,
97
+ borrow_getTick as getTick,
98
+ borrow_getTickHasDebt as getTickHasDebt,
99
+ borrow_getTickIdLiquidation as getTickIdLiquidation,
100
+ borrow_getUserBorrowPosition as getUserBorrowPosition,
101
+ borrow_getUserSupplyPosition as getUserSupplyPosition,
102
+ borrow_getVaultAdmin as getVaultAdmin,
103
+ borrow_getVaultConfig as getVaultConfig,
104
+ borrow_getVaultMetadata as getVaultMetadata,
105
+ borrow_getVaultState as getVaultState,
106
+ };
107
+ }
108
+
109
+ export { borrow as borrowPda, lending as lendingPda, lendingRewardRateModel as lendingRewardRateModelPda, liquidity as liquidityPda };
package/dist/index.mjs CHANGED
@@ -1,2 +1,6 @@
1
- export { l as lendingPda, b as lendingRewardRateModelPda, a as liquidityPda } from './shared/lend.CVUdR9IA.mjs';
1
+ export { l as lendingPda, b as lendingRewardRateModelPda, a as liquidityPda } from './shared/lend.Cbyx-MDB.mjs';
2
+ export { b as borrowPda } from './shared/lend.CzIu1Y5n.mjs';
2
3
  import '@solana/web3.js';
4
+ import './shared/lend.D5fnz2Fg.mjs';
5
+ import '@solana/spl-token';
6
+ import 'bn.js';
@@ -1,8 +1,5 @@
1
1
  import { PublicKey } from '@solana/web3.js';
2
-
3
- const address$2 = "5uDkCoM96pwGYhAUucvCzLfm5UcjVRuxz6gH81RnRBmL";
4
- const liquidity$1 = {
5
- address: address$2};
2
+ import { a as address$2 } from './lend.D5fnz2Fg.mjs';
6
3
 
7
4
  const address$1 = "7tjE28izRUjzmxC1QNXnNwcc4N82CNYCexf3k8mw67s3";
8
5
  const metadata = {
@@ -3022,4 +3019,4 @@ const lendingRewardRateModel = {
3022
3019
  getLendingRewardsRateModel: getLendingRewardsRateModel
3023
3020
  };
3024
3021
 
3025
- export { liquidity as a, lendingRewardRateModel as b, getLending as c, getLiquidity as d, getLendingRewardsRateModel as e, getRateModel as f, getLendingToken as g, getUserBorrowPosition as h, getUserSupplyPosition as i, getTokenReserveFromAsset as j, getClaimAccount as k, lending as l, getLendingAdmin as m, liquidity$1 as n, lending$1 as o };
3022
+ export { liquidity as a, lendingRewardRateModel as b, getLending as c, getLiquidity as d, getLendingRewardsRateModel as e, getRateModel as f, getLendingToken as g, getUserBorrowPosition as h, getUserSupplyPosition as i, getTokenReserveFromAsset as j, getClaimAccount as k, lending as l, getLendingAdmin as m, lending$1 as n };