@t2000/sdk 0.11.1 → 0.11.2
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.d.cts +1 -1
- package/dist/adapters/index.d.ts +1 -1
- package/dist/{index-UOQejD-B.d.cts → index-BwHcYli9.d.cts} +1 -0
- package/dist/{index-UOQejD-B.d.ts → index-BwHcYli9.d.ts} +1 -0
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AdapterCapability, l as AdapterPositions, m as AdapterTxResult, C as CetusAdapter, p as HealthInfo, L as LendingAdapter, h as LendingRates, N as NaviAdapter, r as ProtocolDescriptor, s as ProtocolRegistry, v as SuilendAdapter, b as SwapAdapter, w as SwapQuote, x as allDescriptors, y as cetusDescriptor, J as naviDescriptor, Q as sentinelDescriptor, X as suilendDescriptor } from '../index-
|
|
1
|
+
export { A as AdapterCapability, l as AdapterPositions, m as AdapterTxResult, C as CetusAdapter, p as HealthInfo, L as LendingAdapter, h as LendingRates, N as NaviAdapter, r as ProtocolDescriptor, s as ProtocolRegistry, v as SuilendAdapter, b as SwapAdapter, w as SwapQuote, x as allDescriptors, y as cetusDescriptor, J as naviDescriptor, Q as sentinelDescriptor, X as suilendDescriptor } from '../index-BwHcYli9.cjs';
|
|
2
2
|
import '@mysten/sui/transactions';
|
|
3
3
|
import '@mysten/sui/jsonRpc';
|
|
4
4
|
import '@mysten/sui/keypairs/ed25519';
|
package/dist/adapters/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AdapterCapability, l as AdapterPositions, m as AdapterTxResult, C as CetusAdapter, p as HealthInfo, L as LendingAdapter, h as LendingRates, N as NaviAdapter, r as ProtocolDescriptor, s as ProtocolRegistry, v as SuilendAdapter, b as SwapAdapter, w as SwapQuote, x as allDescriptors, y as cetusDescriptor, J as naviDescriptor, Q as sentinelDescriptor, X as suilendDescriptor } from '../index-
|
|
1
|
+
export { A as AdapterCapability, l as AdapterPositions, m as AdapterTxResult, C as CetusAdapter, p as HealthInfo, L as LendingAdapter, h as LendingRates, N as NaviAdapter, r as ProtocolDescriptor, s as ProtocolRegistry, v as SuilendAdapter, b as SwapAdapter, w as SwapQuote, x as allDescriptors, y as cetusDescriptor, J as naviDescriptor, Q as sentinelDescriptor, X as suilendDescriptor } from '../index-BwHcYli9.js';
|
|
2
2
|
import '@mysten/sui/transactions';
|
|
3
3
|
import '@mysten/sui/jsonRpc';
|
|
4
4
|
import '@mysten/sui/keypairs/ed25519';
|
package/dist/index.cjs
CHANGED
|
@@ -405,6 +405,7 @@ async function queryBalance(client, address) {
|
|
|
405
405
|
return {
|
|
406
406
|
available: totalStables,
|
|
407
407
|
savings,
|
|
408
|
+
debt: 0,
|
|
408
409
|
gasReserve: {
|
|
409
410
|
sui: suiAmount,
|
|
410
411
|
usdEquiv
|
|
@@ -2819,8 +2820,10 @@ var T2000 = class _T2000 extends eventemitter3.EventEmitter {
|
|
|
2819
2820
|
try {
|
|
2820
2821
|
const positions = await this.positions();
|
|
2821
2822
|
const savings = positions.positions.filter((p) => p.type === "save").reduce((sum, p) => sum + p.amount, 0);
|
|
2823
|
+
const debt = positions.positions.filter((p) => p.type === "borrow").reduce((sum, p) => sum + p.amount, 0);
|
|
2822
2824
|
bal.savings = savings;
|
|
2823
|
-
bal.
|
|
2825
|
+
bal.debt = debt;
|
|
2826
|
+
bal.total = bal.available + savings - debt + bal.gasReserve.usdEquiv;
|
|
2824
2827
|
} catch {
|
|
2825
2828
|
}
|
|
2826
2829
|
return bal;
|