@ecency/sdk 2.4.21 → 2.4.22

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 (516) hide show
  1. package/dist/browser/{chunk-JORE46WK.js → chunk-2EYZMIWD.js} +2 -2
  2. package/dist/browser/{chunk-JORE46WK.js.map → chunk-2EYZMIWD.js.map} +1 -1
  3. package/dist/browser/{chunk-N3JLKXGY.js → chunk-2MIOCMJB.js} +2 -2
  4. package/dist/browser/{chunk-N3JLKXGY.js.map → chunk-2MIOCMJB.js.map} +1 -1
  5. package/dist/browser/{chunk-EU3FL3RJ.js → chunk-2PMKAOIU.js} +2 -2
  6. package/dist/browser/{chunk-EU3FL3RJ.js.map → chunk-2PMKAOIU.js.map} +1 -1
  7. package/dist/browser/{chunk-HESIUSO3.js → chunk-3DS7HIZ6.js} +2 -2
  8. package/dist/browser/{chunk-HESIUSO3.js.map → chunk-3DS7HIZ6.js.map} +1 -1
  9. package/dist/browser/{chunk-RVXGI5TW.js → chunk-4EL7BARO.js} +2 -2
  10. package/dist/browser/{chunk-RVXGI5TW.js.map → chunk-4EL7BARO.js.map} +1 -1
  11. package/dist/browser/{chunk-6DDGZBMD.js → chunk-4JZTDTIL.js} +2 -2
  12. package/dist/browser/{chunk-6DDGZBMD.js.map → chunk-4JZTDTIL.js.map} +1 -1
  13. package/dist/browser/{chunk-7B5LNIZJ.js → chunk-4NADA62G.js} +2 -2
  14. package/dist/browser/{chunk-7B5LNIZJ.js.map → chunk-4NADA62G.js.map} +1 -1
  15. package/dist/browser/{chunk-SQZKXKLW.js → chunk-57A4DG2S.js} +2 -2
  16. package/dist/browser/{chunk-SQZKXKLW.js.map → chunk-57A4DG2S.js.map} +1 -1
  17. package/dist/browser/{chunk-GQGDHPRQ.js → chunk-5BITQZND.js} +2 -2
  18. package/dist/browser/{chunk-GQGDHPRQ.js.map → chunk-5BITQZND.js.map} +1 -1
  19. package/dist/browser/{chunk-RJNZILJR.js → chunk-62ME2K4P.js} +2 -2
  20. package/dist/browser/{chunk-RJNZILJR.js.map → chunk-62ME2K4P.js.map} +1 -1
  21. package/dist/browser/{chunk-FVLWW7QJ.js → chunk-6ARQ76GD.js} +2 -2
  22. package/dist/browser/{chunk-FVLWW7QJ.js.map → chunk-6ARQ76GD.js.map} +1 -1
  23. package/dist/browser/{chunk-Q6EALMA3.js → chunk-7334637K.js} +2 -2
  24. package/dist/browser/{chunk-Q6EALMA3.js.map → chunk-7334637K.js.map} +1 -1
  25. package/dist/browser/{chunk-XTYTT3BK.js → chunk-7JPEXH7J.js} +2 -2
  26. package/dist/browser/{chunk-XTYTT3BK.js.map → chunk-7JPEXH7J.js.map} +1 -1
  27. package/dist/browser/{chunk-VWPIV7DW.js → chunk-7OD25PBQ.js} +2 -2
  28. package/dist/browser/{chunk-VWPIV7DW.js.map → chunk-7OD25PBQ.js.map} +1 -1
  29. package/dist/browser/{chunk-H6FI5RUB.js → chunk-7Q3WCU66.js} +2 -2
  30. package/dist/browser/{chunk-H6FI5RUB.js.map → chunk-7Q3WCU66.js.map} +1 -1
  31. package/dist/browser/{chunk-BUHCN53D.js → chunk-7THEMMDR.js} +2 -2
  32. package/dist/browser/{chunk-BUHCN53D.js.map → chunk-7THEMMDR.js.map} +1 -1
  33. package/dist/browser/{chunk-UBIHDHZY.js → chunk-A4RVVIA6.js} +2 -2
  34. package/dist/browser/{chunk-UBIHDHZY.js.map → chunk-A4RVVIA6.js.map} +1 -1
  35. package/dist/browser/{chunk-2TIZBQHI.js → chunk-AOY46Q5S.js} +2 -2
  36. package/dist/browser/{chunk-2TIZBQHI.js.map → chunk-AOY46Q5S.js.map} +1 -1
  37. package/dist/browser/{chunk-EJCGBTQE.js → chunk-AW5VCJIZ.js} +2 -2
  38. package/dist/browser/{chunk-EJCGBTQE.js.map → chunk-AW5VCJIZ.js.map} +1 -1
  39. package/dist/browser/{chunk-2JN4EIJE.js → chunk-C5PSLR7Z.js} +2 -2
  40. package/dist/browser/{chunk-2JN4EIJE.js.map → chunk-C5PSLR7Z.js.map} +1 -1
  41. package/dist/browser/{chunk-TOQBNISU.js → chunk-CNDSORAV.js} +2 -2
  42. package/dist/browser/{chunk-TOQBNISU.js.map → chunk-CNDSORAV.js.map} +1 -1
  43. package/dist/browser/{chunk-MPLLD6WX.js → chunk-CQTLGJKX.js} +2 -2
  44. package/dist/browser/{chunk-MPLLD6WX.js.map → chunk-CQTLGJKX.js.map} +1 -1
  45. package/dist/browser/{chunk-24GIDC32.js → chunk-F3U2P5JK.js} +2 -2
  46. package/dist/browser/{chunk-24GIDC32.js.map → chunk-F3U2P5JK.js.map} +1 -1
  47. package/dist/browser/{chunk-ADAK5AIP.js → chunk-FFTSEIYV.js} +2 -2
  48. package/dist/browser/{chunk-ADAK5AIP.js.map → chunk-FFTSEIYV.js.map} +1 -1
  49. package/dist/browser/{chunk-SHZTS2C3.js → chunk-FH2NXTZ6.js} +2 -2
  50. package/dist/browser/{chunk-SHZTS2C3.js.map → chunk-FH2NXTZ6.js.map} +1 -1
  51. package/dist/browser/{chunk-KDR4M45T.js → chunk-FU2GC2LE.js} +2 -2
  52. package/dist/browser/{chunk-KDR4M45T.js.map → chunk-FU2GC2LE.js.map} +1 -1
  53. package/dist/browser/chunk-FZ4CS2GG.js +2 -0
  54. package/dist/browser/{chunk-PHNYLTEH.js.map → chunk-FZ4CS2GG.js.map} +1 -1
  55. package/dist/browser/{chunk-PGMEWW46.js → chunk-GB3HQFYD.js} +2 -2
  56. package/dist/browser/{chunk-PGMEWW46.js.map → chunk-GB3HQFYD.js.map} +1 -1
  57. package/dist/browser/{chunk-J3RZOR3T.js → chunk-GFXGKAUS.js} +2 -2
  58. package/dist/browser/{chunk-J3RZOR3T.js.map → chunk-GFXGKAUS.js.map} +1 -1
  59. package/dist/browser/{chunk-44EOXEIC.js → chunk-GNVQHSS3.js} +2 -2
  60. package/dist/browser/{chunk-44EOXEIC.js.map → chunk-GNVQHSS3.js.map} +1 -1
  61. package/dist/browser/{chunk-LL4YZLL2.js → chunk-HO6CZGVL.js} +2 -2
  62. package/dist/browser/{chunk-LL4YZLL2.js.map → chunk-HO6CZGVL.js.map} +1 -1
  63. package/dist/browser/{chunk-LHABXX5K.js → chunk-IF3OTURI.js} +2 -2
  64. package/dist/browser/{chunk-LHABXX5K.js.map → chunk-IF3OTURI.js.map} +1 -1
  65. package/dist/browser/{chunk-YN34NTWC.js → chunk-ILKK5VBZ.js} +2 -2
  66. package/dist/browser/{chunk-YN34NTWC.js.map → chunk-ILKK5VBZ.js.map} +1 -1
  67. package/dist/browser/chunk-IMCYKBDV.js +2 -0
  68. package/dist/browser/chunk-IMCYKBDV.js.map +1 -0
  69. package/dist/browser/chunk-J2HM6MWA.js +2 -0
  70. package/dist/browser/{chunk-K2DAN37J.js.map → chunk-J2HM6MWA.js.map} +1 -1
  71. package/dist/browser/{chunk-6KVHZTYP.js → chunk-LNFPNBAR.js} +2 -2
  72. package/dist/browser/{chunk-6KVHZTYP.js.map → chunk-LNFPNBAR.js.map} +1 -1
  73. package/dist/browser/{chunk-QXRJ3Q4Y.js → chunk-MBDFLDIN.js} +2 -2
  74. package/dist/browser/{chunk-QXRJ3Q4Y.js.map → chunk-MBDFLDIN.js.map} +1 -1
  75. package/dist/browser/{chunk-M3OC7IZG.js → chunk-MR5OYU27.js} +2 -2
  76. package/dist/browser/{chunk-M3OC7IZG.js.map → chunk-MR5OYU27.js.map} +1 -1
  77. package/dist/browser/{chunk-YK7FPU3F.js → chunk-NFO2YHLK.js} +2 -2
  78. package/dist/browser/{chunk-YK7FPU3F.js.map → chunk-NFO2YHLK.js.map} +1 -1
  79. package/dist/browser/{chunk-2MLEAT6V.js → chunk-NHKKPEA7.js} +2 -2
  80. package/dist/browser/{chunk-2MLEAT6V.js.map → chunk-NHKKPEA7.js.map} +1 -1
  81. package/dist/browser/{chunk-6YZ7OSX2.js → chunk-OA7EP5SN.js} +2 -2
  82. package/dist/browser/{chunk-6YZ7OSX2.js.map → chunk-OA7EP5SN.js.map} +1 -1
  83. package/dist/browser/{chunk-7BGXFJVA.js → chunk-OMF5YUFB.js} +2 -2
  84. package/dist/browser/{chunk-7BGXFJVA.js.map → chunk-OMF5YUFB.js.map} +1 -1
  85. package/dist/browser/{chunk-37N2QITX.js → chunk-ONRD3CRU.js} +2 -2
  86. package/dist/browser/{chunk-37N2QITX.js.map → chunk-ONRD3CRU.js.map} +1 -1
  87. package/dist/browser/{chunk-KJUSI6PP.js → chunk-OUIU7KNA.js} +2 -2
  88. package/dist/browser/{chunk-KJUSI6PP.js.map → chunk-OUIU7KNA.js.map} +1 -1
  89. package/dist/browser/{chunk-DX47GSLU.js → chunk-PTXAORWB.js} +2 -2
  90. package/dist/browser/{chunk-DX47GSLU.js.map → chunk-PTXAORWB.js.map} +1 -1
  91. package/dist/browser/{chunk-J3PY2B6H.js → chunk-Q56WX4Q4.js} +2 -2
  92. package/dist/browser/{chunk-J3PY2B6H.js.map → chunk-Q56WX4Q4.js.map} +1 -1
  93. package/dist/browser/{chunk-EYKUJB3F.js → chunk-QQ7MZFRE.js} +2 -2
  94. package/dist/browser/{chunk-EYKUJB3F.js.map → chunk-QQ7MZFRE.js.map} +1 -1
  95. package/dist/browser/{chunk-JDVR32ZT.js → chunk-QXYS66KZ.js} +2 -2
  96. package/dist/browser/{chunk-JDVR32ZT.js.map → chunk-QXYS66KZ.js.map} +1 -1
  97. package/dist/browser/{chunk-DCYSEIIY.js → chunk-RRF5H53D.js} +2 -2
  98. package/dist/browser/{chunk-DCYSEIIY.js.map → chunk-RRF5H53D.js.map} +1 -1
  99. package/dist/browser/{chunk-BLLAF3XJ.js → chunk-SHWRGBMD.js} +2 -2
  100. package/dist/browser/{chunk-BLLAF3XJ.js.map → chunk-SHWRGBMD.js.map} +1 -1
  101. package/dist/browser/{chunk-2HXQJNAQ.js → chunk-SXUNJC2V.js} +2 -2
  102. package/dist/browser/{chunk-2HXQJNAQ.js.map → chunk-SXUNJC2V.js.map} +1 -1
  103. package/dist/browser/{chunk-DLRAARGY.js → chunk-TUFXYNHE.js} +2 -2
  104. package/dist/browser/{chunk-DLRAARGY.js.map → chunk-TUFXYNHE.js.map} +1 -1
  105. package/dist/browser/{chunk-T5Y7X4JU.js → chunk-TUL2MGVZ.js} +2 -2
  106. package/dist/browser/{chunk-T5Y7X4JU.js.map → chunk-TUL2MGVZ.js.map} +1 -1
  107. package/dist/browser/{chunk-NXYHJZ5U.js → chunk-UUNZHPWM.js} +2 -2
  108. package/dist/browser/{chunk-NXYHJZ5U.js.map → chunk-UUNZHPWM.js.map} +1 -1
  109. package/dist/browser/{chunk-BK4LRFXY.js → chunk-VDQYQAHM.js} +2 -2
  110. package/dist/browser/{chunk-BK4LRFXY.js.map → chunk-VDQYQAHM.js.map} +1 -1
  111. package/dist/browser/{chunk-MR4YHEKX.js → chunk-VPRG4WZA.js} +2 -2
  112. package/dist/browser/{chunk-MR4YHEKX.js.map → chunk-VPRG4WZA.js.map} +1 -1
  113. package/dist/browser/{chunk-UXF4JZOD.js → chunk-XEB43J5Q.js} +2 -2
  114. package/dist/browser/chunk-XEB43J5Q.js.map +1 -0
  115. package/dist/browser/{chunk-5XMAKC7Z.js → chunk-XHZFIDDV.js} +2 -2
  116. package/dist/browser/{chunk-5XMAKC7Z.js.map → chunk-XHZFIDDV.js.map} +1 -1
  117. package/dist/browser/{chunk-UM2REEE6.js → chunk-XKIXQLFN.js} +2 -2
  118. package/dist/browser/{chunk-UM2REEE6.js.map → chunk-XKIXQLFN.js.map} +1 -1
  119. package/dist/browser/{chunk-4P3LD6GI.js → chunk-YIBHO7CN.js} +2 -2
  120. package/dist/browser/{chunk-4P3LD6GI.js.map → chunk-YIBHO7CN.js.map} +1 -1
  121. package/dist/browser/{chunk-TUDWKSAB.js → chunk-YMBKK3WL.js} +2 -2
  122. package/dist/browser/{chunk-TUDWKSAB.js.map → chunk-YMBKK3WL.js.map} +1 -1
  123. package/dist/browser/{chunk-U74BMWFM.js → chunk-Z2PD74DL.js} +2 -2
  124. package/dist/browser/{chunk-U74BMWFM.js.map → chunk-Z2PD74DL.js.map} +1 -1
  125. package/dist/browser/{chunk-S22HXPZL.js → chunk-ZKS444CY.js} +2 -2
  126. package/dist/browser/{chunk-S22HXPZL.js.map → chunk-ZKS444CY.js.map} +1 -1
  127. package/dist/browser/{hive-DkEPbBoe.d.ts → hive-BtyYkHAm.d.ts} +14 -1
  128. package/dist/browser/hive-tx/Transaction.js +1 -1
  129. package/dist/browser/hive-tx/index.js +1 -1
  130. package/dist/browser/hive.d.ts +1 -1
  131. package/dist/browser/hive.js +1 -1
  132. package/dist/browser/index.d.ts +2 -2
  133. package/dist/browser/index.js +1 -1
  134. package/dist/browser/modules/accounts/index.js +1 -1
  135. package/dist/browser/modules/accounts/mutations/bookmarks/index.js +1 -1
  136. package/dist/browser/modules/accounts/mutations/bookmarks/use-account-bookmark-add.js +1 -1
  137. package/dist/browser/modules/accounts/mutations/bookmarks/use-account-bookmark-delete.js +1 -1
  138. package/dist/browser/modules/accounts/mutations/favorite-tags/index.js +1 -1
  139. package/dist/browser/modules/accounts/mutations/favorite-tags/requests.js +1 -1
  140. package/dist/browser/modules/accounts/mutations/favorite-tags/use-favorite-tag-add.js +1 -1
  141. package/dist/browser/modules/accounts/mutations/favorite-tags/use-favorite-tag-delete.js +1 -1
  142. package/dist/browser/modules/accounts/mutations/favorites/index.js +1 -1
  143. package/dist/browser/modules/accounts/mutations/favorites/use-account-favorite-add.js +1 -1
  144. package/dist/browser/modules/accounts/mutations/favorites/use-account-favorite-delete.js +1 -1
  145. package/dist/browser/modules/accounts/mutations/index.js +1 -1
  146. package/dist/browser/modules/accounts/mutations/use-account-relations-update.js +1 -1
  147. package/dist/browser/modules/accounts/mutations/use-account-revoke-key.js +1 -1
  148. package/dist/browser/modules/accounts/mutations/use-account-revoke-posting.js +1 -1
  149. package/dist/browser/modules/accounts/mutations/use-account-update-key-auths.js +1 -1
  150. package/dist/browser/modules/accounts/mutations/use-account-update-password.js +1 -1
  151. package/dist/browser/modules/accounts/mutations/use-account-update-recovery.js +1 -1
  152. package/dist/browser/modules/accounts/mutations/use-account-update.js +1 -1
  153. package/dist/browser/modules/accounts/mutations/use-claim-account.js +1 -1
  154. package/dist/browser/modules/accounts/mutations/use-create-account.js +1 -1
  155. package/dist/browser/modules/accounts/mutations/use-follow.js +1 -1
  156. package/dist/browser/modules/accounts/mutations/use-grant-posting-permission.js +1 -1
  157. package/dist/browser/modules/accounts/mutations/use-unfollow.js +1 -1
  158. package/dist/browser/modules/accounts/queries/check-favorite-query-options.js +1 -1
  159. package/dist/browser/modules/accounts/queries/check-username-wallets-pending-query-options.js +1 -1
  160. package/dist/browser/modules/accounts/queries/get-account-full-query-options.js +1 -1
  161. package/dist/browser/modules/accounts/queries/get-account-pending-recovery-query-options.js +1 -1
  162. package/dist/browser/modules/accounts/queries/get-account-recoveries-query-options.js +1 -1
  163. package/dist/browser/modules/accounts/queries/get-account-reputations-query-options.js +1 -1
  164. package/dist/browser/modules/accounts/queries/get-account-subscriptions-query-options.js +1 -1
  165. package/dist/browser/modules/accounts/queries/get-account-vote-history-infinite-query-options.js +1 -1
  166. package/dist/browser/modules/accounts/queries/get-accounts-query-options.js +1 -1
  167. package/dist/browser/modules/accounts/queries/get-aggregated-balance-query-options.js +1 -1
  168. package/dist/browser/modules/accounts/queries/get-balance-history-query-options.js +1 -1
  169. package/dist/browser/modules/accounts/queries/get-bookmarks-query-options.js +1 -1
  170. package/dist/browser/modules/accounts/queries/get-bots-query-options.js +1 -1
  171. package/dist/browser/modules/accounts/queries/get-favorite-tag-check-query-options.js +1 -1
  172. package/dist/browser/modules/accounts/queries/get-favorite-tags-query-options.js +1 -1
  173. package/dist/browser/modules/accounts/queries/get-favorites-query-options.js +1 -1
  174. package/dist/browser/modules/accounts/queries/get-follow-count-query-options.js +1 -1
  175. package/dist/browser/modules/accounts/queries/get-followers-query-options.js +1 -1
  176. package/dist/browser/modules/accounts/queries/get-following-query-options.js +1 -1
  177. package/dist/browser/modules/accounts/queries/get-friends-infinite-query-options.js +1 -1
  178. package/dist/browser/modules/accounts/queries/get-muted-users-query-options.js +1 -1
  179. package/dist/browser/modules/accounts/queries/get-pro-members-query-options.js +1 -1
  180. package/dist/browser/modules/accounts/queries/get-profiles-query-options.js +1 -1
  181. package/dist/browser/modules/accounts/queries/get-referrals-infinite-query-options.js +1 -1
  182. package/dist/browser/modules/accounts/queries/get-referrals-stats-query-options.js +1 -1
  183. package/dist/browser/modules/accounts/queries/get-relationship-between-accounts-query-options.js +1 -1
  184. package/dist/browser/modules/accounts/queries/get-search-friends-query-options.js +1 -1
  185. package/dist/browser/modules/accounts/queries/get-transactions-infinite-query-options.js +1 -1
  186. package/dist/browser/modules/accounts/queries/index.js +1 -1
  187. package/dist/browser/modules/accounts/queries/lookup-accounts-query-options.js +1 -1
  188. package/dist/browser/modules/accounts/queries/search-accounts-by-username-query-options.js +1 -1
  189. package/dist/browser/modules/accounts/utils/account-power.js +1 -1
  190. package/dist/browser/modules/accounts/utils/index.js +1 -1
  191. package/dist/browser/modules/ai/index.js +1 -1
  192. package/dist/browser/modules/ai/mutations/index.js +1 -1
  193. package/dist/browser/modules/ai/mutations/use-ai-assist.js +1 -1
  194. package/dist/browser/modules/ai/mutations/use-ai-transcribe.js +1 -1
  195. package/dist/browser/modules/ai/mutations/use-generate-image.js +1 -1
  196. package/dist/browser/modules/ai/queries/get-ai-assist-price-query-options.js +1 -1
  197. package/dist/browser/modules/ai/queries/get-ai-generate-price-query-options.js +1 -1
  198. package/dist/browser/modules/ai/queries/get-ai-images-query-options.js +1 -1
  199. package/dist/browser/modules/ai/queries/get-ai-transcribe-price-query-options.js +1 -1
  200. package/dist/browser/modules/ai/queries/index.js +1 -1
  201. package/dist/browser/modules/analytics/index.js +1 -1
  202. package/dist/browser/modules/analytics/mutations/index.js +1 -1
  203. package/dist/browser/modules/analytics/mutations/use-record-activity.js +1 -1
  204. package/dist/browser/modules/analytics/queries/get-discover-curation-query-options.js +1 -1
  205. package/dist/browser/modules/analytics/queries/get-discover-leaderboard-query-options.js +1 -1
  206. package/dist/browser/modules/analytics/queries/get-page-stats-query-options.js +1 -1
  207. package/dist/browser/modules/analytics/queries/index.js +1 -1
  208. package/dist/browser/modules/auth/index.js +1 -1
  209. package/dist/browser/modules/auth/requests.js +1 -1
  210. package/dist/browser/modules/bad-actors/index.js +1 -1
  211. package/dist/browser/modules/bad-actors/queries/get-bad-actors-query-options.js +1 -1
  212. package/dist/browser/modules/bad-actors/queries/index.js +1 -1
  213. package/dist/browser/modules/bridge/index.js +1 -1
  214. package/dist/browser/modules/bridge/requests.js +1 -1
  215. package/dist/browser/modules/bridge/verify-on-alternate-node.js +1 -1
  216. package/dist/browser/modules/communities/index.js +1 -1
  217. package/dist/browser/modules/communities/mutations/index.js +1 -1
  218. package/dist/browser/modules/communities/mutations/use-mute-post.js +1 -1
  219. package/dist/browser/modules/communities/mutations/use-pin-post.js +1 -1
  220. package/dist/browser/modules/communities/mutations/use-register-community-rewards.js +1 -1
  221. package/dist/browser/modules/communities/mutations/use-set-community-role.js +1 -1
  222. package/dist/browser/modules/communities/mutations/use-subscribe-community.js +1 -1
  223. package/dist/browser/modules/communities/mutations/use-unsubscribe-community.js +1 -1
  224. package/dist/browser/modules/communities/mutations/use-update-community.js +1 -1
  225. package/dist/browser/modules/communities/queries/get-account-notifications-infinite-query-options.js +1 -1
  226. package/dist/browser/modules/communities/queries/get-communities-query-options.js +1 -1
  227. package/dist/browser/modules/communities/queries/get-community-context-query-options.js +1 -1
  228. package/dist/browser/modules/communities/queries/get-community-query-options.js +1 -1
  229. package/dist/browser/modules/communities/queries/get-community-subscribers-query-options.js +1 -1
  230. package/dist/browser/modules/communities/queries/get-rewarded-communities-query-options.js +1 -1
  231. package/dist/browser/modules/communities/queries/index.js +1 -1
  232. package/dist/browser/modules/core/config.js +1 -1
  233. package/dist/browser/modules/core/hive-tx.js +1 -1
  234. package/dist/browser/modules/core/index.js +1 -1
  235. package/dist/browser/modules/core/mutations/broadcast-json.js +1 -1
  236. package/dist/browser/modules/core/mutations/index.js +1 -1
  237. package/dist/browser/modules/core/mutations/use-broadcast-mutation.js +1 -1
  238. package/dist/browser/modules/core/queries/get-chain-properties-query-options.js +1 -1
  239. package/dist/browser/modules/core/queries/get-dynamic-props-query-options.js +1 -1
  240. package/dist/browser/modules/core/queries/get-reward-fund-query-options.js +1 -1
  241. package/dist/browser/modules/core/queries/index.js +1 -1
  242. package/dist/browser/modules/core/queries-manager.js +1 -1
  243. package/dist/browser/modules/curation/dmca.js +1 -1
  244. package/dist/browser/modules/curation/index.js +1 -1
  245. package/dist/browser/modules/curation/mutations/index.js +1 -1
  246. package/dist/browser/modules/curation/mutations/use-curation-recommend.js +1 -1
  247. package/dist/browser/modules/curation/queries/get-curation-application-query-options.js +1 -1
  248. package/dist/browser/modules/curation/queries/get-curation-applications-query-options.js +1 -1
  249. package/dist/browser/modules/curation/queries/get-curation-feed-infinite-query-options.js +1 -1
  250. package/dist/browser/modules/curation/queries/get-curation-post-query-options.js +1 -1
  251. package/dist/browser/modules/curation/queries/get-curation-recommendations-infinite-query-options.js +1 -1
  252. package/dist/browser/modules/curation/queries/get-curation-recommender-query-options.js +1 -1
  253. package/dist/browser/modules/curation/queries/get-curation-roster-admin-query-options.js +1 -1
  254. package/dist/browser/modules/curation/queries/get-curation-roster-query-options.js +1 -1
  255. package/dist/browser/modules/curation/queries/get-curation-status-query-options.js +1 -1
  256. package/dist/browser/modules/curation/queries/index.js +1 -1
  257. package/dist/browser/modules/curation/requests.js +1 -1
  258. package/dist/browser/modules/games/index.js +1 -1
  259. package/dist/browser/modules/games/mutations/game-claim.js +1 -1
  260. package/dist/browser/modules/games/mutations/index.js +1 -1
  261. package/dist/browser/modules/games/queries/game-status-check-query-options.js +1 -1
  262. package/dist/browser/modules/games/queries/index.js +1 -1
  263. package/dist/browser/modules/hive-engine/index.js +1 -1
  264. package/dist/browser/modules/hive-engine/queries/get-all-hive-engine-tokens-query-options.js +1 -1
  265. package/dist/browser/modules/hive-engine/queries/get-hive-engine-balances-with-usd-query-options.js +1 -1
  266. package/dist/browser/modules/hive-engine/queries/get-hive-engine-token-general-info-query-options.js +1 -1
  267. package/dist/browser/modules/hive-engine/queries/get-hive-engine-token-metrics-query-options.js +1 -1
  268. package/dist/browser/modules/hive-engine/queries/get-hive-engine-token-transactions-query-options.js +1 -1
  269. package/dist/browser/modules/hive-engine/queries/get-hive-engine-tokens-balances-query-options.js +1 -1
  270. package/dist/browser/modules/hive-engine/queries/get-hive-engine-tokens-market-query-options.js +1 -1
  271. package/dist/browser/modules/hive-engine/queries/get-hive-engine-tokens-metadata-query-options.js +1 -1
  272. package/dist/browser/modules/hive-engine/queries/get-hive-engine-unclaimed-rewards-query-options.js +1 -1
  273. package/dist/browser/modules/hive-engine/queries/index.js +1 -1
  274. package/dist/browser/modules/hive-engine/requests.js +1 -1
  275. package/dist/browser/modules/integrations/3speak/index.js +1 -1
  276. package/dist/browser/modules/integrations/3speak/queries/get-account-token-query-options.js +1 -1
  277. package/dist/browser/modules/integrations/3speak/queries/get-account-videos-query-options.js +1 -1
  278. package/dist/browser/modules/integrations/3speak/queries/index.js +1 -1
  279. package/dist/browser/modules/integrations/hiveposh/index.js +1 -1
  280. package/dist/browser/modules/integrations/hiveposh/queries/get-hiveposh-links-query-options.js +1 -1
  281. package/dist/browser/modules/integrations/hiveposh/queries/index.js +1 -1
  282. package/dist/browser/modules/integrations/index.js +1 -1
  283. package/dist/browser/modules/integrations/plausible/index.js +1 -1
  284. package/dist/browser/modules/integrations/plausible/queries/get-stats-query-options.js +1 -1
  285. package/dist/browser/modules/integrations/plausible/queries/index.js +1 -1
  286. package/dist/browser/modules/market/index.js +1 -1
  287. package/dist/browser/modules/market/mutations/index.js +1 -1
  288. package/dist/browser/modules/market/mutations/use-limit-order-cancel.js +1 -1
  289. package/dist/browser/modules/market/mutations/use-limit-order-create.js +1 -1
  290. package/dist/browser/modules/market/queries/get-current-median-history-price-query-options.js +1 -1
  291. package/dist/browser/modules/market/queries/get-feed-history-query-options.js +1 -1
  292. package/dist/browser/modules/market/queries/get-hive-hbd-stats-query-options.js +1 -1
  293. package/dist/browser/modules/market/queries/get-market-data-query-options.js +1 -1
  294. package/dist/browser/modules/market/queries/get-market-history-query-options.js +1 -1
  295. package/dist/browser/modules/market/queries/get-market-statistics-query-options.js +1 -1
  296. package/dist/browser/modules/market/queries/get-order-book-query-options.js +1 -1
  297. package/dist/browser/modules/market/queries/get-trade-history-query-options.js +1 -1
  298. package/dist/browser/modules/market/queries/index.js +1 -1
  299. package/dist/browser/modules/market/requests.js +1 -1
  300. package/dist/browser/modules/newsletter/api.js +1 -1
  301. package/dist/browser/modules/newsletter/index.js +1 -1
  302. package/dist/browser/modules/newsletter/mutations/index.js +1 -1
  303. package/dist/browser/modules/newsletter/mutations/use-leave-digest.js +1 -1
  304. package/dist/browser/modules/newsletter/mutations/use-send-newsletter-issue.js +1 -1
  305. package/dist/browser/modules/newsletter/mutations/use-subscribe-digest.js +1 -1
  306. package/dist/browser/modules/newsletter/mutations/use-unsubscribe-all-digests.js +1 -1
  307. package/dist/browser/modules/newsletter/queries/get-digest-subscriptions-query-options.js +1 -1
  308. package/dist/browser/modules/newsletter/queries/get-newsletter-issues-query-options.js +1 -1
  309. package/dist/browser/modules/newsletter/queries/get-newsletter-posts-query-options.js +1 -1
  310. package/dist/browser/modules/newsletter/queries/get-newsletter-sender-query-options.js +1 -1
  311. package/dist/browser/modules/newsletter/queries/index.js +1 -1
  312. package/dist/browser/modules/notifications/index.js +1 -1
  313. package/dist/browser/modules/notifications/mutations/index.js +1 -1
  314. package/dist/browser/modules/notifications/mutations/use-mark-notifications-read.js +1 -1
  315. package/dist/browser/modules/notifications/mutations/use-set-last-read.js +1 -1
  316. package/dist/browser/modules/notifications/queries/get-announcements-query-options.js +1 -1
  317. package/dist/browser/modules/notifications/queries/get-notifications-infinite-query-options.js +1 -1
  318. package/dist/browser/modules/notifications/queries/get-notifications-settings-query-options.js +1 -1
  319. package/dist/browser/modules/notifications/queries/get-notifications-unread-count-query-options.js +1 -1
  320. package/dist/browser/modules/notifications/queries/get-spotlights-query-options.js +1 -1
  321. package/dist/browser/modules/notifications/queries/index.js +1 -1
  322. package/dist/browser/modules/operations/index.js +1 -1
  323. package/dist/browser/modules/operations/mutations/index.js +1 -1
  324. package/dist/browser/modules/operations/mutations/sign-operation-by-key.js +1 -1
  325. package/dist/browser/modules/operations/queries/get-chain-properties-query-options.js +1 -1
  326. package/dist/browser/modules/operations/queries/index.js +1 -1
  327. package/dist/browser/modules/points/index.js +1 -1
  328. package/dist/browser/modules/points/mutations/index.js +1 -1
  329. package/dist/browser/modules/points/mutations/use-claim-points.js +1 -1
  330. package/dist/browser/modules/points/queries/get-points-asset-general-info-query-options.js +1 -1
  331. package/dist/browser/modules/points/queries/get-points-asset-transactions-query-options.js +1 -1
  332. package/dist/browser/modules/points/queries/get-points-query-options.js +1 -1
  333. package/dist/browser/modules/points/queries/index.js +1 -1
  334. package/dist/browser/modules/polls/index.js +1 -1
  335. package/dist/browser/modules/polls/mutations/index.js +1 -1
  336. package/dist/browser/modules/polls/mutations/use-poll-vote.js +1 -1
  337. package/dist/browser/modules/polls/queries/get-poll-query-options.js +1 -1
  338. package/dist/browser/modules/polls/queries/index.js +1 -1
  339. package/dist/browser/modules/posts/cache/discussions-cache-utils.js +1 -1
  340. package/dist/browser/modules/posts/cache/entries-cache-management.js +1 -1
  341. package/dist/browser/modules/posts/cache/index.js +1 -1
  342. package/dist/browser/modules/posts/index.js +1 -1
  343. package/dist/browser/modules/posts/mutations/add-fragment.js +1 -1
  344. package/dist/browser/modules/posts/mutations/edit-fragment.js +1 -1
  345. package/dist/browser/modules/posts/mutations/index.js +1 -1
  346. package/dist/browser/modules/posts/mutations/remove-fragment.js +1 -1
  347. package/dist/browser/modules/posts/mutations/use-add-draft.js +1 -1
  348. package/dist/browser/modules/posts/mutations/use-add-image.js +1 -1
  349. package/dist/browser/modules/posts/mutations/use-add-schedule.js +1 -1
  350. package/dist/browser/modules/posts/mutations/use-comment.js +1 -1
  351. package/dist/browser/modules/posts/mutations/use-cross-post.js +1 -1
  352. package/dist/browser/modules/posts/mutations/use-delete-comment.js +1 -1
  353. package/dist/browser/modules/posts/mutations/use-delete-draft.js +1 -1
  354. package/dist/browser/modules/posts/mutations/use-delete-image.js +1 -1
  355. package/dist/browser/modules/posts/mutations/use-delete-schedule.js +1 -1
  356. package/dist/browser/modules/posts/mutations/use-move-schedule.js +1 -1
  357. package/dist/browser/modules/posts/mutations/use-promote.js +1 -1
  358. package/dist/browser/modules/posts/mutations/use-reblog.js +1 -1
  359. package/dist/browser/modules/posts/mutations/use-update-draft.js +1 -1
  360. package/dist/browser/modules/posts/mutations/use-update-reply.js +1 -1
  361. package/dist/browser/modules/posts/mutations/use-upload-image.js +1 -1
  362. package/dist/browser/modules/posts/mutations/use-vote.js +1 -1
  363. package/dist/browser/modules/posts/queries/get-account-posts-query-options.js +1 -1
  364. package/dist/browser/modules/posts/queries/get-comment-history-query-options.js +1 -1
  365. package/dist/browser/modules/posts/queries/get-content-query-options.js +1 -1
  366. package/dist/browser/modules/posts/queries/get-content-replies-query-options.js +1 -1
  367. package/dist/browser/modules/posts/queries/get-deleted-entry-query-options.js +1 -1
  368. package/dist/browser/modules/posts/queries/get-discussions-query-options.js +1 -1
  369. package/dist/browser/modules/posts/queries/get-drafts-query-options.js +1 -1
  370. package/dist/browser/modules/posts/queries/get-entry-active-votes-query-options.js +1 -1
  371. package/dist/browser/modules/posts/queries/get-fragments-query-options.js +1 -1
  372. package/dist/browser/modules/posts/queries/get-images-query-options.js +1 -1
  373. package/dist/browser/modules/posts/queries/get-normalize-post-query-options.js +1 -1
  374. package/dist/browser/modules/posts/queries/get-post-header-query-options.js +1 -1
  375. package/dist/browser/modules/posts/queries/get-post-query-options.js +1 -1
  376. package/dist/browser/modules/posts/queries/get-post-tips-query-options.js +1 -1
  377. package/dist/browser/modules/posts/queries/get-posts-ranked-query-options.js +1 -1
  378. package/dist/browser/modules/posts/queries/get-promoted-posts-query-options.js +1 -1
  379. package/dist/browser/modules/posts/queries/get-reblogged-by-query-options.js +1 -1
  380. package/dist/browser/modules/posts/queries/get-reblogs-query-options.js +1 -1
  381. package/dist/browser/modules/posts/queries/get-schedules-query-options.js +1 -1
  382. package/dist/browser/modules/posts/queries/get-shorts-feed-query-options.js +1 -1
  383. package/dist/browser/modules/posts/queries/get-trending-tags-query-options.js +1 -1
  384. package/dist/browser/modules/posts/queries/get-trending-tags-with-stats-query-options.js +1 -1
  385. package/dist/browser/modules/posts/queries/get-user-post-vote-query-options.js +1 -1
  386. package/dist/browser/modules/posts/queries/get-waves-by-account-query-options.js +1 -1
  387. package/dist/browser/modules/posts/queries/get-waves-by-host-query-options.js +1 -1
  388. package/dist/browser/modules/posts/queries/get-waves-by-tag-query-options.js +1 -1
  389. package/dist/browser/modules/posts/queries/get-waves-feed-query-options.js +1 -1
  390. package/dist/browser/modules/posts/queries/get-waves-following-query-options.js +1 -1
  391. package/dist/browser/modules/posts/queries/get-waves-trending-authors-query-options.js +1 -1
  392. package/dist/browser/modules/posts/queries/get-waves-trending-tags-query-options.js +1 -1
  393. package/dist/browser/modules/posts/queries/index.js +1 -1
  394. package/dist/browser/modules/posts/utils/filter-dmca-entries.js +1 -1
  395. package/dist/browser/modules/posts/utils/validate-post-creating.js +1 -1
  396. package/dist/browser/modules/posts/utils/waves-helpers.js +1 -1
  397. package/dist/browser/modules/private-api/index.js +1 -1
  398. package/dist/browser/modules/private-api/requests.js +1 -1
  399. package/dist/browser/modules/promotions/index.js +1 -1
  400. package/dist/browser/modules/promotions/mutations/index.js +1 -1
  401. package/dist/browser/modules/promotions/mutations/use-boost-plus.js +1 -1
  402. package/dist/browser/modules/promotions/mutations/use-rc-delegation.js +1 -1
  403. package/dist/browser/modules/promotions/queries/get-boost-plus-account-prices-query-options.js +1 -1
  404. package/dist/browser/modules/promotions/queries/get-boost-plus-prices-query-options.js +1 -1
  405. package/dist/browser/modules/promotions/queries/get-promote-price-query-options.js +1 -1
  406. package/dist/browser/modules/promotions/queries/get-rc-delegation-active-query-options.js +1 -1
  407. package/dist/browser/modules/promotions/queries/get-rc-delegation-prices-query-options.js +1 -1
  408. package/dist/browser/modules/promotions/queries/index.js +1 -1
  409. package/dist/browser/modules/proposals/index.js +1 -1
  410. package/dist/browser/modules/proposals/mutations/index.js +1 -1
  411. package/dist/browser/modules/proposals/mutations/use-proposal-create.js +1 -1
  412. package/dist/browser/modules/proposals/mutations/use-proposal-vote.js +1 -1
  413. package/dist/browser/modules/proposals/queries/get-proposal-query-options.js +1 -1
  414. package/dist/browser/modules/proposals/queries/get-proposal-votes-query-options.js +1 -1
  415. package/dist/browser/modules/proposals/queries/get-proposals-query-options.js +1 -1
  416. package/dist/browser/modules/proposals/queries/get-user-proposal-votes-query-options.js +1 -1
  417. package/dist/browser/modules/proposals/queries/index.js +1 -1
  418. package/dist/browser/modules/quests/index.js +1 -1
  419. package/dist/browser/modules/quests/mutations/buy-streak-freeze.js +1 -1
  420. package/dist/browser/modules/quests/mutations/index.js +1 -1
  421. package/dist/browser/modules/quests/queries/get-quests-query-options.js +1 -1
  422. package/dist/browser/modules/quests/queries/index.js +1 -1
  423. package/dist/browser/modules/resource-credits/index.js +1 -1
  424. package/dist/browser/modules/resource-credits/queries/get-account-rc-query-options.js +1 -1
  425. package/dist/browser/modules/resource-credits/queries/get-rc-resource-params-query-options.js +1 -1
  426. package/dist/browser/modules/resource-credits/queries/get-rc-stats-query-options.js +1 -1
  427. package/dist/browser/modules/resource-credits/queries/index.js +1 -1
  428. package/dist/browser/modules/resource-credits/utils/estimate-rc-precheck.js +1 -1
  429. package/dist/browser/modules/resource-credits/utils/index.js +1 -1
  430. package/dist/browser/modules/search/dmca.js +1 -1
  431. package/dist/browser/modules/search/index.js +1 -1
  432. package/dist/browser/modules/search/parse-json-response.js +1 -1
  433. package/dist/browser/modules/search/queries/get-search-account-query-options.js +1 -1
  434. package/dist/browser/modules/search/queries/get-search-api-infinite-query-options.js +1 -1
  435. package/dist/browser/modules/search/queries/get-search-path-query-options.js +1 -1
  436. package/dist/browser/modules/search/queries/get-search-query-options.js +1 -1
  437. package/dist/browser/modules/search/queries/get-search-topics-query-options.js +1 -1
  438. package/dist/browser/modules/search/queries/get-similar-entries-query-options.js +1 -1
  439. package/dist/browser/modules/search/queries/index.js +1 -1
  440. package/dist/browser/modules/search/requests.js +1 -1
  441. package/dist/browser/modules/support/index.js +1 -1
  442. package/dist/browser/modules/support/mutations/index.js +1 -1
  443. package/dist/browser/modules/support/mutations/update-support-settings.js +1 -1
  444. package/dist/browser/modules/support/queries/get-support-settings-query-options.js +1 -1
  445. package/dist/browser/modules/support/queries/index.js +1 -1
  446. package/dist/browser/modules/wallet/consts/hive-account-operation-groups.js +1 -1
  447. package/dist/browser/modules/wallet/consts/hive-operation-list.js +1 -1
  448. package/dist/browser/modules/wallet/consts/hive-operation-orders.js +1 -1
  449. package/dist/browser/modules/wallet/consts/index.js +1 -1
  450. package/dist/browser/modules/wallet/index.js +1 -1
  451. package/dist/browser/modules/wallet/mutations/index.js +1 -1
  452. package/dist/browser/modules/wallet/mutations/use-claim-engine-rewards.js +1 -1
  453. package/dist/browser/modules/wallet/mutations/use-claim-interest.js +1 -1
  454. package/dist/browser/modules/wallet/mutations/use-claim-rewards.js +1 -1
  455. package/dist/browser/modules/wallet/mutations/use-convert.js +1 -1
  456. package/dist/browser/modules/wallet/mutations/use-delegate-engine-token.js +1 -1
  457. package/dist/browser/modules/wallet/mutations/use-delegate-rc.js +1 -1
  458. package/dist/browser/modules/wallet/mutations/use-delegate-vesting-shares.js +1 -1
  459. package/dist/browser/modules/wallet/mutations/use-engine-market-order.js +1 -1
  460. package/dist/browser/modules/wallet/mutations/use-set-withdraw-vesting-route.js +1 -1
  461. package/dist/browser/modules/wallet/mutations/use-stake-engine-token.js +1 -1
  462. package/dist/browser/modules/wallet/mutations/use-transfer-engine-token.js +1 -1
  463. package/dist/browser/modules/wallet/mutations/use-transfer-from-savings.js +1 -1
  464. package/dist/browser/modules/wallet/mutations/use-transfer-point.js +1 -1
  465. package/dist/browser/modules/wallet/mutations/use-transfer-to-savings.js +1 -1
  466. package/dist/browser/modules/wallet/mutations/use-transfer-to-vesting.js +1 -1
  467. package/dist/browser/modules/wallet/mutations/use-transfer.js +1 -1
  468. package/dist/browser/modules/wallet/mutations/use-undelegate-engine-token.js +1 -1
  469. package/dist/browser/modules/wallet/mutations/use-unstake-engine-token.js +1 -1
  470. package/dist/browser/modules/wallet/mutations/use-wallet-operation.js +1 -1
  471. package/dist/browser/modules/wallet/mutations/use-withdraw-vesting.js +1 -1
  472. package/dist/browser/modules/wallet/queries/get-account-delegations-query-options.js +1 -1
  473. package/dist/browser/modules/wallet/queries/get-account-wallet-asset-info-query-options.js +1 -1
  474. package/dist/browser/modules/wallet/queries/get-collateralized-conversion-requests-query-options.js +1 -1
  475. package/dist/browser/modules/wallet/queries/get-conversion-requests-query-options.js +1 -1
  476. package/dist/browser/modules/wallet/queries/get-hbd-asset-general-info-query-options.js +1 -1
  477. package/dist/browser/modules/wallet/queries/get-hbd-asset-transactions-query-options.js +1 -1
  478. package/dist/browser/modules/wallet/queries/get-hive-asset-general-info-query-options.js +1 -1
  479. package/dist/browser/modules/wallet/queries/get-hive-asset-metric-query-options.js +1 -1
  480. package/dist/browser/modules/wallet/queries/get-hive-asset-transactions-query-options.js +1 -1
  481. package/dist/browser/modules/wallet/queries/get-hive-asset-withdrawal-routes-query-options.js +1 -1
  482. package/dist/browser/modules/wallet/queries/get-hive-power-asset-general-info-query-options.js +1 -1
  483. package/dist/browser/modules/wallet/queries/get-hive-power-asset-transactions-query-options.js +1 -1
  484. package/dist/browser/modules/wallet/queries/get-hive-power-delegates-query-options.js +1 -1
  485. package/dist/browser/modules/wallet/queries/get-hive-power-delegatings-query-options.js +1 -1
  486. package/dist/browser/modules/wallet/queries/get-incoming-rc-query-options.js +1 -1
  487. package/dist/browser/modules/wallet/queries/get-open-orders-query-options.js +1 -1
  488. package/dist/browser/modules/wallet/queries/get-outgoing-rc-delegations-infinite-query-options.js +1 -1
  489. package/dist/browser/modules/wallet/queries/get-portfolio-query-options.js +1 -1
  490. package/dist/browser/modules/wallet/queries/get-received-vesting-shares-query-options.js +1 -1
  491. package/dist/browser/modules/wallet/queries/get-recurrent-transfers-query-options.js +1 -1
  492. package/dist/browser/modules/wallet/queries/get-savings-withdraw-from-query-options.js +1 -1
  493. package/dist/browser/modules/wallet/queries/get-vesting-delegation-expirations-query-options.js +1 -1
  494. package/dist/browser/modules/wallet/queries/get-vesting-delegations-query-options.js +1 -1
  495. package/dist/browser/modules/wallet/queries/get-withdraw-routes-query-options.js +1 -1
  496. package/dist/browser/modules/wallet/queries/index.js +1 -1
  497. package/dist/browser/modules/witnesses/index.js +1 -1
  498. package/dist/browser/modules/witnesses/mutations/index.js +1 -1
  499. package/dist/browser/modules/witnesses/mutations/use-witness-proxy.js +1 -1
  500. package/dist/browser/modules/witnesses/mutations/use-witness-vote.js +1 -1
  501. package/dist/browser/modules/witnesses/queries/get-witnesses-query-options.js +1 -1
  502. package/dist/browser/modules/witnesses/queries/index.js +1 -1
  503. package/dist/node/hive.cjs +2 -2
  504. package/dist/node/hive.cjs.map +1 -1
  505. package/dist/node/hive.mjs +2 -2
  506. package/dist/node/hive.mjs.map +1 -1
  507. package/dist/node/index.cjs +3 -3
  508. package/dist/node/index.cjs.map +1 -1
  509. package/dist/node/index.mjs +3 -3
  510. package/dist/node/index.mjs.map +1 -1
  511. package/package.json +1 -1
  512. package/dist/browser/chunk-E6WHRKBG.js +0 -2
  513. package/dist/browser/chunk-E6WHRKBG.js.map +0 -1
  514. package/dist/browser/chunk-K2DAN37J.js +0 -2
  515. package/dist/browser/chunk-PHNYLTEH.js +0 -2
  516. package/dist/browser/chunk-UXF4JZOD.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/wallet/queries/get-hbd-asset-general-info-query-options.ts"],"names":["getHbdAssetGeneralInfoQueryOptions","username","queryOptions","getQueryClient","getDynamicPropsQueryOptions","getAccountFullQueryOptions","accountData","dynamicProps","price","parseAsset"],"mappings":"wMAQO,SAASA,CAAAA,CAAmCC,CAAAA,CAAkB,CACnE,OAAOC,YAAAA,CAAa,CAClB,QAAA,CAAU,CAAC,QAAA,CAAU,KAAA,CAAO,cAAA,CAAgBD,CAAQ,CAAA,CACpD,SAAA,CAAW,GAAA,CACX,eAAA,CAAiB,GAAA,CACjB,OAAA,CAAS,SAAY,CACnB,MAAME,CAAAA,EAAe,CAAE,aAAA,CAAcC,CAAAA,EAA6B,CAAA,CAClE,MAAMD,CAAAA,EAAe,CAAE,aAAA,CACrBE,GAAAA,CAA2BJ,CAAQ,CACrC,CAAA,CAEA,IAAMK,CAAAA,CAAcH,CAAAA,EAAe,CAAE,YAAA,CACnCE,GAAAA,CAA2BJ,CAAQ,CAAA,CAAE,QACvC,CAAA,CACMM,GAAAA,CAAeJ,CAAAA,EAAe,CAAE,YAAA,CACpCC,CAAAA,EAA4B,CAAE,QAChC,CAAA,CAEMI,CAAAA,CAAQ,CAAA,CAEd,OAAKF,CAAAA,CASE,CACL,IAAA,CAAM,KAAA,CACN,KAAA,CAAO,aAAA,CACP,KAAA,CAAAE,CAAAA,CACA,cAAA,CACEC,CAAAA,CAAWH,CAAAA,CAAY,WAAW,CAAA,CAAE,MAAA,CACpCG,CAAAA,CAAWH,CAAAA,EAAa,mBAAmB,CAAA,CAAE,MAAA,CAC/C,GAAA,CAAA,CAAA,CAAOC,GAAAA,EAAc,eAAA,EAAmB,CAAA,EAAK,GAAA,EAAK,OAAA,CAAQ,CAAC,CAAA,CAC3D,KAAA,CAAO,CACL,CACE,IAAA,CAAM,SAAA,CACN,OAAA,CAASE,CAAAA,CAAWH,CAAAA,CAAY,WAAW,CAAA,CAAE,MAC/C,CAAA,CACA,CACE,IAAA,CAAM,SAAA,CACN,OAAA,CAASG,CAAAA,CAAWH,CAAAA,CAAY,mBAAmB,CAAA,CAAE,MACvD,CACF,CACF,CAAA,CA1BS,CACL,IAAA,CAAM,KAAA,CACN,KAAA,CAAO,aAAA,CACP,KAAA,CAAAE,CAAAA,CACA,cAAA,CAAgB,CAClB,CAsBJ,CACF,CAAC,CACH","file":"chunk-QXRJ3Q4Y.js","sourcesContent":["import type { DynamicProps } from \"@/modules/core\";\nimport { getAccountFullQueryOptions } from \"@/modules/accounts\";\nimport { getDynamicPropsQueryOptions, getQueryClient } from \"@/modules/core\";\nimport type { FullAccount } from \"@/modules/accounts\";\nimport { queryOptions } from \"@tanstack/react-query\";\nimport type { GeneralAssetInfo } from \"../types\";\nimport { parseAsset } from \"@/modules/core/utils\";\n\nexport function getHbdAssetGeneralInfoQueryOptions(username: string) {\n return queryOptions({\n queryKey: [\"assets\", \"hbd\", \"general-info\", username],\n staleTime: 60000,\n refetchInterval: 90000,\n queryFn: async () => {\n await getQueryClient().prefetchQuery(getDynamicPropsQueryOptions());\n await getQueryClient().prefetchQuery(\n getAccountFullQueryOptions(username)\n );\n\n const accountData = getQueryClient().getQueryData<FullAccount>(\n getAccountFullQueryOptions(username).queryKey\n );\n const dynamicProps = getQueryClient().getQueryData<DynamicProps>(\n getDynamicPropsQueryOptions().queryKey\n );\n\n const price = 1;\n\n if (!accountData) {\n return {\n name: \"HBD\",\n title: \"Hive Dollar\",\n price,\n accountBalance: 0,\n };\n }\n\n return {\n name: \"HBD\",\n title: \"Hive Dollar\",\n price,\n accountBalance:\n parseAsset(accountData.hbd_balance).amount +\n parseAsset(accountData?.savings_hbd_balance).amount,\n apr: ((dynamicProps?.hbdInterestRate ?? 0) / 100).toFixed(3),\n parts: [\n {\n name: \"current\",\n balance: parseAsset(accountData.hbd_balance).amount,\n },\n {\n name: \"savings\",\n balance: parseAsset(accountData.savings_hbd_balance).amount,\n },\n ],\n } satisfies GeneralAssetInfo;\n },\n });\n}\n"]}
