@whetstone-research/doppler-sdk 0.0.1-alpha.8 → 0.0.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 (368) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +726 -25
  3. package/dist/DopplerSDK.d.mts +45 -7
  4. package/dist/DopplerSDK.d.ts +45 -7
  5. package/dist/DopplerSDK.js +35 -12
  6. package/dist/DopplerSDK.mjs +34 -11
  7. package/dist/abis/bytecodes.d.mts +3 -2
  8. package/dist/abis/bytecodes.d.ts +3 -2
  9. package/dist/abis/bytecodes.js +9 -6
  10. package/dist/abis/bytecodes.mjs +1 -2
  11. package/dist/abis/index.d.mts +1507 -129
  12. package/dist/abis/index.d.ts +1507 -129
  13. package/dist/abis/index.js +43 -20
  14. package/dist/abis/index.mjs +2 -3
  15. package/dist/addresses.d.mts +16 -3
  16. package/dist/addresses.d.ts +16 -3
  17. package/dist/addresses.js +13 -5
  18. package/dist/addresses.mjs +2 -2
  19. package/dist/builders/DynamicAuctionBuilder.d.mts +119 -0
  20. package/dist/builders/DynamicAuctionBuilder.d.ts +119 -0
  21. package/dist/builders/DynamicAuctionBuilder.js +29 -0
  22. package/dist/builders/DynamicAuctionBuilder.js.map +1 -0
  23. package/dist/builders/DynamicAuctionBuilder.mjs +20 -0
  24. package/dist/builders/DynamicAuctionBuilder.mjs.map +1 -0
  25. package/dist/builders/MulticurveBuilder.d.mts +132 -0
  26. package/dist/builders/MulticurveBuilder.d.ts +132 -0
  27. package/dist/builders/MulticurveBuilder.js +29 -0
  28. package/dist/builders/MulticurveBuilder.js.map +1 -0
  29. package/dist/builders/MulticurveBuilder.mjs +20 -0
  30. package/dist/builders/MulticurveBuilder.mjs.map +1 -0
  31. package/dist/builders/StaticAuctionBuilder.d.mts +124 -0
  32. package/dist/builders/StaticAuctionBuilder.d.ts +124 -0
  33. package/dist/builders/StaticAuctionBuilder.js +29 -0
  34. package/dist/builders/StaticAuctionBuilder.js.map +1 -0
  35. package/dist/builders/StaticAuctionBuilder.mjs +20 -0
  36. package/dist/builders/StaticAuctionBuilder.mjs.map +1 -0
  37. package/dist/builders/index.d.mts +8 -0
  38. package/dist/builders/index.d.ts +8 -0
  39. package/dist/builders/index.js +56 -0
  40. package/dist/builders/index.js.map +1 -0
  41. package/dist/builders/index.mjs +23 -0
  42. package/dist/builders/index.mjs.map +1 -0
  43. package/dist/builders/shared.d.mts +116 -0
  44. package/dist/builders/shared.d.ts +116 -0
  45. package/dist/builders/shared.js +39 -0
  46. package/dist/builders/shared.js.map +1 -0
  47. package/dist/builders/shared.mjs +18 -0
  48. package/dist/builders/shared.mjs.map +1 -0
  49. package/dist/builders.d.mts +8 -131
  50. package/dist/builders.d.ts +8 -131
  51. package/dist/builders.js +44 -5
  52. package/dist/builders.mjs +22 -3
  53. package/dist/chunk-3PNCB4W5.js +4 -0
  54. package/dist/{chunk-KRN3ROUE.js.map → chunk-3PNCB4W5.js.map} +1 -1
  55. package/dist/chunk-3RK7LRAA.js +282 -0
  56. package/dist/chunk-3RK7LRAA.js.map +1 -0
  57. package/dist/chunk-4HM3ERBU.js +13 -0
  58. package/dist/chunk-4HM3ERBU.js.map +1 -0
  59. package/dist/{chunk-7W72MFJO.mjs → chunk-4TROGENW.mjs} +5 -4
  60. package/dist/chunk-4TROGENW.mjs.map +1 -0
  61. package/dist/chunk-5TL5V6UX.mjs +3 -0
  62. package/dist/{chunk-AZLFJNTG.mjs.map → chunk-5TL5V6UX.mjs.map} +1 -1
  63. package/dist/chunk-64AWG57M.mjs +192 -0
  64. package/dist/chunk-64AWG57M.mjs.map +1 -0
  65. package/dist/chunk-6KWCHTK3.js +166 -0
  66. package/dist/chunk-6KWCHTK3.js.map +1 -0
  67. package/dist/chunk-6OOWOPCX.js +1708 -0
  68. package/dist/chunk-6OOWOPCX.js.map +1 -0
  69. package/dist/chunk-7BBRPWQJ.js +257 -0
  70. package/dist/chunk-7BBRPWQJ.js.map +1 -0
  71. package/dist/{chunk-FVTIDXYK.mjs → chunk-AKSEBAR7.mjs} +29 -19
  72. package/dist/chunk-AKSEBAR7.mjs.map +1 -0
  73. package/dist/chunk-AS64GWBX.js +204 -0
  74. package/dist/chunk-AS64GWBX.js.map +1 -0
  75. package/dist/chunk-AULFBXM5.mjs +331 -0
  76. package/dist/chunk-AULFBXM5.mjs.map +1 -0
  77. package/dist/chunk-AW3WR2D3.mjs +238 -0
  78. package/dist/chunk-AW3WR2D3.mjs.map +1 -0
  79. package/dist/chunk-BIQQ53O2.js +45 -0
  80. package/dist/chunk-BIQQ53O2.js.map +1 -0
  81. package/dist/chunk-C6MPV3CY.js +260 -0
  82. package/dist/chunk-C6MPV3CY.js.map +1 -0
  83. package/dist/{chunk-AYPP5JEQ.mjs → chunk-CLEQO6GU.mjs} +5 -5
  84. package/dist/chunk-CLEQO6GU.mjs.map +1 -0
  85. package/dist/chunk-CVHPLURA.js +147 -0
  86. package/dist/chunk-CVHPLURA.js.map +1 -0
  87. package/dist/chunk-D2RBCFNW.mjs +130 -0
  88. package/dist/chunk-D2RBCFNW.mjs.map +1 -0
  89. package/dist/chunk-ECD4FV3A.mjs +11 -0
  90. package/dist/chunk-ECD4FV3A.mjs.map +1 -0
  91. package/dist/chunk-EDJBZPMW.mjs +255 -0
  92. package/dist/chunk-EDJBZPMW.mjs.map +1 -0
  93. package/dist/chunk-FPAI4QYW.mjs +145 -0
  94. package/dist/chunk-FPAI4QYW.mjs.map +1 -0
  95. package/dist/chunk-HM25ZMO3.js +18 -0
  96. package/dist/chunk-HM25ZMO3.js.map +1 -0
  97. package/dist/chunk-IHC6UYKK.js +4 -0
  98. package/dist/{chunk-DRBRT57F.js.map → chunk-IHC6UYKK.js.map} +1 -1
  99. package/dist/{chunk-DMAHXBA5.mjs → chunk-J5BFFL3X.mjs} +87 -47
  100. package/dist/chunk-J5BFFL3X.mjs.map +1 -0
  101. package/dist/chunk-JIKAD4YL.js +4 -0
  102. package/dist/{chunk-KEXKKQVW.js.map → chunk-JIKAD4YL.js.map} +1 -1
  103. package/dist/{chunk-EFAPDN4J.js → chunk-JWEXGALU.js} +730 -33
  104. package/dist/chunk-JWEXGALU.js.map +1 -0
  105. package/dist/{chunk-4K5GBNQV.mjs → chunk-KDT76YQE.mjs} +52 -13
  106. package/dist/chunk-KDT76YQE.mjs.map +1 -0
  107. package/dist/chunk-LMQLMMEX.js +317 -0
  108. package/dist/chunk-LMQLMMEX.js.map +1 -0
  109. package/dist/{chunk-TOMVBPNZ.js → chunk-LS4TK6SX.js} +9 -4
  110. package/dist/chunk-LS4TK6SX.js.map +1 -0
  111. package/dist/chunk-M4WMHD3X.mjs +40 -0
  112. package/dist/chunk-M4WMHD3X.mjs.map +1 -0
  113. package/dist/chunk-MCOK3UFR.mjs +280 -0
  114. package/dist/chunk-MCOK3UFR.mjs.map +1 -0
  115. package/dist/chunk-MGQSQCFG.js +176 -0
  116. package/dist/chunk-MGQSQCFG.js.map +1 -0
  117. package/dist/chunk-MKE3BUL3.mjs +3 -0
  118. package/dist/{chunk-CYDWEPFL.mjs.map → chunk-MKE3BUL3.mjs.map} +1 -1
  119. package/dist/chunk-MNJ5OYPE.mjs +17 -0
  120. package/dist/chunk-MNJ5OYPE.mjs.map +1 -0
  121. package/dist/chunk-MNXD45J7.mjs +164 -0
  122. package/dist/chunk-MNXD45J7.mjs.map +1 -0
  123. package/dist/chunk-NGDPQC5E.js +333 -0
  124. package/dist/chunk-NGDPQC5E.js.map +1 -0
  125. package/dist/chunk-NNNCVFOH.mjs +16 -0
  126. package/dist/chunk-NNNCVFOH.mjs.map +1 -0
  127. package/dist/chunk-NZ4BJ2IC.mjs +315 -0
  128. package/dist/chunk-NZ4BJ2IC.mjs.map +1 -0
  129. package/dist/chunk-OKNM7ODQ.js +29 -0
  130. package/dist/chunk-OKNM7ODQ.js.map +1 -0
  131. package/dist/{chunk-DCFHANLR.mjs → chunk-OTG75GVH.mjs} +725 -34
  132. package/dist/chunk-OTG75GVH.mjs.map +1 -0
  133. package/dist/chunk-OZ6DGBRL.mjs +25 -0
  134. package/dist/chunk-OZ6DGBRL.mjs.map +1 -0
  135. package/dist/chunk-P25HBGP5.mjs +3 -0
  136. package/dist/chunk-P25HBGP5.mjs.map +1 -0
  137. package/dist/{chunk-XG7K4R56.js → chunk-P7KLEPVI.js} +52 -12
  138. package/dist/chunk-P7KLEPVI.js.map +1 -0
  139. package/dist/{chunk-OPKQMN46.mjs → chunk-PAPXGPJB.mjs} +9 -4
  140. package/dist/chunk-PAPXGPJB.mjs.map +1 -0
  141. package/dist/chunk-PCNXJAU5.js +19 -0
  142. package/dist/chunk-PCNXJAU5.js.map +1 -0
  143. package/dist/{chunk-5IT5OXQ5.js → chunk-PD6HWEMG.js} +40 -30
  144. package/dist/chunk-PD6HWEMG.js.map +1 -0
  145. package/dist/{chunk-ER42VG7H.js → chunk-PH2KXREH.js} +20 -3
  146. package/dist/chunk-PH2KXREH.js.map +1 -0
  147. package/dist/chunk-Q5ERW5ZW.mjs +107 -0
  148. package/dist/chunk-Q5ERW5ZW.mjs.map +1 -0
  149. package/dist/chunk-Q7YNBSVH.js +28 -0
  150. package/dist/chunk-Q7YNBSVH.js.map +1 -0
  151. package/dist/{chunk-T644D54P.mjs → chunk-QKO2FZGN.mjs} +16 -4
  152. package/dist/chunk-QKO2FZGN.mjs.map +1 -0
  153. package/dist/{chunk-CIRZKWLL.js → chunk-RVFSRYI5.js} +5 -3
  154. package/dist/chunk-RVFSRYI5.js.map +1 -0
  155. package/dist/{chunk-KPBCG4X2.js → chunk-RW37KJ77.js} +11 -11
  156. package/dist/chunk-RW37KJ77.js.map +1 -0
  157. package/dist/chunk-SD7BHT2F.mjs +3 -0
  158. package/dist/chunk-SD7BHT2F.mjs.map +1 -0
  159. package/dist/chunk-SP5M57BG.mjs +258 -0
  160. package/dist/chunk-SP5M57BG.mjs.map +1 -0
  161. package/dist/chunk-TKSHYEYA.mjs +1706 -0
  162. package/dist/chunk-TKSHYEYA.mjs.map +1 -0
  163. package/dist/chunk-WTS75RUC.js +4 -0
  164. package/dist/chunk-WTS75RUC.js.map +1 -0
  165. package/dist/{chunk-ZRDU6CIB.js → chunk-XRPIGMA2.js} +108 -68
  166. package/dist/chunk-XRPIGMA2.js.map +1 -0
  167. package/dist/chunk-XTKSM4QE.js +132 -0
  168. package/dist/chunk-XTKSM4QE.js.map +1 -0
  169. package/dist/chunk-XUE3CIJ5.mjs +174 -0
  170. package/dist/chunk-XUE3CIJ5.mjs.map +1 -0
  171. package/dist/chunk-YYUOLM6U.js +244 -0
  172. package/dist/chunk-YYUOLM6U.js.map +1 -0
  173. package/dist/chunk-ZH44DHVR.mjs +26 -0
  174. package/dist/chunk-ZH44DHVR.mjs.map +1 -0
  175. package/dist/chunk-ZPHOOG72.js +112 -0
  176. package/dist/chunk-ZPHOOG72.js.map +1 -0
  177. package/dist/constants.d.mts +7 -2
  178. package/dist/constants.d.ts +7 -2
  179. package/dist/constants.js +57 -38
  180. package/dist/constants.mjs +1 -2
  181. package/dist/deployments.generated.d.mts +2 -0
  182. package/dist/deployments.generated.d.ts +2 -0
  183. package/dist/deployments.generated.js +12 -0
  184. package/dist/deployments.generated.js.map +1 -0
  185. package/dist/deployments.generated.mjs +3 -0
  186. package/dist/deployments.generated.mjs.map +1 -0
  187. package/dist/entities/DopplerFactory.d.mts +139 -11
  188. package/dist/entities/DopplerFactory.d.ts +139 -11
  189. package/dist/entities/DopplerFactory.js +17 -7
  190. package/dist/entities/DopplerFactory.mjs +16 -6
  191. package/dist/entities/auction/DynamicAuction.d.mts +19 -4
  192. package/dist/entities/auction/DynamicAuction.d.ts +19 -4
  193. package/dist/entities/auction/DynamicAuction.js +6 -6
  194. package/dist/entities/auction/DynamicAuction.mjs +5 -5
  195. package/dist/entities/auction/MulticurvePool.d.mts +55 -0
  196. package/dist/entities/auction/MulticurvePool.d.ts +55 -0
  197. package/dist/entities/auction/MulticurvePool.js +18 -0
  198. package/dist/entities/auction/MulticurvePool.js.map +1 -0
  199. package/dist/entities/auction/MulticurvePool.mjs +9 -0
  200. package/dist/entities/auction/MulticurvePool.mjs.map +1 -0
  201. package/dist/entities/auction/StaticAuction.d.mts +6 -3
  202. package/dist/entities/auction/StaticAuction.d.ts +6 -3
  203. package/dist/entities/auction/StaticAuction.js +6 -6
  204. package/dist/entities/auction/StaticAuction.mjs +5 -5
  205. package/dist/entities/auction/index.d.mts +3 -0
  206. package/dist/entities/auction/index.d.ts +3 -0
  207. package/dist/entities/auction/index.js +16 -9
  208. package/dist/entities/auction/index.mjs +10 -7
  209. package/dist/entities/quoter/Quoter.d.mts +44 -2
  210. package/dist/entities/quoter/Quoter.d.ts +44 -2
  211. package/dist/entities/quoter/Quoter.js +6 -6
  212. package/dist/entities/quoter/Quoter.mjs +5 -5
  213. package/dist/entities/quoter/index.d.mts +3 -0
  214. package/dist/entities/quoter/index.d.ts +3 -0
  215. package/dist/entities/quoter/index.js +6 -6
  216. package/dist/entities/quoter/index.mjs +5 -5
  217. package/dist/entities/token/derc20/Derc20.d.mts +33 -7
  218. package/dist/entities/token/derc20/Derc20.d.ts +33 -7
  219. package/dist/entities/token/derc20/Derc20.js +4 -5
  220. package/dist/entities/token/derc20/Derc20.mjs +3 -4
  221. package/dist/entities/token/derc20/index.d.mts +3 -0
  222. package/dist/entities/token/derc20/index.d.ts +3 -0
  223. package/dist/entities/token/derc20/index.js +4 -5
  224. package/dist/entities/token/derc20/index.mjs +3 -4
  225. package/dist/entities/token/eth/Eth.d.mts +7 -3
  226. package/dist/entities/token/eth/Eth.d.ts +7 -3
  227. package/dist/entities/token/eth/Eth.js +2 -3
  228. package/dist/entities/token/eth/Eth.mjs +1 -2
  229. package/dist/entities/token/eth/index.d.mts +3 -0
  230. package/dist/entities/token/eth/index.d.ts +3 -0
  231. package/dist/entities/token/eth/index.js +2 -3
  232. package/dist/entities/token/eth/index.mjs +1 -2
  233. package/dist/entities/token/index.d.mts +3 -0
  234. package/dist/entities/token/index.d.ts +3 -0
  235. package/dist/entities/token/index.js +6 -7
  236. package/dist/entities/token/index.mjs +4 -5
  237. package/dist/index.d.mts +18 -6
  238. package/dist/index.d.ts +18 -6
  239. package/dist/index.js +305 -140
  240. package/dist/index.js.map +1 -1
  241. package/dist/index.mjs +32 -19
  242. package/dist/index.mjs.map +1 -1
  243. package/dist/types.d.mts +260 -22
  244. package/dist/types.d.ts +260 -22
  245. package/dist/types.js +12 -3
  246. package/dist/types.mjs +3 -2
  247. package/dist/utils/airlock.d.mts +11 -0
  248. package/dist/utils/airlock.d.ts +11 -0
  249. package/dist/utils/airlock.js +26 -0
  250. package/dist/utils/airlock.js.map +1 -0
  251. package/dist/utils/airlock.mjs +5 -0
  252. package/dist/utils/airlock.mjs.map +1 -0
  253. package/dist/utils/balanceDelta.d.mts +10 -0
  254. package/dist/utils/balanceDelta.d.ts +10 -0
  255. package/dist/utils/balanceDelta.js +12 -0
  256. package/dist/utils/balanceDelta.js.map +1 -0
  257. package/dist/utils/balanceDelta.mjs +3 -0
  258. package/dist/utils/balanceDelta.mjs.map +1 -0
  259. package/dist/utils/computeOptimalGamma.d.mts +7 -0
  260. package/dist/utils/computeOptimalGamma.d.ts +7 -0
  261. package/dist/utils/computeOptimalGamma.js +12 -0
  262. package/dist/utils/computeOptimalGamma.js.map +1 -0
  263. package/dist/utils/computeOptimalGamma.mjs +3 -0
  264. package/dist/utils/computeOptimalGamma.mjs.map +1 -0
  265. package/dist/utils/index.d.mts +11 -0
  266. package/dist/utils/index.d.ts +11 -0
  267. package/dist/utils/index.js +114 -24
  268. package/dist/utils/index.mjs +14 -4
  269. package/dist/utils/isToken0Expected.d.mts +13 -0
  270. package/dist/utils/isToken0Expected.d.ts +13 -0
  271. package/dist/utils/isToken0Expected.js +12 -0
  272. package/dist/utils/isToken0Expected.js.map +1 -0
  273. package/dist/utils/isToken0Expected.mjs +3 -0
  274. package/dist/utils/isToken0Expected.mjs.map +1 -0
  275. package/dist/utils/marketCapHelpers.d.mts +309 -0
  276. package/dist/utils/marketCapHelpers.d.ts +309 -0
  277. package/dist/utils/marketCapHelpers.js +54 -0
  278. package/dist/utils/marketCapHelpers.js.map +1 -0
  279. package/dist/utils/marketCapHelpers.mjs +5 -0
  280. package/dist/utils/marketCapHelpers.mjs.map +1 -0
  281. package/dist/utils/poolKey.d.mts +17 -0
  282. package/dist/utils/poolKey.d.ts +17 -0
  283. package/dist/utils/poolKey.js +12 -0
  284. package/dist/utils/poolKey.js.map +1 -0
  285. package/dist/utils/poolKey.mjs +3 -0
  286. package/dist/utils/poolKey.mjs.map +1 -0
  287. package/dist/utils/priceHelpers.d.mts +3 -3
  288. package/dist/utils/priceHelpers.d.ts +3 -3
  289. package/dist/utils/priceHelpers.js +10 -11
  290. package/dist/utils/priceHelpers.mjs +2 -3
  291. package/dist/utils/tickMath.d.mts +8 -1
  292. package/dist/utils/tickMath.d.ts +8 -1
  293. package/dist/utils/tickMath.js +17 -14
  294. package/dist/utils/tickMath.mjs +1 -2
  295. package/dist/utils/tokenAddressMiner.d.mts +30 -0
  296. package/dist/utils/tokenAddressMiner.d.ts +30 -0
  297. package/dist/utils/tokenAddressMiner.js +14 -0
  298. package/dist/utils/tokenAddressMiner.js.map +1 -0
  299. package/dist/utils/tokenAddressMiner.mjs +5 -0
  300. package/dist/utils/tokenAddressMiner.mjs.map +1 -0
  301. package/package.json +14 -11
  302. package/dist/__tests__/mocks/addresses.d.mts +0 -46
  303. package/dist/__tests__/mocks/addresses.d.ts +0 -46
  304. package/dist/__tests__/mocks/addresses.js +0 -53
  305. package/dist/__tests__/mocks/addresses.js.map +0 -1
  306. package/dist/__tests__/mocks/addresses.mjs +0 -44
  307. package/dist/__tests__/mocks/addresses.mjs.map +0 -1
  308. package/dist/__tests__/mocks/clients.d.mts +0 -22
  309. package/dist/__tests__/mocks/clients.d.ts +0 -22
  310. package/dist/__tests__/mocks/clients.js +0 -17036
  311. package/dist/__tests__/mocks/clients.js.map +0 -1
  312. package/dist/__tests__/mocks/clients.mjs +0 -17032
  313. package/dist/__tests__/mocks/clients.mjs.map +0 -1
  314. package/dist/chunk-2N5JZSZ4.js +0 -14
  315. package/dist/chunk-2N5JZSZ4.js.map +0 -1
  316. package/dist/chunk-3OZRDL3O.js +0 -162
  317. package/dist/chunk-3OZRDL3O.js.map +0 -1
  318. package/dist/chunk-4K5GBNQV.mjs.map +0 -1
  319. package/dist/chunk-5IT5OXQ5.js.map +0 -1
  320. package/dist/chunk-7F5IXZLH.js +0 -308
  321. package/dist/chunk-7F5IXZLH.js.map +0 -1
  322. package/dist/chunk-7VP5VR7J.js +0 -82
  323. package/dist/chunk-7VP5VR7J.js.map +0 -1
  324. package/dist/chunk-7W72MFJO.mjs.map +0 -1
  325. package/dist/chunk-AYPP5JEQ.mjs.map +0 -1
  326. package/dist/chunk-AZLFJNTG.mjs +0 -3
  327. package/dist/chunk-CIRZKWLL.js.map +0 -1
  328. package/dist/chunk-CYDWEPFL.mjs +0 -3
  329. package/dist/chunk-DCFHANLR.mjs.map +0 -1
  330. package/dist/chunk-DMAHXBA5.mjs.map +0 -1
  331. package/dist/chunk-DRBRT57F.js +0 -4
  332. package/dist/chunk-EFAPDN4J.js.map +0 -1
  333. package/dist/chunk-ER42VG7H.js.map +0 -1
  334. package/dist/chunk-FVTIDXYK.mjs.map +0 -1
  335. package/dist/chunk-IHBIBFZK.mjs +0 -12
  336. package/dist/chunk-IHBIBFZK.mjs.map +0 -1
  337. package/dist/chunk-IXSKPEHB.mjs +0 -160
  338. package/dist/chunk-IXSKPEHB.mjs.map +0 -1
  339. package/dist/chunk-KEXKKQVW.js +0 -42
  340. package/dist/chunk-KFD6U3LQ.mjs +0 -305
  341. package/dist/chunk-KFD6U3LQ.mjs.map +0 -1
  342. package/dist/chunk-KPBCG4X2.js.map +0 -1
  343. package/dist/chunk-KRN3ROUE.js +0 -4
  344. package/dist/chunk-KT7U37XS.mjs +0 -207
  345. package/dist/chunk-KT7U37XS.mjs.map +0 -1
  346. package/dist/chunk-LOROXNH3.mjs +0 -37
  347. package/dist/chunk-LOROXNH3.mjs.map +0 -1
  348. package/dist/chunk-O6GYIJ6X.mjs +0 -80
  349. package/dist/chunk-O6GYIJ6X.mjs.map +0 -1
  350. package/dist/chunk-OPKQMN46.mjs.map +0 -1
  351. package/dist/chunk-RIMM47JL.mjs +0 -176
  352. package/dist/chunk-RIMM47JL.mjs.map +0 -1
  353. package/dist/chunk-SUOMK3CU.js +0 -872
  354. package/dist/chunk-SUOMK3CU.js.map +0 -1
  355. package/dist/chunk-T644D54P.mjs.map +0 -1
  356. package/dist/chunk-TOMVBPNZ.js.map +0 -1
  357. package/dist/chunk-XEMZQHTX.mjs +0 -870
  358. package/dist/chunk-XEMZQHTX.mjs.map +0 -1
  359. package/dist/chunk-XG7K4R56.js.map +0 -1
  360. package/dist/chunk-XQ2VMR26.js +0 -180
  361. package/dist/chunk-XQ2VMR26.js.map +0 -1
  362. package/dist/chunk-ZAIP54LX.js +0 -209
  363. package/dist/chunk-ZAIP54LX.js.map +0 -1
  364. package/dist/chunk-ZRDU6CIB.js.map +0 -1
  365. package/dist/magic-string.es-CBLXTCZP.js +0 -1304
  366. package/dist/magic-string.es-CBLXTCZP.js.map +0 -1
  367. package/dist/magic-string.es-QHA47FSB.mjs +0 -1298
  368. package/dist/magic-string.es-QHA47FSB.mjs.map +0 -1
