@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.
- package/dist/earn/index.d.mts +4 -1
- package/dist/earn/index.d.ts +4 -1
- package/dist/earn/index.mjs +10 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/earn/index.d.mts
CHANGED
|
@@ -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 };
|
package/dist/earn/index.d.ts
CHANGED
|
@@ -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 };
|
package/dist/earn/index.mjs
CHANGED
|
@@ -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