@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,824 @@
1
+ export const IDL = {
2
+ version: "0.4.1",
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
+ },
348
+ },
349
+ ],
350
+ types: [
351
+ {
352
+ name: "CommonFields",
353
+ type: {
354
+ kind: "struct",
355
+ fields: [
356
+ {
357
+ name: "slot",
358
+ type: "u64",
359
+ },
360
+ {
361
+ name: "unixTimestamp",
362
+ type: "i64",
363
+ },
364
+ {
365
+ name: "user",
366
+ type: "publicKey",
367
+ },
368
+ {
369
+ name: "amm",
370
+ type: "publicKey",
371
+ },
372
+ {
373
+ name: "postBaseReserves",
374
+ type: "u64",
375
+ },
376
+ {
377
+ name: "postQuoteReserves",
378
+ type: "u64",
379
+ },
380
+ {
381
+ name: "oracleLastPrice",
382
+ type: "u128",
383
+ },
384
+ {
385
+ name: "oracleLastObservation",
386
+ type: "u128",
387
+ },
388
+ {
389
+ name: "oracleAggregator",
390
+ type: "u128",
391
+ },
392
+ {
393
+ name: "seqNum",
394
+ type: "u64",
395
+ },
396
+ ],
397
+ },
398
+ },
399
+ {
400
+ name: "AddLiquidityArgs",
401
+ type: {
402
+ kind: "struct",
403
+ fields: [
404
+ {
405
+ name: "quoteAmount",
406
+ docs: ["How much quote token you will deposit to the pool"],
407
+ type: "u64",
408
+ },
409
+ {
410
+ name: "maxBaseAmount",
411
+ docs: ["The maximum base token you will deposit to the pool"],
412
+ type: "u64",
413
+ },
414
+ {
415
+ name: "minLpTokens",
416
+ docs: ["The minimum LP token you will get back"],
417
+ type: "u64",
418
+ },
419
+ ],
420
+ },
421
+ },
422
+ {
423
+ name: "CreateAmmArgs",
424
+ type: {
425
+ kind: "struct",
426
+ fields: [
427
+ {
428
+ name: "twapInitialObservation",
429
+ type: "u128",
430
+ },
431
+ {
432
+ name: "twapMaxObservationChangePerUpdate",
433
+ type: "u128",
434
+ },
435
+ {
436
+ name: "twapStartDelaySlots",
437
+ type: "u64",
438
+ },
439
+ ],
440
+ },
441
+ },
442
+ {
443
+ name: "RemoveLiquidityArgs",
444
+ type: {
445
+ kind: "struct",
446
+ fields: [
447
+ {
448
+ name: "lpTokensToBurn",
449
+ type: "u64",
450
+ },
451
+ {
452
+ name: "minQuoteAmount",
453
+ type: "u64",
454
+ },
455
+ {
456
+ name: "minBaseAmount",
457
+ type: "u64",
458
+ },
459
+ ],
460
+ },
461
+ },
462
+ {
463
+ name: "SwapArgs",
464
+ type: {
465
+ kind: "struct",
466
+ fields: [
467
+ {
468
+ name: "swapType",
469
+ type: {
470
+ defined: "SwapType",
471
+ },
472
+ },
473
+ {
474
+ name: "inputAmount",
475
+ type: "u64",
476
+ },
477
+ {
478
+ name: "outputAmountMin",
479
+ type: "u64",
480
+ },
481
+ ],
482
+ },
483
+ },
484
+ {
485
+ name: "TwapOracle",
486
+ type: {
487
+ kind: "struct",
488
+ fields: [
489
+ {
490
+ name: "lastUpdatedSlot",
491
+ type: "u64",
492
+ },
493
+ {
494
+ name: "lastPrice",
495
+ docs: [
496
+ "A price is the number of quote units per base unit multiplied by 1e12.",
497
+ "You cannot simply divide by 1e12 to get a price you can display in the UI",
498
+ "because the base and quote decimals may be different. Instead, do:",
499
+ "ui_price = (price * (10**(base_decimals - quote_decimals))) / 1e12",
500
+ ],
501
+ type: "u128",
502
+ },
503
+ {
504
+ name: "lastObservation",
505
+ docs: [
506
+ "If we did a raw TWAP over prices, someone could push the TWAP heavily with",
507
+ "a few extremely large outliers. So we use observations, which can only move",
508
+ "by `max_observation_change_per_update` per update.",
509
+ ],
510
+ type: "u128",
511
+ },
512
+ {
513
+ name: "aggregator",
514
+ docs: [
515
+ "Running sum of slots_per_last_update * last_observation.",
516
+ "",
517
+ "Assuming latest observations are as big as possible (u64::MAX * 1e12),",
518
+ "we can store 18 million slots worth of observations, which turns out to",
519
+ "be ~85 days worth of slots.",
520
+ "",
521
+ "Assuming that latest observations are 100x smaller than they could theoretically",
522
+ "be, we can store 8500 days (23 years) worth of them. Even this is a very",
523
+ "very conservative assumption - META/USDC prices should be between 1e9 and",
524
+ "1e15, which would overflow after 1e15 years worth of slots.",
525
+ "",
526
+ "So in the case of an overflow, the aggregator rolls back to 0. It's the",
527
+ "client's responsibility to sanity check the assets or to handle an",
528
+ "aggregator at T2 being smaller than an aggregator at T1.",
529
+ ],
530
+ type: "u128",
531
+ },
532
+ {
533
+ name: "maxObservationChangePerUpdate",
534
+ docs: ["The most that an observation can change per update."],
535
+ type: "u128",
536
+ },
537
+ {
538
+ name: "initialObservation",
539
+ docs: ["What the initial `latest_observation` is set to."],
540
+ type: "u128",
541
+ },
542
+ {
543
+ name: "startDelaySlots",
544
+ docs: [
545
+ "Number of slots after amm.created_at_slot to start recording TWAP",
546
+ ],
547
+ type: "u64",
548
+ },
549
+ ],
550
+ },
551
+ },
552
+ {
553
+ name: "SwapType",
554
+ type: {
555
+ kind: "enum",
556
+ variants: [
557
+ {
558
+ name: "Buy",
559
+ },
560
+ {
561
+ name: "Sell",
562
+ },
563
+ ],
564
+ },
565
+ },
566
+ ],
567
+ events: [
568
+ {
569
+ name: "SwapEvent",
570
+ fields: [
571
+ {
572
+ name: "common",
573
+ type: {
574
+ defined: "CommonFields",
575
+ },
576
+ index: false,
577
+ },
578
+ {
579
+ name: "inputAmount",
580
+ type: "u64",
581
+ index: false,
582
+ },
583
+ {
584
+ name: "outputAmount",
585
+ type: "u64",
586
+ index: false,
587
+ },
588
+ {
589
+ name: "swapType",
590
+ type: {
591
+ defined: "SwapType",
592
+ },
593
+ index: false,
594
+ },
595
+ ],
596
+ },
597
+ {
598
+ name: "AddLiquidityEvent",
599
+ fields: [
600
+ {
601
+ name: "common",
602
+ type: {
603
+ defined: "CommonFields",
604
+ },
605
+ index: false,
606
+ },
607
+ {
608
+ name: "quoteAmount",
609
+ type: "u64",
610
+ index: false,
611
+ },
612
+ {
613
+ name: "maxBaseAmount",
614
+ type: "u64",
615
+ index: false,
616
+ },
617
+ {
618
+ name: "minLpTokens",
619
+ type: "u64",
620
+ index: false,
621
+ },
622
+ {
623
+ name: "baseAmount",
624
+ type: "u64",
625
+ index: false,
626
+ },
627
+ {
628
+ name: "lpTokensMinted",
629
+ type: "u64",
630
+ index: false,
631
+ },
632
+ ],
633
+ },
634
+ {
635
+ name: "RemoveLiquidityEvent",
636
+ fields: [
637
+ {
638
+ name: "common",
639
+ type: {
640
+ defined: "CommonFields",
641
+ },
642
+ index: false,
643
+ },
644
+ {
645
+ name: "lpTokensBurned",
646
+ type: "u64",
647
+ index: false,
648
+ },
649
+ {
650
+ name: "minQuoteAmount",
651
+ type: "u64",
652
+ index: false,
653
+ },
654
+ {
655
+ name: "minBaseAmount",
656
+ type: "u64",
657
+ index: false,
658
+ },
659
+ {
660
+ name: "baseAmount",
661
+ type: "u64",
662
+ index: false,
663
+ },
664
+ {
665
+ name: "quoteAmount",
666
+ type: "u64",
667
+ index: false,
668
+ },
669
+ ],
670
+ },
671
+ {
672
+ name: "CreateAmmEvent",
673
+ fields: [
674
+ {
675
+ name: "common",
676
+ type: {
677
+ defined: "CommonFields",
678
+ },
679
+ index: false,
680
+ },
681
+ {
682
+ name: "twapInitialObservation",
683
+ type: "u128",
684
+ index: false,
685
+ },
686
+ {
687
+ name: "twapMaxObservationChangePerUpdate",
688
+ type: "u128",
689
+ index: false,
690
+ },
691
+ {
692
+ name: "lpMint",
693
+ type: "publicKey",
694
+ index: false,
695
+ },
696
+ {
697
+ name: "baseMint",
698
+ type: "publicKey",
699
+ index: false,
700
+ },
701
+ {
702
+ name: "quoteMint",
703
+ type: "publicKey",
704
+ index: false,
705
+ },
706
+ {
707
+ name: "vaultAtaBase",
708
+ type: "publicKey",
709
+ index: false,
710
+ },
711
+ {
712
+ name: "vaultAtaQuote",
713
+ type: "publicKey",
714
+ index: false,
715
+ },
716
+ ],
717
+ },
718
+ {
719
+ name: "CrankThatTwapEvent",
720
+ fields: [
721
+ {
722
+ name: "common",
723
+ type: {
724
+ defined: "CommonFields",
725
+ },
726
+ index: false,
727
+ },
728
+ ],
729
+ },
730
+ ],
731
+ errors: [
732
+ {
733
+ code: 6000,
734
+ name: "AssertFailed",
735
+ msg: "An assertion failed",
736
+ },
737
+ {
738
+ code: 6001,
739
+ name: "NoSlotsPassed",
740
+ msg: "Can't get a TWAP before some observations have been stored",
741
+ },
742
+ {
743
+ code: 6002,
744
+ name: "NoReserves",
745
+ msg: "Can't swap through a pool without token reserves on either side",
746
+ },
747
+ {
748
+ code: 6003,
749
+ name: "InputAmountOverflow",
750
+ msg: "Input token amount is too large for a swap, causes overflow",
751
+ },
752
+ {
753
+ code: 6004,
754
+ name: "AddLiquidityCalculationError",
755
+ msg: "Add liquidity calculation error",
756
+ },
757
+ {
758
+ code: 6005,
759
+ name: "DecimalScaleError",
760
+ msg: "Error in decimal scale conversion",
761
+ },
762
+ {
763
+ code: 6006,
764
+ name: "SameTokenMints",
765
+ msg: "You can't create an AMM pool where the token mints are the same",
766
+ },
767
+ {
768
+ code: 6007,
769
+ name: "SwapSlippageExceeded",
770
+ msg: "A user wouldn't have gotten back their `output_amount_min`, reverting",
771
+ },
772
+ {
773
+ code: 6008,
774
+ name: "InsufficientBalance",
775
+ msg: "The user had insufficient balance to do this",
776
+ },
777
+ {
778
+ code: 6009,
779
+ name: "ZeroLiquidityRemove",
780
+ msg: "Must remove a non-zero amount of liquidity",
781
+ },
782
+ {
783
+ code: 6010,
784
+ name: "ZeroLiquidityToAdd",
785
+ msg: "Cannot add liquidity with 0 tokens on either side",
786
+ },
787
+ {
788
+ code: 6011,
789
+ name: "ZeroMinLpTokens",
790
+ msg: "Must specify a non-zero `min_lp_tokens` when adding to an existing pool",
791
+ },
792
+ {
793
+ code: 6012,
794
+ name: "AddLiquiditySlippageExceeded",
795
+ msg: "LP wouldn't have gotten back `lp_token_min`",
796
+ },
797
+ {
798
+ code: 6013,
799
+ name: "AddLiquidityMaxBaseExceeded",
800
+ msg: "LP would have spent more than `max_base_amount`",
801
+ },
802
+ {
803
+ code: 6014,
804
+ name: "InsufficientQuoteAmount",
805
+ msg: "`quote_amount` must be greater than 100000000 when initializing a pool",
806
+ },
807
+ {
808
+ code: 6015,
809
+ name: "ZeroSwapAmount",
810
+ msg: "Users must swap a non-zero amount",
811
+ },
812
+ {
813
+ code: 6016,
814
+ name: "ConstantProductInvariantFailed",
815
+ msg: "K should always be increasing",
816
+ },
817
+ {
818
+ code: 6017,
819
+ name: "CastingOverflow",
820
+ msg: "Casting has caused an overflow",
821
+ },
822
+ ],
823
+ };
824
+ //# sourceMappingURL=amm.js.map