@@ -1,91 +1,181 @@
1
1
  'use strict';
2
2
 
3
- require('../chunk-DRBRT57F.js');
4
- var chunkKPBCG4X2_js = require('../chunk-KPBCG4X2.js');
5
- var chunkXG7K4R56_js = require('../chunk-XG7K4R56.js');
6
- require('../chunk-KEXKKQVW.js');
3
+ require('../chunk-WTS75RUC.js');
4
+ var chunkMGQSQCFG_js = require('../chunk-MGQSQCFG.js');
5
+ var chunk4HM3ERBU_js = require('../chunk-4HM3ERBU.js');
6
+ var chunkPCNXJAU5_js = require('../chunk-PCNXJAU5.js');
7
+ var chunkAS64GWBX_js = require('../chunk-AS64GWBX.js');
8
+ var chunkHM25ZMO3_js = require('../chunk-HM25ZMO3.js');
9
+ var chunkQ7YNBSVH_js = require('../chunk-Q7YNBSVH.js');
10
+ var chunkRW37KJ77_js = require('../chunk-RW37KJ77.js');
11
+ var chunkP7KLEPVI_js = require('../chunk-P7KLEPVI.js');
12
+ require('../chunk-JWEXGALU.js');
13
+ var chunkBIQQ53O2_js = require('../chunk-BIQQ53O2.js');
14
+ require('../chunk-YYUOLM6U.js');
15
+ require('../chunk-CVHPLURA.js');
16
+ require('../chunk-RVFSRYI5.js');
7
17
 
