@t2000/sdk 0.16.29 → 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/dist/index.cjs CHANGED
@@ -70,6 +70,12 @@ var SUPPORTED_ASSETS = {
70
70
  decimals: 8,
71
71
  symbol: "ETH",
72
72
  displayName: "Ethereum"
73
+ },
74
+ GOLD: {
75
+ type: "0x9d297676e7a4b771ab023291377b2adfaa4938fb9080b8d12430e4b108b836a9::xaum::XAUM",
76
+ decimals: 9,
77
+ symbol: "GOLD",
78
+ displayName: "Gold"
73
79
  }
74
80
  };
75
81
  var STABLE_ASSETS = ["USDC", "USDT", "USDe", "USDsui"];
@@ -85,7 +91,8 @@ var CETUS_PACKAGE = "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35
85
91
  var INVESTMENT_ASSETS = {
86
92
  SUI: SUPPORTED_ASSETS.SUI,
87
93
  BTC: SUPPORTED_ASSETS.BTC,
88
- ETH: SUPPORTED_ASSETS.ETH
94
+ ETH: SUPPORTED_ASSETS.ETH,
95
+ GOLD: SUPPORTED_ASSETS.GOLD
89
96
  };
90
97
  var DEFAULT_STRATEGIES = {
91
98
  bluechip: {
@@ -105,6 +112,18 @@ var DEFAULT_STRATEGIES = {
105
112
  allocations: { BTC: 20, ETH: 20, SUI: 60 },
106
113
  description: "Sui-weighted portfolio",
107
114
  custom: false
115
+ },
116
+ "all-weather": {
117
+ name: "All-Weather Portfolio",
118
+ allocations: { BTC: 30, ETH: 20, SUI: 20, GOLD: 30 },
119
+ description: "Crypto and commodities",
120
+ custom: false
121
+ },
122
+ "safe-haven": {
123
+ name: "Safe Haven",
124
+ allocations: { BTC: 50, GOLD: 50 },
125
+ description: "Store-of-value assets",
126
+ custom: false
108
127
  }
109
128
  };
110
129
  var PERPS_MARKETS = ["SUI-PERP"];
@@ -351,6 +370,7 @@ function formatSui(amount) {
351
370
  }
352
371
  function formatAssetAmount(amount, asset) {
353
372
  if (asset === "BTC") return amount.toFixed(8);
373
+ if (asset === "GOLD") return amount.toFixed(6);
354
374
  if (asset === "ETH") return amount.toFixed(6);
355
375
  return amount.toFixed(4);
356
376
  }
@@ -1075,7 +1095,7 @@ async function getHealthFactor(client, addressOrKeypair) {
1075
1095
  liquidationThreshold: liqThreshold
1076
1096
  };
1077
1097
  }
1078
- var NAVI_SUPPORTED_ASSETS = [...STABLE_ASSETS, "SUI", "ETH"];
1098
+ var NAVI_SUPPORTED_ASSETS = [...STABLE_ASSETS, "SUI", "ETH", "GOLD"];
1079
1099
  async function getRates(client) {
1080
1100
  try {
1081
1101
  const pools = await getPools();
@@ -1529,7 +1549,7 @@ var NaviAdapter = class {
1529
1549
  name = "NAVI Protocol";
1530
1550
  version = "1.0.0";
1531
1551
  capabilities = ["save", "withdraw", "borrow", "repay"];
1532
- supportedAssets = [...STABLE_ASSETS, "SUI", "ETH"];
1552
+ supportedAssets = [...STABLE_ASSETS, "SUI", "ETH", "GOLD"];
1533
1553
  supportsSameAssetBorrow = true;
1534
1554
  client;
1535
1555
  async init(client) {
@@ -1936,7 +1956,7 @@ var SuilendAdapter = class {
1936
1956
  name = "Suilend";
1937
1957
  version = "2.0.0";
1938
1958
  capabilities = ["save", "withdraw", "borrow", "repay"];
1939
- supportedAssets = [...STABLE_ASSETS, "SUI", "ETH", "BTC"];
1959
+ supportedAssets = [...STABLE_ASSETS, "SUI", "ETH", "BTC", "GOLD"];
1940
1960
  supportsSameAssetBorrow = false;
1941
1961
  client;
1942
1962
  publishedAt = null;
@@ -5392,6 +5412,7 @@ exports.PERPS_MARKETS = PERPS_MARKETS;
5392
5412
  exports.PortfolioManager = PortfolioManager;
5393
5413
  exports.ProtocolRegistry = ProtocolRegistry;
5394
5414
  exports.SENTINEL = SENTINEL;
5415
+ exports.STABLE_ASSETS = STABLE_ASSETS;
5395
5416
  exports.SUI_DECIMALS = SUI_DECIMALS;
5396
5417
  exports.SUPPORTED_ASSETS = SUPPORTED_ASSETS;
5397
5418
  exports.SafeguardEnforcer = SafeguardEnforcer;