@gearbox-protocol/sdk 17.0.0-next.4 → 17.0.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 (364) hide show
  1. package/dist/cjs/dev/abi.js +14 -15
  2. package/dist/cjs/dev/claimFromFaucet.js +4 -8
  3. package/dist/cjs/dev/createAnvilClient.js +35 -17
  4. package/dist/cjs/dev/index.js +7 -2
  5. package/dist/cjs/dev/kycUtils.js +66 -58
  6. package/dist/cjs/dev/midasUtils.js +113 -16
  7. package/dist/cjs/dev/securitizeUtils.js +82 -42
  8. package/dist/cjs/dev/withdrawalUtils.js +3 -6
  9. package/dist/cjs/model/errors/index.js +2 -0
  10. package/dist/cjs/model/errors/operation-errors.js +19 -1
  11. package/dist/cjs/model/index.js +4 -2
  12. package/dist/cjs/model/rwa.js +4 -4
  13. package/dist/cjs/model/rwa.schema.js +4 -4
  14. package/dist/cjs/offchain/opportunities/OffchainOpportunities.js +1 -1
  15. package/dist/cjs/onchain/OnchainSDK.js +3 -3
  16. package/dist/cjs/onchain/accounts/CreditAccountsServiceV310.js +2 -17
  17. package/dist/cjs/onchain/accounts/intents/borrow.js +140 -0
  18. package/dist/cjs/onchain/accounts/intents/collateral-valuation.js +41 -0
  19. package/dist/cjs/onchain/accounts/intents/guards.js +15 -3
  20. package/dist/cjs/onchain/accounts/intents/index.js +107 -20
  21. package/dist/cjs/onchain/accounts/intents/leverage-band.js +2 -12
  22. package/dist/cjs/onchain/accounts/intents/maxBorrow.js +89 -0
  23. package/dist/cjs/onchain/accounts/intents/maxWithdrawCollateral.js +15 -41
  24. package/dist/cjs/onchain/accounts/intents/open-strategy.js +8 -46
  25. package/dist/cjs/onchain/accounts/intents/operations.js +0 -1
  26. package/dist/cjs/onchain/accounts/intents/realize.js +61 -4
  27. package/dist/cjs/onchain/accounts/intents/tail.js +1 -1
  28. package/dist/cjs/onchain/accounts/intents/testing/sdk-mock.js +1 -0
  29. package/dist/cjs/onchain/accounts/intents/utils/common.js +19 -0
  30. package/dist/cjs/onchain/accounts/intents/utils/credit-account-slice.js +21 -0
  31. package/dist/cjs/onchain/accounts/intents/utils/index.js +2 -0
  32. package/dist/cjs/onchain/accounts/intents/utils/price-impact.js +12 -9
  33. package/dist/cjs/onchain/accounts/intents/utils/router-path.js +4 -5
  34. package/dist/cjs/onchain/accounts/intents/withdraw-limits.js +97 -0
  35. package/dist/cjs/onchain/accounts/liquidations/LiquidationsService.js +1 -1
  36. package/dist/cjs/onchain/constants/address-provider.js +0 -2
  37. package/dist/cjs/onchain/constants/index.js +0 -1
  38. package/dist/cjs/onchain/core/createAddressProvider.js +2 -5
  39. package/dist/cjs/onchain/index.js +60 -43
  40. package/dist/cjs/onchain/market/adapters/abi/conctructorAbi.js +2 -2
  41. package/dist/cjs/onchain/market/adapters/contracts/AbstractAdapter.js +6 -0
  42. package/dist/cjs/onchain/market/adapters/contracts/MidasGatewayAdapterContract.js +49 -5
  43. package/dist/cjs/onchain/market/credit/CreditSuite.js +26 -9
  44. package/dist/cjs/onchain/market/index.js +50 -38
  45. package/dist/cjs/onchain/market/oracle/PriceOracleBaseContract.js +3 -3
  46. package/dist/cjs/onchain/market/pricefeeds/AbstractPriceFeed.js +0 -5
  47. package/dist/cjs/onchain/market/pricefeeds/PriceFeedRegistry.js +127 -0
  48. package/dist/cjs/onchain/market/pricefeeds/{BalancerStablePriceFeed.js → feeds/BalancerStablePriceFeed.js} +4 -4
  49. package/dist/cjs/onchain/market/pricefeeds/{BalancerWeightedPriceFeed.js → feeds/BalancerWeightedPriceFeed.js} +4 -4
  50. package/dist/cjs/onchain/market/pricefeeds/{BoundedPriceFeed.js → feeds/BoundedPriceFeed.js} +4 -4
  51. package/dist/cjs/onchain/market/pricefeeds/{CompositePriceFeed.js → feeds/CompositePriceFeed.js} +4 -4
  52. package/dist/cjs/onchain/market/pricefeeds/{ConstantPriceFeed.js → feeds/ConstantPriceFeed.js} +3 -3
  53. package/dist/cjs/onchain/market/pricefeeds/{CurveCryptoPriceFeed.js → feeds/CurveCryptoPriceFeed.js} +4 -4
  54. package/dist/cjs/onchain/market/pricefeeds/{CurveStablePriceFeed.js → feeds/CurveStablePriceFeed.js} +4 -4
  55. package/dist/cjs/onchain/market/pricefeeds/{CurveUSDPriceFeed.js → feeds/CurveUSDPriceFeed.js} +4 -4
  56. package/dist/cjs/onchain/market/pricefeeds/{Erc4626PriceFeed.js → feeds/Erc4626PriceFeed.js} +4 -4
  57. package/dist/cjs/onchain/market/pricefeeds/{ExternalPriceFeed.js → feeds/ExternalPriceFeed.js} +4 -4
  58. package/dist/cjs/onchain/market/pricefeeds/{MellowLRTPriceFeed.js → feeds/MellowLRTPriceFeed.js} +4 -4
  59. package/dist/cjs/onchain/market/pricefeeds/{PendleTWAPPTPriceFeed.js → feeds/PendleTWAPPTPriceFeed.js} +4 -4
  60. package/dist/cjs/onchain/market/pricefeeds/{PythPriceFeed.js → feeds/PythPriceFeed.js} +3 -3
  61. package/dist/cjs/onchain/market/pricefeeds/{RedstonePriceFeed.js → feeds/RedstonePriceFeed.js} +6 -6
  62. package/dist/cjs/onchain/market/pricefeeds/{WstETHPriceFeed.js → feeds/WstETHPriceFeed.js} +4 -4
  63. package/dist/cjs/onchain/market/pricefeeds/{YearnPriceFeed.js → feeds/YearnPriceFeed.js} +4 -4
  64. package/dist/cjs/onchain/market/pricefeeds/{ZeroPriceFeed.js → feeds/ZeroPriceFeed.js} +4 -4
  65. package/dist/cjs/onchain/market/pricefeeds/feeds/index.js +35 -0
  66. package/dist/cjs/onchain/market/pricefeeds/index.js +51 -39
  67. package/dist/cjs/onchain/market/pricefeeds/updates/UpdatablePriceFeedRegistry.js +189 -0
  68. package/dist/cjs/onchain/market/pricefeeds/{getRawPriceUpdates.js → updates/getRawPriceUpdates.js} +2 -2
  69. package/dist/cjs/onchain/market/pricefeeds/updates/index.js +8 -0
  70. package/dist/cjs/onchain/market/pricefeeds/{isUpdatablePriceFeed.js → updates/isUpdatablePriceFeed.js} +1 -1
  71. package/dist/cjs/onchain/market/pricefeeds/updates/updatableDependencies.js +14 -0
  72. package/dist/cjs/onchain/market/rwa/RWARegistry.js +4 -7
  73. package/dist/cjs/onchain/market/rwa/index.js +1 -0
  74. package/dist/cjs/onchain/market/rwa/midas/MidasDegenNFT.js +45 -5
  75. package/dist/cjs/onchain/market/rwa/securitize/SecuritizeDegenNFT.js +56 -12
  76. package/dist/cjs/onchain/market/rwa/securitize/SecuritizeRWAFactory.js +0 -37
  77. package/dist/cjs/onchain/opportunities/MultichainOpportunitiesService.js +8 -2
  78. package/dist/cjs/onchain/opportunities/OpportunitiesService.js +16 -4
  79. package/dist/cjs/onchain/positions/calcHealthFactor.js +3 -3
  80. package/dist/cjs/onchain/preview/index.js +2 -0
  81. package/dist/cjs/onchain/preview/parse/parseRWAFactoryOperationCalldata.js +2 -2
  82. package/dist/cjs/onchain/preview/preview/index.js +2 -0
  83. package/dist/cjs/onchain/preview/preview/midasGreenlistsAccount.js +17 -0
  84. package/dist/cjs/onchain/preview/preview/previewOpenStrategyPosition.js +13 -16
  85. package/dist/cjs/onchain/preview/preview/previewOperation.js +19 -11
  86. package/dist/cjs/onchain/preview/preview/replayMulticall.js +4 -3
  87. package/dist/cjs/onchain/validation/bundles/checkCollateralFunding.js +3 -3
  88. package/dist/cjs/onchain/validation/bundles/checkCreditOperation.js +11 -9
  89. package/dist/cjs/onchain/validation/bundles/{checkDraw.js → checkIncreaseDebt.js} +10 -10
  90. package/dist/cjs/onchain/validation/bundles/{checkQuotasAsked.js → checkIncreaseQuota.js} +3 -3
  91. package/dist/cjs/onchain/validation/bundles/checkMidasAccountGreenlist.js +44 -0
  92. package/dist/cjs/onchain/validation/bundles/checkRWAOpenRequirements.js +9 -9
  93. package/dist/cjs/onchain/validation/bundles/checkRWAOpening.js +18 -8
  94. package/dist/cjs/onchain/validation/bundles/index.js +6 -4
  95. package/dist/cjs/onchain/validation/checkOperation.js +0 -1
  96. package/dist/cjs/onchain/validation/checks/checkBorrowLimit.js +1 -1
  97. package/dist/cjs/onchain/validation/checks/checkPoolLiquidity.js +1 -1
  98. package/dist/cjs/onchain/validation/checks/checkReservePriceLimited.js +30 -0
  99. package/dist/cjs/onchain/validation/checks/index.js +2 -0
  100. package/dist/cjs/onchain/validation/index.js +8 -4
  101. package/dist/cjs/permissionless/utils/price-update/get-price-update-tx.js +2 -2
  102. package/dist/cjs/permissionless/utils/price-update/get-updatable-feeds.js +2 -2
  103. package/dist/cjs/sdk/execute/ExecuteApi.js +67 -7
  104. package/dist/cjs/sdk/opportunities/OpportunitiesNamespace.js +9 -3
  105. package/dist/cjs/sdk/prepare/PrepareApi.js +89 -14
  106. package/dist/esm/dev/abi.js +14 -15
  107. package/dist/esm/dev/claimFromFaucet.js +4 -8
  108. package/dist/esm/dev/createAnvilClient.js +36 -19
  109. package/dist/esm/dev/index.js +4 -4
  110. package/dist/esm/dev/kycUtils.js +66 -59
  111. package/dist/esm/dev/midasUtils.js +112 -18
  112. package/dist/esm/dev/securitizeUtils.js +84 -44
  113. package/dist/esm/dev/withdrawalUtils.js +3 -6
  114. package/dist/esm/model/errors/index.js +2 -2
  115. package/dist/esm/model/errors/operation-errors.js +18 -2
  116. package/dist/esm/model/index.js +4 -4
  117. package/dist/esm/model/rwa.js +4 -4
  118. package/dist/esm/model/rwa.schema.js +5 -5
  119. package/dist/esm/offchain/opportunities/OffchainOpportunities.js +1 -1
  120. package/dist/esm/onchain/OnchainSDK.js +3 -3
  121. package/dist/esm/onchain/accounts/CreditAccountsServiceV310.js +2 -17
  122. package/dist/esm/onchain/accounts/intents/borrow.js +138 -0
  123. package/dist/esm/onchain/accounts/intents/collateral-valuation.js +40 -0
  124. package/dist/esm/onchain/accounts/intents/guards.js +15 -3
  125. package/dist/esm/onchain/accounts/intents/index.js +107 -20
  126. package/dist/esm/onchain/accounts/intents/leverage-band.js +2 -12
  127. package/dist/esm/onchain/accounts/intents/maxBorrow.js +87 -0
  128. package/dist/esm/onchain/accounts/intents/maxWithdrawCollateral.js +15 -41
  129. package/dist/esm/onchain/accounts/intents/open-strategy.js +8 -46
  130. package/dist/esm/onchain/accounts/intents/operations.js +0 -1
  131. package/dist/esm/onchain/accounts/intents/realize.js +61 -4
  132. package/dist/esm/onchain/accounts/intents/tail.js +1 -1
  133. package/dist/esm/onchain/accounts/intents/testing/sdk-mock.js +1 -0
  134. package/dist/esm/onchain/accounts/intents/utils/common.js +19 -1
  135. package/dist/esm/onchain/accounts/intents/utils/credit-account-slice.js +21 -1
  136. package/dist/esm/onchain/accounts/intents/utils/index.js +3 -3
  137. package/dist/esm/onchain/accounts/intents/utils/price-impact.js +12 -9
  138. package/dist/esm/onchain/accounts/intents/utils/router-path.js +4 -5
  139. package/dist/esm/onchain/accounts/intents/withdraw-limits.js +95 -0
  140. package/dist/esm/onchain/accounts/liquidations/LiquidationsService.js +1 -1
  141. package/dist/esm/onchain/constants/address-provider.js +1 -2
  142. package/dist/esm/onchain/constants/index.js +2 -2
  143. package/dist/esm/onchain/core/createAddressProvider.js +2 -5
  144. package/dist/esm/onchain/index.js +32 -24
  145. package/dist/esm/onchain/market/adapters/abi/conctructorAbi.js +2 -2
  146. package/dist/esm/onchain/market/adapters/contracts/AbstractAdapter.js +6 -0
  147. package/dist/esm/onchain/market/adapters/contracts/MidasGatewayAdapterContract.js +50 -6
  148. package/dist/esm/onchain/market/credit/CreditSuite.js +26 -9
  149. package/dist/esm/onchain/market/index.js +26 -21
  150. package/dist/esm/onchain/market/oracle/PriceOracleBaseContract.js +1 -1
  151. package/dist/esm/onchain/market/pricefeeds/AbstractPriceFeed.js +0 -5
  152. package/dist/esm/onchain/market/pricefeeds/PriceFeedRegistry.js +126 -0
  153. package/dist/esm/onchain/market/pricefeeds/{BalancerStablePriceFeed.js → feeds/BalancerStablePriceFeed.js} +4 -4
  154. package/dist/esm/onchain/market/pricefeeds/{BalancerWeightedPriceFeed.js → feeds/BalancerWeightedPriceFeed.js} +4 -4
  155. package/dist/esm/onchain/market/pricefeeds/{BoundedPriceFeed.js → feeds/BoundedPriceFeed.js} +4 -4
  156. package/dist/esm/onchain/market/pricefeeds/{CompositePriceFeed.js → feeds/CompositePriceFeed.js} +4 -4
  157. package/dist/esm/onchain/market/pricefeeds/{ConstantPriceFeed.js → feeds/ConstantPriceFeed.js} +3 -3
  158. package/dist/esm/onchain/market/pricefeeds/{CurveCryptoPriceFeed.js → feeds/CurveCryptoPriceFeed.js} +4 -4
  159. package/dist/esm/onchain/market/pricefeeds/{CurveStablePriceFeed.js → feeds/CurveStablePriceFeed.js} +4 -4
  160. package/dist/esm/onchain/market/pricefeeds/{CurveUSDPriceFeed.js → feeds/CurveUSDPriceFeed.js} +4 -4
  161. package/dist/esm/onchain/market/pricefeeds/{Erc4626PriceFeed.js → feeds/Erc4626PriceFeed.js} +4 -4
  162. package/dist/esm/onchain/market/pricefeeds/{ExternalPriceFeed.js → feeds/ExternalPriceFeed.js} +4 -4
  163. package/dist/esm/onchain/market/pricefeeds/{MellowLRTPriceFeed.js → feeds/MellowLRTPriceFeed.js} +4 -4
  164. package/dist/esm/onchain/market/pricefeeds/{PendleTWAPPTPriceFeed.js → feeds/PendleTWAPPTPriceFeed.js} +4 -4
  165. package/dist/esm/onchain/market/pricefeeds/{PythPriceFeed.js → feeds/PythPriceFeed.js} +3 -3
  166. package/dist/esm/onchain/market/pricefeeds/{RedstonePriceFeed.js → feeds/RedstonePriceFeed.js} +6 -6
  167. package/dist/esm/onchain/market/pricefeeds/{WstETHPriceFeed.js → feeds/WstETHPriceFeed.js} +4 -4
  168. package/dist/esm/onchain/market/pricefeeds/{YearnPriceFeed.js → feeds/YearnPriceFeed.js} +4 -4
  169. package/dist/esm/onchain/market/pricefeeds/{ZeroPriceFeed.js → feeds/ZeroPriceFeed.js} +4 -4
  170. package/dist/esm/onchain/market/pricefeeds/feeds/index.js +18 -0
  171. package/dist/esm/onchain/market/pricefeeds/index.js +27 -21
  172. package/dist/esm/onchain/market/pricefeeds/updates/UpdatablePriceFeedRegistry.js +188 -0
  173. package/dist/esm/onchain/market/pricefeeds/{getRawPriceUpdates.js → updates/getRawPriceUpdates.js} +2 -2
  174. package/dist/esm/onchain/market/pricefeeds/updates/index.js +5 -1
  175. package/dist/esm/onchain/market/pricefeeds/{isUpdatablePriceFeed.js → updates/isUpdatablePriceFeed.js} +1 -1
  176. package/dist/esm/onchain/market/pricefeeds/updates/updatableDependencies.js +13 -0
  177. package/dist/esm/onchain/market/rwa/RWARegistry.js +4 -8
  178. package/dist/esm/onchain/market/rwa/index.js +2 -2
  179. package/dist/esm/onchain/market/rwa/midas/MidasDegenNFT.js +45 -5
  180. package/dist/esm/onchain/market/rwa/securitize/SecuritizeDegenNFT.js +55 -10
  181. package/dist/esm/onchain/market/rwa/securitize/SecuritizeRWAFactory.js +0 -37
  182. package/dist/esm/onchain/opportunities/MultichainOpportunitiesService.js +8 -2
  183. package/dist/esm/onchain/opportunities/OpportunitiesService.js +16 -4
  184. package/dist/esm/onchain/positions/calcHealthFactor.js +3 -3
  185. package/dist/esm/onchain/preview/index.js +2 -1
  186. package/dist/esm/onchain/preview/parse/parseRWAFactoryOperationCalldata.js +2 -2
  187. package/dist/esm/onchain/preview/preview/index.js +2 -1
  188. package/dist/esm/onchain/preview/preview/midasGreenlistsAccount.js +16 -0
  189. package/dist/esm/onchain/preview/preview/previewOpenStrategyPosition.js +14 -17
  190. package/dist/esm/onchain/preview/preview/previewOperation.js +19 -11
  191. package/dist/esm/onchain/preview/preview/replayMulticall.js +4 -3
  192. package/dist/esm/onchain/validation/bundles/checkCollateralFunding.js +3 -3
  193. package/dist/esm/onchain/validation/bundles/checkCreditOperation.js +11 -9
  194. package/dist/esm/onchain/validation/bundles/checkIncreaseDebt.js +27 -0
  195. package/dist/esm/onchain/validation/bundles/{checkQuotasAsked.js → checkIncreaseQuota.js} +3 -3
  196. package/dist/esm/onchain/validation/bundles/checkMidasAccountGreenlist.js +43 -0
  197. package/dist/esm/onchain/validation/bundles/checkRWAOpenRequirements.js +9 -9
  198. package/dist/esm/onchain/validation/bundles/checkRWAOpening.js +18 -8
  199. package/dist/esm/onchain/validation/bundles/index.js +4 -3
  200. package/dist/esm/onchain/validation/checkOperation.js +0 -1
  201. package/dist/esm/onchain/validation/checks/checkBorrowLimit.js +1 -1
  202. package/dist/esm/onchain/validation/checks/checkPoolLiquidity.js +1 -1
  203. package/dist/esm/onchain/validation/checks/checkReservePriceLimited.js +29 -0
  204. package/dist/esm/onchain/validation/checks/index.js +2 -1
  205. package/dist/esm/onchain/validation/index.js +5 -3
  206. package/dist/esm/permissionless/utils/price-update/get-price-update-tx.js +1 -1
  207. package/dist/esm/permissionless/utils/price-update/get-updatable-feeds.js +1 -1
  208. package/dist/esm/sdk/execute/ExecuteApi.js +67 -7
  209. package/dist/esm/sdk/opportunities/OpportunitiesNamespace.js +9 -3
  210. package/dist/esm/sdk/prepare/PrepareApi.js +94 -19
  211. package/dist/types/dev/abi.d.ts +13 -15
  212. package/dist/types/dev/claimFromFaucet.d.ts +0 -1
  213. package/dist/types/dev/createAnvilClient.d.ts +10 -3
  214. package/dist/types/dev/index.d.ts +4 -4
  215. package/dist/types/dev/kycUtils.d.ts +15 -24
  216. package/dist/types/dev/midasUtils.d.ts +35 -4
  217. package/dist/types/dev/securitizeUtils.d.ts +3 -9
  218. package/dist/types/model/errors/index.d.ts +2 -2
  219. package/dist/types/model/errors/operation-errors.d.ts +62 -7
  220. package/dist/types/model/index.d.ts +5 -5
  221. package/dist/types/model/opportunities.d.ts +6 -7
  222. package/dist/types/model/previews.d.ts +25 -19
  223. package/dist/types/model/rwa.d.ts +47 -27
  224. package/dist/types/model/rwa.schema.d.ts +3 -3
  225. package/dist/types/offchain/opportunities/OffchainOpportunities.d.ts +1 -2
  226. package/dist/types/offchain/opportunities/types.d.ts +1 -4
  227. package/dist/types/onchain/OnchainSDK.d.ts +2 -2
  228. package/dist/types/onchain/accounts/index.d.ts +5 -4
  229. package/dist/types/onchain/accounts/intents/borrow.d.ts +141 -0
  230. package/dist/types/onchain/accounts/intents/collateral-valuation.d.ts +42 -0
  231. package/dist/types/onchain/accounts/intents/guards.d.ts +18 -2
  232. package/dist/types/onchain/accounts/intents/index.d.ts +103 -15
  233. package/dist/types/onchain/accounts/intents/maxBorrow.d.ts +54 -0
  234. package/dist/types/onchain/accounts/intents/maxWithdrawCollateral.d.ts +3 -8
  235. package/dist/types/onchain/accounts/intents/open-strategy.d.ts +3 -17
  236. package/dist/types/onchain/accounts/intents/testing/sdk-mock.d.ts +2 -0
  237. package/dist/types/onchain/accounts/intents/tests/open-strategy.fixtures.d.ts +2 -2
  238. package/dist/types/onchain/accounts/intents/types.d.ts +51 -6
  239. package/dist/types/onchain/accounts/intents/utils/common.d.ts +15 -1
  240. package/dist/types/onchain/accounts/intents/utils/credit-account-slice.d.ts +14 -1
  241. package/dist/types/onchain/accounts/intents/utils/index.d.ts +3 -3
  242. package/dist/types/onchain/accounts/intents/utils/price-impact.d.ts +4 -1
  243. package/dist/types/onchain/accounts/intents/utils/router-path.d.ts +2 -5
  244. package/dist/types/onchain/accounts/intents/withdraw-limits.d.ts +80 -0
  245. package/dist/types/onchain/accounts/types.d.ts +4 -2
  246. package/dist/types/onchain/constants/address-provider.d.ts +1 -2
  247. package/dist/types/onchain/constants/index.d.ts +2 -2
  248. package/dist/types/onchain/index.d.ts +40 -31
  249. package/dist/types/onchain/market/adapters/contracts/AbstractAdapter.d.ts +6 -0
  250. package/dist/types/onchain/market/adapters/contracts/MidasGatewayAdapterContract.d.ts +20 -4
  251. package/dist/types/onchain/market/adapters/types.d.ts +8 -0
  252. package/dist/types/onchain/market/credit/CreditSuite.d.ts +13 -3
  253. package/dist/types/onchain/market/index.d.ts +29 -24
  254. package/dist/types/onchain/market/oracle/PriceOracleBaseContract.d.ts +2 -1
  255. package/dist/types/onchain/market/oracle/types.d.ts +2 -1
  256. package/dist/types/onchain/market/pool/types.d.ts +1 -1
  257. package/dist/types/onchain/market/pricefeeds/AbstractPriceFeed.d.ts +1 -2
  258. package/dist/types/onchain/market/pricefeeds/PriceFeedRegistry.d.ts +60 -0
  259. package/dist/types/onchain/market/pricefeeds/feeds/BalancerStablePriceFeed.d.ts +12 -0
  260. package/dist/types/onchain/market/pricefeeds/{BalancerWeightedPriceFeed.d.ts → feeds/BalancerWeightedPriceFeed.d.ts} +7 -7
  261. package/dist/types/onchain/market/pricefeeds/feeds/BoundedPriceFeed.d.ts +15 -0
  262. package/dist/types/onchain/market/pricefeeds/{CompositePriceFeed.d.ts → feeds/CompositePriceFeed.d.ts} +6 -6
  263. package/dist/types/onchain/market/pricefeeds/{ConstantPriceFeed.d.ts → feeds/ConstantPriceFeed.d.ts} +6 -6
  264. package/dist/types/onchain/market/pricefeeds/feeds/CurveCryptoPriceFeed.d.ts +12 -0
  265. package/dist/types/onchain/market/pricefeeds/feeds/CurveStablePriceFeed.d.ts +12 -0
  266. package/dist/types/onchain/market/pricefeeds/feeds/CurveUSDPriceFeed.d.ts +12 -0
  267. package/dist/types/onchain/market/pricefeeds/feeds/Erc4626PriceFeed.d.ts +12 -0
  268. package/dist/types/onchain/market/pricefeeds/feeds/ExternalPriceFeed.d.ts +11 -0
  269. package/dist/types/onchain/market/pricefeeds/feeds/MellowLRTPriceFeed.d.ts +12 -0
  270. package/dist/types/onchain/market/pricefeeds/{PendleTWAPPTPriceFeed.d.ts → feeds/PendleTWAPPTPriceFeed.d.ts} +3 -3
  271. package/dist/types/onchain/market/pricefeeds/{PythPriceFeed.d.ts → feeds/PythPriceFeed.d.ts} +3 -3
  272. package/dist/types/onchain/market/pricefeeds/{RedstonePriceFeed.d.ts → feeds/RedstonePriceFeed.d.ts} +9 -9
  273. package/dist/types/onchain/market/pricefeeds/feeds/WstETHPriceFeed.d.ts +12 -0
  274. package/dist/types/onchain/market/pricefeeds/feeds/YearnPriceFeed.d.ts +12 -0
  275. package/dist/types/onchain/market/pricefeeds/feeds/ZeroPriceFeed.d.ts +11 -0
  276. package/dist/types/onchain/market/pricefeeds/feeds/index.d.ts +18 -0
  277. package/dist/types/onchain/market/pricefeeds/index.d.ts +28 -22
  278. package/dist/types/onchain/market/pricefeeds/types.d.ts +1 -31
  279. package/dist/types/onchain/market/pricefeeds/updates/RedstoneUpdater.d.ts +1 -1
  280. package/dist/types/onchain/market/pricefeeds/updates/UpdatablePriceFeedRegistry.d.ts +106 -0
  281. package/dist/types/onchain/market/pricefeeds/updates/getRawPriceUpdates.d.ts +6 -0
  282. package/dist/types/onchain/market/pricefeeds/updates/index.d.ts +7 -3
  283. package/dist/types/onchain/market/pricefeeds/updates/isUpdatablePriceFeed.d.ts +6 -0
  284. package/dist/types/onchain/market/pricefeeds/updates/types.d.ts +56 -2
  285. package/dist/types/onchain/market/pricefeeds/updates/updatableDependencies.d.ts +10 -0
  286. package/dist/types/onchain/market/rwa/RWARegistry.d.ts +2 -1
  287. package/dist/types/onchain/market/rwa/index.d.ts +3 -3
  288. package/dist/types/onchain/market/rwa/midas/MidasDegenNFT.d.ts +19 -4
  289. package/dist/types/onchain/market/rwa/securitize/SecuritizeDegenNFT.d.ts +24 -4
  290. package/dist/types/onchain/market/rwa/securitize/SecuritizeRWAFactory.d.ts +2 -14
  291. package/dist/types/onchain/market/rwa/types.d.ts +39 -37
  292. package/dist/types/onchain/opportunities/MultichainOpportunitiesService.d.ts +5 -1
  293. package/dist/types/onchain/opportunities/OpportunitiesService.d.ts +10 -3
  294. package/dist/types/onchain/opportunities/types.d.ts +6 -1
  295. package/dist/types/onchain/preview/index.d.ts +2 -1
  296. package/dist/types/onchain/preview/preview/index.d.ts +2 -1
  297. package/dist/types/onchain/preview/preview/midasGreenlistsAccount.d.ts +13 -0
  298. package/dist/types/onchain/preview/preview/previewOpenStrategyPosition.d.ts +5 -3
  299. package/dist/types/onchain/preview/preview/replayMulticall.d.ts +8 -7
  300. package/dist/types/onchain/validation/bundles/checkCreditOperation.d.ts +5 -4
  301. package/dist/types/onchain/validation/bundles/{checkDraw.d.ts → checkIncreaseDebt.d.ts} +7 -7
  302. package/dist/types/onchain/validation/bundles/{checkQuotasAsked.d.ts → checkIncreaseQuota.d.ts} +3 -3
  303. package/dist/types/onchain/validation/bundles/checkMidasAccountGreenlist.d.ts +22 -0
  304. package/dist/types/onchain/validation/bundles/checkRWAOpenRequirements.d.ts +2 -2
  305. package/dist/types/onchain/validation/bundles/checkRWAOpening.d.ts +9 -7
  306. package/dist/types/onchain/validation/bundles/index.d.ts +5 -4
  307. package/dist/types/onchain/validation/checks/checkBorrowLimit.d.ts +1 -1
  308. package/dist/types/onchain/validation/checks/checkDebtLimits.d.ts +2 -2
  309. package/dist/types/onchain/validation/checks/checkPoolLiquidity.d.ts +1 -1
  310. package/dist/types/onchain/validation/checks/checkReservePriceLimited.d.ts +31 -0
  311. package/dist/types/onchain/validation/checks/index.d.ts +2 -1
  312. package/dist/types/onchain/validation/index.d.ts +6 -4
  313. package/dist/types/onchain/validation/raise.d.ts +2 -2
  314. package/dist/types/sdk/execute/index.d.ts +2 -2
  315. package/dist/types/sdk/execute/types.d.ts +48 -6
  316. package/dist/types/sdk/index.d.ts +5 -4
  317. package/dist/types/sdk/opportunities/OpportunitiesNamespace.d.ts +5 -1
  318. package/dist/types/sdk/opportunities/types.d.ts +9 -3
  319. package/dist/types/sdk/prepare/PrepareApi.d.ts +16 -4
  320. package/dist/types/sdk/prepare/index.d.ts +4 -3
  321. package/dist/types/sdk/prepare/types.d.ts +200 -66
  322. package/package.json +1 -1
  323. package/dist/cjs/onchain/accounts/utils/midasUtils.js +0 -70
  324. package/dist/cjs/onchain/market/pricefeeds/PriceFeedsRegister.js +0 -301
  325. package/dist/cjs/plugins/degen-distributors/DegenDistributorsPlugin.js +0 -61
  326. package/dist/cjs/plugins/degen-distributors/index.js +0 -4
  327. package/dist/cjs/plugins/degen-distributors/package.json +0 -1
  328. package/dist/cjs/plugins/degen-distributors/types.js +0 -1
  329. package/dist/cjs/plugins/delayed-withdrawal/DelayedWithdrawalPlugin.js +0 -114
  330. package/dist/cjs/plugins/delayed-withdrawal/index.js +0 -4
  331. package/dist/cjs/plugins/delayed-withdrawal/package.json +0 -1
  332. package/dist/cjs/plugins/delayed-withdrawal/types.js +0 -1
  333. package/dist/esm/onchain/accounts/utils/midasUtils.js +0 -69
  334. package/dist/esm/onchain/market/pricefeeds/PriceFeedsRegister.js +0 -300
  335. package/dist/esm/onchain/validation/bundles/checkDraw.js +0 -27
  336. package/dist/esm/plugins/degen-distributors/DegenDistributorsPlugin.js +0 -60
  337. package/dist/esm/plugins/degen-distributors/index.js +0 -3
  338. package/dist/esm/plugins/degen-distributors/package.json +0 -1
  339. package/dist/esm/plugins/degen-distributors/types.js +0 -1
  340. package/dist/esm/plugins/delayed-withdrawal/DelayedWithdrawalPlugin.js +0 -113
  341. package/dist/esm/plugins/delayed-withdrawal/index.js +0 -3
  342. package/dist/esm/plugins/delayed-withdrawal/package.json +0 -1
  343. package/dist/esm/plugins/delayed-withdrawal/types.js +0 -1
  344. package/dist/types/onchain/accounts/utils/midasUtils.d.ts +0 -38
  345. package/dist/types/onchain/market/pricefeeds/BalancerStablePriceFeed.d.ts +0 -12
  346. package/dist/types/onchain/market/pricefeeds/BoundedPriceFeed.d.ts +0 -15
  347. package/dist/types/onchain/market/pricefeeds/CurveCryptoPriceFeed.d.ts +0 -12
  348. package/dist/types/onchain/market/pricefeeds/CurveStablePriceFeed.d.ts +0 -12
  349. package/dist/types/onchain/market/pricefeeds/CurveUSDPriceFeed.d.ts +0 -12
  350. package/dist/types/onchain/market/pricefeeds/Erc4626PriceFeed.d.ts +0 -12
  351. package/dist/types/onchain/market/pricefeeds/ExternalPriceFeed.d.ts +0 -11
  352. package/dist/types/onchain/market/pricefeeds/MellowLRTPriceFeed.d.ts +0 -12
  353. package/dist/types/onchain/market/pricefeeds/PriceFeedsRegister.d.ts +0 -180
  354. package/dist/types/onchain/market/pricefeeds/WstETHPriceFeed.d.ts +0 -12
  355. package/dist/types/onchain/market/pricefeeds/YearnPriceFeed.d.ts +0 -12
  356. package/dist/types/onchain/market/pricefeeds/ZeroPriceFeed.d.ts +0 -11
  357. package/dist/types/onchain/market/pricefeeds/getRawPriceUpdates.d.ts +0 -5
  358. package/dist/types/onchain/market/pricefeeds/isUpdatablePriceFeed.d.ts +0 -5
  359. package/dist/types/plugins/degen-distributors/DegenDistributorsPlugin.d.ts +0 -25
  360. package/dist/types/plugins/degen-distributors/index.d.ts +0 -3
  361. package/dist/types/plugins/degen-distributors/types.d.ts +0 -8
  362. package/dist/types/plugins/delayed-withdrawal/DelayedWithdrawalPlugin.d.ts +0 -25
  363. package/dist/types/plugins/delayed-withdrawal/index.d.ts +0 -3
  364. package/dist/types/plugins/delayed-withdrawal/types.d.ts +0 -10