8
18
 
9
19
 
20
+ Object.defineProperty(exports, "mineTokenAddress", {
21
+ enumerable: true,
22
+ get: function () { return chunkMGQSQCFG_js.mineTokenAddress; }
23
+ });
24
+ Object.defineProperty(exports, "decodeBalanceDelta", {
25
+ enumerable: true,
26
+ get: function () { return chunk4HM3ERBU_js.decodeBalanceDelta; }
27
+ });
28
+ Object.defineProperty(exports, "computeOptimalGamma", {
29
+ enumerable: true,
30
+ get: function () { return chunkPCNXJAU5_js.computeOptimalGamma; }
31
+ });
32
+ Object.defineProperty(exports, "applyTickOffsets", {
33
+ enumerable: true,
34
+ get: function () { return chunkAS64GWBX_js.applyTickOffsets; }
35
+ });
36
+ Object.defineProperty(exports, "isToken1", {
37
+ enumerable: true,
38
+ get: function () { return chunkAS64GWBX_js.isToken1; }
39
+ });
40
+ Object.defineProperty(exports, "marketCapRangeToTicks", {
41
+ enumerable: true,
42
+ get: function () { return chunkAS64GWBX_js.marketCapRangeToTicks; }
43
+ });
44
+ Object.defineProperty(exports, "marketCapRangeToTicksForCurve", {
45
+ enumerable: true,
46
+ get: function () { return chunkAS64GWBX_js.marketCapRangeToTicksForCurve; }
47
+ });
48
+ Object.defineProperty(exports, "marketCapToTick", {
49
+ enumerable: true,
50
+ get: function () { return chunkAS64GWBX_js.marketCapToTick; }
51
+ });
52
+ Object.defineProperty(exports, "marketCapToTokenPrice", {
53
+ enumerable: true,
54
+ get: function () { return chunkAS64GWBX_js.marketCapToTokenPrice; }
55
+ });
56
+ Object.defineProperty(exports, "ratioToTick", {
57
+ enumerable: true,
58
+ get: function () { return chunkAS64GWBX_js.ratioToTick; }
59
+ });
60
+ Object.defineProperty(exports, "tickToMarketCap", {
61
+ enumerable: true,
62
+ get: function () { return chunkAS64GWBX_js.tickToMarketCap; }
63
+ });
64
+ Object.defineProperty(exports, "tokenPriceToRatio", {
65
+ enumerable: true,
66
+ get: function () { return chunkAS64GWBX_js.tokenPriceToRatio; }
67
+ });
68
+ Object.defineProperty(exports, "transformTicksForAuction", {
69
+ enumerable: true,
70
+ get: function () { return chunkAS64GWBX_js.transformTicksForAuction; }
71
+ });
72
+ Object.defineProperty(exports, "validateMarketCapParameters", {
73
+ enumerable: true,
74
+ get: function () { return chunkAS64GWBX_js.validateMarketCapParameters; }
75
+ });
76
+ Object.defineProperty(exports, "isToken0Expected", {
77
+ enumerable: true,
78
+ get: function () { return chunkHM25ZMO3_js.isToken0Expected; }
79
+ });
80
+ Object.defineProperty(exports, "computePoolId", {
81
+ enumerable: true,
82
+ get: function () { return chunkQ7YNBSVH_js.computePoolId; }
83
+ });
10
84
  Object.defineProperty(exports, "calculateFDV", {
11
85
  enumerable: true,
12
- get: function () { return chunkKPBCG4X2_js.calculateFDV; }
86
+ get: function () { return chunkRW37KJ77_js.calculateFDV; }
13
87
  });
