@t2000/sdk 0.18.10 → 0.18.11

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 CHANGED
@@ -384,11 +384,26 @@ try {
384
384
 
385
385
  Common error codes: `INSUFFICIENT_BALANCE` · `INVALID_ADDRESS` · `INVALID_AMOUNT` · `HEALTH_FACTOR_TOO_LOW` · `NO_COLLATERAL` · `WALLET_NOT_FOUND` · `WALLET_LOCKED` · `WALLET_EXISTS` · `SIMULATION_FAILED` · `TRANSACTION_FAILED` · `PROTOCOL_PAUSED` · `INSUFFICIENT_GAS` · `SLIPPAGE_EXCEEDED` · `ASSET_NOT_SUPPORTED` · `WITHDRAW_WOULD_LIQUIDATE` · `AUTO_TOPUP_FAILED` · `GAS_STATION_UNAVAILABLE`
386
386
 
387
+ ## Protocol SDKs
388
+
389
+ t2000 uses official protocol SDKs for reliable on-chain data. All position amounts, USD values, and rates come directly from the SDKs — no hand-rolled contract parsing.
390
+
391
+ | Protocol | SDK | Used for |
392
+ |----------|-----|----------|
393
+ | NAVI | `@naviprotocol/lending` | Lending positions, deposits, withdrawals, borrows, rewards |
394
+ | Suilend | `@suilend/sdk` | Lending positions, obligation management, rewards |
395
+ | Cetus | `@cetusprotocol/aggregator-sdk` (V3) | DEX aggregation, token swaps |
396
+
397
+ Each `PositionEntry` includes an `amountUsd` field populated by the SDK, giving accurate USD valuations for all assets including non-stablecoins (ETH, SUI, BTC, GOLD).
398
+
387
399
  ## Testing
388
400
 
389
401
  ```bash
390
- # Run all SDK unit tests (469 tests)
402
+ # Run all SDK unit tests (568 tests)
391
403
  pnpm --filter @t2000/sdk test
404
+
405
+ # Run smoke tests against mainnet RPC (read-only, no transactions)
406
+ SMOKE=1 pnpm --filter @t2000/sdk test -- src/__smoke__
392
407
  ```
393
408
 
394
409
  | Test File | Coverage |
@@ -406,7 +421,7 @@ pnpm --filter @t2000/sdk test
406
421
  | `compliance.test.ts` | Adapter contract compliance (49 checks across all adapters) |
407
422
  | `registry.test.ts` | Best rates, multi-protocol routing, quote aggregation |
408
423
  | `cetus.test.ts` | Cetus swap adapter (metadata, quotes, transaction building) |
409
- | `suilend.test.ts` | Suilend adapter (rates, positions, obligation lifecycle) |
424
+ | `suilend.test.ts` | Suilend adapter (rates, positions, health, SDK mocks) |
410
425
  | `t2000.integration.test.ts` | End-to-end flows (save, withdraw, borrow, repay, rebalance, auto-swap) |
411
426
  | `protocolFee.test.ts` | Protocol fee calculation and collection |
412
427
  | `sentinel.test.ts` | Sentinel attack flow, listing, fee parsing |