@metadaoproject/programs 0.1.0-alpha.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 (347) hide show
  1. package/README.md +90 -0
  2. package/dist/amm/index.d.ts +1 -0
  3. package/dist/amm/index.js +2 -0
  4. package/dist/amm/index.js.map +1 -0
  5. package/dist/amm/v0.3/AmmClient.d.ts +224 -0
  6. package/dist/amm/v0.3/AmmClient.js +173 -0
  7. package/dist/amm/v0.3/AmmClient.js.map +1 -0
  8. package/dist/amm/v0.3/index.d.ts +3 -0
  9. package/dist/amm/v0.3/index.js +4 -0
  10. package/dist/amm/v0.3/index.js.map +1 -0
  11. package/dist/amm/v0.3/pda.d.ts +3 -0
  12. package/dist/amm/v0.3/pda.js +14 -0
  13. package/dist/amm/v0.3/pda.js.map +1 -0
  14. package/dist/amm/v0.3/types/amm.d.ts +542 -0
  15. package/dist/amm/v0.3/types/amm.js +542 -0
  16. package/dist/amm/v0.3/types/amm.js.map +1 -0
  17. package/dist/amm/v0.3/types/index.d.ts +4 -0
  18. package/dist/amm/v0.3/types/index.js +3 -0
  19. package/dist/amm/v0.3/types/index.js.map +1 -0
  20. package/dist/amm/v0.4/AmmClient.d.ts +266 -0
  21. package/dist/amm/v0.4/AmmClient.js +186 -0
  22. package/dist/amm/v0.4/AmmClient.js.map +1 -0
  23. package/dist/amm/v0.4/index.d.ts +3 -0
  24. package/dist/amm/v0.4/index.js +4 -0
  25. package/dist/amm/v0.4/index.js.map +1 -0
  26. package/dist/amm/v0.4/pda.d.ts +3 -0
  27. package/dist/amm/v0.4/pda.js +14 -0
  28. package/dist/amm/v0.4/pda.js.map +1 -0
  29. package/dist/amm/v0.4/types/amm.d.ts +824 -0
  30. package/dist/amm/v0.4/types/amm.js +824 -0
  31. package/dist/amm/v0.4/types/amm.js.map +1 -0
  32. package/dist/amm/v0.4/types/index.d.ts +10 -0
  33. package/dist/amm/v0.4/types/index.js +3 -0
  34. package/dist/amm/v0.4/types/index.js.map +1 -0
  35. package/dist/amm/v0.5/AmmClient.d.ts +266 -0
  36. package/dist/amm/v0.5/AmmClient.js +186 -0
  37. package/dist/amm/v0.5/AmmClient.js.map +1 -0
  38. package/dist/amm/v0.5/index.d.ts +4 -0
  39. package/dist/amm/v0.5/index.js +5 -0
  40. package/dist/amm/v0.5/index.js.map +1 -0
  41. package/dist/amm/v0.5/pda.d.ts +3 -0
  42. package/dist/amm/v0.5/pda.js +14 -0
  43. package/dist/amm/v0.5/pda.js.map +1 -0
  44. package/dist/amm/v0.5/priceMath.d.ts +9 -0
  45. package/dist/amm/v0.5/priceMath.js +36 -0
  46. package/dist/amm/v0.5/priceMath.js.map +1 -0
  47. package/dist/amm/v0.5/types/amm.d.ts +832 -0
  48. package/dist/amm/v0.5/types/amm.js +832 -0
  49. package/dist/amm/v0.5/types/amm.js.map +1 -0
  50. package/dist/amm/v0.5/types/index.d.ts +10 -0
  51. package/dist/amm/v0.5/types/index.js +3 -0
  52. package/dist/amm/v0.5/types/index.js.map +1 -0
  53. package/dist/autocrat/index.d.ts +1 -0
  54. package/dist/autocrat/index.js +2 -0
  55. package/dist/autocrat/index.js.map +1 -0
  56. package/dist/autocrat/v0.3/AutocratClient.d.ts +233 -0
  57. package/dist/autocrat/v0.3/AutocratClient.js +269 -0
  58. package/dist/autocrat/v0.3/AutocratClient.js.map +1 -0
  59. package/dist/autocrat/v0.3/cu.d.ts +10 -0
  60. package/dist/autocrat/v0.3/cu.js +11 -0
  61. package/dist/autocrat/v0.3/cu.js.map +1 -0
  62. package/dist/autocrat/v0.3/index.d.ts +4 -0
  63. package/dist/autocrat/v0.3/index.js +5 -0
  64. package/dist/autocrat/v0.3/index.js.map +1 -0
  65. package/dist/autocrat/v0.3/pda.d.ts +4 -0
  66. package/dist/autocrat/v0.3/pda.js +14 -0
  67. package/dist/autocrat/v0.3/pda.js.map +1 -0
  68. package/dist/autocrat/v0.3/types/autocrat.d.ts +632 -0
  69. package/dist/autocrat/v0.3/types/autocrat.js +632 -0
  70. package/dist/autocrat/v0.3/types/autocrat.js.map +1 -0
  71. package/dist/autocrat/v0.3/types/index.d.ts +8 -0
  72. package/dist/autocrat/v0.3/types/index.js +3 -0
  73. package/dist/autocrat/v0.3/types/index.js.map +1 -0
  74. package/dist/autocrat/v0.4/AutocratClient.d.ts +266 -0
  75. package/dist/autocrat/v0.4/AutocratClient.js +385 -0
  76. package/dist/autocrat/v0.4/AutocratClient.js.map +1 -0
  77. package/dist/autocrat/v0.4/index.d.ts +3 -0
  78. package/dist/autocrat/v0.4/index.js +4 -0
  79. package/dist/autocrat/v0.4/index.js.map +1 -0
  80. package/dist/autocrat/v0.4/pda.d.ts +4 -0
  81. package/dist/autocrat/v0.4/pda.js +14 -0
  82. package/dist/autocrat/v0.4/pda.js.map +1 -0
  83. package/dist/autocrat/v0.4/types/autocrat.d.ts +1007 -0
  84. package/dist/autocrat/v0.4/types/autocrat.js +1007 -0
  85. package/dist/autocrat/v0.4/types/autocrat.js.map +1 -0
  86. package/dist/autocrat/v0.4/types/index.d.ts +14 -0
  87. package/dist/autocrat/v0.4/types/index.js +3 -0
  88. package/dist/autocrat/v0.4/types/index.js.map +1 -0
  89. package/dist/autocrat/v0.5/AutocratClient.d.ts +325 -0
  90. package/dist/autocrat/v0.5/AutocratClient.js +322 -0
  91. package/dist/autocrat/v0.5/AutocratClient.js.map +1 -0
  92. package/dist/autocrat/v0.5/index.d.ts +3 -0
  93. package/dist/autocrat/v0.5/index.js +4 -0
  94. package/dist/autocrat/v0.5/index.js.map +1 -0
  95. package/dist/autocrat/v0.5/pda.d.ts +9 -0
  96. package/dist/autocrat/v0.5/pda.js +17 -0
  97. package/dist/autocrat/v0.5/pda.js.map +1 -0
  98. package/dist/autocrat/v0.5/types/autocrat.d.ts +1061 -0
  99. package/dist/autocrat/v0.5/types/autocrat.js +1061 -0
  100. package/dist/autocrat/v0.5/types/autocrat.js.map +1 -0
  101. package/dist/autocrat/v0.5/types/index.d.ts +13 -0
  102. package/dist/autocrat/v0.5/types/index.js +3 -0
  103. package/dist/autocrat/v0.5/types/index.js.map +1 -0
  104. package/dist/bid_wall/index.d.ts +1 -0
  105. package/dist/bid_wall/index.js +2 -0
  106. package/dist/bid_wall/index.js.map +1 -0
  107. package/dist/bid_wall/v0.7/BidWallClient.d.ts +345 -0
  108. package/dist/bid_wall/v0.7/BidWallClient.js +132 -0
  109. package/dist/bid_wall/v0.7/BidWallClient.js.map +1 -0
  110. package/dist/bid_wall/v0.7/index.d.ts +3 -0
  111. package/dist/bid_wall/v0.7/index.js +4 -0
  112. package/dist/bid_wall/v0.7/index.js.map +1 -0
  113. package/dist/bid_wall/v0.7/pda.d.ts +8 -0
  114. package/dist/bid_wall/v0.7/pda.js +11 -0
  115. package/dist/bid_wall/v0.7/pda.js.map +1 -0
  116. package/dist/bid_wall/v0.7/types/bid_wall.d.ts +718 -0
  117. package/dist/bid_wall/v0.7/types/bid_wall.js +718 -0
  118. package/dist/bid_wall/v0.7/types/bid_wall.js.map +1 -0
  119. package/dist/bid_wall/v0.7/types/index.d.ts +10 -0
  120. package/dist/bid_wall/v0.7/types/index.js +3 -0
  121. package/dist/bid_wall/v0.7/types/index.js.map +1 -0
  122. package/dist/conditional_vault/index.d.ts +1 -0
  123. package/dist/conditional_vault/index.js +2 -0
  124. package/dist/conditional_vault/index.js.map +1 -0
  125. package/dist/conditional_vault/v0.3/ConditionalVaultClient.d.ts +281 -0
  126. package/dist/conditional_vault/v0.3/ConditionalVaultClient.js +132 -0
  127. package/dist/conditional_vault/v0.3/ConditionalVaultClient.js.map +1 -0
  128. package/dist/conditional_vault/v0.3/index.d.ts +3 -0
  129. package/dist/conditional_vault/v0.3/index.js +9 -0
  130. package/dist/conditional_vault/v0.3/index.js.map +1 -0
  131. package/dist/conditional_vault/v0.3/pda.d.ts +4 -0
  132. package/dist/conditional_vault/v0.3/pda.js +20 -0
  133. package/dist/conditional_vault/v0.3/pda.js.map +1 -0
  134. package/dist/conditional_vault/v0.3/types/conditional_vault.d.ts +448 -0
  135. package/dist/conditional_vault/v0.3/types/conditional_vault.js +448 -0
  136. package/dist/conditional_vault/v0.3/types/conditional_vault.js.map +1 -0
  137. package/dist/conditional_vault/v0.3/types/index.d.ts +4 -0
  138. package/dist/conditional_vault/v0.3/types/index.js +3 -0
  139. package/dist/conditional_vault/v0.3/types/index.js.map +1 -0
  140. package/dist/conditional_vault/v0.4/ConditionalVaultClient.d.ts +314 -0
  141. package/dist/conditional_vault/v0.4/ConditionalVaultClient.js +210 -0
  142. package/dist/conditional_vault/v0.4/ConditionalVaultClient.js.map +1 -0
  143. package/dist/conditional_vault/v0.4/index.d.ts +3 -0
  144. package/dist/conditional_vault/v0.4/index.js +4 -0
  145. package/dist/conditional_vault/v0.4/index.js.map +1 -0
  146. package/dist/conditional_vault/v0.4/pda.d.ts +12 -0
  147. package/dist/conditional_vault/v0.4/pda.js +41 -0
  148. package/dist/conditional_vault/v0.4/pda.js.map +1 -0
  149. package/dist/conditional_vault/v0.4/types/conditional_vault.d.ts +918 -0
  150. package/dist/conditional_vault/v0.4/types/conditional_vault.js +918 -0
  151. package/dist/conditional_vault/v0.4/types/conditional_vault.js.map +1 -0
  152. package/dist/conditional_vault/v0.4/types/index.d.ts +13 -0
  153. package/dist/conditional_vault/v0.4/types/index.js +3 -0
  154. package/dist/conditional_vault/v0.4/types/index.js.map +1 -0
  155. package/dist/constants.d.ts +45 -0
  156. package/dist/constants.js +56 -0
  157. package/dist/constants.js.map +1 -0
  158. package/dist/futarchy/index.d.ts +1 -0
  159. package/dist/futarchy/index.js +2 -0
  160. package/dist/futarchy/index.js.map +1 -0
  161. package/dist/futarchy/v0.6/FutarchyClient.d.ts +1235 -0
  162. package/dist/futarchy/v0.6/FutarchyClient.js +561 -0
  163. package/dist/futarchy/v0.6/FutarchyClient.js.map +1 -0
  164. package/dist/futarchy/v0.6/index.d.ts +3 -0
  165. package/dist/futarchy/v0.6/index.js +4 -0
  166. package/dist/futarchy/v0.6/index.js.map +1 -0
  167. package/dist/futarchy/v0.6/pda.d.ts +13 -0
  168. package/dist/futarchy/v0.6/pda.js +20 -0
  169. package/dist/futarchy/v0.6/pda.js.map +1 -0
  170. package/dist/futarchy/v0.6/types/futarchy.d.ts +3745 -0
  171. package/dist/futarchy/v0.6/types/futarchy.js +3745 -0
  172. package/dist/futarchy/v0.6/types/futarchy.js.map +1 -0
  173. package/dist/futarchy/v0.6/types/index.d.ts +39 -0
  174. package/dist/futarchy/v0.6/types/index.js +5 -0
  175. package/dist/futarchy/v0.6/types/index.js.map +1 -0
  176. package/dist/futarchy/v0.6/types/v0.6.0-futarchy.d.ts +2567 -0
  177. package/dist/futarchy/v0.6/types/v0.6.0-futarchy.js +2567 -0
  178. package/dist/futarchy/v0.6/types/v0.6.0-futarchy.js.map +1 -0
  179. package/dist/index.d.ts +13 -0
  180. package/dist/index.js +16 -0
  181. package/dist/index.js.map +1 -0
  182. package/dist/launchpad/index.d.ts +2 -0
  183. package/dist/launchpad/index.js +3 -0
  184. package/dist/launchpad/index.js.map +1 -0
  185. package/dist/launchpad/v0.4/LaunchpadClient.d.ts +415 -0
  186. package/dist/launchpad/v0.4/LaunchpadClient.js +200 -0
  187. package/dist/launchpad/v0.4/LaunchpadClient.js.map +1 -0
  188. package/dist/launchpad/v0.4/index.d.ts +3 -0
  189. package/dist/launchpad/v0.4/index.js +4 -0
  190. package/dist/launchpad/v0.4/index.js.map +1 -0
  191. package/dist/launchpad/v0.4/pda.d.ts +7 -0
  192. package/dist/launchpad/v0.4/pda.js +24 -0
  193. package/dist/launchpad/v0.4/pda.js.map +1 -0
  194. package/dist/launchpad/v0.4/types/index.d.ts +12 -0
  195. package/dist/launchpad/v0.4/types/index.js +3 -0
  196. package/dist/launchpad/v0.4/types/index.js.map +1 -0
  197. package/dist/launchpad/v0.4/types/launchpad.d.ts +1000 -0
  198. package/dist/launchpad/v0.4/types/launchpad.js +1000 -0
  199. package/dist/launchpad/v0.4/types/launchpad.js.map +1 -0
  200. package/dist/launchpad/v0.5/LaunchpadClient.d.ts +438 -0
  201. package/dist/launchpad/v0.5/LaunchpadClient.js +226 -0
  202. package/dist/launchpad/v0.5/LaunchpadClient.js.map +1 -0
  203. package/dist/launchpad/v0.5/index.d.ts +3 -0
  204. package/dist/launchpad/v0.5/index.js +4 -0
  205. package/dist/launchpad/v0.5/index.js.map +1 -0
  206. package/dist/launchpad/v0.5/pda.d.ts +6 -0
  207. package/dist/launchpad/v0.5/pda.js +21 -0
  208. package/dist/launchpad/v0.5/pda.js.map +1 -0
  209. package/dist/launchpad/v0.5/types/index.d.ts +12 -0
  210. package/dist/launchpad/v0.5/types/index.js +3 -0
  211. package/dist/launchpad/v0.5/types/index.js.map +1 -0
  212. package/dist/launchpad/v0.5/types/launchpad.d.ts +1062 -0
  213. package/dist/launchpad/v0.5/types/launchpad.js +1062 -0
  214. package/dist/launchpad/v0.5/types/launchpad.js.map +1 -0
  215. package/dist/launchpad/v0.6/LaunchpadClient.d.ts +541 -0
  216. package/dist/launchpad/v0.6/LaunchpadClient.js +278 -0
  217. package/dist/launchpad/v0.6/LaunchpadClient.js.map +1 -0
  218. package/dist/launchpad/v0.6/index.d.ts +3 -0
  219. package/dist/launchpad/v0.6/index.js +4 -0
  220. package/dist/launchpad/v0.6/index.js.map +1 -0
  221. package/dist/launchpad/v0.6/pda.d.ts +6 -0
  222. package/dist/launchpad/v0.6/pda.js +21 -0
  223. package/dist/launchpad/v0.6/pda.js.map +1 -0
  224. package/dist/launchpad/v0.6/types/index.d.ts +23 -0
  225. package/dist/launchpad/v0.6/types/index.js +5 -0
  226. package/dist/launchpad/v0.6/types/index.js.map +1 -0
  227. package/dist/launchpad/v0.6/types/launchpad.d.ts +1407 -0
  228. package/dist/launchpad/v0.6/types/launchpad.js +1407 -0
  229. package/dist/launchpad/v0.6/types/launchpad.js.map +1 -0
  230. package/dist/launchpad/v0.6/types/v0.6.0-launchpad.d.ts +1277 -0
  231. package/dist/launchpad/v0.6/types/v0.6.0-launchpad.js +1277 -0
  232. package/dist/launchpad/v0.6/types/v0.6.0-launchpad.js.map +1 -0
  233. package/dist/launchpad/v0.7/LaunchpadClient.d.ts +766 -0
  234. package/dist/launchpad/v0.7/LaunchpadClient.js +365 -0
  235. package/dist/launchpad/v0.7/LaunchpadClient.js.map +1 -0
  236. package/dist/launchpad/v0.7/index.d.ts +3 -0
  237. package/dist/launchpad/v0.7/index.js +4 -0
  238. package/dist/launchpad/v0.7/index.js.map +1 -0
  239. package/dist/launchpad/v0.7/pda.d.ts +4 -0
  240. package/dist/launchpad/v0.7/pda.js +12 -0
  241. package/dist/launchpad/v0.7/pda.js.map +1 -0
  242. package/dist/launchpad/v0.7/types/index.d.ts +16 -0
  243. package/dist/launchpad/v0.7/types/index.js +3 -0
  244. package/dist/launchpad/v0.7/types/index.js.map +1 -0
  245. package/dist/launchpad/v0.7/types/launchpad_v7.d.ts +2112 -0
  246. package/dist/launchpad/v0.7/types/launchpad_v7.js +2112 -0
  247. package/dist/launchpad/v0.7/types/launchpad_v7.js.map +1 -0
  248. package/dist/liquidation/index.d.ts +1 -0
  249. package/dist/liquidation/index.js +2 -0
  250. package/dist/liquidation/index.js.map +1 -0
  251. package/dist/liquidation/v0.7/LiquidationClient.d.ts +315 -0
  252. package/dist/liquidation/v0.7/LiquidationClient.js +149 -0
  253. package/dist/liquidation/v0.7/LiquidationClient.js.map +1 -0
  254. package/dist/liquidation/v0.7/index.d.ts +3 -0
  255. package/dist/liquidation/v0.7/index.js +4 -0
  256. package/dist/liquidation/v0.7/index.js.map +1 -0
  257. package/dist/liquidation/v0.7/pda.d.ts +12 -0
  258. package/dist/liquidation/v0.7/pda.js +18 -0
  259. package/dist/liquidation/v0.7/pda.js.map +1 -0
  260. package/dist/liquidation/v0.7/types/index.d.ts +5 -0
  261. package/dist/liquidation/v0.7/types/index.js +3 -0
  262. package/dist/liquidation/v0.7/types/index.js.map +1 -0
  263. package/dist/liquidation/v0.7/types/liquidation.d.ts +758 -0
  264. package/dist/liquidation/v0.7/types/liquidation.js +758 -0
  265. package/dist/liquidation/v0.7/types/liquidation.js.map +1 -0
  266. package/dist/mint_governor/index.d.ts +1 -0
  267. package/dist/mint_governor/index.js +2 -0
  268. package/dist/mint_governor/index.js.map +1 -0
  269. package/dist/mint_governor/v0.7/MintGovernorClient.d.ts +346 -0
  270. package/dist/mint_governor/v0.7/MintGovernorClient.js +114 -0
  271. package/dist/mint_governor/v0.7/MintGovernorClient.js.map +1 -0
  272. package/dist/mint_governor/v0.7/index.d.ts +3 -0
  273. package/dist/mint_governor/v0.7/index.js +4 -0
  274. package/dist/mint_governor/v0.7/index.js.map +1 -0
  275. package/dist/mint_governor/v0.7/pda.d.ts +11 -0
  276. package/dist/mint_governor/v0.7/pda.js +13 -0
  277. package/dist/mint_governor/v0.7/pda.js.map +1 -0
  278. package/dist/mint_governor/v0.7/types/index.d.ts +14 -0
  279. package/dist/mint_governor/v0.7/types/index.js +3 -0
  280. package/dist/mint_governor/v0.7/types/index.js.map +1 -0
  281. package/dist/mint_governor/v0.7/types/mint_governor.d.ts +737 -0
  282. package/dist/mint_governor/v0.7/types/mint_governor.js +737 -0
  283. package/dist/mint_governor/v0.7/types/mint_governor.js.map +1 -0
  284. package/dist/pda.d.ts +3 -0
  285. package/dist/pda.js +14 -0
  286. package/dist/pda.js.map +1 -0
  287. package/dist/performance_package_v2/index.d.ts +1 -0
  288. package/dist/performance_package_v2/index.js +2 -0
  289. package/dist/performance_package_v2/index.js.map +1 -0
  290. package/dist/performance_package_v2/v0.7/PerformancePackageV2Client.d.ts +323 -0
  291. package/dist/performance_package_v2/v0.7/PerformancePackageV2Client.js +140 -0
  292. package/dist/performance_package_v2/v0.7/PerformancePackageV2Client.js.map +1 -0
  293. package/dist/performance_package_v2/v0.7/index.d.ts +3 -0
  294. package/dist/performance_package_v2/v0.7/index.js +4 -0
  295. package/dist/performance_package_v2/v0.7/index.js.map +1 -0
  296. package/dist/performance_package_v2/v0.7/pda.d.ts +11 -0
  297. package/dist/performance_package_v2/v0.7/pda.js +14 -0
  298. package/dist/performance_package_v2/v0.7/pda.js.map +1 -0
  299. package/dist/performance_package_v2/v0.7/types/index.d.ts +9 -0
  300. package/dist/performance_package_v2/v0.7/types/index.js +3 -0
  301. package/dist/performance_package_v2/v0.7/types/index.js.map +1 -0
  302. package/dist/performance_package_v2/v0.7/types/performance_package_v2.d.ts +1070 -0
  303. package/dist/performance_package_v2/v0.7/types/performance_package_v2.js +1070 -0
  304. package/dist/performance_package_v2/v0.7/types/performance_package_v2.js.map +1 -0
  305. package/dist/priceMath.d.ts +30 -0
  306. package/dist/priceMath.js +115 -0
  307. package/dist/priceMath.js.map +1 -0
  308. package/dist/price_based_performance_package/index.d.ts +1 -0
  309. package/dist/price_based_performance_package/index.js +2 -0
  310. package/dist/price_based_performance_package/index.js.map +1 -0
  311. package/dist/price_based_performance_package/v0.6/PriceBasedPerformancePackageClient.d.ts +362 -0
  312. package/dist/price_based_performance_package/v0.6/PriceBasedPerformancePackageClient.js +117 -0
  313. package/dist/price_based_performance_package/v0.6/PriceBasedPerformancePackageClient.js.map +1 -0
  314. package/dist/price_based_performance_package/v0.6/index.d.ts +3 -0
  315. package/dist/price_based_performance_package/v0.6/index.js +4 -0
  316. package/dist/price_based_performance_package/v0.6/index.js.map +1 -0
  317. package/dist/price_based_performance_package/v0.6/pda.d.ts +11 -0
  318. package/dist/price_based_performance_package/v0.6/pda.js +14 -0
  319. package/dist/price_based_performance_package/v0.6/pda.js.map +1 -0
  320. package/dist/price_based_performance_package/v0.6/types/index.d.ts +14 -0
  321. package/dist/price_based_performance_package/v0.6/types/index.js +3 -0
  322. package/dist/price_based_performance_package/v0.6/types/index.js.map +1 -0
  323. package/dist/price_based_performance_package/v0.6/types/price_based_performance_package.d.ts +971 -0
  324. package/dist/price_based_performance_package/v0.6/types/price_based_performance_package.js +971 -0
  325. package/dist/price_based_performance_package/v0.6/types/price_based_performance_package.js.map +1 -0
  326. package/dist/shared_liquidity_manager/index.d.ts +1 -0
  327. package/dist/shared_liquidity_manager/index.js +2 -0
  328. package/dist/shared_liquidity_manager/index.js.map +1 -0
  329. package/dist/shared_liquidity_manager/v0.5/SharedLiquidityManagerClient.d.ts +25 -0
  330. package/dist/shared_liquidity_manager/v0.5/SharedLiquidityManagerClient.js +33 -0
  331. package/dist/shared_liquidity_manager/v0.5/SharedLiquidityManagerClient.js.map +1 -0
  332. package/dist/shared_liquidity_manager/v0.5/index.d.ts +3 -0
  333. package/dist/shared_liquidity_manager/v0.5/index.js +4 -0
  334. package/dist/shared_liquidity_manager/v0.5/index.js.map +1 -0
  335. package/dist/shared_liquidity_manager/v0.5/pda.d.ts +11 -0
  336. package/dist/shared_liquidity_manager/v0.5/pda.js +54 -0
  337. package/dist/shared_liquidity_manager/v0.5/pda.js.map +1 -0
  338. package/dist/shared_liquidity_manager/v0.5/types/index.d.ts +2 -0
  339. package/dist/shared_liquidity_manager/v0.5/types/index.js +3 -0
  340. package/dist/shared_liquidity_manager/v0.5/types/index.js.map +1 -0
  341. package/dist/shared_liquidity_manager/v0.5/types/shared_liquidity_manager.d.ts +89 -0
  342. package/dist/shared_liquidity_manager/v0.5/types/shared_liquidity_manager.js +89 -0
  343. package/dist/shared_liquidity_manager/v0.5/types/shared_liquidity_manager.js.map +1 -0
  344. package/dist/utils.d.ts +7 -0
  345. package/dist/utils.js +10 -0
  346. package/dist/utils.js.map +1 -0
  347. package/package.json +90 -0