@@ -3,7 +3,6 @@ import "../../../model/index.js";
3
3
  import { IBaseContract, PriceFeedAnswer } from "../../base/types.js";
4
4
  import { PriceFeedStateHuman } from "../../types/state-human.js";
5
5
  import { PriceFeedRef } from "./PriceFeedRef.js";
6
- import { IPriceUpdateTx, RawTx } from "../../types/transactions.js";
7
6
  import "../../types/index.js";
8
7
  import "../../base/index.js";
9
8
  import { Address, Hex, UnionOmit } from "viem";
@@ -74,11 +73,6 @@ interface IPriceFeedContract extends IBaseContract {
74
73
  * @param raw - When `true`, includes raw/unformatted values.
75
74
  **/
76
75
  stateHuman: (raw?: boolean) => UnionOmit<PriceFeedStateHuman, "stalenessPeriod">;
77
- /**
78
- * Collects all updatable feeds in this feed's dependency tree,
79
- * including this feed itself when it is updatable.
80
- **/
81
- updatableDependencies: () => IUpdatablePriceFeedContract[];
82
76
  /**
83
77
  * Describes this feed and the feeds it reads from the way the shared read
84
78
  * model does.
@@ -88,30 +82,6 @@ interface IPriceFeedContract extends IBaseContract {
88
82
  **/
89
83
  describe: () => PriceFeedData;
90
84
  }
