@t2000/sdk 1.24.0 → 1.24.1
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/adapters/index.cjs.map +1 -1
- package/dist/adapters/index.js.map +1 -1
- package/dist/index.cjs +9 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5636,6 +5636,14 @@ async function maxBorrowAmount(client, address) {
|
|
|
5636
5636
|
const maxAmount = Math.max(0, hf.supplied * ltv / MIN_HEALTH_FACTOR - hf.borrowed);
|
|
5637
5637
|
return { maxAmount, healthFactorAfter: MIN_HEALTH_FACTOR, currentHF: hf.healthFactor };
|
|
5638
5638
|
}
|
|
5639
|
+
async function getPendingRewardsByAddress(address, suiRpcUrl) {
|
|
5640
|
+
const { SuiJsonRpcClient: SuiJsonRpcClient2, getJsonRpcFullnodeUrl: getJsonRpcFullnodeUrl2 } = await import('@mysten/sui/jsonRpc');
|
|
5641
|
+
const client = new SuiJsonRpcClient2({
|
|
5642
|
+
url: suiRpcUrl ?? getJsonRpcFullnodeUrl2("mainnet"),
|
|
5643
|
+
network: "mainnet"
|
|
5644
|
+
});
|
|
5645
|
+
return getPendingRewards(client, address);
|
|
5646
|
+
}
|
|
5639
5647
|
async function getPendingRewards(client, address) {
|
|
5640
5648
|
let rewards;
|
|
5641
5649
|
try {
|
|
@@ -8332,6 +8340,7 @@ exports.getDecimals = getDecimals;
|
|
|
8332
8340
|
exports.getDecimalsForCoinType = getDecimalsForCoinType;
|
|
8333
8341
|
exports.getFinancialSummary = getFinancialSummary;
|
|
8334
8342
|
exports.getPendingRewards = getPendingRewards;
|
|
8343
|
+
exports.getPendingRewardsByAddress = getPendingRewardsByAddress;
|
|
8335
8344
|
exports.getRates = getRates;
|
|
8336
8345
|
exports.getSwapQuote = getSwapQuote;
|
|
8337
8346
|
exports.getTier = getTier;
|