@ecency/sdk 2.4.23 → 2.4.24
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.
- package/dist/browser/{chunk-RBORSSX5.js → chunk-2JKJ4XWU.js} +2 -2
- package/dist/browser/{chunk-RBORSSX5.js.map → chunk-2JKJ4XWU.js.map} +1 -1
- package/dist/browser/{chunk-HV4BKN6J.js → chunk-2KEJTQE4.js} +2 -2
- package/dist/browser/{chunk-HV4BKN6J.js.map → chunk-2KEJTQE4.js.map} +1 -1
- package/dist/browser/{chunk-4R7PDEUP.js → chunk-32UMQJXQ.js} +2 -2
- package/dist/browser/{chunk-4R7PDEUP.js.map → chunk-32UMQJXQ.js.map} +1 -1
- package/dist/browser/{chunk-C2EISS5O.js → chunk-37K2OPGL.js} +2 -2
- package/dist/browser/{chunk-C2EISS5O.js.map → chunk-37K2OPGL.js.map} +1 -1
- package/dist/browser/{chunk-QV7IOAFD.js → chunk-3XRU3DXW.js} +2 -2
- package/dist/browser/{chunk-QV7IOAFD.js.map → chunk-3XRU3DXW.js.map} +1 -1
- package/dist/browser/{chunk-7N4UF43Y.js → chunk-4C57MZP6.js} +2 -2
- package/dist/browser/{chunk-7N4UF43Y.js.map → chunk-4C57MZP6.js.map} +1 -1
- package/dist/browser/{chunk-BBBMEKXU.js → chunk-4CZFR2OD.js} +2 -2
- package/dist/browser/{chunk-BBBMEKXU.js.map → chunk-4CZFR2OD.js.map} +1 -1
- package/dist/browser/{chunk-C5PSLR7Z.js → chunk-4OOAGHRD.js} +2 -2
- package/dist/browser/{chunk-C5PSLR7Z.js.map → chunk-4OOAGHRD.js.map} +1 -1
- package/dist/browser/{chunk-C6K4OJC4.js → chunk-5X6R7EPZ.js} +2 -2
- package/dist/browser/{chunk-C6K4OJC4.js.map → chunk-5X6R7EPZ.js.map} +1 -1
- package/dist/browser/{chunk-QGLHPALU.js → chunk-65S4AS6C.js} +2 -2
- package/dist/browser/{chunk-QGLHPALU.js.map → chunk-65S4AS6C.js.map} +1 -1
- package/dist/browser/{chunk-RC4MOYY5.js → chunk-6A7YD57H.js} +2 -2
- package/dist/browser/{chunk-RC4MOYY5.js.map → chunk-6A7YD57H.js.map} +1 -1
- package/dist/browser/{chunk-36UTWSH7.js → chunk-6IABT7MJ.js} +2 -2
- package/dist/browser/{chunk-36UTWSH7.js.map → chunk-6IABT7MJ.js.map} +1 -1
- package/dist/browser/{chunk-SAWB4N2Y.js → chunk-7EICUHR3.js} +2 -2
- package/dist/browser/{chunk-SAWB4N2Y.js.map → chunk-7EICUHR3.js.map} +1 -1
- package/dist/browser/{chunk-4EL7BARO.js → chunk-AIDCGQFG.js} +2 -2
- package/dist/browser/{chunk-4EL7BARO.js.map → chunk-AIDCGQFG.js.map} +1 -1
- package/dist/browser/{chunk-E2HXPVGT.js → chunk-APLDSWPX.js} +2 -2
- package/dist/browser/{chunk-E2HXPVGT.js.map → chunk-APLDSWPX.js.map} +1 -1
- package/dist/browser/{chunk-H7HEYDU6.js → chunk-ASSGVHJB.js} +2 -2
- package/dist/browser/{chunk-H7HEYDU6.js.map → chunk-ASSGVHJB.js.map} +1 -1
- package/dist/browser/{chunk-HS6NJH6H.js → chunk-BHMOSSSW.js} +2 -2
- package/dist/browser/{chunk-HS6NJH6H.js.map → chunk-BHMOSSSW.js.map} +1 -1
- package/dist/browser/{chunk-U2AQDDCH.js → chunk-CAOGIMWX.js} +2 -2
- package/dist/browser/{chunk-U2AQDDCH.js.map → chunk-CAOGIMWX.js.map} +1 -1
- package/dist/browser/{chunk-MPGCDOY7.js → chunk-CKHL2O7X.js} +2 -2
- package/dist/browser/{chunk-MPGCDOY7.js.map → chunk-CKHL2O7X.js.map} +1 -1
- package/dist/browser/{chunk-R6OHEJX2.js → chunk-DA6YYF2F.js} +2 -2
- package/dist/browser/{chunk-R6OHEJX2.js.map → chunk-DA6YYF2F.js.map} +1 -1
- package/dist/browser/{chunk-W3TAAAAM.js → chunk-ETHEILN6.js} +2 -2
- package/dist/browser/{chunk-W3TAAAAM.js.map → chunk-ETHEILN6.js.map} +1 -1
- package/dist/browser/{chunk-4VII2U33.js → chunk-FJ5CJPZL.js} +2 -2
- package/dist/browser/{chunk-4VII2U33.js.map → chunk-FJ5CJPZL.js.map} +1 -1
- package/dist/browser/{chunk-JT3FBTE4.js → chunk-FJ6MJL6G.js} +2 -2
- package/dist/browser/{chunk-JT3FBTE4.js.map → chunk-FJ6MJL6G.js.map} +1 -1
- package/dist/browser/chunk-FJXZ5DK2.js +2 -0
- package/dist/browser/chunk-FJXZ5DK2.js.map +1 -0
- package/dist/browser/{chunk-LAXQ3PZ3.js → chunk-FL3ZYHPE.js} +2 -2
- package/dist/browser/{chunk-LAXQ3PZ3.js.map → chunk-FL3ZYHPE.js.map} +1 -1
- package/dist/browser/{chunk-ICLETUUV.js → chunk-FT5QYVCP.js} +2 -2
- package/dist/browser/{chunk-ICLETUUV.js.map → chunk-FT5QYVCP.js.map} +1 -1
- package/dist/browser/{chunk-LPQIHN5Z.js → chunk-GCSYVQXA.js} +2 -2
- package/dist/browser/{chunk-LPQIHN5Z.js.map → chunk-GCSYVQXA.js.map} +1 -1
- package/dist/browser/{chunk-DJWMP2O4.js → chunk-GN3PKAHB.js} +2 -2
- package/dist/browser/{chunk-DJWMP2O4.js.map → chunk-GN3PKAHB.js.map} +1 -1
- package/dist/browser/{chunk-PCUZP45U.js → chunk-HAIUMSGN.js} +2 -2
- package/dist/browser/{chunk-PCUZP45U.js.map → chunk-HAIUMSGN.js.map} +1 -1
- package/dist/browser/{chunk-IOGRMGRX.js → chunk-HOEDGBRX.js} +2 -2
- package/dist/browser/{chunk-IOGRMGRX.js.map → chunk-HOEDGBRX.js.map} +1 -1
- package/dist/browser/{chunk-JM4J2N4W.js → chunk-HQFYXVBS.js} +2 -2
- package/dist/browser/{chunk-JM4J2N4W.js.map → chunk-HQFYXVBS.js.map} +1 -1
- package/dist/browser/chunk-HWUXXAKE.js +2 -0
- package/dist/browser/{chunk-M63I2JJV.js.map → chunk-HWUXXAKE.js.map} +1 -1
- package/dist/browser/{chunk-5ANV6VYI.js → chunk-I77ZLLQJ.js} +2 -2
- package/dist/browser/{chunk-5ANV6VYI.js.map → chunk-I77ZLLQJ.js.map} +1 -1
- package/dist/browser/{chunk-UNKOXV36.js → chunk-IDZVSJHQ.js} +2 -2
- package/dist/browser/{chunk-UNKOXV36.js.map → chunk-IDZVSJHQ.js.map} +1 -1
- package/dist/browser/{chunk-4KTE2S6L.js → chunk-IGKMIJW2.js} +2 -2
- package/dist/browser/{chunk-4KTE2S6L.js.map → chunk-IGKMIJW2.js.map} +1 -1
- package/dist/browser/{chunk-AZZRCIT3.js → chunk-IRITFNBC.js} +2 -2
- package/dist/browser/{chunk-AZZRCIT3.js.map → chunk-IRITFNBC.js.map} +1 -1
- package/dist/browser/{chunk-P6GFUYJZ.js → chunk-K4CHL32C.js} +2 -2
- package/dist/browser/{chunk-P6GFUYJZ.js.map → chunk-K4CHL32C.js.map} +1 -1
- package/dist/browser/{chunk-36XVEJ3I.js → chunk-L362IYM3.js} +2 -2
- package/dist/browser/{chunk-36XVEJ3I.js.map → chunk-L362IYM3.js.map} +1 -1
- package/dist/browser/{chunk-GXSNHTGO.js → chunk-L4LDM3J5.js} +2 -2
- package/dist/browser/{chunk-GXSNHTGO.js.map → chunk-L4LDM3J5.js.map} +1 -1
- package/dist/browser/{chunk-PN4AFXFW.js → chunk-LER3TBTJ.js} +2 -2
- package/dist/browser/{chunk-PN4AFXFW.js.map → chunk-LER3TBTJ.js.map} +1 -1
- package/dist/browser/{chunk-MYMGKU5V.js → chunk-MTL3QUPP.js} +2 -2
- package/dist/browser/{chunk-MYMGKU5V.js.map → chunk-MTL3QUPP.js.map} +1 -1
- package/dist/browser/{chunk-M332H37M.js → chunk-NF4XUXML.js} +2 -2
- package/dist/browser/{chunk-M332H37M.js.map → chunk-NF4XUXML.js.map} +1 -1
- package/dist/browser/{chunk-XLTYBCR5.js → chunk-NIE5XZ45.js} +2 -2
- package/dist/browser/{chunk-XLTYBCR5.js.map → chunk-NIE5XZ45.js.map} +1 -1
- package/dist/browser/chunk-OAOOURDH.js +2 -0
- package/dist/browser/{chunk-Z7R2PK35.js.map → chunk-OAOOURDH.js.map} +1 -1
- package/dist/browser/{chunk-YUTSHZGV.js → chunk-OG6WTNVW.js} +2 -2
- package/dist/browser/{chunk-YUTSHZGV.js.map → chunk-OG6WTNVW.js.map} +1 -1
- package/dist/browser/{chunk-XEB43J5Q.js → chunk-OQA55EE6.js} +2 -2
- package/dist/browser/{chunk-XEB43J5Q.js.map → chunk-OQA55EE6.js.map} +1 -1
- package/dist/browser/{chunk-DSUV7SML.js → chunk-OTDWQRUL.js} +2 -2
- package/dist/browser/{chunk-DSUV7SML.js.map → chunk-OTDWQRUL.js.map} +1 -1
- package/dist/browser/{chunk-VDPNUKQ6.js → chunk-P4XPKFYI.js} +2 -2
- package/dist/browser/{chunk-VDPNUKQ6.js.map → chunk-P4XPKFYI.js.map} +1 -1
- package/dist/browser/{chunk-J2HM6MWA.js → chunk-PFVWZI3W.js} +2 -2
- package/dist/browser/{chunk-J2HM6MWA.js.map → chunk-PFVWZI3W.js.map} +1 -1
- package/dist/browser/{chunk-FRXPHA7Y.js → chunk-PW42FHVU.js} +2 -2
- package/dist/browser/{chunk-FRXPHA7Y.js.map → chunk-PW42FHVU.js.map} +1 -1
- package/dist/browser/{chunk-NS5UVFUZ.js → chunk-R6UPSSYV.js} +2 -2
- package/dist/browser/{chunk-NS5UVFUZ.js.map → chunk-R6UPSSYV.js.map} +1 -1
- package/dist/browser/{chunk-373JQPTA.js → chunk-S3LJG457.js} +2 -2
- package/dist/browser/{chunk-373JQPTA.js.map → chunk-S3LJG457.js.map} +1 -1
- package/dist/browser/{chunk-EHCNEMO7.js → chunk-SB6LDMEP.js} +2 -2
- package/dist/browser/{chunk-EHCNEMO7.js.map → chunk-SB6LDMEP.js.map} +1 -1
- package/dist/browser/{chunk-7JPEXH7J.js → chunk-UGE6ZEXY.js} +2 -2
- package/dist/browser/{chunk-7JPEXH7J.js.map → chunk-UGE6ZEXY.js.map} +1 -1
- package/dist/browser/{chunk-JG7HMCAI.js → chunk-VCYNR26T.js} +2 -2
- package/dist/browser/{chunk-JG7HMCAI.js.map → chunk-VCYNR26T.js.map} +1 -1
- package/dist/browser/{chunk-R3DMLKGZ.js → chunk-W4TAERQX.js} +2 -2
- package/dist/browser/{chunk-R3DMLKGZ.js.map → chunk-W4TAERQX.js.map} +1 -1
- package/dist/browser/{chunk-5E7DWZPN.js → chunk-W6CO2WKX.js} +2 -2
- package/dist/browser/{chunk-5E7DWZPN.js.map → chunk-W6CO2WKX.js.map} +1 -1
- package/dist/browser/{chunk-Q2ACQBL2.js → chunk-WCIDGHGX.js} +2 -2
- package/dist/browser/{chunk-Q2ACQBL2.js.map → chunk-WCIDGHGX.js.map} +1 -1
- package/dist/browser/{chunk-IEAAYAFA.js → chunk-WDWR4RZ6.js} +2 -2
- package/dist/browser/{chunk-IEAAYAFA.js.map → chunk-WDWR4RZ6.js.map} +1 -1
- package/dist/browser/{chunk-IMCYKBDV.js → chunk-WE6EIHC6.js} +2 -2
- package/dist/browser/{chunk-IMCYKBDV.js.map → chunk-WE6EIHC6.js.map} +1 -1
- package/dist/browser/{chunk-CFHER3WM.js → chunk-WGKD2O73.js} +2 -2
- package/dist/browser/{chunk-CFHER3WM.js.map → chunk-WGKD2O73.js.map} +1 -1
- package/dist/browser/{chunk-VOET5ABO.js → chunk-WHH45AA3.js} +2 -2
- package/dist/browser/{chunk-VOET5ABO.js.map → chunk-WHH45AA3.js.map} +1 -1
- package/dist/browser/{chunk-EPPY5SE6.js → chunk-WLHXAS5P.js} +2 -2
- package/dist/browser/{chunk-EPPY5SE6.js.map → chunk-WLHXAS5P.js.map} +1 -1
- package/dist/browser/{chunk-6JEMIQQJ.js → chunk-XBAS5ZUQ.js} +2 -2
- package/dist/browser/{chunk-6JEMIQQJ.js.map → chunk-XBAS5ZUQ.js.map} +1 -1
- package/dist/browser/{chunk-QAXITR2P.js → chunk-XQLIW5VC.js} +2 -2
- package/dist/browser/{chunk-QAXITR2P.js.map → chunk-XQLIW5VC.js.map} +1 -1
- package/dist/browser/{chunk-AU2I7Q6Y.js → chunk-XVW7ZC72.js} +2 -2
- package/dist/browser/{chunk-AU2I7Q6Y.js.map → chunk-XVW7ZC72.js.map} +1 -1
- package/dist/browser/{chunk-6PK5KYS5.js → chunk-XX32ZFT4.js} +2 -2
- package/dist/browser/{chunk-6PK5KYS5.js.map → chunk-XX32ZFT4.js.map} +1 -1
- package/dist/browser/{chunk-VPRG4WZA.js → chunk-XZIXDSRW.js} +2 -2
- package/dist/browser/{chunk-VPRG4WZA.js.map → chunk-XZIXDSRW.js.map} +1 -1
- package/dist/browser/{chunk-SI7S4VLE.js → chunk-Z2HIVTNL.js} +2 -2
- package/dist/browser/{chunk-SI7S4VLE.js.map → chunk-Z2HIVTNL.js.map} +1 -1
- package/dist/browser/chunk-Z3FAL7TO.js +2 -0
- package/dist/browser/{chunk-LRO6EB5Y.js.map → chunk-Z3FAL7TO.js.map} +1 -1
- package/dist/browser/{chunk-DWJJGDRC.js → chunk-ZCURRWT2.js} +2 -2
- package/dist/browser/{chunk-DWJJGDRC.js.map → chunk-ZCURRWT2.js.map} +1 -1
- package/dist/browser/{chunk-BCISRGHL.js → chunk-ZSARKV4B.js} +2 -2
- package/dist/browser/{chunk-BCISRGHL.js.map → chunk-ZSARKV4B.js.map} +1 -1
- package/dist/browser/{chunk-NKALZNPX.js → chunk-ZVICL7AK.js} +2 -2
- package/dist/browser/{chunk-NKALZNPX.js.map → chunk-ZVICL7AK.js.map} +1 -1
- package/dist/browser/hive-tx/Transaction.js +1 -1
- package/dist/browser/hive-tx/helpers/memo.js +1 -1
- package/dist/browser/hive-tx/helpers/serializer.js +1 -1
- package/dist/browser/hive-tx/helpers/utils.js +1 -1
- package/dist/browser/hive-tx/index.js +1 -1
- package/dist/browser/hive.js +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/modules/accounts/index.js +1 -1
- package/dist/browser/modules/accounts/mutations/bookmarks/index.js +1 -1
- package/dist/browser/modules/accounts/mutations/bookmarks/use-account-bookmark-add.js +1 -1
- package/dist/browser/modules/accounts/mutations/bookmarks/use-account-bookmark-delete.js +1 -1
- package/dist/browser/modules/accounts/mutations/favorite-tags/index.js +1 -1
- package/dist/browser/modules/accounts/mutations/favorite-tags/requests.js +1 -1
- package/dist/browser/modules/accounts/mutations/favorite-tags/use-favorite-tag-add.js +1 -1
- package/dist/browser/modules/accounts/mutations/favorite-tags/use-favorite-tag-delete.js +1 -1
- package/dist/browser/modules/accounts/mutations/favorites/index.js +1 -1
- package/dist/browser/modules/accounts/mutations/favorites/use-account-favorite-add.js +1 -1
- package/dist/browser/modules/accounts/mutations/favorites/use-account-favorite-delete.js +1 -1
- package/dist/browser/modules/accounts/mutations/index.js +1 -1
- package/dist/browser/modules/accounts/mutations/use-account-relations-update.js +1 -1
- package/dist/browser/modules/accounts/mutations/use-account-revoke-key.js +1 -1
- package/dist/browser/modules/accounts/mutations/use-account-revoke-posting.js +1 -1
- package/dist/browser/modules/accounts/mutations/use-account-update-key-auths.js +1 -1
- package/dist/browser/modules/accounts/mutations/use-account-update-password.js +1 -1
- package/dist/browser/modules/accounts/mutations/use-account-update-recovery.js +1 -1
- package/dist/browser/modules/accounts/mutations/use-account-update.js +1 -1
- package/dist/browser/modules/accounts/mutations/use-claim-account.js +1 -1
- package/dist/browser/modules/accounts/mutations/use-create-account.js +1 -1
- package/dist/browser/modules/accounts/mutations/use-follow.js +1 -1
- package/dist/browser/modules/accounts/mutations/use-grant-posting-permission.js +1 -1
- package/dist/browser/modules/accounts/mutations/use-unfollow.js +1 -1
- package/dist/browser/modules/accounts/queries/check-favorite-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/check-username-wallets-pending-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-account-full-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-account-pending-recovery-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-account-recoveries-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-account-reputations-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-account-subscriptions-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-account-vote-history-infinite-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-accounts-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-aggregated-balance-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-balance-history-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-bookmarks-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-bots-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-favorite-tag-check-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-favorite-tags-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-favorites-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-follow-count-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-followers-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-following-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-friends-infinite-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-muted-users-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-pro-members-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-profiles-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-referrals-infinite-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-referrals-stats-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-relationship-between-accounts-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-search-friends-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/get-transactions-infinite-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/index.js +1 -1
- package/dist/browser/modules/accounts/queries/lookup-accounts-query-options.js +1 -1
- package/dist/browser/modules/accounts/queries/search-accounts-by-username-query-options.js +1 -1
- package/dist/browser/modules/accounts/utils/account-power.js +1 -1
- package/dist/browser/modules/accounts/utils/index.js +1 -1
- package/dist/browser/modules/ai/index.js +1 -1
- package/dist/browser/modules/ai/mutations/index.js +1 -1
- package/dist/browser/modules/ai/mutations/use-ai-assist.js +1 -1
- package/dist/browser/modules/ai/mutations/use-ai-transcribe.js +1 -1
- package/dist/browser/modules/ai/mutations/use-generate-image.js +1 -1
- package/dist/browser/modules/ai/queries/get-ai-assist-price-query-options.js +1 -1
- package/dist/browser/modules/ai/queries/get-ai-generate-price-query-options.js +1 -1
- package/dist/browser/modules/ai/queries/get-ai-images-query-options.js +1 -1
- package/dist/browser/modules/ai/queries/get-ai-transcribe-price-query-options.js +1 -1
- package/dist/browser/modules/ai/queries/index.js +1 -1
- package/dist/browser/modules/analytics/index.js +1 -1
- package/dist/browser/modules/analytics/mutations/index.js +1 -1
- package/dist/browser/modules/analytics/mutations/use-record-activity.js +1 -1
- package/dist/browser/modules/analytics/queries/get-discover-curation-query-options.js +1 -1
- package/dist/browser/modules/analytics/queries/get-discover-leaderboard-query-options.js +1 -1
- package/dist/browser/modules/analytics/queries/get-page-stats-query-options.js +1 -1
- package/dist/browser/modules/analytics/queries/index.js +1 -1
- package/dist/browser/modules/auth/index.js +1 -1
- package/dist/browser/modules/auth/requests.js +1 -1
- package/dist/browser/modules/bad-actors/index.js +1 -1
- package/dist/browser/modules/bad-actors/queries/get-bad-actors-query-options.js +1 -1
- package/dist/browser/modules/bad-actors/queries/index.js +1 -1
- package/dist/browser/modules/bridge/index.js +1 -1
- package/dist/browser/modules/bridge/requests.js +1 -1
- package/dist/browser/modules/bridge/verify-on-alternate-node.js +1 -1
- package/dist/browser/modules/communities/index.js +1 -1
- package/dist/browser/modules/communities/mutations/index.js +1 -1
- package/dist/browser/modules/communities/mutations/use-mute-post.js +1 -1
- package/dist/browser/modules/communities/mutations/use-pin-post.js +1 -1
- package/dist/browser/modules/communities/mutations/use-register-community-rewards.js +1 -1
- package/dist/browser/modules/communities/mutations/use-set-community-role.js +1 -1
- package/dist/browser/modules/communities/mutations/use-subscribe-community.js +1 -1
- package/dist/browser/modules/communities/mutations/use-unsubscribe-community.js +1 -1
- package/dist/browser/modules/communities/mutations/use-update-community.js +1 -1
- package/dist/browser/modules/communities/queries/get-account-notifications-infinite-query-options.js +1 -1
- package/dist/browser/modules/communities/queries/get-communities-query-options.js +1 -1
- package/dist/browser/modules/communities/queries/get-community-context-query-options.js +1 -1
- package/dist/browser/modules/communities/queries/get-community-query-options.js +1 -1
- package/dist/browser/modules/communities/queries/get-community-subscribers-query-options.js +1 -1
- package/dist/browser/modules/communities/queries/get-rewarded-communities-query-options.js +1 -1
- package/dist/browser/modules/communities/queries/index.js +1 -1
- package/dist/browser/modules/core/config.js +1 -1
- package/dist/browser/modules/core/hive-tx.js +1 -1
- package/dist/browser/modules/core/index.js +1 -1
- package/dist/browser/modules/core/mutations/broadcast-json.js +1 -1
- package/dist/browser/modules/core/mutations/index.js +1 -1
- package/dist/browser/modules/core/mutations/use-broadcast-mutation.js +1 -1
- package/dist/browser/modules/core/queries/get-chain-properties-query-options.js +1 -1
- package/dist/browser/modules/core/queries/get-dynamic-props-query-options.js +1 -1
- package/dist/browser/modules/core/queries/get-reward-fund-query-options.js +1 -1
- package/dist/browser/modules/core/queries/index.js +1 -1
- package/dist/browser/modules/core/queries-manager.js +1 -1
- package/dist/browser/modules/curation/dmca.js +1 -1
- package/dist/browser/modules/curation/index.js +1 -1
- package/dist/browser/modules/curation/mutations/index.js +1 -1
- package/dist/browser/modules/curation/mutations/use-curation-recommend.js +1 -1
- package/dist/browser/modules/curation/queries/get-curation-application-query-options.js +1 -1
- package/dist/browser/modules/curation/queries/get-curation-applications-query-options.js +1 -1
- package/dist/browser/modules/curation/queries/get-curation-feed-infinite-query-options.js +1 -1
- package/dist/browser/modules/curation/queries/get-curation-post-query-options.js +1 -1
- package/dist/browser/modules/curation/queries/get-curation-recommendations-infinite-query-options.js +1 -1
- package/dist/browser/modules/curation/queries/get-curation-recommender-query-options.js +1 -1
- package/dist/browser/modules/curation/queries/get-curation-roster-admin-query-options.js +1 -1
- package/dist/browser/modules/curation/queries/get-curation-roster-query-options.js +1 -1
- package/dist/browser/modules/curation/queries/get-curation-status-query-options.js +1 -1
- package/dist/browser/modules/curation/queries/index.js +1 -1
- package/dist/browser/modules/curation/requests.js +1 -1
- package/dist/browser/modules/games/index.js +1 -1
- package/dist/browser/modules/games/mutations/game-claim.js +1 -1
- package/dist/browser/modules/games/mutations/index.js +1 -1
- package/dist/browser/modules/games/queries/game-status-check-query-options.js +1 -1
- package/dist/browser/modules/games/queries/index.js +1 -1
- package/dist/browser/modules/hive-engine/index.js +1 -1
- package/dist/browser/modules/hive-engine/queries/get-all-hive-engine-tokens-query-options.js +1 -1
- package/dist/browser/modules/hive-engine/queries/get-hive-engine-balances-with-usd-query-options.js +1 -1
- package/dist/browser/modules/hive-engine/queries/get-hive-engine-token-general-info-query-options.js +1 -1
- package/dist/browser/modules/hive-engine/queries/get-hive-engine-token-metrics-query-options.js +1 -1
- package/dist/browser/modules/hive-engine/queries/get-hive-engine-token-transactions-query-options.js +1 -1
- package/dist/browser/modules/hive-engine/queries/get-hive-engine-tokens-balances-query-options.js +1 -1
- package/dist/browser/modules/hive-engine/queries/get-hive-engine-tokens-market-query-options.js +1 -1
- package/dist/browser/modules/hive-engine/queries/get-hive-engine-tokens-metadata-query-options.js +1 -1
- package/dist/browser/modules/hive-engine/queries/get-hive-engine-unclaimed-rewards-query-options.js +1 -1
- package/dist/browser/modules/hive-engine/queries/index.js +1 -1
- package/dist/browser/modules/hive-engine/requests.js +1 -1
- package/dist/browser/modules/integrations/3speak/index.js +1 -1
- package/dist/browser/modules/integrations/3speak/queries/get-account-token-query-options.js +1 -1
- package/dist/browser/modules/integrations/3speak/queries/get-account-videos-query-options.js +1 -1
- package/dist/browser/modules/integrations/3speak/queries/index.js +1 -1
- package/dist/browser/modules/integrations/hiveposh/index.js +1 -1
- package/dist/browser/modules/integrations/hiveposh/queries/get-hiveposh-links-query-options.js +1 -1
- package/dist/browser/modules/integrations/hiveposh/queries/index.js +1 -1
- package/dist/browser/modules/integrations/index.js +1 -1
- package/dist/browser/modules/integrations/plausible/index.js +1 -1
- package/dist/browser/modules/integrations/plausible/queries/get-stats-query-options.js +1 -1
- package/dist/browser/modules/integrations/plausible/queries/index.js +1 -1
- package/dist/browser/modules/market/index.js +1 -1
- package/dist/browser/modules/market/mutations/index.js +1 -1
- package/dist/browser/modules/market/mutations/use-limit-order-cancel.js +1 -1
- package/dist/browser/modules/market/mutations/use-limit-order-create.js +1 -1
- package/dist/browser/modules/market/queries/get-current-median-history-price-query-options.js +1 -1
- package/dist/browser/modules/market/queries/get-feed-history-query-options.js +1 -1
- package/dist/browser/modules/market/queries/get-hive-hbd-stats-query-options.js +1 -1
- package/dist/browser/modules/market/queries/get-market-data-query-options.js +1 -1
- package/dist/browser/modules/market/queries/get-market-history-query-options.js +1 -1
- package/dist/browser/modules/market/queries/get-market-statistics-query-options.js +1 -1
- package/dist/browser/modules/market/queries/get-order-book-query-options.js +1 -1
- package/dist/browser/modules/market/queries/get-trade-history-query-options.js +1 -1
- package/dist/browser/modules/market/queries/index.js +1 -1
- package/dist/browser/modules/market/requests.js +1 -1
- package/dist/browser/modules/newsletter/api.js +1 -1
- package/dist/browser/modules/newsletter/index.js +1 -1
- package/dist/browser/modules/newsletter/mutations/index.js +1 -1
- package/dist/browser/modules/newsletter/mutations/use-leave-digest.js +1 -1
- package/dist/browser/modules/newsletter/mutations/use-send-newsletter-issue.js +1 -1
- package/dist/browser/modules/newsletter/mutations/use-subscribe-digest.js +1 -1
- package/dist/browser/modules/newsletter/mutations/use-unsubscribe-all-digests.js +1 -1
- package/dist/browser/modules/newsletter/queries/get-digest-subscriptions-query-options.js +1 -1
- package/dist/browser/modules/newsletter/queries/get-newsletter-issues-query-options.js +1 -1
- package/dist/browser/modules/newsletter/queries/get-newsletter-posts-query-options.js +1 -1
- package/dist/browser/modules/newsletter/queries/get-newsletter-sender-query-options.js +1 -1
- package/dist/browser/modules/newsletter/queries/index.js +1 -1
- package/dist/browser/modules/notifications/index.js +1 -1
- package/dist/browser/modules/notifications/mutations/index.js +1 -1
- package/dist/browser/modules/notifications/mutations/use-mark-notifications-read.js +1 -1
- package/dist/browser/modules/notifications/mutations/use-set-last-read.js +1 -1
- package/dist/browser/modules/notifications/queries/get-announcements-query-options.js +1 -1
- package/dist/browser/modules/notifications/queries/get-notifications-infinite-query-options.js +1 -1
- package/dist/browser/modules/notifications/queries/get-notifications-settings-query-options.js +1 -1
- package/dist/browser/modules/notifications/queries/get-notifications-unread-count-query-options.js +1 -1
- package/dist/browser/modules/notifications/queries/get-spotlights-query-options.js +1 -1
- package/dist/browser/modules/notifications/queries/index.js +1 -1
- package/dist/browser/modules/operations/index.js +1 -1
- package/dist/browser/modules/operations/mutations/index.js +1 -1
- package/dist/browser/modules/operations/mutations/sign-operation-by-key.js +1 -1
- package/dist/browser/modules/operations/queries/get-chain-properties-query-options.js +1 -1
- package/dist/browser/modules/operations/queries/index.js +1 -1
- package/dist/browser/modules/points/index.js +1 -1
- package/dist/browser/modules/points/mutations/index.js +1 -1
- package/dist/browser/modules/points/mutations/use-claim-points.js +1 -1
- package/dist/browser/modules/points/queries/get-points-asset-general-info-query-options.js +1 -1
- package/dist/browser/modules/points/queries/get-points-asset-transactions-query-options.js +1 -1
- package/dist/browser/modules/points/queries/get-points-query-options.js +1 -1
- package/dist/browser/modules/points/queries/index.js +1 -1
- package/dist/browser/modules/polls/index.js +1 -1
- package/dist/browser/modules/polls/mutations/index.js +1 -1
- package/dist/browser/modules/polls/mutations/use-poll-vote.js +1 -1
- package/dist/browser/modules/polls/queries/get-poll-query-options.js +1 -1
- package/dist/browser/modules/polls/queries/index.js +1 -1
- package/dist/browser/modules/posts/cache/discussions-cache-utils.js +1 -1
- package/dist/browser/modules/posts/cache/entries-cache-management.js +1 -1
- package/dist/browser/modules/posts/cache/index.js +1 -1
- package/dist/browser/modules/posts/index.js +1 -1
- package/dist/browser/modules/posts/mutations/add-fragment.js +1 -1
- package/dist/browser/modules/posts/mutations/edit-fragment.js +1 -1
- package/dist/browser/modules/posts/mutations/index.js +1 -1
- package/dist/browser/modules/posts/mutations/remove-fragment.js +1 -1
- package/dist/browser/modules/posts/mutations/use-add-draft.js +1 -1
- package/dist/browser/modules/posts/mutations/use-add-image.js +1 -1
- package/dist/browser/modules/posts/mutations/use-add-schedule.js +1 -1
- package/dist/browser/modules/posts/mutations/use-comment.js +1 -1
- package/dist/browser/modules/posts/mutations/use-cross-post.js +1 -1
- package/dist/browser/modules/posts/mutations/use-delete-comment.js +1 -1
- package/dist/browser/modules/posts/mutations/use-delete-draft.js +1 -1
- package/dist/browser/modules/posts/mutations/use-delete-image.js +1 -1
- package/dist/browser/modules/posts/mutations/use-delete-schedule.js +1 -1
- package/dist/browser/modules/posts/mutations/use-move-schedule.js +1 -1
- package/dist/browser/modules/posts/mutations/use-promote.js +1 -1
- package/dist/browser/modules/posts/mutations/use-reblog.js +1 -1
- package/dist/browser/modules/posts/mutations/use-update-draft.js +1 -1
- package/dist/browser/modules/posts/mutations/use-update-reply.js +1 -1
- package/dist/browser/modules/posts/mutations/use-upload-image.js +1 -1
- package/dist/browser/modules/posts/mutations/use-vote.js +1 -1
- package/dist/browser/modules/posts/queries/get-account-posts-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-comment-history-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-content-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-content-replies-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-deleted-entry-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-discussions-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-drafts-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-entry-active-votes-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-fragments-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-images-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-normalize-post-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-post-header-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-post-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-post-tips-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-posts-ranked-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-promoted-posts-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-reblogged-by-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-reblogs-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-schedules-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-shorts-feed-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-trending-tags-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-trending-tags-with-stats-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-user-post-vote-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-waves-by-account-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-waves-by-host-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-waves-by-tag-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-waves-feed-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-waves-following-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-waves-trending-authors-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/get-waves-trending-tags-query-options.js +1 -1
- package/dist/browser/modules/posts/queries/index.js +1 -1
- package/dist/browser/modules/posts/utils/filter-dmca-entries.js +1 -1
- package/dist/browser/modules/posts/utils/validate-post-creating.js +1 -1
- package/dist/browser/modules/posts/utils/waves-helpers.js +1 -1
- package/dist/browser/modules/private-api/index.js +1 -1
- package/dist/browser/modules/private-api/requests.js +1 -1
- package/dist/browser/modules/promotions/index.js +1 -1
- package/dist/browser/modules/promotions/mutations/index.js +1 -1
- package/dist/browser/modules/promotions/mutations/use-boost-plus.js +1 -1
- package/dist/browser/modules/promotions/mutations/use-rc-delegation.js +1 -1
- package/dist/browser/modules/promotions/queries/get-boost-plus-account-prices-query-options.js +1 -1
- package/dist/browser/modules/promotions/queries/get-boost-plus-prices-query-options.js +1 -1
- package/dist/browser/modules/promotions/queries/get-promote-price-query-options.js +1 -1
- package/dist/browser/modules/promotions/queries/get-rc-delegation-active-query-options.js +1 -1
- package/dist/browser/modules/promotions/queries/get-rc-delegation-prices-query-options.js +1 -1
- package/dist/browser/modules/promotions/queries/index.js +1 -1
- package/dist/browser/modules/proposals/index.js +1 -1
- package/dist/browser/modules/proposals/mutations/index.js +1 -1
- package/dist/browser/modules/proposals/mutations/use-proposal-create.js +1 -1
- package/dist/browser/modules/proposals/mutations/use-proposal-vote.js +1 -1
- package/dist/browser/modules/proposals/queries/get-proposal-query-options.js +1 -1
- package/dist/browser/modules/proposals/queries/get-proposal-votes-query-options.js +1 -1
- package/dist/browser/modules/proposals/queries/get-proposals-query-options.js +1 -1
- package/dist/browser/modules/proposals/queries/get-user-proposal-votes-query-options.js +1 -1
- package/dist/browser/modules/proposals/queries/index.js +1 -1
- package/dist/browser/modules/quests/index.js +1 -1
- package/dist/browser/modules/quests/mutations/buy-streak-freeze.js +1 -1
- package/dist/browser/modules/quests/mutations/index.js +1 -1
- package/dist/browser/modules/quests/queries/get-quests-query-options.js +1 -1
- package/dist/browser/modules/quests/queries/index.js +1 -1
- package/dist/browser/modules/resource-credits/index.js +1 -1
- package/dist/browser/modules/resource-credits/queries/get-account-rc-query-options.js +1 -1
- package/dist/browser/modules/resource-credits/queries/get-rc-resource-params-query-options.js +1 -1
- package/dist/browser/modules/resource-credits/queries/get-rc-stats-query-options.js +1 -1
- package/dist/browser/modules/resource-credits/queries/index.js +1 -1
- package/dist/browser/modules/resource-credits/utils/estimate-rc-precheck.js +1 -1
- package/dist/browser/modules/resource-credits/utils/index.js +1 -1
- package/dist/browser/modules/search/dmca.js +1 -1
- package/dist/browser/modules/search/index.js +1 -1
- package/dist/browser/modules/search/parse-json-response.js +1 -1
- package/dist/browser/modules/search/queries/get-search-account-query-options.js +1 -1
- package/dist/browser/modules/search/queries/get-search-api-infinite-query-options.js +1 -1
- package/dist/browser/modules/search/queries/get-search-path-query-options.js +1 -1
- package/dist/browser/modules/search/queries/get-search-query-options.js +1 -1
- package/dist/browser/modules/search/queries/get-search-topics-query-options.js +1 -1
- package/dist/browser/modules/search/queries/get-similar-entries-query-options.js +1 -1
- package/dist/browser/modules/search/queries/index.js +1 -1
- package/dist/browser/modules/search/requests.js +1 -1
- package/dist/browser/modules/support/index.js +1 -1
- package/dist/browser/modules/support/mutations/index.js +1 -1
- package/dist/browser/modules/support/mutations/update-support-settings.js +1 -1
- package/dist/browser/modules/support/queries/get-support-settings-query-options.js +1 -1
- package/dist/browser/modules/support/queries/index.js +1 -1
- package/dist/browser/modules/wallet/consts/hive-account-operation-groups.js +1 -1
- package/dist/browser/modules/wallet/consts/hive-operation-list.js +1 -1
- package/dist/browser/modules/wallet/consts/hive-operation-orders.js +1 -1
- package/dist/browser/modules/wallet/consts/index.js +1 -1
- package/dist/browser/modules/wallet/index.js +1 -1
- package/dist/browser/modules/wallet/mutations/index.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-claim-engine-rewards.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-claim-interest.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-claim-rewards.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-convert.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-delegate-engine-token.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-delegate-rc.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-delegate-vesting-shares.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-engine-market-order.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-set-withdraw-vesting-route.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-stake-engine-token.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-transfer-engine-token.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-transfer-from-savings.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-transfer-point.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-transfer-to-savings.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-transfer-to-vesting.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-transfer.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-undelegate-engine-token.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-unstake-engine-token.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-wallet-operation.js +1 -1
- package/dist/browser/modules/wallet/mutations/use-withdraw-vesting.js +1 -1
- package/dist/browser/modules/wallet/queries/get-account-delegations-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-account-wallet-asset-info-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-collateralized-conversion-requests-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-conversion-requests-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-hbd-asset-general-info-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-hbd-asset-transactions-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-hive-asset-general-info-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-hive-asset-metric-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-hive-asset-transactions-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-hive-asset-withdrawal-routes-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-hive-power-asset-general-info-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-hive-power-asset-transactions-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-hive-power-delegates-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-hive-power-delegatings-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-incoming-rc-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-open-orders-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-outgoing-rc-delegations-infinite-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-portfolio-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-received-vesting-shares-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-recurrent-transfers-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-savings-withdraw-from-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-vesting-delegation-expirations-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-vesting-delegations-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/get-withdraw-routes-query-options.js +1 -1
- package/dist/browser/modules/wallet/queries/index.js +1 -1
- package/dist/browser/modules/witnesses/index.js +1 -1
- package/dist/browser/modules/witnesses/mutations/index.js +1 -1
- package/dist/browser/modules/witnesses/mutations/use-witness-proxy.js +1 -1
- package/dist/browser/modules/witnesses/mutations/use-witness-vote.js +1 -1
- package/dist/browser/modules/witnesses/queries/get-witnesses-query-options.js +1 -1
- package/dist/browser/modules/witnesses/queries/index.js +1 -1
- package/dist/node/hive.cjs +2 -2
- package/dist/node/hive.cjs.map +1 -1
- package/dist/node/hive.mjs +2 -2
- package/dist/node/hive.mjs.map +1 -1
- package/dist/node/index.cjs +3 -3
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.mjs +3 -3
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/browser/chunk-LRO6EB5Y.js +0 -2
- package/dist/browser/chunk-M63I2JJV.js +0 -2
- package/dist/browser/chunk-W6TVTSY5.js +0 -2
- package/dist/browser/chunk-W6TVTSY5.js.map +0 -1
- package/dist/browser/chunk-Z7R2PK35.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-PFVWZI3W.js';import {a}from'./chunk-WTHEQ3M5.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-2JKJ4XWU.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-2JKJ4XWU.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-
|
|
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-2JKJ4XWU.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 {a,e}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {a,e}from'./chunk-WCIDGHGX.js';import {c}from'./chunk-32QJ72HH.js';import {infiniteQueryOptions}from'@tanstack/react-query';function h(a$1,n=20,r=[]){let{filterKey:c$1}=a(r),s=new Set(Array.isArray(r)?r:[r]),u=s.has("")||s.size===0;return infiniteQueryOptions({...e(a$1,n,r),queryKey:["assets","hive-power","transactions",a$1,n,c$1],select:({pages:_,pageParams:p})=>({pageParams:p,pages:_.map(d=>d.filter(e=>{switch(e.type){case "author_reward":case "comment_benefactor_reward":return c(e.vesting_payout).amount>0;case "claim_reward_balance":return c(e.reward_vests).amount>0;case "transfer_to_vesting":return true;case "transfer":case "transfer_to_savings":case "recurrent_transfer":return ["VESTS","HP"].includes(c(e.amount).symbol);case "fill_recurrent_transfer":let l=c(e.amount);return ["VESTS","HP"].includes(l.symbol);case "curation_reward":case "withdraw_vesting":case "delegate_vesting_shares":case "fill_vesting_withdraw":case "return_vesting_delegation":case "producer_reward":case "set_withdraw_vesting_route":return true;default:return u||s.has(e.type)}}))})})}export{h as a};//# sourceMappingURL=chunk-2KEJTQE4.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-2KEJTQE4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/modules/wallet/queries/get-hive-power-asset-transactions-query-options.ts"],"names":["getHivePowerAssetTransactionsQueryOptions","username","limit","filters","filterKey","resolveHiveOperationFilters","userSelectedOperations","hasAllFilter","infiniteQueryOptions","getHiveAssetTransactionsQueryOptions","pages","pageParams","page","item","parseAsset","asset"],"mappings":"mIAaO,SAASA,CAAAA,CACdC,IACAC,CAAAA,CAAQ,EAAA,CACRC,CAAAA,CAA+B,GAC/B,CACA,GAAM,CAAE,SAAA,CAAAC,GAAU,EAAIC,CAAAA,CAA4BF,CAAO,CAAA,CAEnDG,CAAAA,CAAyB,IAAI,GAAA,CACjC,KAAA,CAAM,QAAQH,CAAO,CAAA,CAAIA,EAAU,CAACA,CAAO,CAC7C,CAAA,CACMI,EACJD,CAAAA,CAAuB,GAAA,CAAI,EAAS,CAAA,EAAKA,CAAAA,CAAuB,OAAS,CAAA,CAE3E,OAAOE,oBAAAA,CAAwC,CAC7C,GAAGC,CAAAA,CAAqCR,GAAAA,CAAUC,EAAOC,CAAO,CAAA,CAChE,SAAU,CACR,QAAA,CACA,YAAA,CACA,cAAA,CACAF,IACAC,CAAAA,CACAE,GACF,EACA,MAAA,CAAQ,CAAC,CAAE,KAAA,CAAAM,CAAAA,CAAO,UAAA,CAAAC,CAAW,KAAO,CAClC,UAAA,CAAAA,EACA,KAAA,CAAOD,CAAAA,CAAM,IAAKE,CAAAA,EAChBA,CAAAA,CAAK,MAAA,CAAQC,CAAAA,EAAS,CACpB,OAAQA,CAAAA,CAAK,MACX,KAAK,gBACL,KAAK,2BAAA,CAIH,OAHsBC,CAAAA,CACnBD,EAAsB,cACzB,CAAA,CACqB,MAAA,CAAS,CAAA,CAEhC,KAAK,sBAAA,CAIH,OAHoBC,CAAAA,CACjBD,CAAAA,CAA4B,YAC/B,CAAA,CACmB,MAAA,CAAS,EAE9B,KAAK,qBAAA,CACH,OAAO,KAAA,CACT,KAAK,UAAA,CACL,KAAK,sBACL,KAAK,oBAAA,CACH,OAAO,CAAC,OAAA,CAAS,IAAI,CAAA,CAAE,QAAA,CAASC,CAAAA,CAAWD,CAAAA,CAAK,MAAM,CAAA,CAAE,MAAM,EAEhE,KAAK,yBAAA,CACH,IAAME,CAAAA,CAAQD,CAAAA,CAAWD,CAAAA,CAAK,MAAM,EACpC,OAAO,CAAC,QAAS,IAAI,CAAA,CAAE,SAASE,CAAAA,CAAM,MAAM,CAAA,CAE9C,KAAK,kBACL,KAAK,kBAAA,CACL,KAAK,yBAAA,CACL,KAAK,wBACL,KAAK,2BAAA,CACL,KAAK,iBAAA,CACL,KAAK,4BAAA,CACH,OAAO,MACT,QACE,OAAOR,GAAgBD,CAAAA,CAAuB,GAAA,CAAIO,CAAAA,CAAK,IAAI,CAC/D,CACF,CAAC,CACH,CACF,CAAA,CACF,CAAC,CACH","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../../src/modules/wallet/queries/get-hive-power-asset-transactions-query-options.ts"],"names":["getHivePowerAssetTransactionsQueryOptions","username","limit","filters","filterKey","resolveHiveOperationFilters","userSelectedOperations","hasAllFilter","infiniteQueryOptions","getHiveAssetTransactionsQueryOptions","pages","pageParams","page","item","parseAsset","asset"],"mappings":"mIAaO,SAASA,CAAAA,CACdC,IACAC,CAAAA,CAAQ,EAAA,CACRC,CAAAA,CAA+B,GAC/B,CACA,GAAM,CAAE,SAAA,CAAAC,GAAU,EAAIC,CAAAA,CAA4BF,CAAO,CAAA,CAEnDG,CAAAA,CAAyB,IAAI,GAAA,CACjC,KAAA,CAAM,QAAQH,CAAO,CAAA,CAAIA,EAAU,CAACA,CAAO,CAC7C,CAAA,CACMI,EACJD,CAAAA,CAAuB,GAAA,CAAI,EAAS,CAAA,EAAKA,CAAAA,CAAuB,OAAS,CAAA,CAE3E,OAAOE,oBAAAA,CAAwC,CAC7C,GAAGC,CAAAA,CAAqCR,GAAAA,CAAUC,EAAOC,CAAO,CAAA,CAChE,SAAU,CACR,QAAA,CACA,YAAA,CACA,cAAA,CACAF,IACAC,CAAAA,CACAE,GACF,EACA,MAAA,CAAQ,CAAC,CAAE,KAAA,CAAAM,CAAAA,CAAO,UAAA,CAAAC,CAAW,KAAO,CAClC,UAAA,CAAAA,EACA,KAAA,CAAOD,CAAAA,CAAM,IAAKE,CAAAA,EAChBA,CAAAA,CAAK,MAAA,CAAQC,CAAAA,EAAS,CACpB,OAAQA,CAAAA,CAAK,MACX,KAAK,gBACL,KAAK,2BAAA,CAIH,OAHsBC,CAAAA,CACnBD,EAAsB,cACzB,CAAA,CACqB,MAAA,CAAS,CAAA,CAEhC,KAAK,sBAAA,CAIH,OAHoBC,CAAAA,CACjBD,CAAAA,CAA4B,YAC/B,CAAA,CACmB,MAAA,CAAS,EAE9B,KAAK,qBAAA,CACH,OAAO,KAAA,CACT,KAAK,UAAA,CACL,KAAK,sBACL,KAAK,oBAAA,CACH,OAAO,CAAC,OAAA,CAAS,IAAI,CAAA,CAAE,QAAA,CAASC,CAAAA,CAAWD,CAAAA,CAAK,MAAM,CAAA,CAAE,MAAM,EAEhE,KAAK,yBAAA,CACH,IAAME,CAAAA,CAAQD,CAAAA,CAAWD,CAAAA,CAAK,MAAM,EACpC,OAAO,CAAC,QAAS,IAAI,CAAA,CAAE,SAASE,CAAAA,CAAM,MAAM,CAAA,CAE9C,KAAK,kBACL,KAAK,kBAAA,CACL,KAAK,yBAAA,CACL,KAAK,wBACL,KAAK,2BAAA,CACL,KAAK,iBAAA,CACL,KAAK,4BAAA,CACH,OAAO,MACT,QACE,OAAOR,GAAgBD,CAAAA,CAAuB,GAAA,CAAIO,CAAAA,CAAK,IAAI,CAC/D,CACF,CAAC,CACH,CACF,CAAA,CACF,CAAC,CACH","file":"chunk-2KEJTQE4.js","sourcesContent":["import { infiniteQueryOptions } from \"@tanstack/react-query\";\nimport { parseAsset } from \"@/modules/core/utils\";\nimport type {\n AuthorReward,\n ClaimRewardBalance,\n HiveOperationFilter,\n} from \"../types\";\nimport type { HiveTransaction } from \"../types\";\nimport {\n getHiveAssetTransactionsQueryOptions,\n resolveHiveOperationFilters,\n} from \"./get-hive-asset-transactions-query-options\";\n\nexport function getHivePowerAssetTransactionsQueryOptions(\n username: string | undefined,\n limit = 20,\n filters: HiveOperationFilter = []\n) {\n const { filterKey } = resolveHiveOperationFilters(filters);\n\n const userSelectedOperations = new Set<string>(\n Array.isArray(filters) ? filters : [filters]\n );\n const hasAllFilter =\n userSelectedOperations.has(\"\" as any) || userSelectedOperations.size === 0;\n\n return infiniteQueryOptions<HiveTransaction[]>({\n ...getHiveAssetTransactionsQueryOptions(username, limit, filters),\n queryKey: [\n \"assets\",\n \"hive-power\",\n \"transactions\",\n username,\n limit,\n filterKey,\n ],\n select: ({ pages, pageParams }) => ({\n pageParams,\n pages: pages.map((page) =>\n page.filter((item) => {\n switch (item.type) {\n case \"author_reward\":\n case \"comment_benefactor_reward\":\n const vestingPayout = parseAsset(\n (item as AuthorReward).vesting_payout\n );\n return vestingPayout.amount > 0;\n\n case \"claim_reward_balance\":\n const rewardVests = parseAsset(\n (item as ClaimRewardBalance).reward_vests\n );\n return rewardVests.amount > 0;\n\n case \"transfer_to_vesting\":\n return true;\n case \"transfer\":\n case \"transfer_to_savings\":\n case \"recurrent_transfer\":\n return [\"VESTS\", \"HP\"].includes(parseAsset(item.amount).symbol);\n\n case \"fill_recurrent_transfer\":\n const asset = parseAsset(item.amount);\n return [\"VESTS\", \"HP\"].includes(asset.symbol);\n\n case \"curation_reward\":\n case \"withdraw_vesting\":\n case \"delegate_vesting_shares\":\n case \"fill_vesting_withdraw\":\n case \"return_vesting_delegation\":\n case \"producer_reward\":\n case \"set_withdraw_vesting_route\":\n return true;\n default:\n return hasAllFilter || userSelectedOperations.has(item.type);\n }\n })\n ),\n }),\n });\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {d}from'./chunk-OBSTAXZB.js';import {b}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {d}from'./chunk-OBSTAXZB.js';import {b}from'./chunk-PFVWZI3W.js';import {b as b$1}from'./chunk-POHYQBLL.js';import {a}from'./chunk-WTHEQ3M5.js';function l(t,r,e,u){return b(["communities","update",t],r,a=>[d(r,t,a)],async(a$1,d)=>{b$1().setQueriesData({queryKey:a.communities.singlePrefix(t)},o=>o&&{...o,...d}),e?.adapter?.invalidateQueries&&await e.adapter.invalidateQueries([[...a.communities.singlePrefix(t)]]);},e,"posting",{broadcastMode:u??"async"})}export{l as a};//# sourceMappingURL=chunk-32UMQJXQ.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-32UMQJXQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/modules/communities/mutations/use-update-community.ts"],"names":["useUpdateCommunity","community","username","auth","broadcastMode","useBroadcastMutation","props","buildUpdateCommunityOp","_result","variables","getQueryClient","QueryKeys","prev"],"mappings":"uJA6DO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACAC,EACA,CACA,OAAOC,CAAAA,CACL,CAAC,cAAe,QAAA,CAAUJ,CAAS,CAAA,CACnCC,CAAAA,CACCI,GAAU,CACTC,CAAAA,CAAuBL,CAAAA,CAAWD,CAAAA,CAAWK,CAAK,CACpD,CAAA,CACA,MAAOE,IAAcC,CAAAA,GAAc,CAGtBC,GAAAA,EAAe,CACvB,eACD,CAAE,QAAA,CAAUC,CAAAA,CAAU,WAAA,CAAY,aAAaV,CAAS,CAAE,CAAA,CACzDW,CAAAA,EACMA,CAAAA,EACE,CAAE,GAAGA,CAAAA,CAAM,GAAIH,CAA4C,CAEtE,CAAA,CAGIN,CAAAA,EAAM,SAAS,iBAAA,EACjB,MAAMA,CAAAA,CAAK,OAAA,CAAQ,kBAAkB,CACnC,CAAC,GAAGQ,CAAAA,CAAU,WAAA,CAAY,YAAA,CAAaV,CAAS,CAAC,CACnD,CAAC,EAEL,CAAA,CACAE,CAAAA,CACA,UACA,CAAE,aAAA,CAAeC,CAAAA,EAAiB,OAAQ,CAC5C,CACF","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../../src/modules/communities/mutations/use-update-community.ts"],"names":["useUpdateCommunity","community","username","auth","broadcastMode","useBroadcastMutation","props","buildUpdateCommunityOp","_result","variables","getQueryClient","QueryKeys","prev"],"mappings":"uJA6DO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACAC,EACA,CACA,OAAOC,CAAAA,CACL,CAAC,cAAe,QAAA,CAAUJ,CAAS,CAAA,CACnCC,CAAAA,CACCI,GAAU,CACTC,CAAAA,CAAuBL,CAAAA,CAAWD,CAAAA,CAAWK,CAAK,CACpD,CAAA,CACA,MAAOE,IAAcC,CAAAA,GAAc,CAGtBC,GAAAA,EAAe,CACvB,eACD,CAAE,QAAA,CAAUC,CAAAA,CAAU,WAAA,CAAY,aAAaV,CAAS,CAAE,CAAA,CACzDW,CAAAA,EACMA,CAAAA,EACE,CAAE,GAAGA,CAAAA,CAAM,GAAIH,CAA4C,CAEtE,CAAA,CAGIN,CAAAA,EAAM,SAAS,iBAAA,EACjB,MAAMA,CAAAA,CAAK,OAAA,CAAQ,kBAAkB,CACnC,CAAC,GAAGQ,CAAAA,CAAU,WAAA,CAAY,YAAA,CAAaV,CAAS,CAAC,CACnD,CAAC,EAEL,CAAA,CACAE,CAAAA,CACA,UACA,CAAE,aAAA,CAAeC,CAAAA,EAAiB,OAAQ,CAC5C,CACF","file":"chunk-32UMQJXQ.js","sourcesContent":["import { useBroadcastMutation, getQueryClient, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildUpdateCommunityOp, type CommunityProps } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport type { Community } from \"../types\";\n\n/**\n * Payload for updating community properties.\n * Matches the CommunityProps interface from builders.\n */\nexport type UpdateCommunityPayload = CommunityProps;\n\n/**\n * React Query mutation hook for updating community properties.\n *\n * This mutation broadcasts an updateProps operation to the Hive blockchain,\n * modifying the community's metadata and settings. Only community admins\n * can update community properties.\n *\n * @param community - Community name (e.g., \"hive-123456\")\n * @param username - The username updating the community (required for broadcast, must be admin)\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 refetch updated properties\n *\n * **Operation Details:**\n * - Uses custom_json operation with id \"community\"\n * - Action: [\"updateProps\", {\"community\": \"hive-123456\", \"props\": {...}}]\n * - Authority: Posting key\n *\n * **Properties:**\n * - title - Community display title\n * - about - Short description/tagline\n * - lang - Primary language code (e.g., \"en\")\n * - description - Full community description (markdown supported)\n * - flag_text - Custom text shown when flagging posts\n * - is_nsfw - Whether community contains NSFW content\n *\n * @example\n * ```typescript\n * const updateMutation = useUpdateCommunity('hive-123456', username, {\n * adapter: myAdapter,\n * enableFallback: true,\n * fallbackChain: ['keychain', 'key', 'hivesigner']\n * });\n *\n * // Update community properties\n * updateMutation.mutate({\n * title: 'My Awesome Community',\n * about: 'A place for awesome people',\n * lang: 'en',\n * description: '# Welcome\\nThis is our community description',\n * flag_text: 'Please explain why this content violates our rules',\n * is_nsfw: false\n * });\n * ```\n */\nexport function useUpdateCommunity(\n community: string,\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<UpdateCommunityPayload>(\n [\"communities\", \"update\", community],\n username,\n (props) => [\n buildUpdateCommunityOp(username!, community, props)\n ],\n async (_result: any, variables) => {\n // Optimistic property merge in community cache\n // Query key is [\"community\",\"single\",name,observer] — observer varies, so use predicate\n const qc = getQueryClient();\n qc.setQueriesData<Community>(\n { queryKey: QueryKeys.communities.singlePrefix(community) },\n (prev) => {\n if (!prev) return prev;\n return { ...prev, ...(variables as unknown as Partial<Community>) };\n }\n );\n\n // Cache invalidation — prefix-match all community single queries\n if (auth?.adapter?.invalidateQueries) {\n await auth.adapter.invalidateQueries([\n [...QueryKeys.communities.singlePrefix(community)]\n ]);\n }\n },\n auth,\n 'posting',\n { broadcastMode: broadcastMode ?? 'async' }\n );\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {e}from'./chunk-QYY3VHLJ.js';import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {e}from'./chunk-QYY3VHLJ.js';import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-PFVWZI3W.js';import {a}from'./chunk-WTHEQ3M5.js';function l(u,o,e$1){return b(["accounts","claimAccount"],u,({creator:a,fee:t="0.000 HIVE"})=>[e(a,t)],async(a$1,t)=>{await b$1(o?.adapter,e$1,[a.accounts.full(t.creator)]);},o,"active",{broadcastMode:e$1})}export{l as a};//# sourceMappingURL=chunk-37K2OPGL.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-37K2OPGL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/modules/accounts/mutations/use-claim-account.ts"],"names":["useClaimAccount","username","auth","broadcastMode","useBroadcastMutation","creator","fee","buildClaimAccountOp","_result","variables","invalidateAfterBroadcast","QueryKeys"],"mappings":"uJA+DO,SAASA,CAAAA,CACdC,EACAC,CAAAA,CACAC,GAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,UAAA,CAAY,cAAc,CAAA,CAC3BH,EACA,CAAC,CAAE,OAAA,CAAAI,CAAAA,CAAS,GAAA,CAAAC,CAAAA,CAAM,YAAa,CAAA,GAAM,CACnCC,CAAAA,CAAoBF,CAAAA,CAASC,CAAG,CAClC,EACA,MAAOE,GAAAA,CAAcC,CAAAA,GAAc,CACjC,MAAMC,GAAAA,CAAyBR,GAAM,OAAA,CAASC,GAAAA,CAAe,CAC3DQ,CAAAA,CAAU,QAAA,CAAS,IAAA,CAAKF,EAAU,OAAO,CAC3C,CAAC,EACH,CAAA,CACAP,CAAAA,CACA,SACA,CAAE,aAAA,CAAAC,GAAc,CAClB,CACF","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../../src/modules/accounts/mutations/use-claim-account.ts"],"names":["useClaimAccount","username","auth","broadcastMode","useBroadcastMutation","creator","fee","buildClaimAccountOp","_result","variables","invalidateAfterBroadcast","QueryKeys"],"mappings":"uJA+DO,SAASA,CAAAA,CACdC,EACAC,CAAAA,CACAC,GAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,UAAA,CAAY,cAAc,CAAA,CAC3BH,EACA,CAAC,CAAE,OAAA,CAAAI,CAAAA,CAAS,GAAA,CAAAC,CAAAA,CAAM,YAAa,CAAA,GAAM,CACnCC,CAAAA,CAAoBF,CAAAA,CAASC,CAAG,CAClC,EACA,MAAOE,GAAAA,CAAcC,CAAAA,GAAc,CACjC,MAAMC,GAAAA,CAAyBR,GAAM,OAAA,CAASC,GAAAA,CAAe,CAC3DQ,CAAAA,CAAU,QAAA,CAAS,IAAA,CAAKF,EAAU,OAAO,CAC3C,CAAC,EACH,CAAA,CACAP,CAAAA,CACA,SACA,CAAE,aAAA,CAAAC,GAAc,CAClB,CACF","file":"chunk-37K2OPGL.js","sourcesContent":["import { useBroadcastMutation, invalidateAfterBroadcast, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildClaimAccountOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\n/**\n * Payload for claiming account creation tokens.\n */\nexport interface ClaimAccountPayload {\n /** Creator account claiming the token */\n creator: string;\n /** Fee for claiming (usually \"0.000 HIVE\" for RC-based claims) */\n fee?: string;\n}\n\n/**\n * React Query mutation hook for claiming account creation tokens.\n *\n * This mutation broadcasts a claim_account operation to claim an account\n * creation token using Resource Credits (RC). The claimed token can later\n * be used to create a new account for free using the create_claimed_account\n * operation.\n *\n * @param username - The username claiming the account token (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 account cache to update pending_claimed_accounts count\n * - Updates account query data to set pending_claimed_accounts = 0 optimistically\n *\n * **Operation Details:**\n * - Uses native claim_account operation\n * - Fee: \"0.000 HIVE\" (uses RC instead of HIVE)\n * - Authority: Active key (required for claiming)\n *\n * **RC Requirements:**\n * - Requires sufficient Resource Credits (RC)\n * - RC amount varies based on network conditions\n * - Claiming without sufficient RC will fail\n *\n * **Use Case:**\n * - Claim tokens in advance when RC is available\n * - Create accounts later without paying HIVE fee\n * - Useful for onboarding services and apps\n *\n * @example\n * ```typescript\n * const claimMutation = useClaimAccount(username, {\n * adapter: myAdapter,\n * enableFallback: true,\n * fallbackChain: ['keychain', 'key', 'hivesigner']\n * });\n *\n * // Claim account token using RC\n * claimMutation.mutate({\n * creator: 'alice',\n * fee: '0.000 HIVE'\n * });\n * ```\n */\nexport function useClaimAccount(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<ClaimAccountPayload>(\n [\"accounts\", \"claimAccount\"],\n username,\n ({ creator, fee = \"0.000 HIVE\" }) => [\n buildClaimAccountOp(creator, fee)\n ],\n async (_result: any, variables) => {\n await invalidateAfterBroadcast(auth?.adapter, broadcastMode, [\n QueryKeys.accounts.full(variables.creator),\n ]);\n },\n auth,\n 'active',\n { broadcastMode }\n );\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-OBSTAXZB.js';import {b}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-OBSTAXZB.js';import {b}from'./chunk-PFVWZI3W.js';import {a as a$2}from'./chunk-WTHEQ3M5.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-3XRU3DXW.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-3XRU3DXW.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-
|
|
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-3XRU3DXW.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 {a as a$1}from'./chunk-MW4KYNU3.js';import {b as b$4}from'./chunk-NT4ZVSWI.js';import {c,e,f,b as b$1,a as a$5}from'./chunk-BWMECQQM.js';import {a as a$2}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-MW4KYNU3.js';import {b as b$4}from'./chunk-NT4ZVSWI.js';import {c,e,f,b as b$1,a as a$5}from'./chunk-BWMECQQM.js';import {a as a$2}from'./chunk-4OOAGHRD.js';import {b as b$2}from'./chunk-CNB64U7U.js';import {b}from'./chunk-PFVWZI3W.js';import {a as a$4}from'./chunk-SEACJS36.js';import {c as c$1}from'./chunk-OQA55EE6.js';import {b as b$3}from'./chunk-POHYQBLL.js';import {c as c$2}from'./chunk-OMSXAN23.js';import {a}from'./chunk-WTHEQ3M5.js';import {a as a$3}from'./chunk-CPEOHI6I.js';import {j}from'./chunk-RAWKN3XW.js';import {useQueryClient,useQuery,useMutation,queryOptions}from'@tanstack/react-query';import $ from'hivesigner';function Dt(o,e$1,r){let n=useQueryClient(),{data:t}=useQuery(p(o));return b(["accounts","update"],o,s=>{let a=c(n.getQueryData(p(o).queryKey),t);if(!a)throw new Error("[SDK][Accounts] \u2013 cannot update not existing account");return [["account_update2",{account:o,json_metadata:"",extensions:[],posting_json_metadata:e({existingPostingJsonMetadata:a.posting_json_metadata,profile:s.profile,tokens:s.tokens})}]]},async(s,a$1)=>{n.setQueryData(p(o).queryKey,i=>{if(!i)return i;let u=JSON.parse(JSON.stringify(i));return u.profile=f({existingProfile:b$1(i),profile:a$1.profile,tokens:a$1.tokens}),u}),await b$2(e$1?.adapter,r,[a.accounts.full(o)]);},e$1,void 0,{broadcastMode:r,onMutate:async()=>{if(o)try{await n.fetchQuery({...p(o),staleTime:0});}catch{}}})}function Jt(o,e,r,n,t){return useMutation({mutationKey:["accounts","relation","update",o,e],mutationFn:async s=>{let a=a$1(o,e);await b$3().prefetchQuery(a);let i=b$3().getQueryData(a.queryKey);return await a$2(o,"follow",["follow",{follower:o,following:e,what:[...s==="toggle-ignore"&&!i?.ignores?["ignore"]:[],...s==="toggle-follow"&&!i?.follows?["blog"]:[]]}],r),{...i,ignores:s==="toggle-ignore"?!i?.ignores:i?.ignores,follows:s==="toggle-follow"?!i?.follows:i?.follows}},onError:t,onSuccess(s){n(s),b$3().setQueryData(a.accounts.relations(o,e),s),e&&b$3().invalidateQueries(p(e));}})}function J(o,e){let r=new Map;return o.forEach(([n,t])=>{r.set(n.toString(),t);}),e.forEach(([n,t])=>{r.set(n.toString(),t);}),Array.from(r.entries()).sort(([n],[t])=>n.localeCompare(t)).map(([n,t])=>[n,t])}function F(o,e){let{data:r}=useQuery(p(o));return useMutation({mutationKey:["accounts","keys-update",o],mutationFn:async({keys:n,keepCurrent:t=false,currentKey:s,keysToRevoke:a=[],keysToRevokeByAuthority:i={}})=>{if(n.length===0)throw new Error("[SDK][Update password] \u2013 no new keys provided");if(!r)throw new Error("[SDK][Update password] \u2013 cannot update keys for anon user");let u=c=>{let l=JSON.parse(JSON.stringify(r[c])),R=[...i[c]||[],...i[c]===void 0?a:[]],Q=t?l.key_auths.filter(([h])=>!R.includes(h.toString())):[];return l.key_auths=J(Q,n.map((h,M)=>[h[c].createPublic().toString(),M+1])),l};return c$1([["account_update",{account:o,json_metadata:r.json_metadata,owner:u("owner"),active:u("active"),posting:u("posting"),memo_key:n[0].memo_key.createPublic().toString()}]],s)},...e})}function Xt(o,e){let{data:r}=useQuery(p(o)),{mutateAsync:n}=F(o);return useMutation({mutationKey:["accounts","password-update",o],mutationFn:async({newPassword:t,currentPassword:s,keepCurrent:a})=>{if(!r)throw new Error("[SDK][Update password] \u2013 cannot update password for anon user");let i=a$3.fromLogin(o,s,"owner");return n({currentKey:i,keepCurrent:a,keys:[{owner:a$3.fromLogin(o,t,"owner"),active:a$3.fromLogin(o,t,"active"),posting:a$3.fromLogin(o,t,"posting"),memo_key:a$3.fromLogin(o,t,"memo")}]})},...e})}function ro(o,e,r){let n=useQueryClient(),{data:t}=useQuery(p(o));return useMutation({mutationKey:["accounts","revoke-posting",t?.name],mutationFn:async({accountName:s,type:a,key:i})=>{if(!t)throw new Error("[SDK][Accounts] \u2013\xA0cannot revoke posting for anonymous user");let u=JSON.parse(JSON.stringify(t.posting));u.account_auths=u.account_auths.filter(([l])=>l!==s);let c={account:t.name,posting:u,memo_key:t.memo_key,json_metadata:t.json_metadata};if(a==="key"&&i)return c$1([["account_update",c]],i);if(a==="keychain"){if(!r?.adapter?.broadcastWithKeychain)throw new Error("[SDK][Accounts] \u2013 missing keychain broadcaster");return r.adapter.broadcastWithKeychain(t.name,[["account_update",c]],"active")}else return e.hsCallbackUrl,$.sendOperation(["account_update",c],e.hsCallbackUrl?{callback:e.hsCallbackUrl}:{},()=>{})},onError:e.onError,onSuccess:(s,a,i)=>{e.onSuccess?.(s,a,i),n.setQueryData(p(o).queryKey,u=>({...u,posting:{...u?.posting,account_auths:u?.posting?.account_auths?.filter(([c])=>c!==a.accountName)??[]}}));}})}function po(o,e,r,n){let{data:t}=useQuery(p(o));return useMutation({mutationKey:["accounts","recovery",t?.name],mutationFn:async({accountName:s,type:a,key:i,email:u})=>{if(!t)throw new Error("[SDK][Accounts] \u2013\xA0cannot change recovery for anonymous user");let c={account_to_recover:t.name,new_recovery_account:s,extensions:[]};if(a==="ecency"){if(!e)throw new Error("[SDK][Accounts] \u2013 missing access token");let g=await a$4()(c$2.privateApiHost+"/private-api/recoveries-add",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,email:u,publicKeys:[...t.owner.key_auths,...t.active.key_auths,...t.posting.key_auths,t.memo_key]})});if(!g.ok)throw new Error(`[SDK][Accounts] Failed to add recovery: ${g.status}`);return g}else {if(a==="key"&&i)return c$1([["change_recovery_account",c]],i);if(a==="keychain"){if(!n?.adapter?.broadcastWithKeychain)throw new Error("[SDK][Accounts] \u2013 missing keychain broadcaster");return n.adapter.broadcastWithKeychain(t.name,[["change_recovery_account",c]],"owner")}else return r.hsCallbackUrl,$.sendOperation(["change_recovery_account",c],r.hsCallbackUrl?{callback:r.hsCallbackUrl}:{},()=>{})}},onError:r.onError,onSuccess:r.onSuccess})}function _o(o,e){let{data:r}=useQuery(p(o));return useMutation({mutationKey:["accounts","revoke-key",r?.name],mutationFn:async({currentKey:n,revokingKey:t})=>{if(!r)throw new Error("[SDK][Revoke key] \u2013 cannot update keys for anon user");let s=Array.isArray(t)?t:[t],a=b$4(r,s);return c$1([["account_update",a]],n)},...e})}function w(o){return !o.posting_json_metadata&&!o.json_metadata}function tt(o){return o?Object.values(o).some(e=>typeof e=="string"?e.length>0:e!=null):false}function p(o){return queryOptions({queryKey:a.accounts.full(o),queryFn:async({signal:e})=>{if(!o)return null;let[r,n]=await Promise.all([j("condenser_api.get_accounts",[[o]],void 0,void 0,e,c=>Array.isArray(c)),j("bridge.get_profile",{account:o},void 0,void 0,e).catch(c=>{if(e?.aborted)throw c;return null})]);if(!r?.[0])return null;let t=r[0];if(w(t)&&tt(n?.metadata?.profile)){let c=await j("condenser_api.get_accounts",[[o]],void 0,void 0,e,l=>Array.isArray(l)&&(!l[0]||!w(l[0])));if(c[0]&&!w(c[0]))t=c[0];else throw new Error(`[SDK][Accounts] \u2013 inconsistent account row for ${o}: empty json metadata while hivemind profile is populated`)}let s=a$5(t.posting_json_metadata),a=n?.stats,i=a?{account:t.name,follower_count:a.followers??0,following_count:a.following??0}:void 0,u=n?.reputation??0;return {name:t.name,owner:t.owner,active:t.active,posting:t.posting,memo_key:t.memo_key,post_count:t.post_count,created:t.created,posting_json_metadata:t.posting_json_metadata,last_vote_time:t.last_vote_time,last_post:t.last_post,json_metadata:t.json_metadata,reward_hive_balance:t.reward_hive_balance,reward_hbd_balance:t.reward_hbd_balance,reward_vesting_hive:t.reward_vesting_hive,reward_vesting_balance:t.reward_vesting_balance,balance:t.balance,hbd_balance:t.hbd_balance,savings_balance:t.savings_balance,savings_hbd_balance:t.savings_hbd_balance,savings_hbd_last_interest_payment:t.savings_hbd_last_interest_payment,savings_hbd_seconds_last_update:t.savings_hbd_seconds_last_update,savings_hbd_seconds:t.savings_hbd_seconds,next_vesting_withdrawal:t.next_vesting_withdrawal,pending_claimed_accounts:t.pending_claimed_accounts,vesting_shares:t.vesting_shares,delegated_vesting_shares:t.delegated_vesting_shares,received_vesting_shares:t.received_vesting_shares,vesting_withdraw_rate:t.vesting_withdraw_rate,to_withdraw:t.to_withdraw,withdrawn:t.withdrawn,curation_rewards:t.curation_rewards===void 0?void 0:Number(t.curation_rewards),posting_rewards:t.posting_rewards===void 0?void 0:Number(t.posting_rewards),witness_votes:t.witness_votes,proxy:t.proxy,recovery_account:t.recovery_account,proxied_vsf_votes:t.proxied_vsf_votes,voting_manabar:t.voting_manabar,voting_power:t.voting_power,downvote_manabar:t.downvote_manabar,follow_stats:i,reputation:u,profile:s}},enabled:!!o,staleTime:6e4})}export{p as a,Dt as b,Jt as c,J as d,F as e,Xt as f,ro as g,po as h,_o as i};//# sourceMappingURL=chunk-4C57MZP6.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-4C57MZP6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/modules/accounts/mutations/use-account-update.ts","../../src/modules/accounts/mutations/use-account-relations-update.ts","../../src/modules/accounts/mutations/use-account-update-key-auths.ts","../../src/modules/accounts/mutations/use-account-update-password.ts","../../src/modules/accounts/mutations/use-account-revoke-posting.ts","../../src/modules/accounts/mutations/use-account-update-recovery.ts","../../src/modules/accounts/mutations/use-account-revoke-key.ts","../../src/modules/accounts/queries/get-account-full-query-options.ts"],"names":["useAccountUpdate","username","auth","broadcastMode","queryClient","useQueryClient","data","useQuery","getAccountFullQueryOptions","useBroadcastMutation","payload","account","pickRicherMetadataSnapshot","buildPostingJsonMetadata","_data","variables","obj","buildProfileMetadata","extractAccountProfile","invalidateAfterBroadcast","QueryKeys","useAccountRelationsUpdate","reference","target","onSuccess","onError","useMutation","kind","relationsQuery","getRelationshipBetweenAccountsQueryOptions","getQueryClient","actualRelation","broadcastJson","dedupeAndSortKeyAuths","existing","additions","merged","key","weight","keyA","keyB","useAccountUpdateKeyAuths","options","accountData","keys","keepCurrent","currentKey","keysToRevoke","keysToRevokeByAuthority","prepareAuth","keyName","allKeysToRevoke","existingKeys","values","i","broadcastOperations","useAccountUpdatePassword","updateKeys","newPassword","currentPassword","PrivateKey","useAccountRevokePosting","accountName","type","posting","operationBody","hs","resp","ctx","useAccountUpdateRecovery","code","email","response","getBoundFetch","CONFIG","useAccountRevokeKey","revokingKey","revokingKeys","op","buildRevokeKeysOp","isMetadataStripped","hasProfileValues","profile","value","queryOptions","signal","bridgeProfile","callRPC","rows","e","chainAccount","reread","parseProfileMetadata","stats","follow_stats","reputationValue"],"mappings":"wpBAgEO,SAASA,EAAAA,CACdC,EACAC,GAAAA,CACAC,CAAAA,CACA,CACA,IAAMC,CAAAA,CAAcC,gBAAe,CAE7B,CAAE,KAAAC,CAAK,CAAA,CAAIC,SAASC,CAAAA,CAA2BP,CAAQ,CAAC,CAAA,CAE9D,OAAOQ,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F,CAAAA,CACX,SAAA,CAAW,GACb,CAAC,CACH","file":"chunk-7N4UF43Y.js","sourcesContent":["import { useBroadcastMutation, invalidateAfterBroadcast, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport { useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport { getAccountFullQueryOptions } from \"../queries\";\nimport { AccountProfile, FullAccount } from \"../types\";\nimport {\n buildPostingJsonMetadata,\n buildProfileMetadata,\n extractAccountProfile,\n pickRicherMetadataSnapshot,\n} from \"../utils/profile-metadata\";\n\ninterface Payload {\n profile: Partial<AccountProfile>;\n tokens: AccountProfile[\"tokens\"];\n}\n\n/**\n * React Query mutation hook for updating account profile metadata.\n *\n * This mutation broadcasts an account_update2 operation to update the user's\n * profile information (name, about, location, avatar, cover image, etc.).\n *\n * @param username - The username to update (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 * **Profile Fields:**\n * - name: Display name\n * - about: Bio/description\n * - location: Location\n * - website: Website URL\n * - profile_image: Avatar URL\n * - cover_image: Cover/banner URL\n * - tokens: Social tokens (Twitter, Facebook, etc.)\n * - version: Profile metadata version (auto-set to 2)\n *\n * **Authentication:**\n * - Uses posting authority (account_update2 operation)\n * - Supports all auth methods via platform adapter\n *\n * **Post-Broadcast Actions:**\n * - Optimistically updates account cache with new profile data\n * - Invalidates account cache to refetch from blockchain\n *\n * @example\n * ```typescript\n * const updateProfile = useAccountUpdate(username, {\n * adapter: myAdapter,\n * });\n *\n * // Update profile\n * updateProfile.mutate({\n * profile: {\n * name: \"John Doe\",\n * about: \"Hive enthusiast\",\n * profile_image: \"https://...\",\n * }\n * });\n * ```\n */\nexport function useAccountUpdate(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n const queryClient = useQueryClient();\n\n const { data } = useQuery(getAccountFullQueryOptions(username));\n\n return useBroadcastMutation(\n [\"accounts\", \"update\"],\n username,\n (payload: Partial<Payload>) => {\n // Prefer the freshest cached snapshot. onMutate has just refetched the\n // account from chain, so this usually reflects the current on-chain\n // profile rather than a possibly stale/unloaded render-time value. If\n // the cache instead holds a metadata-poorer row than the render-time\n // snapshot (e.g. a node served a stripped account row), the richer\n // snapshot wins — a partial update must never shrink the profile while\n // any snapshot still knows the full one.\n const account = pickRicherMetadataSnapshot(\n queryClient.getQueryData<FullAccount>(\n getAccountFullQueryOptions(username).queryKey\n ),\n data\n );\n\n if (!account) {\n throw new Error(\"[SDK][Accounts] – cannot update not existing account\");\n }\n\n return [\n [\n \"account_update2\",\n {\n account: username!,\n json_metadata: \"\",\n extensions: [] as [],\n // Read-modify-write the FULL on-chain metadata: deep-merge the\n // profile and preserve any non-`profile` top-level keys, so a\n // partial update never wipes unrelated fields.\n posting_json_metadata: buildPostingJsonMetadata({\n existingPostingJsonMetadata: account.posting_json_metadata,\n profile: payload.profile,\n tokens: payload.tokens,\n }),\n },\n ],\n ];\n },\n async (_data: unknown, variables: Partial<Payload>) => {\n // Optimistic cache update\n queryClient.setQueryData<FullAccount>(\n getAccountFullQueryOptions(username).queryKey,\n (data) => {\n if (!data) {\n return data;\n }\n\n const obj = JSON.parse(JSON.stringify(data)) as FullAccount;\n obj.profile = buildProfileMetadata({\n existingProfile: extractAccountProfile(data),\n profile: variables.profile,\n tokens: variables.tokens,\n });\n\n return obj;\n }\n );\n\n // Invalidate cache to refetch from blockchain\n await invalidateAfterBroadcast(auth?.adapter, broadcastMode, [\n QueryKeys.accounts.full(username)\n ]);\n },\n auth,\n undefined,\n {\n broadcastMode,\n // Before merging, force a fresh on-chain read so a stale or unloaded\n // cached snapshot cannot cause a partial update (e.g. pinning a post,\n // which sets only `pinned`) to overwrite the existing profile with a\n // near-empty object. Best-effort: if the refetch fails, the op builder\n // falls back to the cached snapshot.\n onMutate: async () => {\n if (!username) {\n return;\n }\n try {\n await queryClient.fetchQuery({\n ...getAccountFullQueryOptions(username),\n staleTime: 0,\n });\n } catch {\n // Ignore – fall back to whatever is already cached.\n }\n },\n }\n );\n}\n","import { broadcastJson, getQueryClient, QueryKeys } from \"@/modules/core\";\nimport type { AuthContext } from \"@/modules/core/types\";\nimport { useMutation } from \"@tanstack/react-query\";\nimport { getRelationshipBetweenAccountsQueryOptions, getAccountFullQueryOptions } from \"../queries\";\nimport { AccountRelationship } from \"../types\";\n\ntype Kind = \"toggle-ignore\" | \"toggle-follow\";\n\nexport function useAccountRelationsUpdate(\n reference: string | undefined,\n target: string | undefined,\n auth: AuthContext | undefined,\n onSuccess: (data: Partial<AccountRelationship> | undefined) => void,\n onError: (e: Error) => void\n) {\n return useMutation({\n mutationKey: [\"accounts\", \"relation\", \"update\", reference, target],\n mutationFn: async (kind: Kind) => {\n const relationsQuery = getRelationshipBetweenAccountsQueryOptions(\n reference!,\n target!\n );\n await getQueryClient().prefetchQuery(relationsQuery);\n const actualRelation = getQueryClient().getQueryData(\n relationsQuery.queryKey\n );\n\n await broadcastJson(\n reference,\n \"follow\",\n [\n \"follow\",\n {\n follower: reference,\n following: target,\n what: [\n ...(kind === \"toggle-ignore\" && !actualRelation?.ignores\n ? [\"ignore\"]\n : []),\n ...(kind === \"toggle-follow\" && !actualRelation?.follows\n ? [\"blog\"]\n : []),\n ],\n },\n ],\n auth\n );\n\n return {\n ...actualRelation,\n ignores:\n kind === \"toggle-ignore\"\n ? !actualRelation?.ignores\n : actualRelation?.ignores,\n follows:\n kind === \"toggle-follow\"\n ? !actualRelation?.follows\n : actualRelation?.follows,\n } satisfies Partial<AccountRelationship>;\n },\n onError,\n onSuccess(data) {\n onSuccess(data);\n\n getQueryClient().setQueryData(\n QueryKeys.accounts.relations(reference!, target!),\n data\n );\n\n // Invalidate account query to refetch follow stats (follower_count, following_count)\n // This is needed because profile pages use staleTime: Infinity for performance\n if (target) {\n getQueryClient().invalidateQueries(\n getAccountFullQueryOptions(target)\n );\n }\n },\n });\n}\n","import { PrivateKey } from \"../../../hive-tx\";\nimport type { Authority } from \"../../../hive-tx\";\nimport {\n useMutation,\n useQuery,\n type UseMutationOptions,\n} from \"@tanstack/react-query\";\nimport { getAccountFullQueryOptions } from \"../queries\";\nimport { broadcastOperations } from \"@/modules/core/hive-tx\";\n\nexport interface Keys {\n owner: PrivateKey;\n active: PrivateKey;\n posting: PrivateKey;\n memo_key: PrivateKey;\n}\n\ninterface Payload {\n keepCurrent?: boolean;\n currentKey: PrivateKey;\n keys: Keys[];\n keysToRevoke?: string[]; // Deprecated: will be treated as revoking from all authorities\n keysToRevokeByAuthority?: Partial<Record<keyof Keys, string[]>>; // Authority-specific revocation\n}\n\nexport function dedupeAndSortKeyAuths(\n existing: Authority[\"key_auths\"],\n additions: [string, number][]\n): Authority[\"key_auths\"] {\n const merged = new Map<string, number>();\n\n existing.forEach(([key, weight]) => {\n merged.set(key.toString(), weight);\n });\n\n additions.forEach(([key, weight]) => {\n merged.set(key.toString(), weight);\n });\n\n return Array.from(merged.entries())\n .sort(([keyA], [keyB]) => keyA.localeCompare(keyB))\n .map(([key, weight]) => [key, weight] as [string, number]);\n}\n\ntype UpdateKeyAuthsOptions = Pick<\n UseMutationOptions<unknown, Error, Payload>,\n \"onSuccess\" | \"onError\"\n>;\n\nexport function useAccountUpdateKeyAuths(\n username: string,\n options?: UpdateKeyAuthsOptions\n) {\n const { data: accountData } = useQuery(getAccountFullQueryOptions(username));\n\n return useMutation({\n mutationKey: [\"accounts\", \"keys-update\", username],\n mutationFn: async ({\n keys,\n keepCurrent = false,\n currentKey,\n keysToRevoke = [],\n keysToRevokeByAuthority = {}\n }: Payload) => {\n if (keys.length === 0) {\n throw new Error(\n \"[SDK][Update password] – no new keys provided\"\n );\n }\n\n if (!accountData) {\n throw new Error(\n \"[SDK][Update password] – cannot update keys for anon user\"\n );\n }\n\n const prepareAuth = (keyName: keyof Keys) => {\n const auth: Authority = JSON.parse(JSON.stringify(accountData[keyName]));\n\n // Get keys to revoke for this specific authority\n const keysToRevokeForAuthority = keysToRevokeByAuthority[keyName] || [];\n // Fallback to global keysToRevoke for backwards compatibility\n const allKeysToRevoke = [\n ...keysToRevokeForAuthority,\n ...(keysToRevokeByAuthority[keyName] === undefined ? keysToRevoke : [])\n ];\n\n // Filter out keys to revoke from existing keys (authority-specific)\n const existingKeys = keepCurrent\n ? auth.key_auths.filter(([key]) => !allKeysToRevoke.includes(key.toString()))\n : [];\n\n auth.key_auths = dedupeAndSortKeyAuths(\n existingKeys,\n keys.map(\n (values, i) =>\n [values[keyName].createPublic().toString(), i + 1] as [\n string,\n number,\n ]\n )\n );\n\n return auth;\n };\n\n return broadcastOperations(\n [[\"account_update\", {\n account: username,\n json_metadata: accountData.json_metadata,\n owner: prepareAuth(\"owner\"),\n active: prepareAuth(\"active\"),\n posting: prepareAuth(\"posting\"),\n // Always use new memo key when adding new keys\n memo_key: keys[0].memo_key.createPublic().toString(),\n }]],\n currentKey\n );\n },\n ...options,\n });\n}\n","import { PrivateKey } from \"../../../hive-tx\";\nimport {\n useMutation,\n useQuery,\n type UseMutationOptions,\n} from \"@tanstack/react-query\";\nimport { getAccountFullQueryOptions } from \"../queries\";\nimport { useAccountUpdateKeyAuths } from \"./use-account-update-key-auths\";\n\ninterface Payload {\n newPassword: string;\n currentPassword: string;\n keepCurrent?: boolean;\n}\n\n/**\n * Only native Hive and custom passwords could be updated here\n * Seed based password cannot be updated here, it will be in an account always for now\n */\ntype UpdatePasswordOptions = Pick<\n UseMutationOptions<unknown, Error, Payload>,\n \"onSuccess\" | \"onError\"\n>;\n\nexport function useAccountUpdatePassword(\n username: string,\n options?: UpdatePasswordOptions\n) {\n const { data: accountData } = useQuery(getAccountFullQueryOptions(username));\n\n const { mutateAsync: updateKeys } = useAccountUpdateKeyAuths(username);\n\n return useMutation({\n mutationKey: [\"accounts\", \"password-update\", username],\n mutationFn: async ({\n newPassword,\n currentPassword,\n keepCurrent,\n }: Payload) => {\n if (!accountData) {\n throw new Error(\n \"[SDK][Update password] – cannot update password for anon user\"\n );\n }\n const currentKey = PrivateKey.fromLogin(\n username,\n currentPassword,\n \"owner\"\n );\n\n return updateKeys({\n currentKey,\n keepCurrent,\n keys: [\n {\n owner: PrivateKey.fromLogin(username, newPassword, \"owner\"),\n active: PrivateKey.fromLogin(username, newPassword, \"active\"),\n posting: PrivateKey.fromLogin(username, newPassword, \"posting\"),\n memo_key: PrivateKey.fromLogin(username, newPassword, \"memo\"),\n },\n ],\n });\n },\n ...options,\n });\n}\n","import { PrivateKey } from \"../../../hive-tx\";\nimport {\n useMutation,\n useQuery,\n useQueryClient,\n type UseMutationOptions,\n} from \"@tanstack/react-query\";\nimport { getAccountFullQueryOptions } from \"../queries\";\nimport { FullAccount } from \"../types\";\nimport hs from \"hivesigner\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport { broadcastOperations } from \"@/modules/core/hive-tx\";\n\ntype SignType = \"key\" | \"keychain\" | \"hivesigner\";\n\ninterface CommonPayload {\n accountName: string;\n type: SignType;\n key?: PrivateKey;\n}\n\ntype RevokePostingOptions = Pick<\n UseMutationOptions<unknown, Error, CommonPayload>,\n \"onSuccess\" | \"onError\"\n> & {\n hsCallbackUrl?: string;\n};\n\nexport function useAccountRevokePosting(\n username: string | undefined,\n options: RevokePostingOptions,\n auth?: AuthContextV2\n) {\n const queryClient = useQueryClient();\n\n const { data } = useQuery(getAccountFullQueryOptions(username));\n\n return useMutation({\n mutationKey: [\"accounts\", \"revoke-posting\", data?.name],\n mutationFn: async ({ accountName, type, key }: CommonPayload) => {\n if (!data) {\n throw new Error(\n \"[SDK][Accounts] – cannot revoke posting for anonymous user\"\n );\n }\n\n const posting = JSON.parse(JSON.stringify(data.posting)) as FullAccount[\"posting\"];\n\n posting.account_auths = posting.account_auths.filter(\n ([account]) => account !== accountName\n );\n\n const operationBody = {\n account: data.name,\n posting,\n memo_key: data.memo_key,\n json_metadata: data.json_metadata,\n };\n\n if (type === \"key\" && key) {\n return broadcastOperations([[\"account_update\", operationBody]], key);\n } else if (type === \"keychain\") {\n if (!auth?.adapter?.broadcastWithKeychain) {\n throw new Error(\"[SDK][Accounts] – missing keychain broadcaster\");\n }\n return auth.adapter.broadcastWithKeychain(\n data.name,\n [[\"account_update\", operationBody]],\n \"active\"\n );\n } else {\n if (!options.hsCallbackUrl && process.env.NODE_ENV === \"development\") {\n console.warn(\"[SDK][Accounts] hsCallbackUrl not provided for HiveSigner revoke-posting; user will not be redirected after signing.\");\n }\n return hs.sendOperation(\n [\"account_update\", operationBody],\n options.hsCallbackUrl ? { callback: options.hsCallbackUrl } : {},\n () => {}\n );\n }\n },\n onError: options.onError,\n onSuccess: (resp, payload, ctx) => {\n (options.onSuccess as\n | ((data: unknown, variables: CommonPayload, context: unknown) => unknown)\n | undefined)?.(resp, payload, ctx);\n queryClient.setQueryData<FullAccount>(\n getAccountFullQueryOptions(username).queryKey,\n (data) =>\n ({\n ...data,\n posting: {\n ...data?.posting,\n account_auths:\n data?.posting?.account_auths?.filter(\n ([account]) => account !== payload.accountName\n ) ?? [],\n },\n }) as FullAccount\n );\n },\n });\n}\n","import { CONFIG, getBoundFetch } from \"@/modules/core\";\nimport { PrivateKey } from \"../../../hive-tx\";\nimport {\n useMutation,\n useQuery,\n type UseMutationOptions,\n} from \"@tanstack/react-query\";\nimport hs from \"hivesigner\";\nimport { getAccountFullQueryOptions } from \"../queries\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport { broadcastOperations } from \"@/modules/core/hive-tx\";\n\ntype SignType = \"key\" | \"keychain\" | \"hivesigner\" | \"ecency\";\n\ninterface CommonPayload {\n accountName: string;\n type: SignType;\n key?: PrivateKey;\n email?: string;\n}\n\ntype UpdateRecoveryOptions = Pick<\n UseMutationOptions<unknown, Error, CommonPayload>,\n \"onSuccess\" | \"onError\"\n> & {\n hsCallbackUrl?: string;\n};\n\nexport function useAccountUpdateRecovery(\n username: string | undefined,\n code: string | undefined,\n options: UpdateRecoveryOptions,\n auth?: AuthContextV2\n) {\n const { data } = useQuery(getAccountFullQueryOptions(username));\n\n return useMutation({\n mutationKey: [\"accounts\", \"recovery\", data?.name],\n mutationFn: async ({ accountName, type, key, email }: CommonPayload) => {\n if (!data) {\n throw new Error(\n \"[SDK][Accounts] – cannot change recovery for anonymous user\"\n );\n }\n\n const operationBody = {\n account_to_recover: data.name,\n new_recovery_account: accountName,\n extensions: [] as [],\n };\n\n if (type === \"ecency\") {\n if (!code) {\n throw new Error(\"[SDK][Accounts] – missing access token\");\n }\n const fetchApi = getBoundFetch();\n\n const response = await fetchApi(CONFIG.privateApiHost + \"/private-api/recoveries-add\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n code,\n email,\n publicKeys: [\n ...data.owner.key_auths,\n ...data.active.key_auths,\n ...data.posting.key_auths,\n data.memo_key,\n ],\n }),\n });\n\n // Raw fetch resolves on 4xx/5xx, so guard explicitly — otherwise the\n // caller's onSuccess shows a \"recovery updated\" toast on a failed request.\n // (The missing Content-Type header also made the backend skip JSON parsing.)\n if (!response.ok) {\n throw new Error(`[SDK][Accounts] Failed to add recovery: ${response.status}`);\n }\n\n return response;\n } else if (type === \"key\" && key) {\n return broadcastOperations(\n [[\"change_recovery_account\", operationBody]],\n key\n );\n } else if (type === \"keychain\") {\n if (!auth?.adapter?.broadcastWithKeychain) {\n throw new Error(\"[SDK][Accounts] – missing keychain broadcaster\");\n }\n return auth.adapter.broadcastWithKeychain(data.name, [[\"change_recovery_account\", operationBody]], \"owner\");\n } else {\n if (!options.hsCallbackUrl && process.env.NODE_ENV === \"development\") {\n console.warn(\"[SDK][Accounts] hsCallbackUrl not provided for HiveSigner update-recovery; user will not be redirected after signing.\");\n }\n return hs.sendOperation(\n [\"change_recovery_account\", operationBody],\n options.hsCallbackUrl ? { callback: options.hsCallbackUrl } : {},\n () => {}\n );\n }\n },\n onError: options.onError,\n onSuccess: options.onSuccess,\n });\n}\n","import { PrivateKey, PublicKey } from \"../../../hive-tx\";\nimport {\n useMutation,\n useQuery,\n type UseMutationOptions,\n} from \"@tanstack/react-query\";\nimport { getAccountFullQueryOptions } from \"../queries\";\nimport { buildRevokeKeysOp } from \"./build-revoke-keys-op\";\nimport { broadcastOperations } from \"@/modules/core/hive-tx\";\n\ninterface Payload {\n currentKey: PrivateKey;\n /** Keys to revoke. Accepts a single key or an array. */\n revokingKey: PublicKey | PublicKey[];\n}\n\n/**\n * Revoke one or more keys from an account on the Hive blockchain.\n *\n * When revoking keys that exist only in active/posting authorities,\n * the owner field is omitted from the operation so active-level\n * signing is sufficient.\n */\ntype RevokeKeyOptions = Pick<\n UseMutationOptions<unknown, Error, Payload>,\n \"onSuccess\" | \"onError\"\n>;\n\nexport function useAccountRevokeKey(\n username: string | undefined,\n options?: RevokeKeyOptions\n) {\n const { data: accountData } = useQuery(getAccountFullQueryOptions(username));\n\n return useMutation({\n mutationKey: [\"accounts\", \"revoke-key\", accountData?.name],\n mutationFn: async ({ currentKey, revokingKey }: Payload) => {\n if (!accountData) {\n throw new Error(\n \"[SDK][Revoke key] – cannot update keys for anon user\"\n );\n }\n\n const revokingKeys = Array.isArray(revokingKey) ? revokingKey : [revokingKey];\n const op = buildRevokeKeysOp(accountData, revokingKeys);\n\n return broadcastOperations([[\"account_update\", op]], currentKey);\n },\n ...options,\n });\n}\n","import { QueryKeys } from \"@/modules/core\";\nimport {\n AccountFollowStats,\n FullAccount,\n} from \"../types\";\nimport { parseProfileMetadata } from \"@/modules/accounts\";\nimport { queryOptions } from \"@tanstack/react-query\";\nimport { callRPC } from \"@/modules/core/hive-tx\";\n\n/** The raw `condenser_api.get_accounts` row — every FullAccount field except the three\n * this query derives separately (follow_stats + reputation from bridge, profile parsed). */\ntype RawAccount = Omit<FullAccount, \"follow_stats\" | \"reputation\" | \"profile\">;\n\n/** Minimal shape read from `bridge.get_profile` (hivemind social profile): it carries\n * the reputation score, the follower/following counts and hivemind's parsed\n * (normalized) profile — the latter is used only to cross-validate the chain row. */\ninterface BridgeProfile {\n reputation?: number;\n stats?: { followers?: number; following?: number };\n metadata?: { profile?: Record<string, unknown> };\n}\n\n/** True when the chain row carries no account metadata at all. Legitimate for\n * accounts that never set a profile — but combined with a populated hivemind\n * profile it identifies a node serving stripped account rows. */\nfunction isMetadataStripped(account: RawAccount): boolean {\n return !account.posting_json_metadata && !account.json_metadata;\n}\n\n/** True when a hivemind `metadata.profile` object carries at least one real\n * value. Hivemind emits its fixed profile keys with empty strings for\n * accounts without a profile, so key presence alone proves nothing. */\nfunction hasProfileValues(profile?: Record<string, unknown> | null): boolean {\n if (!profile) return false;\n return Object.values(profile).some((value) =>\n typeof value === \"string\" ? value.length > 0 : value != null\n );\n}\n\nexport function getAccountFullQueryOptions(username: string | undefined) {\n return queryOptions({\n queryKey: QueryKeys.accounts.full(username),\n queryFn: async ({ signal }) => {\n if (!username) {\n return null;\n }\n\n // Fetch the chain account (balances/keys/vesting) and the hivemind profile in\n // parallel — both only need the username. bridge.get_profile carries BOTH the\n // follower/following counts and the reputation score, so it replaces the old\n // second-layer condenser_api.get_follow_count RPC *and* the reputation-api REST\n // call: condenser_api.get_accounts no longer returns a usable reputation (it is 0\n // since the hardfork), and there is no reason to make two extra round-trips for\n // data one profile object already carries.\n const [response, bridgeProfile] = await Promise.all([\n callRPC<RawAccount[]>(\n \"condenser_api.get_accounts\",\n [[username]],\n undefined,\n undefined,\n signal,\n // A correct node always answers get_accounts with an array — a null\n // result in a well-formed envelope is a node fault (observed in the\n // wild), so fail over to the next node instead of misreading it as\n // \"account does not exist\".\n (rows) => Array.isArray(rows)\n ),\n callRPC<BridgeProfile>(\n \"bridge.get_profile\",\n { account: username },\n undefined,\n undefined,\n signal\n ).catch((e): BridgeProfile | null => {\n // A caller cancel (aborted signal) must propagate — only genuine RPC/transport\n // failures degrade to reputation 0 / no follow_stats.\n if (signal?.aborted) throw e;\n return null;\n })\n ]);\n if (!response?.[0]) {\n // The account does not exist (e.g. not yet finalized on-chain during\n // signup). Treat absence as a recoverable null instead of throwing, so\n // consumers (useQuery hooks and fetchQuery callers) surface it as empty\n // data rather than an unhandled rejection / error-boundary crash.\n return null;\n }\n\n let chainAccount = response[0];\n\n // Cross-validate the chain row against the hivemind profile fetched in\n // the same query. Some public nodes serve account rows with BOTH\n // metadata fields stripped to \"\" (observed in the wild) while their own\n // hivemind still returns the real profile — and a merge base built from\n // such a row wipes the user's profile on the next partial\n // account_update2. When the row claims \"no metadata\" but hivemind\n // disagrees, re-read once (failover may pick another node) and otherwise\n // fail the query: an error here is recoverable, a poisoned cache entry\n // is not.\n if (\n isMetadataStripped(chainAccount) &&\n hasProfileValues(bridgeProfile?.metadata?.profile)\n ) {\n // The re-read carries a payload validator: a stripped row is treated\n // as a node fault, so the failover walk moves on to other nodes (and\n // repeat offenders earn a per-API health cooldown) instead of asking\n // the same lying node twice.\n const reread = await callRPC<RawAccount[]>(\n \"condenser_api.get_accounts\",\n [[username]],\n undefined,\n undefined,\n signal,\n (rows) =>\n Array.isArray(rows) &&\n (!rows[0] || !isMetadataStripped(rows[0] as RawAccount))\n );\n if (reread[0] && !isMetadataStripped(reread[0])) {\n chainAccount = reread[0];\n } else {\n throw new Error(\n `[SDK][Accounts] – inconsistent account row for ${username}: empty json metadata while hivemind profile is populated`\n );\n }\n }\n\n const profile = parseProfileMetadata(chainAccount.posting_json_metadata);\n\n // bridge.get_profile.stats → follower/following counts; `reputation` is the\n // computed score (e.g. 78.29). accountReputation() floors an in-range score, so\n // it yields the same value the reputation-api used to return. Both degrade to a\n // safe default if the profile call failed.\n const stats = bridgeProfile?.stats;\n const follow_stats: AccountFollowStats | undefined = stats\n ? {\n account: chainAccount.name,\n follower_count: stats.followers ?? 0,\n following_count: stats.following ?? 0\n }\n : undefined;\n const reputationValue: number = bridgeProfile?.reputation ?? 0;\n\n return {\n name: chainAccount.name,\n owner: chainAccount.owner,\n active: chainAccount.active,\n posting: chainAccount.posting,\n memo_key: chainAccount.memo_key,\n post_count: chainAccount.post_count,\n created: chainAccount.created,\n posting_json_metadata: chainAccount.posting_json_metadata,\n last_vote_time: chainAccount.last_vote_time,\n last_post: chainAccount.last_post,\n json_metadata: chainAccount.json_metadata,\n reward_hive_balance: chainAccount.reward_hive_balance,\n reward_hbd_balance: chainAccount.reward_hbd_balance,\n reward_vesting_hive: chainAccount.reward_vesting_hive,\n reward_vesting_balance: chainAccount.reward_vesting_balance,\n balance: chainAccount.balance,\n hbd_balance: chainAccount.hbd_balance,\n savings_balance: chainAccount.savings_balance,\n savings_hbd_balance: chainAccount.savings_hbd_balance,\n savings_hbd_last_interest_payment:\n chainAccount.savings_hbd_last_interest_payment,\n savings_hbd_seconds_last_update:\n chainAccount.savings_hbd_seconds_last_update,\n savings_hbd_seconds: chainAccount.savings_hbd_seconds,\n next_vesting_withdrawal: chainAccount.next_vesting_withdrawal,\n pending_claimed_accounts: chainAccount.pending_claimed_accounts,\n vesting_shares: chainAccount.vesting_shares,\n delegated_vesting_shares: chainAccount.delegated_vesting_shares,\n received_vesting_shares: chainAccount.received_vesting_shares,\n vesting_withdraw_rate: chainAccount.vesting_withdraw_rate,\n to_withdraw: chainAccount.to_withdraw,\n withdrawn: chainAccount.withdrawn,\n // int64 counters. Condenser serves them unquoted, so normalize here in case a\n // node quotes them, but leave an omitted counter undefined: absent is unknown,\n // and coercing it to 0 would understate every ratio derived from it.\n curation_rewards:\n chainAccount.curation_rewards === undefined\n ? undefined\n : Number(chainAccount.curation_rewards),\n posting_rewards:\n chainAccount.posting_rewards === undefined\n ? undefined\n : Number(chainAccount.posting_rewards),\n witness_votes: chainAccount.witness_votes,\n proxy: chainAccount.proxy,\n recovery_account: chainAccount.recovery_account,\n proxied_vsf_votes: chainAccount.proxied_vsf_votes,\n voting_manabar: chainAccount.voting_manabar,\n voting_power: chainAccount.voting_power,\n downvote_manabar: chainAccount.downvote_manabar,\n follow_stats,\n reputation: reputationValue,\n profile,\n } satisfies FullAccount;\n },\n enabled: !!username,\n staleTime: 60000,\n });\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/modules/accounts/mutations/use-account-update.ts","../../src/modules/accounts/mutations/use-account-relations-update.ts","../../src/modules/accounts/mutations/use-account-update-key-auths.ts","../../src/modules/accounts/mutations/use-account-update-password.ts","../../src/modules/accounts/mutations/use-account-revoke-posting.ts","../../src/modules/accounts/mutations/use-account-update-recovery.ts","../../src/modules/accounts/mutations/use-account-revoke-key.ts","../../src/modules/accounts/queries/get-account-full-query-options.ts"],"names":["useAccountUpdate","username","auth","broadcastMode","queryClient","useQueryClient","data","useQuery","getAccountFullQueryOptions","useBroadcastMutation","payload","account","pickRicherMetadataSnapshot","buildPostingJsonMetadata","_data","variables","obj","buildProfileMetadata","extractAccountProfile","invalidateAfterBroadcast","QueryKeys","useAccountRelationsUpdate","reference","target","onSuccess","onError","useMutation","kind","relationsQuery","getRelationshipBetweenAccountsQueryOptions","getQueryClient","actualRelation","broadcastJson","dedupeAndSortKeyAuths","existing","additions","merged","key","weight","keyA","keyB","useAccountUpdateKeyAuths","options","accountData","keys","keepCurrent","currentKey","keysToRevoke","keysToRevokeByAuthority","prepareAuth","keyName","allKeysToRevoke","existingKeys","values","i","broadcastOperations","useAccountUpdatePassword","updateKeys","newPassword","currentPassword","PrivateKey","useAccountRevokePosting","accountName","type","posting","operationBody","hs","resp","ctx","useAccountUpdateRecovery","code","email","response","getBoundFetch","CONFIG","useAccountRevokeKey","revokingKey","revokingKeys","op","buildRevokeKeysOp","isMetadataStripped","hasProfileValues","profile","value","queryOptions","signal","bridgeProfile","callRPC","rows","e","chainAccount","reread","parseProfileMetadata","stats","follow_stats","reputationValue"],"mappings":"wpBAgEO,SAASA,EAAAA,CACdC,EACAC,GAAAA,CACAC,CAAAA,CACA,CACA,IAAMC,CAAAA,CAAcC,gBAAe,CAE7B,CAAE,KAAAC,CAAK,CAAA,CAAIC,SAASC,CAAAA,CAA2BP,CAAQ,CAAC,CAAA,CAE9D,OAAOQ,EACL,CAAC,UAAA,CAAY,QAAQ,CAAA,CACrBR,CAAAA,CACCS,GAA8B,CAQ7B,IAAMC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adcastMutation, invalidateAfterBroadcast, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport { useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport { getAccountFullQueryOptions } from \"../queries\";\nimport { AccountProfile, FullAccount } from \"../types\";\nimport {\n buildPostingJsonMetadata,\n buildProfileMetadata,\n extractAccountProfile,\n pickRicherMetadataSnapshot,\n} from \"../utils/profile-metadata\";\n\ninterface Payload {\n profile: Partial<AccountProfile>;\n tokens: AccountProfile[\"tokens\"];\n}\n\n/**\n * React Query mutation hook for updating account profile metadata.\n *\n * This mutation broadcasts an account_update2 operation to update the user's\n * profile information (name, about, location, avatar, cover image, etc.).\n *\n * @param username - The username to update (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 * **Profile Fields:**\n * - name: Display name\n * - about: Bio/description\n * - location: Location\n * - website: Website URL\n * - profile_image: Avatar URL\n * - cover_image: Cover/banner URL\n * - tokens: Social tokens (Twitter, Facebook, etc.)\n * - version: Profile metadata version (auto-set to 2)\n *\n * **Authentication:**\n * - Uses posting authority (account_update2 operation)\n * - Supports all auth methods via platform adapter\n *\n * **Post-Broadcast Actions:**\n * - Optimistically updates account cache with new profile data\n * - Invalidates account cache to refetch from blockchain\n *\n * @example\n * ```typescript\n * const updateProfile = useAccountUpdate(username, {\n * adapter: myAdapter,\n * });\n *\n * // Update profile\n * updateProfile.mutate({\n * profile: {\n * name: \"John Doe\",\n * about: \"Hive enthusiast\",\n * profile_image: \"https://...\",\n * }\n * });\n * ```\n */\nexport function useAccountUpdate(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n const queryClient = useQueryClient();\n\n const { data } = useQuery(getAccountFullQueryOptions(username));\n\n return useBroadcastMutation(\n [\"accounts\", \"update\"],\n username,\n (payload: Partial<Payload>) => {\n // Prefer the freshest cached snapshot. onMutate has just refetched the\n // account from chain, so this usually reflects the current on-chain\n // profile rather than a possibly stale/unloaded render-time value. If\n // the cache instead holds a metadata-poorer row than the render-time\n // snapshot (e.g. a node served a stripped account row), the richer\n // snapshot wins — a partial update must never shrink the profile while\n // any snapshot still knows the full one.\n const account = pickRicherMetadataSnapshot(\n queryClient.getQueryData<FullAccount>(\n getAccountFullQueryOptions(username).queryKey\n ),\n data\n );\n\n if (!account) {\n throw new Error(\"[SDK][Accounts] – cannot update not existing account\");\n }\n\n return [\n [\n \"account_update2\",\n {\n account: username!,\n json_metadata: \"\",\n extensions: [] as [],\n // Read-modify-write the FULL on-chain metadata: deep-merge the\n // profile and preserve any non-`profile` top-level keys, so a\n // partial update never wipes unrelated fields.\n posting_json_metadata: buildPostingJsonMetadata({\n existingPostingJsonMetadata: account.posting_json_metadata,\n profile: payload.profile,\n tokens: payload.tokens,\n }),\n },\n ],\n ];\n },\n async (_data: unknown, variables: Partial<Payload>) => {\n // Optimistic cache update\n queryClient.setQueryData<FullAccount>(\n getAccountFullQueryOptions(username).queryKey,\n (data) => {\n if (!data) {\n return data;\n }\n\n const obj = JSON.parse(JSON.stringify(data)) as FullAccount;\n obj.profile = buildProfileMetadata({\n existingProfile: extractAccountProfile(data),\n profile: variables.profile,\n tokens: variables.tokens,\n });\n\n return obj;\n }\n );\n\n // Invalidate cache to refetch from blockchain\n await invalidateAfterBroadcast(auth?.adapter, broadcastMode, [\n QueryKeys.accounts.full(username)\n ]);\n },\n auth,\n undefined,\n {\n broadcastMode,\n // Before merging, force a fresh on-chain read so a stale or unloaded\n // cached snapshot cannot cause a partial update (e.g. pinning a post,\n // which sets only `pinned`) to overwrite the existing profile with a\n // near-empty object. Best-effort: if the refetch fails, the op builder\n // falls back to the cached snapshot.\n onMutate: async () => {\n if (!username) {\n return;\n }\n try {\n await queryClient.fetchQuery({\n ...getAccountFullQueryOptions(username),\n staleTime: 0,\n });\n } catch {\n // Ignore – fall back to whatever is already cached.\n }\n },\n }\n );\n}\n","import { broadcastJson, getQueryClient, QueryKeys } from \"@/modules/core\";\nimport type { AuthContext } from \"@/modules/core/types\";\nimport { useMutation } from \"@tanstack/react-query\";\nimport { getRelationshipBetweenAccountsQueryOptions, getAccountFullQueryOptions } from \"../queries\";\nimport { AccountRelationship } from \"../types\";\n\ntype Kind = \"toggle-ignore\" | \"toggle-follow\";\n\nexport function useAccountRelationsUpdate(\n reference: string | undefined,\n target: string | undefined,\n auth: AuthContext | undefined,\n onSuccess: (data: Partial<AccountRelationship> | undefined) => void,\n onError: (e: Error) => void\n) {\n return useMutation({\n mutationKey: [\"accounts\", \"relation\", \"update\", reference, target],\n mutationFn: async (kind: Kind) => {\n const relationsQuery = getRelationshipBetweenAccountsQueryOptions(\n reference!,\n target!\n );\n await getQueryClient().prefetchQuery(relationsQuery);\n const actualRelation = getQueryClient().getQueryData(\n relationsQuery.queryKey\n );\n\n await broadcastJson(\n reference,\n \"follow\",\n [\n \"follow\",\n {\n follower: reference,\n following: target,\n what: [\n ...(kind === \"toggle-ignore\" && !actualRelation?.ignores\n ? [\"ignore\"]\n : []),\n ...(kind === \"toggle-follow\" && !actualRelation?.follows\n ? [\"blog\"]\n : []),\n ],\n },\n ],\n auth\n );\n\n return {\n ...actualRelation,\n ignores:\n kind === \"toggle-ignore\"\n ? !actualRelation?.ignores\n : actualRelation?.ignores,\n follows:\n kind === \"toggle-follow\"\n ? !actualRelation?.follows\n : actualRelation?.follows,\n } satisfies Partial<AccountRelationship>;\n },\n onError,\n onSuccess(data) {\n onSuccess(data);\n\n getQueryClient().setQueryData(\n QueryKeys.accounts.relations(reference!, target!),\n data\n );\n\n // Invalidate account query to refetch follow stats (follower_count, following_count)\n // This is needed because profile pages use staleTime: Infinity for performance\n if (target) {\n getQueryClient().invalidateQueries(\n getAccountFullQueryOptions(target)\n );\n }\n },\n });\n}\n","import { PrivateKey } from \"../../../hive-tx\";\nimport type { Authority } from \"../../../hive-tx\";\nimport {\n useMutation,\n useQuery,\n type UseMutationOptions,\n} from \"@tanstack/react-query\";\nimport { getAccountFullQueryOptions } from \"../queries\";\nimport { broadcastOperations } from \"@/modules/core/hive-tx\";\n\nexport interface Keys {\n owner: PrivateKey;\n active: PrivateKey;\n posting: PrivateKey;\n memo_key: PrivateKey;\n}\n\ninterface Payload {\n keepCurrent?: boolean;\n currentKey: PrivateKey;\n keys: Keys[];\n keysToRevoke?: string[]; // Deprecated: will be treated as revoking from all authorities\n keysToRevokeByAuthority?: Partial<Record<keyof Keys, string[]>>; // Authority-specific revocation\n}\n\nexport function dedupeAndSortKeyAuths(\n existing: Authority[\"key_auths\"],\n additions: [string, number][]\n): Authority[\"key_auths\"] {\n const merged = new Map<string, number>();\n\n existing.forEach(([key, weight]) => {\n merged.set(key.toString(), weight);\n });\n\n additions.forEach(([key, weight]) => {\n merged.set(key.toString(), weight);\n });\n\n return Array.from(merged.entries())\n .sort(([keyA], [keyB]) => keyA.localeCompare(keyB))\n .map(([key, weight]) => [key, weight] as [string, number]);\n}\n\ntype UpdateKeyAuthsOptions = Pick<\n UseMutationOptions<unknown, Error, Payload>,\n \"onSuccess\" | \"onError\"\n>;\n\nexport function useAccountUpdateKeyAuths(\n username: string,\n options?: UpdateKeyAuthsOptions\n) {\n const { data: accountData } = useQuery(getAccountFullQueryOptions(username));\n\n return useMutation({\n mutationKey: [\"accounts\", \"keys-update\", username],\n mutationFn: async ({\n keys,\n keepCurrent = false,\n currentKey,\n keysToRevoke = [],\n keysToRevokeByAuthority = {}\n }: Payload) => {\n if (keys.length === 0) {\n throw new Error(\n \"[SDK][Update password] – no new keys provided\"\n );\n }\n\n if (!accountData) {\n throw new Error(\n \"[SDK][Update password] – cannot update keys for anon user\"\n );\n }\n\n const prepareAuth = (keyName: keyof Keys) => {\n const auth: Authority = JSON.parse(JSON.stringify(accountData[keyName]));\n\n // Get keys to revoke for this specific authority\n const keysToRevokeForAuthority = keysToRevokeByAuthority[keyName] || [];\n // Fallback to global keysToRevoke for backwards compatibility\n const allKeysToRevoke = [\n ...keysToRevokeForAuthority,\n ...(keysToRevokeByAuthority[keyName] === undefined ? keysToRevoke : [])\n ];\n\n // Filter out keys to revoke from existing keys (authority-specific)\n const existingKeys = keepCurrent\n ? auth.key_auths.filter(([key]) => !allKeysToRevoke.includes(key.toString()))\n : [];\n\n auth.key_auths = dedupeAndSortKeyAuths(\n existingKeys,\n keys.map(\n (values, i) =>\n [values[keyName].createPublic().toString(), i + 1] as [\n string,\n number,\n ]\n )\n );\n\n return auth;\n };\n\n return broadcastOperations(\n [[\"account_update\", {\n account: username,\n json_metadata: accountData.json_metadata,\n owner: prepareAuth(\"owner\"),\n active: prepareAuth(\"active\"),\n posting: prepareAuth(\"posting\"),\n // Always use new memo key when adding new keys\n memo_key: keys[0].memo_key.createPublic().toString(),\n }]],\n currentKey\n );\n },\n ...options,\n });\n}\n","import { PrivateKey } from \"../../../hive-tx\";\nimport {\n useMutation,\n useQuery,\n type UseMutationOptions,\n} from \"@tanstack/react-query\";\nimport { getAccountFullQueryOptions } from \"../queries\";\nimport { useAccountUpdateKeyAuths } from \"./use-account-update-key-auths\";\n\ninterface Payload {\n newPassword: string;\n currentPassword: string;\n keepCurrent?: boolean;\n}\n\n/**\n * Only native Hive and custom passwords could be updated here\n * Seed based password cannot be updated here, it will be in an account always for now\n */\ntype UpdatePasswordOptions = Pick<\n UseMutationOptions<unknown, Error, Payload>,\n \"onSuccess\" | \"onError\"\n>;\n\nexport function useAccountUpdatePassword(\n username: string,\n options?: UpdatePasswordOptions\n) {\n const { data: accountData } = useQuery(getAccountFullQueryOptions(username));\n\n const { mutateAsync: updateKeys } = useAccountUpdateKeyAuths(username);\n\n return useMutation({\n mutationKey: [\"accounts\", \"password-update\", username],\n mutationFn: async ({\n newPassword,\n currentPassword,\n keepCurrent,\n }: Payload) => {\n if (!accountData) {\n throw new Error(\n \"[SDK][Update password] – cannot update password for anon user\"\n );\n }\n const currentKey = PrivateKey.fromLogin(\n username,\n currentPassword,\n \"owner\"\n );\n\n return updateKeys({\n currentKey,\n keepCurrent,\n keys: [\n {\n owner: PrivateKey.fromLogin(username, newPassword, \"owner\"),\n active: PrivateKey.fromLogin(username, newPassword, \"active\"),\n posting: PrivateKey.fromLogin(username, newPassword, \"posting\"),\n memo_key: PrivateKey.fromLogin(username, newPassword, \"memo\"),\n },\n ],\n });\n },\n ...options,\n });\n}\n","import { PrivateKey } from \"../../../hive-tx\";\nimport {\n useMutation,\n useQuery,\n useQueryClient,\n type UseMutationOptions,\n} from \"@tanstack/react-query\";\nimport { getAccountFullQueryOptions } from \"../queries\";\nimport { FullAccount } from \"../types\";\nimport hs from \"hivesigner\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport { broadcastOperations } from \"@/modules/core/hive-tx\";\n\ntype SignType = \"key\" | \"keychain\" | \"hivesigner\";\n\ninterface CommonPayload {\n accountName: string;\n type: SignType;\n key?: PrivateKey;\n}\n\ntype RevokePostingOptions = Pick<\n UseMutationOptions<unknown, Error, CommonPayload>,\n \"onSuccess\" | \"onError\"\n> & {\n hsCallbackUrl?: string;\n};\n\nexport function useAccountRevokePosting(\n username: string | undefined,\n options: RevokePostingOptions,\n auth?: AuthContextV2\n) {\n const queryClient = useQueryClient();\n\n const { data } = useQuery(getAccountFullQueryOptions(username));\n\n return useMutation({\n mutationKey: [\"accounts\", \"revoke-posting\", data?.name],\n mutationFn: async ({ accountName, type, key }: CommonPayload) => {\n if (!data) {\n throw new Error(\n \"[SDK][Accounts] – cannot revoke posting for anonymous user\"\n );\n }\n\n const posting = JSON.parse(JSON.stringify(data.posting)) as FullAccount[\"posting\"];\n\n posting.account_auths = posting.account_auths.filter(\n ([account]) => account !== accountName\n );\n\n const operationBody = {\n account: data.name,\n posting,\n memo_key: data.memo_key,\n json_metadata: data.json_metadata,\n };\n\n if (type === \"key\" && key) {\n return broadcastOperations([[\"account_update\", operationBody]], key);\n } else if (type === \"keychain\") {\n if (!auth?.adapter?.broadcastWithKeychain) {\n throw new Error(\"[SDK][Accounts] – missing keychain broadcaster\");\n }\n return auth.adapter.broadcastWithKeychain(\n data.name,\n [[\"account_update\", operationBody]],\n \"active\"\n );\n } else {\n if (!options.hsCallbackUrl && process.env.NODE_ENV === \"development\") {\n console.warn(\"[SDK][Accounts] hsCallbackUrl not provided for HiveSigner revoke-posting; user will not be redirected after signing.\");\n }\n return hs.sendOperation(\n [\"account_update\", operationBody],\n options.hsCallbackUrl ? { callback: options.hsCallbackUrl } : {},\n () => {}\n );\n }\n },\n onError: options.onError,\n onSuccess: (resp, payload, ctx) => {\n (options.onSuccess as\n | ((data: unknown, variables: CommonPayload, context: unknown) => unknown)\n | undefined)?.(resp, payload, ctx);\n queryClient.setQueryData<FullAccount>(\n getAccountFullQueryOptions(username).queryKey,\n (data) =>\n ({\n ...data,\n posting: {\n ...data?.posting,\n account_auths:\n data?.posting?.account_auths?.filter(\n ([account]) => account !== payload.accountName\n ) ?? [],\n },\n }) as FullAccount\n );\n },\n });\n}\n","import { CONFIG, getBoundFetch } from \"@/modules/core\";\nimport { PrivateKey } from \"../../../hive-tx\";\nimport {\n useMutation,\n useQuery,\n type UseMutationOptions,\n} from \"@tanstack/react-query\";\nimport hs from \"hivesigner\";\nimport { getAccountFullQueryOptions } from \"../queries\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\nimport { broadcastOperations } from \"@/modules/core/hive-tx\";\n\ntype SignType = \"key\" | \"keychain\" | \"hivesigner\" | \"ecency\";\n\ninterface CommonPayload {\n accountName: string;\n type: SignType;\n key?: PrivateKey;\n email?: string;\n}\n\ntype UpdateRecoveryOptions = Pick<\n UseMutationOptions<unknown, Error, CommonPayload>,\n \"onSuccess\" | \"onError\"\n> & {\n hsCallbackUrl?: string;\n};\n\nexport function useAccountUpdateRecovery(\n username: string | undefined,\n code: string | undefined,\n options: UpdateRecoveryOptions,\n auth?: AuthContextV2\n) {\n const { data } = useQuery(getAccountFullQueryOptions(username));\n\n return useMutation({\n mutationKey: [\"accounts\", \"recovery\", data?.name],\n mutationFn: async ({ accountName, type, key, email }: CommonPayload) => {\n if (!data) {\n throw new Error(\n \"[SDK][Accounts] – cannot change recovery for anonymous user\"\n );\n }\n\n const operationBody = {\n account_to_recover: data.name,\n new_recovery_account: accountName,\n extensions: [] as [],\n };\n\n if (type === \"ecency\") {\n if (!code) {\n throw new Error(\"[SDK][Accounts] – missing access token\");\n }\n const fetchApi = getBoundFetch();\n\n const response = await fetchApi(CONFIG.privateApiHost + \"/private-api/recoveries-add\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n code,\n email,\n publicKeys: [\n ...data.owner.key_auths,\n ...data.active.key_auths,\n ...data.posting.key_auths,\n data.memo_key,\n ],\n }),\n });\n\n // Raw fetch resolves on 4xx/5xx, so guard explicitly — otherwise the\n // caller's onSuccess shows a \"recovery updated\" toast on a failed request.\n // (The missing Content-Type header also made the backend skip JSON parsing.)\n if (!response.ok) {\n throw new Error(`[SDK][Accounts] Failed to add recovery: ${response.status}`);\n }\n\n return response;\n } else if (type === \"key\" && key) {\n return broadcastOperations(\n [[\"change_recovery_account\", operationBody]],\n key\n );\n } else if (type === \"keychain\") {\n if (!auth?.adapter?.broadcastWithKeychain) {\n throw new Error(\"[SDK][Accounts] – missing keychain broadcaster\");\n }\n return auth.adapter.broadcastWithKeychain(data.name, [[\"change_recovery_account\", operationBody]], \"owner\");\n } else {\n if (!options.hsCallbackUrl && process.env.NODE_ENV === \"development\") {\n console.warn(\"[SDK][Accounts] hsCallbackUrl not provided for HiveSigner update-recovery; user will not be redirected after signing.\");\n }\n return hs.sendOperation(\n [\"change_recovery_account\", operationBody],\n options.hsCallbackUrl ? { callback: options.hsCallbackUrl } : {},\n () => {}\n );\n }\n },\n onError: options.onError,\n onSuccess: options.onSuccess,\n });\n}\n","import { PrivateKey, PublicKey } from \"../../../hive-tx\";\nimport {\n useMutation,\n useQuery,\n type UseMutationOptions,\n} from \"@tanstack/react-query\";\nimport { getAccountFullQueryOptions } from \"../queries\";\nimport { buildRevokeKeysOp } from \"./build-revoke-keys-op\";\nimport { broadcastOperations } from \"@/modules/core/hive-tx\";\n\ninterface Payload {\n currentKey: PrivateKey;\n /** Keys to revoke. Accepts a single key or an array. */\n revokingKey: PublicKey | PublicKey[];\n}\n\n/**\n * Revoke one or more keys from an account on the Hive blockchain.\n *\n * When revoking keys that exist only in active/posting authorities,\n * the owner field is omitted from the operation so active-level\n * signing is sufficient.\n */\ntype RevokeKeyOptions = Pick<\n UseMutationOptions<unknown, Error, Payload>,\n \"onSuccess\" | \"onError\"\n>;\n\nexport function useAccountRevokeKey(\n username: string | undefined,\n options?: RevokeKeyOptions\n) {\n const { data: accountData } = useQuery(getAccountFullQueryOptions(username));\n\n return useMutation({\n mutationKey: [\"accounts\", \"revoke-key\", accountData?.name],\n mutationFn: async ({ currentKey, revokingKey }: Payload) => {\n if (!accountData) {\n throw new Error(\n \"[SDK][Revoke key] – cannot update keys for anon user\"\n );\n }\n\n const revokingKeys = Array.isArray(revokingKey) ? revokingKey : [revokingKey];\n const op = buildRevokeKeysOp(accountData, revokingKeys);\n\n return broadcastOperations([[\"account_update\", op]], currentKey);\n },\n ...options,\n });\n}\n","import { QueryKeys } from \"@/modules/core\";\nimport {\n AccountFollowStats,\n FullAccount,\n} from \"../types\";\nimport { parseProfileMetadata } from \"@/modules/accounts\";\nimport { queryOptions } from \"@tanstack/react-query\";\nimport { callRPC } from \"@/modules/core/hive-tx\";\n\n/** The raw `condenser_api.get_accounts` row — every FullAccount field except the three\n * this query derives separately (follow_stats + reputation from bridge, profile parsed). */\ntype RawAccount = Omit<FullAccount, \"follow_stats\" | \"reputation\" | \"profile\">;\n\n/** Minimal shape read from `bridge.get_profile` (hivemind social profile): it carries\n * the reputation score, the follower/following counts and hivemind's parsed\n * (normalized) profile — the latter is used only to cross-validate the chain row. */\ninterface BridgeProfile {\n reputation?: number;\n stats?: { followers?: number; following?: number };\n metadata?: { profile?: Record<string, unknown> };\n}\n\n/** True when the chain row carries no account metadata at all. Legitimate for\n * accounts that never set a profile — but combined with a populated hivemind\n * profile it identifies a node serving stripped account rows. */\nfunction isMetadataStripped(account: RawAccount): boolean {\n return !account.posting_json_metadata && !account.json_metadata;\n}\n\n/** True when a hivemind `metadata.profile` object carries at least one real\n * value. Hivemind emits its fixed profile keys with empty strings for\n * accounts without a profile, so key presence alone proves nothing. */\nfunction hasProfileValues(profile?: Record<string, unknown> | null): boolean {\n if (!profile) return false;\n return Object.values(profile).some((value) =>\n typeof value === \"string\" ? value.length > 0 : value != null\n );\n}\n\nexport function getAccountFullQueryOptions(username: string | undefined) {\n return queryOptions({\n queryKey: QueryKeys.accounts.full(username),\n queryFn: async ({ signal }) => {\n if (!username) {\n return null;\n }\n\n // Fetch the chain account (balances/keys/vesting) and the hivemind profile in\n // parallel — both only need the username. bridge.get_profile carries BOTH the\n // follower/following counts and the reputation score, so it replaces the old\n // second-layer condenser_api.get_follow_count RPC *and* the reputation-api REST\n // call: condenser_api.get_accounts no longer returns a usable reputation (it is 0\n // since the hardfork), and there is no reason to make two extra round-trips for\n // data one profile object already carries.\n const [response, bridgeProfile] = await Promise.all([\n callRPC<RawAccount[]>(\n \"condenser_api.get_accounts\",\n [[username]],\n undefined,\n undefined,\n signal,\n // A correct node always answers get_accounts with an array — a null\n // result in a well-formed envelope is a node fault (observed in the\n // wild), so fail over to the next node instead of misreading it as\n // \"account does not exist\".\n (rows) => Array.isArray(rows)\n ),\n callRPC<BridgeProfile>(\n \"bridge.get_profile\",\n { account: username },\n undefined,\n undefined,\n signal\n ).catch((e): BridgeProfile | null => {\n // A caller cancel (aborted signal) must propagate — only genuine RPC/transport\n // failures degrade to reputation 0 / no follow_stats.\n if (signal?.aborted) throw e;\n return null;\n })\n ]);\n if (!response?.[0]) {\n // The account does not exist (e.g. not yet finalized on-chain during\n // signup). Treat absence as a recoverable null instead of throwing, so\n // consumers (useQuery hooks and fetchQuery callers) surface it as empty\n // data rather than an unhandled rejection / error-boundary crash.\n return null;\n }\n\n let chainAccount = response[0];\n\n // Cross-validate the chain row against the hivemind profile fetched in\n // the same query. Some public nodes serve account rows with BOTH\n // metadata fields stripped to \"\" (observed in the wild) while their own\n // hivemind still returns the real profile — and a merge base built from\n // such a row wipes the user's profile on the next partial\n // account_update2. When the row claims \"no metadata\" but hivemind\n // disagrees, re-read once (failover may pick another node) and otherwise\n // fail the query: an error here is recoverable, a poisoned cache entry\n // is not.\n if (\n isMetadataStripped(chainAccount) &&\n hasProfileValues(bridgeProfile?.metadata?.profile)\n ) {\n // The re-read carries a payload validator: a stripped row is treated\n // as a node fault, so the failover walk moves on to other nodes (and\n // repeat offenders earn a per-API health cooldown) instead of asking\n // the same lying node twice.\n const reread = await callRPC<RawAccount[]>(\n \"condenser_api.get_accounts\",\n [[username]],\n undefined,\n undefined,\n signal,\n (rows) =>\n Array.isArray(rows) &&\n (!rows[0] || !isMetadataStripped(rows[0] as RawAccount))\n );\n if (reread[0] && !isMetadataStripped(reread[0])) {\n chainAccount = reread[0];\n } else {\n throw new Error(\n `[SDK][Accounts] – inconsistent account row for ${username}: empty json metadata while hivemind profile is populated`\n );\n }\n }\n\n const profile = parseProfileMetadata(chainAccount.posting_json_metadata);\n\n // bridge.get_profile.stats → follower/following counts; `reputation` is the\n // computed score (e.g. 78.29). accountReputation() floors an in-range score, so\n // it yields the same value the reputation-api used to return. Both degrade to a\n // safe default if the profile call failed.\n const stats = bridgeProfile?.stats;\n const follow_stats: AccountFollowStats | undefined = stats\n ? {\n account: chainAccount.name,\n follower_count: stats.followers ?? 0,\n following_count: stats.following ?? 0\n }\n : undefined;\n const reputationValue: number = bridgeProfile?.reputation ?? 0;\n\n return {\n name: chainAccount.name,\n owner: chainAccount.owner,\n active: chainAccount.active,\n posting: chainAccount.posting,\n memo_key: chainAccount.memo_key,\n post_count: chainAccount.post_count,\n created: chainAccount.created,\n posting_json_metadata: chainAccount.posting_json_metadata,\n last_vote_time: chainAccount.last_vote_time,\n last_post: chainAccount.last_post,\n json_metadata: chainAccount.json_metadata,\n reward_hive_balance: chainAccount.reward_hive_balance,\n reward_hbd_balance: chainAccount.reward_hbd_balance,\n reward_vesting_hive: chainAccount.reward_vesting_hive,\n reward_vesting_balance: chainAccount.reward_vesting_balance,\n balance: chainAccount.balance,\n hbd_balance: chainAccount.hbd_balance,\n savings_balance: chainAccount.savings_balance,\n savings_hbd_balance: chainAccount.savings_hbd_balance,\n savings_hbd_last_interest_payment:\n chainAccount.savings_hbd_last_interest_payment,\n savings_hbd_seconds_last_update:\n chainAccount.savings_hbd_seconds_last_update,\n savings_hbd_seconds: chainAccount.savings_hbd_seconds,\n next_vesting_withdrawal: chainAccount.next_vesting_withdrawal,\n pending_claimed_accounts: chainAccount.pending_claimed_accounts,\n vesting_shares: chainAccount.vesting_shares,\n delegated_vesting_shares: chainAccount.delegated_vesting_shares,\n received_vesting_shares: chainAccount.received_vesting_shares,\n vesting_withdraw_rate: chainAccount.vesting_withdraw_rate,\n to_withdraw: chainAccount.to_withdraw,\n withdrawn: chainAccount.withdrawn,\n // int64 counters. Condenser serves them unquoted, so normalize here in case a\n // node quotes them, but leave an omitted counter undefined: absent is unknown,\n // and coercing it to 0 would understate every ratio derived from it.\n curation_rewards:\n chainAccount.curation_rewards === undefined\n ? undefined\n : Number(chainAccount.curation_rewards),\n posting_rewards:\n chainAccount.posting_rewards === undefined\n ? undefined\n : Number(chainAccount.posting_rewards),\n witness_votes: chainAccount.witness_votes,\n proxy: chainAccount.proxy,\n recovery_account: chainAccount.recovery_account,\n proxied_vsf_votes: chainAccount.proxied_vsf_votes,\n voting_manabar: chainAccount.voting_manabar,\n voting_power: chainAccount.voting_power,\n downvote_manabar: chainAccount.downvote_manabar,\n follow_stats,\n reputation: reputationValue,\n profile,\n } satisfies FullAccount;\n },\n enabled: !!username,\n staleTime: 60000,\n });\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-PFVWZI3W.js';import {a}from'./chunk-WTHEQ3M5.js';function l(t,e,n){return b(["wallet","unstake-engine-token"],t,o=>{let s=JSON.stringify({contractName:"tokens",contractAction:"unstake",contractPayload:{symbol:o.symbol,to:o.to,quantity:o.quantity}});return [["custom_json",{id:"ssc-mainnet-hive",required_auths:[t],required_posting_auths:[],json:s}]]},async()=>{await b$1(e?.adapter,n,[a.accounts.full(t),["ecency-wallets","asset-info",t],["wallet","portfolio","v2",t]]);},e,"active",{broadcastMode:n})}export{l as a};//# sourceMappingURL=chunk-4CZFR2OD.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-4CZFR2OD.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/modules/wallet/mutations/use-unstake-engine-token.ts"],"names":["useUnstakeEngineToken","username","auth","broadcastMode","useBroadcastMutation","payload","json","invalidateAfterBroadcast","QueryKeys"],"mappings":"mHAYO,SAASA,EAAsBC,CAAAA,CAA8BC,CAAAA,CAClEC,EACA,CACA,OAAOC,EACL,CAAC,QAAA,CAAU,sBAAsB,CAAA,CACjCH,CAAAA,CACCI,GAAY,CACX,IAAMC,EAAO,IAAA,CAAK,SAAA,CAAU,CAC1B,YAAA,CAAc,QAAA,CACd,eAAgB,SAAA,CAChB,eAAA,CAAiB,CACf,MAAA,CAAQD,CAAAA,CAAQ,OAChB,EAAA,CAAIA,CAAAA,CAAQ,GACZ,QAAA,CAAUA,CAAAA,CAAQ,QACpB,CACF,CAAC,EACD,OAAO,CAAC,CAAC,aAAA,CAAe,CACtB,GAAI,kBAAA,CACJ,cAAA,CAAgB,CAACJ,CAAS,EAC1B,sBAAA,CAAwB,GACxB,IAAA,CAAAK,CACF,CAAC,CAAc,CACjB,EACA,SAAY,CACV,MAAMC,GAAAA,CAAyBL,CAAAA,EAAM,QAASC,CAAAA,CAAe,CAC3DK,EAAU,QAAA,CAAS,IAAA,CAAKP,CAAQ,CAAA,CAChC,CAAC,iBAAkB,YAAA,CAAcA,CAAQ,EACzC,CAAC,QAAA,CAAU,YAAa,IAAA,CAAMA,CAAQ,CACxC,CAAC,EACH,EACAC,CAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,CAAc,CAClB,CACF","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../../src/modules/wallet/mutations/use-unstake-engine-token.ts"],"names":["useUnstakeEngineToken","username","auth","broadcastMode","useBroadcastMutation","payload","json","invalidateAfterBroadcast","QueryKeys"],"mappings":"mHAYO,SAASA,EAAsBC,CAAAA,CAA8BC,CAAAA,CAClEC,EACA,CACA,OAAOC,EACL,CAAC,QAAA,CAAU,sBAAsB,CAAA,CACjCH,CAAAA,CACCI,GAAY,CACX,IAAMC,EAAO,IAAA,CAAK,SAAA,CAAU,CAC1B,YAAA,CAAc,QAAA,CACd,eAAgB,SAAA,CAChB,eAAA,CAAiB,CACf,MAAA,CAAQD,CAAAA,CAAQ,OAChB,EAAA,CAAIA,CAAAA,CAAQ,GACZ,QAAA,CAAUA,CAAAA,CAAQ,QACpB,CACF,CAAC,EACD,OAAO,CAAC,CAAC,aAAA,CAAe,CACtB,GAAI,kBAAA,CACJ,cAAA,CAAgB,CAACJ,CAAS,EAC1B,sBAAA,CAAwB,GACxB,IAAA,CAAAK,CACF,CAAC,CAAc,CACjB,EACA,SAAY,CACV,MAAMC,GAAAA,CAAyBL,CAAAA,EAAM,QAASC,CAAAA,CAAe,CAC3DK,EAAU,QAAA,CAAS,IAAA,CAAKP,CAAQ,CAAA,CAChC,CAAC,iBAAkB,YAAA,CAAcA,CAAQ,EACzC,CAAC,QAAA,CAAU,YAAa,IAAA,CAAMA,CAAQ,CACxC,CAAC,EACH,EACAC,CAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,CAAc,CAClB,CACF","file":"chunk-4CZFR2OD.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 UnstakeEngineTokenPayload {\n to: string;\n symbol: string;\n quantity: string;\n}\n\nexport function useUnstakeEngineToken(username: string | undefined, auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<UnstakeEngineTokenPayload>(\n [\"wallet\", \"unstake-engine-token\"],\n username,\n (payload) => {\n const json = JSON.stringify({\n contractName: \"tokens\",\n contractAction: \"unstake\",\n contractPayload: {\n symbol: payload.symbol,\n to: payload.to,\n quantity: payload.quantity,\n }\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 {c}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {c}from'./chunk-OQA55EE6.js';import {a}from'./chunk-CPEOHI6I.js';import f from'hivesigner';async function u(o,e,i,t){if(!o)throw new Error("[Core][Broadcast] Attempted to call broadcast API with anon user");let n={id:e,required_auths:[],required_posting_auths:[o],json:JSON.stringify(i)};if(t?.broadcast)return t.broadcast([["custom_json",n]],"posting");let a$1=t?.postingKey;if(a$1){let s=a.fromString(a$1);return c([["custom_json",n]],s)}let c$1=t?.accessToken;if(c$1)return (await new f.Client({accessToken:c$1}).customJson([],[o],e,JSON.stringify(i))).result;let r=t?.adapter;if(r){let s=[["custom_json",n]];if(t?.loginType==="keychain"&&r.broadcastWithKeychain)return r.broadcastWithKeychain(o,s,"posting");if(t?.loginType==="hiveauth"&&r.broadcastWithHiveAuth)return r.broadcastWithHiveAuth(o,s,"posting")}throw new Error("[SDK][Broadcast] \u2013 cannot broadcast w/o posting key or token")}export{u as a};//# sourceMappingURL=chunk-4OOAGHRD.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-4OOAGHRD.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/modules/core/mutations/broadcast-json.ts"],"names":["broadcastJson","username","id","payload","auth","jjson","postingKey","privateKey","PrivateKey","broadcastOperations","accessToken","hs","adapter","ops"],"mappings":"kGAKA,eAAsBA,CAAAA,CACpBC,EACAC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACA,CACA,GAAI,CAACH,CAAAA,CACH,MAAM,IAAI,MACR,kEACF,CAAA,CAEF,IAAMI,CAAAA,CAAQ,CACZ,EAAA,CAAAH,CAAAA,CACA,cAAA,CAAgB,EAAC,CACjB,sBAAA,CAAwB,CAACD,CAAQ,EACjC,IAAA,CAAM,IAAA,CAAK,SAAA,CAAUE,CAAO,CAC9B,CAAA,CAEA,GAAIC,CAAAA,EAAM,SAAA,CACR,OAAOA,CAAAA,CAAK,SAAA,CAAU,CAAC,CAAC,aAAA,CAAeC,CAAK,CAAC,CAAA,CAAG,SAAS,CAAA,CAG3D,IAAMC,GAAAA,CAAaF,CAAAA,EAAM,WACzB,GAAIE,GAAAA,CAAY,CACd,IAAMC,CAAAA,CAAaC,CAAAA,CAAW,UAAA,CAAWF,GAAU,EAEnD,OAAOG,CAAAA,CACL,CAAC,CAAC,cAAeJ,CAAK,CAAC,CAAA,CACvBE,CACF,CACF,CAGA,IAAMG,GAAAA,CAAcN,CAAAA,EAAM,WAAA,CAC1B,GAAIM,GAAAA,CAIF,OAAA,CAHiB,MAAM,IAAIC,CAAAA,CAAG,MAAA,CAAO,CACnC,YAAAD,GACF,CAAC,CAAA,CAAE,UAAA,CAAW,EAAC,CAAG,CAACT,CAAQ,CAAA,CAAGC,CAAAA,CAAI,IAAA,CAAK,SAAA,CAAUC,CAAO,CAAC,CAAA,EACzC,MAAA,CAgBlB,IAAMS,CAAAA,CAAUR,GAAM,OAAA,CACtB,GAAIQ,CAAAA,CAAS,CACX,IAAMC,CAAAA,CACJ,CAAC,CAAC,aAAA,CAAeR,CAAK,CAAC,CAAA,CAEzB,GAAID,GAAM,SAAA,GAAc,UAAA,EAAcQ,CAAAA,CAAQ,qBAAA,CAC5C,OAAOA,CAAAA,CAAQ,qBAAA,CAAsBX,CAAAA,CAAUY,CAAAA,CAAK,SAAS,CAAA,CAE/D,GAAIT,CAAAA,EAAM,SAAA,GAAc,UAAA,EAAcQ,CAAAA,CAAQ,qBAAA,CAC5C,OAAOA,EAAQ,qBAAA,CAAsBX,CAAAA,CAAUY,CAAAA,CAAK,SAAS,CAEjE,CAEA,MAAM,IAAI,KAAA,CACR,mEACF,CACF","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../../src/modules/core/mutations/broadcast-json.ts"],"names":["broadcastJson","username","id","payload","auth","jjson","postingKey","privateKey","PrivateKey","broadcastOperations","accessToken","hs","adapter","ops"],"mappings":"kGAKA,eAAsBA,CAAAA,CACpBC,EACAC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACA,CACA,GAAI,CAACH,CAAAA,CACH,MAAM,IAAI,MACR,kEACF,CAAA,CAEF,IAAMI,CAAAA,CAAQ,CACZ,EAAA,CAAAH,CAAAA,CACA,cAAA,CAAgB,EAAC,CACjB,sBAAA,CAAwB,CAACD,CAAQ,EACjC,IAAA,CAAM,IAAA,CAAK,SAAA,CAAUE,CAAO,CAC9B,CAAA,CAEA,GAAIC,CAAAA,EAAM,SAAA,CACR,OAAOA,CAAAA,CAAK,SAAA,CAAU,CAAC,CAAC,aAAA,CAAeC,CAAK,CAAC,CAAA,CAAG,SAAS,CAAA,CAG3D,IAAMC,GAAAA,CAAaF,CAAAA,EAAM,WACzB,GAAIE,GAAAA,CAAY,CACd,IAAMC,CAAAA,CAAaC,CAAAA,CAAW,UAAA,CAAWF,GAAU,EAEnD,OAAOG,CAAAA,CACL,CAAC,CAAC,cAAeJ,CAAK,CAAC,CAAA,CACvBE,CACF,CACF,CAGA,IAAMG,GAAAA,CAAcN,CAAAA,EAAM,WAAA,CAC1B,GAAIM,GAAAA,CAIF,OAAA,CAHiB,MAAM,IAAIC,CAAAA,CAAG,MAAA,CAAO,CACnC,YAAAD,GACF,CAAC,CAAA,CAAE,UAAA,CAAW,EAAC,CAAG,CAACT,CAAQ,CAAA,CAAGC,CAAAA,CAAI,IAAA,CAAK,SAAA,CAAUC,CAAO,CAAC,CAAA,EACzC,MAAA,CAgBlB,IAAMS,CAAAA,CAAUR,GAAM,OAAA,CACtB,GAAIQ,CAAAA,CAAS,CACX,IAAMC,CAAAA,CACJ,CAAC,CAAC,aAAA,CAAeR,CAAK,CAAC,CAAA,CAEzB,GAAID,GAAM,SAAA,GAAc,UAAA,EAAcQ,CAAAA,CAAQ,qBAAA,CAC5C,OAAOA,CAAAA,CAAQ,qBAAA,CAAsBX,CAAAA,CAAUY,CAAAA,CAAK,SAAS,CAAA,CAE/D,GAAIT,CAAAA,EAAM,SAAA,GAAc,UAAA,EAAcQ,CAAAA,CAAQ,qBAAA,CAC5C,OAAOA,EAAQ,qBAAA,CAAsBX,CAAAA,CAAUY,CAAAA,CAAK,SAAS,CAEjE,CAEA,MAAM,IAAI,KAAA,CACR,mEACF,CACF","file":"chunk-4OOAGHRD.js","sourcesContent":["import { PrivateKey } from \"../../../hive-tx\";\nimport { broadcastOperations } from \"@/modules/core/hive-tx\";\nimport hs from \"hivesigner\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\nexport async function broadcastJson<T>(\n username: string | undefined,\n id: string,\n payload: T,\n auth?: AuthContextV2\n) {\n if (!username) {\n throw new Error(\n \"[Core][Broadcast] Attempted to call broadcast API with anon user\"\n );\n }\n const jjson = {\n id,\n required_auths: [],\n required_posting_auths: [username],\n json: JSON.stringify(payload),\n };\n\n if (auth?.broadcast) {\n return auth.broadcast([[\"custom_json\", jjson]], \"posting\");\n }\n\n const postingKey = auth?.postingKey;\n if (postingKey) {\n const privateKey = PrivateKey.fromString(postingKey);\n\n return broadcastOperations(\n [[\"custom_json\", jjson]],\n privateKey\n );\n }\n\n // With hivesigner access token\n const accessToken = auth?.accessToken;\n if (accessToken) {\n const response = await new hs.Client({\n accessToken,\n }).customJson([], [username], id, JSON.stringify(payload));\n return response.result;\n }\n\n /*\n * Adapter, as a last resort rather than first.\n *\n * `auth.broadcast` above is the supported caller-supplied path inherited by\n * AuthContextV2, but the web app's `getSdkAuthContext` does not populate it.\n * A Keychain user whose posting key is not stored and who has no HiveSigner\n * token therefore reached the throw below instead of being asked to sign.\n * This is reachable today from follow and unfollow.\n *\n * Placed last on purpose: every branch above already works for the sessions\n * that reach it, and reordering would change which method signs for people\n * it currently serves. This only claims cases that were previously errors.\n */\n const adapter = auth?.adapter;\n if (adapter) {\n const ops: Parameters<NonNullable<typeof adapter.broadcastWithKeychain>>[1] =\n [[\"custom_json\", jjson]];\n\n if (auth?.loginType === \"keychain\" && adapter.broadcastWithKeychain) {\n return adapter.broadcastWithKeychain(username, ops, \"posting\");\n }\n if (auth?.loginType === \"hiveauth\" && adapter.broadcastWithHiveAuth) {\n return adapter.broadcastWithHiveAuth(username, ops, \"posting\");\n }\n }\n\n throw new Error(\n \"[SDK][Broadcast] – cannot broadcast w/o posting key or token\"\n );\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a}from'./chunk-RZVMZQO7.js';import {b}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {a}from'./chunk-RZVMZQO7.js';import {b}from'./chunk-PFVWZI3W.js';import {a as a$1}from'./chunk-WTHEQ3M5.js';function p(e,t,a$2){return b(["witnesses","vote"],e,({witness:o,approve:n})=>[a(e,o,n)],async()=>{try{t?.adapter?.invalidateQueries&&await t.adapter.invalidateQueries([a$1.accounts.full(e),a$1.witnesses.votes(e)]);}catch(o){console.warn("[useWitnessVote] Post-broadcast side-effect failed:",o);}},t,"active",{broadcastMode:a$2})}export{p as a};//# sourceMappingURL=chunk-5X6R7EPZ.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-5X6R7EPZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/modules/witnesses/mutations/use-witness-vote.ts"],"names":["useWitnessVote","username","auth","broadcastMode","useBroadcastMutation","witness","approve","buildWitnessVoteOp","QueryKeys","error"],"mappings":"mHA2DO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,GAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,WAAA,CAAa,MAAM,CAAA,CACpBH,CAAAA,CACA,CAAC,CAAE,OAAA,CAAAI,CAAAA,CAAS,OAAA,CAAAC,CAAQ,CAAA,GAAM,CACxBC,CAAAA,CAAmBN,EAAWI,CAAAA,CAASC,CAAO,CAChD,CAAA,CACA,SAAY,CAEV,GAAI,CAEEJ,GAAM,OAAA,EAAS,iBAAA,EACjB,MAAMA,CAAAA,CAAK,OAAA,CAAQ,iBAAA,CAAkB,CACnCM,GAAAA,CAAU,QAAA,CAAS,IAAA,CAAKP,CAAQ,CAAA,CAChCO,GAAAA,CAAU,SAAA,CAAU,KAAA,CAAMP,CAAQ,CACpC,CAAC,EAEL,CAAA,MAASQ,CAAAA,CAAO,CAEd,OAAA,CAAQ,IAAA,CAAK,qDAAA,CAAuDA,CAAK,EAC3E,CACF,CAAA,CACAP,CAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,GAAc,CAClB,CACF","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../../src/modules/witnesses/mutations/use-witness-vote.ts"],"names":["useWitnessVote","username","auth","broadcastMode","useBroadcastMutation","witness","approve","buildWitnessVoteOp","QueryKeys","error"],"mappings":"mHA2DO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,GAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,WAAA,CAAa,MAAM,CAAA,CACpBH,CAAAA,CACA,CAAC,CAAE,OAAA,CAAAI,CAAAA,CAAS,OAAA,CAAAC,CAAQ,CAAA,GAAM,CACxBC,CAAAA,CAAmBN,EAAWI,CAAAA,CAASC,CAAO,CAChD,CAAA,CACA,SAAY,CAEV,GAAI,CAEEJ,GAAM,OAAA,EAAS,iBAAA,EACjB,MAAMA,CAAAA,CAAK,OAAA,CAAQ,iBAAA,CAAkB,CACnCM,GAAAA,CAAU,QAAA,CAAS,IAAA,CAAKP,CAAQ,CAAA,CAChCO,GAAAA,CAAU,SAAA,CAAU,KAAA,CAAMP,CAAQ,CACpC,CAAC,EAEL,CAAA,MAASQ,CAAAA,CAAO,CAEd,OAAA,CAAQ,IAAA,CAAK,qDAAA,CAAuDA,CAAK,EAC3E,CACF,CAAA,CACAP,CAAAA,CACA,QAAA,CACA,CAAE,aAAA,CAAAC,GAAc,CAClB,CACF","file":"chunk-5X6R7EPZ.js","sourcesContent":["import { useBroadcastMutation, QueryKeys } from \"@/modules/core\";\nimport type { BroadcastMode } from \"@/modules/core\";\nimport { buildWitnessVoteOp } from \"@/modules/operations/builders\";\nimport type { AuthContextV2 } from \"@/modules/core/types\";\n\n/**\n * Payload for voting for a witness.\n */\nexport interface WitnessVotePayload {\n /** Witness account name to vote for/against */\n witness: string;\n /** True to approve, false to disapprove */\n approve: boolean;\n}\n\n/**\n * React Query mutation hook for voting for a Hive witness.\n *\n * This mutation broadcasts an account_witness_vote operation to vote for\n * or remove a vote from a witness.\n *\n * @param username - The username voting for the witness (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 account data cache to show updated witness votes\n * - Invalidates witness votes cache\n *\n * **Vote Types:**\n * - approve: true - Vote for the witness\n * - approve: false - Remove your vote from the witness\n *\n * **Authority Required:**\n * - Active authority is required for witness voting\n *\n * @example\n * ```typescript\n * const witnessVoteMutation = useWitnessVote(username, {\n * adapter: myAdapter,\n * enableFallback: true,\n * fallbackChain: ['keychain', 'key', 'hivesigner']\n * });\n *\n * // Vote for a witness\n * witnessVoteMutation.mutate({\n * witness: 'good-karma',\n * approve: true\n * });\n *\n * // Remove vote from a witness\n * witnessVoteMutation.mutate({\n * witness: 'good-karma',\n * approve: false\n * });\n * ```\n */\nexport function useWitnessVote(\n username: string | undefined,\n auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<WitnessVotePayload>(\n [\"witnesses\", \"vote\"],\n username,\n ({ witness, approve }) => [\n buildWitnessVoteOp(username!, witness, approve)\n ],\n async () => {\n // Wrap post-broadcast side-effects in try-catch to prevent propagating errors\n try {\n // Cache invalidation\n if (auth?.adapter?.invalidateQueries) {\n await auth.adapter.invalidateQueries([\n QueryKeys.accounts.full(username),\n QueryKeys.witnesses.votes(username)\n ]);\n }\n } catch (error) {\n // Log but don't rethrow - don't fail mutation due to side-effect errors\n console.warn('[useWitnessVote] Post-broadcast side-effect failed:', error);\n }\n },\n auth,\n 'active', // Use active authority for witness votes (required by blockchain)\n { broadcastMode }\n );\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {b as b$1}from'./chunk-CNB64U7U.js';import {b}from'./chunk-PFVWZI3W.js';import {a}from'./chunk-WTHEQ3M5.js';function c(t,o,e){return b(["wallet","claim-engine-rewards"],t,n=>{let s=JSON.stringify(n.tokens.map(d=>({symbol:d})));return [["custom_json",{id:"scot_claim_token",required_auths:[],required_posting_auths:[t],json:s}]]},async()=>{await b$1(o?.adapter,e,[a.accounts.full(t),["ecency-wallets","asset-info",t],["wallet","portfolio","v2",t]]);},o,"posting",{broadcastMode:e})}export{c as a};//# sourceMappingURL=chunk-65S4AS6C.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-65S4AS6C.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/modules/wallet/mutations/use-claim-engine-rewards.ts"],"names":["useClaimEngineRewards","username","auth","broadcastMode","useBroadcastMutation","payload","json","symbol","invalidateAfterBroadcast","QueryKeys"],"mappings":"mHAUO,SAASA,EAAsBC,CAAAA,CAA8BC,CAAAA,CAClEC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,QAAA,CAAU,sBAAsB,EACjCH,CAAAA,CACCI,CAAAA,EAAY,CACX,IAAMC,CAAAA,CAAO,KAAK,SAAA,CAAUD,CAAAA,CAAQ,MAAA,CAAO,GAAA,CAAKE,IAAY,CAAE,MAAA,CAAAA,CAAO,CAAA,CAAE,CAAC,CAAA,CACxE,OAAO,CAAC,CAAC,cAAe,CACtB,EAAA,CAAI,mBACJ,cAAA,CAAgB,GAChB,sBAAA,CAAwB,CAACN,CAAS,CAAA,CAClC,KAAAK,CACF,CAAC,CAAc,CACjB,EACA,SAAY,CACV,MAAME,GAAAA,CAAyBN,GAAM,OAAA,CAASC,CAAAA,CAAe,CAC3DM,CAAAA,CAAU,QAAA,CAAS,KAAKR,CAAQ,CAAA,CAChC,CAAC,gBAAA,CAAkB,aAAcA,CAAQ,CAAA,CACzC,CAAC,QAAA,CAAU,WAAA,CAAa,KAAMA,CAAQ,CACxC,CAAC,EACH,EACAC,CAAAA,CACA,SAAA,CACA,CAAE,aAAA,CAAAC,CAAc,CAClB,CACF","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../../src/modules/wallet/mutations/use-claim-engine-rewards.ts"],"names":["useClaimEngineRewards","username","auth","broadcastMode","useBroadcastMutation","payload","json","symbol","invalidateAfterBroadcast","QueryKeys"],"mappings":"mHAUO,SAASA,EAAsBC,CAAAA,CAA8BC,CAAAA,CAClEC,CAAAA,CACA,CACA,OAAOC,CAAAA,CACL,CAAC,QAAA,CAAU,sBAAsB,EACjCH,CAAAA,CACCI,CAAAA,EAAY,CACX,IAAMC,CAAAA,CAAO,KAAK,SAAA,CAAUD,CAAAA,CAAQ,MAAA,CAAO,GAAA,CAAKE,IAAY,CAAE,MAAA,CAAAA,CAAO,CAAA,CAAE,CAAC,CAAA,CACxE,OAAO,CAAC,CAAC,cAAe,CACtB,EAAA,CAAI,mBACJ,cAAA,CAAgB,GAChB,sBAAA,CAAwB,CAACN,CAAS,CAAA,CAClC,KAAAK,CACF,CAAC,CAAc,CACjB,EACA,SAAY,CACV,MAAME,GAAAA,CAAyBN,GAAM,OAAA,CAASC,CAAAA,CAAe,CAC3DM,CAAAA,CAAU,QAAA,CAAS,KAAKR,CAAQ,CAAA,CAChC,CAAC,gBAAA,CAAkB,aAAcA,CAAQ,CAAA,CACzC,CAAC,QAAA,CAAU,WAAA,CAAa,KAAMA,CAAQ,CACxC,CAAC,EACH,EACAC,CAAAA,CACA,SAAA,CACA,CAAE,aAAA,CAAAC,CAAc,CAClB,CACF","file":"chunk-65S4AS6C.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 ClaimEngineRewardsPayload {\n tokens: string[];\n}\n\nexport function useClaimEngineRewards(username: string | undefined, auth?: AuthContextV2,\n broadcastMode?: BroadcastMode\n) {\n return useBroadcastMutation<ClaimEngineRewardsPayload>(\n [\"wallet\", \"claim-engine-rewards\"],\n username,\n (payload) => {\n const json = JSON.stringify(payload.tokens.map((symbol) => ({ symbol })));\n return [[\"custom_json\", {\n id: \"scot_claim_token\",\n required_auths: [],\n required_posting_auths: [username!],\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 'posting',\n { broadcastMode }\n );\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-4C57MZP6.js';import {a}from'./chunk-CWBPA5DT.js';import {c}from'./chunk-32QJ72HH.js';import {b}from'./chunk-POHYQBLL.js';import {j}from'./chunk-RAWKN3XW.js';import {queryOptions}from'@tanstack/react-query';function q(n){return queryOptions({queryKey:["assets","hive","general-info",n],staleTime:6e4,refetchInterval:9e4,queryFn:async()=>{await b().prefetchQuery(a()),await b().prefetchQuery(a$1(n));let e=b().getQueryData(a().queryKey),r=b().getQueryData(a$1(n).queryKey),m=await j("condenser_api.get_ticker",[]).catch(()=>{}),a$2=Number.parseFloat(m?.latest??"");if(!r)return {name:"HIVE",title:"Hive",price:Number.isFinite(a$2)?a$2:e?e.base/e.quote:0,accountBalance:0};let c$1=c(r.balance).amount,u=c(r.savings_balance).amount;return {name:"HIVE",title:"Hive",price:Number.isFinite(a$2)?a$2:e?e.base/e.quote:0,accountBalance:c$1+u,parts:[{name:"current",balance:c$1},{name:"savings",balance:u}]}}})}export{q as a};//# sourceMappingURL=chunk-6A7YD57H.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-6A7YD57H.js.map
|