@jup-ag/lend 0.0.1 → 0.0.3

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.
File without changes
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export { l as lendingPda, b as lendingRewardRateModelPda, a as liquidityPda } from './shared/lend.DVqn4Bgr.mjs';
1
+ export { l as lendingPda, b as lendingRewardRateModelPda, a as liquidityPda } from './shared/lend.CjksRhKO.mjs';
2
2
  import '@solana/web3.js';
@@ -1,6 +1,10 @@
1
1
  import { PublicKey } from '@solana/web3.js';
2
2
 
3
- const address$2 = "7tjE28izRUjzmxC1QNXnNwcc4N82CNYCexf3k8mw67s3";
3
+ const address$2 = "5uDkCoM96pwGYhAUucvCzLfm5UcjVRuxz6gH81RnRBmL";
4
+ const liquidity$1 = {
5
+ address: address$2};
6
+
7
+ const address$1 = "7tjE28izRUjzmxC1QNXnNwcc4N82CNYCexf3k8mw67s3";
4
8
  const metadata = {
5
9
  name: "lending",
6
10
  version: "0.1.0",
@@ -2891,7 +2895,7 @@ const types = [
2891
2895
  }
2892
2896
  ];
2893
2897
  const lending$1 = {
2894
- address: address$2,
2898
+ address: address$1,
2895
2899
  metadata: metadata,
2896
2900
  instructions: instructions,
2897
2901
  accounts: accounts,
@@ -2900,21 +2904,17 @@ const lending$1 = {
2900
2904
  types: types
2901
2905
  };
2902
2906
 
2903
- const address$1 = "5uDkCoM96pwGYhAUucvCzLfm5UcjVRuxz6gH81RnRBmL";
2904
- const liquidity$1 = {
2905
- address: address$1};
2906
-
2907
2907
  const getLendingToken = (assetAddress) => {
2908
2908
  const [pda] = PublicKey.findProgramAddressSync(
2909
2909
  [Buffer.from("f_token_mint"), assetAddress.toBuffer()],
2910
- new PublicKey(lending$1.address)
2910
+ new PublicKey(address$1)
2911
2911
  );
2912
2912
  return pda;
2913
2913
  };
2914
2914
  const getLendingAdmin = () => {
2915
2915
  const [pda] = PublicKey.findProgramAddressSync(
2916
2916
  [Buffer.from("lending_admin")],
2917
- new PublicKey(lending$1.address)
2917
+ new PublicKey(address$1)
2918
2918
  );
2919
2919
  return pda;
2920
2920
  };
@@ -2925,14 +2925,14 @@ const getLending = (assetAddress) => {
2925
2925
  assetAddress.toBuffer(),
2926
2926
  getLendingToken(assetAddress).toBuffer()
2927
2927
  ],
2928
- new PublicKey(lending$1.address)
2928
+ new PublicKey(address$1)
2929
2929
  );
2930
2930
  return pda;
2931
2931
  };
2932
2932
  const getClaimAccount = (assetAddress, user) => {
2933
2933
  const [pda] = PublicKey.findProgramAddressSync(
2934
2934
  [Buffer.from("user_claim"), user.toBuffer(), assetAddress.toBuffer()],
2935
- new PublicKey(liquidity$1.address)
2935
+ new PublicKey(address$2)
2936
2936
  );
2937
2937
  return pda;
2938
2938
  };
@@ -2948,13 +2948,13 @@ const lending = {
2948
2948
  const getSupportedTokenList = () => {
2949
2949
  return PublicKey.findProgramAddressSync(
2950
2950
  [Buffer.from("supported_token_list")],
2951
- new PublicKey(liquidity$1.address)
2951
+ new PublicKey(address$2)
2952
2952
  )[0];
2953
2953
  };
2954
2954
  const getTokenReserveFromAsset = (asset) => {
2955
2955
  return PublicKey.findProgramAddressSync(
2956
2956
  [Buffer.from("reserve"), asset.toBuffer()],
2957
- new PublicKey(liquidity$1.address)
2957
+ new PublicKey(address$2)
2958
2958
  )[0];
2959
2959
  };
2960
2960
  const getUserSupplyPosition = (asset, protocol) => {
@@ -2964,7 +2964,7 @@ const getUserSupplyPosition = (asset, protocol) => {
2964
2964
  asset.toBuffer(),
2965
2965
  protocol.toBuffer()
2966
2966
  ],
2967
- new PublicKey(liquidity$1.address)
2967
+ new PublicKey(address$2)
2968
2968
  )[0];
2969
2969
  };
2970
2970
  const getUserBorrowPosition = (asset, protocol) => {
@@ -2974,25 +2974,25 @@ const getUserBorrowPosition = (asset, protocol) => {
2974
2974
  asset.toBuffer(),
2975
2975
  protocol.toBuffer()
2976
2976
  ],
2977
- new PublicKey(liquidity$1.address)
2977
+ new PublicKey(address$2)
2978
2978
  )[0];
2979
2979
  };
2980
2980
  const getRateModel = (asset) => {
2981
2981
  return PublicKey.findProgramAddressSync(
2982
2982
  [Buffer.from("rate_model"), asset.toBuffer()],
2983
- new PublicKey(liquidity$1.address)
2983
+ new PublicKey(address$2)
2984
2984
  )[0];
2985
2985
  };
2986
2986
  const getReserve = (asset) => {
2987
2987
  return PublicKey.findProgramAddressSync(
2988
2988
  [Buffer.from("reserve"), asset.toBuffer()],
2989
- new PublicKey(liquidity$1.address)
2989
+ new PublicKey(address$2)
2990
2990
  )[0];
2991
2991
  };
2992
2992
  const getLiquidity = () => {
2993
2993
  return PublicKey.findProgramAddressSync(
2994
2994
  [Buffer.from("liquidity")],
2995
- new PublicKey(liquidity$1.address)
2995
+ new PublicKey(address$2)
2996
2996
  )[0];
2997
2997
  };
2998
2998
 
@@ -3008,13 +3008,11 @@ const liquidity = {
3008
3008
  };
3009
3009
 
3010
3010
  const address = "68LHLkpgjAvo6Lgd9FT6KYEX4FWn1911EohSXxHYMFjc";
3011
- const lendingRewardRateModel$1 = {
3012
- address: address};
3013
3011
 
3014
3012
  const getLendingRewardsRateModel = (assetAddress) => {
3015
3013
  const [pda] = PublicKey.findProgramAddressSync(
3016
3014
  [Buffer.from("lending_rewards_rate_model"), assetAddress.toBuffer()],
3017
- new PublicKey(lendingRewardRateModel$1.address)
3015
+ new PublicKey(address)
3018
3016
  );
3019
3017
  return pda;
3020
3018
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jup-ag/lend",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -13,6 +13,10 @@
13
13
  "./earn": {
14
14
  "types": "./dist/earn/index.d.mts",
15
15
  "default": "./dist/earn/index.mjs"
16
+ },
17
+ "./idl": {
18
+ "types": "./dist/idl/index.d.ts",
19
+ "default": "./dist/idl/index.mjs"
16
20
  }
17
21
  },
18
22
  "files": [