@jup-ag/lend 0.0.94 → 0.0.95

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.
@@ -2985,6 +2985,9 @@ declare const getLendingProgram: ({ connection, signer, }: {
2985
2985
  }) => Program<Lending>;
2986
2986
  declare const getAccountOwner: (account: PublicKey, connection: Connection) => Promise<PublicKey>;
2987
2987
 
2988
+ declare const getLendingTokens: ({ connection, }: {
2989
+ connection: Connection;
2990
+ }) => Promise<PublicKey[]>;
2988
2991
  declare const getLendingTokenDetails: ({ lendingToken, connection, }: {
2989
2992
  lendingToken: PublicKey;
2990
2993
  connection: Connection;
@@ -3010,5 +3013,5 @@ declare const getUserPosition: ({ user, asset, connection, }: {
3010
3013
  underlyingBalance: BN;
3011
3014
  }>;
3012
3015
 
3013
- export { getAccountOwner, getDepositContext, getDepositIx, getLendingProgram, getLendingTokenDetails, getMintIx, getRedeemIx, getUserPosition, getWithdrawContext, getWithdrawIx };
3016
+ export { getAccountOwner, getDepositContext, getDepositIx, getLendingProgram, getLendingTokenDetails, getLendingTokens, getMintIx, getRedeemIx, getUserPosition, getWithdrawContext, getWithdrawIx };
3014
3017
  export type { ConnectionParams, DepositContextParams, DepositParams, MintParams, RedeemParams, WithdrawContextParams, WithdrawParams };
@@ -2985,6 +2985,9 @@ declare const getLendingProgram: ({ connection, signer, }: {
2985
2985
  }) => Program<Lending>;
2986
2986
  declare const getAccountOwner: (account: PublicKey, connection: Connection) => Promise<PublicKey>;
2987
2987
 
2988
+ declare const getLendingTokens: ({ connection, }: {
2989
+ connection: Connection;
2990
+ }) => Promise<PublicKey[]>;
2988
2991
  declare const getLendingTokenDetails: ({ lendingToken, connection, }: {
2989
2992
  lendingToken: PublicKey;
2990
2993
  connection: Connection;
@@ -3010,5 +3013,5 @@ declare const getUserPosition: ({ user, asset, connection, }: {
3010
3013
  underlyingBalance: BN;
3011
3014
  }>;
3012
3015
 
3013
- export { getAccountOwner, getDepositContext, getDepositIx, getLendingProgram, getLendingTokenDetails, getMintIx, getRedeemIx, getUserPosition, getWithdrawContext, getWithdrawIx };
3016
+ export { getAccountOwner, getDepositContext, getDepositIx, getLendingProgram, getLendingTokenDetails, getLendingTokens, getMintIx, getRedeemIx, getUserPosition, getWithdrawContext, getWithdrawIx };
3014
3017
  export type { ConnectionParams, DepositContextParams, DepositParams, MintParams, RedeemParams, WithdrawContextParams, WithdrawParams };
@@ -476,6 +476,15 @@ async function getLiquidityAssetSupplyRate(asset, connection) {
476
476
  }
477
477
  return supplyRate;
478
478
  }
479
+ const getLendingTokens = async ({
480
+ connection
481
+ }) => {
482
+ const program = getLendingProgram({ connection });
483
+ const lending = await program.account.lending.all();
484
+ const data = lending.map((l) => l.account);
485
+ data.sort((a, b) => a.lendingId - b.lendingId);
486
+ return lending.map((l) => l.account.fTokenMint);
487
+ };
479
488
  const getLendingTokenDetails = async ({
480
489
  lendingToken,
481
490
  connection
@@ -527,4 +536,4 @@ const getUserPosition = async ({
527
536
  };
528
537
  };
529
538
 
530
- export { getAccountOwner, getDepositContext, getDepositIx, getLendingProgram, getLendingTokenDetails, getMintIx, getRedeemIx, getUserPosition, getWithdrawContext, getWithdrawIx };
539
+ export { getAccountOwner, getDepositContext, getDepositIx, getLendingProgram, getLendingTokenDetails, getLendingTokens, getMintIx, getRedeemIx, getUserPosition, getWithdrawContext, getWithdrawIx };
package/dist/index.mjs CHANGED
@@ -8,6 +8,6 @@ import './shared/lend.CioR9-te.mjs';
8
8
  import '@solana/spl-token';
9
9
  import 'bn.js';
10
10
 
11
- const version = "0.0.94";
11
+ const version = "0.0.95";
12
12
 
13
13
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jup-ag/lend",
3
- "version": "0.0.94",
3
+ "version": "0.0.95",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "type": "module",