14
88
  Object.defineProperty(exports, "calculateGamma", {
15
89
  enumerable: true,
16
- get: function () { return chunkKPBCG4X2_js.calculateGamma; }
90
+ get: function () { return chunkRW37KJ77_js.calculateGamma; }
17
91
  });
18
92
  Object.defineProperty(exports, "calculateMarketCap", {
19
93
  enumerable: true,
20
- get: function () { return chunkKPBCG4X2_js.calculateMarketCap; }
94
+ get: function () { return chunkRW37KJ77_js.calculateMarketCap; }
21
95
  });
22
96
  Object.defineProperty(exports, "calculateTickRange", {
23
97
  enumerable: true,
24
- get: function () { return chunkKPBCG4X2_js.calculateTickRange; }
98
+ get: function () { return chunkRW37KJ77_js.calculateTickRange; }
25
99
  });
26
100
  Object.defineProperty(exports, "calculateTokensToSell", {
27
101
  enumerable: true,
28
- get: function () { return chunkKPBCG4X2_js.calculateTokensToSell; }
102
+ get: function () { return chunkRW37KJ77_js.calculateTokensToSell; }
29
103
  });
30
104
  Object.defineProperty(exports, "estimatePriceAtEpoch", {
31
105
  enumerable: true,
32
- get: function () { return chunkKPBCG4X2_js.estimatePriceAtEpoch; }
106
+ get: function () { return chunkRW37KJ77_js.estimatePriceAtEpoch; }
33
107
  });
