@whetstone-research/doppler-sdk 0.0.24 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (445) hide show
  1. package/README.md +69 -0
  2. package/dist/chunk-3LTCKCJC.js +319 -0
  3. package/dist/chunk-3LTCKCJC.js.map +1 -0
  4. package/dist/chunk-PZ5AY32C.js +9 -0
  5. package/dist/{chunk-4XN6DQBW.js.map → chunk-PZ5AY32C.js.map} +1 -1
  6. package/dist/chunk-RO6R66OM.js +974 -0
  7. package/dist/chunk-RO6R66OM.js.map +1 -0
  8. package/dist/evm/index.d.ts +8533 -0
  9. package/dist/evm/index.js +15055 -0
  10. package/dist/evm/index.js.map +1 -0
  11. package/dist/oracle-BSvZ6pxp.d.ts +820 -0
  12. package/dist/pda-RVIHNLRP.js +4 -0
  13. package/dist/pda-RVIHNLRP.js.map +1 -0
  14. package/dist/solana/index.d.ts +2495 -0
  15. package/dist/solana/index.js +2209 -0
  16. package/dist/solana/index.js.map +1 -0
  17. package/dist/solana/react/index.d.ts +1046 -0
  18. package/dist/solana/react/index.js +1436 -0
  19. package/dist/solana/react/index.js.map +1 -0
  20. package/package.json +36 -20
  21. package/dist/DopplerSDK.d.mts +0 -106
  22. package/dist/DopplerSDK.d.ts +0 -106
  23. package/dist/DopplerSDK.js +0 -53
  24. package/dist/DopplerSDK.js.map +0 -1
  25. package/dist/DopplerSDK.mjs +0 -44
  26. package/dist/DopplerSDK.mjs.map +0 -1
  27. package/dist/abis/bytecodes/derc20.d.mts +0 -3
  28. package/dist/abis/bytecodes/derc20.d.ts +0 -3
  29. package/dist/abis/bytecodes/derc20.js +0 -9
  30. package/dist/abis/bytecodes/derc20.js.map +0 -1
  31. package/dist/abis/bytecodes/derc20.mjs +0 -3
  32. package/dist/abis/bytecodes/derc20.mjs.map +0 -1
  33. package/dist/abis/bytecodes/derc2080.d.mts +0 -3
  34. package/dist/abis/bytecodes/derc2080.d.ts +0 -3
  35. package/dist/abis/bytecodes/derc2080.js +0 -9
  36. package/dist/abis/bytecodes/derc2080.js.map +0 -1
  37. package/dist/abis/bytecodes/derc2080.mjs +0 -3
  38. package/dist/abis/bytecodes/derc2080.mjs.map +0 -1
  39. package/dist/abis/bytecodes/doppler.d.mts +0 -3
  40. package/dist/abis/bytecodes/doppler.d.ts +0 -3
  41. package/dist/abis/bytecodes/doppler.js +0 -9
  42. package/dist/abis/bytecodes/doppler.js.map +0 -1
  43. package/dist/abis/bytecodes/doppler.mjs +0 -3
  44. package/dist/abis/bytecodes/doppler.mjs.map +0 -1
  45. package/dist/abis/bytecodes/dopplerDN404.d.mts +0 -3
  46. package/dist/abis/bytecodes/dopplerDN404.d.ts +0 -3
  47. package/dist/abis/bytecodes/dopplerDN404.js +0 -9
  48. package/dist/abis/bytecodes/dopplerDN404.js.map +0 -1
  49. package/dist/abis/bytecodes/dopplerDN404.mjs +0 -3
  50. package/dist/abis/bytecodes/dopplerDN404.mjs.map +0 -1
  51. package/dist/abis/bytecodes/stateView.d.mts +0 -3
  52. package/dist/abis/bytecodes/stateView.d.ts +0 -3
  53. package/dist/abis/bytecodes/stateView.js +0 -9
  54. package/dist/abis/bytecodes/stateView.js.map +0 -1
  55. package/dist/abis/bytecodes/stateView.mjs +0 -3
  56. package/dist/abis/bytecodes/stateView.mjs.map +0 -1
  57. package/dist/abis/bytecodes.d.mts +0 -5
  58. package/dist/abis/bytecodes.d.ts +0 -5
  59. package/dist/abis/bytecodes.js +0 -33
  60. package/dist/abis/bytecodes.js.map +0 -1
  61. package/dist/abis/bytecodes.mjs +0 -8
  62. package/dist/abis/bytecodes.mjs.map +0 -1
  63. package/dist/abis/index.d.mts +0 -3871
  64. package/dist/abis/index.d.ts +0 -3871
  65. package/dist/abis/index.js +0 -130
  66. package/dist/abis/index.js.map +0 -1
  67. package/dist/abis/index.mjs +0 -9
  68. package/dist/abis/index.mjs.map +0 -1
  69. package/dist/addresses.d.mts +0 -69
  70. package/dist/addresses.d.ts +0 -69
  71. package/dist/addresses.js +0 -29
  72. package/dist/addresses.js.map +0 -1
  73. package/dist/addresses.mjs +0 -4
  74. package/dist/addresses.mjs.map +0 -1
  75. package/dist/builders/DynamicAuctionBuilder.d.mts +0 -138
  76. package/dist/builders/DynamicAuctionBuilder.d.ts +0 -138
  77. package/dist/builders/DynamicAuctionBuilder.js +0 -35
  78. package/dist/builders/DynamicAuctionBuilder.js.map +0 -1
  79. package/dist/builders/DynamicAuctionBuilder.mjs +0 -26
  80. package/dist/builders/DynamicAuctionBuilder.mjs.map +0 -1
  81. package/dist/builders/MulticurveBuilder.d.mts +0 -196
  82. package/dist/builders/MulticurveBuilder.d.ts +0 -196
  83. package/dist/builders/MulticurveBuilder.js +0 -35
  84. package/dist/builders/MulticurveBuilder.js.map +0 -1
  85. package/dist/builders/MulticurveBuilder.mjs +0 -26
  86. package/dist/builders/MulticurveBuilder.mjs.map +0 -1
  87. package/dist/builders/StaticAuctionBuilder.d.mts +0 -131
  88. package/dist/builders/StaticAuctionBuilder.d.ts +0 -131
  89. package/dist/builders/StaticAuctionBuilder.js +0 -35
  90. package/dist/builders/StaticAuctionBuilder.js.map +0 -1
  91. package/dist/builders/StaticAuctionBuilder.mjs +0 -26
  92. package/dist/builders/StaticAuctionBuilder.mjs.map +0 -1
  93. package/dist/builders/index.d.mts +0 -8
  94. package/dist/builders/index.d.ts +0 -8
  95. package/dist/builders/index.js +0 -62
  96. package/dist/builders/index.js.map +0 -1
  97. package/dist/builders/index.mjs +0 -29
  98. package/dist/builders/index.mjs.map +0 -1
  99. package/dist/builders/shared.d.mts +0 -115
  100. package/dist/builders/shared.d.ts +0 -115
  101. package/dist/builders/shared.js +0 -46
  102. package/dist/builders/shared.js.map +0 -1
  103. package/dist/builders/shared.mjs +0 -25
  104. package/dist/builders/shared.mjs.map +0 -1
  105. package/dist/chunk-25GEBO3B.mjs +0 -219
  106. package/dist/chunk-25GEBO3B.mjs.map +0 -1
  107. package/dist/chunk-2A3B3NVB.js +0 -737
  108. package/dist/chunk-2A3B3NVB.js.map +0 -1
  109. package/dist/chunk-3NMGCQJ4.mjs +0 -6
  110. package/dist/chunk-3NMGCQJ4.mjs.map +0 -1
  111. package/dist/chunk-44CYUEPG.js +0 -377
  112. package/dist/chunk-44CYUEPG.js.map +0 -1
  113. package/dist/chunk-4VWQNNNW.js +0 -233
  114. package/dist/chunk-4VWQNNNW.js.map +0 -1
  115. package/dist/chunk-4XN6DQBW.js +0 -4
  116. package/dist/chunk-5GQJRNFL.mjs +0 -40
  117. package/dist/chunk-5GQJRNFL.mjs.map +0 -1
  118. package/dist/chunk-5JHXBDZD.js +0 -265
  119. package/dist/chunk-5JHXBDZD.js.map +0 -1
  120. package/dist/chunk-5TQOT6CW.js +0 -8
  121. package/dist/chunk-5TQOT6CW.js.map +0 -1
  122. package/dist/chunk-65CESA3J.js +0 -46
  123. package/dist/chunk-65CESA3J.js.map +0 -1
  124. package/dist/chunk-6BQY5EPB.js +0 -144
  125. package/dist/chunk-6BQY5EPB.js.map +0 -1
  126. package/dist/chunk-6H6X3VTZ.js +0 -18
  127. package/dist/chunk-6H6X3VTZ.js.map +0 -1
  128. package/dist/chunk-7A4DBBXA.js +0 -311
  129. package/dist/chunk-7A4DBBXA.js.map +0 -1
  130. package/dist/chunk-7M57PU6V.js +0 -28
  131. package/dist/chunk-7M57PU6V.js.map +0 -1
  132. package/dist/chunk-7ZUV6WPX.mjs +0 -3
  133. package/dist/chunk-7ZUV6WPX.mjs.map +0 -1
  134. package/dist/chunk-A2CJYRRQ.js +0 -330
  135. package/dist/chunk-A2CJYRRQ.js.map +0 -1
  136. package/dist/chunk-ABT6AT7C.mjs +0 -16
  137. package/dist/chunk-ABT6AT7C.mjs.map +0 -1
  138. package/dist/chunk-BK3S6SVR.js +0 -2707
  139. package/dist/chunk-BK3S6SVR.js.map +0 -1
  140. package/dist/chunk-BQZTELUX.js +0 -45
  141. package/dist/chunk-BQZTELUX.js.map +0 -1
  142. package/dist/chunk-CFAAYL5M.mjs +0 -26
  143. package/dist/chunk-CFAAYL5M.mjs.map +0 -1
  144. package/dist/chunk-CFXXUZJY.js +0 -275
  145. package/dist/chunk-CFXXUZJY.js.map +0 -1
  146. package/dist/chunk-CWTGQAOG.mjs +0 -72
  147. package/dist/chunk-CWTGQAOG.mjs.map +0 -1
  148. package/dist/chunk-DCWF3EMP.js +0 -171
  149. package/dist/chunk-DCWF3EMP.js.map +0 -1
  150. package/dist/chunk-DOUF6NON.mjs +0 -3
  151. package/dist/chunk-DOUF6NON.mjs.map +0 -1
  152. package/dist/chunk-DQJXCZU2.mjs +0 -318
  153. package/dist/chunk-DQJXCZU2.mjs.map +0 -1
  154. package/dist/chunk-DSYPZETD.js +0 -4
  155. package/dist/chunk-DSYPZETD.js.map +0 -1
  156. package/dist/chunk-F2BYG63D.mjs +0 -145
  157. package/dist/chunk-F2BYG63D.mjs.map +0 -1
  158. package/dist/chunk-FNUBKONK.js +0 -291
  159. package/dist/chunk-FNUBKONK.js.map +0 -1
  160. package/dist/chunk-FOESYJP3.mjs +0 -3
  161. package/dist/chunk-FOESYJP3.mjs.map +0 -1
  162. package/dist/chunk-FXTGIKQG.mjs +0 -3
  163. package/dist/chunk-FXTGIKQG.mjs.map +0 -1
  164. package/dist/chunk-GSBQIVME.mjs +0 -278
  165. package/dist/chunk-GSBQIVME.mjs.map +0 -1
  166. package/dist/chunk-H3B54PFV.mjs +0 -17
  167. package/dist/chunk-H3B54PFV.mjs.map +0 -1
  168. package/dist/chunk-HJFVRV47.js +0 -120
  169. package/dist/chunk-HJFVRV47.js.map +0 -1
  170. package/dist/chunk-IIM2CSDQ.js +0 -147
  171. package/dist/chunk-IIM2CSDQ.js.map +0 -1
  172. package/dist/chunk-IUTIHSLH.mjs +0 -295
  173. package/dist/chunk-IUTIHSLH.mjs.map +0 -1
  174. package/dist/chunk-IUZ3BBQP.mjs +0 -117
  175. package/dist/chunk-IUZ3BBQP.mjs.map +0 -1
  176. package/dist/chunk-IWJOPXYN.mjs +0 -96
  177. package/dist/chunk-IWJOPXYN.mjs.map +0 -1
  178. package/dist/chunk-IX4V4UGW.mjs +0 -141
  179. package/dist/chunk-IX4V4UGW.mjs.map +0 -1
  180. package/dist/chunk-J62YDWIK.js +0 -8
  181. package/dist/chunk-J62YDWIK.js.map +0 -1
  182. package/dist/chunk-JIKAD4YL.js +0 -4
  183. package/dist/chunk-JIKAD4YL.js.map +0 -1
  184. package/dist/chunk-JLUOFAE4.mjs +0 -2531
  185. package/dist/chunk-JLUOFAE4.mjs.map +0 -1
  186. package/dist/chunk-KAZQJ24E.mjs +0 -59
  187. package/dist/chunk-KAZQJ24E.mjs.map +0 -1
  188. package/dist/chunk-KHUE77HC.js +0 -81
  189. package/dist/chunk-KHUE77HC.js.map +0 -1
  190. package/dist/chunk-KOAC3BBP.mjs +0 -11
  191. package/dist/chunk-KOAC3BBP.mjs.map +0 -1
  192. package/dist/chunk-LW3CYA27.mjs +0 -2705
  193. package/dist/chunk-LW3CYA27.mjs.map +0 -1
  194. package/dist/chunk-MEA2C5YX.js +0 -143
  195. package/dist/chunk-MEA2C5YX.js.map +0 -1
  196. package/dist/chunk-MU56HCUI.js +0 -2556
  197. package/dist/chunk-MU56HCUI.js.map +0 -1
  198. package/dist/chunk-OCIY7QEJ.mjs +0 -169
  199. package/dist/chunk-OCIY7QEJ.mjs.map +0 -1
  200. package/dist/chunk-OHA5KJ2M.mjs +0 -6
  201. package/dist/chunk-OHA5KJ2M.mjs.map +0 -1
  202. package/dist/chunk-P25HBGP5.mjs +0 -3
  203. package/dist/chunk-P25HBGP5.mjs.map +0 -1
  204. package/dist/chunk-P563HTVU.js +0 -164
  205. package/dist/chunk-P563HTVU.js.map +0 -1
  206. package/dist/chunk-P7CHGWY7.js +0 -4
  207. package/dist/chunk-P7CHGWY7.js.map +0 -1
  208. package/dist/chunk-PGYTMRP3.js +0 -277
  209. package/dist/chunk-PGYTMRP3.js.map +0 -1
  210. package/dist/chunk-QAPQGDWK.js +0 -8
  211. package/dist/chunk-QAPQGDWK.js.map +0 -1
  212. package/dist/chunk-QHBKRUBY.mjs +0 -328
  213. package/dist/chunk-QHBKRUBY.mjs.map +0 -1
  214. package/dist/chunk-QOYI7WCH.js +0 -120
  215. package/dist/chunk-QOYI7WCH.js.map +0 -1
  216. package/dist/chunk-QRTABC4Z.js +0 -8
  217. package/dist/chunk-QRTABC4Z.js.map +0 -1
  218. package/dist/chunk-QSQGLWNY.mjs +0 -3
  219. package/dist/chunk-QSQGLWNY.mjs.map +0 -1
  220. package/dist/chunk-QUBD6HUZ.mjs +0 -735
  221. package/dist/chunk-QUBD6HUZ.mjs.map +0 -1
  222. package/dist/chunk-RDTIXP6S.mjs +0 -263
  223. package/dist/chunk-RDTIXP6S.mjs.map +0 -1
  224. package/dist/chunk-RLOZWHRR.js +0 -320
  225. package/dist/chunk-RLOZWHRR.js.map +0 -1
  226. package/dist/chunk-RV64M4Q6.mjs +0 -3
  227. package/dist/chunk-RV64M4Q6.mjs.map +0 -1
  228. package/dist/chunk-SWWLOD7Q.mjs +0 -6
  229. package/dist/chunk-SWWLOD7Q.mjs.map +0 -1
  230. package/dist/chunk-T3UA4MJL.js +0 -4
  231. package/dist/chunk-T3UA4MJL.js.map +0 -1
  232. package/dist/chunk-TEWAXP5C.mjs +0 -162
  233. package/dist/chunk-TEWAXP5C.mjs.map +0 -1
  234. package/dist/chunk-THEIRDGE.mjs +0 -273
  235. package/dist/chunk-THEIRDGE.mjs.map +0 -1
  236. package/dist/chunk-U3GOWK6J.mjs +0 -6
  237. package/dist/chunk-U3GOWK6J.mjs.map +0 -1
  238. package/dist/chunk-UPVKABAV.js +0 -19
  239. package/dist/chunk-UPVKABAV.js.map +0 -1
  240. package/dist/chunk-VEIVYUYF.js +0 -4
  241. package/dist/chunk-VEIVYUYF.js.map +0 -1
  242. package/dist/chunk-VKSD3KXF.mjs +0 -275
  243. package/dist/chunk-VKSD3KXF.mjs.map +0 -1
  244. package/dist/chunk-VYSOAGRU.mjs +0 -6
  245. package/dist/chunk-VYSOAGRU.mjs.map +0 -1
  246. package/dist/chunk-WDC53TM7.mjs +0 -305
  247. package/dist/chunk-WDC53TM7.mjs.map +0 -1
  248. package/dist/chunk-WKWP42TD.mjs +0 -39
  249. package/dist/chunk-WKWP42TD.mjs.map +0 -1
  250. package/dist/chunk-WNUB3UTT.js +0 -241
  251. package/dist/chunk-WNUB3UTT.js.map +0 -1
  252. package/dist/chunk-WNWK2QMU.mjs +0 -375
  253. package/dist/chunk-WNWK2QMU.mjs.map +0 -1
  254. package/dist/chunk-WQHTNL5L.js +0 -4
  255. package/dist/chunk-WQHTNL5L.js.map +0 -1
  256. package/dist/chunk-WZF5XNBC.js +0 -297
  257. package/dist/chunk-WZF5XNBC.js.map +0 -1
  258. package/dist/chunk-X3UMAHOJ.js +0 -4
  259. package/dist/chunk-X3UMAHOJ.js.map +0 -1
  260. package/dist/chunk-XMFOZYNI.js +0 -8
  261. package/dist/chunk-XMFOZYNI.js.map +0 -1
  262. package/dist/chunk-XNMXN5SZ.mjs +0 -3
  263. package/dist/chunk-XNMXN5SZ.mjs.map +0 -1
  264. package/dist/chunk-XSJTASPK.js +0 -13
  265. package/dist/chunk-XSJTASPK.js.map +0 -1
  266. package/dist/chunk-YBK6EBA5.mjs +0 -239
  267. package/dist/chunk-YBK6EBA5.mjs.map +0 -1
  268. package/dist/chunk-YYLD3AJ7.js +0 -61
  269. package/dist/chunk-YYLD3AJ7.js.map +0 -1
  270. package/dist/chunk-ZEDJUNC6.mjs +0 -115
  271. package/dist/chunk-ZEDJUNC6.mjs.map +0 -1
  272. package/dist/constants.d.mts +0 -91
  273. package/dist/constants.d.ts +0 -91
  274. package/dist/constants.js +0 -196
  275. package/dist/constants.js.map +0 -1
  276. package/dist/constants.mjs +0 -3
  277. package/dist/constants.mjs.map +0 -1
  278. package/dist/deployments.generated.d.mts +0 -275
  279. package/dist/deployments.generated.d.ts +0 -275
  280. package/dist/deployments.generated.js +0 -12
  281. package/dist/deployments.generated.js.map +0 -1
  282. package/dist/deployments.generated.mjs +0 -3
  283. package/dist/deployments.generated.mjs.map +0 -1
  284. package/dist/entities/DopplerFactory.d.mts +0 -272
  285. package/dist/entities/DopplerFactory.d.ts +0 -272
  286. package/dist/entities/DopplerFactory.js +0 -34
  287. package/dist/entities/DopplerFactory.js.map +0 -1
  288. package/dist/entities/DopplerFactory.mjs +0 -25
  289. package/dist/entities/DopplerFactory.mjs.map +0 -1
  290. package/dist/entities/auction/DynamicAuction.d.mts +0 -72
  291. package/dist/entities/auction/DynamicAuction.d.ts +0 -72
  292. package/dist/entities/auction/DynamicAuction.js +0 -21
  293. package/dist/entities/auction/DynamicAuction.js.map +0 -1
  294. package/dist/entities/auction/DynamicAuction.mjs +0 -12
  295. package/dist/entities/auction/DynamicAuction.mjs.map +0 -1
  296. package/dist/entities/auction/MulticurvePool.d.mts +0 -78
  297. package/dist/entities/auction/MulticurvePool.d.ts +0 -78
  298. package/dist/entities/auction/MulticurvePool.js +0 -24
  299. package/dist/entities/auction/MulticurvePool.js.map +0 -1
  300. package/dist/entities/auction/MulticurvePool.mjs +0 -15
  301. package/dist/entities/auction/MulticurvePool.mjs.map +0 -1
  302. package/dist/entities/auction/RehypeDopplerHook.d.mts +0 -57
  303. package/dist/entities/auction/RehypeDopplerHook.d.ts +0 -57
  304. package/dist/entities/auction/RehypeDopplerHook.js +0 -34
  305. package/dist/entities/auction/RehypeDopplerHook.js.map +0 -1
  306. package/dist/entities/auction/RehypeDopplerHook.mjs +0 -25
  307. package/dist/entities/auction/RehypeDopplerHook.mjs.map +0 -1
  308. package/dist/entities/auction/RehypeDopplerHookMigrator.d.mts +0 -48
  309. package/dist/entities/auction/RehypeDopplerHookMigrator.d.ts +0 -48
  310. package/dist/entities/auction/RehypeDopplerHookMigrator.js +0 -34
  311. package/dist/entities/auction/RehypeDopplerHookMigrator.js.map +0 -1
  312. package/dist/entities/auction/RehypeDopplerHookMigrator.mjs +0 -25
  313. package/dist/entities/auction/RehypeDopplerHookMigrator.mjs.map +0 -1
  314. package/dist/entities/auction/StaticAuction.d.mts +0 -44
  315. package/dist/entities/auction/StaticAuction.d.ts +0 -44
  316. package/dist/entities/auction/StaticAuction.js +0 -21
  317. package/dist/entities/auction/StaticAuction.js.map +0 -1
  318. package/dist/entities/auction/StaticAuction.mjs +0 -12
  319. package/dist/entities/auction/StaticAuction.mjs.map +0 -1
  320. package/dist/entities/auction/index.d.mts +0 -9
  321. package/dist/entities/auction/index.d.ts +0 -9
  322. package/dist/entities/auction/index.js +0 -55
  323. package/dist/entities/auction/index.js.map +0 -1
  324. package/dist/entities/auction/index.mjs +0 -30
  325. package/dist/entities/auction/index.mjs.map +0 -1
  326. package/dist/entities/quoter/Quoter.d.mts +0 -150
  327. package/dist/entities/quoter/Quoter.d.ts +0 -150
  328. package/dist/entities/quoter/Quoter.js +0 -21
  329. package/dist/entities/quoter/Quoter.js.map +0 -1
  330. package/dist/entities/quoter/Quoter.mjs +0 -12
  331. package/dist/entities/quoter/Quoter.mjs.map +0 -1
  332. package/dist/entities/quoter/index.d.mts +0 -5
  333. package/dist/entities/quoter/index.d.ts +0 -5
  334. package/dist/entities/quoter/index.js +0 -22
  335. package/dist/entities/quoter/index.js.map +0 -1
  336. package/dist/entities/quoter/index.mjs +0 -13
  337. package/dist/entities/quoter/index.mjs.map +0 -1
  338. package/dist/entities/token/derc20/Derc20.d.mts +0 -102
  339. package/dist/entities/token/derc20/Derc20.d.ts +0 -102
  340. package/dist/entities/token/derc20/Derc20.js +0 -19
  341. package/dist/entities/token/derc20/Derc20.js.map +0 -1
  342. package/dist/entities/token/derc20/Derc20.mjs +0 -10
  343. package/dist/entities/token/derc20/Derc20.mjs.map +0 -1
  344. package/dist/entities/token/derc20/index.d.mts +0 -5
  345. package/dist/entities/token/derc20/index.d.ts +0 -5
  346. package/dist/entities/token/derc20/index.js +0 -20
  347. package/dist/entities/token/derc20/index.js.map +0 -1
  348. package/dist/entities/token/derc20/index.mjs +0 -11
  349. package/dist/entities/token/derc20/index.mjs.map +0 -1
  350. package/dist/entities/token/eth/Eth.d.mts +0 -54
  351. package/dist/entities/token/eth/Eth.d.ts +0 -54
  352. package/dist/entities/token/eth/Eth.js +0 -12
  353. package/dist/entities/token/eth/Eth.js.map +0 -1
  354. package/dist/entities/token/eth/Eth.mjs +0 -3
  355. package/dist/entities/token/eth/Eth.mjs.map +0 -1
  356. package/dist/entities/token/eth/index.d.mts +0 -5
  357. package/dist/entities/token/eth/index.d.ts +0 -5
  358. package/dist/entities/token/eth/index.js +0 -13
  359. package/dist/entities/token/eth/index.js.map +0 -1
  360. package/dist/entities/token/eth/index.mjs +0 -4
  361. package/dist/entities/token/eth/index.mjs.map +0 -1
  362. package/dist/entities/token/index.d.mts +0 -6
  363. package/dist/entities/token/index.d.ts +0 -6
  364. package/dist/entities/token/index.js +0 -27
  365. package/dist/entities/token/index.js.map +0 -1
  366. package/dist/entities/token/index.mjs +0 -14
  367. package/dist/entities/token/index.mjs.map +0 -1
  368. package/dist/index.d.mts +0 -39
  369. package/dist/index.d.ts +0 -39
  370. package/dist/index.js +0 -587
  371. package/dist/index.js.map +0 -1
  372. package/dist/index.mjs +0 -49
  373. package/dist/index.mjs.map +0 -1
  374. package/dist/types.d.mts +0 -662
  375. package/dist/types.d.ts +0 -662
  376. package/dist/types.js +0 -34
  377. package/dist/types.js.map +0 -1
  378. package/dist/types.mjs +0 -5
  379. package/dist/types.mjs.map +0 -1
  380. package/dist/utils/airlock.d.mts +0 -11
  381. package/dist/utils/airlock.d.ts +0 -11
  382. package/dist/utils/airlock.js +0 -26
  383. package/dist/utils/airlock.js.map +0 -1
  384. package/dist/utils/airlock.mjs +0 -5
  385. package/dist/utils/airlock.mjs.map +0 -1
  386. package/dist/utils/balanceDelta.d.mts +0 -10
  387. package/dist/utils/balanceDelta.d.ts +0 -10
  388. package/dist/utils/balanceDelta.js +0 -12
  389. package/dist/utils/balanceDelta.js.map +0 -1
  390. package/dist/utils/balanceDelta.mjs +0 -3
  391. package/dist/utils/balanceDelta.mjs.map +0 -1
  392. package/dist/utils/computeOptimalGamma.d.mts +0 -7
  393. package/dist/utils/computeOptimalGamma.d.ts +0 -7
  394. package/dist/utils/computeOptimalGamma.js +0 -12
  395. package/dist/utils/computeOptimalGamma.js.map +0 -1
  396. package/dist/utils/computeOptimalGamma.mjs +0 -3
  397. package/dist/utils/computeOptimalGamma.mjs.map +0 -1
  398. package/dist/utils/dopplerHookMigrator.d.mts +0 -18
  399. package/dist/utils/dopplerHookMigrator.d.ts +0 -18
  400. package/dist/utils/dopplerHookMigrator.js +0 -20
  401. package/dist/utils/dopplerHookMigrator.js.map +0 -1
  402. package/dist/utils/dopplerHookMigrator.mjs +0 -7
  403. package/dist/utils/dopplerHookMigrator.mjs.map +0 -1
  404. package/dist/utils/index.d.mts +0 -14
  405. package/dist/utils/index.d.ts +0 -14
  406. package/dist/utils/index.js +0 -197
  407. package/dist/utils/index.js.map +0 -1
  408. package/dist/utils/index.mjs +0 -24
  409. package/dist/utils/index.mjs.map +0 -1
  410. package/dist/utils/isToken0Expected.d.mts +0 -13
  411. package/dist/utils/isToken0Expected.d.ts +0 -13
  412. package/dist/utils/isToken0Expected.js +0 -12
  413. package/dist/utils/isToken0Expected.js.map +0 -1
  414. package/dist/utils/isToken0Expected.mjs +0 -3
  415. package/dist/utils/isToken0Expected.mjs.map +0 -1
  416. package/dist/utils/marketCapHelpers.d.mts +0 -259
  417. package/dist/utils/marketCapHelpers.d.ts +0 -259
  418. package/dist/utils/marketCapHelpers.js +0 -58
  419. package/dist/utils/marketCapHelpers.js.map +0 -1
  420. package/dist/utils/marketCapHelpers.mjs +0 -5
  421. package/dist/utils/marketCapHelpers.mjs.map +0 -1
  422. package/dist/utils/poolKey.d.mts +0 -17
  423. package/dist/utils/poolKey.d.ts +0 -17
  424. package/dist/utils/poolKey.js +0 -12
  425. package/dist/utils/poolKey.js.map +0 -1
  426. package/dist/utils/poolKey.mjs +0 -3
  427. package/dist/utils/poolKey.mjs.map +0 -1
  428. package/dist/utils/priceHelpers.d.mts +0 -86
  429. package/dist/utils/priceHelpers.d.ts +0 -86
  430. package/dist/utils/priceHelpers.js +0 -41
  431. package/dist/utils/priceHelpers.js.map +0 -1
  432. package/dist/utils/priceHelpers.mjs +0 -4
  433. package/dist/utils/priceHelpers.mjs.map +0 -1
  434. package/dist/utils/tickMath.d.mts +0 -72
  435. package/dist/utils/tickMath.d.ts +0 -72
  436. package/dist/utils/tickMath.js +0 -60
  437. package/dist/utils/tickMath.js.map +0 -1
  438. package/dist/utils/tickMath.mjs +0 -3
  439. package/dist/utils/tickMath.mjs.map +0 -1
  440. package/dist/utils/tokenAddressMiner.d.mts +0 -37
  441. package/dist/utils/tokenAddressMiner.d.ts +0 -37
  442. package/dist/utils/tokenAddressMiner.js +0 -19
  443. package/dist/utils/tokenAddressMiner.js.map +0 -1
  444. package/dist/utils/tokenAddressMiner.mjs +0 -10
  445. package/dist/utils/tokenAddressMiner.mjs.map +0 -1
