@whetstone-research/doppler-sdk 0.0.24 → 1.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 (445) hide show
  1. package/README.md +69 -0
  2. package/dist/chunk-LIXSTCMM.js +974 -0
  3. package/dist/chunk-LIXSTCMM.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-T46KDO65.js +322 -0
  7. package/dist/chunk-T46KDO65.js.map +1 -0
  8. package/dist/evm/index.d.ts +8533 -0
  9. package/dist/evm/index.js +15230 -0
  10. package/dist/evm/index.js.map +1 -0
  11. package/dist/oracle-B2LV97ff.d.ts +826 -0
  12. package/dist/pda-LKHUH6JK.js +4 -0
  13. package/dist/pda-LKHUH6JK.js.map +1 -0
  14. package/dist/solana/index.d.ts +2534 -0
  15. package/dist/solana/index.js +2298 -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,826 @@
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 SwapQuoteExactOut {
270
+ /** Required input amount */
271
+ amountIn: bigint;
272
+ /** Total fee charged (in input token) */
273
+ feeTotal: bigint;
274
+ }
275
+ interface AddLiquidityQuote {
276
+ /** Shares the user will receive */
277
+ sharesOut: bigint;
278
+ /** Actual amount of token0 to deposit */
279
+ amount0: bigint;
280
+ /** Actual amount of token1 to deposit */
281
+ amount1: bigint;
282
+ /** Share of pool after deposit */
283
+ poolShare: number;
284
+ }
285
+ interface RemoveLiquidityQuote {
286
+ /** Amount of token0 to receive */
287
+ amount0: bigint;
288
+ /** Amount of token1 to receive */
289
+ amount1: bigint;
290
+ }
291
+ interface TwapResult {
292
+ /** TWAP price of token0 in token1 (Q64.64) */
293
+ price0Q64: bigint;
294
+ /** TWAP price of token1 in token0 (Q64.64) */
295
+ price1Q64: bigint;
296
+ /** TWAP price of token0 in token1 (decimal) */
297
+ price0: number;
298
+ /** TWAP price of token1 in token0 (decimal) */
299
+ price1: number;
300
+ }
301
+ interface SwapEvent {
302
+ pool: Address;
303
+ user: Address;
304
+ direction: SwapDirection;
305
+ amountIn: bigint;
306
+ amountOut: bigint;
307
+ feeTotal: bigint;
308
+ feeDist: bigint;
309
+ }
310
+ interface AddLiquidityEvent {
311
+ pool: Address;
312
+ owner: Address;
313
+ amount0: bigint;
314
+ amount1: bigint;
315
+ sharesOut: bigint;
316
+ }
317
+ interface RemoveLiquidityEvent {
318
+ pool: Address;
319
+ owner: Address;
320
+ amount0: bigint;
321
+ amount1: bigint;
322
+ sharesIn: bigint;
323
+ }
324
+ interface CollectFeesEvent {
325
+ pool: Address;
326
+ owner: Address;
327
+ amount0: bigint;
328
+ amount1: bigint;
329
+ }
330
+ interface CollectProtocolFeesEvent {
331
+ pool: Address;
332
+ amount0: bigint;
333
+ amount1: bigint;
334
+ recipient0: Address;
335
+ recipient1: Address;
336
+ }
337
+ interface PoolInitializedEvent {
338
+ pool: Address;
339
+ token0Mint: Address;
340
+ token1Mint: Address;
341
+ vault0: Address;
342
+ vault1: Address;
343
+ }
344
+ interface PositionCreatedEvent {
345
+ pool: Address;
346
+ owner: Address;
347
+ position: Address;
348
+ positionId: bigint;
349
+ }
350
+ interface PositionClosedEvent {
351
+ pool: Address;
352
+ owner: Address;
353
+ position: Address;
354
+ }
355
+ interface SentinelInvokedEvent {
356
+ pool: Address;
357
+ action: number;
358
+ allow: number;
359
+ newFeeBps: number;
360
+ newSplitBps: number;
361
+ }
362
+ interface SentinelErrorEvent {
363
+ pool: Address;
364
+ action: number;
365
+ errorCode: bigint;
366
+ }
367
+ interface SentinelUpdatedEvent {
368
+ pool: Address;
369
+ sentinelProgram: Address;
370
+ sentinelFlags: number;
371
+ admin: Address;
372
+ }
373
+ interface FeesUpdatedEvent {
374
+ pool: Address;
375
+ prevSwapFeeBps: number;
376
+ prevFeeSplitBps: number;
377
+ swapFeeBps: number;
378
+ feeSplitBps: number;
379
+ source: number;
380
+ }
381
+ interface OracleInitializedEvent {
382
+ pool: Address;
383
+ maxPriceChangeRatioQ64: bigint;
384
+ observationIntervalSec: number;
385
+ admin: Address;
386
+ }
387
+ interface OracleUpdatedEvent {
388
+ pool: Address;
389
+ slot: bigint;
390
+ truncPrice0Q64: bigint;
391
+ truncPrice1Q64: bigint;
392
+ deviation0Q64: bigint;
393
+ deviation1Q64: bigint;
394
+ }
395
+ interface RouteUpdatedEvent {
396
+ pool: Address;
397
+ routeNextPool: Address;
398
+ routeBridgeMint: Address;
399
+ admin: Address;
400
+ }
401
+ interface AdminTransferredEvent {
402
+ oldAdmin: Address;
403
+ newAdmin: Address;
404
+ }
405
+ interface PausedEvent {
406
+ }
407
+ interface UnpausedEvent {
408
+ }
409
+ interface SkimmedEvent {
410
+ pool: Address;
411
+ amount0: bigint;
412
+ amount1: bigint;
413
+ }
414
+ interface MarketCapValidationResult {
415
+ valid: boolean;
416
+ warnings: string[];
417
+ }
418
+ interface CurveParams {
419
+ /** Virtual base token reserves for the XYK curve */
420
+ curveVirtualBase: bigint;
421
+ /** Virtual quote token reserves for the XYK curve */
422
+ curveVirtualQuote: bigint;
423
+ }
424
+ interface MarketCapToCurveParamsInput {
425
+ /** Starting market cap in USD (price at launch open) */
426
+ startMarketCapUSD: number;
427
+ /** Ending market cap in USD (graduation / migration threshold) */
428
+ endMarketCapUSD: number;
429
+ /** Total base token supply including all decimals (raw u64) */
430
+ baseTotalSupply: bigint;
431
+ /**
432
+ * Base tokens allocated to the curve vault
433
+ * (baseTotalSupply - baseForDistribution - baseForLiquidity).
434
+ * Determines the initial spot price: virtual_quote / (baseForCurve + virtualBase).
435
+ */
436
+ baseForCurve: bigint;
437
+ /** Decimals of the base (launched) token */
438
+ baseDecimals: number;
439
+ /** Decimals of the quote (numeraire) token, e.g. 9 for SOL, 6 for USDC */
440
+ quoteDecimals: number;
441
+ /** USD price of one unit of the numeraire token (e.g. SOL price in USD) */
442
+ numerairePriceUSD: number;
443
+ /**
444
+ * Virtual base reserve to use as the canonical anchor. Defaults to `baseForCurve`.
445
+ * Changing this scales `curveVirtualQuote` proportionally — the resulting spot
446
+ * price is unchanged, but a larger value gives finer integer granularity at the
447
+ * cost of a proportionally larger `curveVirtualQuote`. Only override if you have
448
+ * a specific reason; the default is appropriate for most launches.
449
+ */
450
+ virtualBase?: bigint;
451
+ }
452
+ interface CurveParamsToMarketCapInput {
453
+ curveVirtualBase: bigint;
454
+ curveVirtualQuote: bigint;
455
+ /**
456
+ * Base tokens available to the curve (vault balance minus reserved allocations).
457
+ * Computed as: baseVaultBalance - baseForDistribution - baseForLiquidity.
458
+ * At launch open this equals baseForCurve.
459
+ */
460
+ baseReserve: bigint;
461
+ /** Current quote token vault balance (raw u64) */
462
+ quoteReserve: bigint;
463
+ baseTotalSupply: bigint;
464
+ baseDecimals: number;
465
+ quoteDecimals: number;
466
+ numerairePriceUSD: number;
467
+ }
468
+
469
+ type ProgramAccountsFilter = NonNullable<NonNullable<Parameters<Rpc<GetProgramAccountsApi>['getProgramAccounts']>[1]>['filters']>[number];
470
+ /**
471
+ * A minimal RPC interface for getProgramAccounts that is compatible with both
472
+ * @solana/kit@5 and @solana/kit@6.
473
+ *
474
+ * The only breaking difference between the two versions is that kit@6 uses
475
+ * `readonly` arrays for the `filters` parameter while kit@5 uses mutable arrays.
476
+ * Declaring `filters` as a mutable array here satisfies both kit versions via
477
+ * TypeScript's function parameter contravariance: a function that accepts
478
+ * `readonly` inputs (kit@6) is a subtype of one that accepts mutable inputs.
479
+ *
480
+ * Remove this file once the frontend ecosystem (e.g. @solana/client,
481
+ * @solana/react-hooks) publishes kit@6-compatible releases.
482
+ */
483
+ type GetProgramAccountsRpc = {
484
+ getProgramAccounts(program: Parameters<Rpc<GetProgramAccountsApi>['getProgramAccounts']>[0], config?: Omit<NonNullable<Parameters<Rpc<GetProgramAccountsApi>['getProgramAccounts']>[1]>, 'filters'> & {
485
+ filters?: ProgramAccountsFilter[];
486
+ }): {
487
+ send(): Promise<unknown>;
488
+ };
489
+ };
490
+
491
+ /**
492
+ * Position fetching and utility functions for the CPMM SDK
493
+ */
494
+
495
+ /**
496
+ * Configuration for fetching positions
497
+ */
498
+ interface FetchPositionsConfig {
499
+ /** Program ID (defaults to CPMM program) */
500
+ programId?: Address;
501
+ /** Commitment level */
502
+ commitment?: 'processed' | 'confirmed' | 'finalized';
503
+ }
504
+ /**
505
+ * Position with its address
506
+ */
507
+ interface PositionWithAddress {
508
+ address: Address;
509
+ account: Position;
510
+ }
511
+ /**
512
+ * Position value in underlying tokens
513
+ */
514
+ interface PositionValue {
515
+ /** Amount of token0 the position is worth */
516
+ amount0: bigint;
517
+ /** Amount of token1 the position is worth */
518
+ amount1: bigint;
519
+ /** Pending uncollected fees in token0 */
520
+ pendingFees0: bigint;
521
+ /** Pending uncollected fees in token1 */
522
+ pendingFees1: bigint;
523
+ /** Total value in token0 (amount0 + pending0) */
524
+ totalValue0: bigint;
525
+ /** Total value in token1 (amount1 + pending1) */
526
+ totalValue1: bigint;
527
+ /** Share of pool as a decimal (0-1) */
528
+ poolShare: number;
529
+ }
530
+ /**
531
+ * Fetch and decode a single position account
532
+ *
533
+ * @param rpc - Solana RPC client
534
+ * @param address - Position account address
535
+ * @param config - Optional configuration
536
+ * @returns Decoded position data or null if not found
537
+ *
538
+ * @example
539
+ * ```ts
540
+ * const position = await fetchPosition(rpc, positionAddress);
541
+ * if (position) {
542
+ * console.log(`Position shares: ${position.shares}`);
543
+ * }
544
+ * ```
545
+ */
546
+ declare function fetchPosition(rpc: Rpc<GetAccountInfoApi>, address: Address, config?: FetchPositionsConfig): Promise<Position | null>;
547
+ /**
548
+ * Fetch all positions for a specific owner
549
+ *
550
+ * @param rpc - Solana RPC client
551
+ * @param owner - Owner address
552
+ * @param pool - Optional pool address to filter by
553
+ * @param config - Optional configuration
554
+ * @returns Array of positions with their addresses
555
+ *
556
+ * @example
557
+ * ```ts
558
+ * // Get all positions for a user
559
+ * const allPositions = await fetchUserPositions(rpc, userWallet);
560
+ *
561
+ * // Get positions for a specific pool
562
+ * const poolPositions = await fetchUserPositions(rpc, userWallet, poolAddress);
563
+ * ```
564
+ */
565
+ declare function fetchUserPositions(rpc: GetProgramAccountsRpc, owner: Address, pool?: Address, config?: FetchPositionsConfig): Promise<PositionWithAddress[]>;
566
+ /**
567
+ * Fetch all positions for a specific pool
568
+ *
569
+ * @param rpc - Solana RPC client
570
+ * @param pool - Pool address
571
+ * @param config - Optional configuration
572
+ * @returns Array of positions with their addresses
573
+ */
574
+ declare function fetchPoolPositions(rpc: GetProgramAccountsRpc, pool: Address, config?: FetchPositionsConfig): Promise<PositionWithAddress[]>;
575
+ /**
576
+ * Calculate the value of a position in underlying tokens
577
+ *
578
+ * @param pool - Pool data
579
+ * @param position - Position data
580
+ * @returns Position value breakdown
581
+ *
582
+ * @example
583
+ * ```ts
584
+ * const pool = await fetchPool(rpc, poolAddress);
585
+ * const position = await fetchPosition(rpc, positionAddress);
586
+ *
587
+ * if (pool && position) {
588
+ * const value = getPositionValue(pool, position);
589
+ * console.log(`Position worth ${value.amount0} token0 + ${value.amount1} token1`);
590
+ * console.log(`Pool share: ${(value.poolShare * 100).toFixed(2)}%`);
591
+ * }
592
+ * ```
593
+ */
594
+ declare function getPositionValue(pool: Pool, position: Position): PositionValue;
595
+ /**
596
+ * Derive and fetch a position by its deterministic parameters
597
+ *
598
+ * @param rpc - Solana RPC client
599
+ * @param pool - Pool address
600
+ * @param owner - Position owner
601
+ * @param positionId - Position ID
602
+ * @param config - Optional configuration
603
+ * @returns Position with address or null if not found
604
+ */
605
+ declare function fetchPositionByParams(rpc: Rpc<GetAccountInfoApi>, pool: Address, owner: Address, positionId: bigint, config?: FetchPositionsConfig): Promise<PositionWithAddress | null>;
606
+ /**
607
+ * Get the position address for given parameters without fetching
608
+ *
609
+ * @param pool - Pool address
610
+ * @param owner - Position owner
611
+ * @param positionId - Position ID
612
+ * @param programId - Program ID (defaults to CPMM program)
613
+ * @returns Position address
614
+ */
615
+ declare function getPositionAddressFromParams(pool: Address, owner: Address, positionId: bigint, programId?: Address): Promise<Address>;
616
+ /**
617
+ * Batch fetch multiple positions
618
+ *
619
+ * @param rpc - Solana RPC client
620
+ * @param addresses - Array of position addresses to fetch
621
+ * @param config - Optional configuration
622
+ * @returns Map of address to position (missing positions are not included)
623
+ */
624
+ declare function fetchPositionsBatch(rpc: Rpc<GetAccountInfoApi>, addresses: Address[], config?: FetchPositionsConfig): Promise<Map<Address, Position>>;
625
+ /**
626
+ * Filter positions with non-zero shares
627
+ *
628
+ * @param positions - Array of positions to filter
629
+ * @returns Positions with shares > 0
630
+ */
631
+ declare function filterActivePositions(positions: PositionWithAddress[]): PositionWithAddress[];
632
+ /**
633
+ * Sort positions by share amount
634
+ *
635
+ * @param positions - Array of positions to sort
636
+ * @param descending - Sort descending (largest first) if true
637
+ * @returns Sorted array (does not mutate input)
638
+ */
639
+ declare function sortPositionsByShares(positions: PositionWithAddress[], descending?: boolean): PositionWithAddress[];
640
+
641
+ /**
642
+ * Oracle fetching and TWAP utility functions for the CPMM SDK
643
+ */
644
+
645
+ /**
646
+ * Configuration for fetching oracles
647
+ */
648
+ interface FetchOracleConfig {
649
+ /** Program ID (defaults to CPMM program) */
650
+ programId?: Address;
651
+ /** Commitment level */
652
+ commitment?: 'processed' | 'confirmed' | 'finalized';
653
+ }
654
+ /**
655
+ * Oracle with its address
656
+ */
657
+ interface OracleWithAddress {
658
+ address: Address;
659
+ account: OracleState;
660
+ }
661
+ /**
662
+ * Fetch and decode an oracle state account
663
+ *
664
+ * @param rpc - Solana RPC client
665
+ * @param address - Oracle account address
666
+ * @param config - Optional configuration
667
+ * @returns Decoded oracle state or null if not found
668
+ *
669
+ * @example
670
+ * ```ts
671
+ * const oracle = await fetchOracle(rpc, oracleAddress);
672
+ * if (oracle) {
673
+ * console.log(`Oracle initialized: ${oracle.initialized}`);
674
+ * console.log(`Last update: ${oracle.lastTimestamp}`);
675
+ * }
676
+ * ```
677
+ */
678
+ declare function fetchOracle(rpc: Rpc<GetAccountInfoApi>, address: Address, config?: FetchOracleConfig): Promise<OracleState | null>;
679
+ /**
680
+ * Get the oracle for a specific pool
681
+ *
682
+ * Derives the oracle PDA from the pool address and fetches it.
683
+ *
684
+ * @param rpc - Solana RPC client
685
+ * @param pool - Pool address
686
+ * @param config - Optional configuration
687
+ * @returns Oracle data with address, or null if not found/initialized
688
+ *
689
+ * @example
690
+ * ```ts
691
+ * const result = await getOracleForPool(rpc, poolAddress);
692
+ * if (result) {
693
+ * console.log(`Oracle at ${result.address}`);
694
+ * const twap = consultTwap(result.account, 300); // 5-minute TWAP
695
+ * console.log(`TWAP price: ${twap.price0}`);
696
+ * }
697
+ * ```
698
+ */
699
+ declare function getOracleForPool(rpc: Rpc<GetAccountInfoApi>, pool: Address, config?: FetchOracleConfig): Promise<OracleWithAddress | null>;
700
+ /**
701
+ * Get the oracle address for a pool without fetching
702
+ *
703
+ * @param pool - Pool address
704
+ * @param programId - Program ID (defaults to CPMM program)
705
+ * @returns Oracle address
706
+ */
707
+ declare function getOracleAddressFromPool(pool: Address, programId?: Address): Promise<Address>;
708
+ /**
709
+ * Calculate TWAP price from oracle observations
710
+ *
711
+ * Finds the appropriate observations in the circular buffer and computes
712
+ * the time-weighted average price over the specified window.
713
+ *
714
+ * @param oracle - Oracle state data
715
+ * @param windowSeconds - TWAP window in seconds
716
+ * @param currentTimestamp - Optional override for current time (seconds)
717
+ * @returns TWAP prices for both directions, or null if insufficient data
718
+ *
719
+ * @example
720
+ * ```ts
721
+ * const oracle = await fetchOracle(rpc, oracleAddress);
722
+ * if (oracle && oracle.initialized) {
723
+ * // Get 5-minute TWAP
724
+ * const twap = consultTwap(oracle, 300);
725
+ * if (twap) {
726
+ * console.log(`Token0 price: ${twap.price0} token1 per token0`);
727
+ * console.log(`Token1 price: ${twap.price1} token0 per token1`);
728
+ * }
729
+ * }
730
+ * ```
731
+ */
732
+ declare function consultTwap(oracle: OracleState, windowSeconds: number, currentTimestamp?: number): TwapResult | null;
733
+ /**
734
+ * Get the current spot prices from oracle
735
+ *
736
+ * Uses the truncated (manipulation-resistant) prices stored in the oracle.
737
+ *
738
+ * @param oracle - Oracle state data
739
+ * @returns Current truncated prices
740
+ */
741
+ declare function getOracleSpotPrices(oracle: OracleState): {
742
+ price0Q64: bigint;
743
+ price1Q64: bigint;
744
+ price0: number;
745
+ price1: number;
746
+ };
747
+ /**
748
+ * Get the price deviation metrics from oracle
749
+ *
750
+ * Deviation indicates how much the spot price has moved from the truncated price.
751
+ * High deviation may indicate price manipulation or rapid market movement.
752
+ *
753
+ * @param oracle - Oracle state data
754
+ * @returns Deviation values for both price directions
755
+ */
756
+ declare function getOracleDeviation(oracle: OracleState): {
757
+ deviation0Q64: bigint;
758
+ deviation1Q64: bigint;
759
+ deviation0: number;
760
+ deviation1: number;
761
+ };
762
+ /**
763
+ * Calculate the age of the oracle (time since last update)
764
+ *
765
+ * @param oracle - Oracle state data
766
+ * @param currentTimestamp - Current timestamp (defaults to Date.now() / 1000)
767
+ * @returns Age in seconds
768
+ */
769
+ declare function getOracleAge(oracle: OracleState, currentTimestamp?: number): number;
770
+ /**
771
+ * Check if oracle is stale (hasn't been updated recently)
772
+ *
773
+ * @param oracle - Oracle state data
774
+ * @param maxAgeSeconds - Maximum acceptable age in seconds
775
+ * @param currentTimestamp - Current timestamp (defaults to Date.now() / 1000)
776
+ * @returns true if oracle is stale
777
+ */
778
+ declare function isOracleStale(oracle: OracleState, maxAgeSeconds: number, currentTimestamp?: number): boolean;
779
+ /**
780
+ * Get observation buffer statistics
781
+ *
782
+ * @param oracle - Oracle state data
783
+ * @returns Information about the observation buffer
784
+ */
785
+ declare function getOracleBufferStats(oracle: OracleState): {
786
+ /** Total buffer capacity */
787
+ capacity: number;
788
+ /** Number of observations with data */
789
+ filledCount: number;
790
+ /** Current write index */
791
+ currentIndex: number;
792
+ /** Oldest observation timestamp (0 if not filled) */
793
+ oldestTimestamp: number;
794
+ /** Newest observation timestamp */
795
+ newestTimestamp: number;
796
+ /** Time span covered by observations */
797
+ timeSpanSeconds: number;
798
+ };
799
+ /**
800
+ * Batch fetch oracles for multiple pools
801
+ *
802
+ * @param rpc - Solana RPC client
803
+ * @param pools - Array of pool addresses
804
+ * @param config - Optional configuration
805
+ * @returns Map of pool address to oracle (missing oracles not included)
806
+ */
807
+ declare function fetchOraclesBatch(rpc: Rpc<GetAccountInfoApi>, pools: Address[], config?: FetchOracleConfig): Promise<Map<Address, OracleWithAddress>>;
808
+ /**
809
+ * Calculate price from pool reserves and compare with oracle
810
+ *
811
+ * Useful for detecting price discrepancies or manipulation.
812
+ *
813
+ * @param pool - Pool data
814
+ * @param oracle - Oracle data
815
+ * @returns Comparison metrics
816
+ */
817
+ declare function comparePoolAndOraclePrices(pool: Pool, oracle: OracleState): {
818
+ /** Spot price from pool reserves (token1 per token0) */
819
+ poolPrice0: number;
820
+ /** Truncated price from oracle (token1 per token0) */
821
+ oraclePrice0: number;
822
+ /** Difference as percentage (positive = pool > oracle) */
823
+ divergencePct: number;
824
+ };
825
+
826
+ export { fetchPoolPositions as $, type AmmConfig as A, type PositionCreatedEvent as B, type CurveParams as C, type PositionClosedEvent as D, type SentinelInvokedEvent as E, type SentinelErrorEvent as F, type GetProgramAccountsRpc as G, type SentinelUpdatedEvent as H, type InitializeConfigArgs as I, type FeesUpdatedEvent as J, type OracleInitializedEvent as K, type OracleUpdatedEvent as L, type MarketCapValidationResult as M, type RouteUpdatedEvent 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 AdminTransferredEvent as U, type PausedEvent as V, type UnpausedEvent as W, type SkimmedEvent as X, fetchPosition as Y, fetchUserPositions as Z, getPositionValue as _, type Position as a, fetchPositionByParams as a0, fetchPositionsBatch as a1, fetchOracle as a2, getOracleForPool as a3, consultTwap as a4, getOracleSpotPrices as a5, getOracleDeviation as a6, isOracleStale as a7, getOracleBufferStats as a8, type PositionValue as a9, type FetchPositionsConfig as aa, type PositionWithAddress as ab, type FetchOracleConfig as ac, type OracleWithAddress as ad, getPositionAddressFromParams as ae, filterActivePositions as af, sortPositionsByShares as ag, getOracleAddressFromPool as ah, getOracleAge as ai, fetchOraclesBatch as aj, comparePoolAndOraclePrices as ak, type SwapQuote as b, type SwapQuoteExactOut as c, type AddLiquidityQuote as d, type MarketCapToCurveParamsInput as e, type CurveParamsToMarketCapInput as f, type InitializePoolArgs as g, type InitializeOracleArgs as h, type SetFeesArgs as i, type SetSentinelArgs as j, type SetRouteArgs as k, type SwapExactInArgs as l, type CreatePositionArgs as m, type AddLiquidityArgs as n, type RemoveLiquidityArgs as o, type CollectFeesArgs as p, type CollectProtocolFeesArgs as q, type OracleConsultArgs as r, type Observation as s, type TwapResult as t, type SwapEvent as u, type AddLiquidityEvent as v, type RemoveLiquidityEvent as w, type CollectFeesEvent as x, type CollectProtocolFeesEvent as y, type PoolInitializedEvent as z };