@gearbox-protocol/sdk 18.1.0-next.1 → 18.2.0-aave.1

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 (297) hide show
  1. package/dist/cjs/abi/310/iKillSwitchProxy.js +130 -0
  2. package/dist/cjs/abi/compressors/subcompressors/liquidation/treehouseLiquidationSubcompressor.js +179 -0
  3. package/dist/cjs/abi/compressors/subcompressors/withdrawal/treehouseWithdrawalSubcompressor.js +534 -0
  4. package/dist/cjs/abi/router/treehouseWorker.js +885 -0
  5. package/dist/cjs/model/aave.js +1 -0
  6. package/dist/cjs/model/index.js +1 -0
  7. package/dist/cjs/onchain/accounts/intents/index.js +1 -0
  8. package/dist/cjs/onchain/accounts/intents/operations.js +21 -0
  9. package/dist/cjs/onchain/accounts/intents/plan.js +33 -0
  10. package/dist/cjs/onchain/accounts/intents/realize.js +44 -0
  11. package/dist/cjs/onchain/accounts/intents/testing/market.js +1 -0
  12. package/dist/cjs/onchain/accounts/intents/testing/sdk-mock.js +2 -1
  13. package/dist/cjs/onchain/accounts/intents/utils/ledger.js +8 -0
  14. package/dist/cjs/onchain/chain/chains.js +4 -0
  15. package/dist/cjs/onchain/index.js +30 -0
  16. package/dist/cjs/onchain/market/adapters/abi/aave/iAaveHorizonBridge.js +94 -0
  17. package/dist/cjs/onchain/market/adapters/abi/aave/iAaveV3Pool.js +112 -0
  18. package/dist/cjs/onchain/market/adapters/abi/aave/index.js +5 -0
  19. package/dist/cjs/onchain/market/adapters/abi/actionAbi.js +2 -0
  20. package/dist/cjs/onchain/market/adapters/abi/adapters/iAaveHorizonBridgeAdapter.js +197 -0
  21. package/dist/cjs/onchain/market/adapters/abi/adapters/iAaveV3PoolAdapter.js +177 -0
  22. package/dist/cjs/onchain/market/adapters/abi/adapters/iTreehouseFastlaneAdapter.js +113 -0
  23. package/dist/cjs/onchain/market/adapters/abi/adapters/iTreehouseRedemptionGatewayAdapter.js +258 -0
  24. package/dist/cjs/onchain/market/adapters/abi/adapters/iTreehouseRouterAdapter.js +161 -0
  25. package/dist/cjs/onchain/market/adapters/abi/adapters/index.js +10 -0
  26. package/dist/cjs/onchain/market/adapters/abi/conctructorAbi.js +5 -0
  27. package/dist/cjs/onchain/market/adapters/abi/index.js +22 -0
  28. package/dist/cjs/onchain/market/adapters/abi/treehouse/iTreehouseFastlane.js +39 -0
  29. package/dist/cjs/onchain/market/adapters/abi/treehouse/iTreehouseRedemptionGateway.js +230 -0
  30. package/dist/cjs/onchain/market/adapters/abi/treehouse/iTreehouseRouter.js +29 -0
  31. package/dist/cjs/onchain/market/adapters/abi/treehouse/index.js +7 -0
  32. package/dist/cjs/onchain/market/adapters/contracts/AaveHorizonBridgeAdapterContract.js +130 -0
  33. package/dist/cjs/onchain/market/adapters/contracts/AaveV3PoolAdapterContract.js +205 -0
  34. package/dist/cjs/onchain/market/adapters/contracts/AbstractAdapter.js +8 -0
  35. package/dist/cjs/onchain/market/adapters/contracts/TreehouseFastlaneAdapterContract.js +72 -0
  36. package/dist/cjs/onchain/market/adapters/contracts/TreehouseRedemptionGatewayAdapterContract.js +117 -0
  37. package/dist/cjs/onchain/market/adapters/contracts/TreehouseRouterAdapterContract.js +61 -0
  38. package/dist/cjs/onchain/market/adapters/contracts/index.js +10 -0
  39. package/dist/cjs/onchain/market/adapters/createAdapter.js +10 -0
  40. package/dist/cjs/onchain/market/adapters/index.js +30 -0
  41. package/dist/cjs/onchain/market/adapters/types.js +5 -0
  42. package/dist/cjs/onchain/market/index.js +30 -0
  43. package/dist/cjs/onchain/positions/projectAavePosition.js +40 -0
  44. package/dist/cjs/onchain/preview/preview/loadAdapterReplayState.js +17 -0
  45. package/dist/cjs/onchain/preview/preview/previewOperation.js +2 -0
  46. package/dist/cjs/permissionless/api/GearboxPermissionless.js +12 -5
  47. package/dist/cjs/permissionless/api/analytics/PermissionlessAnalytics.js +50 -0
  48. package/dist/cjs/permissionless/api/analytics/index.js +4 -0
  49. package/dist/cjs/permissionless/api/analytics/schemas.js +27 -0
  50. package/dist/cjs/permissionless/api/analytics/types.js +1 -0
  51. package/dist/cjs/permissionless/api/index.js +34 -0
  52. package/dist/cjs/permissionless/api/oracles/PermissionlessOracles.js +715 -27
  53. package/dist/cjs/permissionless/api/oracles/enrich.js +99 -0
  54. package/dist/cjs/permissionless/api/oracles/index.js +33 -0
  55. package/dist/cjs/permissionless/api/oracles/onchain-feed.js +25 -0
  56. package/dist/cjs/permissionless/api/oracles/schemas.js +119 -16
  57. package/dist/cjs/permissionless/api/oracles/score/formula.js +56 -0
  58. package/dist/cjs/permissionless/api/oracles/score/index.js +11 -0
  59. package/dist/cjs/permissionless/api/oracles/score/run.js +252 -0
  60. package/dist/cjs/permissionless/api/oracles/score/types.js +1 -0
  61. package/dist/cjs/permissionless/api/oracles/stress/classify.js +258 -0
  62. package/dist/cjs/permissionless/api/oracles/stress/index.js +24 -0
  63. package/dist/cjs/permissionless/api/oracles/stress/override.js +125 -0
  64. package/dist/cjs/permissionless/api/oracles/stress/run.js +485 -0
  65. package/dist/cjs/permissionless/api/oracles/stress/score.js +98 -0
  66. package/dist/cjs/permissionless/api/oracles/stress/types.js +1 -0
  67. package/dist/cjs/permissionless/api/schemas.js +0 -3
  68. package/dist/cjs/permissionless/api/transactions/InstanceOwnerTransactions.js +14 -3
  69. package/dist/cjs/permissionless/api/transactions/lp-price-feeds.js +10 -4
  70. package/dist/cjs/permissionless/bindings/bytecode-repository.js +8 -0
  71. package/dist/cjs/permissionless/bindings/governance/governor.js +1 -1
  72. package/dist/cjs/permissionless/bindings/index.js +8 -3
  73. package/dist/cjs/permissionless/bindings/kill-switch-proxy.js +188 -0
  74. package/dist/cjs/permissionless/bindings/market-configurator-factory.js +39 -1
  75. package/dist/cjs/permissionless/bindings/market-configurator.js +142 -0
  76. package/dist/cjs/permissionless/index.js +44 -3
  77. package/dist/cjs/permissionless/utils/index.js +3 -0
  78. package/dist/cjs/permissionless/utils/literals.js +2 -0
  79. package/dist/cjs/permissionless/utils/price-update/get-prices.js +64 -0
  80. package/dist/cjs/permissionless/utils/price-update/index.js +2 -0
  81. package/dist/cjs/sdk/prepare/PrepareApi.js +39 -0
  82. package/dist/cjs/sdk/preview/PreviewNamespace.js +33 -0
  83. package/dist/cjs/testnets/TestnetsAPI.js +179 -0
  84. package/dist/cjs/testnets/errors/TestnetNotFoundError.js +15 -0
  85. package/dist/cjs/testnets/errors/TestnetRequestFailedError.js +24 -0
  86. package/dist/cjs/testnets/errors/TestnetStatusError.js +19 -0
  87. package/dist/cjs/testnets/errors/TestnetValidationError.js +24 -0
  88. package/dist/cjs/testnets/errors/TestnetWaitTimeoutError.js +30 -0
  89. package/dist/cjs/testnets/errors/TestnetsError.js +34 -0
  90. package/dist/cjs/testnets/errors/index.js +13 -0
  91. package/dist/cjs/testnets/index.js +32 -0
  92. package/dist/cjs/testnets/package.json +1 -0
  93. package/dist/cjs/testnets/schemas.js +242 -0
  94. package/dist/cjs/testnets/types.js +1 -0
  95. package/dist/esm/abi/310/iKillSwitchProxy.js +129 -0
  96. package/dist/esm/abi/compressors/subcompressors/liquidation/treehouseLiquidationSubcompressor.js +178 -0
  97. package/dist/esm/abi/compressors/subcompressors/withdrawal/treehouseWithdrawalSubcompressor.js +533 -0
  98. package/dist/esm/abi/router/treehouseWorker.js +884 -0
  99. package/dist/esm/model/aave.js +1 -0
  100. package/dist/esm/model/index.js +1 -0
  101. package/dist/esm/onchain/accounts/intents/index.js +2 -1
  102. package/dist/esm/onchain/accounts/intents/operations.js +20 -1
  103. package/dist/esm/onchain/accounts/intents/plan.js +33 -1
  104. package/dist/esm/onchain/accounts/intents/realize.js +46 -2
  105. package/dist/esm/onchain/accounts/intents/testing/market.js +1 -0
  106. package/dist/esm/onchain/accounts/intents/testing/sdk-mock.js +2 -1
  107. package/dist/esm/onchain/accounts/intents/utils/ledger.js +8 -0
  108. package/dist/esm/onchain/chain/chains.js +4 -0
  109. package/dist/esm/onchain/index.js +16 -1
  110. package/dist/esm/onchain/market/adapters/abi/aave/iAaveHorizonBridge.js +93 -0
  111. package/dist/esm/onchain/market/adapters/abi/aave/iAaveV3Pool.js +111 -0
  112. package/dist/esm/onchain/market/adapters/abi/aave/index.js +3 -0
  113. package/dist/esm/onchain/market/adapters/abi/actionAbi.js +2 -0
  114. package/dist/esm/onchain/market/adapters/abi/adapters/iAaveHorizonBridgeAdapter.js +196 -0
  115. package/dist/esm/onchain/market/adapters/abi/adapters/iAaveV3PoolAdapter.js +176 -0
  116. package/dist/esm/onchain/market/adapters/abi/adapters/iTreehouseFastlaneAdapter.js +112 -0
  117. package/dist/esm/onchain/market/adapters/abi/adapters/iTreehouseRedemptionGatewayAdapter.js +257 -0
  118. package/dist/esm/onchain/market/adapters/abi/adapters/iTreehouseRouterAdapter.js +160 -0
  119. package/dist/esm/onchain/market/adapters/abi/adapters/index.js +6 -1
  120. package/dist/esm/onchain/market/adapters/abi/conctructorAbi.js +5 -0
  121. package/dist/esm/onchain/market/adapters/abi/index.js +13 -1
  122. package/dist/esm/onchain/market/adapters/abi/treehouse/iTreehouseFastlane.js +38 -0
  123. package/dist/esm/onchain/market/adapters/abi/treehouse/iTreehouseRedemptionGateway.js +229 -0
  124. package/dist/esm/onchain/market/adapters/abi/treehouse/iTreehouseRouter.js +28 -0
  125. package/dist/esm/onchain/market/adapters/abi/treehouse/index.js +4 -0
  126. package/dist/esm/onchain/market/adapters/contracts/AaveHorizonBridgeAdapterContract.js +129 -0
  127. package/dist/esm/onchain/market/adapters/contracts/AaveV3PoolAdapterContract.js +204 -0
  128. package/dist/esm/onchain/market/adapters/contracts/AbstractAdapter.js +8 -0
  129. package/dist/esm/onchain/market/adapters/contracts/TreehouseFastlaneAdapterContract.js +71 -0
  130. package/dist/esm/onchain/market/adapters/contracts/TreehouseRedemptionGatewayAdapterContract.js +116 -0
  131. package/dist/esm/onchain/market/adapters/contracts/TreehouseRouterAdapterContract.js +60 -0
  132. package/dist/esm/onchain/market/adapters/contracts/index.js +6 -1
  133. package/dist/esm/onchain/market/adapters/createAdapter.js +10 -0
  134. package/dist/esm/onchain/market/adapters/index.js +16 -1
  135. package/dist/esm/onchain/market/adapters/types.js +5 -0
  136. package/dist/esm/onchain/market/index.js +16 -1
  137. package/dist/esm/onchain/positions/projectAavePosition.js +39 -0
  138. package/dist/esm/onchain/preview/preview/loadAdapterReplayState.js +16 -0
  139. package/dist/esm/onchain/preview/preview/previewOperation.js +2 -0
  140. package/dist/esm/permissionless/api/GearboxPermissionless.js +12 -5
  141. package/dist/esm/permissionless/api/analytics/PermissionlessAnalytics.js +49 -0
  142. package/dist/esm/permissionless/api/analytics/index.js +2 -0
  143. package/dist/esm/permissionless/api/analytics/schemas.js +25 -0
  144. package/dist/esm/permissionless/api/analytics/types.js +1 -0
  145. package/dist/esm/permissionless/api/index.js +9 -1
  146. package/dist/esm/permissionless/api/oracles/PermissionlessOracles.js +717 -29
  147. package/dist/esm/permissionless/api/oracles/enrich.js +94 -0
  148. package/dist/esm/permissionless/api/oracles/index.js +10 -1
  149. package/dist/esm/permissionless/api/oracles/onchain-feed.js +24 -0
  150. package/dist/esm/permissionless/api/oracles/schemas.js +109 -17
  151. package/dist/esm/permissionless/api/oracles/score/formula.js +51 -0
  152. package/dist/esm/permissionless/api/oracles/score/index.js +4 -0
  153. package/dist/esm/permissionless/api/oracles/score/run.js +250 -0
  154. package/dist/esm/permissionless/api/oracles/score/types.js +1 -0
  155. package/dist/esm/permissionless/api/oracles/stress/classify.js +256 -0
  156. package/dist/esm/permissionless/api/oracles/stress/index.js +6 -0
  157. package/dist/esm/permissionless/api/oracles/stress/override.js +119 -0
  158. package/dist/esm/permissionless/api/oracles/stress/run.js +478 -0
  159. package/dist/esm/permissionless/api/oracles/stress/score.js +95 -0
  160. package/dist/esm/permissionless/api/oracles/stress/types.js +1 -0
  161. package/dist/esm/permissionless/api/schemas.js +2 -4
  162. package/dist/esm/permissionless/api/transactions/InstanceOwnerTransactions.js +14 -3
  163. package/dist/esm/permissionless/api/transactions/lp-price-feeds.js +10 -4
  164. package/dist/esm/permissionless/bindings/bytecode-repository.js +8 -0
  165. package/dist/esm/permissionless/bindings/governance/governor.js +1 -1
  166. package/dist/esm/permissionless/bindings/index.js +5 -4
  167. package/dist/esm/permissionless/bindings/kill-switch-proxy.js +184 -0
  168. package/dist/esm/permissionless/bindings/market-configurator-factory.js +37 -0
  169. package/dist/esm/permissionless/bindings/market-configurator.js +143 -1
  170. package/dist/esm/permissionless/index.js +14 -6
  171. package/dist/esm/permissionless/utils/index.js +3 -3
  172. package/dist/esm/permissionless/utils/literals.js +2 -1
  173. package/dist/esm/permissionless/utils/price-update/get-prices.js +63 -1
  174. package/dist/esm/permissionless/utils/price-update/index.js +2 -2
  175. package/dist/esm/sdk/GearboxSDK.js +2 -2
  176. package/dist/esm/sdk/prepare/PrepareApi.js +39 -0
  177. package/dist/esm/sdk/preview/PreviewNamespace.js +33 -0
  178. package/dist/esm/testnets/TestnetsAPI.js +178 -0
  179. package/dist/esm/testnets/errors/TestnetNotFoundError.js +14 -0
  180. package/dist/esm/testnets/errors/TestnetRequestFailedError.js +23 -0
  181. package/dist/esm/testnets/errors/TestnetStatusError.js +18 -0
  182. package/dist/esm/testnets/errors/TestnetValidationError.js +23 -0
  183. package/dist/esm/testnets/errors/TestnetWaitTimeoutError.js +29 -0
  184. package/dist/esm/testnets/errors/TestnetsError.js +33 -0
  185. package/dist/esm/testnets/errors/index.js +7 -0
  186. package/dist/esm/testnets/index.js +11 -0
  187. package/dist/esm/testnets/package.json +1 -0
  188. package/dist/esm/testnets/schemas.js +228 -0
  189. package/dist/esm/testnets/types.js +1 -0
  190. package/dist/types/abi/310/iKillSwitchProxy.d.ts +114 -0
  191. package/dist/types/abi/compressors/subcompressors/liquidation/treehouseLiquidationSubcompressor.d.ts +148 -0
  192. package/dist/types/abi/compressors/subcompressors/withdrawal/treehouseWithdrawalSubcompressor.d.ts +440 -0
  193. package/dist/types/abi/router/treehouseWorker.d.ts +728 -0
  194. package/dist/types/model/aave.d.ts +32 -0
  195. package/dist/types/model/analytics.d.ts +2 -2
  196. package/dist/types/model/index.d.ts +6 -5
  197. package/dist/types/model/opportunities.d.ts +1 -1
  198. package/dist/types/model/positions.d.ts +1 -1
  199. package/dist/types/model/previews.d.ts +15 -0
  200. package/dist/types/offchain/AbstractOffchainNamespace.d.ts +1 -1
  201. package/dist/types/offchain/analytics/OffchainAnalytics.d.ts +1 -1
  202. package/dist/types/offchain/analytics/types.d.ts +1 -1
  203. package/dist/types/offchain/opportunities/OffchainOpportunities.d.ts +1 -1
  204. package/dist/types/offchain/opportunities/types.d.ts +1 -1
  205. package/dist/types/offchain/positions/OffchainPositions.d.ts +1 -1
  206. package/dist/types/offchain/positions/types.d.ts +1 -1
  207. package/dist/types/onchain/accounts/intents/operations.d.ts +37 -1
  208. package/dist/types/onchain/accounts/intents/plan.d.ts +26 -1
  209. package/dist/types/onchain/accounts/intents/testing/market.d.ts +4 -0
  210. package/dist/types/onchain/accounts/intents/testing/sdk-mock.d.ts +4 -0
  211. package/dist/types/onchain/accounts/intents/types.d.ts +20 -1
  212. package/dist/types/onchain/index.d.ts +16 -1
  213. package/dist/types/onchain/market/adapters/abi/aave/iAaveHorizonBridge.d.ts +83 -0
  214. package/dist/types/onchain/market/adapters/abi/aave/iAaveV3Pool.d.ts +90 -0
  215. package/dist/types/onchain/market/adapters/abi/aave/index.d.ts +3 -0
  216. package/dist/types/onchain/market/adapters/abi/adapters/iAaveHorizonBridgeAdapter.d.ts +186 -0
  217. package/dist/types/onchain/market/adapters/abi/adapters/iAaveV3PoolAdapter.d.ts +172 -0
  218. package/dist/types/onchain/market/adapters/abi/adapters/iTreehouseFastlaneAdapter.d.ts +101 -0
  219. package/dist/types/onchain/market/adapters/abi/adapters/iTreehouseRedemptionGatewayAdapter.d.ts +237 -0
  220. package/dist/types/onchain/market/adapters/abi/adapters/iTreehouseRouterAdapter.d.ts +146 -0
  221. package/dist/types/onchain/market/adapters/abi/adapters/index.d.ts +6 -1
  222. package/dist/types/onchain/market/adapters/abi/index.d.ts +13 -1
  223. package/dist/types/onchain/market/adapters/abi/treehouse/iTreehouseFastlane.d.ts +33 -0
  224. package/dist/types/onchain/market/adapters/abi/treehouse/iTreehouseRedemptionGateway.d.ts +207 -0
  225. package/dist/types/onchain/market/adapters/abi/treehouse/iTreehouseRouter.d.ts +27 -0
  226. package/dist/types/onchain/market/adapters/abi/treehouse/index.d.ts +4 -0
  227. package/dist/types/onchain/market/adapters/contracts/AaveHorizonBridgeAdapterContract.d.ts +312 -0
  228. package/dist/types/onchain/market/adapters/contracts/AaveV3PoolAdapterContract.d.ts +312 -0
  229. package/dist/types/onchain/market/adapters/contracts/AbstractAdapter.d.ts +8 -0
  230. package/dist/types/onchain/market/adapters/contracts/TreehouseFastlaneAdapterContract.d.ts +156 -0
  231. package/dist/types/onchain/market/adapters/contracts/TreehouseRedemptionGatewayAdapterContract.d.ts +481 -0
  232. package/dist/types/onchain/market/adapters/contracts/TreehouseRouterAdapterContract.d.ts +193 -0
  233. package/dist/types/onchain/market/adapters/contracts/index.d.ts +6 -1
  234. package/dist/types/onchain/market/adapters/index.d.ts +16 -1
  235. package/dist/types/onchain/market/adapters/types.d.ts +6 -1
  236. package/dist/types/onchain/market/index.d.ts +16 -1
  237. package/dist/types/onchain/positions/projectAavePosition.d.ts +16 -0
  238. package/dist/types/onchain/preview/preview/loadAdapterReplayState.d.ts +13 -0
  239. package/dist/types/permissionless/api/GearboxPermissionless.d.ts +11 -5
  240. package/dist/types/permissionless/api/analytics/PermissionlessAnalytics.d.ts +38 -0
  241. package/dist/types/permissionless/api/analytics/index.d.ts +3 -0
  242. package/dist/types/permissionless/api/analytics/schemas.d.ts +32 -0
  243. package/dist/types/permissionless/api/analytics/types.d.ts +38 -0
  244. package/dist/types/permissionless/api/index.d.ts +13 -2
  245. package/dist/types/permissionless/api/oracles/PermissionlessOracles.d.ts +303 -22
  246. package/dist/types/permissionless/api/oracles/enrich.d.ts +59 -0
  247. package/dist/types/permissionless/api/oracles/index.d.ts +12 -2
  248. package/dist/types/permissionless/api/oracles/onchain-feed.d.ts +15 -0
  249. package/dist/types/permissionless/api/oracles/schemas.d.ts +249 -7
  250. package/dist/types/permissionless/api/oracles/score/formula.d.ts +36 -0
  251. package/dist/types/permissionless/api/oracles/score/index.d.ts +4 -0
  252. package/dist/types/permissionless/api/oracles/score/run.d.ts +42 -0
  253. package/dist/types/permissionless/api/oracles/score/types.d.ts +118 -0
  254. package/dist/types/permissionless/api/oracles/stress/classify.d.ts +57 -0
  255. package/dist/types/permissionless/api/oracles/stress/index.d.ts +6 -0
  256. package/dist/types/permissionless/api/oracles/stress/override.d.ts +59 -0
  257. package/dist/types/permissionless/api/oracles/stress/run.d.ts +100 -0
  258. package/dist/types/permissionless/api/oracles/stress/score.d.ts +57 -0
  259. package/dist/types/permissionless/api/oracles/stress/types.d.ts +272 -0
  260. package/dist/types/permissionless/api/oracles/types.d.ts +468 -22
  261. package/dist/types/permissionless/api/schemas.d.ts +0 -2
  262. package/dist/types/permissionless/api/transactions/lp-price-feeds.d.ts +9 -1
  263. package/dist/types/permissionless/bindings/bytecode-repository.d.ts +10 -1
  264. package/dist/types/permissionless/bindings/index.d.ts +4 -3
  265. package/dist/types/permissionless/bindings/kill-switch-proxy.d.ts +205 -0
  266. package/dist/types/permissionless/bindings/market-configurator-factory.d.ts +30 -0
  267. package/dist/types/permissionless/bindings/market-configurator.d.ts +30 -1
  268. package/dist/types/permissionless/bindings/types.d.ts +27 -0
  269. package/dist/types/permissionless/index.d.ts +17 -6
  270. package/dist/types/permissionless/utils/index.d.ts +3 -3
  271. package/dist/types/permissionless/utils/literals.d.ts +1 -0
  272. package/dist/types/permissionless/utils/price-update/get-prices.d.ts +33 -0
  273. package/dist/types/permissionless/utils/price-update/index.d.ts +2 -2
  274. package/dist/types/sdk/analytics/AnalyticsNamespace.d.ts +1 -1
  275. package/dist/types/sdk/analytics/types.d.ts +1 -1
  276. package/dist/types/sdk/index.d.ts +2 -2
  277. package/dist/types/sdk/opportunities/OpportunitiesNamespace.d.ts +1 -1
  278. package/dist/types/sdk/opportunities/types.d.ts +1 -1
  279. package/dist/types/sdk/positions/PositionsNamespace.d.ts +1 -1
  280. package/dist/types/sdk/positions/types.d.ts +1 -1
  281. package/dist/types/sdk/prepare/PrepareApi.d.ts +11 -3
  282. package/dist/types/sdk/prepare/index.d.ts +2 -2
  283. package/dist/types/sdk/prepare/types.d.ts +56 -1
  284. package/dist/types/sdk/preview/PreviewNamespace.d.ts +5 -1
  285. package/dist/types/sdk/preview/types.d.ts +10 -1
  286. package/dist/types/testnets/TestnetsAPI.d.ts +108 -0
  287. package/dist/types/testnets/errors/TestnetNotFoundError.d.ts +12 -0
  288. package/dist/types/testnets/errors/TestnetRequestFailedError.d.ts +11 -0
  289. package/dist/types/testnets/errors/TestnetStatusError.d.ts +15 -0
  290. package/dist/types/testnets/errors/TestnetValidationError.d.ts +16 -0
  291. package/dist/types/testnets/errors/TestnetWaitTimeoutError.d.ts +21 -0
  292. package/dist/types/testnets/errors/TestnetsError.d.ts +47 -0
  293. package/dist/types/testnets/errors/index.d.ts +7 -0
  294. package/dist/types/testnets/index.d.ts +11 -0
  295. package/dist/types/testnets/schemas.d.ts +554 -0
  296. package/dist/types/testnets/types.d.ts +717 -0
  297. package/package.json +9 -3
