@lidofinance/lsv-cli 1.0.0-alpha.62 → 1.0.0-alpha.63

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 (433) hide show
  1. package/LICENSE +1 -1
  2. package/dist/abi/AccessControlConfirmable.d.ts +4 -3
  3. package/dist/abi/AccessControlConfirmable.js +4 -2
  4. package/dist/abi/AccessControlConfirmable.js.map +1 -1
  5. package/dist/abi/Dashboard.d.ts +121 -88
  6. package/dist/abi/Dashboard.js +67 -78
  7. package/dist/abi/Dashboard.js.map +1 -1
  8. package/dist/abi/LazyOracle.d.ts +44 -3
  9. package/dist/abi/LazyOracle.js +57 -3
  10. package/dist/abi/LazyOracle.js.map +1 -1
  11. package/dist/abi/OperatorGrid.d.ts +615 -1
  12. package/dist/abi/OperatorGrid.js +50 -1
  13. package/dist/abi/OperatorGrid.js.map +1 -1
  14. package/dist/abi/PredepositGuarantee.d.ts +33 -34
  15. package/dist/abi/PredepositGuarantee.js +6 -37
  16. package/dist/abi/PredepositGuarantee.js.map +1 -1
  17. package/dist/abi/StakingVault.d.ts +57 -9
  18. package/dist/abi/StakingVault.js +3 -6
  19. package/dist/abi/StakingVault.js.map +1 -1
  20. package/dist/abi/VaultFactory.d.ts +78 -24
  21. package/dist/abi/VaultFactory.js +19 -1
  22. package/dist/abi/VaultFactory.js.map +1 -1
  23. package/dist/abi/VaultHub.d.ts +38 -4
  24. package/dist/abi/VaultHub.js +13 -0
  25. package/dist/abi/VaultHub.js.map +1 -1
  26. package/dist/abi/VaultViewer.d.ts +130 -196
  27. package/dist/abi/VaultViewer.js +169 -257
  28. package/dist/abi/VaultViewer.js.map +1 -1
  29. package/dist/abi/defi-wrapper/Distributor.d.ts +486 -0
  30. package/dist/abi/defi-wrapper/Distributor.js +633 -0
  31. package/dist/abi/defi-wrapper/Distributor.js.map +1 -0
  32. package/dist/abi/defi-wrapper/Factory.d.ts +1184 -0
  33. package/dist/abi/defi-wrapper/Factory.js +932 -0
  34. package/dist/abi/defi-wrapper/Factory.js.map +1 -0
  35. package/dist/abi/defi-wrapper/StvPool.d.ts +1079 -0
  36. package/dist/abi/defi-wrapper/StvPool.js +1410 -0
  37. package/dist/abi/defi-wrapper/StvPool.js.map +1 -0
  38. package/dist/abi/defi-wrapper/StvStETHPool.d.ts +1772 -0
  39. package/dist/abi/defi-wrapper/StvStETHPool.js +2316 -0
  40. package/dist/abi/defi-wrapper/StvStETHPool.js.map +1 -0
  41. package/dist/abi/defi-wrapper/WithdrawalQueue.d.ts +1265 -0
  42. package/dist/abi/defi-wrapper/WithdrawalQueue.js +1647 -0
  43. package/dist/abi/defi-wrapper/WithdrawalQueue.js.map +1 -0
  44. package/dist/abi/defi-wrapper/index.d.ts +5 -0
  45. package/dist/abi/defi-wrapper/index.js +6 -0
  46. package/dist/abi/defi-wrapper/index.js.map +1 -0
  47. package/dist/configs/constants.d.ts +44 -2
  48. package/dist/configs/constants.js +2 -2
  49. package/dist/configs/constants.js.map +1 -1
  50. package/dist/configs/deployed.d.ts +2 -2
  51. package/dist/configs/deployed.js +48 -6
  52. package/dist/configs/deployed.js.map +1 -1
  53. package/dist/configs/utils.d.ts +1 -0
  54. package/dist/configs/utils.js +4 -0
  55. package/dist/configs/utils.js.map +1 -1
  56. package/dist/contracts/dashboard-impl.d.ts +4 -0
  57. package/dist/contracts/dashboard-impl.js +17 -0
  58. package/dist/contracts/dashboard-impl.js.map +1 -0
  59. package/dist/contracts/dashboard.d.ts +2 -2
  60. package/dist/contracts/dashboard.js +3 -2
  61. package/dist/contracts/dashboard.js.map +1 -1
  62. package/dist/contracts/defi-wrapper/distributor.d.ts +4 -0
  63. package/dist/contracts/defi-wrapper/distributor.js +12 -0
  64. package/dist/contracts/defi-wrapper/distributor.js.map +1 -0
  65. package/dist/contracts/defi-wrapper/factory.d.ts +4 -0
  66. package/dist/contracts/defi-wrapper/factory.js +12 -0
  67. package/dist/contracts/defi-wrapper/factory.js.map +1 -0
  68. package/dist/contracts/defi-wrapper/index.d.ts +5 -0
  69. package/dist/contracts/defi-wrapper/index.js +6 -0
  70. package/dist/contracts/defi-wrapper/index.js.map +1 -0
  71. package/dist/contracts/defi-wrapper/stv-pool.d.ts +4 -0
  72. package/dist/contracts/defi-wrapper/stv-pool.js +12 -0
  73. package/dist/contracts/defi-wrapper/stv-pool.js.map +1 -0
  74. package/dist/contracts/defi-wrapper/stv-steth-pool.d.ts +4 -0
  75. package/dist/contracts/defi-wrapper/stv-steth-pool.js +12 -0
  76. package/dist/contracts/defi-wrapper/stv-steth-pool.js.map +1 -0
  77. package/dist/contracts/defi-wrapper/withdrawal-queue.d.ts +4 -0
  78. package/dist/contracts/defi-wrapper/withdrawal-queue.js +12 -0
  79. package/dist/contracts/defi-wrapper/withdrawal-queue.js.map +1 -0
  80. package/dist/contracts/index.d.ts +1 -0
  81. package/dist/contracts/index.js +1 -0
  82. package/dist/contracts/index.js.map +1 -1
  83. package/dist/contracts/lazy-oracle.js +3 -2
  84. package/dist/contracts/lazy-oracle.js.map +1 -1
  85. package/dist/contracts/locator.d.ts +3 -9655
  86. package/dist/contracts/locator.js +4 -3
  87. package/dist/contracts/locator.js.map +1 -1
  88. package/dist/contracts/operator-grid.d.ts +1 -1
  89. package/dist/contracts/operator-grid.js +3 -2
  90. package/dist/contracts/operator-grid.js.map +1 -1
  91. package/dist/contracts/pdg.js +3 -2
  92. package/dist/contracts/pdg.js.map +1 -1
  93. package/dist/contracts/steth.d.ts +54 -54
  94. package/dist/contracts/steth.js +3 -2
  95. package/dist/contracts/steth.js.map +1 -1
  96. package/dist/contracts/vault-factory.d.ts +3 -26297
  97. package/dist/contracts/vault-factory.js +4 -3
  98. package/dist/contracts/vault-factory.js.map +1 -1
  99. package/dist/contracts/vault-hub.js +3 -2
  100. package/dist/contracts/vault-hub.js.map +1 -1
  101. package/dist/contracts/vault-viewer.d.ts +3 -11789
  102. package/dist/contracts/vault-viewer.js +9 -7
  103. package/dist/contracts/vault-viewer.js.map +1 -1
  104. package/dist/contracts/vault.d.ts +2 -2
  105. package/dist/contracts/vault.js +3 -2
  106. package/dist/contracts/vault.js.map +1 -1
  107. package/dist/contracts/wsteth.d.ts +3 -24690
  108. package/dist/contracts/wsteth.js +4 -3
  109. package/dist/contracts/wsteth.js.map +1 -1
  110. package/dist/features/defi-wrapper/create-vault.d.ts +17 -0
  111. package/dist/features/defi-wrapper/create-vault.js +137 -0
  112. package/dist/features/defi-wrapper/create-vault.js.map +1 -0
  113. package/dist/features/defi-wrapper/defi-wrapper-factory.d.ts +112 -0
  114. package/dist/features/defi-wrapper/defi-wrapper-factory.js +228 -0
  115. package/dist/features/defi-wrapper/defi-wrapper-factory.js.map +1 -0
  116. package/dist/features/defi-wrapper/index.d.ts +3 -0
  117. package/dist/features/defi-wrapper/index.js +4 -0
  118. package/dist/features/defi-wrapper/index.js.map +1 -0
  119. package/dist/features/defi-wrapper/pool-info.d.ts +35 -0
  120. package/dist/features/defi-wrapper/pool-info.js +97 -0
  121. package/dist/features/defi-wrapper/pool-info.js.map +1 -0
  122. package/dist/features/deposits/check-bls-deposits.d.ts +2 -1
  123. package/dist/features/deposits/check-bls-deposits.js +11 -2
  124. package/dist/features/deposits/check-bls-deposits.js.map +1 -1
  125. package/dist/features/deposits/make-pdg-proof.d.ts +8 -0
  126. package/dist/features/deposits/make-pdg-proof.js +17 -1
  127. package/dist/features/deposits/make-pdg-proof.js.map +1 -1
  128. package/dist/features/deposits/no-pdg.d.ts +1 -1
  129. package/dist/features/deposits/no-pdg.js +6 -3
  130. package/dist/features/deposits/no-pdg.js.map +1 -1
  131. package/dist/features/dev-tools/impersonate.d.ts +14 -0
  132. package/dist/features/dev-tools/impersonate.js +64 -0
  133. package/dist/features/dev-tools/impersonate.js.map +1 -0
  134. package/dist/features/dev-tools/index.d.ts +1 -0
  135. package/dist/features/dev-tools/index.js +2 -0
  136. package/dist/features/dev-tools/index.js.map +1 -0
  137. package/dist/features/index.d.ts +2 -0
  138. package/dist/features/index.js +2 -0
  139. package/dist/features/index.js.map +1 -1
  140. package/dist/features/mint-burn/allowance.js +1 -1
  141. package/dist/features/mint-burn/allowance.js.map +1 -1
  142. package/dist/features/pdg.d.ts +7 -0
  143. package/dist/features/pdg.js +5 -5
  144. package/dist/features/pdg.js.map +1 -1
  145. package/dist/features/utils/get-boolean.d.ts +1 -0
  146. package/dist/features/utils/get-boolean.js +13 -0
  147. package/dist/features/utils/get-boolean.js.map +1 -0
  148. package/dist/features/utils/index.d.ts +2 -0
  149. package/dist/features/utils/index.js +2 -0
  150. package/dist/features/utils/index.js.map +1 -1
  151. package/dist/features/utils/quarantine.d.ts +2 -0
  152. package/dist/features/utils/quarantine.js +2 -0
  153. package/dist/features/utils/quarantine.js.map +1 -1
  154. package/dist/features/utils/report-fresh.js +17 -1
  155. package/dist/features/utils/report-fresh.js.map +1 -1
  156. package/dist/features/utils/settled-growth.d.ts +1 -0
  157. package/dist/features/utils/settled-growth.js +16 -0
  158. package/dist/features/utils/settled-growth.js.map +1 -0
  159. package/dist/features/vault-factory.d.ts +2 -2
  160. package/dist/features/vault-factory.js +8 -3
  161. package/dist/features/vault-factory.js.map +1 -1
  162. package/dist/features/vault-operations/create-vault.d.ts +4 -2
  163. package/dist/features/vault-operations/create-vault.js +13 -5
  164. package/dist/features/vault-operations/create-vault.js.map +1 -1
  165. package/dist/features/vault-operations/dashboard-by-vault.js +4 -4
  166. package/dist/features/vault-operations/dashboard-by-vault.js.map +1 -1
  167. package/dist/features/vault-operations/vault-info.js +5 -3
  168. package/dist/features/vault-operations/vault-info.js.map +1 -1
  169. package/dist/features/vault-operations/vault-overview.js +13 -13
  170. package/dist/features/vault-operations/vault-overview.js.map +1 -1
  171. package/dist/features/vault-operations/vault-roles.d.ts +2 -1
  172. package/dist/features/vault-operations/vault-roles.js +22 -23
  173. package/dist/features/vault-operations/vault-roles.js.map +1 -1
  174. package/dist/features/vault-operations/vaults-by-role.d.ts +5 -0
  175. package/dist/features/vault-operations/vaults-by-role.js +123 -36
  176. package/dist/features/vault-operations/vaults-by-role.js.map +1 -1
  177. package/dist/features/vault.js +4 -2
  178. package/dist/features/vault.js.map +1 -1
  179. package/dist/index.js +17 -10
  180. package/dist/index.js.map +1 -1
  181. package/dist/programs/account/read.js +1 -1
  182. package/dist/programs/account/read.js.map +1 -1
  183. package/dist/programs/account/write.js +14 -0
  184. package/dist/programs/account/write.js.map +1 -1
  185. package/dist/programs/contracts/dashboard/config.js +4 -4
  186. package/dist/programs/contracts/dashboard/config.js.map +1 -1
  187. package/dist/programs/contracts/dashboard/read.js +9 -9
  188. package/dist/programs/contracts/dashboard/read.js.map +1 -1
  189. package/dist/programs/contracts/dashboard/write.js +118 -46
  190. package/dist/programs/contracts/dashboard/write.js.map +1 -1
  191. package/dist/programs/contracts/hub/config.js +0 -10
  192. package/dist/programs/contracts/hub/config.js.map +1 -1
  193. package/dist/programs/contracts/hub/read.js +63 -2
  194. package/dist/programs/contracts/hub/read.js.map +1 -1
  195. package/dist/programs/contracts/hub/write.js +1 -1
  196. package/dist/programs/contracts/hub/write.js.map +1 -1
  197. package/dist/programs/contracts/lazy-oracle/config.js +33 -0
  198. package/dist/programs/contracts/lazy-oracle/config.js.map +1 -1
  199. package/dist/programs/contracts/operator-grid/write.js +2 -75
  200. package/dist/programs/contracts/operator-grid/write.js.map +1 -1
  201. package/dist/programs/contracts/pdg/read.js +2 -5
  202. package/dist/programs/contracts/pdg/read.js.map +1 -1
  203. package/dist/programs/contracts/pdg/write.js +41 -9
  204. package/dist/programs/contracts/pdg/write.js.map +1 -1
  205. package/dist/programs/contracts/vault/write.js +34 -23
  206. package/dist/programs/contracts/vault/write.js.map +1 -1
  207. package/dist/programs/contracts/vault-factory/config.js +14 -1
  208. package/dist/programs/contracts/vault-factory/config.js.map +1 -1
  209. package/dist/programs/contracts/vault-factory/write.js +25 -15
  210. package/dist/programs/contracts/vault-factory/write.js.map +1 -1
  211. package/dist/programs/contracts/vault-viewer/config.js +102 -59
  212. package/dist/programs/contracts/vault-viewer/config.js.map +1 -1
  213. package/dist/programs/contracts/vault-viewer/read.js +22 -76
  214. package/dist/programs/contracts/vault-viewer/read.js.map +1 -1
  215. package/dist/programs/defi-wrapper/contracts/distributor/config.d.ts +3 -0
  216. package/dist/programs/defi-wrapper/contracts/distributor/config.js +44 -0
  217. package/dist/programs/defi-wrapper/contracts/distributor/config.js.map +1 -0
  218. package/dist/programs/defi-wrapper/contracts/distributor/index.d.ts +3 -0
  219. package/dist/programs/defi-wrapper/contracts/distributor/index.js +4 -0
  220. package/dist/programs/defi-wrapper/contracts/distributor/index.js.map +1 -0
  221. package/dist/programs/defi-wrapper/contracts/distributor/main.d.ts +1 -0
  222. package/dist/programs/defi-wrapper/contracts/distributor/main.js +5 -0
  223. package/dist/programs/defi-wrapper/contracts/distributor/main.js.map +1 -0
  224. package/dist/programs/defi-wrapper/contracts/distributor/read.d.ts +1 -0
  225. package/dist/programs/defi-wrapper/contracts/distributor/read.js +40 -0
  226. package/dist/programs/defi-wrapper/contracts/distributor/read.js.map +1 -0
  227. package/dist/programs/defi-wrapper/contracts/distributor/write.d.ts +1 -0
  228. package/dist/programs/defi-wrapper/contracts/distributor/write.js +70 -0
  229. package/dist/programs/defi-wrapper/contracts/distributor/write.js.map +1 -0
  230. package/dist/programs/defi-wrapper/contracts/factory/config.d.ts +3 -0
  231. package/dist/programs/defi-wrapper/contracts/factory/config.js +2 -0
  232. package/dist/programs/defi-wrapper/contracts/factory/config.js.map +1 -0
  233. package/dist/programs/defi-wrapper/contracts/factory/index.d.ts +3 -0
  234. package/dist/programs/defi-wrapper/contracts/factory/index.js +4 -0
  235. package/dist/programs/defi-wrapper/contracts/factory/index.js.map +1 -0
  236. package/dist/programs/defi-wrapper/contracts/factory/main.d.ts +1 -0
  237. package/dist/programs/defi-wrapper/contracts/factory/main.js +6 -0
  238. package/dist/programs/defi-wrapper/contracts/factory/main.js.map +1 -0
  239. package/dist/programs/defi-wrapper/contracts/factory/read.d.ts +1 -0
  240. package/dist/programs/defi-wrapper/contracts/factory/read.js +50 -0
  241. package/dist/programs/defi-wrapper/contracts/factory/read.js.map +1 -0
  242. package/dist/programs/defi-wrapper/contracts/factory/write.d.ts +1 -0
  243. package/dist/programs/defi-wrapper/contracts/factory/write.js +144 -0
  244. package/dist/programs/defi-wrapper/contracts/factory/write.js.map +1 -0
  245. package/dist/programs/defi-wrapper/contracts/index.d.ts +6 -0
  246. package/dist/programs/defi-wrapper/contracts/index.js +7 -0
  247. package/dist/programs/defi-wrapper/contracts/index.js.map +1 -0
  248. package/dist/programs/defi-wrapper/contracts/main.d.ts +1 -0
  249. package/dist/programs/defi-wrapper/contracts/main.js +6 -0
  250. package/dist/programs/defi-wrapper/contracts/main.js.map +1 -0
  251. package/dist/programs/defi-wrapper/contracts/stv-pool/config.d.ts +3 -0
  252. package/dist/programs/defi-wrapper/contracts/stv-pool/config.js +73 -0
  253. package/dist/programs/defi-wrapper/contracts/stv-pool/config.js.map +1 -0
  254. package/dist/programs/defi-wrapper/contracts/stv-pool/index.d.ts +3 -0
  255. package/dist/programs/defi-wrapper/contracts/stv-pool/index.js +4 -0
  256. package/dist/programs/defi-wrapper/contracts/stv-pool/index.js.map +1 -0
  257. package/dist/programs/defi-wrapper/contracts/stv-pool/main.d.ts +1 -0
  258. package/dist/programs/defi-wrapper/contracts/stv-pool/main.js +6 -0
  259. package/dist/programs/defi-wrapper/contracts/stv-pool/main.js.map +1 -0
  260. package/dist/programs/defi-wrapper/contracts/stv-pool/read.d.ts +1 -0
  261. package/dist/programs/defi-wrapper/contracts/stv-pool/read.js +70 -0
  262. package/dist/programs/defi-wrapper/contracts/stv-pool/read.js.map +1 -0
  263. package/dist/programs/defi-wrapper/contracts/stv-pool/write.d.ts +1 -0
  264. package/dist/programs/defi-wrapper/contracts/stv-pool/write.js +138 -0
  265. package/dist/programs/defi-wrapper/contracts/stv-pool/write.js.map +1 -0
  266. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/config.d.ts +3 -0
  267. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/config.js +120 -0
  268. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/config.js.map +1 -0
  269. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/index.d.ts +3 -0
  270. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/index.js +4 -0
  271. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/index.js.map +1 -0
  272. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/main.d.ts +1 -0
  273. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/main.js +6 -0
  274. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/main.js.map +1 -0
  275. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/read.d.ts +1 -0
  276. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/read.js +70 -0
  277. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/read.js.map +1 -0
  278. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/write.d.ts +1 -0
  279. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/write.js +173 -0
  280. package/dist/programs/defi-wrapper/contracts/stv-steth-pool/write.js.map +1 -0
  281. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/config.d.ts +3 -0
  282. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/config.js +66 -0
  283. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/config.js.map +1 -0
  284. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/index.d.ts +3 -0
  285. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/index.js +4 -0
  286. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/index.js.map +1 -0
  287. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/main.d.ts +1 -0
  288. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/main.js +6 -0
  289. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/main.js.map +1 -0
  290. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/read.d.ts +1 -0
  291. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/read.js +65 -0
  292. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/read.js.map +1 -0
  293. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/write.d.ts +1 -0
  294. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/write.js +171 -0
  295. package/dist/programs/defi-wrapper/contracts/withdrawal-queue/write.js.map +1 -0
  296. package/dist/programs/defi-wrapper/index.d.ts +3 -0
  297. package/dist/programs/defi-wrapper/index.js +4 -0
  298. package/dist/programs/defi-wrapper/index.js.map +1 -0
  299. package/dist/programs/defi-wrapper/main.d.ts +1 -0
  300. package/dist/programs/defi-wrapper/main.js +6 -0
  301. package/dist/programs/defi-wrapper/main.js.map +1 -0
  302. package/dist/programs/defi-wrapper/use-cases/health/index.d.ts +3 -0
  303. package/dist/programs/defi-wrapper/use-cases/health/index.js +4 -0
  304. package/dist/programs/defi-wrapper/use-cases/health/index.js.map +1 -0
  305. package/dist/programs/defi-wrapper/use-cases/health/main.d.ts +1 -0
  306. package/dist/programs/defi-wrapper/use-cases/health/main.js +6 -0
  307. package/dist/programs/defi-wrapper/use-cases/health/main.js.map +1 -0
  308. package/dist/programs/defi-wrapper/use-cases/health/read.d.ts +1 -0
  309. package/dist/programs/defi-wrapper/use-cases/health/read.js +338 -0
  310. package/dist/programs/defi-wrapper/use-cases/health/read.js.map +1 -0
  311. package/dist/programs/defi-wrapper/use-cases/health/utils.d.ts +56 -0
  312. package/dist/programs/defi-wrapper/use-cases/health/utils.js +389 -0
  313. package/dist/programs/defi-wrapper/use-cases/health/utils.js.map +1 -0
  314. package/dist/programs/defi-wrapper/use-cases/health/write.d.ts +1 -0
  315. package/dist/programs/defi-wrapper/use-cases/health/write.js +254 -0
  316. package/dist/programs/defi-wrapper/use-cases/health/write.js.map +1 -0
  317. package/dist/programs/defi-wrapper/use-cases/index.d.ts +3 -0
  318. package/dist/programs/defi-wrapper/use-cases/index.js +4 -0
  319. package/dist/programs/defi-wrapper/use-cases/index.js.map +1 -0
  320. package/dist/programs/defi-wrapper/use-cases/main.d.ts +1 -0
  321. package/dist/programs/defi-wrapper/use-cases/main.js +6 -0
  322. package/dist/programs/defi-wrapper/use-cases/main.js.map +1 -0
  323. package/dist/programs/defi-wrapper/use-cases/wrapper-operations/create-pool.d.ts +1 -0
  324. package/dist/programs/defi-wrapper/use-cases/wrapper-operations/create-pool.js +143 -0
  325. package/dist/programs/defi-wrapper/use-cases/wrapper-operations/create-pool.js.map +1 -0
  326. package/dist/programs/defi-wrapper/use-cases/wrapper-operations/index.d.ts +3 -0
  327. package/dist/programs/defi-wrapper/use-cases/wrapper-operations/index.js +5 -0
  328. package/dist/programs/defi-wrapper/use-cases/wrapper-operations/index.js.map +1 -0
  329. package/dist/programs/defi-wrapper/use-cases/wrapper-operations/main.d.ts +1 -0
  330. package/dist/programs/defi-wrapper/use-cases/wrapper-operations/main.js +6 -0
  331. package/dist/programs/defi-wrapper/use-cases/wrapper-operations/main.js.map +1 -0
  332. package/dist/programs/defi-wrapper/use-cases/wrapper-operations/read.d.ts +1 -0
  333. package/dist/programs/defi-wrapper/use-cases/wrapper-operations/read.js +130 -0
  334. package/dist/programs/defi-wrapper/use-cases/wrapper-operations/read.js.map +1 -0
  335. package/dist/programs/defi-wrapper/use-cases/wrapper-operations/write.d.ts +1 -0
  336. package/dist/programs/defi-wrapper/use-cases/wrapper-operations/write.js +13 -0
  337. package/dist/programs/defi-wrapper/use-cases/wrapper-operations/write.js.map +1 -0
  338. package/dist/programs/dev-tools/anvil/index.d.ts +2 -0
  339. package/dist/programs/dev-tools/anvil/index.js +3 -0
  340. package/dist/programs/dev-tools/anvil/index.js.map +1 -0
  341. package/dist/programs/dev-tools/anvil/main.d.ts +1 -0
  342. package/dist/programs/dev-tools/anvil/main.js +5 -0
  343. package/dist/programs/dev-tools/anvil/main.js.map +1 -0
  344. package/dist/programs/dev-tools/anvil/write.d.ts +1 -0
  345. package/dist/programs/dev-tools/anvil/write.js +122 -0
  346. package/dist/programs/dev-tools/anvil/write.js.map +1 -0
  347. package/dist/programs/dev-tools/defi-wrapper/index.d.ts +2 -0
  348. package/dist/programs/dev-tools/defi-wrapper/index.js +3 -0
  349. package/dist/programs/dev-tools/defi-wrapper/index.js.map +1 -0
  350. package/dist/programs/dev-tools/defi-wrapper/main.d.ts +1 -0
  351. package/dist/programs/dev-tools/defi-wrapper/main.js +6 -0
  352. package/dist/programs/dev-tools/defi-wrapper/main.js.map +1 -0
  353. package/dist/programs/dev-tools/defi-wrapper/write.d.ts +1 -0
  354. package/dist/programs/dev-tools/defi-wrapper/write.js +77 -0
  355. package/dist/programs/dev-tools/defi-wrapper/write.js.map +1 -0
  356. package/dist/programs/dev-tools/index.d.ts +3 -0
  357. package/dist/programs/dev-tools/index.js +4 -0
  358. package/dist/programs/dev-tools/index.js.map +1 -0
  359. package/dist/programs/dev-tools/main.d.ts +1 -0
  360. package/dist/programs/dev-tools/main.js +6 -0
  361. package/dist/programs/dev-tools/main.js.map +1 -0
  362. package/dist/programs/index.d.ts +2 -0
  363. package/dist/programs/index.js +2 -0
  364. package/dist/programs/index.js.map +1 -1
  365. package/dist/programs/pdg-helpers.js +5 -5
  366. package/dist/programs/pdg-helpers.js.map +1 -1
  367. package/dist/programs/use-cases/deposits/read.js +4 -4
  368. package/dist/programs/use-cases/deposits/read.js.map +1 -1
  369. package/dist/programs/use-cases/deposits/write.js +111 -16
  370. package/dist/programs/use-cases/deposits/write.js.map +1 -1
  371. package/dist/programs/use-cases/metrics/read.js +29 -13
  372. package/dist/programs/use-cases/metrics/read.js.map +1 -1
  373. package/dist/programs/use-cases/report/write.js +3 -0
  374. package/dist/programs/use-cases/report/write.js.map +1 -1
  375. package/dist/programs/use-cases/vault-operations/create-vault.js +13 -7
  376. package/dist/programs/use-cases/vault-operations/create-vault.js.map +1 -1
  377. package/dist/programs/use-cases/vault-operations/write.js +5 -0
  378. package/dist/programs/use-cases/vault-operations/write.js.map +1 -1
  379. package/dist/providers/wallet.d.ts +6981 -166
  380. package/dist/providers/wallet.js +15 -5
  381. package/dist/providers/wallet.js.map +1 -1
  382. package/dist/utils/arguments.d.ts +5 -0
  383. package/dist/utils/arguments.js +24 -3
  384. package/dist/utils/arguments.js.map +1 -1
  385. package/dist/utils/bls.d.ts +2 -2
  386. package/dist/utils/bls.js +8 -7
  387. package/dist/utils/bls.js.map +1 -1
  388. package/dist/utils/cache.d.ts +26 -0
  389. package/dist/utils/cache.js +88 -3
  390. package/dist/utils/cache.js.map +1 -1
  391. package/dist/utils/charts/blessed/charts-apr.js +1 -1
  392. package/dist/utils/charts/blessed/charts-apr.js.map +1 -1
  393. package/dist/utils/charts/blessed/charts-rewards.js +1 -1
  394. package/dist/utils/charts/blessed/charts-rewards.js.map +1 -1
  395. package/dist/utils/charts/simple/simple-charts.js +1 -1
  396. package/dist/utils/charts/simple/simple-charts.js.map +1 -1
  397. package/dist/utils/commands/confirmations.d.ts +1 -1
  398. package/dist/utils/commands/confirmations.js +5 -5
  399. package/dist/utils/commands/confirmations.js.map +1 -1
  400. package/dist/utils/fetchCL.d.ts +1 -5
  401. package/dist/utils/fetchCL.js +5 -7
  402. package/dist/utils/fetchCL.js.map +1 -1
  403. package/dist/utils/health/health-utils.d.ts +54 -54
  404. package/dist/utils/health/health-utils.js +1 -1
  405. package/dist/utils/health/health-utils.js.map +1 -1
  406. package/dist/utils/prompts/confirmations.js +1 -1
  407. package/dist/utils/prompts/confirmations.js.map +1 -1
  408. package/dist/utils/proof/constants.d.ts +6 -0
  409. package/dist/utils/proof/constants.js +7 -0
  410. package/dist/utils/proof/constants.js.map +1 -0
  411. package/dist/utils/proof/first-validator-gindex.js +0 -4
  412. package/dist/utils/proof/first-validator-gindex.js.map +1 -1
  413. package/dist/utils/proof/proofs.d.ts +7 -8
  414. package/dist/utils/proof/proofs.js +36 -28
  415. package/dist/utils/proof/proofs.js.map +1 -1
  416. package/dist/utils/read-programs-by-abi.d.ts +1 -1
  417. package/dist/utils/read-programs-by-abi.js +4 -18
  418. package/dist/utils/read-programs-by-abi.js.map +1 -1
  419. package/dist/utils/report/report.js +1 -1
  420. package/dist/utils/report/report.js.map +1 -1
  421. package/dist/utils/report/statistic-data.js +1 -1
  422. package/dist/utils/report/statistic-data.js.map +1 -1
  423. package/dist/utils/transactions/tx-private-key.d.ts +2 -2
  424. package/dist/utils/transactions/tx-private-key.js +6 -6
  425. package/dist/utils/transactions/tx-private-key.js.map +1 -1
  426. package/dist/utils/transactions/tx-wc.d.ts +29 -1
  427. package/dist/utils/transactions/tx-wc.js +43 -26
  428. package/dist/utils/transactions/tx-wc.js.map +1 -1
  429. package/dist/utils/wallet-connect.d.ts +4 -7664
  430. package/dist/utils/wallet-connect.js +17 -5
  431. package/dist/utils/wallet-connect.js.map +1 -1
  432. package/dist/version/index.js +1 -1
  433. package/package.json +5 -6
