@defisaver/positions-sdk 1.0.11-fluid-dev2 → 1.0.11-fluid-dev4
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/cjs/fluid/index.js +6 -0
- package/cjs/markets/fluid/index.d.ts +26 -0
- package/cjs/markets/fluid/index.js +363 -94
- package/cjs/types/fluid.d.ts +17 -2
- package/cjs/types/fluid.js +13 -0
- package/esm/fluid/index.js +6 -0
- package/esm/markets/fluid/index.d.ts +26 -0
- package/esm/markets/fluid/index.js +348 -93
- package/esm/types/fluid.d.ts +17 -2
- package/esm/types/fluid.js +13 -0
- package/package.json +1 -1
- package/src/fluid/index.ts +6 -0
- package/src/markets/fluid/index.ts +362 -93
- package/src/types/fluid.ts +15 -0
package/esm/types/fluid.d.ts
CHANGED
|
@@ -74,7 +74,19 @@ export declare enum FluidMainnetVersion {
|
|
|
74
74
|
FLUID_WEETHS_ETH_WSTETH_80 = "FLUID_WEETHS_ETH_WSTETH_80",
|
|
75
75
|
FLUID_SUSDE_USDT_USDT_92 = "FLUID_SUSDE_USDT_USDT_92",
|
|
76
76
|
FLUID_USDE_USDT_USDT_93 = "FLUID_USDE_USDT_USDT_93",
|
|
77
|
-
FLUID_LBTC_CBBTC_WBTC_97 = "FLUID_LBTC_CBBTC_WBTC_97"
|
|
77
|
+
FLUID_LBTC_CBBTC_WBTC_97 = "FLUID_LBTC_CBBTC_WBTC_97",
|
|
78
|
+
FLUID_SUSDE_USDT_USDC_USDT_98 = "FLUID_SUSDE_USDT_USDC_USDT_98",
|
|
79
|
+
FLUID_USDE_USDT_USDC_USDT_99 = "FLUID_USDE_USDT_USDC_USDT_99",
|
|
80
|
+
FLUID_USDC_ETH_100 = "FLUID_USDC_ETH_100",
|
|
81
|
+
FLUID_USDC_WBTC_101 = "FLUID_USDC_WBTC_101",
|
|
82
|
+
FLUID_USDC_CBBTC_102 = "FLUID_USDC_CBBTC_102",
|
|
83
|
+
FLUID_EZETH_WSTETH_103 = "FLUID_EZETH_WSTETH_103",
|
|
84
|
+
FLUID_EZETH_ETH_WSTETH_104 = "FLUID_EZETH_ETH_WSTETH_104",
|
|
85
|
+
FLUID_LBTC_USDC_107 = "FLUID_LBTC_USDC_107",
|
|
86
|
+
FLUID_LBTC_USDT_108 = "FLUID_LBTC_USDT_108",
|
|
87
|
+
FLUID_LBTC_GHO_109 = "FLUID_LBTC_GHO_109",
|
|
88
|
+
FLUID_LBTC_CBBTC_CBBTC_114 = "FLUID_LBTC_CBBTC_CBBTC_114",
|
|
89
|
+
FLUID_WBTC_LBTC_WBTC_115 = "FLUID_WBTC_LBTC_WBTC_115"
|
|
78
90
|
}
|
|
79
91
|
export declare enum FluidArbitrumVersion {
|
|
80
92
|
FLUID_ETH_USDC_1_ARB = "FLUID_ETH_USDC_1_ARB",
|
|
@@ -100,7 +112,8 @@ export declare enum FluidArbitrumVersion {
|
|
|
100
112
|
FLUID_ETH_USDC_USDT_23_ARB = "FLUID_ETH_USDC_USDT_23_ARB",
|
|
101
113
|
FLUID_WSTETH_USDC_USDT_24_ARB = "FLUID_WSTETH_USDC_USDT_24_ARB",
|
|
102
114
|
FLUID_WEETH_USDC_USDT_25_ARB = "FLUID_WEETH_USDC_USDT_25_ARB",
|
|
103
|
-
FLUID_WBTC_USDC_USDT_26_ARB = "FLUID_WBTC_USDC_USDT_26_ARB"
|
|
115
|
+
FLUID_WBTC_USDC_USDT_26_ARB = "FLUID_WBTC_USDC_USDT_26_ARB",
|
|
116
|
+
FLUID_SUSDS_USDC_USDT_30_ARB = "FLUID_SUSDS_USDC_USDT_30_ARB"
|
|
104
117
|
}
|
|
105
118
|
export declare enum FluidBaseVersions {
|
|
106
119
|
FLUID_ETH_USDC_1_BASE = "FLUID_ETH_USDC_1_BASE",
|
|
@@ -219,6 +232,7 @@ export interface InnerFluidMarketData {
|
|
|
219
232
|
liquidationMaxLimit: string;
|
|
220
233
|
collSharePrice?: string;
|
|
221
234
|
maxSupplyShares?: string;
|
|
235
|
+
maxSupplySharesUsd?: string;
|
|
222
236
|
withdrawableUSD?: string;
|
|
223
237
|
totalSupplyToken0?: string;
|
|
224
238
|
totalSupplyToken1?: string;
|
|
@@ -227,6 +241,7 @@ export interface InnerFluidMarketData {
|
|
|
227
241
|
collDexFee?: string;
|
|
228
242
|
debtSharePrice?: string;
|
|
229
243
|
maxBorrowShares?: string;
|
|
244
|
+
maxBorrowSharesUsd?: string;
|
|
230
245
|
borrowableUSD?: string;
|
|
231
246
|
borrowableToken0?: string;
|
|
232
247
|
borrowableToken1?: string;
|
package/esm/types/fluid.js
CHANGED
|
@@ -55,6 +55,18 @@ export var FluidMainnetVersion;
|
|
|
55
55
|
FluidMainnetVersion["FLUID_SUSDE_USDT_USDT_92"] = "FLUID_SUSDE_USDT_USDT_92";
|
|
56
56
|
FluidMainnetVersion["FLUID_USDE_USDT_USDT_93"] = "FLUID_USDE_USDT_USDT_93";
|
|
57
57
|
FluidMainnetVersion["FLUID_LBTC_CBBTC_WBTC_97"] = "FLUID_LBTC_CBBTC_WBTC_97";
|
|
58
|
+
FluidMainnetVersion["FLUID_SUSDE_USDT_USDC_USDT_98"] = "FLUID_SUSDE_USDT_USDC_USDT_98";
|
|
59
|
+
FluidMainnetVersion["FLUID_USDE_USDT_USDC_USDT_99"] = "FLUID_USDE_USDT_USDC_USDT_99";
|
|
60
|
+
FluidMainnetVersion["FLUID_USDC_ETH_100"] = "FLUID_USDC_ETH_100";
|
|
61
|
+
FluidMainnetVersion["FLUID_USDC_WBTC_101"] = "FLUID_USDC_WBTC_101";
|
|
62
|
+
FluidMainnetVersion["FLUID_USDC_CBBTC_102"] = "FLUID_USDC_CBBTC_102";
|
|
63
|
+
FluidMainnetVersion["FLUID_EZETH_WSTETH_103"] = "FLUID_EZETH_WSTETH_103";
|
|
64
|
+
FluidMainnetVersion["FLUID_EZETH_ETH_WSTETH_104"] = "FLUID_EZETH_ETH_WSTETH_104";
|
|
65
|
+
FluidMainnetVersion["FLUID_LBTC_USDC_107"] = "FLUID_LBTC_USDC_107";
|
|
66
|
+
FluidMainnetVersion["FLUID_LBTC_USDT_108"] = "FLUID_LBTC_USDT_108";
|
|
67
|
+
FluidMainnetVersion["FLUID_LBTC_GHO_109"] = "FLUID_LBTC_GHO_109";
|
|
68
|
+
FluidMainnetVersion["FLUID_LBTC_CBBTC_CBBTC_114"] = "FLUID_LBTC_CBBTC_CBBTC_114";
|
|
69
|
+
FluidMainnetVersion["FLUID_WBTC_LBTC_WBTC_115"] = "FLUID_WBTC_LBTC_WBTC_115";
|
|
58
70
|
})(FluidMainnetVersion || (FluidMainnetVersion = {}));
|
|
59
71
|
export var FluidArbitrumVersion;
|
|
60
72
|
(function (FluidArbitrumVersion) {
|
|
@@ -82,6 +94,7 @@ export var FluidArbitrumVersion;
|
|
|
82
94
|
FluidArbitrumVersion["FLUID_WSTETH_USDC_USDT_24_ARB"] = "FLUID_WSTETH_USDC_USDT_24_ARB";
|
|
83
95
|
FluidArbitrumVersion["FLUID_WEETH_USDC_USDT_25_ARB"] = "FLUID_WEETH_USDC_USDT_25_ARB";
|
|
84
96
|
FluidArbitrumVersion["FLUID_WBTC_USDC_USDT_26_ARB"] = "FLUID_WBTC_USDC_USDT_26_ARB";
|
|
97
|
+
FluidArbitrumVersion["FLUID_SUSDS_USDC_USDT_30_ARB"] = "FLUID_SUSDS_USDC_USDT_30_ARB";
|
|
85
98
|
})(FluidArbitrumVersion || (FluidArbitrumVersion = {}));
|
|
86
99
|
export var FluidBaseVersions;
|
|
87
100
|
(function (FluidBaseVersions) {
|
package/package.json
CHANGED
package/src/fluid/index.ts
CHANGED
|
@@ -517,6 +517,7 @@ const parseT3MarketData = async (web3: Web3, data: FluidView.VaultDataStructOutp
|
|
|
517
517
|
const totalBorrowVaultUsd = new Dec(totalBorrowSharesInVault).mul(debtSharePrice).toString();
|
|
518
518
|
|
|
519
519
|
const borrowableUSD = new Dec(borrowableShares).mul(debtSharePrice).toString();
|
|
520
|
+
const maxBorrowSharesUsd = new Dec(maxBorrowShares).mul(debtSharePrice).toString();
|
|
520
521
|
|
|
521
522
|
const marketData = {
|
|
522
523
|
vaultId: +data.vaultId,
|
|
@@ -553,6 +554,7 @@ const parseT3MarketData = async (web3: Web3, data: FluidView.VaultDataStructOutp
|
|
|
553
554
|
borrowable: borrowableShares,
|
|
554
555
|
borrowableDex: new Dec(maxBorrowShares).minus(totalBorrowShares).toString(),
|
|
555
556
|
maxBorrowShares,
|
|
557
|
+
maxBorrowSharesUsd,
|
|
556
558
|
borrowDexFee,
|
|
557
559
|
debtSharePrice,
|
|
558
560
|
};
|
|
@@ -710,11 +712,13 @@ const parseT4MarketData = async (web3: Web3, data: FluidView.VaultDataStructOutp
|
|
|
710
712
|
const totalBorrowSharesInVault = assetAmountInEth(data.totalBorrowVault);
|
|
711
713
|
const debtSharePrice = new Dec(quoteTokensPerShare).mul(prices[quoteToken.address]).toString();
|
|
712
714
|
const totalBorrowVaultUsd = new Dec(totalBorrowSharesInVault).mul(debtSharePrice).toString();
|
|
715
|
+
const maxBorrowSharesUsd = new Dec(maxBorrowShares).mul(debtSharePrice).toString();
|
|
713
716
|
const borrowableUSD = new Dec(borrowableShares).mul(debtSharePrice).toString();
|
|
714
717
|
|
|
715
718
|
const totalSupplySharesInVault = assetAmountInEth(data.totalSupplyVault);
|
|
716
719
|
const collSharePrice = new Dec(oraclePrice).mul(debtSharePrice).toString();
|
|
717
720
|
const totalSupplyVaultUsd = new Dec(totalSupplySharesInVault).mul(collSharePrice).toString();
|
|
721
|
+
const maxSupplySharesUsd = new Dec(maxSupplyShares).mul(collSharePrice).toString();
|
|
718
722
|
const withdrawableUSD = new Dec(withdrawableShares).mul(collSharePrice).toString();
|
|
719
723
|
|
|
720
724
|
const marketData = {
|
|
@@ -750,6 +754,7 @@ const parseT4MarketData = async (web3: Web3, data: FluidView.VaultDataStructOutp
|
|
|
750
754
|
borrowable: borrowableShares,
|
|
751
755
|
borrowableDex: new Dec(maxBorrowShares).minus(totalBorrowShares).toString(),
|
|
752
756
|
maxBorrowShares,
|
|
757
|
+
maxBorrowSharesUsd,
|
|
753
758
|
borrowDexFee,
|
|
754
759
|
totalSupplyToken0,
|
|
755
760
|
totalSupplyToken1,
|
|
@@ -759,6 +764,7 @@ const parseT4MarketData = async (web3: Web3, data: FluidView.VaultDataStructOutp
|
|
|
759
764
|
withdrawable: withdrawableShares,
|
|
760
765
|
widthdrawableDex: new Dec(maxSupplyShares).minus(totalSupplyShares).toString(),
|
|
761
766
|
maxSupplyShares,
|
|
767
|
+
maxSupplySharesUsd,
|
|
762
768
|
collDexFee: supplyDexFee,
|
|
763
769
|
collSharePrice,
|
|
764
770
|
debtSharePrice,
|