91
- /**
92
- * Extended price feed interface for feeds whose price can be refreshed
93
- * via an off-chain data push (e.g. Pyth or Redstone feeds).
94
- **/
95
- interface IUpdatablePriceFeedContract extends IPriceFeedContract {
96
- /**
97
- * Builds a raw transaction that pushes new price data to the on-chain feed.
98
- * @param data - ABI-encoded update payload.
99
- **/
100
- createPriceUpdateTx: (data: `0x${string}`) => RawTx;
101
- }
102
- /**
103
- * Result of generating price-feed update transactions.
104
- **/
105
- interface UpdatePriceFeedsResult {
106
- /**
107
- * Transactions that push fresh prices to updatable feeds.
108
- **/
109
- txs: IPriceUpdateTx[];
110
- /**
111
- * Latest timestamp among all fetched price updates (unix seconds).
112
- **/
113
- timestamp: number;
114
- }
115
85
  /**
116
86
  * Pair: updatable price feed address and
117
87
  * data can be passed to IUpdatablePriceFeed.updatePrice
@@ -127,4 +97,4 @@ interface PriceUpdate {
127
97
  data: Hex;
128
98
  }
129
99
  //#endregion
130
- export { IPriceFeedContract, IUpdatablePriceFeedContract, PriceFeedContractType, PriceFeedUsageType, PriceUpdate, UpdatePriceFeedsResult };
100
+ export { IPriceFeedContract, PriceFeedContractType, PriceFeedUsageType, PriceUpdate };
@@ -1,7 +1,7 @@
1
1
  import { IPriceFeedContract } from "../types.js";
2
- import { IPriceUpdateTask, IPriceUpdater } from "./types.js";
3
2
  import { PriceUpdatesCache } from "./PriceUpdatesCache.js";
4
3
  import { PriceUpdateTx } from "./PriceUpdateTx.js";
4
+ import { IPriceUpdateTask, IPriceUpdater } from "./types.js";
5
5
  import { OnchainSDK } from "../../../OnchainSDK.js";
6
6
  import { SDKConstruct } from "../../../base/SDKConstruct.js";
7
7
  import "../../../base/index.js";
@@ -0,0 +1,106 @@
1
+ import { IPriceFeedContract, PriceUpdate } from "../types.js";
2
+ import { LatestUpdate, UpdatablePriceFeedRegistryHooks, UpdatablePriceFeedRegistryOptions, UpdatePriceFeedsResult } from "./types.js";
3
+ import { PriceFeedRegistry } from "../PriceFeedRegistry.js";
4
+ import { IHooks } from "../../../utils/internal/Hooks.js";
5
+ import "../../../utils/internal/index.js";
6
+ import { RawTx } from "../../../types/transactions.js";
7
+ import { OnchainSDK } from "../../../OnchainSDK.js";
8
+ import "../../../types/index.js";
9
+ import { Address, BlockTag } from "viem";
10
+ //#region src/onchain/market/pricefeeds/updates/UpdatablePriceFeedRegistry.d.ts
11
+ /**
12
+ * {@link PriceFeedRegistry} that also orchestrates off-chain price updates
13
+ * (Redstone, etc.).
14
+ **/
15
+ declare class UpdatablePriceFeedRegistry extends PriceFeedRegistry implements IHooks<UpdatablePriceFeedRegistryHooks> {
16
+ #private;
17
+ constructor(sdk: OnchainSDK, opts?: UpdatablePriceFeedRegistryOptions);
18
+ /**
19
+ * @internal
20
+ * Registers a callback for price-feed registry lifecycle events.
21
+ * @param event - Event name.
22
+ * @param handler - Callback to invoke.
23
+ **/
24
+ addHook: <K extends "updatesGenerated">(hookName: K, fn: (...args: UpdatablePriceFeedRegistryHooks[K]) => void | Promise<void>) => void;
25
+ /**
26
+ * @internal
27
+ * Removes a previously registered hook.
28
+ * @param event - Event name.
29
+ * @param handler - Callback to remove.
30
+ **/
31
+ removeHook: <K extends "updatesGenerated">(hookName: K, fn: (...args: UpdatablePriceFeedRegistryHooks[K]) => void | Promise<void>) => void;
32
+ /**
33
+ * Generates transactions to push fresh off-chain prices to updatable feeds.
34
+ *
35
+ * @param priceFeeds - Top-level price feeds whose updatable dependencies
36
+ * will be resolved, or a filter (`{ main: true }` / `{ reserve: true }`)
37
+ * to gather feeds from all oracles. When omitted, all registered feeds
38
+ * are used.
39
+ **/
40
+ generatePriceFeedsUpdateTxs(priceFeeds?: IPriceFeedContract[] | {
41
+ main: true;
42
+ } | {
43
+ reserve: true;
44
+ }): Promise<UpdatePriceFeedsResult>;
45
+ /**
46
+ * Similar to {@link generatePriceFeedsUpdateTxs}, but returns raw structures instead of transactions
47
+ * @param priceFeeds
48
+ * @returns
49
+ */
50
+ generatePriceFeedsUpdates(priceFeeds?: IPriceFeedContract[] | {
51
+ main: true;
52
+ } | {
53
+ reserve: true;
54
+ }): Promise<PriceUpdate[]>;
55
+ /**
56
+ * Similar to {@link generatePriceFeedsUpdates}, but returns raw transaction to PriceFeedStore.updatePrices
57
+ * @param priceFeeds
58
+ * @returns
59
+ */
60
+ getPriceFeedStoreUpdateTx(priceFeeds?: IPriceFeedContract[] | {
61
+ main: true;
62
+ } | {
63
+ reserve: true;
64
+ }): Promise<RawTx>;
65
+ /**
66
+ * Similar to {@link generatePriceFeedsUpdateTxs}, but will generate necessary price update transactions for external price feeds (not known to sdk)
67
+ * This does not add feeds to this registry, so they won't be implicitly included in future generatePriceFeedsUpdateTxs calls
68
+ * @param feeds
69
+ * @param block
70
+ * @returns
71
+ */
72
+ generateExternalPriceFeedsUpdateTxs(feeds: Address[], block?: {
73
+ blockNumber: bigint;
74
+ } | {
75
+ blockTag: BlockTag;
76
+ }): Promise<UpdatePriceFeedsResult>;
77
+ /**
78
+ * Similar to {@link generateExternalPriceFeedsUpdateTxs}, but returns raw structures instead of transactions
79
+ * @param feeds
80
+ * @param block
81
+ * @returns
82
+ */
83
+ generateExternalPriceFeedsUpdates(feeds: Address[], block?: {
84
+ blockNumber: bigint;
85
+ } | {
86
+ blockTag: BlockTag;
87
+ }): Promise<PriceUpdate[]>;
88
+ /**
89
+ * Loads PARTIAL information about all updatable price feeds from MarketCompressor
90
+ * Discovered price feeds are not saved anywhere in PriceFeedRegistry, and can later be used to load price feed updates
91
+ */
92
+ getPartialUpdatablePriceFeeds(configurators: Address[]): Promise<IPriceFeedContract[]>;
93
+ /**
94
+ * @internal
95
+ * Diagnostic snapshot of the most recent price-update round, or
96
+ * `undefined` if no updates have been generated yet.
97
+ **/
98
+ get latestUpdate(): LatestUpdate | undefined;
99
+ /**
100
+ * @internal
101
+ * Returns true if any of the updaters are in historical mode
102
+ */
103
+ get historical(): boolean;
104
+ }
105
+ //#endregion
106
+ export { UpdatablePriceFeedRegistry };
@@ -0,0 +1,6 @@
1
+ import { PriceUpdate } from "../types.js";
2
+ import { UpdatePriceFeedsResult } from "./types.js";
3
+ //#region src/onchain/market/pricefeeds/updates/getRawPriceUpdates.d.ts
4
+ declare function getRawPriceUpdates(updates: UpdatePriceFeedsResult): PriceUpdate[];
5
+ //#endregion
6
+ export { getRawPriceUpdates };
@@ -1,5 +1,9 @@
1
- import { IPriceUpdateTask, IPriceUpdater, TimestampedCalldata, TimestampedCalldataWithPrice } from "./types.js";
2
- import { FetchRedstonePayloadsOptions, fetchRedstonePayloads } from "./fetchRedstonePayloads.js";
3
1
  import { PriceUpdatesCache } from "./PriceUpdatesCache.js";
