aftermath-ts-sdk 0.0.162 → 0.0.163

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 (380) hide show
  1. package/dist/general/api/dynamicFieldsApiHelpers.d.ts +29 -6
  2. package/dist/general/api/dynamicFieldsApiHelpers.d.ts.map +1 -1
  3. package/dist/general/api/dynamicFieldsApiHelpers.js +31 -31
  4. package/dist/general/api/eventsApiHelpers.d.ts +23 -8
  5. package/dist/general/api/eventsApiHelpers.d.ts.map +1 -1
  6. package/dist/general/api/eventsApiHelpers.js +38 -33
  7. package/dist/general/api/inspectionsApiHelpers.js +9 -9
  8. package/dist/general/api/objectsApiHelpers.d.ts +150 -110
  9. package/dist/general/api/objectsApiHelpers.d.ts.map +1 -1
  10. package/dist/general/api/objectsApiHelpers.js +32 -27
  11. package/dist/general/api/rpcApiHelpers.js +9 -9
  12. package/dist/general/api/transactionsApiHelpers.d.ts +9 -4
  13. package/dist/general/api/transactionsApiHelpers.d.ts.map +1 -1
  14. package/dist/general/api/transactionsApiHelpers.js +28 -19
  15. package/dist/general/historicalData/historicalData.js +6 -6
  16. package/dist/general/historicalData/historicalDataApi.js +6 -6
  17. package/dist/general/historicalData/historicalDataApiInterface.d.ts +2 -1
  18. package/dist/general/historicalData/historicalDataApiInterface.d.ts.map +1 -1
  19. package/dist/general/prices/coingecko/coinGeckoApiHelpers.js +24 -24
  20. package/dist/general/prices/coingecko/coinGeckoPricesApi.js +15 -15
  21. package/dist/general/prices/placeholder/placeholderPricesApi.d.ts.map +1 -1
  22. package/dist/general/prices/placeholder/placeholderPricesApi.js +40 -33
  23. package/dist/general/prices/prices.js +6 -6
  24. package/dist/general/prices/pyth/pythPricesApi.js +12 -12
  25. package/dist/general/prices/pyth/pythPricesApiHelpers.js +12 -12
  26. package/dist/general/providers/aftermath.d.ts +4 -2
  27. package/dist/general/providers/aftermath.d.ts.map +1 -1
  28. package/dist/general/providers/aftermath.js +22 -20
  29. package/dist/general/providers/aftermathApi.d.ts +4 -2
  30. package/dist/general/providers/aftermathApi.d.ts.map +1 -1
  31. package/dist/general/providers/aftermathApi.js +34 -32
  32. package/dist/general/types/configTypes.d.ts +94 -14
  33. package/dist/general/types/configTypes.d.ts.map +1 -1
  34. package/dist/general/types/generalTypes.d.ts +12 -1
  35. package/dist/general/types/generalTypes.d.ts.map +1 -1
  36. package/dist/general/utils/caller.js +9 -9
  37. package/dist/general/utils/casting.d.ts +4 -4
  38. package/dist/general/utils/casting.d.ts.map +1 -1
  39. package/dist/general/utils/casting.js +22 -22
  40. package/dist/general/utils/helpers.js +21 -21
  41. package/dist/general/wallet/wallet.js +6 -6
  42. package/dist/general/wallet/walletApi.js +12 -12
  43. package/dist/packages/capys/capy.d.ts +4 -4
  44. package/dist/packages/capys/capy.d.ts.map +1 -1
  45. package/dist/packages/capys/capy.js +15 -15
  46. package/dist/packages/coin/api/coinApi.d.ts +18 -5
  47. package/dist/packages/coin/api/coinApi.d.ts.map +1 -1
  48. package/dist/packages/coin/api/coinApi.js +109 -15
  49. package/dist/packages/coin/coin.d.ts +4 -5
  50. package/dist/packages/coin/coin.d.ts.map +1 -1
  51. package/dist/packages/coin/coin.js +28 -28
  52. package/dist/packages/coin/coinTypes.d.ts +4 -0
  53. package/dist/packages/coin/coinTypes.d.ts.map +1 -1
  54. package/dist/packages/{referralVault/api/referralVaultApiHelpers.d.ts → external/baySwap/baySwapApi.d.ts} +49 -77
  55. package/dist/packages/external/baySwap/baySwapApi.d.ts.map +1 -0
  56. package/dist/packages/external/baySwap/baySwapApi.js +176 -0
  57. package/dist/packages/external/baySwap/baySwapTypes.d.ts +29 -0
  58. package/dist/packages/external/baySwap/baySwapTypes.d.ts.map +1 -0
  59. package/dist/packages/external/baySwap/baySwapTypes.js +15 -0
  60. package/dist/packages/external/{deepBook/deepBookApiHelper.d.ts → blueMove/blueMoveApi.d.ts} +42 -87
  61. package/dist/packages/external/blueMove/blueMoveApi.d.ts.map +1 -0
  62. package/dist/packages/external/blueMove/blueMoveApi.js +249 -0
  63. package/dist/packages/external/blueMove/blueMoveTypes.d.ts +87 -0
  64. package/dist/packages/external/blueMove/blueMoveTypes.d.ts.map +1 -0
  65. package/dist/packages/external/blueMove/blueMoveTypes.js +13 -0
  66. package/dist/packages/external/cetus/cetusApi.d.ts +240 -11
  67. package/dist/packages/external/cetus/cetusApi.d.ts.map +1 -1
  68. package/dist/packages/external/cetus/cetusApi.js +295 -28
  69. package/dist/packages/external/deepBook/deepBookApi.d.ts +406 -5
  70. package/dist/packages/external/deepBook/deepBookApi.d.ts.map +1 -1
  71. package/dist/packages/external/deepBook/deepBookApi.js +332 -35
  72. package/dist/packages/external/deepBook/deepBookTypes.d.ts +4 -6
  73. package/dist/packages/external/deepBook/deepBookTypes.d.ts.map +1 -1
  74. package/dist/packages/external/deepBook/deepBookTypes.js +2 -2
  75. package/dist/packages/{faucet/api/faucetApiHelpers.d.ts → external/interest/interestApi.d.ts} +45 -19
  76. package/dist/packages/external/interest/interestApi.d.ts.map +1 -0
  77. package/dist/packages/external/interest/interestApi.js +178 -0
  78. package/dist/packages/external/interest/interestTypes.d.ts +37 -0
  79. package/dist/packages/external/interest/interestTypes.d.ts.map +1 -0
  80. package/dist/packages/external/interest/interestTypes.js +12 -0
  81. package/dist/packages/external/kriya/kriyaApi.d.ts +148 -0
  82. package/dist/packages/external/kriya/kriyaApi.d.ts.map +1 -0
  83. package/dist/packages/external/kriya/kriyaApi.js +191 -0
  84. package/dist/packages/external/kriya/kriyaTypes.d.ts +59 -0
  85. package/dist/packages/external/kriya/kriyaTypes.d.ts.map +1 -0
  86. package/dist/packages/external/kriya/kriyaTypes.js +16 -0
  87. package/dist/packages/external/suiswap/suiswapApi.d.ts +145 -0
  88. package/dist/packages/external/suiswap/suiswapApi.d.ts.map +1 -0
  89. package/dist/packages/external/suiswap/suiswapApi.js +197 -0
  90. package/dist/packages/external/suiswap/suiswapTypes.d.ts +75 -0
  91. package/dist/packages/external/suiswap/suiswapTypes.d.ts.map +1 -0
  92. package/dist/packages/external/suiswap/suiswapTypes.js +10 -0
  93. package/dist/packages/external/turbos/turbosApi.d.ts +206 -8
  94. package/dist/packages/external/turbos/turbosApi.d.ts.map +1 -1
  95. package/dist/packages/external/turbos/turbosApi.js +471 -27
  96. package/dist/packages/farms/farmsStakedPosition.d.ts +20 -0
  97. package/dist/packages/farms/farmsStakedPosition.d.ts.map +1 -0
  98. package/dist/packages/farms/farmsStakedPosition.js +63 -0
  99. package/dist/packages/farms/farmsStakingPool.d.ts +9 -0
  100. package/dist/packages/farms/farmsStakingPool.d.ts.map +1 -0
  101. package/dist/packages/farms/farmsStakingPool.js +20 -0
  102. package/dist/packages/farms/farmsTypes.d.ts +37 -0
  103. package/dist/packages/farms/farmsTypes.d.ts.map +1 -0
  104. package/dist/packages/farms/index.d.ts +3 -0
  105. package/dist/packages/farms/index.d.ts.map +1 -0
  106. package/dist/packages/{capys → farms}/index.js +2 -3
  107. package/dist/packages/faucet/api/faucetApi.d.ts +117 -8
  108. package/dist/packages/faucet/api/faucetApi.d.ts.map +1 -1
  109. package/dist/packages/faucet/api/faucetApi.js +112 -27
  110. package/dist/packages/faucet/api/faucetApiCasting.js +3 -3
  111. package/dist/packages/faucet/faucet.js +15 -15
  112. package/dist/packages/index.d.ts +3 -1
  113. package/dist/packages/index.d.ts.map +1 -1
  114. package/dist/packages/index.js +3 -1
  115. package/dist/packages/nftAmm/api/nftAmmApi.d.ts +168 -16
  116. package/dist/packages/nftAmm/api/nftAmmApi.d.ts.map +1 -1
  117. package/dist/packages/nftAmm/api/nftAmmApi.js +227 -33
  118. package/dist/packages/nftAmm/api/nftAmmApiCasting.js +12 -12
  119. package/dist/packages/nftAmm/nftAmm.js +12 -12
  120. package/dist/packages/nftAmm/nftAmmMarket.js +15 -15
  121. package/dist/packages/perpetuals/api/perpetualsApi.d.ts +650 -0
  122. package/dist/packages/perpetuals/api/perpetualsApi.d.ts.map +1 -0
  123. package/dist/packages/perpetuals/api/perpetualsApi.js +387 -0
  124. package/dist/packages/perpetuals/api/perpetualsCasting.d.ts +22 -0
  125. package/dist/packages/perpetuals/api/perpetualsCasting.d.ts.map +1 -0
  126. package/dist/packages/perpetuals/api/perpetualsCasting.js +201 -0
  127. package/dist/packages/perpetuals/index.d.ts +4 -0
  128. package/dist/packages/perpetuals/index.d.ts.map +1 -0
  129. package/dist/{external/nojo → packages/perpetuals}/index.js +3 -5
  130. package/dist/packages/perpetuals/perpetuals.d.ts +17 -0
  131. package/dist/packages/perpetuals/perpetuals.d.ts.map +1 -0
  132. package/dist/packages/perpetuals/perpetuals.js +50 -0
  133. package/dist/packages/perpetuals/perpetualsAccount.d.ts +22 -0
  134. package/dist/packages/perpetuals/perpetualsAccount.d.ts.map +1 -0
  135. package/dist/packages/perpetuals/perpetualsAccount.js +65 -0
  136. package/dist/packages/perpetuals/perpetualsMarket.d.ts +20 -0
  137. package/dist/packages/perpetuals/perpetualsMarket.d.ts.map +1 -0
  138. package/dist/packages/perpetuals/perpetualsMarket.js +52 -0
  139. package/dist/packages/perpetuals/perpetualsTypes.d.ts +184 -0
  140. package/dist/packages/perpetuals/perpetualsTypes.d.ts.map +1 -0
  141. package/dist/packages/perpetuals/utils/comparators.d.ts +4 -0
  142. package/dist/packages/perpetuals/utils/comparators.d.ts.map +1 -0
  143. package/dist/packages/perpetuals/utils/comparators.js +25 -0
  144. package/dist/packages/perpetuals/utils/critBitTreeUtils.d.ts +7 -0
  145. package/dist/packages/perpetuals/utils/critBitTreeUtils.d.ts.map +1 -0
  146. package/dist/packages/perpetuals/utils/critBitTreeUtils.js +40 -0
  147. package/dist/packages/perpetuals/utils/helpers.d.ts +5 -0
  148. package/dist/packages/perpetuals/utils/helpers.d.ts.map +1 -0
  149. package/dist/packages/perpetuals/utils/helpers.js +9 -0
  150. package/dist/packages/perpetuals/utils/index.d.ts +4 -0
  151. package/dist/packages/perpetuals/utils/index.d.ts.map +1 -0
  152. package/dist/packages/perpetuals/utils/index.js +19 -0
  153. package/dist/packages/pools/api/poolsApi.d.ts +261 -35
  154. package/dist/packages/pools/api/poolsApi.d.ts.map +1 -1
  155. package/dist/packages/pools/api/poolsApi.js +621 -130
  156. package/dist/packages/pools/api/poolsApiCasting.d.ts.map +1 -1
  157. package/dist/packages/pools/api/poolsApiCasting.js +9 -7
  158. package/dist/packages/pools/api/poolsApiCastingTypes.d.ts +4 -1
  159. package/dist/packages/pools/api/poolsApiCastingTypes.d.ts.map +1 -1
  160. package/dist/packages/pools/pool.js +18 -18
  161. package/dist/packages/pools/pools.js +34 -34
  162. package/dist/packages/pools/poolsTypes.d.ts +6 -1
  163. package/dist/packages/pools/poolsTypes.d.ts.map +1 -1
  164. package/dist/packages/referralVault/api/referralVaultApi.d.ts +166 -4
  165. package/dist/packages/referralVault/api/referralVaultApi.d.ts.map +1 -1
  166. package/dist/packages/referralVault/api/referralVaultApi.js +80 -14
  167. package/dist/packages/referralVault/referralVault.js +9 -9
  168. package/dist/packages/router/api/routerApi.d.ts +14 -5
  169. package/dist/packages/router/api/routerApi.d.ts.map +1 -1
  170. package/dist/packages/router/api/routerApi.js +40 -25
  171. package/dist/packages/router/api/routerApiCasting.d.ts +6 -0
  172. package/dist/packages/router/api/routerApiCasting.d.ts.map +1 -0
  173. package/dist/packages/router/api/routerApiCasting.js +22 -0
  174. package/dist/packages/router/api/routerApiCastingTypes.d.ts +11 -0
  175. package/dist/packages/router/api/routerApiCastingTypes.d.ts.map +1 -0
  176. package/dist/packages/router/api/routerApiHelpers.js +30 -30
  177. package/dist/packages/router/api/routerAsyncApiHelpers.js +18 -18
  178. package/dist/packages/router/api/routerSynchronousApiHelpers.d.ts +88 -3
  179. package/dist/packages/router/api/routerSynchronousApiHelpers.d.ts.map +1 -1
  180. package/dist/packages/router/api/routerSynchronousApiHelpers.js +125 -28
  181. package/dist/packages/router/router.d.ts +2 -1
  182. package/dist/packages/router/router.d.ts.map +1 -1
  183. package/dist/packages/router/router.js +23 -15
  184. package/dist/packages/router/routerTypes.d.ts +19 -5
  185. package/dist/packages/router/routerTypes.d.ts.map +1 -1
  186. package/dist/packages/router/routerTypes.js +5 -1
  187. package/dist/packages/router/utils/async/routerAsyncApiInterface.d.ts +1 -8
  188. package/dist/packages/router/utils/async/routerAsyncApiInterface.d.ts.map +1 -1
  189. package/dist/packages/router/utils/async/routerAsyncGraph.js +15 -15
  190. package/dist/packages/router/utils/synchronous/interfaces/routerPoolInterface.d.ts +5 -2
  191. package/dist/packages/router/utils/synchronous/interfaces/routerPoolInterface.d.ts.map +1 -1
  192. package/dist/packages/router/utils/synchronous/interfaces/routerPoolInterface.js +30 -14
  193. package/dist/packages/router/utils/synchronous/routerGraph.js +36 -36
  194. package/dist/packages/router/utils/synchronous/routerPools/aftermathRouterPool.d.ts +5 -2
  195. package/dist/packages/router/utils/synchronous/routerPools/aftermathRouterPool.d.ts.map +1 -1
  196. package/dist/packages/router/utils/synchronous/routerPools/aftermathRouterPool.js +18 -16
  197. package/dist/packages/router/utils/synchronous/routerPools/baySwapRouterPool.d.ts +102 -0
  198. package/dist/packages/router/utils/synchronous/routerPools/baySwapRouterPool.d.ts.map +1 -0
  199. package/dist/packages/router/utils/synchronous/routerPools/baySwapRouterPool.js +217 -0
  200. package/dist/packages/router/utils/synchronous/routerPools/blueMoveRouterPool.d.ts +102 -0
  201. package/dist/packages/router/utils/synchronous/routerPools/blueMoveRouterPool.d.ts.map +1 -0
  202. package/dist/packages/router/utils/synchronous/routerPools/blueMoveRouterPool.js +221 -0
  203. package/dist/packages/router/utils/synchronous/routerPools/cetusRouterPool.d.ts +5 -2
  204. package/dist/packages/router/utils/synchronous/routerPools/cetusRouterPool.d.ts.map +1 -1
  205. package/dist/packages/router/utils/synchronous/routerPools/cetusRouterPool.js +11 -11
  206. package/dist/packages/router/utils/synchronous/routerPools/deepBookRouterPool.d.ts +5 -2
  207. package/dist/packages/router/utils/synchronous/routerPools/deepBookRouterPool.d.ts.map +1 -1
  208. package/dist/packages/router/utils/synchronous/routerPools/deepBookRouterPool.js +16 -16
  209. package/dist/packages/router/utils/synchronous/routerPools/interestRouterPool.d.ts +96 -0
  210. package/dist/packages/router/utils/synchronous/routerPools/interestRouterPool.d.ts.map +1 -0
  211. package/dist/packages/router/utils/synchronous/routerPools/interestRouterPool.js +174 -0
  212. package/dist/packages/router/utils/synchronous/routerPools/kriyaRouterPool.d.ts +102 -0
  213. package/dist/packages/router/utils/synchronous/routerPools/kriyaRouterPool.d.ts.map +1 -0
  214. package/dist/packages/router/utils/synchronous/routerPools/kriyaRouterPool.js +216 -0
  215. package/dist/packages/router/utils/synchronous/routerPools/{nojoRouterPool.d.ts → suiswapRouterPool.d.ts} +35 -14
  216. package/dist/packages/router/utils/synchronous/routerPools/suiswapRouterPool.d.ts.map +1 -0
  217. package/dist/packages/router/utils/synchronous/routerPools/suiswapRouterPool.js +217 -0
  218. package/dist/packages/router/utils/synchronous/routerPools/turbosRouterPool.d.ts +5 -2
  219. package/dist/packages/router/utils/synchronous/routerPools/turbosRouterPool.d.ts.map +1 -1
  220. package/dist/packages/router/utils/synchronous/routerPools/turbosRouterPool.js +11 -11
  221. package/dist/packages/staking/api/stakingApi.d.ts +173 -10
  222. package/dist/packages/staking/api/stakingApi.d.ts.map +1 -1
  223. package/dist/packages/staking/api/stakingApi.js +373 -32
  224. package/dist/packages/staking/api/stakingApiCasting.d.ts.map +1 -1
  225. package/dist/packages/staking/api/stakingApiCasting.js +6 -6
  226. package/dist/packages/staking/staking.js +18 -18
  227. package/dist/packages/sui/api/suiApi.d.ts +0 -2
  228. package/dist/packages/sui/api/suiApi.d.ts.map +1 -1
  229. package/dist/packages/sui/api/suiApi.js +9 -9
  230. package/dist/packages/sui/sui.js +9 -9
  231. package/dist/packages/suiFrens/api/suiFrensApi.d.ts +80 -0
  232. package/dist/packages/suiFrens/api/suiFrensApi.d.ts.map +1 -0
  233. package/dist/packages/suiFrens/api/suiFrensApi.js +564 -0
  234. package/dist/packages/suiFrens/api/suiFrensApiCasting.d.ts +13 -0
  235. package/dist/packages/suiFrens/api/suiFrensApiCasting.d.ts.map +1 -0
  236. package/dist/packages/suiFrens/api/suiFrensApiCasting.js +108 -0
  237. package/dist/packages/suiFrens/api/suiFrensApiCastingTypes.d.ts +51 -0
  238. package/dist/packages/suiFrens/api/suiFrensApiCastingTypes.d.ts.map +1 -0
  239. package/dist/packages/suiFrens/api/suiFrensApiCastingTypes.js +2 -0
  240. package/dist/packages/suiFrens/index.d.ts +4 -0
  241. package/dist/packages/suiFrens/index.d.ts.map +1 -0
  242. package/dist/packages/suiFrens/index.js +19 -0
  243. package/dist/packages/suiFrens/stakedSuiFrenReceipt.d.ts +13 -0
  244. package/dist/packages/suiFrens/stakedSuiFrenReceipt.d.ts.map +1 -0
  245. package/dist/packages/{capys/stakedCapyReceipt.js → suiFrens/stakedSuiFrenReceipt.js} +21 -21
  246. package/dist/packages/suiFrens/suiFren.d.ts +10 -0
  247. package/dist/packages/suiFrens/suiFren.d.ts.map +1 -0
  248. package/dist/packages/suiFrens/suiFren.js +39 -0
  249. package/dist/packages/suiFrens/suiFrens.d.ts +32 -0
  250. package/dist/packages/suiFrens/suiFrens.d.ts.map +1 -0
  251. package/dist/packages/suiFrens/suiFrens.js +143 -0
  252. package/dist/packages/suiFrens/suiFrensTypes.d.ts +89 -0
  253. package/dist/packages/suiFrens/suiFrensTypes.d.ts.map +1 -0
  254. package/dist/packages/suiFrens/suiFrensTypes.js +2 -0
  255. package/dist/types.d.ts +3 -2
  256. package/dist/types.d.ts.map +1 -1
  257. package/dist/types.js +4 -2
  258. package/package.json +12 -5
  259. package/dist/external/nojo/amm/index.d.ts +0 -2
  260. package/dist/external/nojo/amm/index.d.ts.map +0 -1
  261. package/dist/external/nojo/amm/index.js +0 -4
  262. package/dist/external/nojo/amm/init.d.ts +0 -3
  263. package/dist/external/nojo/amm/init.d.ts.map +0 -1
  264. package/dist/external/nojo/amm/init.js +0 -31
  265. package/dist/external/nojo/amm/pool/errors.d.ts +0 -41
  266. package/dist/external/nojo/amm/pool/errors.d.ts.map +0 -1
  267. package/dist/external/nojo/amm/pool/errors.js +0 -75
  268. package/dist/external/nojo/amm/pool/functions.d.ts +0 -356
  269. package/dist/external/nojo/amm/pool/functions.d.ts.map +0 -1
  270. package/dist/external/nojo/amm/pool/functions.js +0 -173
  271. package/dist/external/nojo/amm/pool/structs.d.ts +0 -94
  272. package/dist/external/nojo/amm/pool/structs.d.ts.map +0 -1
  273. package/dist/external/nojo/amm/pool/structs.js +0 -278
  274. package/dist/external/nojo/amm/util/functions.d.ts +0 -359
  275. package/dist/external/nojo/amm/util/functions.d.ts.map +0 -1
  276. package/dist/external/nojo/amm/util/functions.js +0 -198
  277. package/dist/external/nojo/framework/balance.d.ts +0 -19
  278. package/dist/external/nojo/framework/balance.d.ts.map +0 -1
  279. package/dist/external/nojo/framework/balance.js +0 -44
  280. package/dist/external/nojo/framework/bcs.d.ts +0 -3
  281. package/dist/external/nojo/framework/bcs.d.ts.map +0 -1
  282. package/dist/external/nojo/framework/bcs.js +0 -5
  283. package/dist/external/nojo/framework/coin.d.ts +0 -42
  284. package/dist/external/nojo/framework/coin.d.ts.map +0 -1
  285. package/dist/external/nojo/framework/coin.js +0 -144
  286. package/dist/external/nojo/framework/dynamic-field.d.ts +0 -25
  287. package/dist/external/nojo/framework/dynamic-field.d.ts.map +0 -1
  288. package/dist/external/nojo/framework/dynamic-field.js +0 -89
  289. package/dist/external/nojo/framework/init.d.ts +0 -3
  290. package/dist/external/nojo/framework/init.d.ts.map +0 -1
  291. package/dist/external/nojo/framework/init.js +0 -41
  292. package/dist/external/nojo/framework/loader.d.ts +0 -12
  293. package/dist/external/nojo/framework/loader.d.ts.map +0 -1
  294. package/dist/external/nojo/framework/loader.js +0 -103
  295. package/dist/external/nojo/framework/object.d.ts +0 -33
  296. package/dist/external/nojo/framework/object.d.ts.map +0 -1
  297. package/dist/external/nojo/framework/object.js +0 -89
  298. package/dist/external/nojo/framework/table.d.ts +0 -23
  299. package/dist/external/nojo/framework/table.d.ts.map +0 -1
  300. package/dist/external/nojo/framework/table.js +0 -83
  301. package/dist/external/nojo/framework/type-name.d.ts +0 -15
  302. package/dist/external/nojo/framework/type-name.d.ts.map +0 -1
  303. package/dist/external/nojo/framework/type-name.js +0 -34
  304. package/dist/external/nojo/framework/type.d.ts +0 -24
  305. package/dist/external/nojo/framework/type.d.ts.map +0 -1
  306. package/dist/external/nojo/framework/type.js +0 -120
  307. package/dist/external/nojo/framework/util.d.ts +0 -31
  308. package/dist/external/nojo/framework/util.d.ts.map +0 -1
  309. package/dist/external/nojo/framework/util.js +0 -49
  310. package/dist/external/nojo/index.d.ts +0 -6
  311. package/dist/external/nojo/index.d.ts.map +0 -1
  312. package/dist/external/nojo/init.d.ts +0 -2
  313. package/dist/external/nojo/init.d.ts.map +0 -1
  314. package/dist/external/nojo/init.js +0 -39
  315. package/dist/packages/capys/api/capysApi.d.ts +0 -37
  316. package/dist/packages/capys/api/capysApi.d.ts.map +0 -1
  317. package/dist/packages/capys/api/capysApi.js +0 -200
  318. package/dist/packages/capys/api/capysApiCasting.d.ts +0 -13
  319. package/dist/packages/capys/api/capysApiCasting.d.ts.map +0 -1
  320. package/dist/packages/capys/api/capysApiCasting.js +0 -108
  321. package/dist/packages/capys/api/capysApiCastingTypes.d.ts +0 -51
  322. package/dist/packages/capys/api/capysApiCastingTypes.d.ts.map +0 -1
  323. package/dist/packages/capys/api/capysApiHelpers.d.ts +0 -48
  324. package/dist/packages/capys/api/capysApiHelpers.d.ts.map +0 -1
  325. package/dist/packages/capys/api/capysApiHelpers.js +0 -386
  326. package/dist/packages/capys/capys.d.ts +0 -32
  327. package/dist/packages/capys/capys.d.ts.map +0 -1
  328. package/dist/packages/capys/capys.js +0 -151
  329. package/dist/packages/capys/capysTypes.d.ts +0 -89
  330. package/dist/packages/capys/capysTypes.d.ts.map +0 -1
  331. package/dist/packages/capys/index.d.ts +0 -4
  332. package/dist/packages/capys/index.d.ts.map +0 -1
  333. package/dist/packages/capys/stakedCapyReceipt.d.ts +0 -14
  334. package/dist/packages/capys/stakedCapyReceipt.d.ts.map +0 -1
  335. package/dist/packages/coin/api/coinApiHelpers.d.ts +0 -23
  336. package/dist/packages/coin/api/coinApiHelpers.d.ts.map +0 -1
  337. package/dist/packages/coin/api/coinApiHelpers.js +0 -203
  338. package/dist/packages/external/cetus/cetusApiHelpers.d.ts +0 -247
  339. package/dist/packages/external/cetus/cetusApiHelpers.d.ts.map +0 -1
  340. package/dist/packages/external/cetus/cetusApiHelpers.js +0 -303
  341. package/dist/packages/external/deepBook/deepBookApiHelper.d.ts.map +0 -1
  342. package/dist/packages/external/deepBook/deepBookApiHelper.js +0 -193
  343. package/dist/packages/external/nojo/nojoAmmApi.d.ts +0 -24
  344. package/dist/packages/external/nojo/nojoAmmApi.d.ts.map +0 -1
  345. package/dist/packages/external/nojo/nojoAmmApi.js +0 -86
  346. package/dist/packages/external/nojo/nojoAmmApiHelpers.d.ts +0 -14
  347. package/dist/packages/external/nojo/nojoAmmApiHelpers.d.ts.map +0 -1
  348. package/dist/packages/external/nojo/nojoAmmApiHelpers.js +0 -69
  349. package/dist/packages/external/nojo/nojoAmmTypes.d.ts +0 -9
  350. package/dist/packages/external/nojo/nojoAmmTypes.d.ts.map +0 -1
  351. package/dist/packages/external/nojo/nojoAmmTypes.js +0 -7
  352. package/dist/packages/external/turbos/turbosApiHelpers.d.ts +0 -205
  353. package/dist/packages/external/turbos/turbosApiHelpers.d.ts.map +0 -1
  354. package/dist/packages/external/turbos/turbosApiHelpers.js +0 -325
  355. package/dist/packages/faucet/api/faucetApiHelpers.d.ts.map +0 -1
  356. package/dist/packages/faucet/api/faucetApiHelpers.js +0 -90
  357. package/dist/packages/nftAmm/api/nftAmmApiHelpers.d.ts +0 -193
  358. package/dist/packages/nftAmm/api/nftAmmApiHelpers.d.ts.map +0 -1
  359. package/dist/packages/nftAmm/api/nftAmmApiHelpers.js +0 -238
  360. package/dist/packages/pools/api/poolsApiHelpers.d.ts +0 -204
  361. package/dist/packages/pools/api/poolsApiHelpers.d.ts.map +0 -1
  362. package/dist/packages/pools/api/poolsApiHelpers.js +0 -523
  363. package/dist/packages/referralVault/api/referralVaultApiHelpers.d.ts.map +0 -1
  364. package/dist/packages/referralVault/api/referralVaultApiHelpers.js +0 -86
  365. package/dist/packages/router/utils/synchronous/routerPools/nojoRouterPool.d.ts.map +0 -1
  366. package/dist/packages/router/utils/synchronous/routerPools/nojoRouterPool.js +0 -99
  367. package/dist/packages/staking/api/stakingApiHelpers.d.ts +0 -212
  368. package/dist/packages/staking/api/stakingApiHelpers.d.ts.map +0 -1
  369. package/dist/packages/staking/api/stakingApiHelpers.js +0 -400
  370. package/dist/packages/sui/api/suiApiCasting.d.ts +0 -3
  371. package/dist/packages/sui/api/suiApiCasting.d.ts.map +0 -1
  372. package/dist/packages/sui/api/suiApiCasting.js +0 -6
  373. package/dist/packages/sui/api/suiApiCastingTypes.d.ts +0 -2
  374. package/dist/packages/sui/api/suiApiCastingTypes.d.ts.map +0 -1
  375. package/dist/packages/sui/api/suiApiHelpers.d.ts +0 -6
  376. package/dist/packages/sui/api/suiApiHelpers.d.ts.map +0 -1
  377. package/dist/packages/sui/api/suiApiHelpers.js +0 -13
  378. /package/dist/packages/{capys/api/capysApiCastingTypes.js → farms/farmsTypes.js} +0 -0
  379. /package/dist/packages/{capys/capysTypes.js → perpetuals/perpetualsTypes.js} +0 -0
  380. /package/dist/packages/{sui/api/suiApiCastingTypes.js → router/api/routerApiCastingTypes.js} +0 -0