@@ -0,0 +1,832 @@
1
+ export const IDL = {
2
+ version: "0.5.0",
3
+ name: "amm",
4
+ instructions: [
5
+ {
6
+ name: "createAmm",
7
+ accounts: [
8
+ {
9
+ name: "user",
10
+ isMut: true,
11
+ isSigner: true,
12
+ },
13
+ {
14
+ name: "amm",
15
+ isMut: true,
16
+ isSigner: false,
17
+ },
18
+ {
19
+ name: "lpMint",
20
+ isMut: true,
21
+ isSigner: false,
22
+ },
23
+ {
24
+ name: "baseMint",
25
+ isMut: false,
26
+ isSigner: false,
27
+ },
28
+ {
29
+ name: "quoteMint",
30
+ isMut: false,
31
+ isSigner: false,
32
+ },
33
+ {
34
+ name: "vaultAtaBase",
35
+ isMut: true,
36
+ isSigner: false,
37
+ },
38
+ {
39
+ name: "vaultAtaQuote",
40
+ isMut: true,
41
+ isSigner: false,
42
+ },
43
+ {
44
+ name: "associatedTokenProgram",
45
+ isMut: false,
46
+ isSigner: false,
47
+ },
48
+ {
49
+ name: "tokenProgram",
50
+ isMut: false,
51
+ isSigner: false,
52
+ },
53
+ {
54
+ name: "systemProgram",
55
+ isMut: false,
56
+ isSigner: false,
57
+ },
58
+ {
59
+ name: "eventAuthority",
60
+ isMut: false,
61
+ isSigner: false,
62
+ },
63
+ {
64
+ name: "program",
65
+ isMut: false,
66
+ isSigner: false,
67
+ },
68
+ ],
69
+ args: [
70
+ {
71
+ name: "args",
72
+ type: {
73
+ defined: "CreateAmmArgs",
74
+ },
75
+ },
76
+ ],
77
+ },
78
+ {
79
+ name: "addLiquidity",
80
+ accounts: [
81
+ {
82
+ name: "user",
83
+ isMut: true,
84
+ isSigner: true,
85
+ },
86
+ {
87
+ name: "amm",
88
+ isMut: true,
89
+ isSigner: false,
90
+ },
91
+ {
92
+ name: "lpMint",
93
+ isMut: true,
94
+ isSigner: false,
95
+ },
96
+ {
97
+ name: "userLpAccount",
98
+ isMut: true,
99
+ isSigner: false,
100
+ },
101
+ {
102
+ name: "userBaseAccount",
103
+ isMut: true,
104
+ isSigner: false,
105
+ },
106
+ {
107
+ name: "userQuoteAccount",
108
+ isMut: true,
109
+ isSigner: false,
110
+ },
111
+ {
112
+ name: "vaultAtaBase",
113
+ isMut: true,
114
+ isSigner: false,
115
+ },
116
+ {
117
+ name: "vaultAtaQuote",
118
+ isMut: true,
119
+ isSigner: false,
120
+ },
121
+ {
122
+ name: "tokenProgram",
123
+ isMut: false,
124
+ isSigner: false,
125
+ },
126
+ {
127
+ name: "eventAuthority",
128
+ isMut: false,
129
+ isSigner: false,
130
+ },
131
+ {
132
+ name: "program",
133
+ isMut: false,
134
+ isSigner: false,
135
+ },
136
+ ],
137
+ args: [
138
+ {
139
+ name: "args",
140
+ type: {
141
+ defined: "AddLiquidityArgs",
142
+ },
143
+ },
144
+ ],
145
+ },
146
+ {
147
+ name: "removeLiquidity",
148
+ accounts: [
149
+ {
150
+ name: "user",
151
+ isMut: true,
152
+ isSigner: true,
153
+ },
154
+ {
155
+ name: "amm",
156
+ isMut: true,
157
+ isSigner: false,
158
+ },
159
+ {
160
+ name: "lpMint",
161
+ isMut: true,
162
+ isSigner: false,
163
+ },
164
+ {
165
+ name: "userLpAccount",
166
+ isMut: true,
167
+ isSigner: false,
168
+ },
169
+ {
170
+ name: "userBaseAccount",
171
+ isMut: true,
172
+ isSigner: false,
173
+ },
174
+ {
175
+ name: "userQuoteAccount",
176
+ isMut: true,
177
+ isSigner: false,
178
+ },
179
+ {
180
+ name: "vaultAtaBase",
181
+ isMut: true,
182
+ isSigner: false,
183
+ },
184
+ {
185
+ name: "vaultAtaQuote",
186
+ isMut: true,
187
+ isSigner: false,
188
+ },
189
+ {
190
+ name: "tokenProgram",
191
+ isMut: false,
192
+ isSigner: false,
193
+ },
194
+ {
195
+ name: "eventAuthority",
196
+ isMut: false,
197
+ isSigner: false,
198
+ },
199
+ {
200
+ name: "program",
201
+ isMut: false,
202
+ isSigner: false,
203
+ },
204
+ ],
205
+ args: [
206
+ {
207
+ name: "args",
208
+ type: {
209
+ defined: "RemoveLiquidityArgs",
210
+ },
211
+ },
212
+ ],
213
+ },
214
+ {
215
+ name: "swap",
216
+ accounts: [
217
+ {
218
+ name: "user",
219
+ isMut: true,
220
+ isSigner: true,
221
+ },
222
+ {
223
+ name: "amm",
224
+ isMut: true,
225
+ isSigner: false,
226
+ },
227
+ {
228
+ name: "userBaseAccount",
229
+ isMut: true,
230
+ isSigner: false,
231
+ },
232
+ {
233
+ name: "userQuoteAccount",
234
+ isMut: true,
235
+ isSigner: false,
236
+ },
237
+ {
238
+ name: "vaultAtaBase",
239
+ isMut: true,
240
+ isSigner: false,
241
+ },
242
+ {
243
+ name: "vaultAtaQuote",
244
+ isMut: true,
245
+ isSigner: false,
246
+ },
247
+ {
248
+ name: "tokenProgram",
249
+ isMut: false,
250
+ isSigner: false,
251
+ },
252
+ {
253
+ name: "eventAuthority",
254
+ isMut: false,
255
+ isSigner: false,
256
+ },
257
+ {
258
+ name: "program",
259
+ isMut: false,
260
+ isSigner: false,
261
+ },
262
+ ],
263
+ args: [
264
+ {
265
+ name: "args",
266
+ type: {
267
+ defined: "SwapArgs",
268
+ },
269
+ },
270
+ ],
271
+ },
272
+ {
273
+ name: "crankThatTwap",
274
+ accounts: [
275
+ {
276
+ name: "amm",
277
+ isMut: true,
278
+ isSigner: false,
279
+ },
280
+ {
281
+ name: "eventAuthority",
282
+ isMut: false,
283
+ isSigner: false,
284
+ },
285
+ {
286
+ name: "program",
287
+ isMut: false,
288
+ isSigner: false,
289
+ },
290
+ ],
291
+ args: [],
292
+ },
293
+ ],
294
+ accounts: [
295
+ {
296
+ name: "amm",
297
+ type: {
298
+ kind: "struct",
299
+ fields: [
300
+ {
301
+ name: "bump",
302
+ type: "u8",
303
+ },
304
+ {
305
+ name: "createdAtSlot",
306
+ type: "u64",
307
+ },
308
+ {
309
+ name: "lpMint",
310
+ type: "publicKey",
311
+ },
312
+ {
313
+ name: "baseMint",
314
+ type: "publicKey",
315
+ },
316
+ {
317
+ name: "quoteMint",
318
+ type: "publicKey",
319
+ },
320
+ {
321
+ name: "baseMintDecimals",
322
+ type: "u8",
323
+ },
324
+ {
325
+ name: "quoteMintDecimals",
326
+ type: "u8",
327
+ },
328
+ {
329
+ name: "baseAmount",
330
+ type: "u64",
331
+ },
332
+ {
333
+ name: "quoteAmount",
334
+ type: "u64",
335
+ },
336
+ {
337
+ name: "oracle",
338
+ type: {
339
+ defined: "TwapOracle",
340
+ },
341
+ },
342
+ {
343
+ name: "seqNum",
344
+ type: "u64",
345
+ },
346
+ {
347
+ name: "vaultAtaBase",
348
+ type: "publicKey",
349
+ },
350
+ {
351
+ name: "vaultAtaQuote",
352
+ type: "publicKey",
353
+ },
354
+ ],
355
+ },
356
+ },
357
+ ],
358
+ types: [
359
+ {
360
+ name: "CommonFields",
361
+ type: {
362
+ kind: "struct",
363
+ fields: [
364
+ {
365
+ name: "slot",
366
+ type: "u64",
367
+ },
368
+ {
369
+ name: "unixTimestamp",
370
+ type: "i64",
371
+ },
372
+ {
373
+ name: "user",
374
+ type: "publicKey",
375
+ },
376
+ {
377
+ name: "amm",
378
+ type: "publicKey",
379
+ },
380
+ {
381
+ name: "postBaseReserves",
382
+ type: "u64",
383
+ },
384
+ {
385
+ name: "postQuoteReserves",
386
+ type: "u64",
387
+ },
388
+ {
389
+ name: "oracleLastPrice",
390
+ type: "u128",
391
+ },
392
+ {
393
+ name: "oracleLastObservation",
394
+ type: "u128",
395
+ },
396
+ {
397
+ name: "oracleAggregator",
398
+ type: "u128",
399
+ },
400
+ {
401
+ name: "seqNum",
402
+ type: "u64",
403
+ },
404
+ ],
405
+ },
406
+ },
407
+ {
408
+ name: "AddLiquidityArgs",
409
+ type: {
410
+ kind: "struct",
411
+ fields: [
412
+ {
413
+ name: "quoteAmount",
414
+ docs: ["How much quote token you will deposit to the pool"],
415
+ type: "u64",
416
+ },
417
+ {
418
+ name: "maxBaseAmount",
419
+ docs: ["The maximum base token you will deposit to the pool"],
420
+ type: "u64",
421
+ },
422
+ {
423
+ name: "minLpTokens",
424
+ docs: ["The minimum LP token you will get back"],
425
+ type: "u64",
426
+ },
427
+ ],
428
+ },
429
+ },
430
+ {
431
+ name: "CreateAmmArgs",
432
+ type: {
433
+ kind: "struct",
434
+ fields: [
435
+ {
436
+ name: "twapInitialObservation",
437
+ type: "u128",
438
+ },
439
+ {
440
+ name: "twapMaxObservationChangePerUpdate",
441
+ type: "u128",
442
+ },
443
+ {
444
+ name: "twapStartDelaySlots",
445
+ type: "u64",
446
+ },
447
+ ],
448
+ },
449
+ },
450
+ {
451
+ name: "RemoveLiquidityArgs",
452
+ type: {
453
+ kind: "struct",
454
+ fields: [
455
+ {
456
+ name: "lpTokensToBurn",
457
+ type: "u64",
458
+ },
459
+ {
460
+ name: "minQuoteAmount",
461
+ type: "u64",
462
+ },
463
+ {
464
+ name: "minBaseAmount",
465
+ type: "u64",
466
+ },
467
+ ],
468
+ },
469
+ },
470
+ {
471
+ name: "SwapArgs",
472
+ type: {
473
+ kind: "struct",
474
+ fields: [
475
+ {
476
+ name: "swapType",
477
+ type: {
478
+ defined: "SwapType",
479
+ },
480
+ },
481
+ {
482
+ name: "inputAmount",
483
+ type: "u64",
484
+ },
485
+ {
486
+ name: "outputAmountMin",
487
+ type: "u64",
488
+ },
489
+ ],
490
+ },
491
+ },
492
+ {
493
+ name: "TwapOracle",
494
+ type: {
495
+ kind: "struct",
496
+ fields: [
497
+ {
498
+ name: "lastUpdatedSlot",
499
+ type: "u64",
500
+ },
501
+ {
502
+ name: "lastPrice",
503
+ docs: [
504
+ "A price is the number of quote units per base unit multiplied by 1e12.",
505
+ "You cannot simply divide by 1e12 to get a price you can display in the UI",
506
+ "because the base and quote decimals may be different. Instead, do:",
507
+ "ui_price = (price * (10**(base_decimals - quote_decimals))) / 1e12",
508
+ ],
509
+ type: "u128",
510
+ },
511
+ {
512
+ name: "lastObservation",
513
+ docs: [
514
+ "If we did a raw TWAP over prices, someone could push the TWAP heavily with",
515
+ "a few extremely large outliers. So we use observations, which can only move",
516
+ "by `max_observation_change_per_update` per update.",
517
+ ],
518
+ type: "u128",
519
+ },
520
+ {
521
+ name: "aggregator",
522
+ docs: [
523
+ "Running sum of slots_per_last_update * last_observation.",
524
+ "",
525
+ "Assuming latest observations are as big as possible (u64::MAX * 1e12),",
526
+ "we can store 18 million slots worth of observations, which turns out to",
527
+ "be ~85 days worth of slots.",
528
+ "",
529
+ "Assuming that latest observations are 100x smaller than they could theoretically",
530
+ "be, we can store 8500 days (23 years) worth of them. Even this is a very",
531
+ "very conservative assumption - META/USDC prices should be between 1e9 and",
532
+ "1e15, which would overflow after 1e15 years worth of slots.",
533
+ "",
534
+ "So in the case of an overflow, the aggregator rolls back to 0. It's the",
535
+ "client's responsibility to sanity check the assets or to handle an",
536
+ "aggregator at T2 being smaller than an aggregator at T1.",
537
+ ],
538
+ type: "u128",
539
+ },
540
+ {
541
+ name: "maxObservationChangePerUpdate",
542
+ docs: ["The most that an observation can change per update."],
543
+ type: "u128",
544
+ },
545
+ {
546
+ name: "initialObservation",
547
+ docs: ["What the initial `latest_observation` is set to."],
548
+ type: "u128",
549
+ },
550
+ {
551
+ name: "startDelaySlots",
552
+ docs: [
553
+ "Number of slots after amm.created_at_slot to start recording TWAP",
554
+ ],
555
+ type: "u64",
556
+ },
557
+ ],
558
+ },
559
+ },
560
+ {
561
+ name: "SwapType",
562
+ type: {
563
+ kind: "enum",
564
+ variants: [
565
+ {
566
+ name: "Buy",
567
+ },
568
+ {
569
+ name: "Sell",
570
+ },
571
+ ],
572
+ },
573
+ },
574
+ ],
575
+ events: [
576
+ {
577
+ name: "SwapEvent",
578
+ fields: [
579
+ {
580
+ name: "common",
581
+ type: {
582
+ defined: "CommonFields",
583
+ },
584
+ index: false,
585
+ },
586
+ {
587
+ name: "inputAmount",
588
+ type: "u64",
589
+ index: false,
590
+ },
591
+ {
592
+ name: "outputAmount",
593
+ type: "u64",
594
+ index: false,
595
+ },
596
+ {
597
+ name: "swapType",
598
+ type: {
599
+ defined: "SwapType",
600
+ },
601
+ index: false,
602
+ },
603
+ ],
604
+ },
605
+ {
606
+ name: "AddLiquidityEvent",
607
+ fields: [
608
+ {
609
+ name: "common",
610
+ type: {
611
+ defined: "CommonFields",
612
+ },
613
+ index: false,
614
+ },
615
+ {
616
+ name: "quoteAmount",
617
+ type: "u64",
618
+ index: false,
619
+ },
620
+ {
621
+ name: "maxBaseAmount",
622
+ type: "u64",
623
+ index: false,
624
+ },
625
+ {
626
+ name: "minLpTokens",
627
+ type: "u64",
628
+ index: false,
629
+ },
630
+ {
631
+ name: "baseAmount",
632
+ type: "u64",
633
+ index: false,
634
+ },
635
+ {
636
+ name: "lpTokensMinted",
637
+ type: "u64",
638
+ index: false,
639
+ },
640
+ ],
641
+ },
642
+ {
643
+ name: "RemoveLiquidityEvent",
644
+ fields: [
645
+ {
646
+ name: "common",
647
+ type: {
648
+ defined: "CommonFields",
649
+ },
650
+ index: false,
651
+ },
652
+ {
653
+ name: "lpTokensBurned",
654
+ type: "u64",
655
+ index: false,
656
+ },
657
+ {
658
+ name: "minQuoteAmount",
659
+ type: "u64",
660
+ index: false,
661
+ },
662
+ {
663
+ name: "minBaseAmount",
664
+ type: "u64",
665
+ index: false,
666
+ },
667
+ {
668
+ name: "baseAmount",
669
+ type: "u64",
670
+ index: false,
671
+ },
672
+ {
673
+ name: "quoteAmount",
674
+ type: "u64",
675
+ index: false,
676
+ },
677
+ ],
678
+ },
679
+ {
680
+ name: "CreateAmmEvent",
681
+ fields: [
682
+ {
683
+ name: "common",
684
+ type: {
685
+ defined: "CommonFields",
686
+ },
687
+ index: false,
688
+ },
689
+ {
690
+ name: "twapInitialObservation",
691
+ type: "u128",
692
+ index: false,
693
+ },
694
+ {
695
+ name: "twapMaxObservationChangePerUpdate",
696
+ type: "u128",
697
+ index: false,
698
+ },
699
+ {
700
+ name: "lpMint",
701
+ type: "publicKey",
702
+ index: false,
703
+ },
704
+ {
705
+ name: "baseMint",
706
+ type: "publicKey",
707
+ index: false,
708
+ },
709
+ {
710
+ name: "quoteMint",
711
+ type: "publicKey",
712
+ index: false,
713
+ },
714
+ {
715
+ name: "vaultAtaBase",
716
+ type: "publicKey",
717
+ index: false,
718
+ },
719
+ {
720
+ name: "vaultAtaQuote",
721
+ type: "publicKey",
722
+ index: false,
723
+ },
724
+ ],
725
+ },
726
+ {
727
+ name: "CrankThatTwapEvent",
728
+ fields: [
729
+ {
730
+ name: "common",
731
+ type: {
732
+ defined: "CommonFields",
733
+ },
734
+ index: false,
735
+ },
736
+ ],
737
+ },
738
+ ],
739
+ errors: [
740
+ {
741
+ code: 6000,
742
+ name: "AssertFailed",
743
+ msg: "An assertion failed",
744
+ },
745
+ {
746
+ code: 6001,
747
+ name: "NoSlotsPassed",
748
+ msg: "Can't get a TWAP before some observations have been stored",
749
+ },
750
+ {
751
+ code: 6002,
752
+ name: "NoReserves",
753
+ msg: "Can't swap through a pool without token reserves on either side",
754
+ },
755
+ {
756
+ code: 6003,
757
+ name: "InputAmountOverflow",
758
+ msg: "Input token amount is too large for a swap, causes overflow",
759
+ },
760
+ {
761
+ code: 6004,
762
+ name: "AddLiquidityCalculationError",
763
+ msg: "Add liquidity calculation error",
764
+ },
765
+ {
766
+ code: 6005,
767
+ name: "DecimalScaleError",
768
+ msg: "Error in decimal scale conversion",
769
+ },
770
+ {
771
+ code: 6006,
772
+ name: "SameTokenMints",
773
+ msg: "You can't create an AMM pool where the token mints are the same",
774
+ },
775
+ {
776
+ code: 6007,
777
+ name: "SwapSlippageExceeded",
778
+ msg: "A user wouldn't have gotten back their `output_amount_min`, reverting",
779
+ },
780
+ {
781
+ code: 6008,
782
+ name: "InsufficientBalance",
783
+ msg: "The user had insufficient balance to do this",
784
+ },
785
+ {
786
+ code: 6009,
787
+ name: "ZeroLiquidityRemove",
788
+ msg: "Must remove a non-zero amount of liquidity",
789
+ },
790
+ {
791
+ code: 6010,
792
+ name: "ZeroLiquidityToAdd",
793
+ msg: "Cannot add liquidity with 0 tokens on either side",
794
+ },
795
+ {
796
+ code: 6011,
797
+ name: "ZeroMinLpTokens",
798
+ msg: "Must specify a non-zero `min_lp_tokens` when adding to an existing pool",
799
+ },
800
+ {
801
+ code: 6012,
802
+ name: "AddLiquiditySlippageExceeded",
803
+ msg: "LP wouldn't have gotten back `lp_token_min`",
804
+ },
805
+ {
806
+ code: 6013,
807
+ name: "AddLiquidityMaxBaseExceeded",
808
+ msg: "LP would have spent more than `max_base_amount`",
809
+ },
810
+ {
811
+ code: 6014,
812
+ name: "InsufficientQuoteAmount",
813
+ msg: "`quote_amount` must be greater than 100000000 when initializing a pool",
814
+ },
815
+ {
816
+ code: 6015,
817
+ name: "ZeroSwapAmount",
818
+ msg: "Users must swap a non-zero amount",
819
+ },
820
+ {
821
+ code: 6016,
822
+ name: "ConstantProductInvariantFailed",
823
+ msg: "K should always be increasing",
824
+ },
825
+ {
826
+ code: 6017,
827
+ name: "CastingOverflow",
828
+ msg: "Casting has caused an overflow",
829
+ },
830
+ ],
831
+ };
832
+ //# sourceMappingURL=amm.js.map