34
108
  Object.defineProperty(exports, "estimateSlippage", {
35
109
  enumerable: true,
36
- get: function () { return chunkKPBCG4X2_js.estimateSlippage; }
110
+ get: function () { return chunkRW37KJ77_js.estimateSlippage; }
37
111
  });
38
112
  Object.defineProperty(exports, "formatTickAsPrice", {
39
113
  enumerable: true,
40
- get: function () { return chunkKPBCG4X2_js.formatTickAsPrice; }
114
+ get: function () { return chunkRW37KJ77_js.formatTickAsPrice; }
41
115
  });
42
116
  Object.defineProperty(exports, "MAX_SQRT_RATIO", {
43
117
  enumerable: true,
44
- get: function () { return chunkXG7K4R56_js.MAX_SQRT_RATIO; }
118
+ get: function () { return chunkP7KLEPVI_js.MAX_SQRT_RATIO; }
45
119
  });
46
120
  Object.defineProperty(exports, "MAX_TICK", {
47
121
  enumerable: true,
48
- get: function () { return chunkXG7K4R56_js.MAX_TICK; }
122
+ get: function () { return chunkP7KLEPVI_js.MAX_TICK; }
49
123
  });
50
124
  Object.defineProperty(exports, "MIN_SQRT_RATIO", {
51
125
  enumerable: true,
52
- get: function () { return chunkXG7K4R56_js.MIN_SQRT_RATIO; }
126
+ get: function () { return chunkP7KLEPVI_js.MIN_SQRT_RATIO; }
53
127
  });
54
128
  Object.defineProperty(exports, "MIN_TICK", {
55
129
  enumerable: true,
56
- get: function () { return chunkXG7K4R56_js.MIN_TICK; }
130
+ get: function () { return chunkP7KLEPVI_js.MIN_TICK; }
57
131
  });
58
132
  Object.defineProperty(exports, "Q96", {
59
133
  enumerable: true,
60
- get: function () { return chunkXG7K4R56_js.Q96; }
134
+ get: function () { return chunkP7KLEPVI_js.Q96; }
61
135
  });
62
136
  Object.defineProperty(exports, "getNearestUsableTick", {
63
137
  enumerable: true,
64
- get: function () { return chunkXG7K4R56_js.getNearestUsableTick; }
138
+ get: function () { return chunkP7KLEPVI_js.getNearestUsableTick; }
65
139
  });
66
140
  Object.defineProperty(exports, "getSqrtRatioAtTick", {
67
141
  enumerable: true,
68
- get: function () { return chunkXG7K4R56_js.getSqrtRatioAtTick; }
142
+ get: function () { return chunkP7KLEPVI_js.getSqrtRatioAtTick; }
69
143
  });
70
144
  Object.defineProperty(exports, "getTickAtSqrtRatio", {
71
145
  enumerable: true,
72
- get: function () { return chunkXG7K4R56_js.getTickAtSqrtRatio; }
146
+ get: function () { return chunkP7KLEPVI_js.getTickAtSqrtRatio; }
73
147
  });
74
148
  Object.defineProperty(exports, "priceToSqrtPriceX96", {
75
149
  enumerable: true,
76
- get: function () { return chunkXG7K4R56_js.priceToSqrtPriceX96; }
150
+ get: function () { return chunkP7KLEPVI_js.priceToSqrtPriceX96; }
77
151
  });