@@ -1,386 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.CapysApiHelpers = void 0;
13
- const sui_js_1 = require("@mysten/sui.js");
14
- const eventsApiHelpers_1 = require("../../../general/api/eventsApiHelpers");
15
- const capys_1 = require("../capys");
16
- const coin_1 = require("../../coin/coin");
17
- const casting_1 = require("../../../general/utils/casting");
18
- const utils_1 = require("../../../general/utils");
19
- class CapysApiHelpers {
20
- /////////////////////////////////////////////////////////////////////
21
- //// Constructor
22
- /////////////////////////////////////////////////////////////////////
23
- constructor(Provider) {
24
- this.Provider = Provider;
25
- /////////////////////////////////////////////////////////////////////
26
- //// Dev Inspects
27
- /////////////////////////////////////////////////////////////////////
28
- this.capyFeesEarnedIndividualDevInspectTransaction = (stakingReceiptId) => {
29
- const tx = new sui_js_1.TransactionBlock();
30
- tx.moveCall({
31
- target: utils_1.Helpers.transactions.createTransactionTarget(this.addresses.packages.capyVault, CapysApiHelpers.constants.capyVault.modules.capyVault
32
- .moduleName, CapysApiHelpers.constants.capyVault.modules.capyVault.functions
33
- .feesEarnedIndividual.name),
34
- typeArguments: [],
35
- arguments: [
36
- tx.object(this.addresses.objects.capyVault),
37
- tx.object(stakingReceiptId),
38
- ],
39
- });
40
- return tx;
41
- };
42
- this.capyFeesEarnedGlobalDevInspectTransaction = () => {
43
- const tx = new sui_js_1.TransactionBlock();
44
- tx.moveCall({
45
- target: utils_1.Helpers.transactions.createTransactionTarget(this.addresses.packages.capyVault, CapysApiHelpers.constants.capyVault.modules.capyVault
46
- .moduleName, CapysApiHelpers.constants.capyVault.modules.capyVault.functions
47
- .feesEarnedGlobal.name),
48
- typeArguments: [],
49
- arguments: [tx.object(this.addresses.objects.capyVault)],
50
- });
51
- return tx;
52
- };
53
- /////////////////////////////////////////////////////////////////////
54
- //// Transaction Creation
55
- /////////////////////////////////////////////////////////////////////
56
- /////////////////////////////////////////////////////////////////////
57
- //// Breeding Transaction
58
- /////////////////////////////////////////////////////////////////////
59
- this.addStakeBreedAndKeepCommandToTransaction = (tx, coinId, parentOneId, parentTwoId) => {
60
- tx.add({
61
- kind: "MoveCall",
62
- target: utils_1.Helpers.transactions.createTransactionTarget(this.addresses.packages.capyVault, CapysApiHelpers.constants.capyVault.modules.interface
63
- .moduleName, CapysApiHelpers.constants.capyVault.modules.interface.functions
64
- .breedAndKeep.name),
65
- typeArguments: [],
66
- arguments: [
67
- tx.object(this.addresses.objects.capyVault),
68
- tx.object(this.addresses.objects.capyRegistry),
69
- typeof coinId === "string" ? tx.object(coinId) : coinId,
70
- tx.object(parentOneId),
71
- tx.object(parentTwoId),
72
- ],
73
- });
74
- return tx;
75
- };
76
- this.addStakeBreedWithStakedAndKeepCommandToTransaction = (tx, coinId, parentOneId, parentTwoId) => {
77
- tx.add({
78
- kind: "MoveCall",
79
- target: utils_1.Helpers.transactions.createTransactionTarget(this.addresses.packages.capyVault, CapysApiHelpers.constants.capyVault.modules.interface
80
- .moduleName, CapysApiHelpers.constants.capyVault.modules.interface.functions
81
- .breedWithStakedAndKeep.name),
82
- typeArguments: [],
83
- arguments: [
84
- tx.object(this.addresses.objects.capyVault),
85
- tx.object(this.addresses.objects.capyRegistry),
86
- typeof coinId === "string" ? tx.object(coinId) : coinId,
87
- tx.object(parentOneId),
88
- tx.object(parentTwoId),
89
- ],
90
- });
91
- return tx;
92
- };
93
- this.addStakeBreedStakedWithStakedAndKeepCommandToTransaction = (tx, coinId, parentOneId, parentTwoId) => {
94
- tx.add({
95
- kind: "MoveCall",
96
- target: utils_1.Helpers.transactions.createTransactionTarget(this.addresses.packages.capyVault, CapysApiHelpers.constants.capyVault.modules.interface
97
- .moduleName, CapysApiHelpers.constants.capyVault.modules.interface.functions
98
- .breedStakedWithStakedAndKeep.name),
99
- typeArguments: [],
100
- arguments: [
101
- tx.object(this.addresses.objects.capyVault),
102
- tx.object(this.addresses.objects.capyRegistry),
103
- tx.object(coinId),
104
- tx.object(parentOneId),
105
- tx.object(parentTwoId),
106
- ],
107
- });
108
- return tx;
109
- };
110
- /////////////////////////////////////////////////////////////////////
111
- //// Staking Transaction
112
- /////////////////////////////////////////////////////////////////////
113
- this.capyStakeCapyTransaction = (capyId) => {
114
- const tx = new sui_js_1.TransactionBlock();
115
- tx.moveCall({
116
- target: utils_1.Helpers.transactions.createTransactionTarget(this.addresses.packages.capyVault, CapysApiHelpers.constants.capyVault.modules.interface
117
- .moduleName, CapysApiHelpers.constants.capyVault.modules.interface.functions
118
- .stakeCapy.name),
119
- typeArguments: [],
120
- arguments: [
121
- tx.object(this.addresses.objects.capyVault),
122
- tx.object(capyId),
123
- ],
124
- });
125
- return tx;
126
- };
127
- this.capyUnstakeCapyTransaction = (stakingReceiptId) => {
128
- const tx = new sui_js_1.TransactionBlock();
129
- tx.moveCall({
130
- target: utils_1.Helpers.transactions.createTransactionTarget(this.addresses.packages.capyVault, CapysApiHelpers.constants.capyVault.modules.interface
131
- .moduleName, CapysApiHelpers.constants.capyVault.modules.interface.functions
132
- .unstakeCapy.name),
133
- typeArguments: [],
134
- arguments: [
135
- tx.object(this.addresses.objects.capyVault),
136
- tx.object(stakingReceiptId),
137
- ],
138
- });
139
- return tx;
140
- };
141
- this.capyTransferTransaction = (stakingReceiptId, recipient) => {
142
- const tx = new sui_js_1.TransactionBlock();
143
- tx.moveCall({
144
- target: utils_1.Helpers.transactions.createTransactionTarget(this.addresses.packages.capyVault, CapysApiHelpers.constants.capyVault.modules.interface
145
- .moduleName, CapysApiHelpers.constants.capyVault.modules.interface.functions
146
- .transfer.name),
147
- typeArguments: [],
148
- arguments: [
149
- tx.object(this.addresses.objects.capyVault),
150
- tx.object(stakingReceiptId),
151
- tx.pure(recipient),
152
- ],
153
- });
154
- return tx;
155
- };
156
- /////////////////////////////////////////////////////////////////////
157
- //// Fee Transaction
158
- /////////////////////////////////////////////////////////////////////
159
- this.capyWithdrawFeesTransaction = (stakingReceiptId) => {
160
- const tx = new sui_js_1.TransactionBlock();
161
- tx.moveCall({
162
- target: utils_1.Helpers.transactions.createTransactionTarget(this.addresses.packages.capyVault, CapysApiHelpers.constants.capyVault.modules.interface
163
- .moduleName, CapysApiHelpers.constants.capyVault.modules.interface.functions
164
- .withdrawFees.name),
165
- typeArguments: [],
166
- arguments: [
167
- tx.object(this.addresses.objects.capyVault),
168
- tx.object(stakingReceiptId),
169
- ],
170
- });
171
- return tx;
172
- };
173
- this.capyWithdrawFeesAmountTransaction = (stakingReceiptId, amount) => {
174
- const tx = new sui_js_1.TransactionBlock();
175
- tx.moveCall({
176
- target: utils_1.Helpers.transactions.createTransactionTarget(this.addresses.packages.capyVault, CapysApiHelpers.constants.capyVault.modules.interface
177
- .moduleName, CapysApiHelpers.constants.capyVault.modules.interface.functions
178
- .withdrawFeesAmount.name),
179
- typeArguments: [],
180
- arguments: [
181
- tx.object(this.addresses.objects.capyVault),
182
- tx.object(stakingReceiptId),
183
- tx.pure(amount.toString()),
184
- ],
185
- });
186
- return tx;
187
- };
188
- /////////////////////////////////////////////////////////////////////
189
- //// Transaction Builders
190
- /////////////////////////////////////////////////////////////////////
191
- /////////////////////////////////////////////////////////////////////
192
- //// Breeding Transactions
193
- /////////////////////////////////////////////////////////////////////
194
- this.fetchCapyBuildBreedTransaction = (walletAddress, parentOneId, parentOneIsOwned, parentTwoId, parentTwoIsOwned) => __awaiter(this, void 0, void 0, function* () {
195
- if (parentOneIsOwned && parentTwoIsOwned) {
196
- // i. both capys are owned
197
- return this.fetchBuildBreedAndKeepTransaction(walletAddress, parentOneId, parentTwoId);
198
- }
199
- else if (parentOneIsOwned && !parentTwoIsOwned) {
200
- // iia. one of the Capys is owned and the other is staked
201
- return this.fetchBuildBreedWithStakedAndKeepTransaction(walletAddress, parentOneId, parentTwoId);
202
- }
203
- else if (!parentOneIsOwned && parentTwoIsOwned) {
204
- // iib. one of the Capy's is owned and the other is staked
205
- return this.fetchBuildBreedWithStakedAndKeepTransaction(walletAddress, parentTwoId, parentOneId);
206
- }
207
- else {
208
- // iii. both Capys are staked
209
- return this.fetchBuildBreedStakedWithStakedAndKeepTransaction(walletAddress, parentTwoId, parentOneId);
210
- }
211
- });
212
- this.fetchBuildBreedWithStakedAndKeepTransaction = (walletAddress, parentOneId, parentTwoId) => __awaiter(this, void 0, void 0, function* () {
213
- const tx = new sui_js_1.TransactionBlock();
214
- tx.setSender(walletAddress);
215
- const feeCoinType = capys_1.Capys.constants.breedingFees.coinType;
216
- const feeCoinAmount = capys_1.Capys.constants.breedingFees.amounts.breedWithStakedAndKeep;
217
- const coinArg = yield this.Provider.Coin().Helpers.fetchCoinWithAmountTx({
218
- tx,
219
- walletAddress,
220
- coinType: feeCoinType,
221
- coinAmount: feeCoinAmount,
222
- });
223
- const finalTx = this.addStakeBreedWithStakedAndKeepCommandToTransaction(tx, coinArg, parentOneId, parentTwoId);
224
- return finalTx;
225
- });
226
- this.fetchBuildBreedStakedWithStakedAndKeepTransaction = (walletAddress, parentOneId, parentTwoId) => __awaiter(this, void 0, void 0, function* () {
227
- const tx = new sui_js_1.TransactionBlock();
228
- tx.setSender(walletAddress);
229
- const feeCoinType = capys_1.Capys.constants.breedingFees.coinType;
230
- const feeCoinAmount = capys_1.Capys.constants.breedingFees.amounts.breedStakedWithStakedAndKeep;
231
- const coinArg = yield this.Provider.Coin().Helpers.fetchCoinWithAmountTx({
232
- tx,
233
- walletAddress,
234
- coinType: feeCoinType,
235
- coinAmount: feeCoinAmount,
236
- });
237
- const finalTx = this.addStakeBreedWithStakedAndKeepCommandToTransaction(tx, coinArg, parentOneId, parentTwoId);
238
- return finalTx;
239
- });
240
- this.fetchBuildBreedAndKeepTransaction = (walletAddress, parentOneId, parentTwoId) => __awaiter(this, void 0, void 0, function* () {
241
- const tx = new sui_js_1.TransactionBlock();
242
- tx.setSender(walletAddress);
243
- const feeCoinType = capys_1.Capys.constants.breedingFees.coinType;
244
- const feeCoinAmount = capys_1.Capys.constants.breedingFees.amounts.breedAndKeep;
245
- const coinArg = yield this.Provider.Coin().Helpers.fetchCoinWithAmountTx({
246
- tx,
247
- walletAddress,
248
- coinType: feeCoinType,
249
- coinAmount: feeCoinAmount,
250
- });
251
- const finalTx = this.addStakeBreedAndKeepCommandToTransaction(tx, coinArg, parentOneId, parentTwoId);
252
- return finalTx;
253
- });
254
- /////////////////////////////////////////////////////////////////////
255
- //// Inspections
256
- /////////////////////////////////////////////////////////////////////
257
- /////////////////////////////////////////////////////////////////////
258
- //// Staked Capy Fees
259
- /////////////////////////////////////////////////////////////////////
260
- this.fetchStakedCapyFeesEarnedIndividual = (stakingReceiptId) => __awaiter(this, void 0, void 0, function* () {
261
- const tx = this.capyFeesEarnedIndividualDevInspectTransaction(stakingReceiptId);
262
- const bytes = yield this.Provider.Inspections().fetchFirstBytesFromTxOutput(tx);
263
- return casting_1.Casting.bigIntFromBytes(bytes);
264
- });
265
- this.fetchStakedCapyFeesEarnedGlobal = () => __awaiter(this, void 0, void 0, function* () {
266
- const tx = this.capyFeesEarnedGlobalDevInspectTransaction();
267
- const bytes = yield this.Provider.Inspections().fetchFirstBytesFromTxOutput(tx);
268
- return casting_1.Casting.bigIntFromBytes(bytes);
269
- });
270
- /////////////////////////////////////////////////////////////////////
271
- //// Stats
272
- /////////////////////////////////////////////////////////////////////
273
- this.fetchCapyVaultStats = (capyVault, feeCoinDecimals, feeCoinPrice) => __awaiter(this, void 0, void 0, function* () {
274
- const globalFeesWithDecimals = coin_1.Coin.balanceWithDecimals(capyVault.globalFees, feeCoinDecimals);
275
- const globalFeesUsd = feeCoinPrice * globalFeesWithDecimals;
276
- const breedingFeesGlobal = {
277
- amount: globalFeesWithDecimals,
278
- amountUsd: globalFeesUsd,
279
- };
280
- return {
281
- bredCapys: capyVault.bredCapys,
282
- stakedCapys: capyVault.stakedCapys,
283
- breedingFeesGlobal,
284
- };
285
- });
286
- /////////////////////////////////////////////////////////////////////
287
- //// Capy Attribute Filtering
288
- /////////////////////////////////////////////////////////////////////
289
- this.filterCapysWithAttributes = (capys, attributes) => capys.filter((capy) => attributes.every((attribute) => capy.fields.attributes.some((capyAttribute) => capyAttribute.name === attribute.name &&
290
- capyAttribute.value === attribute.value)));
291
- /////////////////////////////////////////////////////////////////////
292
- //// Helpers
293
- /////////////////////////////////////////////////////////////////////
294
- this.isStakedCapyReceiptObjectType = (suiObjectInfo) => suiObjectInfo.type === this.objectTypes.stakedCapyReceiptObjectType;
295
- this.isCapyObjectType = (suiObjectInfo) => suiObjectInfo.type === this.objectTypes.capyObjectType;
296
- /////////////////////////////////////////////////////////////////////
297
- //// Private Methods
298
- /////////////////////////////////////////////////////////////////////
299
- /////////////////////////////////////////////////////////////////////
300
- //// Event Types
301
- /////////////////////////////////////////////////////////////////////
302
- this.capyBornEventType = () => eventsApiHelpers_1.EventsApiHelpers.createEventType(this.addresses.packages.capy, CapysApiHelpers.constants.capy.modules.capy.moduleName, CapysApiHelpers.constants.eventNames.capyBorn);
303
- this.breedCapysEventType = () => eventsApiHelpers_1.EventsApiHelpers.createEventType(this.addresses.packages.capyVault, CapysApiHelpers.constants.capyVault.modules.interface.moduleName, CapysApiHelpers.constants.eventNames.breedCapy);
304
- this.stakeCapyEventType = () => eventsApiHelpers_1.EventsApiHelpers.createEventType(this.addresses.packages.capyVault, CapysApiHelpers.constants.capyVault.modules.interface.moduleName, CapysApiHelpers.constants.eventNames.stakeCapy);
305
- this.unstakeCapyEventType = () => eventsApiHelpers_1.EventsApiHelpers.createEventType(this.addresses.packages.capyVault, CapysApiHelpers.constants.capyVault.modules.interface.moduleName, CapysApiHelpers.constants.eventNames.unstakeCapy);
306
- const addresses = this.Provider.addresses.capys;
307
- if (!addresses)
308
- throw new Error("not all required addresses have been set in provider");
309
- this.Provider = Provider;
310
- this.addresses = addresses;
311
- this.objectTypes = {
312
- capyObjectType: `${addresses.packages.capy}::capy::Capy`,
313
- stakedCapyReceiptObjectType: `${addresses.packages.capyVault}::capy_vault::StakingReceipt`,
314
- };
315
- this.eventTypes = {
316
- capyBorn: this.capyBornEventType(),
317
- breedCapys: this.breedCapysEventType(),
318
- stakeCapy: this.stakeCapyEventType(),
319
- unstakeCapy: this.unstakeCapyEventType(),
320
- };
321
- }
322
- }
323
- exports.CapysApiHelpers = CapysApiHelpers;
324
- /////////////////////////////////////////////////////////////////////
325
- //// Constants
326
- /////////////////////////////////////////////////////////////////////
327
- CapysApiHelpers.constants = {
328
- capy: {
329
- modules: {
330
- capy: {
331
- moduleName: "capy",
332
- },
333
- },
334
- },
335
- capyVault: {
336
- modules: {
337
- interface: {
338
- moduleName: "interface",
339
- functions: {
340
- stakeCapy: {
341
- name: "stake_capy",
342
- },
343
- unstakeCapy: {
344
- name: "unstake_capy",
345
- },
346
- withdrawFees: {
347
- name: "withdraw_fees",
348
- },
349
- withdrawFeesAmount: {
350
- name: "withdraw_fees_amount",
351
- },
352
- breedAndKeep: {
353
- name: "breed_and_keep",
354
- },
355
- breedWithStakedAndKeep: {
356
- name: "breed_with_staked_and_keep",
357
- },
358
- breedStakedWithStakedAndKeep: {
359
- name: "breed_staked_with_staked_and_keep",
360
- },
361
- transfer: {
362
- name: "transfer",
363
- },
364
- },
365
- },
366
- capyVault: {
367
- moduleName: "capy_vault",
368
- functions: {
369
- feesEarnedIndividual: {
370
- name: "fees_earned_individual",
371
- },
372
- feesEarnedGlobal: {
373
- name: "fees_earned_global",
374
- },
375
- },
376
- },
377
- },
378
- },
379
- eventNames: {
380
- capyBorn: "CapyBorn",
381
- breedCapy: "BreedCapyEvent",
382
- stakeCapy: "StakeCapyEvent",
383
- unstakeCapy: "UnstakeCapyEvent",
384
- withdrawFees: "WithdrawFeesEvent",
385
- },
386
- };
@@ -1,32 +0,0 @@
1
- import { EventId, ObjectId, SuiAddress, TransactionBlock } from "@mysten/sui.js";
2
- import { BreedCapysEvent, CapyAttribute, CapyStats, DynamicFieldObjectsWithCursor, EventsWithCursor, StakeCapyEvent, UnstakeCapyEvent } from "../../types";
3
- import { Capy } from "./capy";
4
- import { StakedCapyReceipt } from "./stakedCapyReceipt";
5
- import { Caller } from "../../general/utils/caller";
6
- export declare class Capys extends Caller {
7
- readonly network?: string | undefined;
8
- static readonly constants: {
9
- breedingFees: {
10
- coinType: string;
11
- amounts: {
12
- breedAndKeep: bigint;
13
- breedWithStakedAndKeep: bigint;
14
- breedStakedWithStakedAndKeep: bigint;
15
- };
16
- };
17
- };
18
- constructor(network?: string | undefined);
19
- getCapy(capyObjectId: ObjectId): Promise<Capy>;
20
- getCapys(capyObjectIds: ObjectId[]): Promise<Capy[]>;
21
- getOwnedCapys(walletAddress: SuiAddress): Promise<Capy[]>;
22
- getStakedCapyReceipts(walletAddress: SuiAddress): Promise<StakedCapyReceipt[]>;
23
- getStakedCapys(attributes?: CapyAttribute[], cursor?: ObjectId, limit?: number): Promise<DynamicFieldObjectsWithCursor<Capy>>;
24
- getBreedCapyEvents(cursor?: EventId, limit?: number): Promise<EventsWithCursor<BreedCapysEvent>>;
25
- getStakeCapyEvents(cursor?: EventId, limit?: number): Promise<EventsWithCursor<StakeCapyEvent>>;
26
- getUnstakeCapyEvents(cursor?: EventId, limit?: number): Promise<EventsWithCursor<UnstakeCapyEvent>>;
27
- getBreedCapysTransaction(walletAddress: SuiAddress, capyParentOneId: ObjectId, capyParentTwoId: ObjectId): Promise<TransactionBlock>;
28
- getIsPackageOnChain(): Promise<boolean>;
29
- getStats(): Promise<CapyStats>;
30
- private static createCapyAttributesQueryString;
31
- }
32
- //# sourceMappingURL=capys.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capys.d.ts","sourceRoot":"","sources":["../../../src/packages/capys/capys.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,OAAO,EACP,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAIN,eAAe,EACf,aAAa,EAEb,SAAS,EACT,6BAA6B,EAC7B,gBAAgB,EAEhB,cAAc,EAGd,gBAAgB,EAEhB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,qBAAa,KAAM,SAAQ,MAAM;aAoBJ,OAAO,CAAC;IAfpC,gBAAuB,SAAS;;;;;;;;;MAS9B;gBAM0B,OAAO,CAAC,oBAAkB;IAYzC,OAAO,CAAC,YAAY,EAAE,QAAQ;IAK9B,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE;IAQlC,aAAa,CAAC,aAAa,EAAE,UAAU;IAQvC,qBAAqB,CAAC,aAAa,EAAE,UAAU;IAuB/C,cAAc,CAC1B,UAAU,CAAC,EAAE,aAAa,EAAE,EAC5B,MAAM,CAAC,EAAE,QAAQ,EACjB,KAAK,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,6BAA6B,CAAC,IAAI,CAAC,CAAC;IAuBlC,kBAAkB,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM;IAOnD,kBAAkB,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM;IAOnD,oBAAoB,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM;IAWrD,wBAAwB,CACpC,aAAa,EAAE,UAAU,EACzB,eAAe,EAAE,QAAQ,EACzB,eAAe,EAAE,QAAQ;IAgBb,mBAAmB,IAAI,OAAO,CAAC,OAAO,CAAC;IAIvC,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC;IAY3C,OAAO,CAAC,MAAM,CAAC,+BAA+B;CAe9C"}
@@ -1,151 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.Capys = void 0;
13
- const capy_1 = require("./capy");
14
- const stakedCapyReceipt_1 = require("./stakedCapyReceipt");
15
- const caller_1 = require("../../general/utils/caller");
16
- class Capys extends caller_1.Caller {
17
- /////////////////////////////////////////////////////////////////////
18
- //// Constructor
19
- /////////////////////////////////////////////////////////////////////
20
- constructor(network) {
21
- super(network, "capys");
22
- this.network = network;
23
- }
24
- /////////////////////////////////////////////////////////////////////
25
- //// Public Methods
26
- /////////////////////////////////////////////////////////////////////
27
- /////////////////////////////////////////////////////////////////////
28
- //// Class Objects
29
- /////////////////////////////////////////////////////////////////////
30
- getCapy(capyObjectId) {
31
- return __awaiter(this, void 0, void 0, function* () {
32
- const capys = yield this.getCapys([capyObjectId]);
33
- return capys[0];
34
- });
35
- }
36
- getCapys(capyObjectIds) {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- const capys = yield this.fetchApi(`${JSON.stringify(capyObjectIds)}`);
39
- return capys.map((capy) => new capy_1.Capy(capy, this.network));
40
- });
41
- }
42
- getOwnedCapys(walletAddress) {
43
- return __awaiter(this, void 0, void 0, function* () {
44
- const ownedCapys = yield this.fetchApi(`owned-capys/${walletAddress}`);
45
- return ownedCapys.map((capy) => new capy_1.Capy(capy, this.network));
46
- });
47
- }
48
- getStakedCapyReceipts(walletAddress) {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- const stakedCapyReceipts = yield this.fetchApi(`staked-capy-receipts/${walletAddress}`);
51
- const stakedCapys = yield this.getCapys(stakedCapyReceipts.map((receipt) => receipt.capyId));
52
- return stakedCapyReceipts.map((receipt, index) => new stakedCapyReceipt_1.StakedCapyReceipt(new capy_1.Capy(stakedCapys[index].capy, this.network, true), receipt, this.network));
53
- });
54
- }
55
- /////////////////////////////////////////////////////////////////////
56
- //// Dynamic Fields
57
- /////////////////////////////////////////////////////////////////////
58
- getStakedCapys(attributes, cursor, limit) {
59
- return __awaiter(this, void 0, void 0, function* () {
60
- const capysWithCursor = yield this.fetchApi(`staked-capys${Capys.createCapyAttributesQueryString(attributes)}`, {
61
- cursor,
62
- limit,
63
- });
64
- const capys = capysWithCursor.dynamicFieldObjects.map((capy) => new capy_1.Capy(capy, this.network, true));
65
- return {
66
- dynamicFieldObjects: capys,
67
- nextCursor: capysWithCursor.nextCursor,
68
- };
69
- });
70
- }
71
- /////////////////////////////////////////////////////////////////////
72
- //// Events
73
- /////////////////////////////////////////////////////////////////////
74
- getBreedCapyEvents(cursor, limit) {
75
- return __awaiter(this, void 0, void 0, function* () {
76
- return this.fetchApiEvents("events/breed-capys", {
77
- cursor,
78
- limit,
79
- });
80
- });
81
- }
82
- getStakeCapyEvents(cursor, limit) {
83
- return __awaiter(this, void 0, void 0, function* () {
84
- return this.fetchApiEvents("events/stake-capy", {
85
- cursor,
86
- limit,
87
- });
88
- });
89
- }
90
- getUnstakeCapyEvents(cursor, limit) {
91
- return __awaiter(this, void 0, void 0, function* () {
92
- return this.fetchApiEvents("events/unstake-capy", {
93
- cursor,
94
- limit,
95
- });
96
- });
97
- }
98
- /////////////////////////////////////////////////////////////////////
99
- //// Transactions
100
- ////////////////////////////////////////////////////////////////////
101
- getBreedCapysTransaction(walletAddress, capyParentOneId, capyParentTwoId) {
102
- return __awaiter(this, void 0, void 0, function* () {
103
- return this.fetchApiTransaction("transactions/breed", {
104
- walletAddress,
105
- capyParentOneId,
106
- capyParentTwoId,
107
- });
108
- });
109
- }
110
- /////////////////////////////////////////////////////////////////////
111
- //// Inspections
112
- /////////////////////////////////////////////////////////////////////
113
- getIsPackageOnChain() {
114
- return __awaiter(this, void 0, void 0, function* () {
115
- return this.fetchApi("status");
116
- });
117
- }
118
- getStats() {
119
- return __awaiter(this, void 0, void 0, function* () {
120
- return this.fetchApi("stats");
121
- });
122
- }
123
- /////////////////////////////////////////////////////////////////////
124
- //// Private Static Methods
125
- /////////////////////////////////////////////////////////////////////
126
- /////////////////////////////////////////////////////////////////////
127
- //// Helpers
128
- /////////////////////////////////////////////////////////////////////
129
- static createCapyAttributesQueryString(attributes) {
130
- return attributes === undefined || attributes.length === 0
131
- ? ""
132
- : "?" +
133
- attributes
134
- .map((attr, i) => `${i === 0 ? "" : "&"}${attr.name}=${attr.value}`)
135
- .reduce((acc, curr) => acc + curr, "");
136
- }
137
- }
138
- exports.Capys = Capys;
139
- /////////////////////////////////////////////////////////////////////
140
- //// Constants
141
- /////////////////////////////////////////////////////////////////////
142
- Capys.constants = {
143
- breedingFees: {
144
- coinType: "0x0000000000000000000000000000000000000002::sui::SUI",
145
- amounts: {
146
- breedAndKeep: BigInt(1000000),
147
- breedWithStakedAndKeep: BigInt(5000000),
148
- breedStakedWithStakedAndKeep: BigInt(10000000), // MIST -> 0.01 SUI
149
- },
150
- },
151
- };