@@ -1,50 +1,496 @@
1
+ import { AssetType } from "../../../model/primitives.js";
2
+ import { PermissionlessChain } from "../chains/types.js";
1
3
  import { PriceFeed } from "../../core/pricefeed.js";
2
4
  import "../../core/index.js";
3
5
  import { Address } from "viem";
4
6
  //#region src/permissionless/api/oracles/types.d.ts
5
7
  /**
6
- * One asset of a chain, with the feeds allowed for it. The backend indexes
7
- * the chain, so every feed listed here is one the PriceFeedStore carries and
8
- * allows for the asset.
8
+ * What identifies an asset, which is all a feed's own listing of one says.
9
+ *
10
+ * Used on its own where the asset hangs off something else — a feed's assets,
11
+ * say, where listing the feeds allowed for each would only name the feed back.
9
12
  **/
10
- export interface PermissionlessAsset {
13
+ export interface PermissionlessPriceFeedAsset {
11
14
  address: Address;
12
15
  symbol: string;
13
16
  name: string;
14
17
  decimals: number;
18
+ }
19
+ /**
20
+ * One asset of a chain, with the feeds allowed for it. The backend indexes
21
+ * the chain, so every feed listed here is one the PriceFeedStore carries and
22
+ * allows for the asset.
23
+ **/
24
+ export interface PermissionlessAsset extends PermissionlessPriceFeedAsset {
15
25
  owner: Address;
16
26
  priceFeeds: PriceFeed[];
17
27
  }
18
28
  /**
19
29
  * The PriceFeedStore of one chain as the backend has indexed it: the assets
20
30
  * it prices, the feeds it carries, and which feed is allowed on which asset.
31
+ *
32
+ * A store is a chain's, so it is described by the same fields the chain list
33
+ * answers with, plus what it holds.
21
34
  **/
22
- export interface PermissionlessPriceFeedStore {
23
- chainId: number;
24
- name: string;
25
- isPublic: boolean;
26
- isActivated: boolean;
27
- explorerUrl: string;
35
+ export interface PermissionlessPriceFeedStore extends PermissionlessChain {
28
36
  assets: PermissionlessAsset[];
29
37
  priceFeeds: PriceFeed[];
30
38
  }
31
39
  /**
32
- * A price per feed, and a market cap per feed and the asset it prices.
33
- * `null` is a price the backend could not read, not a zero.
40
+ * What names a market, whichever side it is being listed from.
41
+ *
42
+ * A feed's markets and an asset's markets are different reads, but what they
43
+ * say about the market is the same: who curates it, what it is denominated in
44
+ * and how much of its quota is taken. Only the thing the row is about differs,
45
+ * which is what each of the two below adds.
46
+ *
47
+ * "This token" throughout means whatever the extending row is about — the
48
+ * token the feed prices, or the asset the market holds as collateral.
49
+ **/
50
+ export interface PermissionlessMarket {
51
+ market: Address;
52
+ marketConfigurator: Address;
53
+ /** The configurator's own name, as the backend's sync recorded it. */
54
+ curatorName: string | null;
55
+ /**
56
+ * The market's own name, which is the name of its pool token — what the rest
57
+ * of the backend calls a market by as well.
58
+ */
59
+ marketName: string | null;
60
+ /**
61
+ * Symbol of the market's underlying, which is both what the market is
62
+ * pictured by and what its quota figures are denominated in.
63
+ */
64
+ underlyingSymbol: string | null;
65
+ /** This token is the market's own underlying, so it is not quota-managed. */
66
+ isUnderlying: boolean;
67
+ /**
68
+ * What the pool will take of this token, in units of the market's
69
+ * underlying.
70
+ *
71
+ * `null` for a token the quota keeper was never told a limit for, which the
72
+ * market's own underlying always is — it is not quota-managed. A zero is a
73
+ * limit the curator has actually set to zero, and the two are different
74
+ * answers.
75
+ */
76
+ quotaLimit: number | null;
77
+ /**
78
+ * How much of {@link quotaLimit} the market's borrowers have actually taken,
79
+ * in the same units.
80
+ *
81
+ * The sum of every open credit account's current quota for this token across
82
+ * the credit managers borrowing from the market, so it is what the token is
83
+ * backing right now rather than what it is allowed to back.
84
+ *
85
+ * `null` only where {@link quotaLimit} is: a token nobody quotes reads as a
86
+ * zero against a limit, which is a different answer from a token the keeper
87
+ * holds no entry for at all.
88
+ */
89
+ quotaUsed: number | null;
90
+ }
91
+ /**
92
+ * One token a market prices with the feed.
93
+ *
94
+ * A row per `(market, token, role)` rather than per market: the same feed can
95
+ * be the main feed of one token and the reserve feed of another in the very
96
+ * same market, and both are reported.
97
+ **/
98
+ export interface PermissionlessIndexedPriceFeedMarket extends PermissionlessMarket {
99
+ token: Address;
100
+ /** `null` for a token the backend has no metadata row for. */
101
+ tokenSymbol: string | null;
102
+ /** The feed is the market's reserve feed for this token, not its main one. */
103
+ reserve: boolean;
104
+ /**
105
+ * The price oracle holding the slot, which is what the period is read from.
106
+ *
107
+ * The oracle and not the market: a market that has switched oracles has
108
+ * rows under each, and the period lives on whichever one holds the slot now.
109
+ */
110
+ priceOracle: Address;
111
+ }
112
+ /**
113
+ * The same slot with the period its oracle holds for it.
114
+ *
115
+ * Read off the chain rather than served, because it is not indexed: a
116
+ * curator sets one per slot in their price oracle, and nothing obliges it to
117
+ * agree with the period the PriceFeedStore carries for the feed. A reader
118
+ * comparing the two is comparing two contracts, which is why both are
119
+ * reported.
120
+ **/
121
+ export interface PermissionlessPriceFeedMarket extends PermissionlessIndexedPriceFeedMarket {
122
+ /**
123
+ * Staleness period this market's own price oracle holds for the slot, in
124
+ * seconds.
125
+ *
126
+ * `null` means the oracle would not answer, or that it names another feed
127
+ * for the slot — in which case the slot has moved on since it was indexed
128
+ * and the period it holds is not this feed's to report.
129
+ */
130
+ marketStalenessPeriod: number | null;
131
+ }
132
+ /**
133
+ * One `(market, token, role)` slot of a chain, with the feed holding it.
134
+ *
135
+ * The same row {@link PermissionlessIndexedPriceFeedMarket} is, read from the
136
+ * chain's end rather than from one feed's: the feed is a column here because
137
+ * it is no longer what was asked for, and the chain is named because the read
138
+ * spans several.
139
+ *
140
+ * Unpivoted — a token's main and reserve feeds are two rows. What reads them
141
+ * this way is analysis over every slot at once, where the two roles of a
142
+ * token are the pair being compared and folding them together would hide it.
143
+ **/
144
+ export interface PermissionlessMarketSlot extends PermissionlessIndexedPriceFeedMarket {
145
+ chainId: number;
146
+ /** The market's underlying, which its quota figures are denominated in. */
147
+ underlyingToken: Address;
148
+ /**
149
+ * The market has been shut down: no new borrowing, but its open accounts
150
+ * are quoting all the same.
151
+ */
152
+ isShutdown: boolean;
153
+ /** The feed in force for the slot. */
154
+ priceFeed: Address;
155
+ /** Display name the store recorded, or `null` for a feed it never had. */
156
+ priceFeedName: string | null;
157
+ /**
158
+ * Whether the PriceFeedStore still carries that feed.
159
+ *
160
+ * `false` is the case worth looking at: the market goes on pricing with
161
+ * something the store has removed, or never had.
162
+ */
163
+ priceFeedInStore: boolean;
164
+ /**
165
+ * The feed the market prices its own underlying with, which is what
166
+ * converts this row's quota figures. `null` for a market that has none.
167
+ */
168
+ underlyingPriceFeed: Address | null;
169
+ }
170
+ /**
171
+ * One feed of the store, with everywhere the store lets it be used.
172
+ *
173
+ * Feeds a tree carries but the store never added have no identity to report
174
+ * here — no status history, hence no name or staleness — so the backend does
175
+ * not answer for them; the SDK reads them off the chain instead, see
176
+ * {@link PermissionlessPriceFeedDetails.inStore}.
177
+ **/
178
+ export interface PermissionlessIndexedPriceFeedDetails {
179
+ chainId: number;
180
+ priceFeed: PriceFeed;
181
+ assets: PermissionlessPriceFeedAsset[];
182
+ /**
183
+ * Ordered by curator, then by market, then by role with the main feeds
184
+ * ahead of the reserve ones — the grouping a reader wants, so a caller
185
+ * rendering a table does not have to sort it again.
186
+ */
187
+ markets: PermissionlessIndexedPriceFeedMarket[];
188
+ }
189
+ /**
190
+ * The same feed with each slot's staleness period read off its oracle.
191
+ **/
192
+ export interface PermissionlessPriceFeedDetails extends PermissionlessIndexedPriceFeedDetails {
193
+ markets: PermissionlessPriceFeedMarket[];
194
+ /**
195
+ * Whether the answer is the store's.
196
+ *
197
+ * `false` is a deployed feed the store never added, read off the chain
198
+ * instead: `deployedBy` is the zero address, `stalenessPeriod` is 0, and
199
+ * `assets` and `markets` are empty, because all of them are store rows.
200
+ */
201
+ inStore: boolean;
202
+ }
203
+ /**
204
+ * One feed as a market slot holds it.
205
+ *
206
+ * The store's view of the feed and not the feed itself: a market keeps
207
+ * pricing with whatever it was last pointed at, and nothing removes it from a
208
+ * market when the store drops it. {@link inStore} is what tells those apart,
209
+ * and the name survives either way because the store recorded it before.
210
+ **/
211
+ export interface PermissionlessAssetMarketFeed {
212
+ address: Address;
213
+ /**
214
+ * Display name the store recorded, or `null` for a feed it never carried —
215
+ * an aggregator a curator pointed a market straight at, say.
216
+ */
217
+ name: string | null;
218
+ /**
219
+ * Whether the PriceFeedStore still carries the feed.
220
+ *
221
+ * `false` is the case worth showing: the market goes on pricing the asset
222
+ * with a feed the store has removed, or never had. Nothing on chain forbids
223
+ * that, which is exactly why it has to be visible.
224
+ */
225
+ inStore: boolean;
226
+ }
227
+ /**
228
+ * One market that prices an asset, with both of the slots it may fill.
229
+ *
230
+ * A row per market rather than per `(market, role)`: the two roles are two
231
+ * columns of the same market's row, and the quota is the market's whatever
232
+ * feed holds which slot.
233
+ **/
234
+ export interface PermissionlessAssetMarket extends PermissionlessMarket {
235
+ /** The market's underlying, which its quota figures are denominated in. */
236
+ underlyingToken: Address;
237
+ /**
238
+ * The feed the market prices its own underlying with, which is what converts
239
+ * this row's quota figures. `null` for a market that has no main feed for
240
+ * its underlying, whose figures therefore cannot be converted at all.
241
+ */
242
+ underlyingPriceFeed: Address | null;
243
+ /**
244
+ * The market has been shut down.
245
+ *
246
+ * Still reported, and still counted in {@link
247
+ * PermissionlessQuotaTotals.quotaUsedUsd}: a shut down market carries no
248
+ * new borrowing but its open accounts are quoting all the same.
249
+ */
250
+ isShutdown: boolean;
251
+ /** The feed the market prices the asset with, or `null` if it has none. */
252
+ mainFeed: PermissionlessAssetMarketFeed | null;
253
+ /** The feed the market falls back to, or `null` if it has none. */
254
+ reserveFeed: PermissionlessAssetMarketFeed | null;
255
+ }
256
+ /**
257
+ * One asset of the store: what prices it, and what it is used as collateral
258
+ * for.
259
+ *
260
+ * The counterpart of {@link PermissionlessPriceFeedDetails} — the same corner
261
+ * of the chain read from the asset's end instead of the feed's.
34
262
  **/
35
- export interface PermissionlessPrices {
36
- prices: Record<Address, string | null>;
37
- marketCaps: Record<Address, Record<Address, string | null>>;
38
- time: number;
263
+ export interface PermissionlessIndexedAssetDetails {
264
+ chainId: number;
265
+ asset: PermissionlessPriceFeedAsset;
266
+ /**
267
+ * Feeds the store currently allows for the asset.
268
+ *
269
+ * Only the store's. A feed a market still prices the asset with but the
270
+ * store has dropped is not here — it is on its market's row, flagged.
271
+ */
272
+ priceFeeds: PriceFeed[];
273
+ /** Ordered by curator, then by market. */
274
+ markets: PermissionlessAssetMarket[];
39
275
  }
40
- /** Args of {@link PermissionlessOracles.getPrices}. */
41
- export interface GetPricesArgs {
276
+ /**
277
+ * The same asset with its quotas totalled, which is what a reader gets.
278
+ *
279
+ * The totals are over the very rows {@link markets} reports, converted at the
280
+ * price each market's own oracle holds for its underlying, so the header and
281
+ * the table under it cannot disagree.
282
+ **/
283
+ export interface PermissionlessAssetDetails extends PermissionlessIndexedAssetDetails, PermissionlessQuotaTotals {}
284
+ /**
285
+ * One asset of the PriceFeedStore, with what its markets make of it.
286
+ *
287
+ * Everything a list of assets renders and nothing else: the store's own read
288
+ * carries each asset's feeds too, which is several times this payload and not
289
+ * what a reader scanning for the big positions is looking at.
290
+ *
291
+ * The quota rows are the ones {@link PermissionlessAssetDetails} heads an
292
+ * asset's own page with, off the same query, so the list and the page a row of
293
+ * it opens are totalling the very same figures.
294
+ *
295
+ * What a reader gets is {@link PermissionlessAssetSummary}, this plus what the
296
+ * SDK makes of the asset.
297
+ **/
298
+ export interface PermissionlessIndexedAssetSummary {
42
299
  chainId: number;
300
+ /** Lowercased, as everything addressed in these payloads is. */
301
+ address: Address;
302
+ symbol: string;
303
+ /**
304
+ * How many markets still running are underlain by this asset.
305
+ *
306
+ * What makes an asset central rather than merely listed: a token several
307
+ * markets borrow against is the one a reader opens the list for. Shut down
308
+ * markets are left out for the reason their limits are — they are no longer
309
+ * a place anything happens.
310
+ */
311
+ underlyingMarketCount: number;
312
+ /**
313
+ * What each market holding the asset has committed to it, unconverted.
314
+ *
315
+ * One entry per market, in that market's own underlying — see
316
+ * {@link PermissionlessAssetQuota}. Totalling them is
317
+ * {@link PermissionlessAssetSummary}'s two USD figures, which is why they
318
+ * are carried rather than summed: the sum needs a price, and a price needs
319
+ * the chain.
320
+ */
321
+ marketQuotas: PermissionlessAssetQuota[];
322
+ }
323
+ /**
324
+ * One market's commitment to an asset, in that market's own underlying.
325
+ *
326
+ * Unconverted on purpose: a limit is denominated in its market's underlying,
327
+ * and an asset is routinely collateral in markets underlain by different
328
+ * tokens — WETH is collateral in USDC, WETH and wstETH markets at once on
329
+ * mainnet — so the figures are not comparable until each is priced. The feed
330
+ * that prices the underlying is named here so that whoever totals them knows
331
+ * what to ask the chain.
332
+ **/
333
+ export interface PermissionlessAssetQuota {
43
334
  /**
44
- * The feeds to price. Any address answering `latestRoundData` works — the
45
- * store does not have to carry it, which is the point of reading the chain
46
- * rather than asking the backend.
47
- **/
335
+ * What the pool will take of the asset, in units of the market's underlying.
336
+ *
337
+ * `null` for a token the quota keeper was never told a limit for, which the
338
+ * market's own underlying always is — it is not quota-managed. A zero is a
339
+ * limit the curator has actually set to zero, and the two are different
340
+ * answers.
341
+ */
342
+ quotaLimit: number | null;
343
+ /** How much of that limit is taken, in the same units. */
344
+ quotaUsed: number | null;
345
+ /** The market has been shut down, so its limit is no longer borrowable. */
346
+ isShutdown: boolean;
347
+ /**
348
+ * The feed the market prices its own underlying with.
349
+ *
350
+ * `null` for a market with no main feed for its underlying, whose figures
351
+ * therefore cannot be converted at all.
352
+ */
353
+ underlyingPriceFeed: Address | null;
354
+ }
355
+ /**
356
+ * Totals of {@link PermissionlessAssetQuota}, converted to USD.
357
+ *
358
+ * Limits count only the markets still running, because a shut down market's
359
+ * limit is not borrowable; what is already quoted counts everywhere, because
360
+ * debt outstanding is exposure either way. A market whose underlying could not
361
+ * be priced is skipped, which makes both figures floors, and `null` is nothing
362
+ * to total rather than a zero.
363
+ **/
364
+ export interface PermissionlessQuotaTotals {
365
+ /** Total quota limit across the markets still running, in USD. */
366
+ quotaLimitUsd: number | null;
367
+ /** Total quota actually taken across every market, in USD. */
368
+ quotaUsedUsd: number | null;
369
+ }
370
+ /**
371
+ * The same asset with what this SDK makes of it.
372
+ *
373
+ * Two things the backend does not answer for. What the asset is comes off this
374
+ * package's curated tables, because a backend consulting them could only
375
+ * answer from whichever version it was built against — a reader on a newer SDK
376
+ * than the deployment it talks to still classifies by the newer tables. The
377
+ * quota totals come off the chain, because converting a market's own
378
+ * denomination needs a price and the chain is where prices are.
379
+ **/
380
+ export interface PermissionlessAssetSummary extends PermissionlessIndexedAssetSummary, PermissionlessQuotaTotals {
381
+ /**
382
+ * What the asset is, where the tables say so.
383
+ *
384
+ * `null` for anything they do not name, which is most of a store: they
385
+ * classify the tokens markets are built on, and a store carries everything
386
+ * those markets will take as collateral. A filter over this sorts the
387
+ * assets worth sorting and leaves the rest in one heap, which is the honest
388
+ * answer rather than a guess from the symbol.
389
+ */
390
+ assetType: AssetType | null;
391
+ /**
392
+ * Whether the asset stands for something outside the chain.
393
+ *
394
+ * A flag rather than a value of {@link assetType}, because the two answer
395
+ * different questions and an asset can be both: a tokenised treasury is a
396
+ * real-world asset and may still be the stable a market is built on. Unlike
397
+ * {@link assetType} there is no third state — the curated list naming it is
398
+ * the whole of what makes an asset one, so not being on it is a real `false`
399
+ * rather than something unknown.
400
+ */
401
+ isRwa: boolean;
402
+ }
403
+ /**
404
+ * One feed of a chain, named so it can be read alongside another chain's.
405
+ *
406
+ * An address alone does not identify a feed: the same aggregator is deployed
407
+ * to several chains, and reading it on the wrong one answers the wrong price.
408
+ **/
409
+ export interface PriceFeedRef {
410
+ chainId: number;
411
+ address: Address;
412
+ }
413
+ /**
414
+ * The price one feed reports, as {@link PermissionlessOracles.getPrices}
415
+ * answers.
416
+ *
417
+ * `price` is `null` for a feed whose read reverted, which is not a zero, and
418
+ * is in the 8 decimals every Gearbox feed reports.
419
+ **/
420
+ export interface PriceFeedPrice extends PriceFeedRef {
421
+ price: bigint | null;
422
+ }
423
+ /**
424
+ * How many decimals a feed's answer carries, as
425
+ * {@link PermissionlessOracles.getDecimals} answers.
426
+ *
427
+ * Its own call rather than a field of {@link PriceFeedPrice}, because the two
428
+ * are not read on the same schedule: a price is the figure that moves and is
429
+ * re-read for it, while a deployed feed's decimals never change, so a caller
430
+ * reads these once and keeps them.
431
+ *
432
+ * Needed wherever the feeds are not only the ones a market reads. Every
433
+ * Gearbox feed an oracle holds reports 8, which is why most of this namespace
434
+ * can assume it — but a composite's own dependencies are whatever the
435
+ * aggregator underneath happens to be, and a rate leg of one is routinely 18.
436
+ *
437
+ * `null` is a feed that would not answer `decimals()` at all, which a caller
438
+ * showing the figure should treat as unknown rather than as 8.
439
+ **/
440
+ export interface PriceFeedDecimals extends PriceFeedRef {
441
+ decimals: number | null;
442
+ }
443
+ /**
444
+ * One asset with the feeds to value it through.
445
+ *
446
+ * The asset's side of {@link PermissionlessOracles.getMarketCap} — the shape a
447
+ * screen showing one asset's feeds asks with.
448
+ **/
449
+ export interface AssetCap {
450
+ chainId: number;
451
+ asset: Address;
48
452
  priceFeeds: Address[];
49
453
  }
454
+ /**
455
+ * One feed with the assets to value through it.
456
+ *
457
+ * The feed's side of the same call. Both exist because a screen shows one row
458
+ * per feed or one row per asset, never the full cross product.
459
+ **/
460
+ export interface FeedCap {
461
+ chainId: number;
462
+ priceFeed: Address;
463
+ assets: Address[];
464
+ }
465
+ /**
466
+ * What one feed values one asset's supply at, in USD.
467
+ *
468
+ * `price × totalSupply`, as a decimal string: the product of an 8-decimal
469
+ * price and a supply in the asset's own decimals does not fit a JS number
470
+ * without losing the small end of it.
471
+ *
472
+ * `null` for a pair whose price or supply could not be read — not a zero,
473
+ * since an asset nobody could price is not an asset worth nothing.
474
+ **/
475
+ export interface MarketCap {
476
+ chainId: number;
477
+ priceFeed: Address;
478
+ asset: Address;
479
+ cap: string | null;
480
+ }
481
+ /** Args of a read scoped to one feed. */
482
+ export interface PriceFeedArgs {
483
+ chainId: number;
484
+ address: Address;
485
+ }
486
+ /** Args of a read scoped to one asset. */
487
+ export interface AssetArgs {
488
+ chainId: number;
489
+ address: Address;
490
+ }
491
+ /** Args of {@link PermissionlessOracles.assets}. */
492
+ export interface AssetsArgs {
493
+ /** Omit for every chain the backend serves. */
494
+ chainId?: number;
495
+ }
50
496
  //#endregion
@@ -11,8 +11,6 @@ import { z } from "zod/v4";
11
11
  **/
12
12
  /** An address, in whatever case the backend serves it. */
13
13
  export declare const addressSchema: z.ZodCustom<`0x${string}`, `0x${string}`>;
14
- /** A `0x`-prefixed hex string, as viem's `Hex`. */
15
- export declare const hexSchema: z.ZodCustom<`0x${string}`, `0x${string}`>;
16
14
  /**
17
15
  * A record keyed by address. Spelled out here because zod types a record key
18
16
  * by the schema's output, which the branded `Address` is not inferred as.
@@ -8,9 +8,17 @@ import { Address, PublicClient } from "viem";
8
8
  * transaction. Returns nothing when the bound still fits.
9
9
  **/
10
10
  export declare function updateBounds(client: PublicClient, address: Address): Promise<RawTx[]>;
11
+ /** An LP feed found in a feed tree, with what it calls itself on chain. */
12
+ export interface LPFeed {
13
+ address: Address;
14
+ description: string;
15
+ }
11
16
  /**
12
17
  * Of the whole feed tree behind `feeds`, the ones that are LP feeds: the
13
18
  * probe keeps whatever answers `getLPExchangeRate`.
19
+ *
20
+ * The trees reach past `feeds` themselves, so an LP feed read inside one of
21
+ * them is among the results whether or not it is one of `feeds`.
14
22
  **/
15
- export declare function getFeedsToUpdate(client: PublicClient, pfCompressor: Address, feeds: Address[]): Promise<Address[]>;
23
+ export declare function getFeedsToUpdate(client: PublicClient, pfCompressor: Address, feeds: Address[]): Promise<LPFeed[]>;
16
24
  //#endregion
@@ -1145,11 +1145,15 @@ declare const abi: readonly [{
1145
1145
  }];
1146
1146
  readonly name: "VersionNotFoundException";
1147
1147
  }];
1148
- interface ComputeAddressArgs {
1148
+ export interface ComputeAddressArgs {
1149
1149
  contractType: string;
1150
1150
  version: number;
1151
1151
  encodedParams: Hex;
1152
1152
  salt: Hex;
1153
+ /**
1154
+ * Deployer, i.e. address that will call `deploy` on the bytecode repository.
1155
+ * It is mixed into the salt, so it is not necessarily the owner of the deployed contract
1156
+ */
1153
1157
  owner: Address;
1154
1158
  }
1155
1159
  export declare class BytecodeRepositoryContract extends BaseContract<typeof abi> {
@@ -1171,6 +1175,11 @@ export declare class BytecodeRepositoryContract extends BaseContract<typeof abi>
1171
1175
  isBytecodeUploaded(hash: `0x${string}`): Promise<boolean>;
1172
1176
  isBytecodeAudited(hash: `0x${string}`): Promise<boolean>;
1173
1177
  getLatestVersion(type_: string): Promise<bigint>;
1178
+ /**
1179
+ * Returns the latest allowed patch version of the contract type within given minor version
1180
+ * @throws if no bytecode of this contract type and minor version is allowed
1181
+ */
1182
+ getLatestPatchVersion(type_: string, minorVersion: number): Promise<number>;
1174
1183
  getAllowedBytecodeHash(type_: string, version: number): Promise<Hex>;
1175
1184
  isPublicDomain(domain: string): Promise<boolean>;
1176
1185
  isSystemDomain(domain: string): Promise<boolean>;
@@ -1,5 +1,5 @@
1
1
  import { AddressProviderContract } from "./address-provider.js";
2
- import { BytecodeRepositoryContract } from "./bytecode-repository.js";
2
+ import { BytecodeRepositoryContract, ComputeAddressArgs } from "./bytecode-repository.js";
3
3
  import { TokenCompressorContract } from "./compressors/token-compressor.js";
4
4
  import { WithdrawalCompressorContract } from "./compressors/withdrawal-compressor.js";
5
5
  import "./compressors/index.js";
@@ -9,7 +9,8 @@ import { GovernorContract } from "./governance/governor.js";
9
9
  import { TimeLockContract } from "./governance/timelock.js";
10
10
  import "./governance/index.js";
11
11
  import { InstanceManagerContract } from "./instance-manager.js";
12
- import { AccessMode, AddAssetParams, AllowTokenParams, CreditManagerFees, DeployParams, ForbidAdapterParams, ForbidTokenParams, Market, PauseCreditManagerParams, PeripheryDomain, SetExpirationDateParams, SetFeesParams, SetPriceFeedParams, SetReservePriceFeedParams, SetTokenQuotaIncreaseFeeParams, UnpauseCreditManagerParams } from "./types.js";
12
+ import { KILL_SWITCH_PROXY_MINOR_VERSION, KillSwitchProxyContract, KillSwitchProxyNotAllowedError, PreparedKillSwitchProxyDeployment, killSwitchProxySalt } from "./kill-switch-proxy.js";
13
+ import { AccessMode, AddAssetParams, AllowTokenParams, CreditManagerFees, DeployParams, EmergencyAdmin, ForbidAdapterParams, ForbidTokenParams, Market, PauseCreditManagerParams, PeripheryDomain, SetExpirationDateParams, SetFeesParams, SetPriceFeedParams, SetReservePriceFeedParams, SetTokenQuotaIncreaseFeeParams, UnpauseCreditManagerParams } from "./types.js";
13
14
  import { MarketConfiguratorContract } from "./market-configurator.js";
14
15
  import { MarketConfiguratorFactoryContract } from "./market-configurator-factory.js";
15
16
  import { PriceFeedStoreContract } from "./price-feed-store.js";
@@ -17,4 +18,4 @@ import { priceFeedSetupParams } from "./pricefeeds/index.js";
17
18
  import { RoutingManagerContract } from "./router/routing-manager.js";
18
19
  import "./router/index.js";
19
20
  import { TreasurySplitterContract } from "./treasury-splitter.js";
20
- export { AccessMode, AddAssetParams, AddressProviderContract, AllowTokenParams, BytecodeRepositoryContract, ConstructorParams, CreditManagerFees, CrossChainMultisigContract, DeployParams, ForbidAdapterParams, ForbidTokenParams, GovernorContract, InstanceManagerContract, Market, MarketConfiguratorContract, MarketConfiguratorFactoryContract, PauseCreditManagerParams, PeripheryDomain, PriceFeedStoreContract, Proposal, QueuedAndExecutedTransaction, RoutingManagerContract, SafeBatch, SafeMeta, SafeTx, SetExpirationDateParams, SetFeesParams, SetPriceFeedParams, SetReservePriceFeedParams, SetTokenQuotaIncreaseFeeParams, TimeLockContract, TimelockTransaction, TimelockTxParams, TokenCompressorContract, TreasurySplitterContract, UnpauseCreditManagerParams, WithdrawalCompressorContract, priceFeedSetupParams };
21
+ export { AccessMode, AddAssetParams, AddressProviderContract, AllowTokenParams, BytecodeRepositoryContract, ComputeAddressArgs, ConstructorParams, CreditManagerFees, CrossChainMultisigContract, DeployParams, EmergencyAdmin, ForbidAdapterParams, ForbidTokenParams, GovernorContract, InstanceManagerContract, KILL_SWITCH_PROXY_MINOR_VERSION, KillSwitchProxyContract, KillSwitchProxyNotAllowedError, Market, MarketConfiguratorContract, MarketConfiguratorFactoryContract, PauseCreditManagerParams, PeripheryDomain, PreparedKillSwitchProxyDeployment, PriceFeedStoreContract, Proposal, QueuedAndExecutedTransaction, RoutingManagerContract, SafeBatch, SafeMeta, SafeTx, SetExpirationDateParams, SetFeesParams, SetPriceFeedParams, SetReservePriceFeedParams, SetTokenQuotaIncreaseFeeParams, TimeLockContract, TimelockTransaction, TimelockTxParams, TokenCompressorContract, TreasurySplitterContract, UnpauseCreditManagerParams, WithdrawalCompressorContract, killSwitchProxySalt, priceFeedSetupParams };