78
152
  Object.defineProperty(exports, "priceToTick", {
79
153
  enumerable: true,
80
- get: function () { return chunkXG7K4R56_js.priceToTick; }
154
+ get: function () { return chunkP7KLEPVI_js.priceToTick; }
81
155
  });
82
156
  Object.defineProperty(exports, "sqrtPriceX96ToPrice", {
83
157
  enumerable: true,
84
- get: function () { return chunkXG7K4R56_js.sqrtPriceX96ToPrice; }
158
+ get: function () { return chunkP7KLEPVI_js.sqrtPriceX96ToPrice; }
85
159
  });
86
160
  Object.defineProperty(exports, "tickToPrice", {
87
161
  enumerable: true,
88
- get: function () { return chunkXG7K4R56_js.tickToPrice; }
162
+ get: function () { return chunkP7KLEPVI_js.tickToPrice; }
163
+ });
164
+ Object.defineProperty(exports, "DEFAULT_AIRLOCK_BENEFICIARY_SHARES", {
165
+ enumerable: true,
166
+ get: function () { return chunkBIQQ53O2_js.DEFAULT_AIRLOCK_BENEFICIARY_SHARES; }
167
+ });
168
+ Object.defineProperty(exports, "createAirlockBeneficiary", {
169
+ enumerable: true,
170
+ get: function () { return chunkBIQQ53O2_js.createAirlockBeneficiary; }
171
+ });
172
+ Object.defineProperty(exports, "getAirlockBeneficiary", {
173
+ enumerable: true,
174
+ get: function () { return chunkBIQQ53O2_js.getAirlockBeneficiary; }
175
+ });
176
+ Object.defineProperty(exports, "getAirlockOwner", {
177
+ enumerable: true,
178
+ get: function () { return chunkBIQQ53O2_js.getAirlockOwner; }
89
179
  });
90
180
  //# sourceMappingURL=index.js.map
91
181
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,16 @@
1
- import '../chunk-CYDWEPFL.mjs';
2
- export { calculateFDV, calculateGamma, calculateMarketCap, calculateTickRange, calculateTokensToSell, estimatePriceAtEpoch, estimateSlippage, formatTickAsPrice } from '../chunk-AYPP5JEQ.mjs';
3
- export { MAX_SQRT_RATIO, MAX_TICK, MIN_SQRT_RATIO, MIN_TICK, Q96, getNearestUsableTick, getSqrtRatioAtTick, getTickAtSqrtRatio, priceToSqrtPriceX96, priceToTick, sqrtPriceX96ToPrice, tickToPrice } from '../chunk-4K5GBNQV.mjs';
4
- import '../chunk-LOROXNH3.mjs';
1
+ import '../chunk-5TL5V6UX.mjs';
2
+ export { mineTokenAddress } from '../chunk-XUE3CIJ5.mjs';
3
+ export { decodeBalanceDelta } from '../chunk-ECD4FV3A.mjs';
4
+ export { computeOptimalGamma } from '../chunk-MNJ5OYPE.mjs';
5
+ export { applyTickOffsets, isToken1, marketCapRangeToTicks, marketCapRangeToTicksForCurve, marketCapToTick, marketCapToTokenPrice, ratioToTick, tickToMarketCap, tokenPriceToRatio, transformTicksForAuction, validateMarketCapParameters } from '../chunk-64AWG57M.mjs';
6
+ export { isToken0Expected } from '../chunk-NNNCVFOH.mjs';
7
+ export { computePoolId } from '../chunk-ZH44DHVR.mjs';
8
+ export { calculateFDV, calculateGamma, calculateMarketCap, calculateTickRange, calculateTokensToSell, estimatePriceAtEpoch, estimateSlippage, formatTickAsPrice } from '../chunk-CLEQO6GU.mjs';
9
+ export { MAX_SQRT_RATIO, MAX_TICK, MIN_SQRT_RATIO, MIN_TICK, Q96, getNearestUsableTick, getSqrtRatioAtTick, getTickAtSqrtRatio, priceToSqrtPriceX96, priceToTick, sqrtPriceX96ToPrice, tickToPrice } from '../chunk-KDT76YQE.mjs';
10
+ import '../chunk-OTG75GVH.mjs';
11
+ export { DEFAULT_AIRLOCK_BENEFICIARY_SHARES, createAirlockBeneficiary, getAirlockBeneficiary, getAirlockOwner } from '../chunk-M4WMHD3X.mjs';
12
+ import '../chunk-AW3WR2D3.mjs';
13
+ import '../chunk-FPAI4QYW.mjs';
14
+ import '../chunk-4TROGENW.mjs';
5
15
  //# sourceMappingURL=index.mjs.map
6
16
  //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,13 @@