1
+ {"version":3,"sources":["../../src/modules/wallet/queries/get-hbd-asset-general-info-query-options.ts"],"names":["getHbdAssetGeneralInfoQueryOptions","username","queryOptions","getQueryClient","getDynamicPropsQueryOptions","getAccountFullQueryOptions","accountData","dynamicProps","price","parseAsset"],"mappings":"wMAQO,SAASA,CAAAA,CAAmCC,CAAAA,CAAkB,CACnE,OAAOC,YAAAA,CAAa,CAClB,QAAA,CAAU,CAAC,QAAA,CAAU,KAAA,CAAO,cAAA,CAAgBD,CAAQ,CAAA,CACpD,SAAA,CAAW,GAAA,CACX,eAAA,CAAiB,GAAA,CACjB,OAAA,CAAS,SAAY,CACnB,MAAME,CAAAA,EAAe,CAAE,aAAA,CAAcC,CAAAA,EAA6B,CAAA,CAClE,MAAMD,CAAAA,EAAe,CAAE,aAAA,CACrBE,GAAAA,CAA2BJ,CAAQ,CACrC,CAAA,CAEA,IAAMK,CAAAA,CAAcH,CAAAA,EAAe,CAAE,YAAA,CACnCE,GAAAA,CAA2BJ,CAAQ,CAAA,CAAE,QACvC,CAAA,CACMM,GAAAA,CAAeJ,CAAAA,EAAe,CAAE,YAAA,CACpCC,CAAAA,EAA4B,CAAE,QAChC,CAAA,CAEMI,CAAAA,CAAQ,CAAA,CAEd,OAAKF,CAAAA,CASE,CACL,IAAA,CAAM,KAAA,CACN,KAAA,CAAO,aAAA,CACP,KAAA,CAAAE,CAAAA,CACA,cAAA,CACEC,CAAAA,CAAWH,CAAAA,CAAY,WAAW,CAAA,CAAE,MAAA,CACpCG,CAAAA,CAAWH,CAAAA,EAAa,mBAAmB,CAAA,CAAE,MAAA,CAC/C,GAAA,CAAA,CAAA,CAAOC,GAAAA,EAAc,eAAA,EAAmB,CAAA,EAAK,GAAA,EAAK,OAAA,CAAQ,CAAC,CAAA,CAC3D,KAAA,CAAO,CACL,CACE,IAAA,CAAM,SAAA,CACN,OAAA,CAASE,CAAAA,CAAWH,CAAAA,CAAY,WAAW,CAAA,CAAE,MAC/C,CAAA,CACA,CACE,IAAA,CAAM,SAAA,CACN,OAAA,CAASG,CAAAA,CAAWH,CAAAA,CAAY,mBAAmB,CAAA,CAAE,MACvD,CACF,CACF,CAAA,CA1BS,CACL,IAAA,CAAM,KAAA,CACN,KAAA,CAAO,aAAA,CACP,KAAA,CAAAE,CAAAA,CACA,cAAA,CAAgB,CAClB,CAsBJ,CACF,CAAC,CACH","file":"chunk-MBDFLDIN.js","sourcesContent":["import type { DynamicProps } from \"@/modules/core\";\nimport { getAccountFullQueryOptions } from \"@/modules/accounts\";\nimport { getDynamicPropsQueryOptions, getQueryClient } from \"@/modules/core\";\nimport type { FullAccount } from \"@/modules/accounts\";\nimport { queryOptions } from \"@tanstack/react-query\";\nimport type { GeneralAssetInfo } from \"../types\";\nimport { parseAsset } from \"@/modules/core/utils\";\n\nexport function getHbdAssetGeneralInfoQueryOptions(username: string) {\n return queryOptions({\n queryKey: [\"assets\", \"hbd\", \"general-info\", username],\n staleTime: 60000,\n refetchInterval: 90000,\n queryFn: async () => {\n await getQueryClient().prefetchQuery(getDynamicPropsQueryOptions());\n await getQueryClient().prefetchQuery(\n getAccountFullQueryOptions(username)\n );\n\n const accountData = getQueryClient().getQueryData<FullAccount>(\n getAccountFullQueryOptions(username).queryKey\n );\n const dynamicProps = getQueryClient().getQueryData<DynamicProps>(\n getDynamicPropsQueryOptions().queryKey\n );\n\n const price = 1;\n\n if (!accountData) {\n return {\n name: \"HBD\",\n title: \"Hive Dollar\",\n price,\n accountBalance: 0,\n };\n }\n\n return {\n name: \"HBD\",\n title: \"Hive Dollar\",\n price,\n accountBalance:\n parseAsset(accountData.hbd_balance).amount +\n parseAsset(accountData?.savings_hbd_balance).amount,\n apr: ((dynamicProps?.hbdInterestRate ?? 0) / 100).toFixed(3),\n parts: [\n {\n name: \"current\",\n balance: parseAsset(accountData.hbd_balance).amount,\n },\n {\n name: \"savings\",\n balance: parseAsset(accountData.savings_hbd_balance).amount,\n },\n ],\n } satisfies GeneralAssetInfo;\n },\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {c,b as b$1}from'./chunk-YYYUKK2U.js';import {d}from'./chunk-EOSE4FQA.js';import {b}from'./chunk-K2DAN37J.js';import {a}from'./chunk-HEILHNSR.js';function A(p,s,y){return b(["posts","deleteComment"],p,({author:o,permlink:t})=>[d(o,t)],async(o,t)=>{if(s?.adapter?.invalidateQueries){let r=[a.accounts.full(p)];if(t.parentAuthor&&t.parentPermlink){r.push(a.posts.entry(`/@${t.parentAuthor}/${t.parentPermlink}`));let n=t.rootAuthor||t.parentAuthor,d=t.rootPermlink||t.parentPermlink;r.push({predicate:h=>{let e=h.queryKey;return Array.isArray(e)&&e[0]==="posts"&&e[1]==="discussions"&&e[2]===n&&e[3]===d}});}await s.adapter.invalidateQueries(r);}},s,"posting",{broadcastMode:y,onMutate:async o=>{let t=o.rootAuthor||o.parentAuthor,r=o.rootPermlink||o.parentPermlink;return t&&r?{snapshots:b$1(o.author,o.permlink,t,r)}:{}},onError:(o,t,r)=>{let{snapshots:n}=r??{};n&&c(n);}})}export{A as a};//# sourceMappingURL=chunk-M3OC7IZG.js.map
2
- //# sourceMappingURL=chunk-M3OC7IZG.js.map
1
+ import {c,b as b$1}from'./chunk-YYYUKK2U.js';import {d}from'./chunk-EOSE4FQA.js';import {b}from'./chunk-J2HM6MWA.js';import {a}from'./chunk-HEILHNSR.js';function A(p,s,y){return b(["posts","deleteComment"],p,({author:o,permlink:t})=>[d(o,t)],async(o,t)=>{if(s?.adapter?.invalidateQueries){let r=[a.accounts.full(p)];if(t.parentAuthor&&t.parentPermlink){r.push(a.posts.entry(`/@${t.parentAuthor}/${t.parentPermlink}`));let n=t.rootAuthor||t.parentAuthor,d=t.rootPermlink||t.parentPermlink;r.push({predicate:h=>{let e=h.queryKey;return Array.isArray(e)&&e[0]==="posts"&&e[1]==="discussions"&&e[2]===n&&e[3]===d}});}await s.adapter.invalidateQueries(r);}},s,"posting",{broadcastMode:y,onMutate:async o=>{let t=o.rootAuthor||o.parentAuthor,r=o.rootPermlink||o.parentPermlink;return t&&r?{snapshots:b$1(o.author,o.permlink,t,r)}:{}},onError:(o,t,r)=>{let{snapshots:n}=r??{};n&&c(n);}})}export{A as a};//# sourceMappingURL=chunk-MR5OYU27.js.map
2
+ //# sourceMappingURL=chunk-MR5OYU27.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/posts/mutations/use-delete-comment.ts"],"names":["useDeleteComment","username","auth","broadcastMode","useBroadcastMutation","author","permlink","buildDeleteCommentOp","_result","variables","queriesToInvalidate","QueryKeys","discussionsAuthor","discussionsPermlink","query","key","rootAuthor","rootPermlink","removeOptimisticDiscussionEntry","_error","_variables","context","snapshots","restoreDiscussionSnapshots"],"mappings":"yJAuCO,SAASA,EACdC,CAAAA,CACAC,CAAAA,CACAC,EACA,CACA,OAAOC,EACL,CAAC,OAAA,CAAS,eAAe,CAAA,CACzBH,EACA,CAAC,CAAE,OAAAI,CAAAA,CAAQ,QAAA,CAAAC,CAAS,CAAA,GAAM,CACxBC,CAAAA,CAAqBF,CAAAA,CAAQC,CAAQ,CACvC,CAAA,CACA,MAAOE,CAAAA,CAAcC,CAAAA,GAAc,CAEjC,GAAIP,CAAAA,EAAM,OAAA,EAAS,iBAAA,CAAmB,CACpC,IAAMQ,CAAAA,CAA6B,CACjCC,CAAAA,CAAU,QAAA,CAAS,KAAKV,CAAQ,CAClC,CAAA,CAGA,GAAIQ,EAAU,YAAA,EAAgBA,CAAAA,CAAU,eAAgB,CACtDC,CAAAA,CAAoB,KAClBC,CAAAA,CAAU,KAAA,CAAM,KAAA,CAAM,CAAA,EAAA,EAAKF,EAAU,YAAY,CAAA,CAAA,EAAIA,EAAU,cAAc,CAAA,CAAE,CACjF,CAAA,CAEA,IAAMG,CAAAA,CAAoBH,CAAAA,CAAU,YAAcA,CAAAA,CAAU,YAAA,CACtDI,EAAsBJ,CAAAA,CAAU,YAAA,EAAgBA,EAAU,cAAA,CAEhEC,CAAAA,CAAoB,KAAK,CACvB,SAAA,CAAYI,GAAe,CACzB,IAAMC,EAAMD,CAAAA,CAAM,QAAA,CAClB,OACE,KAAA,CAAM,OAAA,CAAQC,CAAG,CAAA,EACjBA,EAAI,CAAC,CAAA,GAAM,SACXA,CAAAA,CAAI,CAAC,IAAM,aAAA,EACXA,CAAAA,CAAI,CAAC,CAAA,GAAMH,GACXG,CAAAA,CAAI,CAAC,IAAMF,CAEf,CACF,CAAC,EACH,CAEA,MAAMX,CAAAA,CAAK,QAAQ,iBAAA,CAAkBQ,CAAmB,EAC1D,CACF,CAAA,CACAR,EACA,SAAA,CACA,CACE,aAAA,CAAAC,CAAAA,CAEA,SAAU,MAAOM,CAAAA,EAAc,CAC7B,IAAMO,CAAAA,CAAaP,EAAU,UAAA,EAAcA,CAAAA,CAAU,YAAA,CAC/CQ,CAAAA,CAAeR,EAAU,YAAA,EAAgBA,CAAAA,CAAU,eAEzD,OAAIO,CAAAA,EAAcC,EAOT,CAAE,SAAA,CANSC,GAAAA,CAChBT,CAAAA,CAAU,OACVA,CAAAA,CAAU,QAAA,CACVO,EACAC,CACF,CACmB,EAEd,EACT,CAAA,CAEA,OAAA,CAAS,CAACE,CAAAA,CAAQC,CAAAA,CAAYC,IAAY,CACxC,GAAM,CAAE,SAAA,CAAAC,CAAU,EAAKD,CAAAA,EAAgE,GACnFC,CAAAA,EACFC,CAAAA,CAA2BD,CAAS,EAExC,CACF,CACF,CACF","file":"chunk-M3OC7IZG.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildDeleteCommentOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport {\n removeOptimisticDiscussionEntry,\n restoreDiscussionSnapshots,\n} from \"../cache/discussions-cache-utils\";\nimport type { Entry } from \"../types\";\n\n/**\n * Payload for deleting a comment or post.\n */\nexport interface DeleteCommentPayload {\n /** Author of the comment/post to delete */\n author: string;\n /** Permlink of the comment/post to delete */\n permlink: string;\n /** Optional: Parent author (for cache invalidation of discussions) */\n parentAuthor?: string;\n /** Optional: Parent permlink (for cache invalidation of discussions) */\n parentPermlink?: string;\n /** Optional: Root post author (for nested replies, used for discussions cache invalidation) */\n rootAuthor?: string;\n /** Optional: Root post permlink (for nested replies, used for discussions cache invalidation) */\n rootPermlink?: string;\n}\n\n/**\n * React Query mutation hook for deleting posts and comments.\n *\n * This mutation broadcasts a delete_comment operation to the Hive blockchain.\n * Includes optimistic removal from discussions cache with rollback on error.\n *\n * @param username - The username deleting the comment/post (required for broadcast)\n * @param auth - Authentication context with platform adapter and fallback configuration\n *\n * @returns React Query mutation result\n */\nexport function useDeleteComment(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<DeleteCommentPayload>(\n [\"posts\", \"deleteComment\"],\n username,\n ({ author, permlink }) => [\n buildDeleteCommentOp(author, permlink)\n ],\n async (_result: any, variables) => {\n // Cache invalidation\n if (auth?.adapter?.invalidateQueries) {\n const queriesToInvalidate: any[] = [\n QueryKeys.accounts.full(username)\n ];\n\n // If this is a reply, invalidate parent post and discussions\n if (variables.parentAuthor && variables.parentPermlink) {\n queriesToInvalidate.push(\n QueryKeys.posts.entry(`/@${variables.parentAuthor}/${variables.parentPermlink}`)\n );\n\n const discussionsAuthor = variables.rootAuthor || variables.parentAuthor;\n const discussionsPermlink = variables.rootPermlink || variables.parentPermlink;\n\n queriesToInvalidate.push({\n predicate: (query: any) => {\n const key = query.queryKey;\n return (\n Array.isArray(key) &&\n key[0] === \"posts\" &&\n key[1] === \"discussions\" &&\n key[2] === discussionsAuthor &&\n key[3] === discussionsPermlink\n );\n }\n });\n }\n\n await auth.adapter.invalidateQueries(queriesToInvalidate);\n }\n },\n auth,\n 'posting',\n {\n broadcastMode,\n // Optimistic removal: remove from discussions cache before broadcast\n onMutate: async (variables) => {\n const rootAuthor = variables.rootAuthor || variables.parentAuthor;\n const rootPermlink = variables.rootPermlink || variables.parentPermlink;\n\n if (rootAuthor && rootPermlink) {\n const snapshots = removeOptimisticDiscussionEntry(\n variables.author,\n variables.permlink,\n rootAuthor,\n rootPermlink\n );\n return { snapshots };\n }\n return {};\n },\n // Rollback on error: restore discussions cache\n onError: (_error, _variables, context) => {\n const { snapshots } = (context as { snapshots?: Map<readonly unknown[], Entry[]> }) ?? {};\n if (snapshots) {\n restoreDiscussionSnapshots(snapshots);\n }\n },\n }\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/modules/posts/mutations/use-delete-comment.ts"],"names":["useDeleteComment","username","auth","broadcastMode","useBroadcastMutation","author","permlink","buildDeleteCommentOp","_result","variables","queriesToInvalidate","QueryKeys","discussionsAuthor","discussionsPermlink","query","key","rootAuthor","rootPermlink","removeOptimisticDiscussionEntry","_error","_variables","context","snapshots","restoreDiscussionSnapshots"],"mappings":"yJAuCO,SAASA,EACdC,CAAAA,CACAC,CAAAA,CACAC,EACA,CACA,OAAOC,EACL,CAAC,OAAA,CAAS,eAAe,CAAA,CACzBH,EACA,CAAC,CAAE,OAAAI,CAAAA,CAAQ,QAAA,CAAAC,CAAS,CAAA,GAAM,CACxBC,CAAAA,CAAqBF,CAAAA,CAAQC,CAAQ,CACvC,CAAA,CACA,MAAOE,CAAAA,CAAcC,CAAAA,GAAc,CAEjC,GAAIP,CAAAA,EAAM,OAAA,EAAS,iBAAA,CAAmB,CACpC,IAAMQ,CAAAA,CAA6B,CACjCC,CAAAA,CAAU,QAAA,CAAS,KAAKV,CAAQ,CAClC,CAAA,CAGA,GAAIQ,EAAU,YAAA,EAAgBA,CAAAA,CAAU,eAAgB,CACtDC,CAAAA,CAAoB,KAClBC,CAAAA,CAAU,KAAA,CAAM,KAAA,CAAM,CAAA,EAAA,EAAKF,EAAU,YAAY,CAAA,CAAA,EAAIA,EAAU,cAAc,CAAA,CAAE,CACjF,CAAA,CAEA,IAAMG,CAAAA,CAAoBH,CAAAA,CAAU,YAAcA,CAAAA,CAAU,YAAA,CACtDI,EAAsBJ,CAAAA,CAAU,YAAA,EAAgBA,EAAU,cAAA,CAEhEC,CAAAA,CAAoB,KAAK,CACvB,SAAA,CAAYI,GAAe,CACzB,IAAMC,EAAMD,CAAAA,CAAM,QAAA,CAClB,OACE,KAAA,CAAM,OAAA,CAAQC,CAAG,CAAA,EACjBA,EAAI,CAAC,CAAA,GAAM,SACXA,CAAAA,CAAI,CAAC,IAAM,aAAA,EACXA,CAAAA,CAAI,CAAC,CAAA,GAAMH,GACXG,CAAAA,CAAI,CAAC,IAAMF,CAEf,CACF,CAAC,EACH,CAEA,MAAMX,CAAAA,CAAK,QAAQ,iBAAA,CAAkBQ,CAAmB,EAC1D,CACF,CAAA,CACAR,EACA,SAAA,CACA,CACE,aAAA,CAAAC,CAAAA,CAEA,SAAU,MAAOM,CAAAA,EAAc,CAC7B,IAAMO,CAAAA,CAAaP,EAAU,UAAA,EAAcA,CAAAA,CAAU,YAAA,CAC/CQ,CAAAA,CAAeR,EAAU,YAAA,EAAgBA,CAAAA,CAAU,eAEzD,OAAIO,CAAAA,EAAcC,EAOT,CAAE,SAAA,CANSC,GAAAA,CAChBT,CAAAA,CAAU,OACVA,CAAAA,CAAU,QAAA,CACVO,EACAC,CACF,CACmB,EAEd,EACT,CAAA,CAEA,OAAA,CAAS,CAACE,CAAAA,CAAQC,CAAAA,CAAYC,IAAY,CACxC,GAAM,CAAE,SAAA,CAAAC,CAAU,EAAKD,CAAAA,EAAgE,GACnFC,CAAAA,EACFC,CAAAA,CAA2BD,CAAS,EAExC,CACF,CACF,CACF","file":"chunk-MR5OYU27.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildDeleteCommentOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport {\n removeOptimisticDiscussionEntry,\n restoreDiscussionSnapshots,\n} from \"../cache/discussions-cache-utils\";\nimport type { Entry } from \"../types\";\n\n/**\n * Payload for deleting a comment or post.\n */\nexport interface DeleteCommentPayload {\n /** Author of the comment/post to delete */\n author: string;\n /** Permlink of the comment/post to delete */\n permlink: string;\n /** Optional: Parent author (for cache invalidation of discussions) */\n parentAuthor?: string;\n /** Optional: Parent permlink (for cache invalidation of discussions) */\n parentPermlink?: string;\n /** Optional: Root post author (for nested replies, used for discussions cache invalidation) */\n rootAuthor?: string;\n /** Optional: Root post permlink (for nested replies, used for discussions cache invalidation) */\n rootPermlink?: string;\n}\n\n/**\n * React Query mutation hook for deleting posts and comments.\n *\n * This mutation broadcasts a delete_comment operation to the Hive blockchain.\n * Includes optimistic removal from discussions cache with rollback on error.\n *\n * @param username - The username deleting the comment/post (required for broadcast)\n * @param auth - Authentication context with platform adapter and fallback configuration\n *\n * @returns React Query mutation result\n */\nexport function useDeleteComment(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<DeleteCommentPayload>(\n [\"posts\", \"deleteComment\"],\n username,\n ({ author, permlink }) => [\n buildDeleteCommentOp(author, permlink)\n ],\n async (_result: any, variables) => {\n // Cache invalidation\n if (auth?.adapter?.invalidateQueries) {\n const queriesToInvalidate: any[] = [\n QueryKeys.accounts.full(username)\n ];\n\n // If this is a reply, invalidate parent post and discussions\n if (variables.parentAuthor && variables.parentPermlink) {\n queriesToInvalidate.push(\n QueryKeys.posts.entry(`/@${variables.parentAuthor}/${variables.parentPermlink}`)\n );\n\n const discussionsAuthor = variables.rootAuthor || variables.parentAuthor;\n const discussionsPermlink = variables.rootPermlink || variables.parentPermlink;\n\n queriesToInvalidate.push({\n predicate: (query: any) => {\n const key = query.queryKey;\n return (\n Array.isArray(key) &&\n key[0] === \"posts\" &&\n key[1] === \"discussions\" &&\n key[2] === discussionsAuthor &&\n key[3] === discussionsPermlink\n );\n }\n });\n }\n\n await auth.adapter.invalidateQueries(queriesToInvalidate);\n }\n },\n auth,\n 'posting',\n {\n broadcastMode,\n // Optimistic removal: remove from discussions cache before broadcast\n onMutate: async (variables) => {\n const rootAuthor = variables.rootAuthor || variables.parentAuthor;\n const rootPermlink = variables.rootPermlink || variables.parentPermlink;\n\n if (rootAuthor && rootPermlink) {\n const snapshots = removeOptimisticDiscussionEntry(\n variables.author,\n variables.permlink,\n rootAuthor,\n rootPermlink\n );\n return { snapshots };\n }\n return {};\n },\n // Rollback on error: restore discussions cache\n onError: (_error, _variables, context) => {\n const { snapshots } = (context as { snapshots?: Map<readonly unknown[], Entry[]> }) ?? {};\n if (snapshots) {\n restoreDiscussionSnapshots(snapshots);\n }\n },\n }\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {a}from'./chunk-JPSNDJVH.js';import {a as a$1}from'./chunk-EOSE4FQA.js';import {b}from'./chunk-K2DAN37J.js';import {a as a$2}from'./chunk-HEILHNSR.js';function y(o,t,n){let e=o.some(r=>r.voter===t);return n!==0?e:!e}function u(o,t,n){let e=a.getEntry(t.author,t.permlink,n);if(!e?.active_votes||y(e.active_votes,o,t.weight))return;let r=[...e.active_votes.filter(d=>d.voter!==o),...t.weight!==0?[{rshares:t.weight,voter:o}]:[]],i=e.payout+(t.estimated??0);a.updateVotes(t.author,t.permlink,r,i,n);}function V(o,t,n){return b(["posts","vote"],o,({author:e,permlink:r,weight:i})=>[a$1(o,e,r,i)],async(e,r)=>{u(o,r);let i=e?.id??e?.tx_id;if(t?.adapter?.recordActivity&&i&&t.adapter.recordActivity(120,i,e?.block_num).catch(()=>{}),t?.adapter?.invalidateQueries){let d=()=>{t.adapter.invalidateQueries([a$2.posts.entry(`/@${r.author}/${r.permlink}`),a$2.accounts.full(o)]);};(n??"async")==="async"?setTimeout(d,4e3):d();}},t,"posting",{broadcastMode:n??"async"})}export{y as a,u as b,V as c};//# sourceMappingURL=chunk-YK7FPU3F.js.map
2
- //# sourceMappingURL=chunk-YK7FPU3F.js.map
1
+ import {a}from'./chunk-JPSNDJVH.js';import {a as a$1}from'./chunk-EOSE4FQA.js';import {b}from'./chunk-J2HM6MWA.js';import {a as a$2}from'./chunk-HEILHNSR.js';function y(o,t,n){let e=o.some(r=>r.voter===t);return n!==0?e:!e}function u(o,t,n){let e=a.getEntry(t.author,t.permlink,n);if(!e?.active_votes||y(e.active_votes,o,t.weight))return;let r=[...e.active_votes.filter(d=>d.voter!==o),...t.weight!==0?[{rshares:t.weight,voter:o}]:[]],i=e.payout+(t.estimated??0);a.updateVotes(t.author,t.permlink,r,i,n);}function V(o,t,n){return b(["posts","vote"],o,({author:e,permlink:r,weight:i})=>[a$1(o,e,r,i)],async(e,r)=>{u(o,r);let i=e?.id??e?.tx_id;if(t?.adapter?.recordActivity&&i&&t.adapter.recordActivity(120,i,e?.block_num).catch(()=>{}),t?.adapter?.invalidateQueries){let d=()=>{t.adapter.invalidateQueries([a$2.posts.entry(`/@${r.author}/${r.permlink}`),a$2.accounts.full(o)]);};(n??"async")==="async"?setTimeout(d,4e3):d();}},t,"posting",{broadcastMode:n??"async"})}export{y as a,u as b,V as c};//# sourceMappingURL=chunk-NFO2YHLK.js.map
2
+ //# sourceMappingURL=chunk-NFO2YHLK.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/posts/mutations/use-vote.ts"],"names":["isVoteAlreadyReflected","activeVotes","voter","weight","hasVoterRecord","v","applyVoteCacheUpdate","username","variables","qc","entry","EntriesCacheManagement","newVotes","newPayout","useVote","auth","broadcastMode","useBroadcastMutation","author","permlink","buildVoteOp","result","txId","doInvalidate","QueryKeys"],"mappings":"8JAaO,SAASA,CAAAA,CACdC,EACAC,CAAAA,CACAC,CAAAA,CACS,CACT,IAAMC,CAAAA,CAAiBH,CAAAA,CAAY,IAAA,CAAMI,CAAAA,EAAMA,CAAAA,CAAE,QAAUH,CAAK,CAAA,CAChE,OAAOC,CAAAA,GAAW,CAAA,CAAIC,EAAiB,CAACA,CAC1C,CAyBO,SAASE,CAAAA,CACdC,CAAAA,CACAC,EACAC,CAAAA,CACM,CACN,IAAMC,CAAAA,CAAQC,CAAAA,CAAuB,SAASH,CAAAA,CAAU,MAAA,CAAQA,CAAAA,CAAU,QAAA,CAAUC,CAAE,CAAA,CACtF,GACE,CAACC,CAAAA,EAAO,cACRV,CAA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CAAS,iBAAA,CAAmB,CAC/BS,GAAAA,CAAU,KAAA,CAAM,MAAM,CAAA,EAAA,EAAKhB,CAAAA,CAAU,MAAM,CAAA,CAAA,EAAIA,CAAAA,CAAU,QAAQ,CAAA,CAAE,CAAA,CACnEgB,GAAAA,CAAU,SAAS,IAAA,CAAKjB,CAAQ,CAClC,CAAC,EACH,GACaS,CAAAA,EAAiB,OAAA,IACjB,OAAA,CACX,UAAA,CAAWO,CAAAA,CAAc,GAAI,EAE7BA,CAAAA,GAEJ,CACF,CAAA,CACAR,CAAAA,CACA,SAAA,CACA,CAAE,aAAA,CAAeC,CAAAA,EAAiB,OAAQ,CAC5C,CACF","file":"chunk-YK7FPU3F.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildVoteOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport type { QueryClient } from \"@tanstack/react-query\";\nimport { EntriesCacheManagement } from \"../cache/entries-cache-management\";\n\n/**\n * Whether the cached active_votes list already reflects the broadcast vote:\n * the voter is present for a vote (weight !== 0) or absent for an unvote\n * (weight === 0). Used to avoid stacking the SDK's post-broadcast optimistic\n * update on top of a platform-level optimistic update applied at press time.\n */\nexport function isVoteAlreadyReflected(\n activeVotes: Array<{ voter: string }>,\n voter: string | undefined,\n weight: number\n): boolean {\n const hasVoterRecord = activeVotes.some((v) => v.voter === voter);\n return weight !== 0 ? hasVoterRecord : !hasVoterRecord;\n}\n\n/**\n * Payload for voting on a post or comment.\n */\nexport interface VotePayload {\n /** Author of the post/comment to vote on */\n author: string;\n /** Permlink of the post/comment to vote on */\n permlink: string;\n /** Vote weight (-10000 to 10000, where 10000 = 100% upvote, -10000 = 100% downvote) */\n weight: number;\n /** Optional estimated payout change for optimistic UI */\n estimated?: number;\n}\n\n/**\n * Post-broadcast optimistic cache update for a vote: replaces the voter's\n * active_votes record and bumps the payout by `estimated`. Skipped when the\n * cached entry already reflects this vote (voter present for a vote, absent\n * for an unvote): platforms with their own at-press optimistic layer (e.g.\n * the mobile app) have applied it by the time the broadcast resolves, and\n * stacking a second update here double-counts the payout and clobbers the\n * platform's richer vote record until the deferred invalidation.\n */\nexport function applyVoteCacheUpdate(\n username: string | undefined,\n variables: VotePayload,\n qc?: QueryClient\n): void {\n const entry = EntriesCacheManagement.getEntry(variables.author, variables.permlink, qc);\n if (\n !entry?.active_votes ||\n isVoteAlreadyReflected(entry.active_votes, username, variables.weight)\n ) {\n return;\n }\n const newVotes = [\n ...entry.active_votes.filter((v) => v.voter !== username),\n ...(variables.weight !== 0 ? [{ rshares: variables.weight, voter: username! }] : [])\n ];\n const newPayout = entry.payout + (variables.estimated ?? 0);\n EntriesCacheManagement.updateVotes(\n variables.author,\n variables.permlink,\n newVotes,\n newPayout,\n qc\n );\n}\n\n/**\n * React Query mutation hook for voting on posts and comments.\n *\n * This mutation broadcasts a vote operation to the Hive blockchain,\n * supporting upvotes (positive weight) and downvotes (negative weight).\n *\n * @param username - The username of the voter (required for broadcast)\n * @param auth - Authentication context with platform adapter and fallback configuration\n *\n * @returns React Query mutation result\n *\n * @remarks\n * **Post-Broadcast Actions:**\n * - Records activity (type 120) if adapter.recordActivity is available\n * - Invalidates post cache to refetch updated vote data\n * - Invalidates voting power cache to show updated VP\n *\n * **Vote Weight:**\n * - 10000 = 100% upvote\n * - 0 = remove vote\n * - -10000 = 100% downvote\n *\n * @example\n * ```typescript\n * const voteMutation = useVote(username, {\n * adapter: myAdapter,\n * enableFallback: true,\n * fallbackChain: ['keychain', 'key', 'hivesigner']\n * });\n *\n * // Upvote a post\n * voteMutation.mutate({\n * author: 'alice',\n * permlink: 'my-awesome-post',\n * weight: 10000\n * });\n *\n * // Remove vote\n * voteMutation.mutate({\n * author: 'alice',\n * permlink: 'my-awesome-post',\n * weight: 0\n * });\n *\n * // Downvote\n * voteMutation.mutate({\n * author: 'alice',\n * permlink: 'my-awesome-post',\n * weight: -10000\n * });\n * ```\n *\n * @remarks\n * broadcastMode: async — Votes don't require block confirmation.\n * The vote is accepted into the mempool immediately; UI can optimistically update.\n */\nexport function useVote(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<VotePayload>(\n [\"posts\", \"vote\"],\n username,\n ({ author, permlink, weight }) => [\n buildVoteOp(username!, author, permlink, weight)\n ],\n async (result: any, variables) => {\n // Optimistic vote list + payout update (no-op when the cache already\n // reflects this vote — see applyVoteCacheUpdate).\n applyVoteCacheUpdate(username, variables);\n\n // Activity tracking (fire-and-forget — non-critical, shouldn't block mutation completion)\n // Async broadcasts return BroadcastResult ({ tx_id, status }) instead of TransactionConfirmation,\n // so fall back to tx_id when id is absent.\n const txId = result?.id ?? result?.tx_id;\n if (auth?.adapter?.recordActivity && txId) {\n auth.adapter.recordActivity(120, txId, result?.block_num).catch(() => {});\n }\n\n // Cache invalidation — deferred for async broadcasts since onSuccess fires\n // at mempool acceptance before block inclusion.\n if (auth?.adapter?.invalidateQueries) {\n const doInvalidate = () => {\n auth.adapter!.invalidateQueries!([\n QueryKeys.posts.entry(`/@${variables.author}/${variables.permlink}`),\n QueryKeys.accounts.full(username)\n ]);\n };\n const mode = broadcastMode ?? 'async';\n if (mode === 'async') {\n setTimeout(doInvalidate, 4000);\n } else {\n doInvalidate();\n }\n }\n },\n auth,\n 'posting',\n { broadcastMode: broadcastMode ?? 'async' }\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/modules/posts/mutations/use-vote.ts"],"names":["isVoteAlreadyReflected","activeVotes","voter","weight","hasVoterRecord","v","applyVoteCacheUpdate","username","variables","qc","entry","EntriesCacheManagement","newVotes","newPayout","useVote","auth","broadcastMode","useBroadcastMutation","author","permlink","buildVoteOp","result","txId","doInvalidate","QueryKeys"],"mappings":"8JAaO,SAASA,CAAAA,CACdC,EACAC,CAAAA,CACAC,CAAAA,CACS,CACT,IAAMC,CAAAA,CAAiBH,CAAAA,CAAY,IAAA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AQ,EAAA,EAAMA,CAAAA,EAAQ,KAAA,CAOnC,GANIN,CAAAA,EAAM,OAAA,EAAS,gBAAkBO,CAAAA,EACnCP,CAAAA,CAAK,QAAQ,cAAA,CAAe,GAAA,CAAKO,EAAMD,CAAAA,EAAQ,SAAS,CAAA,CAAE,KAAA,CAAM,IAAM,CAAC,CAAC,CAAA,CAKtEN,CAAAA,EAAM,SAAS,iBAAA,CAAmB,CACpC,IAAMQ,CAAAA,CAAe,IAAM,CACzBR,CAAAA,CAAK,OAAA,CAAS,iBAAA,CAAmB,CAC/BS,GAAAA,CAAU,KAAA,CAAM,MAAM,CAAA,EAAA,EAAKhB,CAAAA,CAAU,MAAM,CAAA,CAAA,EAAIA,CAAAA,CAAU,QAAQ,CAAA,CAAE,CAAA,CACnEgB,GAAAA,CAAU,SAAS,IAAA,CAAKjB,CAAQ,CAClC,CAAC,EACH,GACaS,CAAAA,EAAiB,OAAA,IACjB,OAAA,CACX,UAAA,CAAWO,CAAAA,CAAc,GAAI,EAE7BA,CAAAA,GAEJ,CACF,CAAA,CACAR,CAAAA,CACA,SAAA,CACA,CAAE,aAAA,CAAeC,CAAAA,EAAiB,OAAQ,CAC5C,CACF","file":"chunk-NFO2YHLK.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildVoteOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport type { QueryClient } from \"@tanstack/react-query\";\nimport { EntriesCacheManagement } from \"../cache/entries-cache-management\";\n\n/**\n * Whether the cached active_votes list already reflects the broadcast vote:\n * the voter is present for a vote (weight !== 0) or absent for an unvote\n * (weight === 0). Used to avoid stacking the SDK's post-broadcast optimistic\n * update on top of a platform-level optimistic update applied at press time.\n */\nexport function isVoteAlreadyReflected(\n activeVotes: Array<{ voter: string }>,\n voter: string | undefined,\n weight: number\n): boolean {\n const hasVoterRecord = activeVotes.some((v) => v.voter === voter);\n return weight !== 0 ? hasVoterRecord : !hasVoterRecord;\n}\n\n/**\n * Payload for voting on a post or comment.\n */\nexport interface VotePayload {\n /** Author of the post/comment to vote on */\n author: string;\n /** Permlink of the post/comment to vote on */\n permlink: string;\n /** Vote weight (-10000 to 10000, where 10000 = 100% upvote, -10000 = 100% downvote) */\n weight: number;\n /** Optional estimated payout change for optimistic UI */\n estimated?: number;\n}\n\n/**\n * Post-broadcast optimistic cache update for a vote: replaces the voter's\n * active_votes record and bumps the payout by `estimated`. Skipped when the\n * cached entry already reflects this vote (voter present for a vote, absent\n * for an unvote): platforms with their own at-press optimistic layer (e.g.\n * the mobile app) have applied it by the time the broadcast resolves, and\n * stacking a second update here double-counts the payout and clobbers the\n * platform's richer vote record until the deferred invalidation.\n */\nexport function applyVoteCacheUpdate(\n username: string | undefined,\n variables: VotePayload,\n qc?: QueryClient\n): void {\n const entry = EntriesCacheManagement.getEntry(variables.author, variables.permlink, qc);\n if (\n !entry?.active_votes ||\n isVoteAlreadyReflected(entry.active_votes, username, variables.weight)\n ) {\n return;\n }\n const newVotes = [\n ...entry.active_votes.filter((v) => v.voter !== username),\n ...(variables.weight !== 0 ? [{ rshares: variables.weight, voter: username! }] : [])\n ];\n const newPayout = entry.payout + (variables.estimated ?? 0);\n EntriesCacheManagement.updateVotes(\n variables.author,\n variables.permlink,\n newVotes,\n newPayout,\n qc\n );\n}\n\n/**\n * React Query mutation hook for voting on posts and comments.\n *\n * This mutation broadcasts a vote operation to the Hive blockchain,\n * supporting upvotes (positive weight) and downvotes (negative weight).\n *\n * @param username - The username of the voter (required for broadcast)\n * @param auth - Authentication context with platform adapter and fallback configuration\n *\n * @returns React Query mutation result\n *\n * @remarks\n * **Post-Broadcast Actions:**\n * - Records activity (type 120) if adapter.recordActivity is available\n * - Invalidates post cache to refetch updated vote data\n * - Invalidates voting power cache to show updated VP\n *\n * **Vote Weight:**\n * - 10000 = 100% upvote\n * - 0 = remove vote\n * - -10000 = 100% downvote\n *\n * @example\n * ```typescript\n * const voteMutation = useVote(username, {\n * adapter: myAdapter,\n * enableFallback: true,\n * fallbackChain: ['keychain', 'key', 'hivesigner']\n * });\n *\n * // Upvote a post\n * voteMutation.mutate({\n * author: 'alice',\n * permlink: 'my-awesome-post',\n * weight: 10000\n * });\n *\n * // Remove vote\n * voteMutation.mutate({\n * author: 'alice',\n * permlink: 'my-awesome-post',\n * weight: 0\n * });\n *\n * // Downvote\n * voteMutation.mutate({\n * author: 'alice',\n * permlink: 'my-awesome-post',\n * weight: -10000\n * });\n * ```\n *\n * @remarks\n * broadcastMode: async — Votes don't require block confirmation.\n * The vote is accepted into the mempool immediately; UI can optimistically update.\n */\nexport function useVote(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<VotePayload>(\n [\"posts\", \"vote\"],\n username,\n ({ author, permlink, weight }) => [\n buildVoteOp(username!, author, permlink, weight)\n ],\n async (result: any, variables) => {\n // Optimistic vote list + payout update (no-op when the cache already\n // reflects this vote — see applyVoteCacheUpdate).\n applyVoteCacheUpdate(username, variables);\n\n // Activity tracking (fire-and-forget — non-critical, shouldn't block mutation completion)\n // Async broadcasts return BroadcastResult ({ tx_id, status }) instead of TransactionConfirmation,\n // so fall back to tx_id when id is absent.\n const txId = result?.id ?? result?.tx_id;\n if (auth?.adapter?.recordActivity && txId) {\n auth.adapter.recordActivity(120, txId, result?.block_num).catch(() => {});\n }\n\n // Cache invalidation — deferred for async broadcasts since onSuccess fires\n // at mempool acceptance before block inclusion.\n if (auth?.adapter?.invalidateQueries) {\n const doInvalidate = () => {\n auth.adapter!.invalidateQueries!([\n QueryKeys.posts.entry(`/@${variables.author}/${variables.permlink}`),\n QueryKeys.accounts.full(username)\n ]);\n };\n const mode = broadcastMode ?? 'async';\n if (mode === 'async') {\n setTimeout(doInvalidate, 4000);\n } else {\n doInvalidate();\n }\n }\n },\n auth,\n 'posting',\n { broadcastMode: broadcastMode ?? 'async' }\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {b as b$1,c}from'./chunk-EOSE4FQA.js';import {b}from'./chunk-K2DAN37J.js';import {a}from'./chunk-HEILHNSR.js';function g(o){return o.isUpdate?null:o.parentAuthor?110:100}function C(o,r,y){return b(["posts","comment"],o,t=>{let e=[];if(e.push(b$1(t.author,t.permlink,t.parentAuthor,t.parentPermlink,t.title,t.body,t.jsonMetadata)),t.options){let{maxAcceptedPayout:m="1000000.000 HBD",percentHbd:s=1e4,allowVotes:c$1=true,allowCurationRewards:i=true,beneficiaries:a=[]}=t.options,u=[];if(a.length>0){let d=[...a].sort((n,A)=>n.account.localeCompare(A.account));u.push([0,{beneficiaries:d.map(n=>({account:n.account,weight:n.weight}))}]);}e.push(c(t.author,t.permlink,m,s,c$1,i,u));}return e},async(t,e)=>{let m=!e.parentAuthor,s=g(e),c=t?.id??t?.tx_id;if(s!==null&&r?.adapter?.recordActivity&&c&&r.adapter.recordActivity(s,c,t?.block_num).catch(()=>{}),r?.adapter?.invalidateQueries){let i=[a.accounts.full(o),a.resourceCredits.account(o)];if(!m){i.push(a.posts.entry(`/@${e.parentAuthor}/${e.parentPermlink}`));let a$1=e.rootAuthor||e.parentAuthor,u=e.rootPermlink||e.parentPermlink;i.push({predicate:d=>{let n=d.queryKey;return Array.isArray(n)&&n[0]==="posts"&&n[1]==="discussions"&&n[2]===a$1&&n[3]===u}});}await r.adapter.invalidateQueries(i);}},r,"posting",{broadcastMode:y})}export{g as a,C as b};//# sourceMappingURL=chunk-2MLEAT6V.js.map
2
- //# sourceMappingURL=chunk-2MLEAT6V.js.map
1
+ import {b as b$1,c}from'./chunk-EOSE4FQA.js';import {b}from'./chunk-J2HM6MWA.js';import {a}from'./chunk-HEILHNSR.js';function g(o){return o.isUpdate?null:o.parentAuthor?110:100}function C(o,r,y){return b(["posts","comment"],o,t=>{let e=[];if(e.push(b$1(t.author,t.permlink,t.parentAuthor,t.parentPermlink,t.title,t.body,t.jsonMetadata)),t.options){let{maxAcceptedPayout:m="1000000.000 HBD",percentHbd:s=1e4,allowVotes:c$1=true,allowCurationRewards:i=true,beneficiaries:a=[]}=t.options,u=[];if(a.length>0){let d=[...a].sort((n,A)=>n.account.localeCompare(A.account));u.push([0,{beneficiaries:d.map(n=>({account:n.account,weight:n.weight}))}]);}e.push(c(t.author,t.permlink,m,s,c$1,i,u));}return e},async(t,e)=>{let m=!e.parentAuthor,s=g(e),c=t?.id??t?.tx_id;if(s!==null&&r?.adapter?.recordActivity&&c&&r.adapter.recordActivity(s,c,t?.block_num).catch(()=>{}),r?.adapter?.invalidateQueries){let i=[a.accounts.full(o),a.resourceCredits.account(o)];if(!m){i.push(a.posts.entry(`/@${e.parentAuthor}/${e.parentPermlink}`));let a$1=e.rootAuthor||e.parentAuthor,u=e.rootPermlink||e.parentPermlink;i.push({predicate:d=>{let n=d.queryKey;return Array.isArray(n)&&n[0]==="posts"&&n[1]==="discussions"&&n[2]===a$1&&n[3]===u}});}await r.adapter.invalidateQueries(i);}},r,"posting",{broadcastMode:y})}export{g as a,C as b};//# sourceMappingURL=chunk-NHKKPEA7.js.map
2
+ //# sourceMappingURL=chunk-NHKKPEA7.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/posts/mutations/use-comment.ts"],"names":["resolveContentActivityType","payload","useComment","username","auth","broadcastMode","useBroadcastMutation","operations","buildCommentOp","maxAcceptedPayout","percentHbd","allowVotes","allowCurationRewards","beneficiaries","extensions","sortedBeneficiaries","a","b","buildCommentOptionsOp","result","variables","isPost","activityType","txId","queriesToInvalidate","QueryKeys","discussionsAuthor","discussionsPermlink","query","key"],"mappings":"qHAuIO,SAASA,CAAAA,CACdC,CAAAA,CACkB,CAClB,OAAIA,CAAAA,CAAQ,QAAA,CACH,IAAA,CAGFA,CAAAA,CAAQ,YAAA,CAAe,GAAA,CAAM,GACtC,CAEO,SAASC,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,OAAA,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,CAAAA,CAAI,CAAC,CAAA,GAAMH,GAAAA,EACXG,CAAAA,CAAI,CAAC,CAAA,GAAMF,CAEf,CACF,CAAC,EACH,CAEA,MAAMvB,CAAAA,CAAK,OAAA,CAAQ,iBAAA,CAAkBoB,CAAmB,EAC1D,CACF,CAAA,CACApB,CAAAA,CACA,SAAA,CACA,CAAE,aAAA,CAAAC,CAAc,CAClB,CACF","file":"chunk-2MLEAT6V.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildCommentOp, buildCommentOptionsOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport type { Operation } from \"../../../hive-tx\";\n\n/**\n * Beneficiary account and weight.\n */\nexport interface Beneficiary {\n /** Beneficiary account name */\n account: string;\n /** Beneficiary weight (10000 = 100%) */\n weight: number;\n}\n\n/**\n * Payload for creating a comment or post.\n */\nexport interface CommentPayload {\n /** Author of the comment/post */\n author: string;\n /** Permlink of the comment/post */\n permlink: string;\n /** Parent author (empty string for top-level posts) */\n parentAuthor: string;\n /** Parent permlink (category/tag for top-level posts) */\n parentPermlink: string;\n /** Title of the post (empty for comments) */\n title: string;\n /** Content body */\n body: string;\n /** JSON metadata object */\n jsonMetadata: Record<string, any>;\n /**\n * Optional: set when this operation edits existing content rather than creating it.\n *\n * A `comment` operation is byte-identical for a create and an update, so only the\n * caller knows which it is. When set, no content activity is recorded. Activity\n * rewards content creation. Without this, an edit of content published elsewhere\n * is credited as content created here. Never broadcast.\n */\n isUpdate?: boolean;\n /** Optional: Root post author (for nested replies, used for discussions cache invalidation) */\n rootAuthor?: string;\n /** Optional: Root post permlink (for nested replies, used for discussions cache invalidation) */\n rootPermlink?: string;\n /** Optional: Comment options (beneficiaries, rewards) */\n options?: {\n /** Maximum accepted payout (e.g., \"1000000.000 HBD\") */\n maxAcceptedPayout?: string;\n /** Percent of payout in HBD (10000 = 100%) */\n percentHbd?: number;\n /** Allow votes on this content */\n allowVotes?: boolean;\n /** Allow curation rewards */\n allowCurationRewards?: boolean;\n /** Beneficiaries array */\n beneficiaries?: Beneficiary[];\n };\n}\n\n/**\n * React Query mutation hook for creating posts and comments.\n *\n * This mutation broadcasts a comment operation (and optionally comment_options)\n * to create a new post or reply on the Hive blockchain.\n *\n * @param username - The username creating the comment/post (required for broadcast)\n * @param auth - Authentication context with platform adapter and fallback configuration\n *\n * @returns React Query mutation result\n *\n * @remarks\n * **Post-Broadcast Actions:**\n * - Records activity (type 100 for posts, 110 for comments) if adapter.recordActivity is\n * available, unless the payload sets `isUpdate`\n * - Invalidates feed caches to show the new content\n * - Invalidates parent post cache if this is a reply\n *\n * **Operations:**\n * - Always includes a comment operation\n * - Optionally includes comment_options operation for beneficiaries/rewards\n *\n * **Post vs Comment:**\n * - Post: parentAuthor = \"\", parentPermlink = category/tag\n * - Comment: parentAuthor = parent author, parentPermlink = parent permlink\n *\n * @example\n * ```typescript\n * const commentMutation = useComment(username, {\n * adapter: myAdapter,\n * enableFallback: true,\n * fallbackChain: ['keychain', 'key', 'hivesigner']\n * });\n *\n * // Create a post\n * commentMutation.mutate({\n * author: 'alice',\n * permlink: 'my-awesome-post-20260209',\n * parentAuthor: '',\n * parentPermlink: 'technology',\n * title: 'My Awesome Post',\n * body: 'This is the post content...',\n * jsonMetadata: {\n * tags: ['technology', 'hive'],\n * app: 'ecency/3.0.0'\n * },\n * options: {\n * beneficiaries: [\n * { account: 'ecency', weight: 500 }\n * ]\n * }\n * });\n *\n * // Create a comment\n * commentMutation.mutate({\n * author: 'bob',\n * permlink: 're-alice-my-awesome-post-20260209',\n * parentAuthor: 'alice',\n * parentPermlink: 'my-awesome-post-20260209',\n * title: '',\n * body: 'Great post!',\n * jsonMetadata: { app: 'ecency/3.0.0' }\n * });\n * ```\n */\n/**\n * Resolve which content activity a broadcast earns, or `null` for none.\n *\n * Content activity rewards publishing, so an update earns nothing: the `comment`\n * operation an edit broadcasts is indistinguishable from a create on chain, which\n * leaves the caller as the only party that can tell them apart. Without this, editing\n * a post first published on another frontend is credited here as a post.\n */\nexport function resolveContentActivityType(\n payload: Pick<CommentPayload, \"parentAuthor\" | \"isUpdate\">\n): 100 | 110 | null {\n if (payload.isUpdate) {\n return null;\n }\n\n return payload.parentAuthor ? 110 : 100;\n}\n\nexport function useComment(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<CommentPayload>(\n [\"posts\", \"comment\"],\n username,\n (payload) => {\n const operations: Operation[] = [];\n\n // Main comment operation\n operations.push(\n buildCommentOp(\n payload.author,\n payload.permlink,\n payload.parentAuthor,\n payload.parentPermlink,\n payload.title,\n payload.body,\n payload.jsonMetadata\n )\n );\n\n // Optional comment options operation\n if (payload.options) {\n const {\n maxAcceptedPayout = \"1000000.000 HBD\",\n percentHbd = 10000,\n allowVotes = true,\n allowCurationRewards = true,\n beneficiaries = []\n } = payload.options;\n\n const extensions: any[] = [];\n\n // Add beneficiaries extension if provided\n if (beneficiaries.length > 0) {\n // Sort beneficiaries alphabetically by account name (required by blockchain)\n const sortedBeneficiaries = [...beneficiaries].sort((a, b) =>\n a.account.localeCompare(b.account)\n );\n\n extensions.push([\n 0,\n {\n beneficiaries: sortedBeneficiaries.map(b => ({\n account: b.account,\n weight: b.weight\n }))\n }\n ]);\n }\n\n operations.push(\n buildCommentOptionsOp(\n payload.author,\n payload.permlink,\n maxAcceptedPayout,\n percentHbd,\n allowVotes,\n allowCurationRewards,\n extensions\n )\n );\n }\n\n return operations;\n },\n async (result: any, variables) => {\n // Determine if this is a post or comment\n const isPost = !variables.parentAuthor;\n const activityType = resolveContentActivityType(variables);\n\n // Activity tracking (fire-and-forget — non-critical, shouldn't block mutation completion)\n // Async broadcasts return BroadcastResult ({ tx_id, status }) instead of TransactionConfirmation,\n // so fall back to tx_id when id is absent.\n const txId = result?.id ?? result?.tx_id;\n if (activityType !== null && auth?.adapter?.recordActivity && txId) {\n auth.adapter.recordActivity(activityType, txId, result?.block_num).catch(() => {});\n }\n\n // Cache invalidation (always runs regardless of recordActivity outcome)\n if (auth?.adapter?.invalidateQueries) {\n const queriesToInvalidate: any[] = [\n QueryKeys.accounts.full(username),\n QueryKeys.resourceCredits.account(username!)\n ];\n\n // If this is a reply, invalidate parent post and discussions\n if (!isPost) {\n // Invalidate parent entry\n queriesToInvalidate.push(\n QueryKeys.posts.entry(`/@${variables.parentAuthor}/${variables.parentPermlink}`)\n );\n\n // Invalidate discussions (matches all sort orders)\n // Use partial key to match all sort order variants\n // For nested replies, use rootAuthor/rootPermlink to match the root post's discussions\n // Fall back to parentAuthor/parentPermlink for direct replies to posts\n const discussionsAuthor = variables.rootAuthor || variables.parentAuthor;\n const discussionsPermlink = variables.rootPermlink || variables.parentPermlink;\n\n queriesToInvalidate.push({\n predicate: (query: any) => {\n const key = query.queryKey;\n return (\n Array.isArray(key) &&\n key[0] === \"posts\" &&\n key[1] === \"discussions\" &&\n key[2] === discussionsAuthor &&\n key[3] === discussionsPermlink\n );\n }\n });\n }\n\n await auth.adapter.invalidateQueries(queriesToInvalidate);\n }\n },\n auth,\n 'posting',\n { broadcastMode }\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/modules/posts/mutations/use-comment.ts"],"names":["resolveContentActivityType","payload","useComment","username","auth","broadcastMode","useBroadcastMutation","operations","buildCommentOp","maxAcceptedPayout","percentHbd","allowVotes","allowCurationRewards","beneficiaries","extensions","sortedBeneficiaries","a","b","buildCommentOptionsOp","result","variables","isPost","activityType","txId","queriesToInvalidate","QueryKeys","discussionsAuthor","discussionsPermlink","query","key"],"mappings":"qHAuIO,SAASA,CAAAA,CACdC,CAAAA,CACkB,CAClB,OAAIA,CAAAA,CAAQ,QAAA,CACH,IAAA,CAGFA,CAAAA,CAAQ,YAAA,CAAe,GAAA,CAAM,GACtC,CAEO,SAASC,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,C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aAAA,EACXA,CAAAA,CAAI,CAAC,CAAA,GAAMH,GAAAA,EACXG,CAAAA,CAAI,CAAC,CAAA,GAAMF,CAEf,CACF,CAAC,EACH,CAEA,MAAMvB,CAAAA,CAAK,OAAA,CAAQ,iBAAA,CAAkBoB,CAAmB,EAC1D,CACF,CAAA,CACApB,CAAAA,CACA,SAAA,CACA,CAAE,aAAA,CAAAC,CAAc,CAClB,CACF","file":"chunk-NHKKPEA7.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildCommentOp, buildCommentOptionsOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport type { Operation } from \"../../../hive-tx\";\n\n/**\n * Beneficiary account and weight.\n */\nexport interface Beneficiary {\n /** Beneficiary account name */\n account: string;\n /** Beneficiary weight (10000 = 100%) */\n weight: number;\n}\n\n/**\n * Payload for creating a comment or post.\n */\nexport interface CommentPayload {\n /** Author of the comment/post */\n author: string;\n /** Permlink of the comment/post */\n permlink: string;\n /** Parent author (empty string for top-level posts) */\n parentAuthor: string;\n /** Parent permlink (category/tag for top-level posts) */\n parentPermlink: string;\n /** Title of the post (empty for comments) */\n title: string;\n /** Content body */\n body: string;\n /** JSON metadata object */\n jsonMetadata: Record<string, any>;\n /**\n * Optional: set when this operation edits existing content rather than creating it.\n *\n * A `comment` operation is byte-identical for a create and an update, so only the\n * caller knows which it is. When set, no content activity is recorded. Activity\n * rewards content creation. Without this, an edit of content published elsewhere\n * is credited as content created here. Never broadcast.\n */\n isUpdate?: boolean;\n /** Optional: Root post author (for nested replies, used for discussions cache invalidation) */\n rootAuthor?: string;\n /** Optional: Root post permlink (for nested replies, used for discussions cache invalidation) */\n rootPermlink?: string;\n /** Optional: Comment options (beneficiaries, rewards) */\n options?: {\n /** Maximum accepted payout (e.g., \"1000000.000 HBD\") */\n maxAcceptedPayout?: string;\n /** Percent of payout in HBD (10000 = 100%) */\n percentHbd?: number;\n /** Allow votes on this content */\n allowVotes?: boolean;\n /** Allow curation rewards */\n allowCurationRewards?: boolean;\n /** Beneficiaries array */\n beneficiaries?: Beneficiary[];\n };\n}\n\n/**\n * React Query mutation hook for creating posts and comments.\n *\n * This mutation broadcasts a comment operation (and optionally comment_options)\n * to create a new post or reply on the Hive blockchain.\n *\n * @param username - The username creating the comment/post (required for broadcast)\n * @param auth - Authentication context with platform adapter and fallback configuration\n *\n * @returns React Query mutation result\n *\n * @remarks\n * **Post-Broadcast Actions:**\n * - Records activity (type 100 for posts, 110 for comments) if adapter.recordActivity is\n * available, unless the payload sets `isUpdate`\n * - Invalidates feed caches to show the new content\n * - Invalidates parent post cache if this is a reply\n *\n * **Operations:**\n * - Always includes a comment operation\n * - Optionally includes comment_options operation for beneficiaries/rewards\n *\n * **Post vs Comment:**\n * - Post: parentAuthor = \"\", parentPermlink = category/tag\n * - Comment: parentAuthor = parent author, parentPermlink = parent permlink\n *\n * @example\n * ```typescript\n * const commentMutation = useComment(username, {\n * adapter: myAdapter,\n * enableFallback: true,\n * fallbackChain: ['keychain', 'key', 'hivesigner']\n * });\n *\n * // Create a post\n * commentMutation.mutate({\n * author: 'alice',\n * permlink: 'my-awesome-post-20260209',\n * parentAuthor: '',\n * parentPermlink: 'technology',\n * title: 'My Awesome Post',\n * body: 'This is the post content...',\n * jsonMetadata: {\n * tags: ['technology', 'hive'],\n * app: 'ecency/3.0.0'\n * },\n * options: {\n * beneficiaries: [\n * { account: 'ecency', weight: 500 }\n * ]\n * }\n * });\n *\n * // Create a comment\n * commentMutation.mutate({\n * author: 'bob',\n * permlink: 're-alice-my-awesome-post-20260209',\n * parentAuthor: 'alice',\n * parentPermlink: 'my-awesome-post-20260209',\n * title: '',\n * body: 'Great post!',\n * jsonMetadata: { app: 'ecency/3.0.0' }\n * });\n * ```\n */\n/**\n * Resolve which content activity a broadcast earns, or `null` for none.\n *\n * Content activity rewards publishing, so an update earns nothing: the `comment`\n * operation an edit broadcasts is indistinguishable from a create on chain, which\n * leaves the caller as the only party that can tell them apart. Without this, editing\n * a post first published on another frontend is credited here as a post.\n */\nexport function resolveContentActivityType(\n payload: Pick<CommentPayload, \"parentAuthor\" | \"isUpdate\">\n): 100 | 110 | null {\n if (payload.isUpdate) {\n return null;\n }\n\n return payload.parentAuthor ? 110 : 100;\n}\n\nexport function useComment(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<CommentPayload>(\n [\"posts\", \"comment\"],\n username,\n (payload) => {\n const operations: Operation[] = [];\n\n // Main comment operation\n operations.push(\n buildCommentOp(\n payload.author,\n payload.permlink,\n payload.parentAuthor,\n payload.parentPermlink,\n payload.title,\n payload.body,\n payload.jsonMetadata\n )\n );\n\n // Optional comment options operation\n if (payload.options) {\n const {\n maxAcceptedPayout = \"1000000.000 HBD\",\n percentHbd = 10000,\n allowVotes = true,\n allowCurationRewards = true,\n beneficiaries = []\n } = payload.options;\n\n const extensions: any[] = [];\n\n // Add beneficiaries extension if provided\n if (beneficiaries.length > 0) {\n // Sort beneficiaries alphabetically by account name (required by blockchain)\n const sortedBeneficiaries = [...beneficiaries].sort((a, b) =>\n a.account.localeCompare(b.account)\n );\n\n extensions.push([\n 0,\n {\n beneficiaries: sortedBeneficiaries.map(b => ({\n account: b.account,\n weight: b.weight\n }))\n }\n ]);\n }\n\n operations.push(\n buildCommentOptionsOp(\n payload.author,\n payload.permlink,\n maxAcceptedPayout,\n percentHbd,\n allowVotes,\n allowCurationRewards,\n extensions\n )\n );\n }\n\n return operations;\n },\n async (result: any, variables) => {\n // Determine if this is a post or comment\n const isPost = !variables.parentAuthor;\n const activityType = resolveContentActivityType(variables);\n\n // Activity tracking (fire-and-forget — non-critical, shouldn't block mutation completion)\n // Async broadcasts return BroadcastResult ({ tx_id, status }) instead of TransactionConfirmation,\n // so fall back to tx_id when id is absent.\n const txId = result?.id ?? result?.tx_id;\n if (activityType !== null && auth?.adapter?.recordActivity && txId) {\n auth.adapter.recordActivity(activityType, txId, result?.block_num).catch(() => {});\n }\n\n // Cache invalidation (always runs regardless of recordActivity outcome)\n if (auth?.adapter?.invalidateQueries) {\n const queriesToInvalidate: any[] = [\n QueryKeys.accounts.full(username),\n QueryKeys.resourceCredits.account(username!)\n ];\n\n // If this is a reply, invalidate parent post and discussions\n if (!isPost) {\n // Invalidate parent entry\n queriesToInvalidate.push(\n QueryKeys.posts.entry(`/@${variables.parentAuthor}/${variables.parentPermlink}`)\n );\n\n // Invalidate discussions (matches all sort orders)\n // Use partial key to match all sort order variants\n // For nested replies, use rootAuthor/rootPermlink to match the root post's discussions\n // Fall back to parentAuthor/parentPermlink for direct replies to posts\n const discussionsAuthor = variables.rootAuthor || variables.parentAuthor;\n const discussionsPermlink = variables.rootPermlink || variables.parentPermlink;\n\n queriesToInvalidate.push({\n predicate: (query: any) => {\n const key = query.queryKey;\n return (\n Array.isArray(key) &&\n key[0] === \"posts\" &&\n key[1] === \"discussions\" &&\n key[2] === discussionsAuthor &&\n key[3] === discussionsPermlink\n );\n }\n });\n }\n\n await auth.adapter.invalidateQueries(queriesToInvalidate);\n }\n },\n auth,\n 'posting',\n { broadcastMode }\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {a}from'./chunk-K3LA2I7M.js';import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-K2DAN37J.js';import {a as a$1}from'./chunk-HEILHNSR.js';function f(t,n,a$2){return b(["accounts","follow"],t,({following:r})=>[a(t,r)],async(r,l)=>{await b$1(n?.adapter,a$2,[a$1.accounts.relations(t,l.following),a$1.accounts.full(l.following),a$1.accounts.followCount(l.following),a$1.accounts.followCount(t)]);},n,"posting",{broadcastMode:a$2??"async"})}export{f as a};//# sourceMappingURL=chunk-6YZ7OSX2.js.map
2
- //# sourceMappingURL=chunk-6YZ7OSX2.js.map
1
+ import {a}from'./chunk-K3LA2I7M.js';import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-J2HM6MWA.js';import {a as a$1}from'./chunk-HEILHNSR.js';function f(t,n,a$2){return b(["accounts","follow"],t,({following:r})=>[a(t,r)],async(r,l)=>{await b$1(n?.adapter,a$2,[a$1.accounts.relations(t,l.following),a$1.accounts.full(l.following),a$1.accounts.followCount(l.following),a$1.accounts.followCount(t)]);},n,"posting",{broadcastMode:a$2??"async"})}export{f as a};//# sourceMappingURL=chunk-OA7EP5SN.js.map
2
+ //# sourceMappingURL=chunk-OA7EP5SN.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/accounts/mutations/use-follow.ts"],"names":["useFollow","username","auth","broadcastMode","useBroadcastMutation","following","buildFollowOp","_result","variables","invalidateAfterBroadcast","QueryKeys"],"mappings":"8JA2CO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,GAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,UAAA,CAAY,QAAQ,CAAA,CACrBH,CAAAA,CACA,CAAC,CAAE,SAAA,CAAAI,CAAU,CAAA,GAAM,CACjBC,CAAAA,CAAcL,CAAAA,CAAWI,CAAS,CACpC,CAAA,CACA,MAAOE,CAAAA,CAAcC,CAAAA,GAAc,CAEjC,MAAMC,GAAAA,CAAyBP,CAAAA,EAAM,QAASC,GAAAA,CAAe,CAC3DO,GAAAA,CAAU,QAAA,CAAS,SAAA,CAAUT,CAAAA,CAAWO,CAAAA,CAAU,SAAS,EAC3DE,GAAAA,CAAU,QAAA,CAAS,IAAA,CAAKF,CAAAA,CAAU,SAAS,CAAA,CAC3CE,GAAAA,CAAU,QAAA,CAAS,YAAYF,CAAAA,CAAU,SAAS,CAAA,CAClDE,GAAAA,CAAU,QAAA,CAAS,WAAA,CAAYT,CAAS,CAC1C,CAAC,EACH,CAAA,CACAC,CAAAA,CACA,SAAA,CACA,CAAE,aAAA,CAAeC,GAAAA,EAAiB,OAAQ,CAC5C,CACF","file":"chunk-6YZ7OSX2.js","sourcesContent":["import { useBroadcastMutation, invalidateAfterBroadcast, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildFollowOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\n/**\n * Payload for following an account.\n */\nexport interface FollowPayload {\n /** Account to follow */\n following: string;\n}\n\n/**\n * React Query mutation hook for following an account.\n *\n * This mutation broadcasts a follow operation to the Hive blockchain,\n * adding the target account to the follower's \"blog\" follow list.\n *\n * @param username - The username of the follower (required for broadcast)\n * @param auth - Authentication context with platform adapter and fallback configuration\n *\n * @returns React Query mutation result\n *\n * @remarks\n * **Post-Broadcast Actions:**\n * - Invalidates relationship cache to show updated follow status\n * - Invalidates account cache to refetch updated follower/following counts\n *\n * @example\n * ```typescript\n * const followMutation = useFollow(username, {\n * adapter: myAdapter,\n * enableFallback: true,\n * fallbackChain: ['keychain', 'key', 'hivesigner']\n * });\n *\n * // Follow an account\n * followMutation.mutate({\n * following: 'alice'\n * });\n * ```\n */\nexport function useFollow(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<FollowPayload>(\n [\"accounts\", \"follow\"],\n username,\n ({ following }) => [\n buildFollowOp(username!, following)\n ],\n async (_result: any, variables) => {\n // Cache invalidation\n await invalidateAfterBroadcast(auth?.adapter, broadcastMode, [\n QueryKeys.accounts.relations(username!, variables.following),\n QueryKeys.accounts.full(variables.following),\n QueryKeys.accounts.followCount(variables.following),\n QueryKeys.accounts.followCount(username!)\n ]);\n },\n auth,\n 'posting',\n { broadcastMode: broadcastMode ?? 'async' }\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/modules/accounts/mutations/use-follow.ts"],"names":["useFollow","username","auth","broadcastMode","useBroadcastMutation","following","buildFollowOp","_result","variables","invalidateAfterBroadcast","QueryKeys"],"mappings":"8JA2CO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,GAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,UAAA,CAAY,QAAQ,CAAA,CACrBH,CAAAA,CACA,CAAC,CAAE,SAAA,CAAAI,CAAU,CAAA,GAAM,CACjBC,CAAAA,CAAcL,CAAAA,CAAWI,CAAS,CACpC,CAAA,CACA,MAAOE,CAAAA,CAAcC,CAAAA,GAAc,CAEjC,MAAMC,GAAAA,CAAyBP,CAAAA,EAAM,QAASC,GAAAA,CAAe,CAC3DO,GAAAA,CAAU,QAAA,CAAS,SAAA,CAAUT,CAAAA,CAAWO,CAAAA,CAAU,SAAS,EAC3DE,GAAAA,CAAU,QAAA,CAAS,IAAA,CAAKF,CAAAA,CAAU,SAAS,CAAA,CAC3CE,GAAAA,CAAU,QAAA,CAAS,YAAYF,CAAAA,CAAU,SAAS,CAAA,CAClDE,GAAAA,CAAU,QAAA,CAAS,WAAA,CAAYT,CAAS,CAC1C,CAAC,EACH,CAAA,CACAC,CAAAA,CACA,SAAA,CACA,CAAE,aAAA,CAAeC,GAAAA,EAAiB,OAAQ,CAC5C,CACF","file":"chunk-OA7EP5SN.js","sourcesContent":["import { useBroadcastMutation, invalidateAfterBroadcast, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildFollowOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\n/**\n * Payload for following an account.\n */\nexport interface FollowPayload {\n /** Account to follow */\n following: string;\n}\n\n/**\n * React Query mutation hook for following an account.\n *\n * This mutation broadcasts a follow operation to the Hive blockchain,\n * adding the target account to the follower's \"blog\" follow list.\n *\n * @param username - The username of the follower (required for broadcast)\n * @param auth - Authentication context with platform adapter and fallback configuration\n *\n * @returns React Query mutation result\n *\n * @remarks\n * **Post-Broadcast Actions:**\n * - Invalidates relationship cache to show updated follow status\n * - Invalidates account cache to refetch updated follower/following counts\n *\n * @example\n * ```typescript\n * const followMutation = useFollow(username, {\n * adapter: myAdapter,\n * enableFallback: true,\n * fallbackChain: ['keychain', 'key', 'hivesigner']\n * });\n *\n * // Follow an account\n * followMutation.mutate({\n * following: 'alice'\n * });\n * ```\n */\nexport function useFollow(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<FollowPayload>(\n [\"accounts\", \"follow\"],\n username,\n ({ following }) => [\n buildFollowOp(username!, following)\n ],\n async (_result: any, variables) => {\n // Cache invalidation\n await invalidateAfterBroadcast(auth?.adapter, broadcastMode, [\n QueryKeys.accounts.relations(username!, variables.following),\n QueryKeys.accounts.full(variables.following),\n QueryKeys.accounts.followCount(variables.following),\n QueryKeys.accounts.followCount(username!)\n ]);\n },\n auth,\n 'posting',\n { broadcastMode: broadcastMode ?? 'async' }\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {a as a$1}from'./chunk-OBSTAXZB.js';import {b}from'./chunk-K2DAN37J.js';import {a as a$2}from'./chunk-HEILHNSR.js';function a(t,o,u){return b(["communities","subscribe"],t,({community:e})=>[a$1(t,e)],async(e,r)=>{o?.adapter?.invalidateQueries&&await o.adapter.invalidateQueries([a$2.accounts.subscriptions(t),[...a$2.communities.singlePrefix(r.community)],a$2.communities.context(t,r.community)]);},o,"posting",{broadcastMode:u??"async"})}export{a};//# sourceMappingURL=chunk-7BGXFJVA.js.map
2
- //# sourceMappingURL=chunk-7BGXFJVA.js.map
1
+ import {a as a$1}from'./chunk-OBSTAXZB.js';import {b}from'./chunk-J2HM6MWA.js';import {a as a$2}from'./chunk-HEILHNSR.js';function a(t,o,u){return b(["communities","subscribe"],t,({community:e})=>[a$1(t,e)],async(e,r)=>{o?.adapter?.invalidateQueries&&await o.adapter.invalidateQueries([a$2.accounts.subscriptions(t),[...a$2.communities.singlePrefix(r.community)],a$2.communities.context(t,r.community)]);},o,"posting",{broadcastMode:u??"async"})}export{a};//# sourceMappingURL=chunk-OMF5YUFB.js.map
2
+ //# sourceMappingURL=chunk-OMF5YUFB.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/communities/mutations/use-subscribe-community.ts"],"names":["useSubscribeCommunity","username","auth","broadcastMode","useBroadcastMutation","community","buildSubscribeOp","_result","variables","QueryKeys"],"mappings":"0HAgDO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,aAAA,CAAe,WAAW,CAAA,CAC3BH,CAAAA,CACA,CAAC,CAAE,SAAA,CAAAI,CAAU,CAAA,GAAM,CACjBC,GAAAA,CAAiBL,CAAAA,CAAWI,CAAS,CACvC,CAAA,CACA,MAAOE,CAAAA,CAAcC,CAAAA,GAAc,CAE7BN,CAAAA,EAAM,OAAA,EAAS,iBAAA,EACjB,MAAMA,CAAAA,CAAK,OAAA,CAAQ,iBAAA,CAAkB,CACnCO,GAAAA,CAAU,QAAA,CAAS,aAAA,CAAcR,CAAS,CAAA,CAC1C,CAAC,GAAGQ,GAAAA,CAAU,WAAA,CAAY,YAAA,CAAaD,CAAAA,CAAU,SAAS,CAAC,CAAA,CAC3DC,GAAAA,CAAU,WAAA,CAAY,OAAA,CAAQR,CAAAA,CAAWO,CAAAA,CAAU,SAAS,CAC9D,CAAC,EAEL,CAAA,CACAN,CAAAA,CACA,SAAA,CACA,CAAE,aAAA,CAAeC,CAAAA,EAAiB,OAAQ,CAC5C,CACF","file":"chunk-7BGXFJVA.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildSubscribeOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\n/**\n * Payload for subscribing to a community.\n */\nexport interface SubscribeCommunityPayload {\n /** Community name (e.g., \"hive-123456\") */\n community: string;\n}\n\n/**\n * React Query mutation hook for subscribing to a community.\n *\n * This mutation broadcasts a subscribe operation to the Hive blockchain,\n * adding the community to the user's subscription list.\n *\n * @param username - The username subscribing (required for broadcast)\n * @param auth - Authentication context with platform adapter and fallback configuration\n *\n * @returns React Query mutation result\n *\n * @remarks\n * **Post-Broadcast Actions:**\n * - Invalidates subscriptions cache to show updated subscription list\n * - Invalidates community cache to refetch updated subscriber count\n *\n * **Operation Details:**\n * - Uses custom_json operation with id \"community\"\n * - Action: [\"subscribe\", {\"community\": \"hive-123456\"}]\n * - Authority: Posting key\n *\n * @example\n * ```typescript\n * const subscribeMutation = useSubscribeCommunity(username, {\n * adapter: myAdapter,\n * enableFallback: true,\n * fallbackChain: ['keychain', 'key', 'hivesigner']\n * });\n *\n * // Subscribe to a community\n * subscribeMutation.mutate({\n * community: 'hive-123456'\n * });\n * ```\n */\nexport function useSubscribeCommunity(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<SubscribeCommunityPayload>(\n [\"communities\", \"subscribe\"],\n username,\n ({ community }) => [\n buildSubscribeOp(username!, community)\n ],\n async (_result: any, variables) => {\n // Cache invalidation\n if (auth?.adapter?.invalidateQueries) {\n await auth.adapter.invalidateQueries([\n QueryKeys.accounts.subscriptions(username!),\n [...QueryKeys.communities.singlePrefix(variables.community)],\n QueryKeys.communities.context(username!, variables.community)\n ]);\n }\n },\n auth,\n 'posting',\n { broadcastMode: broadcastMode ?? 'async' }\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/modules/communities/mutations/use-subscribe-community.ts"],"names":["useSubscribeCommunity","username","auth","broadcastMode","useBroadcastMutation","community","buildSubscribeOp","_result","variables","QueryKeys"],"mappings":"0HAgDO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,aAAA,CAAe,WAAW,CAAA,CAC3BH,CAAAA,CACA,CAAC,CAAE,SAAA,CAAAI,CAAU,CAAA,GAAM,CACjBC,GAAAA,CAAiBL,CAAAA,CAAWI,CAAS,CACvC,CAAA,CACA,MAAOE,CAAAA,CAAcC,CAAAA,GAAc,CAE7BN,CAAAA,EAAM,OAAA,EAAS,iBAAA,EACjB,MAAMA,CAAAA,CAAK,OAAA,CAAQ,iBAAA,CAAkB,CACnCO,GAAAA,CAAU,QAAA,CAAS,aAAA,CAAcR,CAAS,CAAA,CAC1C,CAAC,GAAGQ,GAAAA,CAAU,WAAA,CAAY,YAAA,CAAaD,CAAAA,CAAU,SAAS,CAAC,CAAA,CAC3DC,GAAAA,CAAU,WAAA,CAAY,OAAA,CAAQR,CAAAA,CAAWO,CAAAA,CAAU,SAAS,CAC9D,CAAC,EAEL,CAAA,CACAN,CAAAA,CACA,SAAA,CACA,CAAE,aAAA,CAAeC,CAAAA,EAAiB,OAAQ,CAC5C,CACF","file":"chunk-OMF5YUFB.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildSubscribeOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\n/**\n * Payload for subscribing to a community.\n */\nexport interface SubscribeCommunityPayload {\n /** Community name (e.g., \"hive-123456\") */\n community: string;\n}\n\n/**\n * React Query mutation hook for subscribing to a community.\n *\n * This mutation broadcasts a subscribe operation to the Hive blockchain,\n * adding the community to the user's subscription list.\n *\n * @param username - The username subscribing (required for broadcast)\n * @param auth - Authentication context with platform adapter and fallback configuration\n *\n * @returns React Query mutation result\n *\n * @remarks\n * **Post-Broadcast Actions:**\n * - Invalidates subscriptions cache to show updated subscription list\n * - Invalidates community cache to refetch updated subscriber count\n *\n * **Operation Details:**\n * - Uses custom_json operation with id \"community\"\n * - Action: [\"subscribe\", {\"community\": \"hive-123456\"}]\n * - Authority: Posting key\n *\n * @example\n * ```typescript\n * const subscribeMutation = useSubscribeCommunity(username, {\n * adapter: myAdapter,\n * enableFallback: true,\n * fallbackChain: ['keychain', 'key', 'hivesigner']\n * });\n *\n * // Subscribe to a community\n * subscribeMutation.mutate({\n * community: 'hive-123456'\n * });\n * ```\n */\nexport function useSubscribeCommunity(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<SubscribeCommunityPayload>(\n [\"communities\", \"subscribe\"],\n username,\n ({ community }) => [\n buildSubscribeOp(username!, community)\n ],\n async (_result: any, variables) => {\n // Cache invalidation\n if (auth?.adapter?.invalidateQueries) {\n await auth.adapter.invalidateQueries([\n QueryKeys.accounts.subscriptions(username!),\n [...QueryKeys.communities.singlePrefix(variables.community)],\n QueryKeys.communities.context(username!, variables.community)\n ]);\n }\n },\n auth,\n 'posting',\n { broadcastMode: broadcastMode ?? 'async' }\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-K2DAN37J.js';import {a}from'./chunk-HEILHNSR.js';function m(e,n,o){return b(["wallet","engine-market-order"],e,t=>{let r,i;t.action==="cancel"?(i="cancel",r={type:t.orderType,id:t.orderId}):(i=t.action,r={symbol:t.symbol,quantity:t.quantity,price:t.price});let d=JSON.stringify({contractName:"market",contractAction:i,contractPayload:r});return [["custom_json",{id:"ssc-mainnet-hive",required_auths:[e],required_posting_auths:[],json:d}]]},async()=>{await b$1(n?.adapter,o,[a.accounts.full(e),["ecency-wallets","asset-info",e],["wallet","portfolio","v2",e]]);},n,"active",{broadcastMode:o})}export{m as a};//# sourceMappingURL=chunk-37N2QITX.js.map
2
- //# sourceMappingURL=chunk-37N2QITX.js.map
1
+ import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-J2HM6MWA.js';import {a}from'./chunk-HEILHNSR.js';function m(e,n,o){return b(["wallet","engine-market-order"],e,t=>{let r,i;t.action==="cancel"?(i="cancel",r={type:t.orderType,id:t.orderId}):(i=t.action,r={symbol:t.symbol,quantity:t.quantity,price:t.price});let d=JSON.stringify({contractName:"market",contractAction:i,contractPayload:r});return [["custom_json",{id:"ssc-mainnet-hive",required_auths:[e],required_posting_auths:[],json:d}]]},async()=>{await b$1(n?.adapter,o,[a.accounts.full(e),["ecency-wallets","asset-info",e],["wallet","portfolio","v2",e]]);},n,"active",{broadcastMode:o})}export{m as a};//# sourceMappingURL=chunk-ONRD3CRU.js.map
2
+ //# sourceMappingURL=chunk-ONRD3CRU.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/wallet/mutations/use-engine-market-order.ts"],"names":["useEngineMarketOrder","username","auth","broadcastMode","useBroadcastMutation","payload","contractPayload","contractAction","json","invalidateAfterBroadcast","QueryKeys"],"mappings":"mHAeO,SAASA,CAAAA,CAAqBC,CAAAA,CAA8BC,CAAAA,CACjEC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,QAAA,CAAU,qBAAqB,CAAA,CAChCH,CAAAA,CACCI,GAAY,CACX,IAAIC,CAAAA,CACAC,CAAAA,CAEAF,CAAAA,CAAQ,MAAA,GAAW,QAAA,EACrBE,CAAAA,CAAiB,QAAA,CACjBD,CAAAA,CAAkB,CAChB,IAAA,CAAMD,CAAAA,CAAQ,SAAA,CACd,GAAIA,CAAAA,CAAQ,OACd,CAAA,GAEAE,CAAAA,CAAiBF,CAAAA,CAAQ,MAAA,CACzBC,EAAkB,CAChB,MAAA,CAAQD,CAAAA,CAAQ,MAAA,CAChB,QAAA,CAAUA,CAAAA,CAAQ,SAClB,KAAA,CAAOA,CAAAA,CAAQ,KACjB,CAAA,CAAA,CAGF,IAAMG,CAAAA,CAAO,IAAA,CAAK,SAAA,CAAU,CAC1B,YAAA,CAAc,QAAA,CACd,cAAA,CAAAD,CAAAA,CACA,eAAA,CAAAD,CACF,CAAC,CAAA,CACD,OAAO,CAAC,CAAC,aAAA,CAAe,CACtB,EAAA,CAAI,kBAAA,CACJ,cAAA,CAAgB,CAACL,CAAS,CAAA,CAC1B,uBAAwB,EAAC,CACzB,IAAA,CAAAO,CACF,CAAC,CAAc,CACjB,CAAA,CACA,SAAY,CACV,MAAMC,GAAAA,CAAyBP,CAAAA,EAAM,OAAA,CAASC,EAAe,CAC3DO,CAAAA,CAAU,QAAA,CAAS,IAAA,CAAKT,CAAQ,CAAA,CAChC,CAAC,gBAAA,CAAkB,YAAA,CAAcA,CAAQ,CAAA,CACzC,CAAC,QAAA,CAAU,YAAa,IAAA,CAAMA,CAAQ,CACxC,CAAC,EACH,CAAA,CACAC,CAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,CAAc,CAClB,CACF","file":"chunk-37N2QITX.js","sourcesContent":["import { useBroadcastMutation, invalidateAfterBroadcast } from \"@/modules/core/mutations\";\nimport type { BroadcastMode } from \"@/modules/core/mutations\";\nimport { QueryKeys } from \"@/modules/core\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport type { Operation } from \"../../../hive-tx\";\n\nexport interface EngineMarketOrderPayload {\n action: \"buy\" | \"sell\" | \"cancel\";\n symbol: string;\n quantity?: string;\n price?: string;\n orderId?: string;\n orderType?: \"buy\" | \"sell\";\n}\n\nexport function useEngineMarketOrder(username: string | undefined, auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<EngineMarketOrderPayload>(\n [\"wallet\", \"engine-market-order\"],\n username,\n (payload) => {\n let contractPayload: Record<string, string>;\n let contractAction: string;\n\n if (payload.action === \"cancel\") {\n contractAction = \"cancel\";\n contractPayload = {\n type: payload.orderType!,\n id: payload.orderId!,\n };\n } else {\n contractAction = payload.action;\n contractPayload = {\n symbol: payload.symbol,\n quantity: payload.quantity!,\n price: payload.price!,\n };\n }\n\n const json = JSON.stringify({\n contractName: \"market\",\n contractAction,\n contractPayload,\n });\n return [[\"custom_json\", {\n id: \"ssc-mainnet-hive\",\n required_auths: [username!],\n required_posting_auths: [],\n json,\n }] as Operation];\n },\n async () => {\n await invalidateAfterBroadcast(auth?.adapter, broadcastMode, [\n QueryKeys.accounts.full(username),\n [\"ecency-wallets\", \"asset-info\", username],\n [\"wallet\", \"portfolio\", \"v2\", username]\n ]);\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/modules/wallet/mutations/use-engine-market-order.ts"],"names":["useEngineMarketOrder","username","auth","broadcastMode","useBroadcastMutation","payload","contractPayload","contractAction","json","invalidateAfterBroadcast","QueryKeys"],"mappings":"mHAeO,SAASA,CAAAA,CAAqBC,CAAAA,CAA8BC,CAAAA,CACjEC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,QAAA,CAAU,qBAAqB,CAAA,CAChCH,CAAAA,CACCI,GAAY,CACX,IAAIC,CAAAA,CACAC,CAAAA,CAEAF,CAAAA,CAAQ,MAAA,GAAW,QAAA,EACrBE,CAAAA,CAAiB,QAAA,CACjBD,CAAAA,CAAkB,CAChB,IAAA,CAAMD,CAAAA,CAAQ,SAAA,CACd,GAAIA,CAAAA,CAAQ,OACd,CAAA,GAEAE,CAAAA,CAAiBF,CAAAA,CAAQ,MAAA,CACzBC,EAAkB,CAChB,MAAA,CAAQD,CAAAA,CAAQ,MAAA,CAChB,QAAA,CAAUA,CAAAA,CAAQ,SAClB,KAAA,CAAOA,CAAAA,CAAQ,KACjB,CAAA,CAAA,CAGF,IAAMG,CAAAA,CAAO,IAAA,CAAK,SAAA,CAAU,CAC1B,YAAA,CAAc,QAAA,CACd,cAAA,CAAAD,CAAAA,CACA,eAAA,CAAAD,CACF,CAAC,CAAA,CACD,OAAO,CAAC,CAAC,aAAA,CAAe,CACtB,EAAA,CAAI,kBAAA,CACJ,cAAA,CAAgB,CAACL,CAAS,CAAA,CAC1B,uBAAwB,EAAC,CACzB,IAAA,CAAAO,CACF,CAAC,CAAc,CACjB,CAAA,CACA,SAAY,CACV,MAAMC,GAAAA,CAAyBP,CAAAA,EAAM,OAAA,CAASC,EAAe,CAC3DO,CAAAA,CAAU,QAAA,CAAS,IAAA,CAAKT,CAAQ,CAAA,CAChC,CAAC,gBAAA,CAAkB,YAAA,CAAcA,CAAQ,CAAA,CACzC,CAAC,QAAA,CAAU,YAAa,IAAA,CAAMA,CAAQ,CACxC,CAAC,EACH,CAAA,CACAC,CAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,CAAc,CAClB,CACF","file":"chunk-ONRD3CRU.js","sourcesContent":["import { useBroadcastMutation, invalidateAfterBroadcast } from \"@/modules/core/mutations\";\nimport type { BroadcastMode } from \"@/modules/core/mutations\";\nimport { QueryKeys } from \"@/modules/core\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport type { Operation } from \"../../../hive-tx\";\n\nexport interface EngineMarketOrderPayload {\n action: \"buy\" | \"sell\" | \"cancel\";\n symbol: string;\n quantity?: string;\n price?: string;\n orderId?: string;\n orderType?: \"buy\" | \"sell\";\n}\n\nexport function useEngineMarketOrder(username: string | undefined, auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<EngineMarketOrderPayload>(\n [\"wallet\", \"engine-market-order\"],\n username,\n (payload) => {\n let contractPayload: Record<string, string>;\n let contractAction: string;\n\n if (payload.action === \"cancel\") {\n contractAction = \"cancel\";\n contractPayload = {\n type: payload.orderType!,\n id: payload.orderId!,\n };\n } else {\n contractAction = payload.action;\n contractPayload = {\n symbol: payload.symbol,\n quantity: payload.quantity!,\n price: payload.price!,\n };\n }\n\n const json = JSON.stringify({\n contractName: \"market\",\n contractAction,\n contractPayload,\n });\n return [[\"custom_json\", {\n id: \"ssc-mainnet-hive\",\n required_auths: [username!],\n required_posting_auths: [],\n json,\n }] as Operation];\n },\n async () => {\n await invalidateAfterBroadcast(auth?.adapter, broadcastMode, [\n QueryKeys.accounts.full(username),\n [\"ecency-wallets\", \"asset-info\", username],\n [\"wallet\", \"portfolio\", \"v2\", username]\n ]);\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {i}from'./chunk-UKK6NLAT.js';import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-K2DAN37J.js';import {a}from'./chunk-HEILHNSR.js';function p(t,e,o){return b(["wallet","withdraw-vesting"],t,n=>[i(t,n.vestingShares)],async()=>{await b$1(e?.adapter,o,[a.accounts.full(t),["ecency-wallets","asset-info",t],["wallet","portfolio","v2",t]]);},e,"active",{broadcastMode:o})}export{p as a};//# sourceMappingURL=chunk-KJUSI6PP.js.map
2
- //# sourceMappingURL=chunk-KJUSI6PP.js.map
1
+ import {i}from'./chunk-UKK6NLAT.js';import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-J2HM6MWA.js';import {a}from'./chunk-HEILHNSR.js';function p(t,e,o){return b(["wallet","withdraw-vesting"],t,n=>[i(t,n.vestingShares)],async()=>{await b$1(e?.adapter,o,[a.accounts.full(t),["ecency-wallets","asset-info",t],["wallet","portfolio","v2",t]]);},e,"active",{broadcastMode:o})}export{p as a};//# sourceMappingURL=chunk-OUIU7KNA.js.map
2
+ //# sourceMappingURL=chunk-OUIU7KNA.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/wallet/mutations/use-withdraw-vesting.ts"],"names":["useWithdrawVesting","username","auth","broadcastMode","useBroadcastMutation","payload","buildWithdrawVestingOp","invalidateAfterBroadcast","QueryKeys"],"mappings":"uJAUO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,QAAA,CAAU,kBAAkB,CAAA,CAC7BH,CAAAA,CACCI,GAAY,CACXC,CAAAA,CAAuBL,CAAAA,CAAWI,CAAAA,CAAQ,aAAa,CACzD,EACA,SAAY,CACV,MAAME,GAAAA,CAAyBL,CAAAA,EAAM,OAAA,CAASC,EAAe,CAC3DK,CAAAA,CAAU,QAAA,CAAS,IAAA,CAAKP,CAAQ,CAAA,CAChC,CAAC,gBAAA,CAAkB,YAAA,CAAcA,CAAQ,CAAA,CACzC,CAAC,QAAA,CAAU,YAAa,IAAA,CAAMA,CAAQ,CACxC,CAAC,EACH,CAAA,CACAC,CAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,CAAc,CAClB,CACF","file":"chunk-KJUSI6PP.js","sourcesContent":["import { useBroadcastMutation, invalidateAfterBroadcast } from \"@/modules/core/mutations\";\nimport type { BroadcastMode } from \"@/modules/core/mutations\";\nimport { QueryKeys } from \"@/modules/core\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport { buildWithdrawVestingOp } from \"@/modules/operations/builders\";\n\nexport interface WithdrawVestingPayload {\n vestingShares: string;\n}\n\nexport function useWithdrawVesting(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<WithdrawVestingPayload>(\n [\"wallet\", \"withdraw-vesting\"],\n username,\n (payload) => [\n buildWithdrawVestingOp(username!, payload.vestingShares)\n ],\n async () => {\n await invalidateAfterBroadcast(auth?.adapter, broadcastMode, [\n QueryKeys.accounts.full(username),\n [\"ecency-wallets\", \"asset-info\", username],\n [\"wallet\", \"portfolio\", \"v2\", username]\n ]);\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/modules/wallet/mutations/use-withdraw-vesting.ts"],"names":["useWithdrawVesting","username","auth","broadcastMode","useBroadcastMutation","payload","buildWithdrawVestingOp","invalidateAfterBroadcast","QueryKeys"],"mappings":"uJAUO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,QAAA,CAAU,kBAAkB,CAAA,CAC7BH,CAAAA,CACCI,GAAY,CACXC,CAAAA,CAAuBL,CAAAA,CAAWI,CAAAA,CAAQ,aAAa,CACzD,EACA,SAAY,CACV,MAAME,GAAAA,CAAyBL,CAAAA,EAAM,OAAA,CAASC,EAAe,CAC3DK,CAAAA,CAAU,QAAA,CAAS,IAAA,CAAKP,CAAQ,CAAA,CAChC,CAAC,gBAAA,CAAkB,YAAA,CAAcA,CAAQ,CAAA,CACzC,CAAC,QAAA,CAAU,YAAa,IAAA,CAAMA,CAAQ,CACxC,CAAC,EACH,CAAA,CACAC,CAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,CAAc,CAClB,CACF","file":"chunk-OUIU7KNA.js","sourcesContent":["import { useBroadcastMutation, invalidateAfterBroadcast } from \"@/modules/core/mutations\";\nimport type { BroadcastMode } from \"@/modules/core/mutations\";\nimport { QueryKeys } from \"@/modules/core\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport { buildWithdrawVestingOp } from \"@/modules/operations/builders\";\n\nexport interface WithdrawVestingPayload {\n vestingShares: string;\n}\n\nexport function useWithdrawVesting(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<WithdrawVestingPayload>(\n [\"wallet\", \"withdraw-vesting\"],\n username,\n (payload) => [\n buildWithdrawVestingOp(username!, payload.vestingShares)\n ],\n async () => {\n await invalidateAfterBroadcast(auth?.adapter, broadcastMode, [\n QueryKeys.accounts.full(username),\n [\"ecency-wallets\", \"asset-info\", username],\n [\"wallet\", \"portfolio\", \"v2\", username]\n ]);\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {p}from'./chunk-UKK6NLAT.js';import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-K2DAN37J.js';import {a}from'./chunk-HEILHNSR.js';function s(e,r,a$1){return b(["wallet","delegate-rc"],e,({to:c,maxRc:o})=>[p(e,c,o)],async(c,o)=>{await b$1(r?.adapter,a$1,[a.accounts.full(e),a.accounts.full(o.to),a.resourceCredits.account(e),a.resourceCredits.account(o.to)]);},r,"active",{broadcastMode:a$1})}export{s as a};//# sourceMappingURL=chunk-DX47GSLU.js.map
2
- //# sourceMappingURL=chunk-DX47GSLU.js.map
1
+ import {p}from'./chunk-UKK6NLAT.js';import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-J2HM6MWA.js';import {a}from'./chunk-HEILHNSR.js';function s(e,r,a$1){return b(["wallet","delegate-rc"],e,({to:c,maxRc:o})=>[p(e,c,o)],async(c,o)=>{await b$1(r?.adapter,a$1,[a.accounts.full(e),a.accounts.full(o.to),a.resourceCredits.account(e),a.resourceCredits.account(o.to)]);},r,"active",{broadcastMode:a$1})}export{s as a};//# sourceMappingURL=chunk-PTXAORWB.js.map
2
+ //# sourceMappingURL=chunk-PTXAORWB.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/wallet/mutations/use-delegate-rc.ts"],"names":["useDelegateRc","username","auth","broadcastMode","useBroadcastMutation","to","maxRc","buildDelegateRcOp","_result","variables","invalidateAfterBroadcast","QueryKeys"],"mappings":"uJAUO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,GAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,QAAA,CAAU,aAAa,CAAA,CACxBH,CAAAA,CACA,CAAC,CAAE,EAAA,CAAAI,CAAAA,CAAI,KAAA,CAAAC,CAAM,CAAA,GAAM,CACjBC,CAAAA,CAAkBN,EAAWI,CAAAA,CAAIC,CAAK,CACxC,CAAA,CACA,MAAOE,CAAAA,CAASC,CAAAA,GAAc,CAC5B,MAAMC,GAAAA,CAAyBR,CAAAA,EAAM,OAAA,CAASC,GAAAA,CAAe,CAC3DQ,CAAAA,CAAU,QAAA,CAAS,IAAA,CAAKV,CAAQ,CAAA,CAChCU,CAAAA,CAAU,QAAA,CAAS,IAAA,CAAKF,CAAAA,CAAU,EAAE,CAAA,CACpCE,CAAAA,CAAU,gBAAgB,OAAA,CAAQV,CAAS,CAAA,CAC3CU,CAAAA,CAAU,eAAA,CAAgB,OAAA,CAAQF,CAAAA,CAAU,EAAE,CAChD,CAAC,EACH,CAAA,CACAP,CAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,GAAc,CAClB,CACF","file":"chunk-DX47GSLU.js","sourcesContent":["import { useBroadcastMutation, invalidateAfterBroadcast, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildDelegateRcOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\nexport interface DelegateRcPayload {\n to: string;\n maxRc: string | number;\n}\n\nexport function useDelegateRc(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<DelegateRcPayload>(\n [\"wallet\", \"delegate-rc\"],\n username,\n ({ to, maxRc }) => [\n buildDelegateRcOp(username!, to, maxRc)\n ],\n async (_result, variables) => {\n await invalidateAfterBroadcast(auth?.adapter, broadcastMode, [\n QueryKeys.accounts.full(username),\n QueryKeys.accounts.full(variables.to),\n QueryKeys.resourceCredits.account(username!),\n QueryKeys.resourceCredits.account(variables.to),\n ]);\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/modules/wallet/mutations/use-delegate-rc.ts"],"names":["useDelegateRc","username","auth","broadcastMode","useBroadcastMutation","to","maxRc","buildDelegateRcOp","_result","variables","invalidateAfterBroadcast","QueryKeys"],"mappings":"uJAUO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,GAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,QAAA,CAAU,aAAa,CAAA,CACxBH,CAAAA,CACA,CAAC,CAAE,EAAA,CAAAI,CAAAA,CAAI,KAAA,CAAAC,CAAM,CAAA,GAAM,CACjBC,CAAAA,CAAkBN,EAAWI,CAAAA,CAAIC,CAAK,CACxC,CAAA,CACA,MAAOE,CAAAA,CAASC,CAAAA,GAAc,CAC5B,MAAMC,GAAAA,CAAyBR,CAAAA,EAAM,OAAA,CAASC,GAAAA,CAAe,CAC3DQ,CAAAA,CAAU,QAAA,CAAS,IAAA,CAAKV,CAAQ,CAAA,CAChCU,CAAAA,CAAU,QAAA,CAAS,IAAA,CAAKF,CAAAA,CAAU,EAAE,CAAA,CACpCE,CAAAA,CAAU,gBAAgB,OAAA,CAAQV,CAAS,CAAA,CAC3CU,CAAAA,CAAU,eAAA,CAAgB,OAAA,CAAQF,CAAAA,CAAU,EAAE,CAChD,CAAC,EACH,CAAA,CACAP,CAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,GAAc,CAClB,CACF","file":"chunk-PTXAORWB.js","sourcesContent":["import { useBroadcastMutation, invalidateAfterBroadcast, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildDelegateRcOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\nexport interface DelegateRcPayload {\n to: string;\n maxRc: string | number;\n}\n\nexport function useDelegateRc(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<DelegateRcPayload>(\n [\"wallet\", \"delegate-rc\"],\n username,\n ({ to, maxRc }) => [\n buildDelegateRcOp(username!, to, maxRc)\n ],\n async (_result, variables) => {\n await invalidateAfterBroadcast(auth?.adapter, broadcastMode, [\n QueryKeys.accounts.full(username),\n QueryKeys.accounts.full(variables.to),\n QueryKeys.resourceCredits.account(username!),\n QueryKeys.resourceCredits.account(variables.to),\n ]);\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {e}from'./chunk-K3LA2I7M.js';import {b}from'./chunk-K2DAN37J.js';import {a}from'./chunk-HEILHNSR.js';function p(t,e$1,r){return b(["notifications","set-last-read"],t,({date:d})=>e(t,d),async()=>{e$1?.adapter?.invalidateQueries&&await e$1.adapter.invalidateQueries([a.notifications.unreadCount(t)]);},e$1,"posting",{broadcastMode:r??"async"})}export{p as a};//# sourceMappingURL=chunk-J3PY2B6H.js.map
2
- //# sourceMappingURL=chunk-J3PY2B6H.js.map
1
+ import {e}from'./chunk-K3LA2I7M.js';import {b}from'./chunk-J2HM6MWA.js';import {a}from'./chunk-HEILHNSR.js';function p(t,e$1,r){return b(["notifications","set-last-read"],t,({date:d})=>e(t,d),async()=>{e$1?.adapter?.invalidateQueries&&await e$1.adapter.invalidateQueries([a.notifications.unreadCount(t)]);},e$1,"posting",{broadcastMode:r??"async"})}export{p as a};//# sourceMappingURL=chunk-Q56WX4Q4.js.map
2
+ //# sourceMappingURL=chunk-Q56WX4Q4.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/notifications/mutations/use-set-last-read.ts"],"names":["useSetLastRead","username","auth","broadcastMode","useBroadcastMutation","date","buildSetLastReadOps","QueryKeys"],"mappings":"4GASO,SAASA,CAAAA,CACdC,EACAC,GAAAA,CACAC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,eAAA,CAAiB,eAAe,EACjCH,CAAAA,CACA,CAAC,CAAE,IAAA,CAAAI,CAAK,IAAMC,CAAAA,CAAoBL,CAAAA,CAAWI,CAAI,CAAA,CACjD,SAAY,CACNH,KAAM,OAAA,EAAS,iBAAA,EACjB,MAAMA,GAAAA,CAAK,OAAA,CAAQ,kBAAkB,CACnCK,CAAAA,CAAU,cAAc,WAAA,CAAYN,CAAQ,CAC9C,CAAC,EAEL,EACAC,GAAAA,CACA,SAAA,CACA,CAAE,aAAA,CAAeC,CAAAA,EAAiB,OAAQ,CAC5C,CACF","file":"chunk-J3PY2B6H.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildSetLastReadOps } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\nexport interface SetLastReadPayload {\n date?: string;\n}\n\nexport function useSetLastRead(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<SetLastReadPayload>(\n [\"notifications\", \"set-last-read\"],\n username,\n ({ date }) => buildSetLastReadOps(username!, date),\n async () => {\n if (auth?.adapter?.invalidateQueries) {\n await auth.adapter.invalidateQueries([\n QueryKeys.notifications.unreadCount(username),\n ]);\n }\n },\n auth,\n 'posting',\n { broadcastMode: broadcastMode ?? 'async' }\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/modules/notifications/mutations/use-set-last-read.ts"],"names":["useSetLastRead","username","auth","broadcastMode","useBroadcastMutation","date","buildSetLastReadOps","QueryKeys"],"mappings":"4GASO,SAASA,CAAAA,CACdC,EACAC,GAAAA,CACAC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,eAAA,CAAiB,eAAe,EACjCH,CAAAA,CACA,CAAC,CAAE,IAAA,CAAAI,CAAK,IAAMC,CAAAA,CAAoBL,CAAAA,CAAWI,CAAI,CAAA,CACjD,SAAY,CACNH,KAAM,OAAA,EAAS,iBAAA,EACjB,MAAMA,GAAAA,CAAK,OAAA,CAAQ,kBAAkB,CACnCK,CAAAA,CAAU,cAAc,WAAA,CAAYN,CAAQ,CAC9C,CAAC,EAEL,EACAC,GAAAA,CACA,SAAA,CACA,CAAE,aAAA,CAAeC,CAAAA,EAAiB,OAAQ,CAC5C,CACF","file":"chunk-Q56WX4Q4.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildSetLastReadOps } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\nexport interface SetLastReadPayload {\n date?: string;\n}\n\nexport function useSetLastRead(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<SetLastReadPayload>(\n [\"notifications\", \"set-last-read\"],\n username,\n ({ date }) => buildSetLastReadOps(username!, date),\n async () => {\n if (auth?.adapter?.invalidateQueries) {\n await auth.adapter.invalidateQueries([\n QueryKeys.notifications.unreadCount(username),\n ]);\n }\n },\n auth,\n 'posting',\n { broadcastMode: broadcastMode ?? 'async' }\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {a}from'./chunk-D4CQVW6R.js';import {a as a$2}from'./chunk-NXYHJZ5U.js';import {a as a$3}from'./chunk-QXRJ3Q4Y.js';import {a as a$4}from'./chunk-X37M6C2V.js';import {a as a$6}from'./chunk-BK4LRFXY.js';import {a as a$1}from'./chunk-44EOXEIC.js';import {a as a$5}from'./chunk-JLMQHYLJ.js';import {b as b$1}from'./chunk-4GE3TZP3.js';import {b}from'./chunk-POHYQBLL.js';import {queryOptions}from'@tanstack/react-query';function T(o,r,u={refetch:false}){let i=b(),s=u.currency??"usd",l=async t=>(u.refetch?await i.fetchQuery(t):await i.prefetchQuery(t),i.getQueryData(t.queryKey)),p=async t=>{if(!t||s==="usd")return t;try{let e=await b$1(s);return {...t,price:t.price*e}}catch(e){return console.warn(`Failed to convert price from USD to ${s}:`,e),t}},O=a(o,s,true),P=async()=>{try{let e=(await i.fetchQuery(O)).wallets.find(a=>a.symbol.toUpperCase()===r.toUpperCase());if(!e)return;let n=[];if(e.liquid!==void 0&&e.liquid!==null&&n.push({name:"liquid",balance:e.liquid}),e.staked!==void 0&&e.staked!==null&&e.staked>0&&n.push({name:"staked",balance:e.staked}),e.savings!==void 0&&e.savings!==null&&e.savings>0&&n.push({name:"savings",balance:e.savings}),e.extraData&&Array.isArray(e.extraData))for(let a of e.extraData){if(!a||typeof a!="object")continue;let c=a.dataKey,y=a.value;if(typeof y=="string"){let d=y.replace(/,/g,"").match(/[+-]?\s*(\d+(?:\.\d+)?)/);if(d){let f=Math.abs(Number.parseFloat(d[1]));c==="delegated_hive_power"?n.push({name:"outgoing_delegations",balance:f}):c==="received_hive_power"?n.push({name:"incoming_delegations",balance:f}):c==="powering_down_hive_power"&&n.push({name:"pending_power_down",balance:f});}}}return {name:e.symbol,title:e.name,price:e.fiatRate,accountBalance:e.balance,apr:e.apr?.toString(),layer:e.layer,pendingRewards:e.pendingRewards,parts:n}}catch{return}};return queryOptions({queryKey:["ecency-wallets","asset-info",o,r,s],queryFn:async()=>{let t=await P();if(t&&t.price>0)return t;let e;if(r==="HIVE")e=await l(a$1(o));else if(r==="HP")e=await l(a$2(o));else if(r==="HBD")e=await l(a$3(o));else if(r==="POINTS")e=await l(a$4(o));else if((await i.ensureQueryData(a$5(o))).some(a=>a.symbol===r))e=await l(a$6(o,r));else {if(t)return t;throw new Error(`[SDK][Wallet] \u2013 unrecognized asset "${r}"`)}if(t&&e&&e.price>0){let n=await p(e);return {...t,price:n.price}}return await p(e)}})}export{T as a};//# sourceMappingURL=chunk-EYKUJB3F.js.map
2
- //# sourceMappingURL=chunk-EYKUJB3F.js.map
1
+ import {a}from'./chunk-D4CQVW6R.js';import {a as a$2}from'./chunk-UUNZHPWM.js';import {a as a$3}from'./chunk-MBDFLDIN.js';import {a as a$4}from'./chunk-X37M6C2V.js';import {a as a$6}from'./chunk-VDQYQAHM.js';import {a as a$1}from'./chunk-GNVQHSS3.js';import {a as a$5}from'./chunk-JLMQHYLJ.js';import {b as b$1}from'./chunk-4GE3TZP3.js';import {b}from'./chunk-POHYQBLL.js';import {queryOptions}from'@tanstack/react-query';function T(o,r,u={refetch:false}){let i=b(),s=u.currency??"usd",l=async t=>(u.refetch?await i.fetchQuery(t):await i.prefetchQuery(t),i.getQueryData(t.queryKey)),p=async t=>{if(!t||s==="usd")return t;try{let e=await b$1(s);return {...t,price:t.price*e}}catch(e){return console.warn(`Failed to convert price from USD to ${s}:`,e),t}},O=a(o,s,true),P=async()=>{try{let e=(await i.fetchQuery(O)).wallets.find(a=>a.symbol.toUpperCase()===r.toUpperCase());if(!e)return;let n=[];if(e.liquid!==void 0&&e.liquid!==null&&n.push({name:"liquid",balance:e.liquid}),e.staked!==void 0&&e.staked!==null&&e.staked>0&&n.push({name:"staked",balance:e.staked}),e.savings!==void 0&&e.savings!==null&&e.savings>0&&n.push({name:"savings",balance:e.savings}),e.extraData&&Array.isArray(e.extraData))for(let a of e.extraData){if(!a||typeof a!="object")continue;let c=a.dataKey,y=a.value;if(typeof y=="string"){let d=y.replace(/,/g,"").match(/[+-]?\s*(\d+(?:\.\d+)?)/);if(d){let f=Math.abs(Number.parseFloat(d[1]));c==="delegated_hive_power"?n.push({name:"outgoing_delegations",balance:f}):c==="received_hive_power"?n.push({name:"incoming_delegations",balance:f}):c==="powering_down_hive_power"&&n.push({name:"pending_power_down",balance:f});}}}return {name:e.symbol,title:e.name,price:e.fiatRate,accountBalance:e.balance,apr:e.apr?.toString(),layer:e.layer,pendingRewards:e.pendingRewards,parts:n}}catch{return}};return queryOptions({queryKey:["ecency-wallets","asset-info",o,r,s],queryFn:async()=>{let t=await P();if(t&&t.price>0)return t;let e;if(r==="HIVE")e=await l(a$1(o));else if(r==="HP")e=await l(a$2(o));else if(r==="HBD")e=await l(a$3(o));else if(r==="POINTS")e=await l(a$4(o));else if((await i.ensureQueryData(a$5(o))).some(a=>a.symbol===r))e=await l(a$6(o,r));else {if(t)return t;throw new Error(`[SDK][Wallet] \u2013 unrecognized asset "${r}"`)}if(t&&e&&e.price>0){let n=await p(e);return {...t,price:n.price}}return await p(e)}})}export{T as a};//# sourceMappingURL=chunk-QQ7MZFRE.js.map
2
+ //# sourceMappingURL=chunk-QQ7MZFRE.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/wallet/queries/get-account-wallet-asset-info-query-options.ts"],"names":["getAccountWalletAssetInfoQueryOptions","username","asset","options","queryClient","getQueryClient","currency","fetchQuery","qo","convertPriceToUserCurrency","assetInfo","conversionRate","getCurrencyRate","error","portfolioQuery","getPortfolioQueryOptions","getPortfolioAssetInfo","assetItem","item","parts","extraItem","dataKey","value","match","numValue","queryOptions","portfolioAssetInfo","getHiveAssetGeneralInfoQueryOptions","getHivePowerAssetGeneralInfoQueryOptions","getHbdAssetGeneralInfoQueryOptions","getPointsAssetGeneralInfoQueryOptions","getHiveEngineTokensBalancesQueryOptions","balance","getHiveEngineTokenGeneralInfoQueryOptions","converted"],"mappings":"saAqBO,SAASA,EACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CAAmB,CAAE,OAAA,CAAS,KAAM,EACpC,CACA,IAAMC,EAAcC,CAAAA,EAAe,CAC7BC,EAAWH,CAAAA,CAAQ,QAAA,EAAY,KAAA,CAE/BI,CAAAA,CAAa,MAAOC,CAAAA,GACpBL,EAAQ,OAAA,CACV,MAAMC,EAAY,UAAA,CAAWI,CAAE,EAE/B,MAAMJ,CAA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,MAAM,IAAI,KAAA,CACR,CAAA,yCAAA,EAAuCxB,CAAK,CAAA,CAAA,CAC9C,CAAA,CAMJ,GAAIwB,CAAAA,EAAsBhB,CAAAA,EAAaA,CAAAA,CAAU,MAAQ,CAAA,CAAG,CAC1D,IAAMwB,CAAAA,CAAY,MAAMzB,EAA2BC,CAAS,CAAA,CAC5D,OAAO,CACL,GAAGgB,CAAAA,CACH,MAAOQ,CAAAA,CAAW,KACpB,CACF,CAEA,OAAO,MAAMzB,EAA2BC,CAAS,CACnD,CACF,CAAC,CACH","file":"chunk-EYKUJB3F.js","sourcesContent":["import { getQueryClient } from \"@/modules/core\";\nimport { getCurrencyRate } from \"@/modules/market\";\nimport { queryOptions } from \"@tanstack/react-query\";\nimport type { GeneralAssetInfo } from \"../types\";\nimport { getHiveAssetGeneralInfoQueryOptions } from \"./get-hive-asset-general-info-query-options\";\nimport { getHbdAssetGeneralInfoQueryOptions } from \"./get-hbd-asset-general-info-query-options\";\nimport { getHivePowerAssetGeneralInfoQueryOptions } from \"./get-hive-power-asset-general-info-query-options\";\nimport { getHiveEngineTokensBalancesQueryOptions } from \"@/modules/hive-engine/queries\";\nimport { getHiveEngineTokenGeneralInfoQueryOptions } from \"@/modules/hive-engine/queries\";\nimport { getPointsAssetGeneralInfoQueryOptions } from \"@/modules/points/queries\";\nimport {\n getPortfolioQueryOptions,\n type PortfolioResponse,\n type PortfolioWalletItem,\n} from \"./get-portfolio-query-options\";\n\ninterface Options {\n refetch?: boolean;\n currency?: string;\n}\n\nexport function getAccountWalletAssetInfoQueryOptions(\n username: string,\n asset: string,\n options: Options = { refetch: false }\n) {\n const queryClient = getQueryClient();\n const currency = options.currency ?? \"usd\";\n\n const fetchQuery = async (qo: any) => {\n if (options.refetch) {\n await queryClient.fetchQuery(qo);\n } else {\n await queryClient.prefetchQuery(qo);\n }\n return queryClient.getQueryData<GeneralAssetInfo>(qo.queryKey);\n };\n\n const convertPriceToUserCurrency = async (\n assetInfo: GeneralAssetInfo | undefined\n ): Promise<GeneralAssetInfo | undefined> => {\n if (!assetInfo || currency === \"usd\") {\n return assetInfo;\n }\n\n try {\n const conversionRate = await getCurrencyRate(currency);\n return {\n ...assetInfo,\n price: assetInfo.price * conversionRate,\n };\n } catch (error) {\n console.warn(`Failed to convert price from USD to ${currency}:`, error);\n return assetInfo;\n }\n };\n\n const portfolioQuery = getPortfolioQueryOptions(username, currency, true);\n\n const getPortfolioAssetInfo = async () => {\n try {\n const portfolio: PortfolioResponse = await queryClient.fetchQuery(portfolioQuery);\n const assetItem = portfolio.wallets.find(\n (item: PortfolioWalletItem) =>\n item.symbol.toUpperCase() === asset.toUpperCase()\n );\n\n if (!assetItem) return undefined;\n\n const parts: Array<{ name: string; balance: number }> = [];\n\n if (assetItem.liquid !== undefined && assetItem.liquid !== null) {\n parts.push({ name: \"liquid\", balance: assetItem.liquid });\n }\n\n if (assetItem.staked !== undefined && assetItem.staked !== null && assetItem.staked > 0) {\n parts.push({ name: \"staked\", balance: assetItem.staked });\n }\n\n if (assetItem.savings !== undefined && assetItem.savings !== null && assetItem.savings > 0) {\n parts.push({ name: \"savings\", balance: assetItem.savings });\n }\n\n if (assetItem.extraData && Array.isArray(assetItem.extraData)) {\n for (const extraItem of assetItem.extraData) {\n if (!extraItem || typeof extraItem !== \"object\") continue;\n\n const dataKey = extraItem.dataKey;\n const value = extraItem.value;\n\n if (typeof value === \"string\") {\n const cleanValue = value.replace(/,/g, \"\");\n const match = cleanValue.match(/[+-]?\\s*(\\d+(?:\\.\\d+)?)/);\n if (match) {\n const numValue = Math.abs(Number.parseFloat(match[1]));\n\n if (dataKey === \"delegated_hive_power\") {\n parts.push({ name: \"outgoing_delegations\", balance: numValue });\n } else if (dataKey === \"received_hive_power\") {\n parts.push({ name: \"incoming_delegations\", balance: numValue });\n } else if (dataKey === \"powering_down_hive_power\") {\n parts.push({ name: \"pending_power_down\", balance: numValue });\n }\n }\n }\n }\n }\n\n return {\n name: assetItem.symbol,\n title: assetItem.name,\n price: assetItem.fiatRate,\n accountBalance: assetItem.balance,\n apr: assetItem.apr?.toString(),\n layer: assetItem.layer,\n pendingRewards: assetItem.pendingRewards,\n parts,\n } as GeneralAssetInfo;\n } catch {\n return undefined;\n }\n };\n\n return queryOptions({\n queryKey: [\"ecency-wallets\", \"asset-info\", username, asset, currency],\n queryFn: async () => {\n const portfolioAssetInfo = await getPortfolioAssetInfo();\n\n if (portfolioAssetInfo && portfolioAssetInfo.price > 0) {\n return portfolioAssetInfo;\n }\n\n let assetInfo: GeneralAssetInfo | undefined;\n\n if (asset === \"HIVE\") {\n assetInfo = await fetchQuery(getHiveAssetGeneralInfoQueryOptions(username));\n } else if (asset === \"HP\") {\n assetInfo = await fetchQuery(getHivePowerAssetGeneralInfoQueryOptions(username));\n } else if (asset === \"HBD\") {\n assetInfo = await fetchQuery(getHbdAssetGeneralInfoQueryOptions(username));\n } else if (asset === \"POINTS\") {\n assetInfo = await fetchQuery(getPointsAssetGeneralInfoQueryOptions(username));\n } else {\n // Check if it's a Hive Engine token\n const balances = await queryClient.ensureQueryData(\n getHiveEngineTokensBalancesQueryOptions(username)\n );\n\n if (balances.some((balance) => balance.symbol === asset)) {\n assetInfo = await fetchQuery(\n getHiveEngineTokenGeneralInfoQueryOptions(username, asset)\n );\n } else if (portfolioAssetInfo) {\n // Unknown asset but portfolio has data — use it as-is\n return portfolioAssetInfo;\n } else {\n throw new Error(\n `[SDK][Wallet] – unrecognized asset \"${asset}\"`\n );\n }\n }\n\n // If portfolio had rich data (parts, balance) but zero price,\n // merge the fallback price into the portfolio data\n if (portfolioAssetInfo && assetInfo && assetInfo.price > 0) {\n const converted = await convertPriceToUserCurrency(assetInfo);\n return {\n ...portfolioAssetInfo,\n price: converted!.price,\n };\n }\n\n return await convertPriceToUserCurrency(assetInfo);\n },\n });\n}\n"]}
1
+ {"version":3,"sources":["../../src/modules/wallet/queries/get-account-wallet-asset-info-query-options.ts"],"names":["getAccountWalletAssetInfoQueryOptions","username","asset","options","queryClient","getQueryClient","currency","fetchQuery","qo","convertPriceToUserCurrency","assetInfo","conversionRate","getCurrencyRate","error","portfolioQuery","getPortfolioQueryOptions","getPortfolioAssetInfo","assetItem","item","parts","extraItem","dataKey","value","match","numValue","queryOptions","portfolioAssetInfo","getHiveAssetGeneralInfoQueryOptions","getHivePowerAssetGeneralInfoQueryOptions","getHbdAssetGeneralInfoQueryOptions","getPointsAssetGeneralInfoQueryOptions","getHiveEngineTokensBalancesQueryOptions","balance","getHiveEngineTokenGeneralInfoQueryOptions","converted"],"mappings":"saAqBO,SAASA,EACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CAAmB,CAAE,OAAA,CAAS,KAAM,EACpC,CACA,IAAMC,EAAcC,CAAAA,EAAe,CAC7BC,EAAWH,CAAAA,CAAQ,QAAA,EAAY,KAAA,CAE/BI,CAAAA,CAAa,MAAOC,CAAAA,GACpBL,EAAQ,OAAA,CACV,MAAMC,EAAY,UAAA,CAAWI,CAAE,EAE/B,MAAMJ,CAAAA,CAAY,aAAA,CAAcI,CAAE,CAAA,CAE7BJ,CAAAA,CAAY,aAA+BI,CAAAA,CAAG,QAAQ,CAAA,CAAA,CAGzDC,CAAAA,CAA6B,MACjCC,CAAAA,EAC0C,CAC1C,GAAI,CAACA,CAAAA,EAAaJ,CAAAA,GAAa,KAAA,CAC7B,OAAOI,EAGT,GAAI,CACF,IAAMC,CAAAA,CAAiB,MAAMC,IAAgBN,CAAQ,CAAA,CACrD,OAAO,CACL,GAAGI,CAAAA,CACH,MAAOA,CAAAA,CAAU,KAAA,CAAQC,CAC3B,CACF,CAAA,MAASE,CAAAA,CAAO,CACd,OAAA,OAAA,CAAQ,IAAA,CAAK,CAAA,oCAAA,EAAuCP,CAAQ,CAAA,CAAA,CAAA,CAAKO,CAAK,EAC/DH,CACT,CACF,EAEMI,CAAAA,CAAiBC,CAAAA,CAAyBd,EAAUK,CAAAA,CAAU,IAAI,CAAA,CAElEU,CAAAA,CAAwB,SAAY,CACxC,GAAI,CA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AC,UACjEC,CAAAA,GAAU,IAAA,CACnBQ,EAAY,MAAMH,CAAAA,CAAWqB,GAAAA,CAAyC3B,CAAQ,CAAC,CAAA,CAAA,KAAA,GACtEC,IAAU,KAAA,CACnBQ,CAAAA,CAAY,MAAMH,CAAAA,CAAWsB,GAAAA,CAAmC5B,CAAQ,CAAC,CAAA,CAAA,KAAA,GAChEC,CAAAA,GAAU,QAAA,CACnBQ,CAAAA,CAAY,MAAMH,EAAWuB,GAAAA,CAAsC7B,CAAQ,CAAC,CAAA,CAAA,KAAA,GAAA,CAG3D,MAAMG,CAAAA,CAAY,gBACjC2B,GAAAA,CAAwC9B,CAAQ,CAClD,CAAA,EAEa,IAAA,CAAM+B,CAAAA,EAAYA,EAAQ,MAAA,GAAW9B,CAAK,EACrDQ,CAAAA,CAAY,MAAMH,EAChB0B,GAAAA,CAA0ChC,CAAAA,CAAUC,CAAK,CAC3D,CAAA,CAAA,KACK,CAAA,GAAIwB,EAET,OAAOA,CAAAA,CAEP,MAAM,IAAI,KAAA,CACR,CAAA,yCAAA,EAAuCxB,CAAK,CAAA,CAAA,CAC9C,CAAA,CAMJ,GAAIwB,CAAAA,EAAsBhB,CAAAA,EAAaA,CAAAA,CAAU,MAAQ,CAAA,CAAG,CAC1D,IAAMwB,CAAAA,CAAY,MAAMzB,EAA2BC,CAAS,CAAA,CAC5D,OAAO,CACL,GAAGgB,CAAAA,CACH,MAAOQ,CAAAA,CAAW,KACpB,CACF,CAEA,OAAO,MAAMzB,EAA2BC,CAAS,CACnD,CACF,CAAC,CACH","file":"chunk-QQ7MZFRE.js","sourcesContent":["import { getQueryClient } from \"@/modules/core\";\nimport { getCurrencyRate } from \"@/modules/market\";\nimport { queryOptions } from \"@tanstack/react-query\";\nimport type { GeneralAssetInfo } from \"../types\";\nimport { getHiveAssetGeneralInfoQueryOptions } from \"./get-hive-asset-general-info-query-options\";\nimport { getHbdAssetGeneralInfoQueryOptions } from \"./get-hbd-asset-general-info-query-options\";\nimport { getHivePowerAssetGeneralInfoQueryOptions } from \"./get-hive-power-asset-general-info-query-options\";\nimport { getHiveEngineTokensBalancesQueryOptions } from \"@/modules/hive-engine/queries\";\nimport { getHiveEngineTokenGeneralInfoQueryOptions } from \"@/modules/hive-engine/queries\";\nimport { getPointsAssetGeneralInfoQueryOptions } from \"@/modules/points/queries\";\nimport {\n getPortfolioQueryOptions,\n type PortfolioResponse,\n type PortfolioWalletItem,\n} from \"./get-portfolio-query-options\";\n\ninterface Options {\n refetch?: boolean;\n currency?: string;\n}\n\nexport function getAccountWalletAssetInfoQueryOptions(\n username: string,\n asset: string,\n options: Options = { refetch: false }\n) {\n const queryClient = getQueryClient();\n const currency = options.currency ?? \"usd\";\n\n const fetchQuery = async (qo: any) => {\n if (options.refetch) {\n await queryClient.fetchQuery(qo);\n } else {\n await queryClient.prefetchQuery(qo);\n }\n return queryClient.getQueryData<GeneralAssetInfo>(qo.queryKey);\n };\n\n const convertPriceToUserCurrency = async (\n assetInfo: GeneralAssetInfo | undefined\n ): Promise<GeneralAssetInfo | undefined> => {\n if (!assetInfo || currency === \"usd\") {\n return assetInfo;\n }\n\n try {\n const conversionRate = await getCurrencyRate(currency);\n return {\n ...assetInfo,\n price: assetInfo.price * conversionRate,\n };\n } catch (error) {\n console.warn(`Failed to convert price from USD to ${currency}:`, error);\n return assetInfo;\n }\n };\n\n const portfolioQuery = getPortfolioQueryOptions(username, currency, true);\n\n const getPortfolioAssetInfo = async () => {\n try {\n const portfolio: PortfolioResponse = await queryClient.fetchQuery(portfolioQuery);\n const assetItem = portfolio.wallets.find(\n (item: PortfolioWalletItem) =>\n item.symbol.toUpperCase() === asset.toUpperCase()\n );\n\n if (!assetItem) return undefined;\n\n const parts: Array<{ name: string; balance: number }> = [];\n\n if (assetItem.liquid !== undefined && assetItem.liquid !== null) {\n parts.push({ name: \"liquid\", balance: assetItem.liquid });\n }\n\n if (assetItem.staked !== undefined && assetItem.staked !== null && assetItem.staked > 0) {\n parts.push({ name: \"staked\", balance: assetItem.staked });\n }\n\n if (assetItem.savings !== undefined && assetItem.savings !== null && assetItem.savings > 0) {\n parts.push({ name: \"savings\", balance: assetItem.savings });\n }\n\n if (assetItem.extraData && Array.isArray(assetItem.extraData)) {\n for (const extraItem of assetItem.extraData) {\n if (!extraItem || typeof extraItem !== \"object\") continue;\n\n const dataKey = extraItem.dataKey;\n const value = extraItem.value;\n\n if (typeof value === \"string\") {\n const cleanValue = value.replace(/,/g, \"\");\n const match = cleanValue.match(/[+-]?\\s*(\\d+(?:\\.\\d+)?)/);\n if (match) {\n const numValue = Math.abs(Number.parseFloat(match[1]));\n\n if (dataKey === \"delegated_hive_power\") {\n parts.push({ name: \"outgoing_delegations\", balance: numValue });\n } else if (dataKey === \"received_hive_power\") {\n parts.push({ name: \"incoming_delegations\", balance: numValue });\n } else if (dataKey === \"powering_down_hive_power\") {\n parts.push({ name: \"pending_power_down\", balance: numValue });\n }\n }\n }\n }\n }\n\n return {\n name: assetItem.symbol,\n title: assetItem.name,\n price: assetItem.fiatRate,\n accountBalance: assetItem.balance,\n apr: assetItem.apr?.toString(),\n layer: assetItem.layer,\n pendingRewards: assetItem.pendingRewards,\n parts,\n } as GeneralAssetInfo;\n } catch {\n return undefined;\n }\n };\n\n return queryOptions({\n queryKey: [\"ecency-wallets\", \"asset-info\", username, asset, currency],\n queryFn: async () => {\n const portfolioAssetInfo = await getPortfolioAssetInfo();\n\n if (portfolioAssetInfo && portfolioAssetInfo.price > 0) {\n return portfolioAssetInfo;\n }\n\n let assetInfo: GeneralAssetInfo | undefined;\n\n if (asset === \"HIVE\") {\n assetInfo = await fetchQuery(getHiveAssetGeneralInfoQueryOptions(username));\n } else if (asset === \"HP\") {\n assetInfo = await fetchQuery(getHivePowerAssetGeneralInfoQueryOptions(username));\n } else if (asset === \"HBD\") {\n assetInfo = await fetchQuery(getHbdAssetGeneralInfoQueryOptions(username));\n } else if (asset === \"POINTS\") {\n assetInfo = await fetchQuery(getPointsAssetGeneralInfoQueryOptions(username));\n } else {\n // Check if it's a Hive Engine token\n const balances = await queryClient.ensureQueryData(\n getHiveEngineTokensBalancesQueryOptions(username)\n );\n\n if (balances.some((balance) => balance.symbol === asset)) {\n assetInfo = await fetchQuery(\n getHiveEngineTokenGeneralInfoQueryOptions(username, asset)\n );\n } else if (portfolioAssetInfo) {\n // Unknown asset but portfolio has data — use it as-is\n return portfolioAssetInfo;\n } else {\n throw new Error(\n `[SDK][Wallet] – unrecognized asset \"${asset}\"`\n );\n }\n }\n\n // If portfolio had rich data (parts, balance) but zero price,\n // merge the fallback price into the portfolio data\n if (portfolioAssetInfo && assetInfo && assetInfo.price > 0) {\n const converted = await convertPriceToUserCurrency(assetInfo);\n return {\n ...portfolioAssetInfo,\n price: converted!.price,\n };\n }\n\n return await convertPriceToUserCurrency(assetInfo);\n },\n });\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {d,c}from'./chunk-QYY3VHLJ.js';import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-K2DAN37J.js';import {a}from'./chunk-HEILHNSR.js';function A(t,c$1,o){return b(["accounts","create"],t,e=>[e.useClaimed?d(t,e.newAccountName,e.keys):c(t,e.newAccountName,e.keys,e.fee)],async()=>{await b$1(c$1?.adapter,o,[a.accounts.full(t)]);},c$1,"active",{broadcastMode:o})}export{A as a};//# sourceMappingURL=chunk-JDVR32ZT.js.map
2
- //# sourceMappingURL=chunk-JDVR32ZT.js.map
1
+ import {d,c}from'./chunk-QYY3VHLJ.js';import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-J2HM6MWA.js';import {a}from'./chunk-HEILHNSR.js';function A(t,c$1,o){return b(["accounts","create"],t,e=>[e.useClaimed?d(t,e.newAccountName,e.keys):c(t,e.newAccountName,e.keys,e.fee)],async()=>{await b$1(c$1?.adapter,o,[a.accounts.full(t)]);},c$1,"active",{broadcastMode:o})}export{A as a};//# sourceMappingURL=chunk-QXYS66KZ.js.map
2
+ //# sourceMappingURL=chunk-QXYS66KZ.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/accounts/mutations/use-create-account.ts"],"names":["useCreateAccount","username","auth","broadcastMode","useBroadcastMutation","payload","buildCreateClaimedAccountOp","buildAccountCreateOp","invalidateAfterBroadcast","QueryKeys"],"mappings":"yJAaO,SAASA,CAAAA,CACdC,CAAAA,CACAC,GAAAA,CACAC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,UAAA,CAAY,QAAQ,CAAA,CACrBH,CAAAA,CACCI,GAAY,CACXA,CAAAA,CAAQ,UAAA,CACJC,CAAAA,CAA4BL,CAAAA,CAAWI,CAAAA,CAAQ,cAAA,CAAgBA,CAAAA,CAAQ,IAAI,CAAA,CAC3EE,CAAAA,CAAqBN,CAAAA,CAAWI,CAAAA,CAAQ,cAAA,CAAgBA,EAAQ,IAAA,CAAMA,CAAAA,CAAQ,GAAG,CACvF,CAAA,CACA,SAAY,CACV,MAAMG,GAAAA,CAAyBN,GAAAA,EAAM,OAAA,CAASC,CAAAA,CAAe,CAC3DM,CAAAA,CAAU,SAAS,IAAA,CAAKR,CAAQ,CAClC,CAAC,EACH,CAAA,CACAC,GAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,CAAc,CAClB,CACF","file":"chunk-JDVR32ZT.js","sourcesContent":["import { useBroadcastMutation, invalidateAfterBroadcast, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildAccountCreateOp, buildCreateClaimedAccountOp, type AccountKeys } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\nexport interface CreateAccountPayload {\n newAccountName: string;\n keys: AccountKeys;\n fee: string;\n /** If true, uses a claimed account token instead of paying the fee */\n useClaimed?: boolean;\n}\n\nexport function useCreateAccount(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<CreateAccountPayload>(\n [\"accounts\", \"create\"],\n username,\n (payload) => [\n payload.useClaimed\n ? buildCreateClaimedAccountOp(username!, payload.newAccountName, payload.keys)\n : buildAccountCreateOp(username!, payload.newAccountName, payload.keys, payload.fee)\n ],\n async () => {\n await invalidateAfterBroadcast(auth?.adapter, broadcastMode, [\n QueryKeys.accounts.full(username),\n ]);\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/modules/accounts/mutations/use-create-account.ts"],"names":["useCreateAccount","username","auth","broadcastMode","useBroadcastMutation","payload","buildCreateClaimedAccountOp","buildAccountCreateOp","invalidateAfterBroadcast","QueryKeys"],"mappings":"yJAaO,SAASA,CAAAA,CACdC,CAAAA,CACAC,GAAAA,CACAC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,UAAA,CAAY,QAAQ,CAAA,CACrBH,CAAAA,CACCI,GAAY,CACXA,CAAAA,CAAQ,UAAA,CACJC,CAAAA,CAA4BL,CAAAA,CAAWI,CAAAA,CAAQ,cAAA,CAAgBA,CAAAA,CAAQ,IAAI,CAAA,CAC3EE,CAAAA,CAAqBN,CAAAA,CAAWI,CAAAA,CAAQ,cAAA,CAAgBA,EAAQ,IAAA,CAAMA,CAAAA,CAAQ,GAAG,CACvF,CAAA,CACA,SAAY,CACV,MAAMG,GAAAA,CAAyBN,GAAAA,EAAM,OAAA,CAASC,CAAAA,CAAe,CAC3DM,CAAAA,CAAU,SAAS,IAAA,CAAKR,CAAQ,CAClC,CAAC,EACH,CAAA,CACAC,GAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,CAAc,CAClB,CACF","file":"chunk-QXYS66KZ.js","sourcesContent":["import { useBroadcastMutation, invalidateAfterBroadcast, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildAccountCreateOp, buildCreateClaimedAccountOp, type AccountKeys } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\nexport interface CreateAccountPayload {\n newAccountName: string;\n keys: AccountKeys;\n fee: string;\n /** If true, uses a claimed account token instead of paying the fee */\n useClaimed?: boolean;\n}\n\nexport function useCreateAccount(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<CreateAccountPayload>(\n [\"accounts\", \"create\"],\n username,\n (payload) => [\n payload.useClaimed\n ? buildCreateClaimedAccountOp(username!, payload.newAccountName, payload.keys)\n : buildAccountCreateOp(username!, payload.newAccountName, payload.keys, payload.fee)\n ],\n async () => {\n await invalidateAfterBroadcast(auth?.adapter, broadcastMode, [\n QueryKeys.accounts.full(username),\n ]);\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {e}from'./chunk-AEIA5MPL.js';import {b}from'./chunk-K2DAN37J.js';import {a}from'./chunk-HEILHNSR.js';function n(e$1,t,a$1){return b(["market","limit-order-cancel"],e$1,({orderId:d})=>[e(e$1,d)],async()=>{t?.adapter?.invalidateQueries&&await t.adapter.invalidateQueries([a.accounts.full(e$1),a.wallet.openOrders(e$1),["ecency-wallets","asset-info",e$1],["wallet","portfolio","v2",e$1]]);},t,"active",{broadcastMode:a$1})}export{n as a};//# sourceMappingURL=chunk-DCYSEIIY.js.map
2
- //# sourceMappingURL=chunk-DCYSEIIY.js.map
1
+ import {e}from'./chunk-AEIA5MPL.js';import {b}from'./chunk-J2HM6MWA.js';import {a}from'./chunk-HEILHNSR.js';function n(e$1,t,a$1){return b(["market","limit-order-cancel"],e$1,({orderId:d})=>[e(e$1,d)],async()=>{t?.adapter?.invalidateQueries&&await t.adapter.invalidateQueries([a.accounts.full(e$1),a.wallet.openOrders(e$1),["ecency-wallets","asset-info",e$1],["wallet","portfolio","v2",e$1]]);},t,"active",{broadcastMode:a$1})}export{n as a};//# sourceMappingURL=chunk-RRF5H53D.js.map
2
+ //# sourceMappingURL=chunk-RRF5H53D.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/market/mutations/use-limit-order-cancel.ts"],"names":["useLimitOrderCancel","username","auth","broadcastMode","useBroadcastMutation","orderId","buildLimitOrderCancelOp","QueryKeys"],"mappings":"4GASO,SAASA,CAAAA,CACdC,GAAAA,CACAC,CAAAA,CACAC,GAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,QAAA,CAAU,oBAAoB,CAAA,CAC/BH,GAAAA,CACA,CAAC,CAAE,OAAA,CAAAI,CAAQ,CAAA,GAAM,CACfC,CAAAA,CAAwBL,GAAAA,CAAWI,CAAO,CAC5C,CAAA,CACA,SAAY,CACNH,CAAAA,EAAM,OAAA,EAAS,iBAAA,EACjB,MAAMA,CAAAA,CAAK,OAAA,CAAQ,iBAAA,CAAkB,CACnCK,CAAAA,CAAU,QAAA,CAAS,IAAA,CAAKN,GAAQ,CAAA,CAChCM,CAAAA,CAAU,MAAA,CAAO,UAAA,CAAWN,GAAS,CAAA,CACrC,CAAC,gBAAA,CAAkB,aAAcA,GAAQ,CAAA,CACzC,CAAC,QAAA,CAAU,WAAA,CAAa,IAAA,CAAMA,GAAQ,CACxC,CAAC,EAEL,CAAA,CACAC,CAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,GAAc,CAClB,CACF","file":"chunk-DCYSEIIY.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildLimitOrderCancelOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\nexport interface LimitOrderCancelPayload {\n orderId: number;\n}\n\nexport function useLimitOrderCancel(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<LimitOrderCancelPayload>(\n [\"market\", \"limit-order-cancel\"],\n username,\n ({ orderId }) => [\n buildLimitOrderCancelOp(username!, orderId)\n ],\n async () => {\n if (auth?.adapter?.invalidateQueries) {\n await auth.adapter.invalidateQueries([\n QueryKeys.accounts.full(username),\n QueryKeys.wallet.openOrders(username!),\n [\"ecency-wallets\", \"asset-info\", username],\n [\"wallet\", \"portfolio\", \"v2\", username],\n ]);\n }\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/modules/market/mutations/use-limit-order-cancel.ts"],"names":["useLimitOrderCancel","username","auth","broadcastMode","useBroadcastMutation","orderId","buildLimitOrderCancelOp","QueryKeys"],"mappings":"4GASO,SAASA,CAAAA,CACdC,GAAAA,CACAC,CAAAA,CACAC,GAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,QAAA,CAAU,oBAAoB,CAAA,CAC/BH,GAAAA,CACA,CAAC,CAAE,OAAA,CAAAI,CAAQ,CAAA,GAAM,CACfC,CAAAA,CAAwBL,GAAAA,CAAWI,CAAO,CAC5C,CAAA,CACA,SAAY,CACNH,CAAAA,EAAM,OAAA,EAAS,iBAAA,EACjB,MAAMA,CAAAA,CAAK,OAAA,CAAQ,iBAAA,CAAkB,CACnCK,CAAAA,CAAU,QAAA,CAAS,IAAA,CAAKN,GAAQ,CAAA,CAChCM,CAAAA,CAAU,MAAA,CAAO,UAAA,CAAWN,GAAS,CAAA,CACrC,CAAC,gBAAA,CAAkB,aAAcA,GAAQ,CAAA,CACzC,CAAC,QAAA,CAAU,WAAA,CAAa,IAAA,CAAMA,GAAQ,CACxC,CAAC,EAEL,CAAA,CACAC,CAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,GAAc,CAClB,CACF","file":"chunk-RRF5H53D.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildLimitOrderCancelOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\nexport interface LimitOrderCancelPayload {\n orderId: number;\n}\n\nexport function useLimitOrderCancel(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<LimitOrderCancelPayload>(\n [\"market\", \"limit-order-cancel\"],\n username,\n ({ orderId }) => [\n buildLimitOrderCancelOp(username!, orderId)\n ],\n async () => {\n if (auth?.adapter?.invalidateQueries) {\n await auth.adapter.invalidateQueries([\n QueryKeys.accounts.full(username),\n QueryKeys.wallet.openOrders(username!),\n [\"ecency-wallets\", \"asset-info\", username],\n [\"wallet\", \"portfolio\", \"v2\", username],\n ]);\n }\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {h}from'./chunk-4COFIDSX.js';import {b}from'./chunk-K2DAN37J.js';import {a}from'./chunk-HEILHNSR.js';function u(i,e,s){return b(["communities","registerRewards"],i,({name:r})=>[h(r)],async(r,n)=>{e?.adapter?.invalidateQueries&&await e.adapter.invalidateQueries([[...a.communities.singlePrefix(n.name)],[...a.points._prefix(i)]]);},e,"active",{broadcastMode:s})}export{u as a};//# sourceMappingURL=chunk-BLLAF3XJ.js.map
2
- //# sourceMappingURL=chunk-BLLAF3XJ.js.map
1
+ import {h}from'./chunk-4COFIDSX.js';import {b}from'./chunk-J2HM6MWA.js';import {a}from'./chunk-HEILHNSR.js';function u(i,e,s){return b(["communities","registerRewards"],i,({name:r})=>[h(r)],async(r,n)=>{e?.adapter?.invalidateQueries&&await e.adapter.invalidateQueries([[...a.communities.singlePrefix(n.name)],[...a.points._prefix(i)]]);},e,"active",{broadcastMode:s})}export{u as a};//# sourceMappingURL=chunk-SHWRGBMD.js.map
2
+ //# sourceMappingURL=chunk-SHWRGBMD.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/communities/mutations/use-register-community-rewards.ts"],"names":["useRegisterCommunityRewards","username","auth","broadcastMode","useBroadcastMutation","name","buildCommunityRegistrationOp","_result","variables","QueryKeys"],"mappings":"4GAqDO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,aAAA,CAAe,iBAAiB,CAAA,CACjCH,CAAAA,CACA,CAAC,CAAE,IAAA,CAAAI,CAAK,CAAA,GAAM,CACZC,CAAAA,CAA6BD,CAAI,CACnC,CAAA,CACA,MAAOE,CAAAA,CAAcC,CAAAA,GAAc,CAE7BN,CAAAA,EAAM,OAAA,EAAS,iBAAA,EACjB,MAAMA,CAAAA,CAAK,OAAA,CAAQ,iBAAA,CAAkB,CAEnC,CAAC,GAAGO,CAAAA,CAAU,WAAA,CAAY,YAAA,CAAaD,CAAAA,CAAU,IAAI,CAAC,CAAA,CAEtD,CAAC,GAAGC,CAAAA,CAAU,MAAA,CAAO,OAAA,CAAQR,CAAS,CAAC,CACzC,CAAC,EAEL,CAAA,CACAC,CAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,CAAc,CAClB,CACF","file":"chunk-BLLAF3XJ.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildCommunityRegistrationOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\n/**\n * Payload for community rewards registration.\n */\nexport interface CommunityRewardsRegisterPayload {\n /** Community account name (usually the community creator's account) */\n name: string;\n}\n\n/**\n * React Query mutation hook for registering to receive community rewards.\n *\n * This mutation broadcasts a custom_json operation to register a community\n * account to receive Ecency Points rewards for community activity.\n *\n * @param username - The username registering for community rewards (required for broadcast)\n * @param auth - Authentication context with platform adapter and fallback configuration\n *\n * @returns React Query mutation result\n *\n * @remarks\n * **Post-Broadcast Actions:**\n * - Invalidates community cache to update registration status\n * - Invalidates points balance to reflect potential initial rewards\n *\n * **Operation Details:**\n * - Uses custom_json operation with id \"ecency_registration\"\n * - JSON: {\"name\": \"communityname\"}\n * - Authority: Active key (required for registration)\n *\n * **Purpose:**\n * - Enables communities to receive Ecency Points for activity\n * - One-time registration per community\n * - Can only be done by the community owner/creator\n *\n * @example\n * ```typescript\n * const registerMutation = useRegisterCommunityRewards(username, {\n * adapter: myAdapter,\n * enableFallback: true,\n * fallbackChain: ['keychain', 'key', 'hivesigner']\n * });\n *\n * // Register community for rewards\n * registerMutation.mutate({\n * name: 'hive-123456'\n * });\n * ```\n */\nexport function useRegisterCommunityRewards(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<CommunityRewardsRegisterPayload>(\n [\"communities\", \"registerRewards\"],\n username,\n ({ name }) => [\n buildCommunityRegistrationOp(name)\n ],\n async (_result: any, variables) => {\n // Cache invalidation\n if (auth?.adapter?.invalidateQueries) {\n await auth.adapter.invalidateQueries([\n // Invalidate community cache to update registration status\n [...QueryKeys.communities.singlePrefix(variables.name)],\n // Invalidate points balance\n [...QueryKeys.points._prefix(username!)],\n ]);\n }\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/modules/communities/mutations/use-register-community-rewards.ts"],"names":["useRegisterCommunityRewards","username","auth","broadcastMode","useBroadcastMutation","name","buildCommunityRegistrationOp","_result","variables","QueryKeys"],"mappings":"4GAqDO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,aAAA,CAAe,iBAAiB,CAAA,CACjCH,CAAAA,CACA,CAAC,CAAE,IAAA,CAAAI,CAAK,CAAA,GAAM,CACZC,CAAAA,CAA6BD,CAAI,CACnC,CAAA,CACA,MAAOE,CAAAA,CAAcC,CAAAA,GAAc,CAE7BN,CAAAA,EAAM,OAAA,EAAS,iBAAA,EACjB,MAAMA,CAAAA,CAAK,OAAA,CAAQ,iBAAA,CAAkB,CAEnC,CAAC,GAAGO,CAAAA,CAAU,WAAA,CAAY,YAAA,CAAaD,CAAAA,CAAU,IAAI,CAAC,CAAA,CAEtD,CAAC,GAAGC,CAAAA,CAAU,MAAA,CAAO,OAAA,CAAQR,CAAS,CAAC,CACzC,CAAC,EAEL,CAAA,CACAC,CAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,CAAc,CAClB,CACF","file":"chunk-SHWRGBMD.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildCommunityRegistrationOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\n/**\n * Payload for community rewards registration.\n */\nexport interface CommunityRewardsRegisterPayload {\n /** Community account name (usually the community creator's account) */\n name: string;\n}\n\n/**\n * React Query mutation hook for registering to receive community rewards.\n *\n * This mutation broadcasts a custom_json operation to register a community\n * account to receive Ecency Points rewards for community activity.\n *\n * @param username - The username registering for community rewards (required for broadcast)\n * @param auth - Authentication context with platform adapter and fallback configuration\n *\n * @returns React Query mutation result\n *\n * @remarks\n * **Post-Broadcast Actions:**\n * - Invalidates community cache to update registration status\n * - Invalidates points balance to reflect potential initial rewards\n *\n * **Operation Details:**\n * - Uses custom_json operation with id \"ecency_registration\"\n * - JSON: {\"name\": \"communityname\"}\n * - Authority: Active key (required for registration)\n *\n * **Purpose:**\n * - Enables communities to receive Ecency Points for activity\n * - One-time registration per community\n * - Can only be done by the community owner/creator\n *\n * @example\n * ```typescript\n * const registerMutation = useRegisterCommunityRewards(username, {\n * adapter: myAdapter,\n * enableFallback: true,\n * fallbackChain: ['keychain', 'key', 'hivesigner']\n * });\n *\n * // Register community for rewards\n * registerMutation.mutate({\n * name: 'hive-123456'\n * });\n * ```\n */\nexport function useRegisterCommunityRewards(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<CommunityRewardsRegisterPayload>(\n [\"communities\", \"registerRewards\"],\n username,\n ({ name }) => [\n buildCommunityRegistrationOp(name)\n ],\n async (_result: any, variables) => {\n // Cache invalidation\n if (auth?.adapter?.invalidateQueries) {\n await auth.adapter.invalidateQueries([\n // Invalidate community cache to update registration status\n [...QueryKeys.communities.singlePrefix(variables.name)],\n // Invalidate points balance\n [...QueryKeys.points._prefix(username!)],\n ]);\n }\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {b as b$1}from'./chunk-RZVMZQO7.js';import {b}from'./chunk-K2DAN37J.js';import {a}from'./chunk-HEILHNSR.js';function p(t,e,i){return b(["witnesses","proxy"],t,({proxy:a})=>[b$1(t,a)],async()=>{e?.adapter?.invalidateQueries&&await e.adapter.invalidateQueries([a.accounts.full(t),a.witnesses.proxy()]);},e,"active",{broadcastMode:i})}export{p as a};//# sourceMappingURL=chunk-2HXQJNAQ.js.map
2
- //# sourceMappingURL=chunk-2HXQJNAQ.js.map
1
+ import {b as b$1}from'./chunk-RZVMZQO7.js';import {b}from'./chunk-J2HM6MWA.js';import {a}from'./chunk-HEILHNSR.js';function p(t,e,i){return b(["witnesses","proxy"],t,({proxy:a})=>[b$1(t,a)],async()=>{e?.adapter?.invalidateQueries&&await e.adapter.invalidateQueries([a.accounts.full(t),a.witnesses.proxy()]);},e,"active",{broadcastMode:i})}export{p as a};//# sourceMappingURL=chunk-SXUNJC2V.js.map
2
+ //# sourceMappingURL=chunk-SXUNJC2V.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/witnesses/mutations/use-witness-proxy.ts"],"names":["useWitnessProxy","username","auth","broadcastMode","useBroadcastMutation","proxy","buildWitnessProxyOp","QueryKeys"],"mappings":"mHASO,SAASA,CAAAA,CACdC,EACAC,CAAAA,CACAC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,WAAA,CAAa,OAAO,CAAA,CACrBH,EACA,CAAC,CAAE,KAAA,CAAAI,CAAM,CAAA,GAAM,CACbC,IAAoBL,CAAAA,CAAWI,CAAK,CACtC,CAAA,CACA,SAAY,CACNH,GAAM,OAAA,EAAS,iBAAA,EACjB,MAAMA,CAAAA,CAAK,OAAA,CAAQ,iBAAA,CAAkB,CACnCK,CAAAA,CAAU,QAAA,CAAS,IAAA,CAAKN,CAAQ,CAAA,CAChCM,CAAAA,CAAU,UAAU,KAAA,EACtB,CAAC,EAEL,CAAA,CACAL,CAAAA,CACA,SACA,CAAE,aAAA,CAAAC,CAAc,CAClB,CACF","file":"chunk-2HXQJNAQ.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildWitnessProxyOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\nexport interface WitnessProxyPayload {\n proxy: string;\n}\n\nexport function useWitnessProxy(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<WitnessProxyPayload>(\n [\"witnesses\", \"proxy\"],\n username,\n ({ proxy }) => [\n buildWitnessProxyOp(username!, proxy)\n ],\n async () => {\n if (auth?.adapter?.invalidateQueries) {\n await auth.adapter.invalidateQueries([\n QueryKeys.accounts.full(username),\n QueryKeys.witnesses.proxy(),\n ]);\n }\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/modules/witnesses/mutations/use-witness-proxy.ts"],"names":["useWitnessProxy","username","auth","broadcastMode","useBroadcastMutation","proxy","buildWitnessProxyOp","QueryKeys"],"mappings":"mHASO,SAASA,CAAAA,CACdC,EACAC,CAAAA,CACAC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,WAAA,CAAa,OAAO,CAAA,CACrBH,EACA,CAAC,CAAE,KAAA,CAAAI,CAAM,CAAA,GAAM,CACbC,IAAoBL,CAAAA,CAAWI,CAAK,CACtC,CAAA,CACA,SAAY,CACNH,GAAM,OAAA,EAAS,iBAAA,EACjB,MAAMA,CAAAA,CAAK,OAAA,CAAQ,iBAAA,CAAkB,CACnCK,CAAAA,CAAU,QAAA,CAAS,IAAA,CAAKN,CAAQ,CAAA,CAChCM,CAAAA,CAAU,UAAU,KAAA,EACtB,CAAC,EAEL,CAAA,CACAL,CAAAA,CACA,SACA,CAAE,aAAA,CAAAC,CAAc,CAClB,CACF","file":"chunk-SXUNJC2V.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildWitnessProxyOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\nexport interface WitnessProxyPayload {\n proxy: string;\n}\n\nexport function useWitnessProxy(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<WitnessProxyPayload>(\n [\"witnesses\", \"proxy\"],\n username,\n ({ proxy }) => [\n buildWitnessProxyOp(username!, proxy)\n ],\n async () => {\n if (auth?.adapter?.invalidateQueries) {\n await auth.adapter.invalidateQueries([\n QueryKeys.accounts.full(username),\n QueryKeys.witnesses.proxy(),\n ]);\n }\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {c as c$1}from'./chunk-AEIA5MPL.js';import {b}from'./chunk-K2DAN37J.js';import {a}from'./chunk-HEILHNSR.js';function c(e,r,a$1){return b(["market","limit-order-create"],e,t=>[c$1(e,t.amountToSell,t.minToReceive,t.fillOrKill,t.expiration,t.orderId)],async()=>{r?.adapter?.invalidateQueries&&await r.adapter.invalidateQueries([a.accounts.full(e),a.wallet.openOrders(e),["ecency-wallets","asset-info",e],["wallet","portfolio","v2",e]]);},r,"active",{broadcastMode:a$1})}export{c as a};//# sourceMappingURL=chunk-DLRAARGY.js.map
2
- //# sourceMappingURL=chunk-DLRAARGY.js.map
1
+ import {c as c$1}from'./chunk-AEIA5MPL.js';import {b}from'./chunk-J2HM6MWA.js';import {a}from'./chunk-HEILHNSR.js';function c(e,r,a$1){return b(["market","limit-order-create"],e,t=>[c$1(e,t.amountToSell,t.minToReceive,t.fillOrKill,t.expiration,t.orderId)],async()=>{r?.adapter?.invalidateQueries&&await r.adapter.invalidateQueries([a.accounts.full(e),a.wallet.openOrders(e),["ecency-wallets","asset-info",e],["wallet","portfolio","v2",e]]);},r,"active",{broadcastMode:a$1})}export{c as a};//# sourceMappingURL=chunk-TUFXYNHE.js.map
2
+ //# sourceMappingURL=chunk-TUFXYNHE.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/modules/market/mutations/use-limit-order-create.ts"],"names":["useLimitOrderCreate","username","auth","broadcastMode","useBroadcastMutation","payload","buildLimitOrderCreateOp","QueryKeys"],"mappings":"mHAaO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,GAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,QAAA,CAAU,oBAAoB,CAAA,CAC/BH,CAAAA,CACCI,CAAAA,EAAY,CACXC,GAAAA,CACEL,CAAAA,CACAI,CAAAA,CAAQ,YAAA,CACRA,CAAAA,CAAQ,YAAA,CACRA,CAAAA,CAAQ,UAAA,CACRA,EAAQ,UAAA,CACRA,CAAAA,CAAQ,OACV,CACF,CAAA,CACA,SAAY,CACNH,CAAAA,EAAM,SAAS,iBAAA,EACjB,MAAMA,CAAAA,CAAK,OAAA,CAAQ,iBAAA,CAAkB,CACnCK,CAAAA,CAAU,QAAA,CAAS,KAAKN,CAAQ,CAAA,CAChCM,CAAAA,CAAU,MAAA,CAAO,UAAA,CAAWN,CAAS,CAAA,CACrC,CAAC,iBAAkB,YAAA,CAAcA,CAAQ,CAAA,CACzC,CAAC,QAAA,CAAU,WAAA,CAAa,IAAA,CAAMA,CAAQ,CACxC,CAAC,EAEL,CAAA,CACAC,CAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,GAAc,CAClB,CACF","file":"chunk-DLRAARGY.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildLimitOrderCreateOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\nexport interface LimitOrderCreatePayload {\n amountToSell: string;\n minToReceive: string;\n fillOrKill: boolean;\n expiration: string;\n orderId: number;\n}\n\nexport function useLimitOrderCreate(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<LimitOrderCreatePayload>(\n [\"market\", \"limit-order-create\"],\n username,\n (payload) => [\n buildLimitOrderCreateOp(\n username!,\n payload.amountToSell,\n payload.minToReceive,\n payload.fillOrKill,\n payload.expiration,\n payload.orderId\n )\n ],\n async () => {\n if (auth?.adapter?.invalidateQueries) {\n await auth.adapter.invalidateQueries([\n QueryKeys.accounts.full(username),\n QueryKeys.wallet.openOrders(username!),\n [\"ecency-wallets\", \"asset-info\", username],\n [\"wallet\", \"portfolio\", \"v2\", username],\n ]);\n }\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/modules/market/mutations/use-limit-order-create.ts"],"names":["useLimitOrderCreate","username","auth","broadcastMode","useBroadcastMutation","payload","buildLimitOrderCreateOp","QueryKeys"],"mappings":"mHAaO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,GAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,QAAA,CAAU,oBAAoB,CAAA,CAC/BH,CAAAA,CACCI,CAAAA,EAAY,CACXC,GAAAA,CACEL,CAAAA,CACAI,CAAAA,CAAQ,YAAA,CACRA,CAAAA,CAAQ,YAAA,CACRA,CAAAA,CAAQ,UAAA,CACRA,EAAQ,UAAA,CACRA,CAAAA,CAAQ,OACV,CACF,CAAA,CACA,SAAY,CACNH,CAAAA,EAAM,SAAS,iBAAA,EACjB,MAAMA,CAAAA,CAAK,OAAA,CAAQ,iBAAA,CAAkB,CACnCK,CAAAA,CAAU,QAAA,CAAS,KAAKN,CAAQ,CAAA,CAChCM,CAAAA,CAAU,MAAA,CAAO,UAAA,CAAWN,CAAS,CAAA,CACrC,CAAC,iBAAkB,YAAA,CAAcA,CAAQ,CAAA,CACzC,CAAC,QAAA,CAAU,WAAA,CAAa,IAAA,CAAMA,CAAQ,CACxC,CAAC,EAEL,CAAA,CACAC,CAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,GAAc,CAClB,CACF","file":"chunk-TUFXYNHE.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildLimitOrderCreateOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\nexport interface LimitOrderCreatePayload {\n amountToSell: string;\n minToReceive: string;\n fillOrKill: boolean;\n expiration: string;\n orderId: number;\n}\n\nexport function useLimitOrderCreate(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<LimitOrderCreatePayload>(\n [\"market\", \"limit-order-create\"],\n username,\n (payload) => [\n buildLimitOrderCreateOp(\n username!,\n payload.amountToSell,\n payload.minToReceive,\n payload.fillOrKill,\n payload.expiration,\n payload.orderId\n )\n ],\n async () => {\n if (auth?.adapter?.invalidateQueries) {\n await auth.adapter.invalidateQueries([\n QueryKeys.accounts.full(username),\n QueryKeys.wallet.openOrders(username!),\n [\"ecency-wallets\", \"asset-info\", username],\n [\"wallet\", \"portfolio\", \"v2\", username],\n ]);\n }\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import {b as b$1}from'./chunk-4COFIDSX.js';import {b}from'./chunk-K2DAN37J.js';import {a}from'./chunk-HEILHNSR.js';function l(o,t,a$1){return b(["promotions","rc-delegation"],o,({duration:c})=>[b$1(o,c)],async()=>{t?.adapter?.invalidateQueries&&await t.adapter.invalidateQueries([a.accounts.full(o),a.resourceCredits.account(o),["promotions","rc-delegation-active",o]]);},t,"active",{broadcastMode:a$1})}export{l as a};//# sourceMappingURL=chunk-T5Y7X4JU.js.map
2
- //# sourceMappingURL=chunk-T5Y7X4JU.js.map
1
+ import {b as b$1}from'./chunk-4COFIDSX.js';import {b}from'./chunk-J2HM6MWA.js';import {a}from'./chunk-HEILHNSR.js';function l(o,t,a$1){return b(["promotions","rc-delegation"],o,({duration:c})=>[b$1(o,c)],async()=>{t?.adapter?.invalidateQueries&&await t.adapter.invalidateQueries([a.accounts.full(o),a.resourceCredits.account(o),["promotions","rc-delegation-active",o]]);},t,"active",{broadcastMode:a$1})}export{l as a};//# sourceMappingURL=chunk-TUL2MGVZ.js.map
2
+ //# sourceMappingURL=chunk-TUL2MGVZ.js.map