4
2
  import { RedstoneOptions, RedstoneUpdater } from "./RedstoneUpdater.js";
5
- export { FetchRedstonePayloadsOptions, type IPriceUpdateTask, type IPriceUpdater, PriceUpdatesCache, RedstoneOptions, RedstoneUpdater, type TimestampedCalldata, type TimestampedCalldataWithPrice, fetchRedstonePayloads };
3
+ import { IPriceUpdateTask, IPriceUpdater, IUpdatablePriceFeedContract, LatestUpdate, TimestampedCalldata, TimestampedCalldataWithPrice, UpdatablePriceFeedRegistryHooks, UpdatablePriceFeedRegistryOptions, UpdatePriceFeedsResult } from "./types.js";
4
+ import { FetchRedstonePayloadsOptions, fetchRedstonePayloads } from "./fetchRedstonePayloads.js";
5
+ import { getRawPriceUpdates } from "./getRawPriceUpdates.js";
6
+ import { isUpdatablePriceFeed } from "./isUpdatablePriceFeed.js";
7
+ import { UpdatablePriceFeedRegistry } from "./UpdatablePriceFeedRegistry.js";
8
+ import { updatableDependencies } from "./updatableDependencies.js";
9
+ export { FetchRedstonePayloadsOptions, type IPriceUpdateTask, type IPriceUpdater, type IUpdatablePriceFeedContract, type LatestUpdate, PriceUpdatesCache, RedstoneOptions, RedstoneUpdater, type TimestampedCalldata, type TimestampedCalldataWithPrice, UpdatablePriceFeedRegistry, type UpdatablePriceFeedRegistryHooks, type UpdatablePriceFeedRegistryOptions, type UpdatePriceFeedsResult, fetchRedstonePayloads, getRawPriceUpdates, isUpdatablePriceFeed, updatableDependencies };
@@ -0,0 +1,6 @@
1
+ import { IPriceFeedContract } from "../types.js";
2
+ import { IUpdatablePriceFeedContract } from "./types.js";
3
+ //#region src/onchain/market/pricefeeds/updates/isUpdatablePriceFeed.d.ts
4
+ declare function isUpdatablePriceFeed(pf: IPriceFeedContract): pf is IUpdatablePriceFeedContract;
5
+ //#endregion
6
+ export { isUpdatablePriceFeed };
@@ -1,5 +1,6 @@
1
1
  import { IPriceFeedContract } from "../types.js";