1
+ import { Address } from 'viem';
2
+
3
+ /**
4
+ * Determine token ordering based on numeraire address.
5
+ * Mining will find a salt such that token address is correctly ordered relative to numeraire.
6
+ * For numeraires > halfMaxUint160, token must be token0 (smaller address)
7
+ * For all other cases, token should be token1 (larger address)
8
+ * @param numeraire - Address of numeraire token
9
+ * @returns Whether base token address is expected to be generated as token0
10
+ */
11
+ declare function isToken0Expected(numeraire: Address): boolean;
12
+
13
+ export { isToken0Expected };
@@ -0,0 +1,13 @@
1
+ import { Address } from 'viem';
2
+
3
+ /**
4
+ * Determine token ordering based on numeraire address.
5
+ * Mining will find a salt such that token address is correctly ordered relative to numeraire.
6
+ * For numeraires > halfMaxUint160, token must be token0 (smaller address)
7
+ * For all other cases, token should be token1 (larger address)
8
+ * @param numeraire - Address of numeraire token
9
+ * @returns Whether base token address is expected to be generated as token0
10
+ */
11
+ declare function isToken0Expected(numeraire: Address): boolean;
12
+
13
+ export { isToken0Expected };
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkHM25ZMO3_js = require('../chunk-HM25ZMO3.js');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "isToken0Expected", {
8
+ enumerable: true,
9
+ get: function () { return chunkHM25ZMO3_js.isToken0Expected; }
10
+ });
11
+ //# sourceMappingURL=isToken0Expected.js.map
12
+ //# sourceMappingURL=isToken0Expected.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"isToken0Expected.js"}
@@ -0,0 +1,3 @@
1
+ export { isToken0Expected } from '../chunk-NNNCVFOH.mjs';
2
+ //# sourceMappingURL=isToken0Expected.mjs.map
3
+ //# sourceMappingURL=isToken0Expected.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"isToken0Expected.mjs"}
@@ -0,0 +1,309 @@
1
+ import { Address } from 'viem';
2
+ import { MarketCapRange, MarketCapValidationResult } from '../types.mjs';
3
+ import 'viem/chains';
4
+ import '../addresses.mjs';
5
+
6
+ /**
7
+ * Market cap conversion utilities for token launches
8
+ *
9
+ * These utilities convert between market cap (USD) and Uniswap ticks
10
+ * following the mathematical relationship:
11
+ *
12
+ * Market Cap (USD) → Token Price (USD) → Ratio (numeraire/token) → Tick
13
+ *
14
+ * Based on reference implementation: plan/priceMultiCurve.py
15
+ */
16
+
17
+ /**
18
+ * Convert market cap to token price
19
+ *
20
+ * @param marketCapUSD - Market capitalization in USD
21
+ * @param tokenSupply - Total token supply (as bigint with decimals, e.g., parseEther('1000000000'))
22
+ * @param tokenDecimals - Token decimals (default: 18)
23
+ * @returns Price of one token in USD
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * // $1M market cap with 1B tokens (18 decimals)
28
+ * const price = marketCapToTokenPrice(1_000_000, parseEther('1000000000'))
29
+ * // Returns: 0.001 (each token is worth $0.001)
30
+ * ```
31
+ */
32
+ declare function marketCapToTokenPrice(marketCapUSD: number, tokenSupply: bigint, tokenDecimals?: number): number;
33
+ /**
34
+ * Convert token price to price ratio (numeraire per token)
35
+ *
36
+ * @param tokenPriceUSD - Price of one token in USD
37
+ * @param numerairePriceUSD - Price of numeraire (e.g., ETH) in USD
38
+ * @param tokenDecimals - Token decimals (default: 18)
39
+ * @param numeraireDecimals - Numeraire decimals (default: 18)
40
+ * @returns Price ratio adjusted for decimals
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * // Token at $0.001, ETH at $3000, both 18 decimals
45
+ * const ratio = tokenPriceToRatio(0.001, 3000, 18, 18)
46
+ * // Returns: 3,000,000 (3M ETH wei per token wei at this ratio)
47
+ * ```
48
+ */
49
+ declare function tokenPriceToRatio(tokenPriceUSD: number, numerairePriceUSD: number, tokenDecimals?: number, numeraireDecimals?: number): number;
50
+ /**
51
+ * Convert ratio to tick using Uniswap's formula: tick = log(ratio) / log(1.0001)
52
+ *
53
+ * @param ratio - Price ratio (must be positive)
54
+ * @returns Raw tick value (before spacing adjustment)
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * ratioToTick(1) // Returns: 0
59
+ * ratioToTick(1.0001) // Returns: ~1
60
+ * ratioToTick(Math.pow(1.0001, 1000)) // Returns: ~1000
61
+ * ```
62
+ */
63
+ declare function ratioToTick(ratio: number): number;
64
+ /**
65
+ * Determine if the new token will be token1 in the Uniswap pair
66
+ *
67
+ * Uniswap orders tokens by address (token0 < token1 in hex comparison).
68
+ * This affects how ticks are interpreted for price calculations.
69
+ *
70
+ * @param tokenAddress - Address of the new token
71
+ * @param numeraireAddress - Address of the numeraire (e.g., WETH)
72
+ * @returns true if token will be token1, false if token0
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * isToken1('0xB000...', '0xA000...') // true (B > A)
77
+ * isToken1('0xA000...', '0xB000...') // false (A < B)
78
+ * ```
79
+ */
80
+ declare function isToken1(tokenAddress: string, numeraireAddress: string): boolean;
81
+ /**
82
+ * Complete conversion from market cap to usable tick
83
+ *
84
+ * This is the main entry point combining all conversion steps:
85
+ * 1. Market cap → Token price
86
+ * 2. Token price → Ratio
87
+ * 3. Ratio → Raw tick
88
+ * 4. Raw tick → Nearest usable tick (aligned to spacing)
89
+ * 5. Handle token ordering (negate if token is token1)
90
+ *
91
+ * **Important**: The returned tick includes token ordering adjustment.
92
+ * When the token is token1 (determined from numeraire address), the tick is NEGATED:
93
+ * - Higher market cap → smaller (more negative) tick
94
+ * - Lower market cap → larger (less negative) tick
95
+ *
96
+ * Builders apply additional transformations based on auction type.
97
+ * See builder implementations for auction-specific tick conventions.
98
+ *
99
+ * @param marketCapUSD - Target market cap in USD
100
+ * @param tokenSupply - Total token supply (with decimals, as bigint)
101
+ * @param numerairePriceUSD - Price of numeraire in USD (e.g., ETH = 3000)
102
+ * @param tokenDecimals - Token decimals (default: 18)
103
+ * @param numeraireDecimals - Numeraire decimals (default: 18)
104
+ * @param tickSpacing - Tick spacing of the pool (e.g., 60, 100)
105
+ * @param numeraire - Address of the numeraire token (e.g., WETH). Used to determine token ordering.
106
+ * @returns Nearest usable tick (negated when token is token1)
107
+ *
108
+ * @throws Error if calculated tick is out of bounds [-887272, 887272]
109
+ *
110
+ * @example
111
+ * ```ts
112
+ * // With WETH numeraire on Base:
113
+ * const tick = marketCapToTick(
114
+ * 1_000_000, // $1M market cap
115
+ * parseEther('1000000000'), // 1B tokens
116
+ * 3000, // ETH = $3000
117
+ * 18, 18, // both 18 decimals
118
+ * 60, // tick spacing
119
+ * '0x4200000000000000000000000000000000000006' // WETH address
120
+ * )
121
+ * // Returns negative tick (e.g., -149100) because token will be token1
122
+ * ```
123
+ */
124
+ declare function marketCapToTick(marketCapUSD: number, tokenSupply: bigint, numerairePriceUSD: number, tokenDecimals: number | undefined, numeraireDecimals: number | undefined, tickSpacing: number, numeraire: Address): number;
125
+ /**
126
+ * Convert a market cap range to tick range
127
+ *
128
+ * Used for V3 Static Auctions and V4 Dynamic Auctions where you need
129
+ * a start and end tick for the bonding curve.
130
+ *
131
+ * **Important**: This function applies token ordering via marketCapToTick
132
+ * (negates ticks when token is token1), then normalizes so startTick < endTick.
133
+ *
134
+ * Due to the negation + normalization:
135
+ * - When token is token1: both ticks are NEGATIVE
136
+ * - startTick = more negative (corresponds to LOWER market cap)
137
+ * - endTick = less negative (corresponds to HIGHER market cap)
138
+ * - When token is token0: both ticks are POSITIVE
139
+ * - startTick = smaller positive (corresponds to LOWER market cap)
140
+ * - endTick = larger positive (corresponds to HIGHER market cap)
141
+ *
142
+ * Builders apply additional transformations based on auction type semantics.
143
+ * See builder implementations for auction-specific tick handling.
144
+ *
145
+ * @param marketCapRange - Start and end market caps in USD (start < end required)
146
+ * @param tokenSupply - Total token supply (with decimals)
147
+ * @param numerairePriceUSD - Price of numeraire in USD
148
+ * @param tokenDecimals - Token decimals (default: 18)
149
+ * @param numeraireDecimals - Numeraire decimals (default: 18)
150
+ * @param tickSpacing - Tick spacing
151
+ * @param numeraire - Address of the numeraire token. Used to determine token ordering.
152
+ * @returns Object with startTick and endTick (startTick < endTick numerically)
153
+ *
154
+ * @throws Error if start >= end market cap or if ticks are out of bounds
155
+ *
156
+ * @example
157
+ * ```ts
158
+ * // With WETH numeraire on Base:
159
+ * const { startTick, endTick } = marketCapRangeToTicks(
160
+ * { start: 500_000, end: 50_000_000 }, // $500k → $50M
161
+ * parseEther('1000000000'),
162
+ * 3000,
163
+ * 18, 18,
164
+ * 60,
165
+ * '0x4200000000000000000000000000000000000006' // WETH address
166
+ * )
167
+ * // Returns: startTick=-156080 (500k), endTick=-110020 (50M)
168
+ * // Note: startTick < endTick, but startTick corresponds to LOWER market cap
169
+ * ```
170
+ */
171
+ declare function marketCapRangeToTicks(marketCapRange: MarketCapRange, tokenSupply: bigint, numerairePriceUSD: number, tokenDecimals: number | undefined, numeraireDecimals: number | undefined, tickSpacing: number, numeraire: Address): {
172
+ startTick: number;
173
+ endTick: number;
174
+ };
175
+ /**
176
+ * Transform ticks from marketCapRangeToTicks format to auction contract format.
177
+ *
178
+ * For range-based auctions (Static V3, Dynamic V4), the contracts expect ticks
179
+ * in a specific format based on token ordering. This function handles the
180
+ * negation and swapping required when the token is token1.
181
+ *
182
+ * @param rawStartTick - Start tick from marketCapRangeToTicks (lower market cap)
183
+ * @param rawEndTick - End tick from marketCapRangeToTicks (higher market cap)
184
+ * @param numeraire - Address of the numeraire token. Used to determine token ordering.
185
+ * @returns Transformed ticks ready for auction contract
186
+ *
187
+ * @example
188
+ * ```ts
189
+ * const { startTick: raw1, endTick: raw2 } = marketCapRangeToTicks(...)
190
+ * const { startTick, endTick } = transformTicksForAuction(raw1, raw2, WETH_ADDRESS)
191
+ * ```
192
+ */
193
+ declare function transformTicksForAuction(rawStartTick: number, rawEndTick: number, numeraire: Address): {
194
+ startTick: number;
195
+ endTick: number;
196
+ };
197
+ /**
198
+ * Apply curvature offsets to a peg tick for Multicurve positions
199
+ *
200
+ * Multicurve positions are defined relative to a "peg" tick (starting market cap).
201
+ * Offsets define how far above/below the peg each curve extends.
202
+ *
203
+ * Token ordering (determined from numeraire address) affects how offsets are applied:
204
+ * - token1: tickLower = pegTick + offsetLower, tickUpper = pegTick + offsetUpper
205
+ * - token0: tickLower = pegTick - offsetUpper, tickUpper = pegTick - offsetLower
206
+ *
207
+ * @param pegTick - Base tick calculated from starting market cap
208
+ * @param offsetLower - Lower offset in ticks (distance from peg)
209
+ * @param offsetUpper - Upper offset in ticks (distance from peg)
210
+ * @param numeraire - Address of the numeraire token. Used to determine token ordering.
211
+ * @returns Tick range with offsets applied
212
+ *
213
+ * @example
214
+ * ```ts
215
+ * // Peg at -200000, curve from peg to 10000 ticks above (WETH numeraire)
216
+ * const { tickLower, tickUpper } = applyTickOffsets(
217
+ * -200000, 0, 10000,
218
+ * '0x4200000000000000000000000000000000000006'
219
+ * )
220
+ * // Returns: { tickLower: -200000, tickUpper: -190000 }
221
+ * ```
222
+ */
223
+ declare function applyTickOffsets(pegTick: number, offsetLower: number, offsetUpper: number, numeraire: Address): {
224
+ tickLower: number;
225
+ tickUpper: number;
226
+ };
227
+ /**
228
+ * Convert a market cap range to tick range for Multicurve curves.
229
+ *
230
+ * Unlike range-based auctions, Multicurve curves use ticks directly without
231
+ * the negate-and-swap transformation. This function converts market cap
232
+ * bounds to the appropriate tick bounds based on token ordering.
233
+ *
234
+ * @param marketCapLower - Lower market cap bound in USD
235
+ * @param marketCapUpper - Upper market cap bound in USD
236
+ * @param tokenSupply - Total token supply (with decimals)
237
+ * @param numerairePriceUSD - Price of numeraire in USD
238
+ * @param tokenDecimals - Token decimals (default: 18)
239
+ * @param numeraireDecimals - Numeraire decimals (default: 18)
240
+ * @param tickSpacing - Tick spacing
241
+ * @param numeraire - Address of the numeraire token
242
+ * @returns Tick range { tickLower, tickUpper } where tickLower < tickUpper
243
+ *
244
+ * @example
245
+ * ```ts
246
+ * const { tickLower, tickUpper } = marketCapRangeToTicksForCurve(
247
+ * 500_000, // $500k lower
248
+ * 1_000_000, // $1M upper
249
+ * parseEther('1000000000'),
250
+ * 3000,
251
+ * 18, 18,
252
+ * 60,
253
+ * WETH_ADDRESS
254
+ * )
255
+ * ```
256
+ */
257
+ declare function marketCapRangeToTicksForCurve(marketCapLower: number, marketCapUpper: number, tokenSupply: bigint, numerairePriceUSD: number, tokenDecimals: number | undefined, numeraireDecimals: number | undefined, tickSpacing: number, numeraire: Address): {
258
+ tickLower: number;
259
+ tickUpper: number;
260
+ };
261
+ /**
262
+ * Validate market cap parameters and return warnings for unusual values
263
+ *
264
+ * This doesn't prevent execution but helps catch potential mistakes:
265
+ * - Very small market caps (< $1,000)
266
+ * - Very large market caps (> $1 trillion)
267
+ * - Extreme token prices (< $0.000001 or > $1M)
268
+ *
269
+ * @param marketCap - Market cap value to validate
270
+ * @param tokenSupply - Token supply (with decimals)
271
+ * @param tokenDecimals - Token decimals (default: 18)
272
+ * @returns Validation result with warnings array
273
+ *
274
+ * @example
275
+ * ```ts
276
+ * const result = validateMarketCapParameters(500, parseEther('1000000'))
277
+ * if (result.warnings.length > 0) {
278
+ * console.warn('Warnings:', result.warnings)
279
+ * }
280
+ * ```
281
+ */
282
+ declare function validateMarketCapParameters(marketCap: number, tokenSupply: bigint, tokenDecimals?: number): MarketCapValidationResult;
283
+ /**
284
+ * Calculate market cap from a tick (reverse conversion)
285
+ *
286
+ * Useful for displaying what market cap a given tick represents.
287
+ *
288
+ * @param tick - Uniswap tick value
289
+ * @param tokenSupply - Total token supply (with decimals)
290
+ * @param numerairePriceUSD - Price of numeraire in USD
291
+ * @param tokenDecimals - Token decimals (default: 18)
292
+ * @param numeraireDecimals - Numeraire decimals (default: 18)
293
+ * @param numeraire - Address of the numeraire token. Used to determine token ordering.
294
+ * @returns Market cap in USD
295
+ *
296
+ * @example
297
+ * ```ts
298
+ * const marketCap = tickToMarketCap(
299
+ * -192100,
300
+ * parseEther('1000000000'),
301
+ * 3000,
302
+ * 18, 18,
303
+ * '0x4200000000000000000000000000000000000006' // WETH address
304
+ * )
305
+ * ```
306
+ */
307
+ declare function tickToMarketCap(tick: number, tokenSupply: bigint, numerairePriceUSD: number, tokenDecimals: number | undefined, numeraireDecimals: number | undefined, numeraire: Address): number;
308
+
309
+ export { MarketCapRange, MarketCapValidationResult, applyTickOffsets, isToken1, marketCapRangeToTicks, marketCapRangeToTicksForCurve, marketCapToTick, marketCapToTokenPrice, ratioToTick, tickToMarketCap, tokenPriceToRatio, transformTicksForAuction, validateMarketCapParameters };