@t2000/sdk 0.13.0 → 0.14.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 +29 -9
- package/dist/adapters/index.cjs +21 -4
- package/dist/adapters/index.cjs.map +1 -1
- package/dist/adapters/index.d.cts +1 -1
- package/dist/adapters/index.d.ts +1 -1
- package/dist/adapters/index.js +21 -4
- package/dist/adapters/index.js.map +1 -1
- package/dist/{index-Dd4EvUGr.d.cts → index-B14ZyQZt.d.cts} +226 -129
- package/dist/{index-Dd4EvUGr.d.ts → index-B14ZyQZt.d.ts} +226 -129
- package/dist/index.cjs +402 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +133 -57
- package/dist/index.d.ts +133 -57
- package/dist/index.js +397 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AdapterCapability,
|
|
1
|
+
export { A as AdapterCapability, n as AdapterPositions, o as AdapterTxResult, C as CetusAdapter, r as HealthInfo, L as LendingAdapter, j as LendingRates, N as NaviAdapter, t as PerpsAdapter, x as ProtocolDescriptor, y as ProtocolRegistry, K as SuilendAdapter, b as SwapAdapter, O as SwapQuote, V as allDescriptors, X as cetusDescriptor, _ as naviDescriptor, a1 as sentinelDescriptor, a4 as suilendDescriptor } from '../index-B14ZyQZt.cjs';
|
|
2
2
|
import '@mysten/sui/transactions';
|
|
3
3
|
import '@mysten/sui/jsonRpc';
|
|
4
4
|
import '@mysten/sui/keypairs/ed25519';
|
package/dist/adapters/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AdapterCapability,
|
|
1
|
+
export { A as AdapterCapability, n as AdapterPositions, o as AdapterTxResult, C as CetusAdapter, r as HealthInfo, L as LendingAdapter, j as LendingRates, N as NaviAdapter, t as PerpsAdapter, x as ProtocolDescriptor, y as ProtocolRegistry, K as SuilendAdapter, b as SwapAdapter, O as SwapQuote, V as allDescriptors, X as cetusDescriptor, _ as naviDescriptor, a1 as sentinelDescriptor, a4 as suilendDescriptor } from '../index-B14ZyQZt.js';
|
|
2
2
|
import '@mysten/sui/transactions';
|
|
3
3
|
import '@mysten/sui/jsonRpc';
|
|
4
4
|
import '@mysten/sui/keypairs/ed25519';
|
package/dist/adapters/index.js
CHANGED
|
@@ -37,6 +37,18 @@ var SUPPORTED_ASSETS = {
|
|
|
37
37
|
decimals: 9,
|
|
38
38
|
symbol: "SUI",
|
|
39
39
|
displayName: "SUI"
|
|
40
|
+
},
|
|
41
|
+
BTC: {
|
|
42
|
+
type: "0xaafb102dd0902f5055cadecd687fb5b71ca82ef0e0285d90afde828ec58ca96b::btc::BTC",
|
|
43
|
+
decimals: 8,
|
|
44
|
+
symbol: "BTC",
|
|
45
|
+
displayName: "Bitcoin"
|
|
46
|
+
},
|
|
47
|
+
ETH: {
|
|
48
|
+
type: "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH",
|
|
49
|
+
decimals: 8,
|
|
50
|
+
symbol: "ETH",
|
|
51
|
+
displayName: "Ethereum"
|
|
40
52
|
}
|
|
41
53
|
};
|
|
42
54
|
var STABLE_ASSETS = ["USDC", "USDT", "USDe", "USDsui"];
|
|
@@ -46,6 +58,11 @@ var T2000_TREASURY_ID = process.env.T2000_TREASURY_ID ?? "0x3bb501b8300125dca590
|
|
|
46
58
|
process.env.T2000_API_URL ?? "https://api.t2000.ai";
|
|
47
59
|
var CETUS_USDC_SUI_POOL = "0x51e883ba7c0b566a26cbc8a94cd33eb0abd418a77cc1e60ad22fd9b1f29cd2ab";
|
|
48
60
|
var CETUS_PACKAGE = "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb";
|
|
61
|
+
var INVESTMENT_ASSETS = {
|
|
62
|
+
SUI: SUPPORTED_ASSETS.SUI,
|
|
63
|
+
BTC: SUPPORTED_ASSETS.BTC,
|
|
64
|
+
ETH: SUPPORTED_ASSETS.ETH
|
|
65
|
+
};
|
|
49
66
|
var SENTINEL = {
|
|
50
67
|
PACKAGE: "0x88b83f36dafcd5f6dcdcf1d2cb5889b03f61264ab3cee9cae35db7aa940a21b7"};
|
|
51
68
|
|
|
@@ -1073,10 +1090,10 @@ var CetusAdapter = class {
|
|
|
1073
1090
|
};
|
|
1074
1091
|
}
|
|
1075
1092
|
getSupportedPairs() {
|
|
1076
|
-
const pairs = [
|
|
1077
|
-
|
|
1078
|
-
{ from: "
|
|
1079
|
-
|
|
1093
|
+
const pairs = [];
|
|
1094
|
+
for (const asset of Object.keys(INVESTMENT_ASSETS)) {
|
|
1095
|
+
pairs.push({ from: "USDC", to: asset }, { from: asset, to: "USDC" });
|
|
1096
|
+
}
|
|
1080
1097
|
for (const a of STABLE_ASSETS) {
|
|
1081
1098
|
for (const b of STABLE_ASSETS) {
|
|
1082
1099
|
if (a !== b) pairs.push({ from: a, to: b });
|