2
- import { IPriceUpdateTx } from "../../../types/transactions.js";
2
+ import { RedstoneOptions } from "./RedstoneUpdater.js";
3
+ import { IPriceUpdateTx, RawTx } from "../../../types/transactions.js";
3
4
  import "../../../types/index.js";
4
5
  import { Address } from "viem";
5
6
  //#region src/onchain/market/pricefeeds/updates/types.d.ts
@@ -29,5 +30,58 @@ interface TimestampedCalldataWithPrice extends TimestampedCalldata {
29
30
  price: bigint;
30
31
  decimals: number;
31
32
  }
33
+ /**
34
+ * Extended price feed interface for feeds whose price can be refreshed
35
+ * via an off-chain data push (e.g. Pyth or Redstone feeds).
36
+ **/
37
+ interface IUpdatablePriceFeedContract extends IPriceFeedContract {
38
+ /**
39
+ * Builds a raw transaction that pushes new price data to the on-chain feed.
40
+ * @param data - ABI-encoded update payload.
41
+ **/
42
+ createPriceUpdateTx: (data: `0x${string}`) => RawTx;
43
+ }
44
+ /**
45
+ * Result of generating price-feed update transactions.
46
+ **/
47
+ interface UpdatePriceFeedsResult {
48
+ /**
49
+ * Transactions that push fresh prices to updatable feeds.
50
+ **/
51
+ txs: IPriceUpdateTx[];
52
+ /**
53
+ * Latest timestamp among all fetched price updates (unix seconds).
54
+ **/
55
+ timestamp: number;
56
+ }
57
+ type UpdatablePriceFeedRegistryHooks = {
58
+ /**
59
+ * Emitted when transactions to update price feeds have been generated, but before they're used anywhere
60
+ */
61
+ updatesGenerated: [UpdatePriceFeedsResult];
62
+ };
63
+ /**
64
+ * Configuration for external price-update providers supported by the registry.
65
+ **/
66
+ interface UpdatablePriceFeedRegistryOptions {
67
+ /**
68
+ * Redstone price-update provider options.
69
+ **/
70
+ redstone?: RedstoneOptions;
71
+ }
72
+ /**
73
+ * @internal
74
+ * Diagnostic snapshot of the most recent price-update round.
75
+ **/
76
+ interface LatestUpdate {
77
+ /**
78
+ * Unix timestamp (seconds) of the most recent update.
79
+ **/
80
+ timestamp: number;
81
+ /**
82
+ * Individual update tasks that were executed.
83
+ **/
84
+ updates: IPriceUpdateTask[];
85
+ }
32
86
  //#endregion
