@defisaver/positions-sdk 2.1.12 → 2.1.13-dev-plasma-fluid

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.
@@ -57,7 +57,7 @@ const getSuperOETHApy = () => __awaiter(void 0, void 0, void 0, function* () {
57
57
  const getApyFromDfsApi = (asset_1, ...args_1) => __awaiter(void 0, [asset_1, ...args_1], void 0, function* (asset, network = common_1.NetworkNumber.Eth) {
58
58
  var _a;
59
59
  try {
60
- const res = yield fetch(`http://localhost:8888/api/staking/apy?asset=${asset}&network=${network}`, { signal: AbortSignal.timeout(utils_1.DEFAULT_TIMEOUT) });
60
+ const res = yield fetch(`https://fe.defisaver.com/api/staking/apy?asset=${asset}&network=${network}`, { signal: AbortSignal.timeout(utils_1.DEFAULT_TIMEOUT) });
61
61
  if (!res.ok)
62
62
  throw new Error(`Failed to fetch APY for ${asset}`);
63
63
  const data = yield res.json();
@@ -68,7 +68,7 @@ const getApyFromDfsApi = (asset_1, ...args_1) => __awaiter(void 0, [asset_1, ...
68
68
  return '0';
69
69
  }
70
70
  });
71
- exports.STAKING_ASSETS = ['cbETH', 'wstETH', 'cbETH', 'rETH', 'sDAI', 'weETH', 'sUSDe', 'osETH', 'ezETH', 'ETHx', 'rsETH', 'pufETH', 'wrsETH', 'wsuperOETHb', 'sUSDS', 'tETH', 'PT sUSDe Sep', 'PT USDe Sep', 'PT sUSDe Nov', 'PT USDe Nov', 'PT USDe Jan', 'PT sUSDe Jan', 'wrsETH', 'wstETH'];
71
+ exports.STAKING_ASSETS = ['cbETH', 'wstETH', 'cbETH', 'rETH', 'sDAI', 'weETH', 'sUSDe', 'osETH', 'ezETH', 'ETHx', 'rsETH', 'pufETH', 'wrsETH', 'wsuperOETHb', 'sUSDS', 'tETH', 'PT sUSDe Sep', 'PT USDe Sep', 'PT sUSDe Nov', 'PT USDe Nov', 'PT USDe Jan', 'PT sUSDe Jan', 'wrsETH', 'wstETH', 'syrupUSDT'];
72
72
  exports.getStakingApy = (0, memoizee_1.default)((asset_1, ...args_1) => __awaiter(void 0, [asset_1, ...args_1], void 0, function* (asset, network = common_1.NetworkNumber.Eth) {
73
73
  try {
74
74
  if (asset === 'stETH' || asset === 'wstETH')
@@ -121,6 +121,8 @@ exports.getStakingApy = (0, memoizee_1.default)((asset_1, ...args_1) => __awaite
121
121
  return yield getApyFromDfsApi('PT USDe Jan', network);
122
122
  if (asset === 'PT sUSDe Jan')
123
123
  return yield getApyFromDfsApi('PT sUSDe Jan', network);
124
+ if (asset === 'syrupUSDT')
125
+ return yield getApyFromDfsApi('syrupUSDT');
124
126
  }
125
127
  catch (e) {
126
128
  console.error(`Failed to fetch APY for ${asset}`);
@@ -142,7 +142,30 @@ export declare enum FluidBaseVersions {
142
142
  FLUID_LBTC_USDC_21_BASE = "FLUID_LBTC_USDC_21_BASE",
143
143
  FLUID_LBTC_SUSDS_22_BASE = "FLUID_LBTC_SUSDS_22_BASE"
144
144
  }
145
- export type FluidVersions = FluidArbitrumVersion | FluidBaseVersions | FluidMainnetVersion;
145
+ export declare enum FluidPlasmaVersions {
146
+ FLUID_ETH_USDT_1_PLASMA = "FLUID_ETH_USDT_1_PLASMA",
147
+ FLUID_ETH_USDE_2_PLASMA = "FLUID_ETH_USDE_2_PLASMA",
148
+ FLUID_WEETH_ETH_3_PLASMA = "FLUID_WEETH_ETH_3_PLASMA",
149
+ FLUID_SUSDE_USDT_4_PLASMA = "FLUID_SUSDE_USDT_4_PLASMA",
150
+ FLUID_WEETH_USDT_5_PLASMA = "FLUID_WEETH_USDT_5_PLASMA",
151
+ FLUID_WEETH_USDE_6_PLASMA = "FLUID_WEETH_USDE_6_PLASMA",
152
+ FLUID_XAUT_USDT_7_PLASMA = "FLUID_XAUT_USDT_7_PLASMA",
153
+ FLUID_XAUT_USDE_8_PLASMA = "FLUID_XAUT_USDE_8_PLASMA",
154
+ FLUID_USDE_USDT_9_PLASMA = "FLUID_USDE_USDT_9_PLASMA",
155
+ FLUID_USDAI_USDT_10_PLASMA = "FLUID_USDAI_USDT_10_PLASMA",
156
+ FLUID_WEETH_ETH_ETH_11_PLASMA = "FLUID_WEETH_ETH_ETH_11_PLASMA",
157
+ FLUID_SUSDE_USDT_USDT_12_PLASMA = "FLUID_SUSDE_USDT_USDT_12_PLASMA",
158
+ FLUID_USDE_USDT_USDT_13_PLASMA = "FLUID_USDE_USDT_USDT_13_PLASMA",
159
+ FLUID_USDAI_USDT_USDT_14_PLASMA = "FLUID_USDAI_USDT_USDT_14_PLASMA",
160
+ FLUID_USDT_SYRUPUSDT_USDT_15_PLASMA = "FLUID_USDT_SYRUPUSDT_USDT_15_PLASMA",
161
+ FLUID_XPL_USDT_16_PLASMA = "FLUID_XPL_USDT_16_PLASMA",
162
+ FLUID_XPL_USDE_17_PLASMA = "FLUID_XPL_USDE_17_PLASMA",
163
+ FLUID_WSTUSR_USDT_18_PLASMA = "FLUID_WSTUSR_USDT_18_PLASMA",
164
+ FLUID_WSTUSR_USDT_USDT_19_PLASMA = "FLUID_WSTUSR_USDT_USDT_19_PLASMA",
165
+ FLUID_SYRUPUSDT_USDT_20_PLASMA = "FLUID_SYRUPUSDT_USDT_20_PLASMA",
166
+ FLUID_ETH_WRSETH_ETH_21_PLASMA = "FLUID_ETH_WRSETH_ETH_21_PLASMA"
167
+ }
168
+ export type FluidVersions = FluidArbitrumVersion | FluidBaseVersions | FluidMainnetVersion | FluidPlasmaVersions;
146
169
  export declare enum FluidMainnetDepositToken {
147
170
  ETH = "ETH",
148
171
  wstETH = "wstETH",
@@ -169,10 +192,16 @@ export declare enum FluidBaseDepositToken {
169
192
  sUSDS = "sUSDS",
170
193
  GHO = "GHO"
171
194
  }
195
+ export declare enum FluidPlasmaDepositToken {
196
+ USDe = "USDe",
197
+ USDT = "USDT",
198
+ ETH = "ETH"
199
+ }
172
200
  export type FluidDepositTokenByNetwork = {
173
201
  [NetworkNumber.Eth]: FluidMainnetDepositToken;
174
202
  [NetworkNumber.Arb]: FluidArbitrumDepositToken;
175
203
  [NetworkNumber.Base]: FluidBaseDepositToken;
204
+ [NetworkNumber.Plasma]: FluidPlasmaDepositToken;
176
205
  };
177
206
  export declare enum FluidVaultType {
178
207
  T1 = "T1",
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FluidVaultType = exports.FluidBaseDepositToken = exports.FluidArbitrumDepositToken = exports.FluidMainnetDepositToken = exports.FluidBaseVersions = exports.FluidArbitrumVersion = exports.FluidMainnetVersion = void 0;
3
+ exports.FluidVaultType = exports.FluidPlasmaDepositToken = exports.FluidBaseDepositToken = exports.FluidArbitrumDepositToken = exports.FluidMainnetDepositToken = exports.FluidPlasmaVersions = exports.FluidBaseVersions = exports.FluidArbitrumVersion = exports.FluidMainnetVersion = void 0;
4
4
  const common_1 = require("./common");
5
5
  var FluidMainnetVersion;
6
6
  (function (FluidMainnetVersion) {
@@ -128,6 +128,30 @@ var FluidBaseVersions;
128
128
  FluidBaseVersions["FLUID_LBTC_USDC_21_BASE"] = "FLUID_LBTC_USDC_21_BASE";
129
129
  FluidBaseVersions["FLUID_LBTC_SUSDS_22_BASE"] = "FLUID_LBTC_SUSDS_22_BASE";
130
130
  })(FluidBaseVersions || (exports.FluidBaseVersions = FluidBaseVersions = {}));
131
+ var FluidPlasmaVersions;
132
+ (function (FluidPlasmaVersions) {
133
+ FluidPlasmaVersions["FLUID_ETH_USDT_1_PLASMA"] = "FLUID_ETH_USDT_1_PLASMA";
134
+ FluidPlasmaVersions["FLUID_ETH_USDE_2_PLASMA"] = "FLUID_ETH_USDE_2_PLASMA";
135
+ FluidPlasmaVersions["FLUID_WEETH_ETH_3_PLASMA"] = "FLUID_WEETH_ETH_3_PLASMA";
136
+ FluidPlasmaVersions["FLUID_SUSDE_USDT_4_PLASMA"] = "FLUID_SUSDE_USDT_4_PLASMA";
137
+ FluidPlasmaVersions["FLUID_WEETH_USDT_5_PLASMA"] = "FLUID_WEETH_USDT_5_PLASMA";
138
+ FluidPlasmaVersions["FLUID_WEETH_USDE_6_PLASMA"] = "FLUID_WEETH_USDE_6_PLASMA";
139
+ FluidPlasmaVersions["FLUID_XAUT_USDT_7_PLASMA"] = "FLUID_XAUT_USDT_7_PLASMA";
140
+ FluidPlasmaVersions["FLUID_XAUT_USDE_8_PLASMA"] = "FLUID_XAUT_USDE_8_PLASMA";
141
+ FluidPlasmaVersions["FLUID_USDE_USDT_9_PLASMA"] = "FLUID_USDE_USDT_9_PLASMA";
142
+ FluidPlasmaVersions["FLUID_USDAI_USDT_10_PLASMA"] = "FLUID_USDAI_USDT_10_PLASMA";
143
+ FluidPlasmaVersions["FLUID_WEETH_ETH_ETH_11_PLASMA"] = "FLUID_WEETH_ETH_ETH_11_PLASMA";
144
+ FluidPlasmaVersions["FLUID_SUSDE_USDT_USDT_12_PLASMA"] = "FLUID_SUSDE_USDT_USDT_12_PLASMA";
145
+ FluidPlasmaVersions["FLUID_USDE_USDT_USDT_13_PLASMA"] = "FLUID_USDE_USDT_USDT_13_PLASMA";
146
+ FluidPlasmaVersions["FLUID_USDAI_USDT_USDT_14_PLASMA"] = "FLUID_USDAI_USDT_USDT_14_PLASMA";
147
+ FluidPlasmaVersions["FLUID_USDT_SYRUPUSDT_USDT_15_PLASMA"] = "FLUID_USDT_SYRUPUSDT_USDT_15_PLASMA";
148
+ FluidPlasmaVersions["FLUID_XPL_USDT_16_PLASMA"] = "FLUID_XPL_USDT_16_PLASMA";
149
+ FluidPlasmaVersions["FLUID_XPL_USDE_17_PLASMA"] = "FLUID_XPL_USDE_17_PLASMA";
150
+ FluidPlasmaVersions["FLUID_WSTUSR_USDT_18_PLASMA"] = "FLUID_WSTUSR_USDT_18_PLASMA";
151
+ FluidPlasmaVersions["FLUID_WSTUSR_USDT_USDT_19_PLASMA"] = "FLUID_WSTUSR_USDT_USDT_19_PLASMA";
152
+ FluidPlasmaVersions["FLUID_SYRUPUSDT_USDT_20_PLASMA"] = "FLUID_SYRUPUSDT_USDT_20_PLASMA";
153
+ FluidPlasmaVersions["FLUID_ETH_WRSETH_ETH_21_PLASMA"] = "FLUID_ETH_WRSETH_ETH_21_PLASMA";
154
+ })(FluidPlasmaVersions || (exports.FluidPlasmaVersions = FluidPlasmaVersions = {}));
131
155
  var FluidMainnetDepositToken;
132
156
  (function (FluidMainnetDepositToken) {
133
157
  FluidMainnetDepositToken["ETH"] = "ETH";
@@ -157,6 +181,12 @@ var FluidBaseDepositToken;
157
181
  FluidBaseDepositToken["sUSDS"] = "sUSDS";
158
182
  FluidBaseDepositToken["GHO"] = "GHO";
159
183
  })(FluidBaseDepositToken || (exports.FluidBaseDepositToken = FluidBaseDepositToken = {}));
184
+ var FluidPlasmaDepositToken;
185
+ (function (FluidPlasmaDepositToken) {
186
+ FluidPlasmaDepositToken["USDe"] = "USDe";
187
+ FluidPlasmaDepositToken["USDT"] = "USDT";
188
+ FluidPlasmaDepositToken["ETH"] = "ETH";
189
+ })(FluidPlasmaDepositToken || (exports.FluidPlasmaDepositToken = FluidPlasmaDepositToken = {}));
160
190
  var FluidVaultType;
161
191
  (function (FluidVaultType) {
162
192
  FluidVaultType["T1"] = "T1";
@@ -71006,6 +71006,9 @@ export declare const ETHPriceFeed: {
71006
71006
  readonly "42161": {
71007
71007
  readonly address: "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612";
71008
71008
  };
71009
+ readonly "9745": {
71010
+ readonly address: "0x43A7dd2125266c5c4c26EB86cd61241132426Fe7";
71011
+ };
71009
71012
  };
71010
71013
  };
71011
71014
  export declare const BTCPriceFeed: {
@@ -71415,6 +71418,9 @@ export declare const BTCPriceFeed: {
71415
71418
  readonly "42161": {
71416
71419
  readonly address: "0x6ce185860a4963106506C203335A2910413708e9";
71417
71420
  };
71421
+ readonly "9745": {
71422
+ readonly address: "0x3Bc5434dd1Fc6a1B68625e0269B9818cDd9E21B5";
71423
+ };
71418
71424
  };
71419
71425
  };
71420
71426
  export declare const USDCPriceFeed: {
@@ -75037,6 +75043,9 @@ export declare const DFSFeedRegistry: {
75037
75043
  readonly "42161": {
75038
75044
  readonly address: "0x158E27De8B5E5bC3FA1C6D5b365a291c54f6b0Fd";
75039
75045
  };
75046
+ readonly "9745": {
75047
+ readonly address: "0x2226836ec16FF5974dFD8DF740CD461B42FAffD5";
75048
+ };
75040
75049
  };
75041
75050
  };
75042
75051
  export declare const LlamaLendView: {
@@ -81995,6 +82004,9 @@ export declare const FluidView: {
81995
82004
  readonly "8453": {
81996
82005
  readonly address: "0x6cd4D6af4F292817eA2A2311F099dF26cd015028";
81997
82006
  };
82007
+ readonly "9745": {
82008
+ readonly address: "0x27C0BAe2338cE28097122393faF90375B9395dd1";
82009
+ };
81998
82010
  readonly "42161": {
81999
82011
  readonly address: "0xf9e6d5568887ac8eC6fA33B7eefD2A176A958e71";
82000
82012
  };
@@ -985,7 +985,8 @@ export const ETHPriceFeed = {
985
985
  "1": { "address": "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419" },
986
986
  "10": { "address": "0x13e3Ee699D1909E989722E753853AE30b17e08c5" },
987
987
  "8453": { "address": "0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70" },
988
- "42161": { "address": "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612" }
988
+ "42161": { "address": "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612" },
989
+ "9745": { "address": "0x43A7dd2125266c5c4c26EB86cd61241132426Fe7" },
989
990
  },
990
991
  };
991
992
  export const BTCPriceFeed = {
@@ -994,7 +995,8 @@ export const BTCPriceFeed = {
994
995
  "1": { "address": "0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c" },
995
996
  "10": { "address": "0xD702DD976Fb76Fffc2D3963D037dfDae5b04E593" },
996
997
  "8453": { "address": "0x64c911996D3c6aC71f9b455B1E8E7266BcbD848F" },
997
- "42161": { "address": "0x6ce185860a4963106506C203335A2910413708e9" }
998
+ "42161": { "address": "0x6ce185860a4963106506C203335A2910413708e9" },
999
+ "9745": { "address": "0x3Bc5434dd1Fc6a1B68625e0269B9818cDd9E21B5" }
998
1000
  },
999
1001
  };
1000
1002
  export const USDCPriceFeed = {
@@ -1062,7 +1064,8 @@ export const DFSFeedRegistry = {
1062
1064
  "abi": [{ "inputs": [], "name": "NonContractCall", "type": "error" }, { "inputs": [], "name": "SenderNotAdmin", "type": "error" }, { "inputs": [], "name": "SenderNotOwner", "type": "error" }, { "inputs": [], "name": "adminVault", "outputs": [{ "internalType": "contract AdminVault", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "", "type": "address" }], "name": "aggregators", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "getFeed", "outputs": [{ "internalType": "address", "name": "aggregator", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "kill", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "latestRoundData", "outputs": [{ "internalType": "uint80", "name": "roundId", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "address", "name": "aggregator", "type": "address" }], "name": "setFeed", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address[]", "name": "bases", "type": "address[]" }, { "internalType": "address[]", "name": "quotes", "type": "address[]" }, { "internalType": "address[]", "name": "aggregator", "type": "address[]" }], "name": "setFeeds", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_token", "type": "address" }, { "internalType": "address", "name": "_receiver", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }], "name": "withdrawStuckFunds", "outputs": [], "stateMutability": "nonpayable", "type": "function" }],
1063
1065
  "networks": {
1064
1066
  "8453": { "address": "0x7dFF34190d0307fC234fc7E8C152C9715083eB02" },
1065
- "42161": { "address": "0x158E27De8B5E5bC3FA1C6D5b365a291c54f6b0Fd" }
1067
+ "42161": { "address": "0x158E27De8B5E5bC3FA1C6D5b365a291c54f6b0Fd" },
1068
+ "9745": { "address": "0x2226836ec16FF5974dFD8DF740CD461B42FAffD5" }
1066
1069
  }
1067
1070
  };
1068
1071
  export const LlamaLendView = {
@@ -1122,6 +1125,7 @@ export const FluidView = {
1122
1125
  "networks": {
1123
1126
  "1": { "address": "0xc8df052bD7A8d76a34c09e758Dff3c6298C0115c" },
1124
1127
  "8453": { "address": "0x6cd4D6af4F292817eA2A2311F099dF26cd015028" },
1128
+ "9745": { "address": "0x27C0BAe2338cE28097122393faF90375B9395dd1" },
1125
1129
  "42161": { "address": "0xf9e6d5568887ac8eC6fA33B7eefD2A176A958e71" }
1126
1130
  }
1127
1131
  };