@t2000/sdk 0.17.27 → 0.17.28

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.
Files changed (2) hide show
  1. package/README.md +5 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -70,6 +70,10 @@ await agent.investEarn({ asset: 'SUI' });
70
70
  // Stop earning (withdraw from lending, keep in portfolio)
71
71
  await agent.investUnearn({ asset: 'SUI' });
72
72
 
73
+ // Rebalance earning positions to better-rate protocols
74
+ await agent.investRebalance(); // execute
75
+ await agent.investRebalance({ dryRun: true }); // preview only
76
+
73
77
  // Sell position (auto-withdraws if earning first)
74
78
  await agent.investSell({ asset: 'SUI', usdAmount: 'all' });
75
79
 
@@ -197,6 +201,7 @@ const agent = T2000.fromPrivateKey('suiprivkey1q...');
197
201
  | `agent.investSell({ asset, usdAmount \| 'all', maxSlippage? })` | Sell crypto back to USDC (auto-withdraws if earning) | `InvestResult` |
198
202
  | `agent.investEarn({ asset })` | Deposit invested asset into best-rate lending for yield | `InvestEarnResult` |
199
203
  | `agent.investUnearn({ asset })` | Withdraw from lending, keep in portfolio | `InvestUnearnResult` |
204
+ | `agent.investRebalance({ dryRun?, minYieldDiff? })` | Move earning positions to better-rate protocols | `InvestRebalanceResult` |
200
205
  | `agent.getPortfolio()` | Investment positions + P&L (grouped by strategy) | `PortfolioResult` |
201
206
 
202
207
  ### Strategy Methods
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t2000/sdk",
3
- "version": "0.17.27",
3
+ "version": "0.17.28",
4
4
  "description": "TypeScript SDK for AI agent bank accounts on Sui — send, save, borrow, rebalance",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",