33
- export { IPriceUpdateTask, IPriceUpdater, TimestampedCalldata, TimestampedCalldataWithPrice };
87
+ export { IPriceUpdateTask, IPriceUpdater, IUpdatablePriceFeedContract, LatestUpdate, TimestampedCalldata, TimestampedCalldataWithPrice, UpdatablePriceFeedRegistryHooks, UpdatablePriceFeedRegistryOptions, UpdatePriceFeedsResult };
@@ -0,0 +1,10 @@
1
+ import { IPriceFeedContract } from "../types.js";
2
+ import { IUpdatablePriceFeedContract } from "./types.js";
3
+ //#region src/onchain/market/pricefeeds/updates/updatableDependencies.d.ts
4
+ /**
5
+ * Collects updatable feeds in this feed's dependency tree, including this
6
+ * feed itself when it is updatable.
7
+ **/
8
+ declare function updatableDependencies(feed: IPriceFeedContract): IUpdatablePriceFeedContract[];
9
+ //#endregion
10
+ export { updatableDependencies };
@@ -7,6 +7,7 @@ import { SDKConstruct } from "../../base/SDKConstruct.js";
7
7
  import "../../base/index.js";
8
8
  import { Address } from "abitype";
9
9
  //#region src/onchain/market/rwa/RWARegistry.d.ts
10
+ declare const RWA_COMPRESSOR_ADDRESS = "0x9Bff226505632930BA1897E7943e90A2f7D0D9f7";
10
11
  /**
11
12
  * Registry of RWA underlying tokens and RWA factory contracts.
12
13
  *
@@ -69,4 +70,4 @@ declare class RWARegistry extends SDKConstruct {
69
70
  setState(resp?: RWACompressorResponse): void;
70
71
  }
71
72
  //#endregion
72
- export { RWARegistry };
73
+ export { RWARegistry, RWA_COMPRESSOR_ADDRESS };
@@ -5,9 +5,9 @@ import { SecuritizeRWAFactory } from "./securitize/SecuritizeRWAFactory.js";
5
5
  import { SecuritizeDegenNFT } from "./securitize/SecuritizeDegenNFT.js";
6
6
  import { SecuritizeLiquidatorContract } from "./securitize/SecuritizeLiquidatorContract.js";
7
7
  import "./securitize/index.js";
8
- import { GetInvestorOptions, GetOpenAccountRequirementsProps, IDegenNFT, IRWAFactory, KycCheckResult, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAInvestorData, RWAState, RWAStateHuman, RWAUnderlyingData, isRWAFactory } from "./types.js";
8
+ import { GetInvestorOptions, GetOpenAccountRequirementsProps, IDegenNFT, IRWAFactory, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryProtocol, RWAFactoryStateHuman, RWAInvestorData, RWAState, RWAStateHuman, RWAUnderlyingData, isRWAFactory } from "./types.js";
9
9
  import { MidasDegenNFT } from "./midas/MidasDegenNFT.js";
10
10
  import { MidasLiquidatorContract } from "./midas/MidasLiquidatorContract.js";
11
11
  import "./midas/index.js";
12
- import { RWARegistry } from "./RWARegistry.js";
13
- export { DEGEN_NFT_MIDAS, DEGEN_NFT_SECURITIZE, DStokenData, GetInvestorOptions, GetOpenAccountRequirementsProps, IDegenNFT, IRWAFactory, KycCheckResult, MidasDegenNFT, MidasLiquidatorContract, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAInvestorData, RWARegistry, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, SecuritizeCreditAccountData, SecuritizeDegenNFT, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, isRWAFactory };
12
+ import { RWARegistry, RWA_COMPRESSOR_ADDRESS } from "./RWARegistry.js";
13
+ export { DEGEN_NFT_MIDAS, DEGEN_NFT_SECURITIZE, DStokenData, GetInvestorOptions, GetOpenAccountRequirementsProps, IDegenNFT, IRWAFactory, MidasDegenNFT, MidasLiquidatorContract, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryProtocol, RWAFactoryStateHuman, RWAInvestorData, RWARegistry, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_COMPRESSOR_ADDRESS, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, SecuritizeCreditAccountData, SecuritizeDegenNFT, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, isRWAFactory };
@@ -1,5 +1,7 @@
1
+ import { MidasOpenAccountRequirements } from "../../../../model/rwa.js";
2
+ import "../../../../model/index.js";
1
3
  import { RelaxedBaseParams } from "../../../base/types.js";
2
- import { IDegenNFT, KycCheckResult } from "../types.js";
4
+ import { GetOpenAccountRequirementsProps, IDegenNFT } from "../types.js";
3
5
  import { OnchainSDK } from "../../../OnchainSDK.js";
4
6
  import { BaseContract } from "../../../base/BaseContract.js";
5
7
  import "../../../base/index.js";
@@ -85,14 +87,27 @@ declare const abi: readonly [{
85
87
  readonly inputs: readonly [];
86
88
  }];
87
89
  type abi = typeof abi;
88
- declare class MidasDegenNFT extends BaseContract<abi> implements IDegenNFT {
90
+ /**
91
+ * Midas is an RWA protocol without a factory: accounts open through the plain
92
+ * facade. Only a Permissioned-mode gateway deploys a degen NFT, so a Midas
93
+ * strategy that does not require KYC has no NFT at all.
94
+ */
95
+ declare class MidasDegenNFT extends BaseContract<abi> implements IDegenNFT<"midas"> {
96
+ #private;
89
97
  readonly protocol: "midas";
98
+ readonly registrationLink: string;
90
99
  readonly gateway: Address;
91
100
  readonly accessControl: Address;
92
101
  readonly greenlistedRole: Hex;
93
102
  constructor(sdk: OnchainSDK, baseParams: RelaxedBaseParams);
94
- /** Same predicate `MidasDegenNFT.burn` reverts on; the mToken rides along in the batch. */
95
- checkKyc(wallet: Address, _targetCollateral: Address): Promise<KycCheckResult>;
103
+ getTokens(): Promise<Address[]>;
104
+ /**
105
+ * Same predicate `MidasDegenNFT.burn` reverts on; the mToken rides along in
106
+ * the batch until it is cached.
107
+ */
108
+ getOpenAccountRequirements(wallet: Address, _props: GetOpenAccountRequirementsProps): Promise<MidasOpenAccountRequirements>;
109
+ isRegistered(requirements: MidasOpenAccountRequirements): boolean;
110
+ getMissingRequirements(): undefined;
96
111
  }
97
112
  //#endregion
98
113
  export { MidasDegenNFT };
@@ -1,5 +1,7 @@
1
+ import { SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs } from "../../../../model/rwa.js";
2
+ import "../../../../model/index.js";
1
3
  import { SecuritizeRWAFactory } from "./SecuritizeRWAFactory.js";
2
- import { IDegenNFT, KycCheckResult } from "../types.js";
4
+ import { GetOpenAccountRequirementsProps, IDegenNFT } from "../types.js";
3
5
  import { OnchainSDK } from "../../../OnchainSDK.js";
4
6
  import { BaseContract } from "../../../base/BaseContract.js";
5
7
  import "../../../base/index.js";
@@ -410,12 +412,30 @@ declare const abi: readonly [{
410
412
  }];
411
413
  }];
412
414
  type abi = typeof abi;