@@ -0,0 +1,820 @@
1
+ import { Address, Rpc, GetProgramAccountsApi, GetAccountInfoApi } from '@solana/kit';
2
+
3
+ /**
4
+ * Direction of a swap operation
5
+ * - 0: token0 -> token1 (sell token0 for token1)
6
+ * - 1: token1 -> token0 (sell token1 for token0)
7
+ */
8
+ type SwapDirection = 0 | 1;
9
+ /**
10
+ * Global AMM configuration account
11
+ * PDA: ['config']
12
+ */
13
+ interface AmmConfig {
14
+ /** Admin pubkey with authority over pools */
15
+ admin: Address;
16
+ /** Whether all pool operations are paused */
17
+ paused: boolean;
18
+ /** Default numeraire mint for pricing */
19
+ numeraireMint: Address;
20
+ /** Number of programs in sentinel allowlist */
21
+ sentinelAllowlistLen: number;
22
+ /** Allowlist of sentinel programs (fixed size: 32) */
23
+ sentinelAllowlist: Address[];
24
+ /** Maximum allowed swap fee in basis points */
25
+ maxSwapFeeBps: number;
26
+ /** Maximum allowed fee split in basis points */
27
+ maxFeeSplitBps: number;
28
+ /** Maximum number of hops for routing */
29
+ maxRouteHops: number;
30
+ /** Whether protocol fees are enabled */
31
+ protocolFeeEnabled: boolean;
32
+ /** Protocol fee in basis points (share of LP fees) */
33
+ protocolFeeBps: number;
34
+ /** Account version for migrations */
35
+ version: number;
36
+ /** Reserved bytes for future use */
37
+ reserved: Uint8Array;
38
+ }
39
+ /**
40
+ * Pool account for a trading pair
41
+ * PDA: ['pool', token0_mint, token1_mint]
42
+ */
43
+ interface Pool {
44
+ /** Reference to the AmmConfig account */
45
+ config: Address;
46
+ /** Mint of token0 (lexicographically smaller) */
47
+ token0Mint: Address;
48
+ /** Mint of token1 (lexicographically larger) */
49
+ token1Mint: Address;
50
+ /** Token account holding token0 reserves */
51
+ vault0: Address;
52
+ /** Token account holding token1 reserves */
53
+ vault1: Address;
54
+ /** PDA authority for vault transfers */
55
+ authority: Address;
56
+ /** Bump seed for authority PDA */
57
+ bump: number;
58
+ /** Current reserve of token0 (excluding distributable fees) */
59
+ reserve0: bigint;
60
+ /** Current reserve of token1 (excluding distributable fees) */
61
+ reserve1: bigint;
62
+ /** Total LP shares outstanding (u128) */
63
+ totalShares: bigint;
64
+ /** Swap fee in basis points (0-10000) */
65
+ swapFeeBps: number;
66
+ /** Fee split: % of swap fee that goes to distributable (vs compounding) */
67
+ feeSplitBps: number;
68
+ /** Global fee growth per share for token0 (Q64.64) */
69
+ feeGrowthGlobal0Q64: bigint;
70
+ /** Global fee growth per share for token1 (Q64.64) */
71
+ feeGrowthGlobal1Q64: bigint;
72
+ /** Unclaimed distributable fees in token0 */
73
+ feesUnclaimed0: bigint;
74
+ /** Unclaimed distributable fees in token1 */
75
+ feesUnclaimed1: bigint;
76
+ /** Sentinel program for hooks (default = disabled) */
77
+ sentinelProgram: Address;
78
+ /** Bitflags for enabled sentinel hooks */
79
+ sentinelFlags: number;
80
+ /** Override numeraire mint for this pool */
81
+ numeraireMint: Address;
82
+ /** Which token to use for liquidity measure (0 or 1) */
83
+ liquidityMeasureSide: number;
84
+ /** Next pool in routing chain (default = none) */
85
+ routeNextPool: Address;
86
+ /** Bridge mint for routing (must be token0 or token1) */
87
+ routeBridgeMint: Address;
88
+ /** Last k value for protocol fee calculation (u128) */
89
+ kLast: bigint;
90
+ /** Protocol position for protocol fee shares */
91
+ protocolPosition: Address;
92
+ /** Reentrancy lock (0 = unlocked, 1 = locked) */
93
+ locked: number;
94
+ /** Account version for migrations */
95
+ version: number;
96
+ /** Reserved bytes for future use */
97
+ reserved: Uint8Array;
98
+ }
99
+ /**
100
+ * Position account representing LP ownership
101
+ * PDA: ['position', pool, owner, position_id]
102
+ */
103
+ interface Position {
104
+ /** The pool this position is for */
105
+ pool: Address;
106
+ /** Owner of the position */
107
+ owner: Address;
108
+ /** Unique position ID for this owner (allows multiple positions) */
109
+ positionId: bigint;
110
+ /** Number of LP shares owned (u128) */
111
+ shares: bigint;
112
+ /** Checkpoint of fee growth for token0 (Q64.64) */
113
+ feeGrowthLast0Q64: bigint;
114
+ /** Checkpoint of fee growth for token1 (Q64.64) */
115
+ feeGrowthLast1Q64: bigint;
116
+ /** Accrued uncollected fees in token0 */
117
+ feeOwed0: bigint;
118
+ /** Accrued uncollected fees in token1 */
119
+ feeOwed1: bigint;
120
+ /** Account version for migrations */
121
+ version: number;
122
+ /** Reserved bytes for future use */
123
+ reserved: Uint8Array;
124
+ }
125
+ /**
126
+ * Single TWAP observation
127
+ */
128
+ interface Observation {
129
+ /** Timestamp of this observation */
130
+ timestamp: number;
131
+ /** Cumulative price0 at this timestamp (Q64.64 accumulated, U256) */
132
+ price0Cumulative: bigint;
133
+ /** Cumulative price1 at this timestamp (Q64.64 accumulated, U256) */
134
+ price1Cumulative: bigint;
135
+ }
136
+ /**
137
+ * Oracle state for TWAP price tracking
138
+ * PDA: ['oracle', pool]
139
+ */
140
+ interface OracleState {
141
+ /** The pool this oracle tracks */
142
+ pool: Address;
143
+ /** Whether oracle has been initialized with first observation */
144
+ initialized: boolean;
145
+ /** Maximum price change ratio per slot (Q64.64, e.g., 1.1 = 10% max move) */
146
+ maxPriceChangeRatioQ64: bigint;
147
+ /** Last slot when oracle was updated */
148
+ lastSlot: bigint;
149
+ /** Truncated (clamped) price of token0 in token1 (Q64.64) */
150
+ truncPrice0Q64: bigint;
151
+ /** Truncated (clamped) price of token1 in token0 (Q64.64) */
152
+ truncPrice1Q64: bigint;
153
+ /** Deviation between spot and truncated price0 (Q64.64) */
154
+ deviation0Q64: bigint;
155
+ /** Deviation between spot and truncated price1 (Q64.64) */
156
+ deviation1Q64: bigint;
157
+ /** Cumulative truncated price0 (wrapping U256) */
158
+ price0Cumulative: bigint;
159
+ /** Cumulative truncated price1 (wrapping U256) */
160
+ price1Cumulative: bigint;
161
+ /** Last timestamp when oracle was updated */
162
+ lastTimestamp: number;
163
+ /** Last timestamp when an observation was recorded */
164
+ lastObservationTimestamp: number;
165
+ /** Minimum seconds between observations */
166
+ observationIntervalSec: number;
167
+ /** Current index in circular observation buffer */
168
+ observationIndex: number;
169
+ /** Circular buffer of TWAP observations (fixed size: 64) */
170
+ observations: Observation[];
171
+ /** Account version for migrations */
172
+ version: number;
173
+ /** Reserved bytes for future use */
174
+ reserved: Uint8Array;
175
+ }
176
+ interface InitializeConfigArgs {
177
+ admin: Address;
178
+ numeraireMint: Address;
179
+ maxSwapFeeBps: number;
180
+ maxFeeSplitBps: number;
181
+ maxRouteHops: number;
182
+ protocolFeeEnabled: boolean;
183
+ protocolFeeBps: number;
184
+ sentinelAllowlist: Address[];
185
+ }
186
+ interface InitializePoolArgs {
187
+ mintA: Address;
188
+ mintB: Address;
189
+ initialSwapFeeBps: number;
190
+ initialFeeSplitBps: number;
191
+ liquidityMeasureSide: number;
192
+ numeraireMintOverride: Address | null;
193
+ }
194
+ interface InitializeOracleArgs {
195
+ maxPriceChangeRatioQ64: bigint;
196
+ observationIntervalSec: number;
197
+ numObservations: number;
198
+ }
199
+ interface CreatePositionArgs {
200
+ positionId: bigint;
201
+ }
202
+ interface AddLiquidityArgs {
203
+ amount0Max: bigint;
204
+ amount1Max: bigint;
205
+ minSharesOut: bigint;
206
+ updateOracle: boolean;
207
+ }
208
+ interface RemoveLiquidityArgs {
209
+ sharesIn: bigint;
210
+ minAmount0Out: bigint;
211
+ minAmount1Out: bigint;
212
+ updateOracle: boolean;
213
+ }
214
+ interface SwapExactInArgs {
215
+ amountIn: bigint;
216
+ minAmountOut: bigint;
217
+ direction: SwapDirection;
218
+ updateOracle: boolean;
219
+ }
220
+ interface CollectFeesArgs {
221
+ max0: bigint;
222
+ max1: bigint;
223
+ }
224
+ interface CollectProtocolFeesArgs {
225
+ max0: bigint;
226
+ max1: bigint;
227
+ }
228
+ interface SetSentinelArgs {
229
+ sentinelProgram: Address;
230
+ sentinelFlags: number;
231
+ }
232
+ interface SetFeesArgs {
233
+ swapFeeBps: number;
234
+ feeSplitBps: number;
235
+ }
236
+ interface SetRouteArgs {
237
+ routeNextPool: Address;
238
+ routeBridgeMint: Address;
239
+ }
240
+ interface TransferAdminArgs {
241
+ newAdmin: Address;
242
+ }
243
+ interface OracleConsultArgs {
244
+ windowSeconds: number;
245
+ }
246
+ interface QuoteToNumeraireArgs {
247
+ amount: bigint;
248
+ side: number;
249
+ maxHops: number;
250
+ /** Must be false in v0.1 (spot-only) */
251
+ useTwap: boolean;
252
+ /** Must be 0 in v0.1 (spot-only) */
253
+ windowSeconds: number;
254
+ }
255
+ interface SwapQuote {
256
+ /** Expected output amount */
257
+ amountOut: bigint;
258
+ /** Total fee charged (in input token) */
259
+ feeTotal: bigint;
260
+ /** Distributable portion of fee */
261
+ feeDist: bigint;
262
+ /** Compounding portion of fee */
263
+ feeComp: bigint;
264
+ /** Price impact as a decimal (0.01 = 1%) */
265
+ priceImpact: number;
266
+ /** Execution price (output/input) */
267
+ executionPrice: number;
268
+ }
269
+ interface AddLiquidityQuote {
270
+ /** Shares the user will receive */
271
+ sharesOut: bigint;
272
+ /** Actual amount of token0 to deposit */
273
+ amount0: bigint;
274
+ /** Actual amount of token1 to deposit */
275
+ amount1: bigint;
276
+ /** Share of pool after deposit */
277
+ poolShare: number;
278
+ }
279
+ interface RemoveLiquidityQuote {
280
+ /** Amount of token0 to receive */
281
+ amount0: bigint;
282
+ /** Amount of token1 to receive */
283
+ amount1: bigint;
284
+ }
285
+ interface TwapResult {
286
+ /** TWAP price of token0 in token1 (Q64.64) */
287
+ price0Q64: bigint;
288
+ /** TWAP price of token1 in token0 (Q64.64) */
289
+ price1Q64: bigint;
290
+ /** TWAP price of token0 in token1 (decimal) */
291
+ price0: number;
292
+ /** TWAP price of token1 in token0 (decimal) */
293
+ price1: number;
294
+ }
295
+ interface SwapEvent {
296
+ pool: Address;
297
+ user: Address;
298
+ direction: SwapDirection;
299
+ amountIn: bigint;
300
+ amountOut: bigint;
301
+ feeTotal: bigint;
302
+ feeDist: bigint;
303
+ }
304
+ interface AddLiquidityEvent {
305
+ pool: Address;
306
+ owner: Address;
307
+ amount0: bigint;
308
+ amount1: bigint;
309
+ sharesOut: bigint;
310
+ }
311
+ interface RemoveLiquidityEvent {
312
+ pool: Address;
313
+ owner: Address;
314
+ amount0: bigint;
315
+ amount1: bigint;
316
+ sharesIn: bigint;
317
+ }
318
+ interface CollectFeesEvent {
319
+ pool: Address;
320
+ owner: Address;
321
+ amount0: bigint;
322
+ amount1: bigint;
323
+ }
324
+ interface CollectProtocolFeesEvent {
325
+ pool: Address;
326
+ amount0: bigint;
327
+ amount1: bigint;
328
+ recipient0: Address;
329
+ recipient1: Address;
330
+ }
331
+ interface PoolInitializedEvent {
332
+ pool: Address;
333
+ token0Mint: Address;
334
+ token1Mint: Address;
335
+ vault0: Address;
336
+ vault1: Address;
337
+ }
338
+ interface PositionCreatedEvent {
339
+ pool: Address;
340
+ owner: Address;
341
+ position: Address;
342
+ positionId: bigint;
343
+ }
344
+ interface PositionClosedEvent {
345
+ pool: Address;
346
+ owner: Address;
347
+ position: Address;
348
+ }
349
+ interface SentinelInvokedEvent {
350
+ pool: Address;
351
+ action: number;
352
+ allow: number;
353
+ newFeeBps: number;
354
+ newSplitBps: number;
355
+ }
356
+ interface SentinelErrorEvent {
357
+ pool: Address;
358
+ action: number;
359
+ errorCode: bigint;
360
+ }
361
+ interface SentinelUpdatedEvent {
362
+ pool: Address;
363
+ sentinelProgram: Address;
364
+ sentinelFlags: number;
365
+ admin: Address;
366
+ }
367
+ interface FeesUpdatedEvent {
368
+ pool: Address;
369
+ prevSwapFeeBps: number;
370
+ prevFeeSplitBps: number;
371
+ swapFeeBps: number;
372
+ feeSplitBps: number;
373
+ source: number;
374
+ }
375
+ interface OracleInitializedEvent {
376
+ pool: Address;
377
+ maxPriceChangeRatioQ64: bigint;
378
+ observationIntervalSec: number;
379
+ admin: Address;
380
+ }
381
+ interface OracleUpdatedEvent {
382
+ pool: Address;
383
+ slot: bigint;
384
+ truncPrice0Q64: bigint;
385
+ truncPrice1Q64: bigint;
386
+ deviation0Q64: bigint;
387
+ deviation1Q64: bigint;
388
+ }
389
+ interface RouteUpdatedEvent {
390
+ pool: Address;
391
+ routeNextPool: Address;
392
+ routeBridgeMint: Address;
393
+ admin: Address;
394
+ }
395
+ interface AdminTransferredEvent {
396
+ oldAdmin: Address;
397
+ newAdmin: Address;
398
+ }
399
+ interface PausedEvent {
400
+ }
401
+ interface UnpausedEvent {
402
+ }
403
+ interface SkimmedEvent {
404
+ pool: Address;
405
+ amount0: bigint;
406
+ amount1: bigint;
407
+ }
408
+ interface MarketCapValidationResult {
409
+ valid: boolean;
410
+ warnings: string[];
411
+ }
412
+ interface CurveParams {
413
+ /** Virtual base token reserves for the XYK curve */
414
+ curveVirtualBase: bigint;
415
+ /** Virtual quote token reserves for the XYK curve */
416
+ curveVirtualQuote: bigint;
417
+ }
418
+ interface MarketCapToCurveParamsInput {
419
+ /** Starting market cap in USD (price at launch open) */
420
+ startMarketCapUSD: number;
421
+ /** Ending market cap in USD (graduation / migration threshold) */
422
+ endMarketCapUSD: number;
423
+ /** Total base token supply including all decimals (raw u64) */
424
+ baseTotalSupply: bigint;
425
+ /**
426
+ * Base tokens allocated to the curve vault
427
+ * (baseTotalSupply - baseForDistribution - baseForLiquidity).
428
+ * Determines the initial spot price: virtual_quote / (baseForCurve + virtualBase).
429
+ */
430
+ baseForCurve: bigint;
431
+ /** Decimals of the base (launched) token */
432
+ baseDecimals: number;
433
+ /** Decimals of the quote (numeraire) token, e.g. 9 for SOL, 6 for USDC */
434
+ quoteDecimals: number;
435
+ /** USD price of one unit of the numeraire token (e.g. SOL price in USD) */
436
+ numerairePriceUSD: number;
437
+ /**
438
+ * Virtual base reserve to use as the canonical anchor. Defaults to `baseForCurve`.
439
+ * Changing this scales `curveVirtualQuote` proportionally — the resulting spot
440
+ * price is unchanged, but a larger value gives finer integer granularity at the
441
+ * cost of a proportionally larger `curveVirtualQuote`. Only override if you have
442
+ * a specific reason; the default is appropriate for most launches.
443
+ */
444
+ virtualBase?: bigint;
445
+ }
446
+ interface CurveParamsToMarketCapInput {
447
+ curveVirtualBase: bigint;
448
+ curveVirtualQuote: bigint;
449
+ /**
450
+ * Base tokens available to the curve (vault balance minus reserved allocations).
451
+ * Computed as: baseVaultBalance - baseForDistribution - baseForLiquidity.
452
+ * At launch open this equals baseForCurve.
453
+ */
454
+ baseReserve: bigint;
455
+ /** Current quote token vault balance (raw u64) */
456
+ quoteReserve: bigint;
457
+ baseTotalSupply: bigint;
458
+ baseDecimals: number;
459
+ quoteDecimals: number;
460
+ numerairePriceUSD: number;
461
+ }
462
+
463
+ type ProgramAccountsFilter = NonNullable<NonNullable<Parameters<Rpc<GetProgramAccountsApi>['getProgramAccounts']>[1]>['filters']>[number];
464
+ /**
465
+ * A minimal RPC interface for getProgramAccounts that is compatible with both
466
+ * @solana/kit@5 and @solana/kit@6.
467
+ *
468
+ * The only breaking difference between the two versions is that kit@6 uses
469
+ * `readonly` arrays for the `filters` parameter while kit@5 uses mutable arrays.
470
+ * Declaring `filters` as a mutable array here satisfies both kit versions via
471
+ * TypeScript's function parameter contravariance: a function that accepts
472
+ * `readonly` inputs (kit@6) is a subtype of one that accepts mutable inputs.
473
+ *
474
+ * Remove this file once the frontend ecosystem (e.g. @solana/client,
475
+ * @solana/react-hooks) publishes kit@6-compatible releases.
476
+ */
477
+ type GetProgramAccountsRpc = {
478
+ getProgramAccounts(program: Parameters<Rpc<GetProgramAccountsApi>['getProgramAccounts']>[0], config?: Omit<NonNullable<Parameters<Rpc<GetProgramAccountsApi>['getProgramAccounts']>[1]>, 'filters'> & {
479
+ filters?: ProgramAccountsFilter[];
480
+ }): {
481
+ send(): Promise<unknown>;
482
+ };
483
+ };
484
+
485
+ /**
486
+ * Position fetching and utility functions for the CPMM SDK
487
+ */
488
+
489
+ /**
490
+ * Configuration for fetching positions
491
+ */
492
+ interface FetchPositionsConfig {
493
+ /** Program ID (defaults to CPMM program) */
494
+ programId?: Address;
495
+ /** Commitment level */
496
+ commitment?: 'processed' | 'confirmed' | 'finalized';
497
+ }
498
+ /**
499
+ * Position with its address
500
+ */
501
+ interface PositionWithAddress {
502
+ address: Address;
503
+ account: Position;
504
+ }
505
+ /**
506
+ * Position value in underlying tokens
507
+ */
508
+ interface PositionValue {
509
+ /** Amount of token0 the position is worth */
510
+ amount0: bigint;
511
+ /** Amount of token1 the position is worth */
512
+ amount1: bigint;
513
+ /** Pending uncollected fees in token0 */
514
+ pendingFees0: bigint;
515
+ /** Pending uncollected fees in token1 */
516
+ pendingFees1: bigint;
517
+ /** Total value in token0 (amount0 + pending0) */
518
+ totalValue0: bigint;
519
+ /** Total value in token1 (amount1 + pending1) */
520
+ totalValue1: bigint;
521
+ /** Share of pool as a decimal (0-1) */
522
+ poolShare: number;
523
+ }
524
+ /**
525
+ * Fetch and decode a single position account
526
+ *
527
+ * @param rpc - Solana RPC client
528
+ * @param address - Position account address
529
+ * @param config - Optional configuration
530
+ * @returns Decoded position data or null if not found
531
+ *
532
+ * @example
533
+ * ```ts
534
+ * const position = await fetchPosition(rpc, positionAddress);
535
+ * if (position) {
536
+ * console.log(`Position shares: ${position.shares}`);
537
+ * }
538
+ * ```
539
+ */
540
+ declare function fetchPosition(rpc: Rpc<GetAccountInfoApi>, address: Address, config?: FetchPositionsConfig): Promise<Position | null>;
541
+ /**
542
+ * Fetch all positions for a specific owner
543
+ *
544
+ * @param rpc - Solana RPC client
545
+ * @param owner - Owner address
546
+ * @param pool - Optional pool address to filter by
547
+ * @param config - Optional configuration
548
+ * @returns Array of positions with their addresses
549
+ *
550
+ * @example
551
+ * ```ts
552
+ * // Get all positions for a user
553
+ * const allPositions = await fetchUserPositions(rpc, userWallet);
554
+ *
555
+ * // Get positions for a specific pool
556
+ * const poolPositions = await fetchUserPositions(rpc, userWallet, poolAddress);
557
+ * ```
558
+ */
559
+ declare function fetchUserPositions(rpc: GetProgramAccountsRpc, owner: Address, pool?: Address, config?: FetchPositionsConfig): Promise<PositionWithAddress[]>;
560
+ /**
561
+ * Fetch all positions for a specific pool
562
+ *
563
+ * @param rpc - Solana RPC client
564
+ * @param pool - Pool address
565
+ * @param config - Optional configuration
566
+ * @returns Array of positions with their addresses
567
+ */
568
+ declare function fetchPoolPositions(rpc: GetProgramAccountsRpc, pool: Address, config?: FetchPositionsConfig): Promise<PositionWithAddress[]>;
569
+ /**
570
+ * Calculate the value of a position in underlying tokens
571
+ *
572
+ * @param pool - Pool data
573
+ * @param position - Position data
574
+ * @returns Position value breakdown
575
+ *
576
+ * @example
577
+ * ```ts
578
+ * const pool = await fetchPool(rpc, poolAddress);
579
+ * const position = await fetchPosition(rpc, positionAddress);
580
+ *
581
+ * if (pool && position) {
582
+ * const value = getPositionValue(pool, position);
583
+ * console.log(`Position worth ${value.amount0} token0 + ${value.amount1} token1`);
584
+ * console.log(`Pool share: ${(value.poolShare * 100).toFixed(2)}%`);
585
+ * }
586
+ * ```
587
+ */
588
+ declare function getPositionValue(pool: Pool, position: Position): PositionValue;
589
+ /**
590
+ * Derive and fetch a position by its deterministic parameters
591
+ *
592
+ * @param rpc - Solana RPC client
593
+ * @param pool - Pool address
594
+ * @param owner - Position owner
595
+ * @param positionId - Position ID
596
+ * @param config - Optional configuration
597
+ * @returns Position with address or null if not found
598
+ */
599
+ declare function fetchPositionByParams(rpc: Rpc<GetAccountInfoApi>, pool: Address, owner: Address, positionId: bigint, config?: FetchPositionsConfig): Promise<PositionWithAddress | null>;
600
+ /**
601
+ * Get the position address for given parameters without fetching
602
+ *
603
+ * @param pool - Pool address
604
+ * @param owner - Position owner
605
+ * @param positionId - Position ID
606
+ * @param programId - Program ID (defaults to CPMM program)
607
+ * @returns Position address
608
+ */
609
+ declare function getPositionAddressFromParams(pool: Address, owner: Address, positionId: bigint, programId?: Address): Promise<Address>;
610
+ /**
611
+ * Batch fetch multiple positions
612
+ *
613
+ * @param rpc - Solana RPC client
614
+ * @param addresses - Array of position addresses to fetch
615
+ * @param config - Optional configuration
616
+ * @returns Map of address to position (missing positions are not included)
617
+ */
618
+ declare function fetchPositionsBatch(rpc: Rpc<GetAccountInfoApi>, addresses: Address[], config?: FetchPositionsConfig): Promise<Map<Address, Position>>;
619
+ /**
620
+ * Filter positions with non-zero shares
621
+ *
622
+ * @param positions - Array of positions to filter
623
+ * @returns Positions with shares > 0
624
+ */
625
+ declare function filterActivePositions(positions: PositionWithAddress[]): PositionWithAddress[];
626
+ /**
627
+ * Sort positions by share amount
628
+ *
629
+ * @param positions - Array of positions to sort
630
+ * @param descending - Sort descending (largest first) if true
631
+ * @returns Sorted array (does not mutate input)
632
+ */
633
+ declare function sortPositionsByShares(positions: PositionWithAddress[], descending?: boolean): PositionWithAddress[];
634
+
635
+ /**
636
+ * Oracle fetching and TWAP utility functions for the CPMM SDK
637
+ */
638
+
639
+ /**
640
+ * Configuration for fetching oracles
641
+ */
642
+ interface FetchOracleConfig {
643
+ /** Program ID (defaults to CPMM program) */
644
+ programId?: Address;
645
+ /** Commitment level */
646
+ commitment?: 'processed' | 'confirmed' | 'finalized';
647
+ }
648
+ /**
649
+ * Oracle with its address
650
+ */
651
+ interface OracleWithAddress {
652
+ address: Address;
653
+ account: OracleState;
654
+ }
655
+ /**
656
+ * Fetch and decode an oracle state account
657
+ *
658
+ * @param rpc - Solana RPC client
659
+ * @param address - Oracle account address
660
+ * @param config - Optional configuration
661
+ * @returns Decoded oracle state or null if not found
662
+ *
663
+ * @example
664
+ * ```ts
665
+ * const oracle = await fetchOracle(rpc, oracleAddress);
666
+ * if (oracle) {
667
+ * console.log(`Oracle initialized: ${oracle.initialized}`);
668
+ * console.log(`Last update: ${oracle.lastTimestamp}`);
669
+ * }
670
+ * ```
671
+ */
672
+ declare function fetchOracle(rpc: Rpc<GetAccountInfoApi>, address: Address, config?: FetchOracleConfig): Promise<OracleState | null>;
673
+ /**
674
+ * Get the oracle for a specific pool
675
+ *
676
+ * Derives the oracle PDA from the pool address and fetches it.
677
+ *
678
+ * @param rpc - Solana RPC client
679
+ * @param pool - Pool address
680
+ * @param config - Optional configuration
681
+ * @returns Oracle data with address, or null if not found/initialized
682
+ *
683
+ * @example
684
+ * ```ts
685
+ * const result = await getOracleForPool(rpc, poolAddress);
686
+ * if (result) {
687
+ * console.log(`Oracle at ${result.address}`);
688
+ * const twap = consultTwap(result.account, 300); // 5-minute TWAP
689
+ * console.log(`TWAP price: ${twap.price0}`);
690
+ * }
691
+ * ```
692
+ */
693
+ declare function getOracleForPool(rpc: Rpc<GetAccountInfoApi>, pool: Address, config?: FetchOracleConfig): Promise<OracleWithAddress | null>;
694
+ /**
695
+ * Get the oracle address for a pool without fetching
696
+ *
697
+ * @param pool - Pool address
698
+ * @param programId - Program ID (defaults to CPMM program)
699
+ * @returns Oracle address
700
+ */
701
+ declare function getOracleAddressFromPool(pool: Address, programId?: Address): Promise<Address>;
702
+ /**
703
+ * Calculate TWAP price from oracle observations
704
+ *
705
+ * Finds the appropriate observations in the circular buffer and computes
706
+ * the time-weighted average price over the specified window.
707
+ *
708
+ * @param oracle - Oracle state data
709
+ * @param windowSeconds - TWAP window in seconds
710
+ * @param currentTimestamp - Optional override for current time (seconds)
711
+ * @returns TWAP prices for both directions, or null if insufficient data
712
+ *
713
+ * @example
714
+ * ```ts
715
+ * const oracle = await fetchOracle(rpc, oracleAddress);
716
+ * if (oracle && oracle.initialized) {
717
+ * // Get 5-minute TWAP
718
+ * const twap = consultTwap(oracle, 300);
719
+ * if (twap) {
720
+ * console.log(`Token0 price: ${twap.price0} token1 per token0`);
721
+ * console.log(`Token1 price: ${twap.price1} token0 per token1`);
722
+ * }
723
+ * }
724
+ * ```
725
+ */
726
+ declare function consultTwap(oracle: OracleState, windowSeconds: number, currentTimestamp?: number): TwapResult | null;
727
+ /**
728
+ * Get the current spot prices from oracle
729
+ *
730
+ * Uses the truncated (manipulation-resistant) prices stored in the oracle.
731
+ *
732
+ * @param oracle - Oracle state data
733
+ * @returns Current truncated prices
734
+ */
735
+ declare function getOracleSpotPrices(oracle: OracleState): {
736
+ price0Q64: bigint;
737
+ price1Q64: bigint;
738
+ price0: number;
739
+ price1: number;
740
+ };
741
+ /**
742
+ * Get the price deviation metrics from oracle
743
+ *
744
+ * Deviation indicates how much the spot price has moved from the truncated price.
745
+ * High deviation may indicate price manipulation or rapid market movement.
746
+ *
747
+ * @param oracle - Oracle state data
748
+ * @returns Deviation values for both price directions
749
+ */
750
+ declare function getOracleDeviation(oracle: OracleState): {
751
+ deviation0Q64: bigint;
752
+ deviation1Q64: bigint;
753
+ deviation0: number;
754
+ deviation1: number;
755
+ };
756
+ /**
757
+ * Calculate the age of the oracle (time since last update)
758
+ *
759
+ * @param oracle - Oracle state data
760
+ * @param currentTimestamp - Current timestamp (defaults to Date.now() / 1000)
761
+ * @returns Age in seconds
762
+ */
763
+ declare function getOracleAge(oracle: OracleState, currentTimestamp?: number): number;
764
+ /**
765
+ * Check if oracle is stale (hasn't been updated recently)
766
+ *
767
+ * @param oracle - Oracle state data
768
+ * @param maxAgeSeconds - Maximum acceptable age in seconds
769
+ * @param currentTimestamp - Current timestamp (defaults to Date.now() / 1000)
770
+ * @returns true if oracle is stale
771
+ */
772
+ declare function isOracleStale(oracle: OracleState, maxAgeSeconds: number, currentTimestamp?: number): boolean;
773
+ /**
774
+ * Get observation buffer statistics
775
+ *
776
+ * @param oracle - Oracle state data
777
+ * @returns Information about the observation buffer
778
+ */
779
+ declare function getOracleBufferStats(oracle: OracleState): {
780
+ /** Total buffer capacity */
781
+ capacity: number;
782
+ /** Number of observations with data */
783
+ filledCount: number;
784
+ /** Current write index */
785
+ currentIndex: number;
786
+ /** Oldest observation timestamp (0 if not filled) */
787
+ oldestTimestamp: number;
788
+ /** Newest observation timestamp */
789
+ newestTimestamp: number;
790
+ /** Time span covered by observations */
791
+ timeSpanSeconds: number;
792
+ };
793
+ /**
794
+ * Batch fetch oracles for multiple pools
795
+ *
796
+ * @param rpc - Solana RPC client
797
+ * @param pools - Array of pool addresses
798
+ * @param config - Optional configuration
799
+ * @returns Map of pool address to oracle (missing oracles not included)
800
+ */
801
+ declare function fetchOraclesBatch(rpc: Rpc<GetAccountInfoApi>, pools: Address[], config?: FetchOracleConfig): Promise<Map<Address, OracleWithAddress>>;
802
+ /**
803
+ * Calculate price from pool reserves and compare with oracle
804
+ *
805
+ * Useful for detecting price discrepancies or manipulation.
806
+ *
807
+ * @param pool - Pool data
808
+ * @param oracle - Oracle data
809
+ * @returns Comparison metrics
810
+ */
811
+ declare function comparePoolAndOraclePrices(pool: Pool, oracle: OracleState): {
812
+ /** Spot price from pool reserves (token1 per token0) */
813
+ poolPrice0: number;
814
+ /** Truncated price from oracle (token1 per token0) */
815
+ oraclePrice0: number;
816
+ /** Difference as percentage (positive = pool > oracle) */
817
+ divergencePct: number;
818
+ };
819
+
820
+ export { fetchPositionByParams as $, type AmmConfig as A, type PositionClosedEvent as B, type CurveParams as C, type SentinelInvokedEvent as D, type SentinelErrorEvent as E, type SentinelUpdatedEvent as F, type GetProgramAccountsRpc as G, type FeesUpdatedEvent as H, type InitializeConfigArgs as I, type OracleInitializedEvent as J, type OracleUpdatedEvent as K, type RouteUpdatedEvent as L, type MarketCapValidationResult as M, type AdminTransferredEvent as N, type OracleState as O, type Pool as P, type QuoteToNumeraireArgs as Q, type RemoveLiquidityQuote as R, type SwapDirection as S, type TransferAdminArgs as T, type PausedEvent as U, type UnpausedEvent as V, type SkimmedEvent as W, fetchPosition as X, fetchUserPositions as Y, getPositionValue as Z, fetchPoolPositions as _, type Position as a, fetchPositionsBatch as a0, fetchOracle as a1, getOracleForPool as a2, consultTwap as a3, getOracleSpotPrices as a4, getOracleDeviation as a5, isOracleStale as a6, getOracleBufferStats as a7, type PositionValue as a8, type FetchPositionsConfig as a9, type PositionWithAddress as aa, type FetchOracleConfig as ab, type OracleWithAddress as ac, getPositionAddressFromParams as ad, filterActivePositions as ae, sortPositionsByShares as af, getOracleAddressFromPool as ag, getOracleAge as ah, fetchOraclesBatch as ai, comparePoolAndOraclePrices as aj, type SwapQuote as b, type AddLiquidityQuote as c, type MarketCapToCurveParamsInput as d, type CurveParamsToMarketCapInput as e, type InitializePoolArgs as f, type InitializeOracleArgs as g, type SetFeesArgs as h, type SetSentinelArgs as i, type SetRouteArgs as j, type SwapExactInArgs as k, type CreatePositionArgs as l, type AddLiquidityArgs as m, type RemoveLiquidityArgs as n, type CollectFeesArgs as o, type CollectProtocolFeesArgs as p, type OracleConsultArgs as q, type Observation as r, type TwapResult as s, type SwapEvent as t, type AddLiquidityEvent as u, type RemoveLiquidityEvent as v, type CollectFeesEvent as w, type CollectProtocolFeesEvent as x, type PoolInitializedEvent as y, type PositionCreatedEvent as z };