@t2000/sdk 0.16.30 → 0.17.0

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
@@ -58,6 +58,7 @@ await agent.withdraw({ amount: 25 });
58
58
  await agent.investBuy({ asset: 'SUI', usdAmount: 100 });
59
59
  await agent.investBuy({ asset: 'BTC', usdAmount: 500 });
60
60
  await agent.investBuy({ asset: 'ETH', usdAmount: 200 });
61
+ await agent.investBuy({ asset: 'GOLD', usdAmount: 100 });
61
62
 
62
63
  // Check portfolio
63
64
  const portfolio = await agent.getPortfolio();
@@ -73,6 +74,7 @@ await agent.investUnearn({ asset: 'SUI' });
73
74
  await agent.investSell({ asset: 'SUI', usdAmount: 'all' });
74
75
 
75
76
  // Buy into a strategy (single atomic PTB)
77
+ // bluechip: BTC 50%, ETH 30%, SUI 20%; all-weather: BTC 30%, ETH 20%, SUI 20%, GOLD 30%; safe-haven: BTC 50%, GOLD 50%
76
78
  await agent.investStrategy({ strategy: 'bluechip', usdAmount: 200 });
77
79
 
78
80
  // Check strategy status
@@ -358,6 +360,7 @@ debt is non-USDC (from rebalance). Rebalance optimizes across all stablecoins in
358
360
  | SUI | SUI | `0x2::sui::SUI` | 9 | — | — | — | — | ✅ |
359
361
  | BTC | Bitcoin | `0xaafb...::btc::BTC` | 8 | — | — | — | — | ✅ |
360
362
  | ETH | Ethereum | `0xd0e8...::eth::ETH` | 8 | — | — | — | — | ✅ |
363
+ | GOLD | Gold (XAUm) | `0x9d29...::xaum::XAUM` | 9 | — | — | — | — | ✅ |
361
364
 
362
365
  ## Error Handling
363
366
 
@@ -420,7 +423,7 @@ Fees are collected by the t2000 protocol treasury on-chain.
420
423
 
421
424
  ## MCP Server
422
425
 
423
- The SDK powers the [`@t2000/mcp`](https://www.npmjs.com/package/@t2000/mcp) server — 21 tools and 6 prompts for Claude Desktop, Cursor, and any MCP-compatible AI platform. Run `t2000 mcp` to start.
426
+ The SDK powers the [`@t2000/mcp`](https://www.npmjs.com/package/@t2000/mcp) server — 21 tools and 12 prompts for Claude Desktop, Cursor, and any MCP-compatible AI platform. Run `t2000 mcp` to start.
424
427
 
425
428
  ## License
426
429
 
@@ -51,6 +51,12 @@ var SUPPORTED_ASSETS = {
51
51
  decimals: 8,
52
52
  symbol: "ETH",
53
53
  displayName: "Ethereum"
54
+ },
55
+ GOLD: {
56
+ type: "0x9d297676e7a4b771ab023291377b2adfaa4938fb9080b8d12430e4b108b836a9::xaum::XAUM",
57
+ decimals: 9,
58
+ symbol: "GOLD",
59
+ displayName: "Gold"
54
60
  }
55
61
  };
56
62
  var STABLE_ASSETS = ["USDC", "USDT", "USDe", "USDsui"];
@@ -63,7 +69,8 @@ var CETUS_PACKAGE = "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35
63
69
  var INVESTMENT_ASSETS = {
64
70
  SUI: SUPPORTED_ASSETS.SUI,
65
71
  BTC: SUPPORTED_ASSETS.BTC,
66
- ETH: SUPPORTED_ASSETS.ETH
72
+ ETH: SUPPORTED_ASSETS.ETH,
73
+ GOLD: SUPPORTED_ASSETS.GOLD
67
74
  };
68
75
  var SENTINEL = {
69
76
  PACKAGE: "0x88b83f36dafcd5f6dcdcf1d2cb5889b03f61264ab3cee9cae35db7aa940a21b7"};
@@ -777,7 +784,7 @@ async function getHealthFactor(client, addressOrKeypair) {
777
784
  liquidationThreshold: liqThreshold
778
785
  };
779
786
  }
780
- var NAVI_SUPPORTED_ASSETS = [...STABLE_ASSETS, "SUI", "ETH"];
787
+ var NAVI_SUPPORTED_ASSETS = [...STABLE_ASSETS, "SUI", "ETH", "GOLD"];
781
788
  async function getRates(client) {
782
789
  try {
783
790
  const pools = await getPools();
@@ -871,7 +878,7 @@ var NaviAdapter = class {
871
878
  name = "NAVI Protocol";
872
879
  version = "1.0.0";
873
880
  capabilities = ["save", "withdraw", "borrow", "repay"];
874
- supportedAssets = [...STABLE_ASSETS, "SUI", "ETH"];
881
+ supportedAssets = [...STABLE_ASSETS, "SUI", "ETH", "GOLD"];
875
882
  supportsSameAssetBorrow = true;
876
883
  client;
877
884
  async init(client) {
@@ -1277,7 +1284,7 @@ var SuilendAdapter = class {
1277
1284
  name = "Suilend";
1278
1285
  version = "2.0.0";
1279
1286
  capabilities = ["save", "withdraw", "borrow", "repay"];
1280
- supportedAssets = [...STABLE_ASSETS, "SUI", "ETH", "BTC"];
1287
+ supportedAssets = [...STABLE_ASSETS, "SUI", "ETH", "BTC", "GOLD"];
1281
1288
  supportsSameAssetBorrow = false;
1282
1289
  client;
1283
1290
  publishedAt = null;