aftermath-ts-sdk 1.3.28 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. package/dist/index.d.ts +16828 -5
  2. package/dist/index.js +22695 -19
  3. package/dist/index.js.map +1 -0
  4. package/package.json +69 -60
  5. package/dist/general/apiHelpers/dynamicFieldsApiHelpers.d.ts +0 -41
  6. package/dist/general/apiHelpers/dynamicFieldsApiHelpers.d.ts.map +0 -1
  7. package/dist/general/apiHelpers/dynamicFieldsApiHelpers.js +0 -110
  8. package/dist/general/apiHelpers/eventsApiHelpers.d.ts +0 -43
  9. package/dist/general/apiHelpers/eventsApiHelpers.d.ts.map +0 -1
  10. package/dist/general/apiHelpers/eventsApiHelpers.js +0 -170
  11. package/dist/general/apiHelpers/inspectionsApiHelpers.d.ts +0 -28
  12. package/dist/general/apiHelpers/inspectionsApiHelpers.d.ts.map +0 -1
  13. package/dist/general/apiHelpers/inspectionsApiHelpers.js +0 -58
  14. package/dist/general/apiHelpers/objectsApiHelpers.d.ts +0 -77
  15. package/dist/general/apiHelpers/objectsApiHelpers.d.ts.map +0 -1
  16. package/dist/general/apiHelpers/objectsApiHelpers.js +0 -197
  17. package/dist/general/apiHelpers/transactionsApiHelpers.d.ts +0 -50
  18. package/dist/general/apiHelpers/transactionsApiHelpers.d.ts.map +0 -1
  19. package/dist/general/apiHelpers/transactionsApiHelpers.js +0 -256
  20. package/dist/general/dynamicGas/dynamicGas.d.ts +0 -48
  21. package/dist/general/dynamicGas/dynamicGas.d.ts.map +0 -1
  22. package/dist/general/dynamicGas/dynamicGas.js +0 -69
  23. package/dist/general/dynamicGas/dynamicGasTypes.d.ts +0 -37
  24. package/dist/general/dynamicGas/dynamicGasTypes.d.ts.map +0 -1
  25. package/dist/general/dynamicGas/dynamicGasTypes.js +0 -2
  26. package/dist/general/nfts/nftsApi.d.ts +0 -35
  27. package/dist/general/nfts/nftsApi.d.ts.map +0 -1
  28. package/dist/general/nfts/nftsApi.js +0 -124
  29. package/dist/general/nfts/nftsApiCasting.d.ts +0 -11
  30. package/dist/general/nfts/nftsApiCasting.d.ts.map +0 -1
  31. package/dist/general/nfts/nftsApiCasting.js +0 -115
  32. package/dist/general/nfts/nftsTypes.d.ts +0 -31
  33. package/dist/general/nfts/nftsTypes.d.ts.map +0 -1
  34. package/dist/general/nfts/nftsTypes.js +0 -2
  35. package/dist/general/priceFeeds/priceFeeds.d.ts +0 -3
  36. package/dist/general/priceFeeds/priceFeeds.d.ts.map +0 -1
  37. package/dist/general/priceFeeds/priceFeeds.js +0 -26
  38. package/dist/general/priceFeeds/priceFeedsApi.d.ts +0 -3
  39. package/dist/general/priceFeeds/priceFeedsApi.d.ts.map +0 -1
  40. package/dist/general/priceFeeds/priceFeedsApi.js +0 -33
  41. package/dist/general/priceFeeds/priceFeedsTypes.d.ts +0 -3
  42. package/dist/general/priceFeeds/priceFeedsTypes.d.ts.map +0 -1
  43. package/dist/general/priceFeeds/priceFeedsTypes.js +0 -7
  44. package/dist/general/prices/coinGeckoTypes.d.ts +0 -16
  45. package/dist/general/prices/coinGeckoTypes.d.ts.map +0 -1
  46. package/dist/general/prices/coinGeckoTypes.js +0 -2
  47. package/dist/general/prices/prices.d.ts +0 -92
  48. package/dist/general/prices/prices.d.ts.map +0 -1
  49. package/dist/general/prices/prices.js +0 -124
  50. package/dist/general/providers/aftermath.d.ts +0 -200
  51. package/dist/general/providers/aftermath.d.ts.map +0 -1
  52. package/dist/general/providers/aftermath.js +0 -258
  53. package/dist/general/providers/aftermathApi.d.ts +0 -197
  54. package/dist/general/providers/aftermathApi.d.ts.map +0 -1
  55. package/dist/general/providers/aftermathApi.js +0 -255
  56. package/dist/general/providers/index.d.ts +0 -3
  57. package/dist/general/providers/index.d.ts.map +0 -1
  58. package/dist/general/providers/index.js +0 -18
  59. package/dist/general/types/castingTypes.d.ts +0 -51
  60. package/dist/general/types/castingTypes.d.ts.map +0 -1
  61. package/dist/general/types/castingTypes.js +0 -8
  62. package/dist/general/types/configTypes.d.ts +0 -187
  63. package/dist/general/types/configTypes.d.ts.map +0 -1
  64. package/dist/general/types/configTypes.js +0 -2
  65. package/dist/general/types/generalTypes.d.ts +0 -349
  66. package/dist/general/types/generalTypes.d.ts.map +0 -1
  67. package/dist/general/types/generalTypes.js +0 -2
  68. package/dist/general/types/index.d.ts +0 -7
  69. package/dist/general/types/index.d.ts.map +0 -1
  70. package/dist/general/types/index.js +0 -22
  71. package/dist/general/types/moveErrorsInterface.d.ts +0 -6
  72. package/dist/general/types/moveErrorsInterface.d.ts.map +0 -1
  73. package/dist/general/types/moveErrorsInterface.js +0 -2
  74. package/dist/general/types/suiTypes.d.ts +0 -2
  75. package/dist/general/types/suiTypes.d.ts.map +0 -1
  76. package/dist/general/types/suiTypes.js +0 -5
  77. package/dist/general/utils/caller.d.ts +0 -58
  78. package/dist/general/utils/caller.d.ts.map +0 -1
  79. package/dist/general/utils/caller.js +0 -231
  80. package/dist/general/utils/casting.d.ts +0 -212
  81. package/dist/general/utils/casting.d.ts.map +0 -1
  82. package/dist/general/utils/casting.js +0 -273
  83. package/dist/general/utils/fixedUtils.d.ts +0 -109
  84. package/dist/general/utils/fixedUtils.d.ts.map +0 -1
  85. package/dist/general/utils/fixedUtils.js +0 -100
  86. package/dist/general/utils/helpers.d.ts +0 -408
  87. package/dist/general/utils/helpers.d.ts.map +0 -1
  88. package/dist/general/utils/helpers.js +0 -725
  89. package/dist/general/utils/iFixedUtils.d.ts +0 -78
  90. package/dist/general/utils/iFixedUtils.d.ts.map +0 -1
  91. package/dist/general/utils/iFixedUtils.js +0 -109
  92. package/dist/general/utils/index.d.ts +0 -3
  93. package/dist/general/utils/index.d.ts.map +0 -1
  94. package/dist/general/utils/index.js +0 -18
  95. package/dist/general/wallet/wallet.d.ts +0 -89
  96. package/dist/general/wallet/wallet.d.ts.map +0 -1
  97. package/dist/general/wallet/wallet.js +0 -120
  98. package/dist/general/wallet/walletApi.d.ts +0 -20
  99. package/dist/general/wallet/walletApi.d.ts.map +0 -1
  100. package/dist/general/wallet/walletApi.js +0 -66
  101. package/dist/index.d.ts.map +0 -1
  102. package/dist/packages/auth/auth.d.ts +0 -135
  103. package/dist/packages/auth/auth.d.ts.map +0 -1
  104. package/dist/packages/auth/auth.js +0 -289
  105. package/dist/packages/auth/authTypes.d.ts +0 -102
  106. package/dist/packages/auth/authTypes.d.ts.map +0 -1
  107. package/dist/packages/auth/authTypes.js +0 -2
  108. package/dist/packages/auth/index.d.ts +0 -2
  109. package/dist/packages/auth/index.d.ts.map +0 -1
  110. package/dist/packages/auth/index.js +0 -17
  111. package/dist/packages/coin/api/coinApi.d.ts +0 -33
  112. package/dist/packages/coin/api/coinApi.d.ts.map +0 -1
  113. package/dist/packages/coin/api/coinApi.js +0 -167
  114. package/dist/packages/coin/coin.d.ts +0 -320
  115. package/dist/packages/coin/coin.d.ts.map +0 -1
  116. package/dist/packages/coin/coin.js +0 -467
  117. package/dist/packages/coin/coinTypes.d.ts +0 -139
  118. package/dist/packages/coin/coinTypes.d.ts.map +0 -1
  119. package/dist/packages/coin/coinTypes.js +0 -2
  120. package/dist/packages/coin/index.d.ts +0 -2
  121. package/dist/packages/coin/index.d.ts.map +0 -1
  122. package/dist/packages/coin/index.js +0 -17
  123. package/dist/packages/dca/api/dcaApi.d.ts +0 -26
  124. package/dist/packages/dca/api/dcaApi.d.ts.map +0 -1
  125. package/dist/packages/dca/api/dcaApi.js +0 -60
  126. package/dist/packages/dca/dca.d.ts +0 -174
  127. package/dist/packages/dca/dca.d.ts.map +0 -1
  128. package/dist/packages/dca/dca.js +0 -230
  129. package/dist/packages/dca/dcaTypes.d.ts +0 -319
  130. package/dist/packages/dca/dcaTypes.d.ts.map +0 -1
  131. package/dist/packages/dca/dcaTypes.js +0 -2
  132. package/dist/packages/dca/index.d.ts +0 -2
  133. package/dist/packages/dca/index.d.ts.map +0 -1
  134. package/dist/packages/dca/index.js +0 -17
  135. package/dist/packages/farms/api/farmsApi.d.ts +0 -996
  136. package/dist/packages/farms/api/farmsApi.d.ts.map +0 -1
  137. package/dist/packages/farms/api/farmsApi.js +0 -1826
  138. package/dist/packages/farms/api/farmsApiCasting.d.ts +0 -39
  139. package/dist/packages/farms/api/farmsApiCasting.d.ts.map +0 -1
  140. package/dist/packages/farms/api/farmsApiCasting.js +0 -427
  141. package/dist/packages/farms/api/farmsApiCastingTypes.d.ts +0 -235
  142. package/dist/packages/farms/api/farmsApiCastingTypes.d.ts.map +0 -1
  143. package/dist/packages/farms/api/farmsApiCastingTypes.js +0 -2
  144. package/dist/packages/farms/farms.d.ts +0 -221
  145. package/dist/packages/farms/farms.d.ts.map +0 -1
  146. package/dist/packages/farms/farms.js +0 -302
  147. package/dist/packages/farms/farmsStakedPosition.d.ts +0 -229
  148. package/dist/packages/farms/farmsStakedPosition.d.ts.map +0 -1
  149. package/dist/packages/farms/farmsStakedPosition.js +0 -473
  150. package/dist/packages/farms/farmsStakingPool.d.ts +0 -285
  151. package/dist/packages/farms/farmsStakingPool.d.ts.map +0 -1
  152. package/dist/packages/farms/farmsStakingPool.js +0 -488
  153. package/dist/packages/farms/farmsTypes.d.ts +0 -571
  154. package/dist/packages/farms/farmsTypes.d.ts.map +0 -1
  155. package/dist/packages/farms/farmsTypes.js +0 -49
  156. package/dist/packages/farms/index.d.ts +0 -4
  157. package/dist/packages/farms/index.d.ts.map +0 -1
  158. package/dist/packages/farms/index.js +0 -19
  159. package/dist/packages/faucet/api/faucetApi.d.ts +0 -37
  160. package/dist/packages/faucet/api/faucetApi.d.ts.map +0 -1
  161. package/dist/packages/faucet/api/faucetApi.js +0 -145
  162. package/dist/packages/faucet/api/faucetApiCasting.d.ts +0 -7
  163. package/dist/packages/faucet/api/faucetApiCasting.d.ts.map +0 -1
  164. package/dist/packages/faucet/api/faucetApiCasting.js +0 -33
  165. package/dist/packages/faucet/api/faucetApiCastingTypes.d.ts +0 -10
  166. package/dist/packages/faucet/api/faucetApiCastingTypes.d.ts.map +0 -1
  167. package/dist/packages/faucet/api/faucetApiCastingTypes.js +0 -2
  168. package/dist/packages/faucet/faucet.d.ts +0 -16
  169. package/dist/packages/faucet/faucet.d.ts.map +0 -1
  170. package/dist/packages/faucet/faucet.js +0 -64
  171. package/dist/packages/faucet/faucetTypes.d.ts +0 -20
  172. package/dist/packages/faucet/faucetTypes.d.ts.map +0 -1
  173. package/dist/packages/faucet/faucetTypes.js +0 -2
  174. package/dist/packages/faucet/index.d.ts +0 -2
  175. package/dist/packages/faucet/index.d.ts.map +0 -1
  176. package/dist/packages/faucet/index.js +0 -17
  177. package/dist/packages/index.d.ts +0 -14
  178. package/dist/packages/index.d.ts.map +0 -1
  179. package/dist/packages/index.js +0 -29
  180. package/dist/packages/leveragedStaking/api/leveragedStakingApi.d.ts +0 -202
  181. package/dist/packages/leveragedStaking/api/leveragedStakingApi.d.ts.map +0 -1
  182. package/dist/packages/leveragedStaking/api/leveragedStakingApi.js +0 -1104
  183. package/dist/packages/leveragedStaking/api/leveragedStakingApiCasting.d.ts +0 -12
  184. package/dist/packages/leveragedStaking/api/leveragedStakingApiCasting.d.ts.map +0 -1
  185. package/dist/packages/leveragedStaking/api/leveragedStakingApiCasting.js +0 -69
  186. package/dist/packages/leveragedStaking/api/leveragedStakingApiCastingTypes.d.ts +0 -39
  187. package/dist/packages/leveragedStaking/api/leveragedStakingApiCastingTypes.d.ts.map +0 -1
  188. package/dist/packages/leveragedStaking/api/leveragedStakingApiCastingTypes.js +0 -2
  189. package/dist/packages/leveragedStaking/index.d.ts +0 -2
  190. package/dist/packages/leveragedStaking/index.d.ts.map +0 -1
  191. package/dist/packages/leveragedStaking/index.js +0 -17
  192. package/dist/packages/leveragedStaking/leveragedStaking.d.ts +0 -68
  193. package/dist/packages/leveragedStaking/leveragedStaking.d.ts.map +0 -1
  194. package/dist/packages/leveragedStaking/leveragedStaking.js +0 -154
  195. package/dist/packages/leveragedStaking/leveragedStakingTypes.d.ts +0 -48
  196. package/dist/packages/leveragedStaking/leveragedStakingTypes.d.ts.map +0 -1
  197. package/dist/packages/leveragedStaking/leveragedStakingTypes.js +0 -16
  198. package/dist/packages/limitOrders/api/limitOrdersApi.d.ts +0 -12
  199. package/dist/packages/limitOrders/api/limitOrdersApi.d.ts.map +0 -1
  200. package/dist/packages/limitOrders/api/limitOrdersApi.js +0 -25
  201. package/dist/packages/limitOrders/index.d.ts +0 -2
  202. package/dist/packages/limitOrders/index.d.ts.map +0 -1
  203. package/dist/packages/limitOrders/index.js +0 -17
  204. package/dist/packages/limitOrders/limitOrders.d.ts +0 -143
  205. package/dist/packages/limitOrders/limitOrders.d.ts.map +0 -1
  206. package/dist/packages/limitOrders/limitOrders.js +0 -190
  207. package/dist/packages/limitOrders/limitOrdersTypes.d.ts +0 -211
  208. package/dist/packages/limitOrders/limitOrdersTypes.d.ts.map +0 -1
  209. package/dist/packages/limitOrders/limitOrdersTypes.js +0 -2
  210. package/dist/packages/multisig/api/multisigApi.d.ts +0 -10
  211. package/dist/packages/multisig/api/multisigApi.d.ts.map +0 -1
  212. package/dist/packages/multisig/api/multisigApi.js +0 -39
  213. package/dist/packages/multisig/index.d.ts +0 -2
  214. package/dist/packages/multisig/index.d.ts.map +0 -1
  215. package/dist/packages/multisig/index.js +0 -17
  216. package/dist/packages/multisig/multisig.d.ts +0 -46
  217. package/dist/packages/multisig/multisig.d.ts.map +0 -1
  218. package/dist/packages/multisig/multisig.js +0 -65
  219. package/dist/packages/multisig/multisigTypes.d.ts +0 -26
  220. package/dist/packages/multisig/multisigTypes.d.ts.map +0 -1
  221. package/dist/packages/multisig/multisigTypes.js +0 -2
  222. package/dist/packages/nftAmm/api/nftAmmApi.d.ts +0 -93
  223. package/dist/packages/nftAmm/api/nftAmmApi.d.ts.map +0 -1
  224. package/dist/packages/nftAmm/api/nftAmmApi.js +0 -250
  225. package/dist/packages/nftAmm/api/nftAmmApiCasting.d.ts +0 -6
  226. package/dist/packages/nftAmm/api/nftAmmApiCasting.d.ts.map +0 -1
  227. package/dist/packages/nftAmm/api/nftAmmApiCasting.js +0 -43
  228. package/dist/packages/nftAmm/api/nftAmmApiCastingTypes.d.ts +0 -10
  229. package/dist/packages/nftAmm/api/nftAmmApiCastingTypes.d.ts.map +0 -1
  230. package/dist/packages/nftAmm/api/nftAmmApiCastingTypes.js +0 -2
  231. package/dist/packages/nftAmm/index.d.ts +0 -2
  232. package/dist/packages/nftAmm/index.d.ts.map +0 -1
  233. package/dist/packages/nftAmm/index.js +0 -17
  234. package/dist/packages/nftAmm/nftAmm.d.ts +0 -18
  235. package/dist/packages/nftAmm/nftAmm.d.ts.map +0 -1
  236. package/dist/packages/nftAmm/nftAmm.js +0 -73
  237. package/dist/packages/nftAmm/nftAmmMarket.d.ts +0 -54
  238. package/dist/packages/nftAmm/nftAmmMarket.d.ts.map +0 -1
  239. package/dist/packages/nftAmm/nftAmmMarket.js +0 -154
  240. package/dist/packages/nftAmm/nftAmmTypes.d.ts +0 -51
  241. package/dist/packages/nftAmm/nftAmmTypes.d.ts.map +0 -1
  242. package/dist/packages/nftAmm/nftAmmTypes.js +0 -2
  243. package/dist/packages/perpetuals/api/perpetualsApi.d.ts +0 -44
  244. package/dist/packages/perpetuals/api/perpetualsApi.d.ts.map +0 -1
  245. package/dist/packages/perpetuals/api/perpetualsApi.js +0 -1420
  246. package/dist/packages/perpetuals/api/perpetualsApiCasting.d.ts +0 -27
  247. package/dist/packages/perpetuals/api/perpetualsApiCasting.d.ts.map +0 -1
  248. package/dist/packages/perpetuals/api/perpetualsApiCasting.js +0 -463
  249. package/dist/packages/perpetuals/index.d.ts +0 -5
  250. package/dist/packages/perpetuals/index.d.ts.map +0 -1
  251. package/dist/packages/perpetuals/index.js +0 -20
  252. package/dist/packages/perpetuals/perpetuals.d.ts +0 -860
  253. package/dist/packages/perpetuals/perpetuals.d.ts.map +0 -1
  254. package/dist/packages/perpetuals/perpetuals.js +0 -1102
  255. package/dist/packages/perpetuals/perpetualsAccount.d.ts +0 -780
  256. package/dist/packages/perpetuals/perpetualsAccount.d.ts.map +0 -1
  257. package/dist/packages/perpetuals/perpetualsAccount.js +0 -1406
  258. package/dist/packages/perpetuals/perpetualsCastingTypes.d.ts +0 -170
  259. package/dist/packages/perpetuals/perpetualsCastingTypes.d.ts.map +0 -1
  260. package/dist/packages/perpetuals/perpetualsCastingTypes.js +0 -2
  261. package/dist/packages/perpetuals/perpetualsMarket.d.ts +0 -360
  262. package/dist/packages/perpetuals/perpetualsMarket.d.ts.map +0 -1
  263. package/dist/packages/perpetuals/perpetualsMarket.js +0 -475
  264. package/dist/packages/perpetuals/perpetualsTypes.d.ts +0 -2968
  265. package/dist/packages/perpetuals/perpetualsTypes.d.ts.map +0 -1
  266. package/dist/packages/perpetuals/perpetualsTypes.js +0 -165
  267. package/dist/packages/perpetuals/perpetualsVault.d.ts +0 -438
  268. package/dist/packages/perpetuals/perpetualsVault.d.ts.map +0 -1
  269. package/dist/packages/perpetuals/perpetualsVault.js +0 -601
  270. package/dist/packages/perpetuals/utils/index.d.ts +0 -2
  271. package/dist/packages/perpetuals/utils/index.d.ts.map +0 -1
  272. package/dist/packages/perpetuals/utils/index.js +0 -17
  273. package/dist/packages/perpetuals/utils/perpetualsOrderUtils.d.ts +0 -12
  274. package/dist/packages/perpetuals/utils/perpetualsOrderUtils.d.ts.map +0 -1
  275. package/dist/packages/perpetuals/utils/perpetualsOrderUtils.js +0 -60
  276. package/dist/packages/pools/api/poolsApi.d.ts +0 -342
  277. package/dist/packages/pools/api/poolsApi.d.ts.map +0 -1
  278. package/dist/packages/pools/api/poolsApi.js +0 -857
  279. package/dist/packages/pools/api/poolsApiCasting.d.ts +0 -13
  280. package/dist/packages/pools/api/poolsApiCasting.d.ts.map +0 -1
  281. package/dist/packages/pools/api/poolsApiCasting.js +0 -91
  282. package/dist/packages/pools/api/poolsApiCastingTypes.d.ts +0 -64
  283. package/dist/packages/pools/api/poolsApiCastingTypes.d.ts.map +0 -1
  284. package/dist/packages/pools/api/poolsApiCastingTypes.js +0 -2
  285. package/dist/packages/pools/index.d.ts +0 -3
  286. package/dist/packages/pools/index.d.ts.map +0 -1
  287. package/dist/packages/pools/index.js +0 -18
  288. package/dist/packages/pools/pool.d.ts +0 -459
  289. package/dist/packages/pools/pool.d.ts.map +0 -1
  290. package/dist/packages/pools/pool.js +0 -647
  291. package/dist/packages/pools/pools.d.ts +0 -405
  292. package/dist/packages/pools/pools.d.ts.map +0 -1
  293. package/dist/packages/pools/pools.js +0 -533
  294. package/dist/packages/pools/poolsTypes.d.ts +0 -469
  295. package/dist/packages/pools/poolsTypes.d.ts.map +0 -1
  296. package/dist/packages/pools/poolsTypes.js +0 -2
  297. package/dist/packages/pools/utils/cmmmCalculations.d.ts +0 -42
  298. package/dist/packages/pools/utils/cmmmCalculations.d.ts.map +0 -1
  299. package/dist/packages/pools/utils/cmmmCalculations.js +0 -1380
  300. package/dist/packages/referralVault/api/referralVaultApi.d.ts +0 -39
  301. package/dist/packages/referralVault/api/referralVaultApi.d.ts.map +0 -1
  302. package/dist/packages/referralVault/api/referralVaultApi.js +0 -125
  303. package/dist/packages/referralVault/index.d.ts +0 -2
  304. package/dist/packages/referralVault/index.d.ts.map +0 -1
  305. package/dist/packages/referralVault/index.js +0 -17
  306. package/dist/packages/referralVault/referralVault.d.ts +0 -47
  307. package/dist/packages/referralVault/referralVault.d.ts.map +0 -1
  308. package/dist/packages/referralVault/referralVault.js +0 -71
  309. package/dist/packages/referralVault/referralVaultTypes.d.ts +0 -2
  310. package/dist/packages/referralVault/referralVaultTypes.d.ts.map +0 -1
  311. package/dist/packages/referralVault/referralVaultTypes.js +0 -2
  312. package/dist/packages/referrals/index.d.ts +0 -2
  313. package/dist/packages/referrals/index.d.ts.map +0 -1
  314. package/dist/packages/referrals/index.js +0 -17
  315. package/dist/packages/referrals/referrals.d.ts +0 -27
  316. package/dist/packages/referrals/referrals.d.ts.map +0 -1
  317. package/dist/packages/referrals/referrals.js +0 -95
  318. package/dist/packages/referrals/referralsTypes.d.ts +0 -166
  319. package/dist/packages/referrals/referralsTypes.d.ts.map +0 -1
  320. package/dist/packages/referrals/referralsTypes.js +0 -2
  321. package/dist/packages/rewards/index.d.ts +0 -2
  322. package/dist/packages/rewards/index.d.ts.map +0 -1
  323. package/dist/packages/rewards/index.js +0 -17
  324. package/dist/packages/rewards/rewards.d.ts +0 -21
  325. package/dist/packages/rewards/rewards.d.ts.map +0 -1
  326. package/dist/packages/rewards/rewards.js +0 -65
  327. package/dist/packages/rewards/rewardsTypes.d.ts +0 -169
  328. package/dist/packages/rewards/rewardsTypes.d.ts.map +0 -1
  329. package/dist/packages/rewards/rewardsTypes.js +0 -2
  330. package/dist/packages/router/api/routerApi.d.ts +0 -35
  331. package/dist/packages/router/api/routerApi.d.ts.map +0 -1
  332. package/dist/packages/router/api/routerApi.js +0 -88
  333. package/dist/packages/router/api/routerApiCasting.d.ts +0 -6
  334. package/dist/packages/router/api/routerApiCasting.d.ts.map +0 -1
  335. package/dist/packages/router/api/routerApiCasting.js +0 -22
  336. package/dist/packages/router/api/routerApiCastingTypes.d.ts +0 -12
  337. package/dist/packages/router/api/routerApiCastingTypes.d.ts.map +0 -1
  338. package/dist/packages/router/api/routerApiCastingTypes.js +0 -2
  339. package/dist/packages/router/index.d.ts +0 -2
  340. package/dist/packages/router/index.d.ts.map +0 -1
  341. package/dist/packages/router/index.js +0 -17
  342. package/dist/packages/router/router.d.ts +0 -224
  343. package/dist/packages/router/router.d.ts.map +0 -1
  344. package/dist/packages/router/router.js +0 -283
  345. package/dist/packages/router/routerTypes.d.ts +0 -300
  346. package/dist/packages/router/routerTypes.d.ts.map +0 -1
  347. package/dist/packages/router/routerTypes.js +0 -2
  348. package/dist/packages/staking/api/stakingApi.d.ts +0 -129
  349. package/dist/packages/staking/api/stakingApi.d.ts.map +0 -1
  350. package/dist/packages/staking/api/stakingApi.js +0 -487
  351. package/dist/packages/staking/api/stakingApiCasting.d.ts +0 -11
  352. package/dist/packages/staking/api/stakingApiCasting.d.ts.map +0 -1
  353. package/dist/packages/staking/api/stakingApiCasting.js +0 -87
  354. package/dist/packages/staking/api/stakingApiCastingTypes.d.ts +0 -97
  355. package/dist/packages/staking/api/stakingApiCastingTypes.d.ts.map +0 -1
  356. package/dist/packages/staking/api/stakingApiCastingTypes.js +0 -2
  357. package/dist/packages/staking/index.d.ts +0 -2
  358. package/dist/packages/staking/index.d.ts.map +0 -1
  359. package/dist/packages/staking/index.js +0 -17
  360. package/dist/packages/staking/staking.d.ts +0 -385
  361. package/dist/packages/staking/staking.d.ts.map +0 -1
  362. package/dist/packages/staking/staking.js +0 -501
  363. package/dist/packages/staking/stakingTypes.d.ts +0 -575
  364. package/dist/packages/staking/stakingTypes.d.ts.map +0 -1
  365. package/dist/packages/staking/stakingTypes.js +0 -45
  366. package/dist/packages/sui/api/suiApi.d.ts +0 -21
  367. package/dist/packages/sui/api/suiApi.d.ts.map +0 -1
  368. package/dist/packages/sui/api/suiApi.js +0 -46
  369. package/dist/packages/sui/index.d.ts +0 -2
  370. package/dist/packages/sui/index.d.ts.map +0 -1
  371. package/dist/packages/sui/index.js +0 -17
  372. package/dist/packages/sui/sui.d.ts +0 -53
  373. package/dist/packages/sui/sui.d.ts.map +0 -1
  374. package/dist/packages/sui/sui.js +0 -77
  375. package/dist/packages/suiFrens/api/suiFrensApi.d.ts +0 -204
  376. package/dist/packages/suiFrens/api/suiFrensApi.d.ts.map +0 -1
  377. package/dist/packages/suiFrens/api/suiFrensApi.js +0 -756
  378. package/dist/packages/suiFrens/api/suiFrensApiCasting.d.ts +0 -21
  379. package/dist/packages/suiFrens/api/suiFrensApiCasting.d.ts.map +0 -1
  380. package/dist/packages/suiFrens/api/suiFrensApiCasting.js +0 -181
  381. package/dist/packages/suiFrens/api/suiFrensApiCastingTypes.d.ts +0 -77
  382. package/dist/packages/suiFrens/api/suiFrensApiCastingTypes.d.ts.map +0 -1
  383. package/dist/packages/suiFrens/api/suiFrensApiCastingTypes.js +0 -2
  384. package/dist/packages/suiFrens/index.d.ts +0 -4
  385. package/dist/packages/suiFrens/index.d.ts.map +0 -1
  386. package/dist/packages/suiFrens/index.js +0 -19
  387. package/dist/packages/suiFrens/stakedSuiFren.d.ts +0 -31
  388. package/dist/packages/suiFrens/stakedSuiFren.d.ts.map +0 -1
  389. package/dist/packages/suiFrens/stakedSuiFren.js +0 -90
  390. package/dist/packages/suiFrens/suiFren.d.ts +0 -32
  391. package/dist/packages/suiFrens/suiFren.d.ts.map +0 -1
  392. package/dist/packages/suiFrens/suiFren.js +0 -150
  393. package/dist/packages/suiFrens/suiFrens.d.ts +0 -56
  394. package/dist/packages/suiFrens/suiFrens.d.ts.map +0 -1
  395. package/dist/packages/suiFrens/suiFrens.js +0 -218
  396. package/dist/packages/suiFrens/suiFrensTypes.d.ts +0 -148
  397. package/dist/packages/suiFrens/suiFrensTypes.d.ts.map +0 -1
  398. package/dist/packages/suiFrens/suiFrensTypes.js +0 -8
  399. package/dist/packages/userData/index.d.ts +0 -2
  400. package/dist/packages/userData/index.d.ts.map +0 -1
  401. package/dist/packages/userData/index.js +0 -17
  402. package/dist/packages/userData/userData.d.ts +0 -89
  403. package/dist/packages/userData/userData.d.ts.map +0 -1
  404. package/dist/packages/userData/userData.js +0 -119
  405. package/dist/packages/userData/userDataTypes.d.ts +0 -29
  406. package/dist/packages/userData/userDataTypes.d.ts.map +0 -1
  407. package/dist/packages/userData/userDataTypes.js +0 -2
  408. package/dist/types.d.ts +0 -15
  409. package/dist/types.d.ts.map +0 -1
  410. package/dist/types.js +0 -31
