fibx 0.5.1 → 0.7.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.
Files changed (206) hide show
  1. package/README.md +73 -2
  2. package/dist/index.js +277 -292
  3. package/dist/index.js.map +1 -1
  4. package/package.json +13 -14
  5. package/dist/commands/auth/import.d.ts +0 -3
  6. package/dist/commands/auth/import.d.ts.map +0 -1
  7. package/dist/commands/auth/import.js +0 -44
  8. package/dist/commands/auth/import.js.map +0 -1
  9. package/dist/commands/auth/login.d.ts +0 -3
  10. package/dist/commands/auth/login.d.ts.map +0 -1
  11. package/dist/commands/auth/login.js +0 -13
  12. package/dist/commands/auth/login.js.map +0 -1
  13. package/dist/commands/auth/logout.d.ts +0 -3
  14. package/dist/commands/auth/logout.d.ts.map +0 -1
  15. package/dist/commands/auth/logout.js +0 -11
  16. package/dist/commands/auth/logout.js.map +0 -1
  17. package/dist/commands/auth/verify.d.ts +0 -3
  18. package/dist/commands/auth/verify.d.ts.map +0 -1
  19. package/dist/commands/auth/verify.js +0 -30
  20. package/dist/commands/auth/verify.js.map +0 -1
  21. package/dist/commands/chain/transaction.d.ts +0 -3
  22. package/dist/commands/chain/transaction.d.ts.map +0 -1
  23. package/dist/commands/chain/transaction.js +0 -31
  24. package/dist/commands/chain/transaction.js.map +0 -1
  25. package/dist/commands/config/index.d.ts +0 -3
  26. package/dist/commands/config/index.d.ts.map +0 -1
  27. package/dist/commands/config/index.js +0 -97
  28. package/dist/commands/config/index.js.map +0 -1
  29. package/dist/commands/defi/aave.d.ts +0 -8
  30. package/dist/commands/defi/aave.d.ts.map +0 -1
  31. package/dist/commands/defi/aave.js +0 -238
  32. package/dist/commands/defi/aave.js.map +0 -1
  33. package/dist/commands/portfolio/index.d.ts +0 -3
  34. package/dist/commands/portfolio/index.d.ts.map +0 -1
  35. package/dist/commands/portfolio/index.js +0 -64
  36. package/dist/commands/portfolio/index.js.map +0 -1
  37. package/dist/commands/trade/status.d.ts +0 -3
  38. package/dist/commands/trade/status.d.ts.map +0 -1
  39. package/dist/commands/trade/status.js +0 -30
  40. package/dist/commands/trade/status.js.map +0 -1
  41. package/dist/commands/trade/swap.d.ts +0 -9
  42. package/dist/commands/trade/swap.d.ts.map +0 -1
  43. package/dist/commands/trade/swap.js +0 -205
  44. package/dist/commands/trade/swap.js.map +0 -1
  45. package/dist/commands/wallet/address.d.ts +0 -3
  46. package/dist/commands/wallet/address.d.ts.map +0 -1
  47. package/dist/commands/wallet/address.js +0 -13
  48. package/dist/commands/wallet/address.js.map +0 -1
  49. package/dist/commands/wallet/balance.d.ts +0 -3
  50. package/dist/commands/wallet/balance.d.ts.map +0 -1
  51. package/dist/commands/wallet/balance.js +0 -73
  52. package/dist/commands/wallet/balance.js.map +0 -1
  53. package/dist/commands/wallet/list.d.ts +0 -3
  54. package/dist/commands/wallet/list.d.ts.map +0 -1
  55. package/dist/commands/wallet/list.js +0 -22
  56. package/dist/commands/wallet/list.js.map +0 -1
  57. package/dist/commands/wallet/send.d.ts +0 -7
  58. package/dist/commands/wallet/send.d.ts.map +0 -1
  59. package/dist/commands/wallet/send.js +0 -115
  60. package/dist/commands/wallet/send.js.map +0 -1
  61. package/dist/index.d.ts +0 -3
  62. package/dist/index.d.ts.map +0 -1
  63. package/dist/lib/brand.d.ts +0 -5
  64. package/dist/lib/brand.d.ts.map +0 -1
  65. package/dist/lib/brand.js +0 -15
  66. package/dist/lib/brand.js.map +0 -1
  67. package/dist/lib/cache.d.ts +0 -3
  68. package/dist/lib/cache.d.ts.map +0 -1
  69. package/dist/lib/cache.js +0 -23
  70. package/dist/lib/cache.js.map +0 -1
  71. package/dist/lib/cli-helpers.d.ts +0 -10
  72. package/dist/lib/cli-helpers.d.ts.map +0 -1
  73. package/dist/lib/cli-helpers.js +0 -20
  74. package/dist/lib/cli-helpers.js.map +0 -1
  75. package/dist/lib/concurrency.d.ts +0 -8
  76. package/dist/lib/concurrency.d.ts.map +0 -1
  77. package/dist/lib/concurrency.js +0 -26
  78. package/dist/lib/concurrency.js.map +0 -1
  79. package/dist/lib/config.d.ts +0 -7
  80. package/dist/lib/config.d.ts.map +0 -1
  81. package/dist/lib/config.js +0 -9
  82. package/dist/lib/config.js.map +0 -1
  83. package/dist/lib/errors.d.ts +0 -28
  84. package/dist/lib/errors.d.ts.map +0 -1
  85. package/dist/lib/errors.js +0 -33
  86. package/dist/lib/errors.js.map +0 -1
  87. package/dist/lib/format.d.ts +0 -31
  88. package/dist/lib/format.d.ts.map +0 -1
  89. package/dist/lib/format.js +0 -169
  90. package/dist/lib/format.js.map +0 -1
  91. package/dist/lib/parse-evm-error.d.ts +0 -6
  92. package/dist/lib/parse-evm-error.d.ts.map +0 -1
  93. package/dist/lib/parse-evm-error.js +0 -48
  94. package/dist/lib/parse-evm-error.js.map +0 -1
  95. package/dist/lib/parseAmount.d.ts +0 -3
  96. package/dist/lib/parseAmount.d.ts.map +0 -1
  97. package/dist/lib/parseAmount.js +0 -9
  98. package/dist/lib/parseAmount.js.map +0 -1
  99. package/dist/lib/retry.d.ts +0 -20
  100. package/dist/lib/retry.d.ts.map +0 -1
  101. package/dist/lib/retry.js +0 -36
  102. package/dist/lib/retry.js.map +0 -1
  103. package/dist/lib/validation.d.ts +0 -6
  104. package/dist/lib/validation.d.ts.map +0 -1
  105. package/dist/lib/validation.js +0 -24
  106. package/dist/lib/validation.js.map +0 -1
  107. package/dist/mcp/handlers.d.ts +0 -87
  108. package/dist/mcp/handlers.d.ts.map +0 -1
  109. package/dist/mcp/handlers.js +0 -394
  110. package/dist/mcp/handlers.js.map +0 -1
  111. package/dist/mcp/server.d.ts +0 -2
  112. package/dist/mcp/server.d.ts.map +0 -1
  113. package/dist/mcp/server.js +0 -21
  114. package/dist/mcp/server.js.map +0 -1
  115. package/dist/mcp/tools.d.ts +0 -3
  116. package/dist/mcp/tools.d.ts.map +0 -1
  117. package/dist/mcp/tools.js +0 -227
  118. package/dist/mcp/tools.js.map +0 -1
  119. package/dist/services/api/client.d.ts +0 -34
  120. package/dist/services/api/client.d.ts.map +0 -1
  121. package/dist/services/api/client.js +0 -68
  122. package/dist/services/api/client.js.map +0 -1
  123. package/dist/services/auth/policy.d.ts +0 -2
  124. package/dist/services/auth/policy.d.ts.map +0 -1
  125. package/dist/services/auth/policy.js +0 -3
  126. package/dist/services/auth/policy.js.map +0 -1
  127. package/dist/services/auth/session.d.ts +0 -20
  128. package/dist/services/auth/session.d.ts.map +0 -1
  129. package/dist/services/auth/session.js +0 -70
  130. package/dist/services/auth/session.js.map +0 -1
  131. package/dist/services/chain/client.d.ts +0 -17493
  132. package/dist/services/chain/client.d.ts.map +0 -1
  133. package/dist/services/chain/client.js +0 -30
  134. package/dist/services/chain/client.js.map +0 -1
  135. package/dist/services/chain/constants.d.ts +0 -163
  136. package/dist/services/chain/constants.d.ts.map +0 -1
  137. package/dist/services/chain/constants.js +0 -118
  138. package/dist/services/chain/constants.js.map +0 -1
  139. package/dist/services/chain/erc20.d.ts +0 -100
  140. package/dist/services/chain/erc20.d.ts.map +0 -1
  141. package/dist/services/chain/erc20.js +0 -117
  142. package/dist/services/chain/erc20.js.map +0 -1
  143. package/dist/services/chain/nonceManager.d.ts +0 -13
  144. package/dist/services/chain/nonceManager.d.ts.map +0 -1
  145. package/dist/services/chain/nonceManager.js +0 -45
  146. package/dist/services/chain/nonceManager.js.map +0 -1
  147. package/dist/services/config/config.d.ts +0 -20
  148. package/dist/services/config/config.d.ts.map +0 -1
  149. package/dist/services/config/config.js +0 -75
  150. package/dist/services/config/config.js.map +0 -1
  151. package/dist/services/defi/aave.d.ts +0 -50
  152. package/dist/services/defi/aave.d.ts.map +0 -1
  153. package/dist/services/defi/aave.js +0 -605
  154. package/dist/services/defi/aave.js.map +0 -1
  155. package/dist/services/defi/abi/aave.d.ts +0 -304
  156. package/dist/services/defi/abi/aave.d.ts.map +0 -1
  157. package/dist/services/defi/abi/aave.js +0 -194
  158. package/dist/services/defi/abi/aave.js.map +0 -1
  159. package/dist/services/defi/constants.d.ts +0 -11
  160. package/dist/services/defi/constants.d.ts.map +0 -1
  161. package/dist/services/defi/constants.js +0 -12
  162. package/dist/services/defi/constants.js.map +0 -1
  163. package/dist/services/fibrous/abi/base.d.ts +0 -768
  164. package/dist/services/fibrous/abi/base.d.ts.map +0 -1
  165. package/dist/services/fibrous/abi/base.js +0 -984
  166. package/dist/services/fibrous/abi/base.js.map +0 -1
  167. package/dist/services/fibrous/abi/citrea.d.ts +0 -773
  168. package/dist/services/fibrous/abi/citrea.d.ts.map +0 -1
  169. package/dist/services/fibrous/abi/citrea.js +0 -990
  170. package/dist/services/fibrous/abi/citrea.js.map +0 -1
  171. package/dist/services/fibrous/abi/hyperevm.d.ts +0 -773
  172. package/dist/services/fibrous/abi/hyperevm.d.ts.map +0 -1
  173. package/dist/services/fibrous/abi/hyperevm.js +0 -990
  174. package/dist/services/fibrous/abi/hyperevm.js.map +0 -1
  175. package/dist/services/fibrous/abi/monad.d.ts +0 -773
  176. package/dist/services/fibrous/abi/monad.d.ts.map +0 -1
  177. package/dist/services/fibrous/abi/monad.js +0 -990
  178. package/dist/services/fibrous/abi/monad.js.map +0 -1
  179. package/dist/services/fibrous/balances.d.ts +0 -15
  180. package/dist/services/fibrous/balances.d.ts.map +0 -1
  181. package/dist/services/fibrous/balances.js +0 -27
  182. package/dist/services/fibrous/balances.js.map +0 -1
  183. package/dist/services/fibrous/health.d.ts +0 -12
  184. package/dist/services/fibrous/health.d.ts.map +0 -1
  185. package/dist/services/fibrous/health.js +0 -16
  186. package/dist/services/fibrous/health.js.map +0 -1
  187. package/dist/services/fibrous/route.d.ts +0 -48
  188. package/dist/services/fibrous/route.d.ts.map +0 -1
  189. package/dist/services/fibrous/route.js +0 -65
  190. package/dist/services/fibrous/route.js.map +0 -1
  191. package/dist/services/fibrous/tokens.d.ts +0 -12
  192. package/dist/services/fibrous/tokens.d.ts.map +0 -1
  193. package/dist/services/fibrous/tokens.js +0 -38
  194. package/dist/services/fibrous/tokens.js.map +0 -1
  195. package/dist/services/portfolio/portfolio.d.ts +0 -28
  196. package/dist/services/portfolio/portfolio.d.ts.map +0 -1
  197. package/dist/services/portfolio/portfolio.js +0 -116
  198. package/dist/services/portfolio/portfolio.js.map +0 -1
  199. package/dist/services/privy/account.d.ts +0 -20
  200. package/dist/services/privy/account.d.ts.map +0 -1
  201. package/dist/services/privy/account.js +0 -60
  202. package/dist/services/privy/account.js.map +0 -1
  203. package/dist/services/privy/client.d.ts +0 -2
  204. package/dist/services/privy/client.d.ts.map +0 -1
  205. package/dist/services/privy/client.js +0 -7
  206. package/dist/services/privy/client.js.map +0 -1