413
- declare class SecuritizeDegenNFT extends BaseContract<abi> implements IDegenNFT {
415
+ /**
416
+ * Securitize always has a factory, which deploys this NFT. DS-token data,
417
+ * registrars and cached signatures live here; the factory only builds txs
418
+ * and looks up investor/wallet addresses.
419
+ */
420
+ declare class SecuritizeDegenNFT extends BaseContract<abi> implements IDegenNFT<"securitize"> {
421
+ #private;
414
422
  readonly protocol: "securitize";
423
+ readonly registrationLink: string;
415
424
  readonly factory: SecuritizeRWAFactory;
416
425
  constructor(sdk: OnchainSDK, address: Address, factory: SecuritizeRWAFactory);
417
- /** Registration on Securitize is the only KYC step; pending EIP-712 signatures are not. */
418
- checkKyc(wallet: Address, targetCollateral: Address): Promise<KycCheckResult>;
426
+ getTokens(): Promise<Address[]>;
427
+ /**
428
+ * Registration on Securitize is the protocol-side KYC step; pending
429
+ * EIP-712 signatures are tx-side leftover, not KYC.
430
+ */
431
+ getOpenAccountRequirements(wallet: Address, props: GetOpenAccountRequirementsProps): Promise<SecuritizeOpenAccountRequirements>;
432
+ isRegistered(requirements: SecuritizeOpenAccountRequirements): boolean;
433
+ /**
434
+ * A required signature is omitted when `providedArgs.signaturesToCache`
435
+ * already carries a signature for the same token: the transaction caches it
436
+ * on-chain as part of the operation.
437
+ */
438
+ getMissingRequirements(requirements: SecuritizeOpenAccountRequirements, providedArgs?: SecuritizeOperationArgs): SecuritizeMissingOpenAccountRequirements | undefined;
419
439
  }
420
440
  //#endregion
421
441
  export { SecuritizeDegenNFT };
@@ -1,8 +1,8 @@
1
- import { RWA_FACTORY_SECURITIZE, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs } from "../../../../model/rwa.js";
1
+ import { RWA_FACTORY_SECURITIZE, SecuritizeOperationArgs } from "../../../../model/rwa.js";
2
2
  import "../../../../model/index.js";
3
3
  import { DStokenData, SecuritizeInvestorData, SecuritizeRWAFactoryStateHuman } from "./types.js";
4
4
  import { SecuritizeDegenNFT } from "./SecuritizeDegenNFT.js";
5
- import { GetInvestorOptions, GetOpenAccountRequirementsProps, IRWAFactory, RWACompressorInvestorData, RWAFactoryData } from "../types.js";
5
+ import { GetInvestorOptions, IRWAFactory, RWACompressorInvestorData, RWAFactoryData } from "../types.js";
6
6
  import { MultiCall, RawTx } from "../../../types/transactions.js";
7
7
  import { OnchainSDK } from "../../../OnchainSDK.js";
8
8
  import "../../../types/index.js";
@@ -497,18 +497,6 @@ declare class SecuritizeRWAFactory extends BaseContract<abi> implements IRWAFact
497
497
  * {@inheritDoc IRWAFactory.multicall}
498
498
  */
499
499
  multicall(creditAccount: Address, calls: MultiCall[], args?: SecuritizeOperationArgs): RawTx;
500
- /**
501
- * {@inheritDoc IRWAFactory.getOpenAccountRequirements}
502
- */
503
- getOpenAccountRequirements(investor: Address, props: GetOpenAccountRequirementsProps): Promise<SecuritizeOpenAccountRequirements | undefined>;
504
- /**
505
- * {@inheritDoc IRWAFactory.getMissingRequirements}
506
- *
507
- * A required signature is omitted when `providedArgs.signaturesToCache`
508
- * already carries a signature for the same token: the transaction caches it
509
- * on-chain as part of the operation.
510
- */
511
- getMissingRequirements(requirements: SecuritizeOpenAccountRequirements, providedArgs?: SecuritizeOperationArgs): SecuritizeMissingOpenAccountRequirements | undefined;
512
500
  /**
513
501
  * {@inheritDoc IRWAFactory.openCreditAccount}
514
502
  */
@@ -1,5 +1,5 @@
1
1
  import { iRWACompressorAbi } from "../../../abi/rwa/iRWACompressor.js";
2
- import { KycProtocol, RWAFactoryType, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWA_FACTORY_SECURITIZE } from "../../../model/rwa.js";
2
+ import { RWAFactoryType, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWAProtocol, RWA_FACTORY_SECURITIZE } from "../../../model/rwa.js";
3
3
  import "../../../model/index.js";
4
4
  import { IBaseContract, Unarray } from "../../base/types.js";
5
5
  import { SecuritizeInvestorData, SecuritizeRWAFactoryStateHuman } from "./securitize/types.js";
@@ -19,10 +19,15 @@ import { AbiParametersToPrimitiveTypes, ExtractAbiFunction } from "abitype";
19
19
  **/
20
20
  interface RWAFactoryTypeMap {
21
21
  [RWA_FACTORY_SECURITIZE]: {
22
+ protocol: "securitize";
22
23
  investorData: SecuritizeInvestorData;
23
24
  stateHuman: SecuritizeRWAFactoryStateHuman;
24
25
  };
25
26
  }
27
+ /**
28
+ * {@link RWAProtocol} of the factory type `T`.
29
+ **/
30
+ type RWAFactoryProtocol<T extends RWAFactoryType> = RWAFactoryTypeMap[T]["protocol"];
26
31
  /**
27
32
  * Investor data decoded from the RWA compressor, defaults to union of all factory types
28
33
  * Can be discriminated by type
@@ -151,26 +156,7 @@ interface IRWAFactory<T extends RWAFactoryType = RWAFactoryType> extends IBaseCo
151
156
  * @param args - factory-specific args (e.g. tokens to register, signatures to cache).
152
157
  * Undefined value means that no RWA actions are required
153
158
  **/
154
- multicall(creditAccount: Address, calls: MultiCall[], args?: RWAOperationArgs<T>): RawTx;
155
- /**
156
- * Checks if the user can open a credit account with this factory.
157
- * @param investor - investor address
158
- * @param props - {@link GetOpenAccountRequirementsProps}
159
- * @returns open account requirements for the investor, or `undefined` if the
160
- * user can open a credit account without any further actions
161
- **/
162
- getOpenAccountRequirements(investor: Address, props: GetOpenAccountRequirementsProps): Promise<RWAOpenAccountRequirements<T> | undefined>;
163
- /**
164
- * Computes the subset of `requirements` still unfulfilled, given the
165
- * factory-specific params already carried by the transaction calldata.
166
- *
167
- * @param requirements - requirements fetched via {@link getOpenAccountRequirements}
168
- * @param providedArgs - params decoded from the transaction calldata, if
169
- * any; e.g. signatures already included there need not be signed again
170
- * @returns the missing requirements, or `undefined` when everything is
171
- * satisfied
172
- **/
173
- getMissingRequirements(requirements: RWAOpenAccountRequirements<T>, providedArgs?: RWAOperationArgs<T>): RWAMissingOpenAccountRequirements<T> | undefined;
159
+ multicall(creditAccount: Address, calls: MultiCall[], args?: RWAOperationArgs<RWAFactoryProtocol<T>>): RawTx;
174
160
  /**
175
161
  * Creates a raw transaction to open a credit account.
176
162
  * Similar to {@link CreditFacadeV310Contract.openCreditAccount}.
@@ -180,25 +166,41 @@ interface IRWAFactory<T extends RWAFactoryType = RWAFactoryType> extends IBaseCo
180
166
  * @param args - factory-specific args (e.g. tokens to register, signatures to cache).
181
167
  * Undefined value means that no RWA actions are required (e.g. when we open second credit account)
182
168
  **/
183
- openCreditAccount(creditManager: Address, calls: MultiCall[], args?: RWAOperationArgs<T>): RawTx;
184
- }
185
- /**
186
- * Result of {@link IDegenNFT.checkKyc}.
187
- */
188
- interface KycCheckResult {
189
- eligible: boolean;
190
- /** Token the wallet must be registered for. */
191
- token: Address;
169
+ openCreditAccount(creditManager: Address, calls: MultiCall[], args?: RWAOperationArgs<RWAFactoryProtocol<T>>): RawTx;
170
+ /**
171
+ * Degen NFT this factory deploys as the KYC gate. Midas has no factory;
172
+ * its NFT is loaded separately via {@link createDegenNFT}.
173
+ **/
174
+ readonly degenNFT: IDegenNFT<RWAFactoryProtocol<T>>;
192
175
  }
193
176
  /**
194
- * Degen NFT that gates credit-account opening behind a KYC provider.
195
- */
196
- interface IDegenNFT extends IBaseContract {
197
- readonly protocol: KycProtocol;
177
+ * Degen NFT that gates credit-account opening behind an RWA KYC provider.
178
+ **/
179
+ interface IDegenNFT<P extends RWAProtocol = RWAProtocol> extends IBaseContract {
180
+ readonly protocol: P;
181
+ readonly registrationLink: string;
182
+ /**
183
+ * Tokens this gate is about: Securitize DS tokens, or the Midas mToken.
184
+ */
185
+ getTokens(): Promise<Address[]>;
186
+ /**
187
+ * What `wallet` still has to do before this gate lets it open on the
188
+ * strategy token in `props`.
189
+ */
190
+ getOpenAccountRequirements(wallet: Address, props: GetOpenAccountRequirementsProps): Promise<RWAOpenAccountRequirements<P>>;
191
+ /**
192
+ * Protocol-side KYC is done: registered at Securitize for every requested
193
+ * DS token, or greenlisted by Midas.
194
+ *
195
+ * User might still be required to do additional actions on Gearbox side,
196
+ * e.g. sign EIP-712 messages for Securitize
197
+ */
198
+ isRegistered(requirements: RWAOpenAccountRequirements<P>): boolean;
198
199
  /**
199
- * Same predicate the NFT's `burn` reverts on.
200
+ * Leftover Gearbox-tx work given `providedArgs` already on the calldata.
201
+ * Always `undefined` for Midas (no tx args).
200
202
  */
201
- checkKyc(wallet: Address, targetCollateral: Address): Promise<KycCheckResult>;
203
+ getMissingRequirements(requirements: RWAOpenAccountRequirements<P>, providedArgs?: RWAOperationArgs<P>): RWAMissingOpenAccountRequirements<P> | undefined;
202
204
  }
203
205
  /**
204
206
  * Narrows any contract to an {@link IRWAFactory}.
@@ -211,4 +213,4 @@ interface IDegenNFT extends IBaseContract {
211
213
  **/
212
214
  declare function isRWAFactory<T extends RWAFactoryType = RWAFactoryType>(contract: IBaseContract, type?: T): contract is IRWAFactory<T>;
213
215
  //#endregion
214
- export { GetInvestorOptions, GetOpenAccountRequirementsProps, IDegenNFT, IRWAFactory, KycCheckResult, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAInvestorData, RWAState, RWAStateHuman, RWAUnderlyingData, isRWAFactory };
216
+ export { GetInvestorOptions, GetOpenAccountRequirementsProps, IDegenNFT, IRWAFactory, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryProtocol, RWAFactoryStateHuman, RWAInvestorData, RWAState, RWAStateHuman, RWAUnderlyingData, isRWAFactory };
@@ -33,7 +33,11 @@ declare class MultichainOpportunitiesService<const Plugins extends PluginsMap =
33
33
  *
34
34
  * See {@link MultichainOpportunitiesService.getPool}.
35
35
  **/
36
- getStrategy(key: StrategyOpportunityKey, wallet?: Address): Promise<DataResponse<StrategyOpportunityDetail>>;
36
+ getStrategy(key: StrategyOpportunityKey): Promise<DataResponse<StrategyOpportunityDetail>>;
37
+ /**
38
+ * {@inheritDoc OpportunitiesService.isEligibleForStrategy}
39
+ **/
40
+ isEligibleForStrategy(key: StrategyOpportunityKey, wallet: Address): Promise<boolean>;
37
41
  }