@@ -0,0 +1,338 @@
1
+ import { formatEther, formatUnits } from 'viem';
2
+ import { health } from './main.js';
3
+ import { getStvStethPoolContract } from '../../../../contracts/defi-wrapper/index.js';
4
+ import { getStethContract } from '../../../../contracts/index.js';
5
+ import { stringToAddress, logTable, logInfo, callReadMethodSilent, stringToNumber, formatBP, } from '../../../../utils/index.js';
6
+ import { getPublicClient } from '../../../../providers/index.js';
7
+ import { isThresholdBreached, calculateEffectiveLTV, calculateThresholdExcess, calculateBalancesFromEvents, } from './utils.js';
8
+ const healthRead = health
9
+ .command('read')
10
+ .aliases(['r'])
11
+ .description('health read commands');
12
+ healthRead
13
+ .command('list-unhealthy')
14
+ .description('list all unhealthy positions in the pool')
15
+ .argument('<address>', 'stv-steth-pool address', stringToAddress)
16
+ .option('--from-block <number>', 'from block number', stringToNumber)
17
+ .option('--to-block <number>', 'to block number (default: latest)', stringToNumber)
18
+ .option('--batch-size <number>', 'max blocks per RPC call (default: 30000)', stringToNumber)
19
+ .option('--verbose', 'show verbose output', false)
20
+ .action(async (address, options) => {
21
+ const poolContract = await getStvStethPoolContract(address);
22
+ const stethContract = await getStethContract();
23
+ logInfo('Fetching pool configuration...');
24
+ // Get pool configuration
25
+ const [forcedRebalanceThresholdBP, name, symbol] = await Promise.all([
26
+ callReadMethodSilent(poolContract, 'forcedRebalanceThresholdBP'),
27
+ callReadMethodSilent(poolContract, 'name'),
28
+ callReadMethodSilent(poolContract, 'symbol'),
29
+ ]);
30
+ logInfo(`Pool: ${name} (${symbol}) at ${address}\nForced Rebalance Threshold: ${formatBP(forcedRebalanceThresholdBP)}\n`);
31
+ // Check health for each account
32
+ const unhealthyPositions = [];
33
+ // Calculate balances from indexed events
34
+ logInfo('📊 Calculating balances from indexed events');
35
+ const balances = await calculateBalancesFromEvents({
36
+ poolAddress: address,
37
+ fromBlock: options.fromBlock,
38
+ toBlock: options.toBlock,
39
+ batchSize: options.batchSize,
40
+ });
41
+ logInfo(`Found ${balances.size} accounts with positions. Checking health...\n`);
42
+ for (const [account, balance] of balances) {
43
+ try {
44
+ const stvBalance = balance.stvBalance;
45
+ const debtShares = balance.debtShares;
46
+ // Still check contract's isHealthy for comparison
47
+ const isHealthy = await callReadMethodSilent(poolContract, 'isHealthyOf', [account]);
48
+ if (options.verbose) {
49
+ logInfo(`Account: ${account}
50
+ stvBalance: ${formatUnits(stvBalance, 27)} STV
51
+ debtShares: ${formatEther(debtShares)} shares
52
+ isHealthy (from contract): ${isHealthy}
53
+ `);
54
+ }
55
+ // Skip accounts with no position
56
+ if (stvBalance === 0n && debtShares === 0n) {
57
+ if (options.verbose) {
58
+ logInfo(` Skipping account ${account} - no position\n`);
59
+ }
60
+ continue;
61
+ }
62
+ // Calculate values in ETH
63
+ const stvInEth = stvBalance > 0n
64
+ ? await callReadMethodSilent(poolContract, 'previewRedeem', [
65
+ stvBalance,
66
+ ])
67
+ : 0n;
68
+ const debtInEth = debtShares > 0n
69
+ ? await callReadMethodSilent(stethContract, 'getPooledEthBySharesRoundUp', [debtShares])
70
+ : 0n;
71
+ if (options.verbose) {
72
+ logInfo(` stvInEth: ${formatEther(stvInEth)} ETH`);
73
+ logInfo(` debtInEth: ${formatEther(debtInEth)} ETH`);
74
+ logInfo(` forcedRebalanceThresholdBP: ${formatBP(forcedRebalanceThresholdBP)}`);
75
+ }
76
+ // Use contract-accurate threshold check
77
+ const thresholdBreached = isThresholdBreached({
78
+ assets: stvInEth,
79
+ stethShares: debtShares,
80
+ debtInEth,
81
+ forcedRebalanceThresholdBP,
82
+ verbose: options.verbose,
83
+ });
84
+ // Calculate display metrics
85
+ const ltvRatio = calculateEffectiveLTV({
86
+ assets: stvInEth,
87
+ debtInEth,
88
+ });
89
+ const thresholdExcess = calculateThresholdExcess({
90
+ assets: stvInEth,
91
+ stethShares: debtShares,
92
+ debtInEth,
93
+ forcedRebalanceThresholdBP,
94
+ verbose: options.verbose,
95
+ });
96
+ if (options.verbose) {
97
+ logInfo(` thresholdBreached (our calc): ${thresholdBreached}
98
+ ltvRatio: ${ltvRatio / 100}%
99
+ thresholdExcess: ${thresholdExcess / 100}%
100
+ `);
101
+ }
102
+ // Sanity check: contract's isHealthy should be inverse of our thresholdBreached
103
+ // isHealthy = true means healthy, thresholdBreached = false means healthy
104
+ if (isHealthy === thresholdBreached) {
105
+ logInfo(` ⚠️ MISMATCH: Contract isHealthy=${isHealthy}, our thresholdBreached=${thresholdBreached}`);
106
+ logInfo(`⚠️ WARNING: Health check mismatch for ${account}! Contract isHealthy=${isHealthy}, but our thresholdBreached=${thresholdBreached}`);
107
+ }
108
+ else {
109
+ if (options.verbose) {
110
+ logInfo(' ✅ Health check matches contract');
111
+ }
112
+ }
113
+ if (!isHealthy && stvBalance > 0n) {
114
+ unhealthyPositions.push({
115
+ account,
116
+ stvBalance,
117
+ stvInEth,
118
+ debtShares,
119
+ debtInEth,
120
+ ltvRatio,
121
+ isHealthy,
122
+ thresholdExcess,
123
+ });
124
+ }
125
+ }
126
+ catch (error) {
127
+ logInfo(`Error checking account ${account}: ${error}`);
128
+ }
129
+ }
130
+ // Sort by threshold excess descending (most critical first)
131
+ unhealthyPositions.sort((a, b) => b.thresholdExcess - a.thresholdExcess);
132
+ if (unhealthyPositions.length === 0) {
133
+ logInfo('✅ No unhealthy positions found!');
134
+ return;
135
+ }
136
+ logInfo('⚠️ Unhealthy Positions Report\n');
137
+ const tableData = unhealthyPositions.map((p) => [
138
+ p.account,
139
+ `${formatUnits(p.stvBalance, 27)} STV`,
140
+ `${formatEther(p.debtShares)} shares`,
141
+ `${formatEther(p.debtInEth)} ETH`,
142
+ `${(p.ltvRatio / 100).toFixed(2)}%`, // Display LTV
143
+ `+${(p.thresholdExcess / 100).toFixed(2)}%`, // How much over threshold
144
+ p.thresholdExcess > 1000 // > 10% over threshold
145
+ ? '🚨 CRITICAL'
146
+ : '⚠️ UNHEALTHY',
147
+ ]);
148
+ logTable({
149
+ params: {
150
+ head: [
151
+ 'Account',
152
+ 'STV Balance',
153
+ 'Debt (shares)',
154
+ 'Debt (ETH)',
155
+ 'LTV Ratio',
156
+ 'Over Threshold',
157
+ 'Status',
158
+ ],
159
+ },
160
+ data: tableData,
161
+ });
162
+ logInfo(`\nTotal Unhealthy Accounts: ${unhealthyPositions.length}`);
163
+ logInfo(`Threshold: ${(Number(forcedRebalanceThresholdBP) / 100).toFixed(2)}%`);
164
+ });
165
+ healthRead
166
+ .command('calculate-rebalance-need')
167
+ .description('calculate total ETH needed to rebalance all unhealthy positions')
168
+ .argument('<address>', 'stv-steth-pool address', stringToAddress)
169
+ .option('--from-block <number>', 'from block number', stringToNumber)
170
+ .option('--batch-size <number>', 'max blocks per RPC call (default: 30000)', stringToNumber)
171
+ .option('--verbose', 'show verbose output', false)
172
+ .action(async (address, options) => {
173
+ const poolContract = await getStvStethPoolContract(address);
174
+ const stethContract = await getStethContract();
175
+ logInfo('Calculating rebalance requirements...\n');
176
+ // Get pool info
177
+ const [name, symbol, totalExceedingMintedSteth, vaultAddress] = await Promise.all([
178
+ callReadMethodSilent(poolContract, 'name'),
179
+ callReadMethodSilent(poolContract, 'symbol'),
180
+ callReadMethodSilent(poolContract, 'totalExceedingMintedSteth'),
181
+ callReadMethodSilent(poolContract, 'VAULT'),
182
+ ]);
183
+ logInfo(`Pool: ${name} (${symbol}) at ${address}\n`);
184
+ // Calculate balances from indexed events
185
+ const balances = await calculateBalancesFromEvents({
186
+ poolAddress: address,
187
+ fromBlock: options.fromBlock,
188
+ batchSize: options.batchSize,
189
+ });
190
+ const rebalanceRequirements = [];
191
+ let totalStethRequired = 0n;
192
+ for (const [account, balance] of balances) {
193
+ try {
194
+ // Skip accounts with no position
195
+ if (balance.stvBalance === 0n && balance.debtShares === 0n) {
196
+ continue;
197
+ }
198
+ const isHealthy = await callReadMethodSilent(poolContract, 'isHealthyOf', [account]);
199
+ if (!isHealthy) {
200
+ // Call previewForceRebalance
201
+ const [stethShares, stvToBurn, isUndercollateralized] = await callReadMethodSilent(poolContract, 'previewForceRebalance', [account]);
202
+ if (stvToBurn > 0n) {
203
+ // Convert stETH shares to ETH
204
+ const stethInEth = await callReadMethodSilent(stethContract, 'getPooledEthBySharesRoundUp', [stethShares]);
205
+ rebalanceRequirements.push({
206
+ account,
207
+ stvToBurn,
208
+ stethShares,
209
+ stethInEth,
210
+ isUndercollateralized,
211
+ });
212
+ totalStethRequired += stethInEth;
213
+ }
214
+ }
215
+ }
216
+ catch (error) {
217
+ logInfo(`Error processing account ${account}: ${error}`);
218
+ }
219
+ }
220
+ // Get vault balance
221
+ const publicClient = await getPublicClient();
222
+ const vaultEthBalance = await publicClient.getBalance({
223
+ address: vaultAddress,
224
+ });
225
+ // Calculate adjusted requirement after exceeding stETH
226
+ // "Exceeding minted stETH" is already available in the pool and can be used
227
+ // for rebalancing WITHOUT providing additional ETH.
228
+ // So we subtract it from total required to get the REAL ETH need.
229
+ const adjustedRequirement = totalStethRequired > totalExceedingMintedSteth
230
+ ? totalStethRequired - totalExceedingMintedSteth
231
+ : 0n;
232
+ // Calculate ETH shortfall: how much MORE ETH is needed beyond vault balance
233
+ const ethShortfall = adjustedRequirement > vaultEthBalance
234
+ ? adjustedRequirement - vaultEthBalance
235
+ : 0n;
236
+ // Output summary
237
+ logInfo('═'.repeat(70));
238
+ logInfo('REBALANCE REQUIREMENTS REPORT');
239
+ logInfo('═'.repeat(70) + '\n');
240
+ logTable({
241
+ data: [
242
+ ['Pool', address],
243
+ ['Pool Name', `${name} (${symbol})`],
244
+ ['', ''],
245
+ ['📊 Unhealthy Accounts', rebalanceRequirements.length.toString()],
246
+ ['', ''],
247
+ ['═══ REBALANCE NEEDS ═══', ''],
248
+ [
249
+ '1️⃣ Total stETH Required (raw)',
250
+ `${formatEther(totalStethRequired)} ETH`,
251
+ ],
252
+ [
253
+ '2️⃣ Exceeding Minted stETH (available)',
254
+ totalExceedingMintedSteth > 0n
255
+ ? `${formatEther(totalExceedingMintedSteth)} ETH ✅`
256
+ : `${formatEther(totalExceedingMintedSteth)} ETH`,
257
+ ],
258
+ [
259
+ '3️⃣ After Exceeding Adjustment',
260
+ adjustedRequirement > 0n
261
+ ? `${formatEther(adjustedRequirement)} ETH (real need)`
262
+ : `${formatEther(adjustedRequirement)} ETH ✅ (covered by exceeding)`,
263
+ ],
264
+ ['', ''],
265
+ ['═══ VAULT RESOURCES ═══', ''],
266
+ ['💰 Vault ETH Balance', `${formatEther(vaultEthBalance)} ETH`],
267
+ [
268
+ '🎯 ETH Shortfall',
269
+ ethShortfall > 0n
270
+ ? `⚠️ ${formatEther(ethShortfall)} ETH (NEED MORE)`
271
+ : `✅ ${formatEther(ethShortfall)} ETH (SUFFICIENT)`,
272
+ ],
273
+ ],
274
+ });
275
+ if (options.verbose && rebalanceRequirements.length > 0) {
276
+ logInfo('\n' + '─'.repeat(70));
277
+ logInfo('DETAILED BREAKDOWN BY ACCOUNT');
278
+ logInfo('─'.repeat(70) + '\n');
279
+ const detailedData = rebalanceRequirements.map((r) => [
280
+ r.account,
281
+ formatUnits(r.stvToBurn, 27),
282
+ formatEther(r.stethShares),
283
+ formatEther(r.stethInEth),
284
+ r.isUndercollateralized ? '⚠️ Yes' : 'No',
285
+ ]);
286
+ logTable({
287
+ params: {
288
+ head: [
289
+ 'Account',
290
+ 'STV to Burn',
291
+ 'stETH Shares',
292
+ 'stETH (ETH)',
293
+ 'Undercollateralized',
294
+ ],
295
+ },
296
+ data: detailedData,
297
+ });
298
+ }
299
+ // Action items
300
+ logInfo('\n' + '═'.repeat(70));
301
+ logInfo('ACTION ITEMS');
302
+ logInfo('═'.repeat(70) + '\n');
303
+ if (rebalanceRequirements.length === 0) {
304
+ logInfo('✅ No rebalance needed - all positions are healthy!\n');
305
+ }
306
+ else {
307
+ // Explain the rebalance strategy
308
+ if (totalExceedingMintedSteth > 0n) {
309
+ logInfo(`1. 🔄 Can rebalance using exceeding stETH: ${formatEther(totalExceedingMintedSteth)} ETH`);
310
+ logInfo(` This stETH is already in the pool and doesn't require external ETH`);
311
+ }
312
+ else {
313
+ logInfo(`1. 🔄 No exceeding stETH available - will need to provide ETH externally`);
314
+ }
315
+ if (ethShortfall > 0n) {
316
+ logInfo(`\n2. ⚠️ Need to provide ${formatEther(ethShortfall)} ETH from external source`);
317
+ logInfo(` Command: yarn start dw stv-steth w rebalance-unassigned-liability-with-ether \\`);
318
+ logInfo(` ${address} ${formatEther(ethShortfall)}`);
319
+ }
320
+ else if (adjustedRequirement > 0n) {
321
+ logInfo(`\n2. ✅ Vault has sufficient ETH balance (${formatEther(vaultEthBalance)} ETH available)`);
322
+ }
323
+ else {
324
+ logInfo('\n2. ✅ Exceeding stETH fully covers all rebalance needs - no ETH required!');
325
+ }
326
+ logInfo(`\n3. 🎯 Execute rebalances for each account:`);
327
+ logInfo(` Command: yarn start dw uc h force-rebalance ${address} <account-address>`);
328
+ const undercollateralizedCount = rebalanceRequirements.filter((r) => r.isUndercollateralized).length;
329
+ if (undercollateralizedCount > 0) {
330
+ logInfo(`\n⚠️ CRITICAL: ${undercollateralizedCount} of ${rebalanceRequirements.length} accounts are UNDERCOLLATERALIZED!`);
331
+ logInfo(' These positions have debt > collateral and will cause LOSSES.');
332
+ logInfo(' Requires: LOSS_SOCIALIZER_ROLE to execute');
333
+ logInfo(` Command: yarn start dw uc h force-rebalance-and-socialize-loss ${address} <account-address>`);
334
+ }
335
+ logInfo('');
336
+ }
337
+ });
338
+ //# sourceMappingURL=read.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read.js","sourceRoot":"","sources":["../../../../../programs/defi-wrapper/use-cases/health/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,eAAe,EACf,QAAQ,EACR,OAAO,EACP,oBAAoB,EACpB,cAAc,EACd,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,YAAY,CAAC;AAEpB,MAAM,UAAU,GAAG,MAAM;KACtB,OAAO,CAAC,MAAM,CAAC;KACf,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC;KACd,WAAW,CAAC,sBAAsB,CAAC,CAAC;AAavC,UAAU;KACP,OAAO,CAAC,gBAAgB,CAAC;KACzB,WAAW,CAAC,0CAA0C,CAAC;KACvD,QAAQ,CAAC,WAAW,EAAE,wBAAwB,EAAE,eAAe,CAAC;KAChE,MAAM,CAAC,uBAAuB,EAAE,mBAAmB,EAAE,cAAc,CAAC;KACpE,MAAM,CACL,qBAAqB,EACrB,mCAAmC,EACnC,cAAc,CACf;KACA,MAAM,CACL,uBAAuB,EACvB,0CAA0C,EAC1C,cAAc,CACf;KACA,MAAM,CAAC,WAAW,EAAE,qBAAqB,EAAE,KAAK,CAAC;KACjD,MAAM,CACL,KAAK,EACH,OAAgB,EAChB,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1
+ import { Address } from 'viem';
2
+ /**
3
+ * Replicates the contract's _isThresholdBreached logic
4
+ * @param assets - STV assets value in ETH (from previewRedeem)
5
+ * @param stethShares - debt in stETH shares
6
+ * @param debtInEth - debt in ETH (from getPooledEthBySharesRoundUp)
7
+ * @param forcedRebalanceThresholdBP - threshold in basis points
8
+ * @returns true if threshold is breached (position is unhealthy)
9
+ */
10
+ export declare const isThresholdBreached: ({ assets, stethShares, debtInEth, forcedRebalanceThresholdBP, verbose, }: {
11
+ assets: bigint;
12
+ stethShares: bigint;
13
+ debtInEth: bigint;
14
+ forcedRebalanceThresholdBP: bigint;
15
+ verbose?: boolean;
16
+ }) => boolean;
17
+ /**
18
+ * Calculate the "effective LTV ratio" for display purposes
19
+ * This shows how close the position is to the threshold
20
+ * Returns basis points (10000 = 100%)
21
+ */
22
+ export declare const calculateEffectiveLTV: ({ assets, debtInEth, }: {
23
+ assets: bigint;
24
+ debtInEth: bigint;
25
+ }) => number;
26
+ /**
27
+ * Calculate how much the position exceeds the threshold
28
+ * Returns basis points of how much over threshold (negative if healthy)
29
+ */
30
+ export declare const calculateThresholdExcess: ({ assets, stethShares, debtInEth, forcedRebalanceThresholdBP, verbose, }: {
31
+ assets: bigint;
32
+ stethShares: bigint;
33
+ debtInEth: bigint;
34
+ forcedRebalanceThresholdBP: bigint;
35
+ verbose?: boolean;
36
+ }) => number;
37
+ export declare const indexAccountsFromEvents: ({ poolAddress, fromBlock, toBlock, batchSize, }: {
38
+ poolAddress: Address;
39
+ fromBlock?: number;
40
+ toBlock?: number;
41
+ batchSize?: number;
42
+ }) => Promise<Set<Address>>;
43
+ /**
44
+ * Calculate account balances from indexed events
45
+ */
46
+ export declare const calculateBalancesFromEvents: ({ poolAddress, fromBlock, toBlock, batchSize, }: {
47
+ poolAddress: Address;
48
+ fromBlock?: number;
49
+ toBlock?: number;
50
+ batchSize?: number;
51
+ }) => Promise<Map<Address, {
52
+ stvBalance: bigint;
53
+ debtShares: bigint;
54
+ }>>;
55
+ export declare const grantLossSocializerRole: (address: Address, currentAccount: Address) => Promise<void>;
56
+ export declare const setMaxLossSocializationBP: (address: Address) => Promise<void>;