@@ -1,302 +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.Farms = void 0;
13
- const caller_1 = require("../../general/utils/caller");
14
- const farmsStakingPool_1 = require("./farmsStakingPool");
15
- const farmsStakedPosition_1 = require("./farmsStakedPosition");
16
- /**
17
- * The `Farms` class provides high-level methods for interacting with
18
- * staking pools (farms) on the Sui network. It allows fetching pool
19
- * details, user staked positions, and building transactions for creating
20
- * new pools. This class also enables retrieving user interactions (events)
21
- * with the farming system.
22
- */
23
- class Farms extends caller_1.Caller {
24
- // =========================================================================
25
- // Constructor
26
- // =========================================================================
27
- /**
28
- * Creates a new `Farms` instance for fetching staking pool data and building
29
- * farm-related transactions.
30
- *
31
- * @param config - Optional configuration, including network and access token.
32
- * @param Provider - An optional `AftermathApi` instance for advanced transaction building.
33
- */
34
- constructor(config, Provider) {
35
- super(config, "farms");
36
- this.Provider = Provider;
37
- // =========================================================================
38
- // Private Helpers
39
- // =========================================================================
40
- /**
41
- * Retrieves an instance of the `Farms` provider from the passed `AftermathApi`,
42
- * throwing an error if not available.
43
- */
44
- this.useProvider = () => {
45
- var _a;
46
- const provider = (_a = this.Provider) === null || _a === void 0 ? void 0 : _a.Farms();
47
- if (!provider)
48
- throw new Error("missing AftermathApi Provider");
49
- return provider;
50
- };
51
- }
52
- // =========================================================================
53
- // Public
54
- // =========================================================================
55
- // =========================================================================
56
- // Class Objects
57
- // =========================================================================
58
- /**
59
- * Fetches a single staking pool by its `objectId` from the farm API/indexer.
60
- *
61
- * @param inputs - An object containing the `objectId` of the staking pool.
62
- * @returns A `FarmsStakingPool` object representing the staking pool.
63
- *
64
- * @example
65
- * ```typescript
66
- * const pool = await farms.getStakingPool({ objectId: "0x<pool_id>" });
67
- * console.log(pool.stakingPool);
68
- * ```
69
- */
70
- getStakingPool(inputs) {
71
- return __awaiter(this, void 0, void 0, function* () {
72
- const stakingPool = yield this.fetchApi(inputs.objectId);
73
- return new farmsStakingPool_1.FarmsStakingPool(stakingPool, this.config, this.Provider);
74
- });
75
- }
76
- /**
77
- * Fetches multiple staking pools by their `objectIds`.
78
- *
79
- * @param inputs - An object containing an array of `objectIds`.
80
- * @returns An array of `FarmsStakingPool` instances corresponding to each `objectId`.
81
- *
82
- * @example
83
- * ```typescript
84
- * const pools = await farms.getStakingPools({
85
- * objectIds: ["0x<id1>", "0x<id2>"]
86
- * });
87
- * console.log(pools[0].stakingPool, pools[1].stakingPool);
88
- * ```
89
- */
90
- getStakingPools(inputs) {
91
- return __awaiter(this, void 0, void 0, function* () {
92
- const stakingPools = yield this.fetchApi("", {
93
- farmIds: inputs.objectIds,
94
- });
95
- return stakingPools.map((stakingPool) => new farmsStakingPool_1.FarmsStakingPool(stakingPool, this.config, this.Provider));
96
- });
97
- }
98
- /**
99
- * Fetches all existing staking pools registered within the indexer or farm API.
100
- *
101
- * @returns An array of `FarmsStakingPool` objects.
102
- *
103
- * @example
104
- * ```typescript
105
- * const allPools = await farms.getAllStakingPools();
106
- * console.log(allPools.map(pool => pool.stakingPool));
107
- * ```
108
- */
109
- getAllStakingPools() {
110
- return __awaiter(this, void 0, void 0, function* () {
111
- const stakingPools = yield this.fetchApi("", {});
112
- return stakingPools.map((pool) => new farmsStakingPool_1.FarmsStakingPool(pool, this.config, this.Provider));
113
- });
114
- }
115
- /**
116
- * Fetches all staked positions owned by a given user.
117
- *
118
- * @param inputs - An object containing the user's `walletAddress`.
119
- * @returns An array of `FarmsStakedPosition` objects representing each of the user's staked positions.
120
- *
121
- * @example
122
- * ```typescript
123
- * const positions = await farms.getOwnedStakedPositions({
124
- * walletAddress: "0x<user_address>"
125
- * });
126
- * console.log(positions);
127
- * ```
128
- */
129
- getOwnedStakedPositions(inputs) {
130
- return __awaiter(this, void 0, void 0, function* () {
131
- const positions = yield this.fetchApi("owned-staked-positions", inputs);
132
- return positions.map((pool) => new farmsStakedPosition_1.FarmsStakedPosition(pool, undefined, this.config, this.Provider));
133
- });
134
- }
135
- /**
136
- * Fetches all `StakingPoolOwnerCapObject`s that a given address owns.
137
- * These caps grant the owner the ability to modify staking pool parameters.
138
- *
139
- * @param inputs - An object containing the owner's `walletAddress`.
140
- * @returns An array of `StakingPoolOwnerCapObject`s.
141
- *
142
- * @example
143
- * ```typescript
144
- * const ownerCaps = await farms.getOwnedStakingPoolOwnerCaps({
145
- * walletAddress: "0x<user_address>"
146
- * });
147
- * console.log(ownerCaps);
148
- * ```
149
- */
150
- getOwnedStakingPoolOwnerCaps(inputs) {
151
- return __awaiter(this, void 0, void 0, function* () {
152
- return this.fetchApi("owned-staking-pool-owner-caps", inputs);
153
- });
154
- }
155
- /**
156
- * Fetches all `StakingPoolOneTimeAdminCapObject`s that a given address owns.
157
- * These caps grant one-time admin privileges, typically for initializing reward coins.
158
- *
159
- * @param inputs - An object containing the admin's `walletAddress`.
160
- * @returns An array of `StakingPoolOneTimeAdminCapObject`s.
161
- *
162
- * @example
163
- * ```typescript
164
- * const adminCaps = await farms.getOwnedStakingPoolOneTimeAdminCaps({
165
- * walletAddress: "0x<user_address>"
166
- * });
167
- * console.log(adminCaps);
168
- * ```
169
- */
170
- getOwnedStakingPoolOneTimeAdminCaps(inputs) {
171
- return __awaiter(this, void 0, void 0, function* () {
172
- return this.fetchApi("owned-staking-pool-one-time-admin-caps", inputs);
173
- });
174
- }
175
- // =========================================================================
176
- // Stats
177
- // =========================================================================
178
- /**
179
- * Retrieves the total value locked (TVL) in the specified farm IDs or in all farms if none are specified.
180
- *
181
- * @param inputs - An optional object containing an array of `farmIds` to filter TVL by. If not provided, returns global TVL.
182
- * @returns A promise that resolves to a `number` representing the TVL in USD (or another relevant currency).
183
- *
184
- * @example
185
- * ```typescript
186
- * const tvl = await farms.getTVL();
187
- * console.log("All farms' TVL:", tvl);
188
- *
189
- * const tvlForSpecificFarm = await farms.getTVL({ farmIds: ["0x<farm_id>"] });
190
- * console.log("Specific farm's TVL:", tvlForSpecificFarm);
191
- * ```
192
- */
193
- getTVL(inputs) {
194
- return __awaiter(this, void 0, void 0, function* () {
195
- return this.fetchApi("tvl", inputs !== null && inputs !== void 0 ? inputs : {});
196
- });
197
- }
198
- /**
199
- * Retrieves the total value locked (TVL) of reward coins across specified farm IDs or all farms if none are specified.
200
- *
201
- * @param inputs - An optional object containing an array of `farmIds`. If not provided, returns global reward TVL.
202
- * @returns A promise that resolves to a `number` representing the total rewards TVL in USD (or another relevant currency).
203
- *
204
- * @example
205
- * ```typescript
206
- * const rewardsTvl = await farms.getRewardsTVL();
207
- * console.log("All farms' rewards TVL:", rewardsTvl);
208
- *
209
- * const singleFarmRewardsTvl = await farms.getRewardsTVL({ farmIds: ["0x<farm_id>"] });
210
- * console.log("Single farm's rewards TVL:", singleFarmRewardsTvl);
211
- * ```
212
- */
213
- getRewardsTVL(inputs) {
214
- return __awaiter(this, void 0, void 0, function* () {
215
- return this.fetchApi("rewards-tvl", inputs !== null && inputs !== void 0 ? inputs : {});
216
- });
217
- }
218
- // =========================================================================
219
- // Transactions
220
- // =========================================================================
221
- /**
222
- * **Deprecated**: Use `getCreateStakingPoolTransactionV2()` instead.
223
- *
224
- * Builds a transaction to create a new staking pool (farming vault) on version 1 of the farm system.
225
- *
226
- * @param inputs - Contains pool creation parameters such as `minLockDurationMs`, `maxLockDurationMs`, etc.
227
- * @returns A transaction object (or bytes) that can be signed and submitted.
228
- *
229
- * @deprecated Please use `getCreateStakingPoolTransactionV2`.
230
- */
231
- getCreateStakingPoolTransactionV1(inputs) {
232
- return __awaiter(this, void 0, void 0, function* () {
233
- return this.useProvider().buildCreateStakingPoolTxV1(inputs);
234
- });
235
- }
236
- /**
237
- * Builds a transaction to create a new staking pool (farming vault) on version 2 of the farm system.
238
- *
239
- * @param inputs - Contains pool creation parameters such as `minLockDurationMs`, `maxLockDurationMs`, etc.
240
- * @returns A transaction object (or bytes) that can be signed and submitted.
241
- *
242
- * @example
243
- * ```typescript
244
- * const tx = await farms.getCreateStakingPoolTransactionV2({
245
- * minLockDurationMs: 604800000, // 1 week
246
- * maxLockDurationMs: 31536000000, // 1 year
247
- * maxLockMultiplier: BigInt("2000000000"), // e.g. 2.0x
248
- * minStakeAmount: BigInt("1000000"),
249
- * stakeCoinType: "0x<coin_type>",
250
- * walletAddress: "0x<admin_address>"
251
- * });
252
- * // sign and submit the transaction
253
- * ```
254
- */
255
- getCreateStakingPoolTransactionV2(inputs) {
256
- return __awaiter(this, void 0, void 0, function* () {
257
- return this.useProvider().buildCreateStakingPoolTxV2(inputs);
258
- });
259
- }
260
- // =========================================================================
261
- // Events
262
- // =========================================================================
263
- /**
264
- * Fetches user-specific farm interaction events (e.g., staked, unlocked, withdrew) with optional pagination.
265
- *
266
- * @param inputs - Includes the user's `walletAddress`, along with `cursor` and `limit` for pagination.
267
- * @returns A paginated set of events of type `FarmUserEvent`.
268
- *
269
- * @example
270
- * ```typescript
271
- * const userEvents = await farms.getInteractionEvents({
272
- * walletAddress: "0x<user_address>",
273
- * cursor: 0,
274
- * limit: 10
275
- * });
276
- * console.log(userEvents);
277
- * ```
278
- */
279
- getInteractionEvents(inputs) {
280
- return __awaiter(this, void 0, void 0, function* () {
281
- return this.fetchApiIndexerEvents("events-by-user", inputs);
282
- });
283
- }
284
- }
285
- exports.Farms = Farms;
286
- // =========================================================================
287
- // Constants
288
- // =========================================================================
289
- /**
290
- * Contains constants relevant to farming, including minimum rewards to claim
291
- * and maximum lock multipliers.
292
- */
293
- Farms.constants = {
294
- /**
295
- * The minimum number of rewards (in smallest units) that can be claimed.
296
- */
297
- minRewardsToClaim: BigInt(10),
298
- /**
299
- * The maximum lock multiplier that can be applied when locking a staked position.
300
- */
301
- maxLockMultiplier: 2,
302
- };
@@ -1,229 +0,0 @@
1
- import { Caller } from "../../general/utils/caller";
2
- import { Balance, CallerConfig, CoinType, CoinsToBalance, FarmsStakedPositionObject, FarmsVersion, SuiAddress, Timestamp } from "../../types";
3
- import { FarmsStakingPool } from "./farmsStakingPool";
4
- import { AftermathApi } from "../../general/providers";
5
- /**
6
- * The `FarmsStakedPosition` class represents a user's individual staked position
7
- * in a particular staking pool. It provides methods to query position details,
8
- * calculate potential rewards, lock/unlock stake, and build transactions
9
- * for depositing, unstaking, or harvesting rewards.
10
- */
11
- export declare class FarmsStakedPosition extends Caller {
12
- stakedPosition: FarmsStakedPositionObject;
13
- readonly Provider?: AftermathApi | undefined;
14
- /**
15
- * The timestamp (in ms) when rewards were last harvested for this position, possibly overriding the
16
- * on-chain data if provided in the constructor.
17
- */
18
- readonly trueLastHarvestRewardsTimestamp: Timestamp;
19
- /**
20
- * Creates a `FarmsStakedPosition` instance for a user's staked position in a farm.
21
- *
22
- * @param stakedPosition - The on-chain data object representing the user's staked position.
23
- * @param trueLastHarvestRewardsTimestamp - Optionally overrides the last harvest time from the on-chain data.
24
- * @param config - Optional configuration for the underlying `Caller`.
25
- * @param Provider - Optional `AftermathApi` instance for transaction building.
26
- */
27
- constructor(stakedPosition: FarmsStakedPositionObject, trueLastHarvestRewardsTimestamp?: Timestamp | undefined, config?: CallerConfig, Provider?: AftermathApi | undefined);
28
- /**
29
- * Returns the version of the farm system that this position belongs to (1 or 2).
30
- */
31
- version: () => FarmsVersion;
32
- /**
33
- * Checks whether the position is still locked, based on the current time and the lock parameters.
34
- *
35
- * @param inputs - Contains a `FarmsStakingPool` instance to check for system constraints.
36
- * @returns `true` if the position is locked; otherwise, `false`.
37
- */
38
- isLocked: (inputs: {
39
- stakingPool: FarmsStakingPool;
40
- }) => boolean;
41
- /**
42
- * Checks if the position is strictly locked, meaning it is currently locked and the pool uses strict lock enforcement.
43
- *
44
- * @param inputs - Contains a `FarmsStakingPool` instance to check lock state and enforcement.
45
- * @returns `true` if locked with strict enforcement; otherwise, `false`.
46
- */
47
- isStrictlyLocked: (inputs: {
48
- stakingPool: FarmsStakingPool;
49
- }) => boolean;
50
- /**
51
- * Checks if the position is relaxed locked, meaning it is currently locked and the pool uses relaxed lock enforcement.
52
- *
53
- * @param inputs - Contains a `FarmsStakingPool` instance to check lock state and enforcement.
54
- * @returns `true` if locked with relaxed enforcement; otherwise, `false`.
55
- */
56
- isRelaxedLocked: (inputs: {
57
- stakingPool: FarmsStakingPool;
58
- }) => boolean;
59
- /**
60
- * Checks whether the position has a non-zero lock duration.
61
- *
62
- * @returns `true` if the position was created with a lock duration > 0.
63
- */
64
- isLockDuration: () => boolean;
65
- /**
66
- * Computes the timestamp (in ms) at which this position's lock will end.
67
- *
68
- * @returns The unlock timestamp (lock start + lock duration).
69
- */
70
- unlockTimestamp: () => number;
71
- /**
72
- * Computes the user's accrued rewards for each reward coin in this position,
73
- * returned as a `CoinsToBalance` object keyed by coin type.
74
- *
75
- * @param inputs - Contains a reference to the `FarmsStakingPool`.
76
- * @returns A mapping from `coinType` to the amount of earned rewards.
77
- */
78
- rewardCoinsToClaimableBalance: (inputs: {
79
- stakingPool: FarmsStakingPool;
80
- }) => CoinsToBalance;
81
- /**
82
- * Lists all reward coin types associated with this position.
83
- *
84
- * @returns An array of `CoinType` strings representing the reward coins.
85
- */
86
- rewardCoinTypes: () => CoinType[];
87
- /**
88
- * Returns only the reward coin types that currently have a non-zero claimable balance.
89
- *
90
- * @param inputs - Contains a reference to the `FarmsStakingPool`.
91
- * @returns An array of `CoinType` strings that have pending rewards > 0.
92
- */
93
- nonZeroRewardCoinTypes: (inputs: {
94
- stakingPool: FarmsStakingPool;
95
- }) => CoinType[];
96
- /**
97
- * Retrieves the reward coin record for a specific coin type in this position.
98
- *
99
- * @param inputs - Must contain a `coinType` string to look up.
100
- * @throws If the coin type is not found in this position.
101
- * @returns The reward coin object from the position.
102
- */
103
- rewardCoin: (inputs: {
104
- coinType: CoinType;
105
- }) => import("./farmsTypes").FarmsStakedPositionRewardCoin;
106
- /**
107
- * Checks if this position has any claimable rewards across all reward coin types.
108
- *
109
- * @param inputs - Contains a reference to the `FarmsStakingPool`.
110
- * @returns `true` if there are unclaimed rewards; otherwise, `false`.
111
- */
112
- hasClaimableRewards: (inputs: {
113
- stakingPool: FarmsStakingPool;
114
- }) => boolean;
115
- /**
116
- * Calculates the current amount of earned rewards for a specific coin type,
117
- * factoring in any emission constraints and the pool's actual reward availability.
118
- *
119
- * @param inputs - Contains the `coinType` to check and a reference to the `FarmsStakingPool`.
120
- * @returns The total `BigInt` amount of rewards earned for the specified coin type.
121
- */
122
- rewardsEarned: (inputs: {
123
- coinType: CoinType;
124
- stakingPool: FarmsStakingPool;
125
- }) => Balance;
126
- /**
127
- * Updates the position's reward calculations based on the pool's current
128
- * emission state, effectively "syncing" the on-chain logic into this local
129
- * representation. Also checks if the lock duration has elapsed.
130
- *
131
- * @param inputs - Contains a reference to the `FarmsStakingPool`.
132
- * @remarks This method is typically called before computing `rewardsEarned()`.
133
- */
134
- updatePosition: (inputs: {
135
- stakingPool: FarmsStakingPool;
136
- }) => void;
137
- /**
138
- * Builds a transaction to deposit additional principal into this staked position.
139
- *
140
- * @param inputs - Contains `depositAmount`, the `walletAddress` performing the deposit, and optional sponsorship.
141
- * @returns A transaction object (or bytes) that can be signed and executed to increase stake.
142
- */
143
- getDepositPrincipalTransaction(inputs: {
144
- depositAmount: Balance;
145
- walletAddress: SuiAddress;
146
- isSponsoredTx?: boolean;
147
- }): Promise<import("@mysten/sui/transactions").Transaction>;
148
- /**
149
- * Builds a transaction to unstake this entire position, optionally claiming SUI as afSUI.
150
- *
151
- * @param inputs - Contains `walletAddress`, the `FarmsStakingPool` reference, and optional `claimSuiAsAfSui`.
152
- * @returns A transaction that can be signed and executed to fully withdraw principal and possibly rewards.
153
- */
154
- getUnstakeTransaction(inputs: {
155
- walletAddress: SuiAddress;
156
- stakingPool: FarmsStakingPool;
157
- claimSuiAsAfSui?: boolean;
158
- }): Promise<import("@mysten/sui/transactions").Transaction>;
159
- /**
160
- * Builds a transaction to withdraw a partial amount of principal from this staked position.
161
- * Unlike `getUnstakeTransaction`, this does NOT destroy the position.
162
- *
163
- * @param inputs - Contains `walletAddress`, `withdrawAmount`, and the `FarmsStakingPool` reference.
164
- * @returns A transaction that can be signed and executed to withdraw principal without destroying the position.
165
- */
166
- getWithdrawPrincipalTransaction(inputs: {
167
- walletAddress: SuiAddress;
168
- withdrawAmount: Balance;
169
- stakingPool: FarmsStakingPool;
170
- }): Promise<import("@mysten/sui/transactions").Transaction>;
171
- /**
172
- * Builds a transaction to lock this position for a specified duration, increasing its lock multiplier (if any).
173
- *
174
- * @param inputs - Contains the `lockDurationMs` and the `walletAddress`.
175
- * @returns A transaction that can be signed and executed to lock the position.
176
- */
177
- getLockTransaction(inputs: {
178
- lockDurationMs: Timestamp;
179
- walletAddress: SuiAddress;
180
- }): Promise<import("@mysten/sui/transactions").Transaction>;
181
- /**
182
- * Builds a transaction to re-lock this position (renew lock duration) at the current multiplier.
183
- *
184
- * @param inputs - Contains the `walletAddress`.
185
- * @returns A transaction that can be signed and executed to extend or refresh the lock.
186
- */
187
- getRenewLockTransaction(inputs: {
188
- walletAddress: SuiAddress;
189
- }): Promise<import("@mysten/sui/transactions").Transaction>;
190
- /**
191
- * Builds a transaction to unlock this position, removing any lock-based multiplier.
192
- *
193
- * @param inputs - Contains the `walletAddress`.
194
- * @returns A transaction that can be signed and executed to unlock the position immediately.
195
- */
196
- getUnlockTransaction(inputs: {
197
- walletAddress: SuiAddress;
198
- }): Promise<import("@mysten/sui/transactions").Transaction>;
199
- /**
200
- * Builds a transaction to harvest (claim) the rewards from this position,
201
- * optionally receiving SUI as afSUI.
202
- *
203
- * @param inputs - Includes the `walletAddress`, the `FarmsStakingPool`, and optional `claimSuiAsAfSui`.
204
- * @returns A transaction that can be signed and executed to claim accrued rewards.
205
- */
206
- getHarvestRewardsTransaction(inputs: {
207
- walletAddress: SuiAddress;
208
- stakingPool: FarmsStakingPool;
209
- claimSuiAsAfSui?: boolean;
210
- }): Promise<import("@mysten/sui/transactions").Transaction>;
211
- /**
212
- * Calculates the total base + multiplier rewards from time t0 for this position,
213
- * ensuring that multiplier rewards only apply during the locked period.
214
- *
215
- * @param inputs - Contains updated `rewardsAccumulatedPerShare`, the position’s `multiplierRewardsDebt`, and the pool’s `emissionEndTimestamp`.
216
- * @returns A tuple `[baseRewards, multiplierRewards]`.
217
- */
218
- private calcTotalRewardsFromTimeT0;
219
- /**
220
- * Determines if this position is unlocked based on the lock end timestamp, the emission end timestamp,
221
- * or a forced unlock condition in the pool.
222
- */
223
- private isUnlocked;
224
- /**
225
- * Provides access to the `Farms` provider in the `AftermathApi`.
226
- */
227
- private useProvider;
228
- }
229
- //# sourceMappingURL=farmsStakedPosition.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"farmsStakedPosition.d.ts","sourceRoot":"","sources":["../../../src/packages/farms/farmsStakedPosition.ts"],"names":[],"mappings":"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"}