@t2000/sdk 0.17.3 → 0.17.4
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-BRjfwac2.d.cts → index-BzQsrfrc.d.cts} +1 -1
- package/dist/{index-BRjfwac2.d.ts → index-BzQsrfrc.d.ts} +1 -1
- package/dist/index.cjs +10 -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 +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { w as AdapterCapability, x as AdapterPositions, y as AdapterTxResult, C as CetusAdapter, K as HealthInfo, L as LendingAdapter, s as LendingRates, N as NaviAdapter, O as PerpsAdapter, X as ProtocolDescriptor, Y as ProtocolRegistry, $ as SuilendAdapter, d as SwapAdapter, a0 as SwapQuote, a3 as allDescriptors, a4 as cetusDescriptor, a7 as naviDescriptor, aa as sentinelDescriptor, ad as suilendDescriptor } from '../index-
|
|
1
|
+
export { w as AdapterCapability, x as AdapterPositions, y as AdapterTxResult, C as CetusAdapter, K as HealthInfo, L as LendingAdapter, s as LendingRates, N as NaviAdapter, O as PerpsAdapter, X as ProtocolDescriptor, Y as ProtocolRegistry, $ as SuilendAdapter, d as SwapAdapter, a0 as SwapQuote, a3 as allDescriptors, a4 as cetusDescriptor, a7 as naviDescriptor, aa as sentinelDescriptor, ad as suilendDescriptor } from '../index-BzQsrfrc.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 { w as AdapterCapability, x as AdapterPositions, y as AdapterTxResult, C as CetusAdapter, K as HealthInfo, L as LendingAdapter, s as LendingRates, N as NaviAdapter, O as PerpsAdapter, X as ProtocolDescriptor, Y as ProtocolRegistry, $ as SuilendAdapter, d as SwapAdapter, a0 as SwapQuote, a3 as allDescriptors, a4 as cetusDescriptor, a7 as naviDescriptor, aa as sentinelDescriptor, ad as suilendDescriptor } from '../index-
|
|
1
|
+
export { w as AdapterCapability, x as AdapterPositions, y as AdapterTxResult, C as CetusAdapter, K as HealthInfo, L as LendingAdapter, s as LendingRates, N as NaviAdapter, O as PerpsAdapter, X as ProtocolDescriptor, Y as ProtocolRegistry, $ as SuilendAdapter, d as SwapAdapter, a0 as SwapQuote, a3 as allDescriptors, a4 as cetusDescriptor, a7 as naviDescriptor, aa as sentinelDescriptor, ad as suilendDescriptor } from '../index-BzQsrfrc.js';
|
|
2
2
|
import '@mysten/sui/transactions';
|
|
3
3
|
import '@mysten/sui/jsonRpc';
|
|
4
4
|
import '@mysten/sui/keypairs/ed25519';
|
|
@@ -28,7 +28,7 @@ interface BalanceResponse {
|
|
|
28
28
|
assets: Record<string, number>;
|
|
29
29
|
stables: Record<string, number>;
|
|
30
30
|
}
|
|
31
|
-
type GasMethod = 'self-funded' | 'sponsored' | 'auto-topup';
|
|
31
|
+
type GasMethod = 'self-funded' | 'sponsored' | 'auto-topup' | 'none';
|
|
32
32
|
interface SendResult {
|
|
33
33
|
success: boolean;
|
|
34
34
|
tx: string;
|
|
@@ -28,7 +28,7 @@ interface BalanceResponse {
|
|
|
28
28
|
assets: Record<string, number>;
|
|
29
29
|
stables: Record<string, number>;
|
|
30
30
|
}
|
|
31
|
-
type GasMethod = 'self-funded' | 'sponsored' | 'auto-topup';
|
|
31
|
+
type GasMethod = 'self-funded' | 'sponsored' | 'auto-topup' | 'none';
|
|
32
32
|
interface SendResult {
|
|
33
33
|
success: boolean;
|
|
34
34
|
tx: string;
|
package/dist/index.cjs
CHANGED
|
@@ -4445,7 +4445,16 @@ To sell investment: t2000 invest sell ${params.amount} ${fromAsset}`,
|
|
|
4445
4445
|
const gasReserve = params.asset === "SUI" ? GAS_RESERVE_MIN : 0;
|
|
4446
4446
|
const depositAmount = Math.max(0, walletAmount - gasReserve);
|
|
4447
4447
|
if (pos.earning && depositAmount <= 0) {
|
|
4448
|
-
|
|
4448
|
+
return {
|
|
4449
|
+
success: true,
|
|
4450
|
+
tx: "",
|
|
4451
|
+
asset: params.asset,
|
|
4452
|
+
amount: 0,
|
|
4453
|
+
protocol: pos.earningProtocol ?? "unknown",
|
|
4454
|
+
apy: pos.earningApy ?? 0,
|
|
4455
|
+
gasCost: 0,
|
|
4456
|
+
gasMethod: "none"
|
|
4457
|
+
};
|
|
4449
4458
|
}
|
|
4450
4459
|
if (depositAmount <= 0) {
|
|
4451
4460
|
throw new T2000Error("INSUFFICIENT_BALANCE", `No ${params.asset} available to deposit (wallet: ${walletAmount}, gas reserve: ${gasReserve})`);
|