@t2000/sdk 0.10.3 → 0.10.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/README.md +6 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -97,10 +97,10 @@ const agent = T2000.fromPrivateKey('suiprivkey1q...');
|
|
|
97
97
|
| `agent.address()` | Wallet Sui address | `string` |
|
|
98
98
|
| `agent.balance()` | Available USDC + savings + gas reserve | `BalanceResponse` |
|
|
99
99
|
| `agent.send({ to, amount, asset? })` | Transfer USDC to any Sui address | `SendResult` |
|
|
100
|
-
| `agent.save({ amount, protocol? })` | Deposit
|
|
100
|
+
| `agent.save({ amount, protocol? })` | Deposit to savings (earn APY). Auto-converts non-USDC stables. Auto-selects best rate or specify `protocol`. `amount` can be `'all'`. | `SaveResult` |
|
|
101
101
|
| `agent.withdraw({ amount })` | Withdraw from savings. Always returns USDC (auto-swaps non-USDC positions). `amount` can be `'all'`. | `WithdrawResult` |
|
|
102
102
|
| `agent.borrow({ amount })` | Borrow USDC against collateral | `BorrowResult` |
|
|
103
|
-
| `agent.repay({ amount })` | Repay outstanding USDC
|
|
103
|
+
| `agent.repay({ amount })` | Repay outstanding debt (auto-swaps USDC to borrowed asset if non-USDC). `amount` can be `'all'`. | `RepayResult` |
|
|
104
104
|
| `agent.rebalance({ dryRun?, minYieldDiff?, maxBreakEven? })` | Optimize yield — move savings to best rate across protocols/stablecoins internally. Dry-run for preview. | `RebalanceResult` |
|
|
105
105
|
| `agent.exchange({ from, to, amount, maxSlippage? })` | Exchange tokens via Cetus DEX (e.g. USDC ⇌ SUI). On-chain slippage protection. | `SwapResult` |
|
|
106
106
|
| `agent.exchangeQuote({ from, to, amount })` | Get exchange quote without executing | `{ expectedOutput, priceImpact, poolPrice, fee }` |
|
|
@@ -249,8 +249,10 @@ Options like `pin`, `keyPath`, and `rpcUrl` are passed directly to `T2000.create
|
|
|
249
249
|
|
|
250
250
|
## Supported Assets
|
|
251
251
|
|
|
252
|
-
User-facing
|
|
253
|
-
|
|
252
|
+
User-facing commands are denominated in USDC — the user always thinks in USDC.
|
|
253
|
+
Save auto-converts non-USDC wallet stablecoins, withdraw auto-swaps non-USDC
|
|
254
|
+
positions back to USDC, and repay auto-swaps USDC to the borrowed asset if
|
|
255
|
+
debt is non-USDC (from rebalance). Rebalance optimizes across all stablecoins internally.
|
|
254
256
|
|
|
255
257
|
| Asset | Display | Type | Decimals | Save | Borrow | Withdraw | Rebalance (internal) |
|
|
256
258
|
|-------|---------|------|----------|------|--------|----------|---------------------|
|