@@ -1,304 +0,0 @@
1
- export declare const POOL_ADDRESSES_PROVIDER_ABI: readonly [{
2
- readonly name: "getPool";
3
- readonly type: "function";
4
- readonly stateMutability: "view";
5
- readonly inputs: readonly [];
6
- readonly outputs: readonly [{
7
- readonly type: "address";
8
- }];
9
- }, {
10
- readonly name: "getPoolDataProvider";
11
- readonly type: "function";
12
- readonly stateMutability: "view";
13
- readonly inputs: readonly [];
14
- readonly outputs: readonly [{
15
- readonly type: "address";
16
- }];
17
- }];
18
- export declare const POOL_DATA_PROVIDER_ABI: readonly [{
19
- readonly name: "getUserReserveData";
20
- readonly type: "function";
21
- readonly stateMutability: "view";
22
- readonly inputs: readonly [{
23
- readonly name: "asset";
24
- readonly type: "address";
25
- }, {
26
- readonly name: "user";
27
- readonly type: "address";
28
- }];
29
- readonly outputs: readonly [{
30
- readonly name: "currentATokenBalance";
31
- readonly type: "uint256";
32
- }, {
33
- readonly name: "currentStableDebt";
34
- readonly type: "uint256";
35
- }, {
36
- readonly name: "currentVariableDebt";
37
- readonly type: "uint256";
38
- }, {
39
- readonly name: "principalStableDebt";
40
- readonly type: "uint256";
41
- }, {
42
- readonly name: "scaledVariableDebt";
43
- readonly type: "uint256";
44
- }, {
45
- readonly name: "stableBorrowRate";
46
- readonly type: "uint256";
47
- }, {
48
- readonly name: "liquidityRate";
49
- readonly type: "uint256";
50
- }, {
51
- readonly name: "stableRateLastUpdated";
52
- readonly type: "uint40";
53
- }, {
54
- readonly name: "usageAsCollateralEnabled";
55
- readonly type: "bool";
56
- }];
57
- }, {
58
- readonly name: "getAllReservesTokens";
59
- readonly type: "function";
60
- readonly stateMutability: "view";
61
- readonly inputs: readonly [];
62
- readonly outputs: readonly [{
63
- readonly type: "tuple[]";
64
- readonly components: readonly [{
65
- readonly name: "symbol";
66
- readonly type: "string";
67
- }, {
68
- readonly name: "tokenAddress";
69
- readonly type: "address";
70
- }];
71
- }];
72
- }, {
73
- readonly name: "getReserveData";
74
- readonly type: "function";
75
- readonly stateMutability: "view";
76
- readonly inputs: readonly [{
77
- readonly name: "asset";
78
- readonly type: "address";
79
- }];
80
- readonly outputs: readonly [{
81
- readonly name: "unbacked";
82
- readonly type: "uint256";
83
- }, {
84
- readonly name: "accruedToTreasuryScaled";
85
- readonly type: "uint256";
86
- }, {
87
- readonly name: "totalAToken";
88
- readonly type: "uint256";
89
- }, {
90
- readonly name: "totalStableDebt";
91
- readonly type: "uint256";
92
- }, {
93
- readonly name: "totalVariableDebt";
94
- readonly type: "uint256";
95
- }, {
96
- readonly name: "liquidityRate";
97
- readonly type: "uint256";
98
- }, {
99
- readonly name: "variableBorrowRate";
100
- readonly type: "uint256";
101
- }, {
102
- readonly name: "stableBorrowRate";
103
- readonly type: "uint256";
104
- }, {
105
- readonly name: "averageStableBorrowRate";
106
- readonly type: "uint256";
107
- }, {
108
- readonly name: "liquidityIndex";
109
- readonly type: "uint256";
110
- }, {
111
- readonly name: "variableBorrowIndex";
112
- readonly type: "uint256";
113
- }, {
114
- readonly name: "lastUpdateTimestamp";
115
- readonly type: "uint40";
116
- }];
117
- }, {
118
- readonly name: "getReserveConfigurationData";
119
- readonly type: "function";
120
- readonly stateMutability: "view";
121
- readonly inputs: readonly [{
122
- readonly name: "asset";
123
- readonly type: "address";
124
- }];
125
- readonly outputs: readonly [{
126
- readonly name: "decimals";
127
- readonly type: "uint256";
128
- }, {
129
- readonly name: "ltv";
130
- readonly type: "uint256";
131
- }, {
132
- readonly name: "liquidationThreshold";
133
- readonly type: "uint256";
134
- }, {
135
- readonly name: "liquidationBonus";
136
- readonly type: "uint256";
137
- }, {
138
- readonly name: "reserveFactor";
139
- readonly type: "uint256";
140
- }, {
141
- readonly name: "usageAsCollateralEnabled";
142
- readonly type: "bool";
143
- }, {
144
- readonly name: "borrowingEnabled";
145
- readonly type: "bool";
146
- }, {
147
- readonly name: "stableBorrowRateEnabled";
148
- readonly type: "bool";
149
- }, {
150
- readonly name: "isActive";
151
- readonly type: "bool";
152
- }, {
153
- readonly name: "isFrozen";
154
- readonly type: "bool";
155
- }];
156
- }];
157
- export declare const POOL_ABI: readonly [{
158
- readonly name: "supply";
159
- readonly type: "function";
160
- readonly stateMutability: "nonpayable";
161
- readonly inputs: readonly [{
162
- readonly name: "asset";
163
- readonly type: "address";
164
- }, {
165
- readonly name: "amount";
166
- readonly type: "uint256";
167
- }, {
168
- readonly name: "onBehalfOf";
169
- readonly type: "address";
170
- }, {
171
- readonly name: "referralCode";
172
- readonly type: "uint16";
173
- }];
174
- readonly outputs: readonly [];
175
- }, {
176
- readonly name: "withdraw";
177
- readonly type: "function";
178
- readonly stateMutability: "nonpayable";
179
- readonly inputs: readonly [{
180
- readonly name: "asset";
181
- readonly type: "address";
182
- }, {
183
- readonly name: "amount";
184
- readonly type: "uint256";
185
- }, {
186
- readonly name: "to";
187
- readonly type: "address";
188
- }];
189
- readonly outputs: readonly [{
190
- readonly type: "uint256";
191
- }];
192
- }, {
193
- readonly name: "borrow";
194
- readonly type: "function";
195
- readonly stateMutability: "nonpayable";
196
- readonly inputs: readonly [{
197
- readonly name: "asset";
198
- readonly type: "address";
199
- }, {
200
- readonly name: "amount";
201
- readonly type: "uint256";
202
- }, {
203
- readonly name: "interestRateMode";
204
- readonly type: "uint256";
205
- }, {
206
- readonly name: "referralCode";
207
- readonly type: "uint16";
208
- }, {
209
- readonly name: "onBehalfOf";
210
- readonly type: "address";
211
- }];
212
- readonly outputs: readonly [];
213
- }, {
214
- readonly name: "repay";
215
- readonly type: "function";
216
- readonly stateMutability: "nonpayable";
217
- readonly inputs: readonly [{
218
- readonly name: "asset";
219
- readonly type: "address";
220
- }, {
221
- readonly name: "amount";
222
- readonly type: "uint256";
223
- }, {
224
- readonly name: "interestRateMode";
225
- readonly type: "uint256";
226
- }, {
227
- readonly name: "onBehalfOf";
228
- readonly type: "address";
229
- }];
230
- readonly outputs: readonly [{
231
- readonly type: "uint256";
232
- }];
233
- }, {
234
- readonly inputs: readonly [{
235
- readonly internalType: "address";
236
- readonly name: "user";
237
- readonly type: "address";
238
- }];
239
- readonly name: "getUserAccountData";
240
- readonly outputs: readonly [{
241
- readonly internalType: "uint256";
242
- readonly name: "totalCollateralBase";
243
- readonly type: "uint256";
244
- }, {
245
- readonly internalType: "uint256";
246
- readonly name: "totalDebtBase";
247
- readonly type: "uint256";
248
- }, {
249
- readonly internalType: "uint256";
250
- readonly name: "availableBorrowsBase";
251
- readonly type: "uint256";
252
- }, {
253
- readonly internalType: "uint256";
254
- readonly name: "currentLiquidationThreshold";
255
- readonly type: "uint256";
256
- }, {
257
- readonly internalType: "uint256";
258
- readonly name: "ltv";
259
- readonly type: "uint256";
260
- }, {
261
- readonly internalType: "uint256";
262
- readonly name: "healthFactor";
263
- readonly type: "uint256";
264
- }];
265
- readonly stateMutability: "view";
266
- readonly type: "function";
267
- }, {
268
- readonly inputs: readonly [];
269
- readonly name: "ValidationLogicError";
270
- readonly type: "error";
271
- }, {
272
- readonly inputs: readonly [];
273
- readonly name: "HealthFactorLowerThanLiquidationThreshold";
274
- readonly type: "error";
275
- }, {
276
- readonly inputs: readonly [];
277
- readonly name: "NoDebtOfSelectedType";
278
- readonly type: "error";
279
- }, {
280
- readonly name: "getReservesList";
281
- readonly type: "function";
282
- readonly stateMutability: "view";
283
- readonly inputs: readonly [];
284
- readonly outputs: readonly [{
285
- readonly type: "address[]";
286
- }];
287
- }];
288
- export declare const WETH_ABI: readonly [{
289
- readonly name: "deposit";
290
- readonly type: "function";
291
- readonly stateMutability: "payable";
292
- readonly inputs: readonly [];
293
- readonly outputs: readonly [];
294
- }, {
295
- readonly name: "withdraw";
296
- readonly type: "function";
297
- readonly stateMutability: "nonpayable";
298
- readonly inputs: readonly [{
299
- readonly name: "wad";
300
- readonly type: "uint256";
301
- }];
302
- readonly outputs: readonly [];
303
- }];
304
- //# sourceMappingURL=aave.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"aave.d.ts","sourceRoot":"","sources":["../../../../src/services/defi/abi/aave.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;EAe9B,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0EzB,CAAC;AAEX,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqFX,CAAC;AAEX,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;EAeX,CAAC"}
@@ -1,194 +0,0 @@
1
- export const POOL_ADDRESSES_PROVIDER_ABI = [
2
- {
3
- name: "getPool",
4
- type: "function",
5
- stateMutability: "view",
6
- inputs: [],
7
- outputs: [{ type: "address" }],
8
- },
9
- {
10
- name: "getPoolDataProvider",
11
- type: "function",
12
- stateMutability: "view",
13
- inputs: [],
14
- outputs: [{ type: "address" }],
15
- },
16
- ];
17
- export const POOL_DATA_PROVIDER_ABI = [
18
- {
19
- name: "getUserReserveData",
20
- type: "function",
21
- stateMutability: "view",
22
- inputs: [
23
- { name: "asset", type: "address" },
24
- { name: "user", type: "address" },
25
- ],
26
- outputs: [
27
- { name: "currentATokenBalance", type: "uint256" },
28
- { name: "currentStableDebt", type: "uint256" },
29
- { name: "currentVariableDebt", type: "uint256" },
30
- { name: "principalStableDebt", type: "uint256" },
31
- { name: "scaledVariableDebt", type: "uint256" },
32
- { name: "stableBorrowRate", type: "uint256" },
33
- { name: "liquidityRate", type: "uint256" },
34
- { name: "stableRateLastUpdated", type: "uint40" },
35
- { name: "usageAsCollateralEnabled", type: "bool" },
36
- ],
37
- },
38
- {
39
- name: "getAllReservesTokens",
40
- type: "function",
41
- stateMutability: "view",
42
- inputs: [],
43
- outputs: [
44
- {
45
- type: "tuple[]",
46
- components: [
47
- { name: "symbol", type: "string" },
48
- { name: "tokenAddress", type: "address" },
49
- ],
50
- },
51
- ],
52
- },
53
- {
54
- name: "getReserveData",
55
- type: "function",
56
- stateMutability: "view",
57
- inputs: [{ name: "asset", type: "address" }],
58
- outputs: [
59
- { name: "unbacked", type: "uint256" },
60
- { name: "accruedToTreasuryScaled", type: "uint256" },
61
- { name: "totalAToken", type: "uint256" },
62
- { name: "totalStableDebt", type: "uint256" },
63
- { name: "totalVariableDebt", type: "uint256" },
64
- { name: "liquidityRate", type: "uint256" },
65
- { name: "variableBorrowRate", type: "uint256" },
66
- { name: "stableBorrowRate", type: "uint256" },
67
- { name: "averageStableBorrowRate", type: "uint256" },
68
- { name: "liquidityIndex", type: "uint256" },
69
- { name: "variableBorrowIndex", type: "uint256" },
70
- { name: "lastUpdateTimestamp", type: "uint40" },
71
- ],
72
- },
73
- {
74
- name: "getReserveConfigurationData",
75
- type: "function",
76
- stateMutability: "view",
77
- inputs: [{ name: "asset", type: "address" }],
78
- outputs: [
79
- { name: "decimals", type: "uint256" },
80
- { name: "ltv", type: "uint256" },
81
- { name: "liquidationThreshold", type: "uint256" },
82
- { name: "liquidationBonus", type: "uint256" },
83
- { name: "reserveFactor", type: "uint256" },
84
- { name: "usageAsCollateralEnabled", type: "bool" },
85
- { name: "borrowingEnabled", type: "bool" },
86
- { name: "stableBorrowRateEnabled", type: "bool" },
87
- { name: "isActive", type: "bool" },
88
- { name: "isFrozen", type: "bool" },
89
- ],
90
- },
91
- ];
92
- export const POOL_ABI = [
93
- {
94
- name: "supply",
95
- type: "function",
96
- stateMutability: "nonpayable",
97
- inputs: [
98
- { name: "asset", type: "address" },
99
- { name: "amount", type: "uint256" },
100
- { name: "onBehalfOf", type: "address" },
101
- { name: "referralCode", type: "uint16" },
102
- ],
103
- outputs: [],
104
- },
105
- {
106
- name: "withdraw",
107
- type: "function",
108
- stateMutability: "nonpayable",
109
- inputs: [
110
- { name: "asset", type: "address" },
111
- { name: "amount", type: "uint256" },
112
- { name: "to", type: "address" },
113
- ],
114
- outputs: [{ type: "uint256" }],
115
- },
116
- {
117
- name: "borrow",
118
- type: "function",
119
- stateMutability: "nonpayable",
120
- inputs: [
121
- { name: "asset", type: "address" },
122
- { name: "amount", type: "uint256" },
123
- { name: "interestRateMode", type: "uint256" }, // 2 = Variable
124
- { name: "referralCode", type: "uint16" },
125
- { name: "onBehalfOf", type: "address" },
126
- ],
127
- outputs: [],
128
- },
129
- {
130
- name: "repay",
131
- type: "function",
132
- stateMutability: "nonpayable",
133
- inputs: [
134
- { name: "asset", type: "address" },
135
- { name: "amount", type: "uint256" },
136
- { name: "interestRateMode", type: "uint256" }, // 2 = Variable
137
- { name: "onBehalfOf", type: "address" },
138
- ],
139
- outputs: [{ type: "uint256" }],
140
- },
141
- {
142
- inputs: [{ internalType: "address", name: "user", type: "address" }],
143
- name: "getUserAccountData",
144
- outputs: [
145
- { internalType: "uint256", name: "totalCollateralBase", type: "uint256" },
146
- { internalType: "uint256", name: "totalDebtBase", type: "uint256" },
147
- { internalType: "uint256", name: "availableBorrowsBase", type: "uint256" },
148
- { internalType: "uint256", name: "currentLiquidationThreshold", type: "uint256" },
149
- { internalType: "uint256", name: "ltv", type: "uint256" },
150
- { internalType: "uint256", name: "healthFactor", type: "uint256" },
151
- ],
152
- stateMutability: "view",
153
- type: "function",
154
- },
155
- {
156
- inputs: [],
157
- name: "ValidationLogicError",
158
- type: "error",
159
- },
160
- {
161
- inputs: [],
162
- name: "HealthFactorLowerThanLiquidationThreshold",
163
- type: "error",
164
- },
165
- {
166
- inputs: [],
167
- name: "NoDebtOfSelectedType",
168
- type: "error",
169
- },
170
- {
171
- name: "getReservesList",
172
- type: "function",
173
- stateMutability: "view",
174
- inputs: [],
175
- outputs: [{ type: "address[]" }],
176
- },
177
- ];
178
- export const WETH_ABI = [
179
- {
180
- name: "deposit",
181
- type: "function",
182
- stateMutability: "payable",
183
- inputs: [],
184
- outputs: [],
185
- },
186
- {
187
- name: "withdraw",
188
- type: "function",
189
- stateMutability: "nonpayable",
190
- inputs: [{ name: "wad", type: "uint256" }],
191
- outputs: [],
192
- },
193
- ];
194
- //# sourceMappingURL=aave.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"aave.js","sourceRoot":"","sources":["../../../../src/services/defi/abi/aave.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2BAA2B,GAAG;IAC1C;QACC,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;KAC9B;IACD;QACC,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;KAC9B;CACQ,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC;QACC,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE;YACP,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;YAClC,EAAE,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AS,EAAE;YACzD,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE;SAClE;QACD,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KAChB;IACD;QACC,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,sBAAsB;QAC5B,IAAI,EAAE,OAAO;KACb;IACD;QACC,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,2CAA2C;QACjD,IAAI,EAAE,OAAO;KACb;IACD;QACC,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,sBAAsB;QAC5B,IAAI,EAAE,OAAO;KACb;IACD;QACC,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;KAChC;CACQ,CAAC;AAEX,MAAM,CAAC,MAAM,QAAQ,GAAG;IACvB;QACC,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,SAAS;QAC1B,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,EAAE;KACX;IACD;QACC,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,YAAY;QAC7B,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAC1C,OAAO,EAAE,EAAE;KACX;CACQ,CAAC"}
@@ -1,11 +0,0 @@
1
- import type { Address } from "viem";
2
- export declare const AAVE_V3_POOL_ADDRESSES_PROVIDER: Address;
3
- export declare const AAVE_V3_POOL_DATA_PROVIDER: Address;
4
- export declare const HEALTH_FACTOR_WARNING_THRESHOLD = 1.5;
5
- export declare const HEALTH_FACTOR_CRITICAL_THRESHOLD = 1.1;
6
- export declare enum InterestRateMode {
7
- None = 0,
8
- Stable = 1,
9
- Variable = 2
10
- }
11
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/services/defi/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAGpC,eAAO,MAAM,+BAA+B,EACK,OAAO,CAAC;AAEzD,eAAO,MAAM,0BAA0B,EAAmD,OAAO,CAAC;AAElG,eAAO,MAAM,+BAA+B,MAAM,CAAC;AACnD,eAAO,MAAM,gCAAgC,MAAM,CAAC;AAEpD,oBAAY,gBAAgB;IAC3B,IAAI,IAAI;IACR,MAAM,IAAI;IACV,QAAQ,IAAI;CACZ"}
@@ -1,12 +0,0 @@
1
- // https://docs.aave.com/developers/deployed-contracts/v3-mainnet/base
2
- export const AAVE_V3_POOL_ADDRESSES_PROVIDER = "0xe20fCBdBfFC4Dd138cE8b2E6FBb6CB49777ad64D";
3
- export const AAVE_V3_POOL_DATA_PROVIDER = "0x0F43731EB8d45A581f4a36DD74F5f358bc90C73A";
4
- export const HEALTH_FACTOR_WARNING_THRESHOLD = 1.5;
5
- export const HEALTH_FACTOR_CRITICAL_THRESHOLD = 1.1;
6
- export var InterestRateMode;
7
- (function (InterestRateMode) {
8
- InterestRateMode[InterestRateMode["None"] = 0] = "None";
9
- InterestRateMode[InterestRateMode["Stable"] = 1] = "Stable";
10
- InterestRateMode[InterestRateMode["Variable"] = 2] = "Variable";
11
- })(InterestRateMode || (InterestRateMode = {}));
12
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/services/defi/constants.ts"],"names":[],"mappings":"AAEA,sEAAsE;AACtE,MAAM,CAAC,MAAM,+BAA+B,GAC3C,4CAAuD,CAAC;AAEzD,MAAM,CAAC,MAAM,0BAA0B,GAAG,4CAAuD,CAAC;AAElG,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,CAAC;AACnD,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,CAAC;AAEpD,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC3B,uDAAQ,CAAA;IACR,2DAAU,CAAA;IACV,+DAAY,CAAA;AACb,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B"}