38
42
  //#endregion
39
43
  export { MultichainOpportunitiesService };
@@ -34,13 +34,20 @@ declare class OpportunitiesService extends SDKConstruct {
34
34
  * A single strategy opportunity plus the rate curve of the pool it borrows
35
35
  * from and the price feeds its liquidation price depends on.
36
36
  *
37
- * @param wallet - When given, `kyc` says whether this wallet must register
38
- * with the strategy's KYC provider first; `null` otherwise.
37
+ * `kyc` is the strategy's KYC gate, independent of any wallet.
39
38
  *
40
39
  * @throws If the credit manager is unknown, or does not currently offer a
41
40
  * strategy.
42
41
  **/
43
- getStrategy(key: StrategyOpportunityKey, wallet?: Address): Promise<StrategyOpportunityDetail>;
42
+ getStrategy(key: StrategyOpportunityKey): Promise<StrategyOpportunityDetail>;
43
+ /**
44
+ * Whether `wallet` may open this strategy today: `true` when it is not
45
+ * KYC-gated or the wallet already passed the gate.
46
+ *
47
+ * @throws If the credit manager is unknown, or does not currently offer a
48
+ * strategy.
49
+ **/
50
+ isEligibleForStrategy(key: StrategyOpportunityKey, wallet: Address): Promise<boolean>;
44
51
  }
45
52
  //#endregion
46
53
  export { OpportunitiesService };
@@ -22,7 +22,12 @@ interface IMultichainOpportunitiesService {
22
22
  /**
23
23
  * Detailed view of one strategy opportunity.
24
24
  **/
25
- getStrategy(key: StrategyOpportunityKey, wallet?: Address): Promise<DataResponse<StrategyOpportunityDetail>>;
25
+ getStrategy(key: StrategyOpportunityKey): Promise<DataResponse<StrategyOpportunityDetail>>;
26
+ /**
27
+ * Whether `wallet` may open this strategy today. Throws when that chain
28
+ * cannot answer.
29
+ **/
30
+ isEligibleForStrategy(key: StrategyOpportunityKey, wallet: Address): Promise<boolean>;
26
31
  }
27
32
  //#endregion
28
33
  export { IMultichainOpportunitiesService };
@@ -15,10 +15,11 @@ import { buildDelayedStrategyPositionOperationPreview } from "./preview/buildDel
15
15
  import { classifyCloseOrRepay, isCloseOrRepay } from "./preview/detectCloseOrRepay.js";
16
16
  import { DetectedDelayedClaim, detectDelayedClaim, resolveDelayedClaimIntent } from "./preview/detectDelayedClaim.js";
17
17
  import { estimateClaimableAt } from "./preview/estimateClaimableAt.js";
18
+ import { midasGreenlistsAccount } from "./preview/midasGreenlistsAccount.js";
18
19
  import { ReplayState, makeReplayState, replayInnerOperations } from "./preview/replayInnerOperations.js";
19
20
  import { ReplayMulticallResult, ReplayableOperation, replayMulticall } from "./preview/replayMulticall.js";
20
21
  import { previewAdjustStrategyPosition } from "./preview/previewAdjustStrategyPosition.js";
21
22
  import { CloseOrRepayOperation, previewExitOrRepayStrategyPosition } from "./preview/previewExitOrRepayStrategyPosition.js";
22
23
  import { PreviewOperationError, previewOperation } from "./preview/previewOperation.js";
23
24
  import "./preview/index.js";
24
- export { AdapterOperation, AdapterOperationBase, AddCollateralOp, ClassifyInnerOperationsProps, CloseCreditAccountOperation, CloseOrRepayOperation, CompareBalancesOp, CreditAccountOperation, CreditAccountState, CreditAccountStateProps, DecreaseDebtOp, DetectedDelayedClaim, DetectedDelayedOperation, DirectTokenTransferOperation, FacadeOperationMetadata, IncreaseDebtOp, InnerFacadeOperation, InnerOperation, LiquidateCreditAccountOperation, MulticallOperation, OpenCreditAccountOperation, Operation, OperationMetadata, OuterFacadeOperation, PartialLiquidationOperation, PoolDepositOperation, PoolMintOperation, PoolOperation, PoolRedeemOperation, PoolWithdrawOperation, PreviewOperationError, RWAMulticallOperation, RWAOpenCreditAccountOperation, RWAOperation, RWAOperationMetadata, ReplayMulticallResult, ReplayState, ReplayableOperation, StoreExpectedBalancesOp, TraceAdapterExt, UpdateQuotaOp, WithdrawCollateralOp, buildDelayedStrategyPositionOperationPreview, classifyCloseOrRepay, classifyInnerOperations, detectDelayedClaim, detectDelayedOperation, estimateClaimableAt, isCloseOrRepay, isPoolOperation, isRWAOperation, makeReplayState, parseFacadeOperationCalldata, parseOperationCalldata, parsePoolOperationCalldata, parseRWAFactoryOperationCalldata, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent };
25
+ export { AdapterOperation, AdapterOperationBase, AddCollateralOp, ClassifyInnerOperationsProps, CloseCreditAccountOperation, CloseOrRepayOperation, CompareBalancesOp, CreditAccountOperation, CreditAccountState, CreditAccountStateProps, DecreaseDebtOp, DetectedDelayedClaim, DetectedDelayedOperation, DirectTokenTransferOperation, FacadeOperationMetadata, IncreaseDebtOp, InnerFacadeOperation, InnerOperation, LiquidateCreditAccountOperation, MulticallOperation, OpenCreditAccountOperation, Operation, OperationMetadata, OuterFacadeOperation, PartialLiquidationOperation, PoolDepositOperation, PoolMintOperation, PoolOperation, PoolRedeemOperation, PoolWithdrawOperation, PreviewOperationError, RWAMulticallOperation, RWAOpenCreditAccountOperation, RWAOperation, RWAOperationMetadata, ReplayMulticallResult, ReplayState, ReplayableOperation, StoreExpectedBalancesOp, TraceAdapterExt, UpdateQuotaOp, WithdrawCollateralOp, buildDelayedStrategyPositionOperationPreview, classifyCloseOrRepay, classifyInnerOperations, detectDelayedClaim, detectDelayedOperation, estimateClaimableAt, isCloseOrRepay, isPoolOperation, isRWAOperation, makeReplayState, midasGreenlistsAccount, parseFacadeOperationCalldata, parseOperationCalldata, parsePoolOperationCalldata, parseRWAFactoryOperationCalldata, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent };
@@ -4,9 +4,10 @@ import { buildDelayedStrategyPositionOperationPreview } from "./buildDelayedStra
4
4
  import { classifyCloseOrRepay, isCloseOrRepay } from "./detectCloseOrRepay.js";
5
5
  import { DetectedDelayedClaim, detectDelayedClaim, resolveDelayedClaimIntent } from "./detectDelayedClaim.js";
6
6
  import { estimateClaimableAt } from "./estimateClaimableAt.js";
7
+ import { midasGreenlistsAccount } from "./midasGreenlistsAccount.js";
7
8
  import { ReplayState, makeReplayState, replayInnerOperations } from "./replayInnerOperations.js";
8
9
  import { ReplayMulticallResult, ReplayableOperation, replayMulticall } from "./replayMulticall.js";
9
10
  import { previewAdjustStrategyPosition } from "./previewAdjustStrategyPosition.js";
10
11
  import { CloseOrRepayOperation, previewExitOrRepayStrategyPosition } from "./previewExitOrRepayStrategyPosition.js";
11
12
  import { PreviewOperationError, previewOperation } from "./previewOperation.js";
12
- export { CloseOrRepayOperation, CreditAccountState, CreditAccountStateProps, DetectedDelayedClaim, DetectedDelayedOperation, PreviewOperationError, ReplayMulticallResult, ReplayState, ReplayableOperation, buildDelayedStrategyPositionOperationPreview, classifyCloseOrRepay, detectDelayedClaim, detectDelayedOperation, estimateClaimableAt, isCloseOrRepay, makeReplayState, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent };
13
+ export { CloseOrRepayOperation, CreditAccountState, CreditAccountStateProps, DetectedDelayedClaim, DetectedDelayedOperation, PreviewOperationError, ReplayMulticallResult, ReplayState, ReplayableOperation, buildDelayedStrategyPositionOperationPreview, classifyCloseOrRepay, detectDelayedClaim, detectDelayedOperation, estimateClaimableAt, isCloseOrRepay, makeReplayState, midasGreenlistsAccount, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent };