@ecency/sdk 2.2.5 → 2.2.7

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.
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { InfiniteData, UseMutationOptions, MutationKey, QueryClient, QueryKey, UseQueryOptions, UseInfiniteQueryOptions, useMutation } from '@tanstack/react-query';
2
+ import { MutationKey, UseMutationOptions, QueryClient, QueryKey, InfiniteData, UseQueryOptions, UseInfiniteQueryOptions, useMutation } from '@tanstack/react-query';
3
3
  import { O as Operation, P as PrivateKey, B as BroadcastResult, A as Authority, a as PublicKey, b as OperationName, o as operations } from './hive-CwYfobOc.js';
4
4
  export { j as AccountCreateOperation, i as AssetSymbol, C as CustomJsonOperation, T as HiveTxTransaction, M as Memo, h as OperationBody, S as Signature, f as callREST, d as callRPC, e as callRPCBroadcast, g as callWithQuorum, c as hiveTxConfig, u as hiveTxUtils } from './hive-CwYfobOc.js';
5
5
 
@@ -80,6 +80,11 @@ interface DynamicProps$1 {
80
80
  quote: number;
81
81
  fundRewardBalance: number;
82
82
  fundRecentClaims: number;
83
+ votePowerReserveRate: number;
84
+ authorRewardCurve: string;
85
+ contentConstant: number;
86
+ currentHardforkVersion: string;
87
+ lastHardfork: number;
83
88
  hbdPrintRate: number;
84
89
  hbdInterestRate: number;
85
90
  headBlock: number;
@@ -93,6 +98,7 @@ interface DynamicProps$1 {
93
98
  feedHistory: Record<string, any>;
94
99
  chainProps: Record<string, any>;
95
100
  rewardFund: Record<string, any>;
101
+ hardforkProps: Record<string, any>;
96
102
  };
97
103
  }
98
104
 
@@ -694,1247 +700,1296 @@ interface WrappedResponse<T> {
694
700
  pagination: PaginationMeta;
695
701
  }
696
702
 
697
- interface AccountFollowStats {
698
- follower_count: number;
699
- following_count: number;
700
- account: string;
701
- }
702
-
703
- interface AccountReputation {
704
- account: string;
705
- reputation: number;
706
- }
707
-
708
- interface AccountProfile {
709
- about?: string;
710
- cover_image?: string;
711
- location?: string;
712
- name?: string;
713
- profile_image?: string;
714
- website?: string;
715
- pinned?: string;
716
- reputation?: number;
717
- version?: number;
718
- beneficiary?: {
719
- account: string;
720
- weight: number;
721
- };
722
- tokens?: {
723
- symbol: string;
724
- type: string;
725
- meta: Record<string, any>;
726
- }[];
727
- }
728
-
729
- interface FullAccount {
730
- name: string;
731
- owner: Authority;
732
- active: Authority;
733
- posting: Authority;
734
- memo_key: string;
735
- post_count: number;
736
- created: string;
737
- reputation: string | number;
738
- json_metadata: string;
739
- posting_json_metadata: string;
740
- last_vote_time: string;
741
- last_post: string;
742
- reward_hbd_balance: string;
743
- reward_vesting_hive: string;
744
- reward_hive_balance: string;
745
- reward_vesting_balance: string;
746
- balance: string;
747
- vesting_shares: string;
748
- hbd_balance: string;
749
- savings_balance: string;
750
- savings_hbd_balance: string;
751
- savings_hbd_seconds: string;
752
- savings_hbd_last_interest_payment: string;
753
- savings_hbd_seconds_last_update: string;
754
- next_vesting_withdrawal: string;
755
- pending_claimed_accounts: number;
756
- delegated_vesting_shares: string;
757
- received_vesting_shares: string;
758
- vesting_withdraw_rate: string;
759
- to_withdraw: string;
760
- withdrawn: string;
761
- witness_votes: string[];
762
- proxy: string;
763
- recovery_account: string;
764
- proxied_vsf_votes: number[] | string[];
765
- voting_manabar: {
766
- current_mana: string | number;
767
- last_update_time: number;
768
- };
769
- voting_power: number;
770
- downvote_manabar: {
771
- current_mana: string | number;
772
- last_update_time: number;
773
- };
774
- profile?: AccountProfile;
775
- follow_stats?: AccountFollowStats;
776
- proxyVotes?: [];
777
- }
778
-
779
- interface AccountRelationship {
780
- follows: boolean;
781
- ignores: boolean;
782
- is_blacklisted: boolean;
783
- follows_blacklists: boolean;
784
- }
785
-
786
- interface AccountBookmark {
787
- _id: string;
788
- author: string;
789
- permlink: string;
790
- timestamp: number;
791
- created: string;
792
- }
793
-
794
- interface AccountFavorite {
795
- _id: string;
796
- account: string;
797
- timestamp: number;
798
- }
799
-
800
- interface Recoveries {
801
- username: string;
802
- email: string;
803
- publicKeys: Record<string, number>;
804
- }
805
- interface GetRecoveriesEmailResponse extends Recoveries {
806
- _id: string;
807
- }
808
-
809
- interface Follow {
810
- follower: string;
811
- following: string;
812
- what: string[];
813
- }
814
-
815
- interface BaseTransaction {
816
- num: number;
817
- type: string;
818
- timestamp: string;
819
- trx_id: string;
820
- }
821
- interface CurationReward extends BaseTransaction {
822
- type: "curation_reward";
823
- comment_author?: string;
824
- comment_permlink?: string;
825
- author?: string;
826
- permlink?: string;
827
- curator: string;
828
- reward: string;
829
- }
830
- interface AuthorReward extends BaseTransaction {
831
- type: "author_reward";
832
- author: string;
833
- permlink: string;
834
- hbd_payout: string;
835
- hive_payout: string;
836
- vesting_payout: string;
837
- }
838
- interface CommentBenefactor extends BaseTransaction {
839
- type: "comment_benefactor_reward";
840
- benefactor: string;
841
- author: string;
842
- permlink: string;
843
- hbd_payout: string;
844
- hive_payout: string;
845
- vesting_payout: string;
846
- }
847
- interface ClaimRewardBalance extends BaseTransaction {
848
- type: "claim_reward_balance";
849
- account: string;
850
- reward_hbd: string;
851
- reward_hive: string;
852
- reward_vests: string;
853
- }
854
- interface Transfer extends BaseTransaction {
855
- type: "transfer";
856
- amount: string;
857
- memo: string;
858
- from: string;
859
- to: string;
860
- }
861
- interface TransferToVesting extends BaseTransaction {
862
- type: "transfer_to_vesting";
863
- amount: string;
864
- memo?: string;
865
- from: string;
866
- to: string;
867
- }
868
- interface SetWithdrawRoute extends BaseTransaction {
869
- type: "set_withdraw_vesting_route";
870
- from_account: string;
871
- to_account: string;
872
- percent: number;
873
- auto_vest: boolean;
874
- }
875
- interface TransferToSavings extends BaseTransaction {
876
- type: "transfer_to_savings";
877
- amount: string;
878
- memo?: string;
879
- from: string;
880
- to: string;
881
- }
882
- interface CancelTransferFromSavings extends BaseTransaction {
883
- from: string;
884
- request_id: number;
885
- type: "cancel_transfer_from_savings";
886
- }
887
- interface WithdrawVesting extends BaseTransaction {
888
- type: "withdraw_vesting";
889
- acc: string;
890
- vesting_shares: string;
891
- }
892
- interface FillOrder extends BaseTransaction {
893
- type: "fill_order";
894
- current_pays: string;
895
- open_pays: string;
896
- }
897
- interface LimitOrderCancel extends BaseTransaction {
898
- type: "limit_order_cancel";
899
- owner: string;
900
- orderid: number;
901
- }
902
- interface ProducerReward extends BaseTransaction {
903
- type: "producer_reward";
904
- vesting_shares: string;
905
- producer: string;
906
- }
907
- interface Interest extends BaseTransaction {
908
- type: "interest";
909
- owner: string;
910
- interest: string;
911
- }
912
- interface FillConvertRequest extends BaseTransaction {
913
- type: "fill_convert_request";
914
- amount_in: string;
915
- amount_out: string;
916
- }
917
- interface FillCollateralizedConvertRequest extends BaseTransaction {
918
- type: "fill_collateralized_convert_request";
919
- owner: string;
920
- requestid: number;
921
- amount_in: string;
922
- amount_out: string;
923
- excess_collateral: string;
924
- }
925
- interface ReturnVestingDelegation extends BaseTransaction {
926
- type: "return_vesting_delegation";
927
- vesting_shares: string;
928
- }
929
- interface ProposalPay extends BaseTransaction {
930
- type: "proposal_pay";
931
- payment: string;
932
- }
933
- interface UpdateProposalVotes extends BaseTransaction {
934
- type: "update_proposal_votes";
935
- voter: string;
936
- proposal_ids: [number];
937
- approve: boolean;
938
- }
939
- interface CommentPayoutUpdate extends BaseTransaction {
940
- type: "comment_payout_update";
941
- author: string;
942
- permlink: string;
943
- }
944
- interface CommentReward extends BaseTransaction {
945
- type: "comment_reward";
946
- author: string;
947
- permlink: string;
948
- payout: string;
949
- }
950
- interface CollateralizedConvert extends BaseTransaction {
951
- type: "collateralized_convert";
952
- owner: string;
953
- requestid: number;
954
- amount: string;
955
- }
956
- interface RecurrentTransfers extends BaseTransaction {
957
- type: "recurrent_transfer";
958
- amount: string;
959
- memo: string;
960
- from: string;
961
- to: string;
962
- recurrence: number;
963
- executions: number;
964
- }
965
- interface FillRecurrentTransfers extends BaseTransaction {
966
- type: "fill_recurrent_transfer";
967
- amount: SMTAsset;
968
- memo: string;
969
- from: string;
970
- to: string;
971
- remaining_executions: number;
972
- }
973
- interface DelegateVestingShares extends BaseTransaction {
974
- type: "delegate_vesting_shares";
975
- delegator: string;
976
- delegatee: string;
977
- vesting_shares: string;
978
- }
979
- interface LimitOrderCreate extends BaseTransaction {
980
- type: "limit_order_create";
981
- owner: string;
982
- orderid: number;
983
- amount_to_sell: string;
984
- min_to_receive: string;
985
- expiration: string;
986
- }
987
- interface FillVestingWithdraw extends BaseTransaction {
988
- type: "fill_vesting_withdraw";
989
- from_account: string;
990
- to_account: string;
991
- withdrawn: string;
992
- deposited: string;
993
- }
994
- interface EffectiveCommentVote extends BaseTransaction {
995
- type: "effective_comment_vote";
996
- voter: string;
997
- author: string;
998
- permlink: string;
999
- pending_payout: string;
1000
- total_vote_weight: number;
1001
- rshares: number;
1002
- weight: number;
1003
- }
1004
- interface VoteProxy extends BaseTransaction {
1005
- type: "account_witness_proxy";
1006
- account: string;
1007
- proxy: string;
1008
- }
1009
- type Transaction = CurationReward | AuthorReward | CommentBenefactor | ClaimRewardBalance | Transfer | TransferToVesting | TransferToSavings | CancelTransferFromSavings | WithdrawVesting | SetWithdrawRoute | FillOrder | ProducerReward | Interest | FillConvertRequest | FillCollateralizedConvertRequest | ReturnVestingDelegation | ProposalPay | UpdateProposalVotes | CommentPayoutUpdate | CommentReward | CollateralizedConvert | RecurrentTransfers | FillRecurrentTransfers | LimitOrderCreate | LimitOrderCancel | FillVestingWithdraw | EffectiveCommentVote | VoteProxy | DelegateVestingShares;
1010
- type OperationGroup = "transfers" | "market-orders" | "interests" | "stake-operations" | "rewards";
1011
-
1012
- interface ReferralItem {
1013
- id: number;
1014
- username: string;
1015
- referrer: string;
1016
- created: string;
1017
- rewarded: number;
1018
- v: number;
1019
- }
1020
- interface ReferralItems {
1021
- data: ReferralItem[];
1022
- }
1023
- interface ReferralStat {
1024
- total: number;
1025
- rewarded: number;
1026
- }
703
+ /**
704
+ * Authority levels for Hive blockchain operations.
705
+ * - posting: Social operations (voting, commenting, reblogging)
706
+ * - active: Financial and account management operations
707
+ * - owner: Critical security operations (key changes, account recovery)
708
+ * - memo: Memo encryption/decryption (rarely used for signing)
709
+ */
710
+ type AuthorityLevel = 'posting' | 'active' | 'owner' | 'memo';
711
+ /**
712
+ * Maps operation types to their required authority level.
713
+ *
714
+ * This mapping is used to determine which key is needed to sign a transaction,
715
+ * enabling smart auth fallback and auth upgrade UI.
716
+ *
717
+ * @remarks
718
+ * - Most social operations (vote, comment, reblog) require posting authority
719
+ * - Financial operations (transfer, withdraw) require active authority
720
+ * - Account management operations require active authority
721
+ * - Security operations (password change, account recovery) require owner authority
722
+ * - custom_json requires dynamic detection based on required_auths vs required_posting_auths
723
+ */
724
+ declare const OPERATION_AUTHORITY_MAP: Record<string, AuthorityLevel>;
725
+ /**
726
+ * Determines authority required for a custom_json operation.
727
+ *
728
+ * Custom JSON operations can require either posting or active authority
729
+ * depending on which field is populated:
730
+ * - required_auths (active authority)
731
+ * - required_posting_auths (posting authority)
732
+ *
733
+ * @param customJsonOp - The custom_json operation to inspect
734
+ * @returns 'active' if requires active authority, 'posting' if requires posting authority
735
+ *
736
+ * @example
737
+ * ```typescript
738
+ * // Reblog operation (posting authority)
739
+ * const reblogOp: Operation = ['custom_json', {
740
+ * required_auths: [],
741
+ * required_posting_auths: ['alice'],
742
+ * id: 'reblog',
743
+ * json: '...'
744
+ * }];
745
+ * getCustomJsonAuthority(reblogOp); // Returns 'posting'
746
+ *
747
+ * // Some active authority custom_json
748
+ * const activeOp: Operation = ['custom_json', {
749
+ * required_auths: ['alice'],
750
+ * required_posting_auths: [],
751
+ * id: 'some_active_op',
752
+ * json: '...'
753
+ * }];
754
+ * getCustomJsonAuthority(activeOp); // Returns 'active'
755
+ * ```
756
+ */
757
+ declare function getCustomJsonAuthority(customJsonOp: Operation): AuthorityLevel;
758
+ /**
759
+ * Determines authority required for a proposal operation.
760
+ *
761
+ * Proposal operations (create_proposal, update_proposal) typically require
762
+ * active authority as they involve financial commitments and funding allocations.
763
+ *
764
+ * @param proposalOp - The proposal operation to inspect
765
+ * @returns 'active' authority requirement
766
+ *
767
+ * @remarks
768
+ * Unlike custom_json, proposal operations don't have explicit required_auths fields.
769
+ * They always use the creator's authority, which defaults to active for financial
770
+ * operations involving the DAO treasury.
771
+ *
772
+ * @example
773
+ * ```typescript
774
+ * const proposalOp: Operation = ['create_proposal', {
775
+ * creator: 'alice',
776
+ * receiver: 'bob',
777
+ * subject: 'My Proposal',
778
+ * permlink: 'my-proposal',
779
+ * start: '2026-03-01T00:00:00',
780
+ * end: '2026-04-01T00:00:00',
781
+ * daily_pay: '100.000 HBD',
782
+ * extensions: []
783
+ * }];
784
+ * getProposalAuthority(proposalOp); // Returns 'active'
785
+ * ```
786
+ */
787
+ declare function getProposalAuthority(proposalOp: Operation): AuthorityLevel;
788
+ /**
789
+ * Determines the required authority level for any operation.
790
+ *
791
+ * Uses the OPERATION_AUTHORITY_MAP for standard operations, and dynamic
792
+ * detection for custom_json operations.
793
+ *
794
+ * @param op - The operation to check
795
+ * @returns 'posting' or 'active' authority requirement
796
+ *
797
+ * @example
798
+ * ```typescript
799
+ * const voteOp: Operation = ['vote', { voter: 'alice', author: 'bob', permlink: 'post', weight: 10000 }];
800
+ * getOperationAuthority(voteOp); // Returns 'posting'
801
+ *
802
+ * const transferOp: Operation = ['transfer', { from: 'alice', to: 'bob', amount: '1.000 HIVE', memo: '' }];
803
+ * getOperationAuthority(transferOp); // Returns 'active'
804
+ * ```
805
+ */
806
+ declare function getOperationAuthority(op: Operation): AuthorityLevel;
807
+ /**
808
+ * Determines the highest authority level required for a list of operations.
809
+ *
810
+ * Useful when broadcasting multiple operations together - the highest authority
811
+ * level required by any operation determines what key is needed for the batch.
812
+ *
813
+ * Authority hierarchy: owner > active > posting > memo
814
+ *
815
+ * @param ops - Array of operations
816
+ * @returns Highest authority level required ('owner', 'active', or 'posting')
817
+ *
818
+ * @example
819
+ * ```typescript
820
+ * const ops: Operation[] = [
821
+ * ['vote', { ... }], // posting
822
+ * ['comment', { ... }], // posting
823
+ * ];
824
+ * getRequiredAuthority(ops); // Returns 'posting'
825
+ *
826
+ * const mixedOps: Operation[] = [
827
+ * ['comment', { ... }], // posting
828
+ * ['transfer', { ... }], // active
829
+ * ];
830
+ * getRequiredAuthority(mixedOps); // Returns 'active'
831
+ *
832
+ * const securityOps: Operation[] = [
833
+ * ['transfer', { ... }], // active
834
+ * ['change_recovery_account', { ... }], // owner
835
+ * ];
836
+ * getRequiredAuthority(securityOps); // Returns 'owner'
837
+ * ```
838
+ */
839
+ declare function getRequiredAuthority(ops: Operation[]): AuthorityLevel;
1027
840
 
1028
841
  /**
1029
- * Account profile information from bridge API
1030
- * Returned by get_profiles endpoint
842
+ * Broadcast mode controls whether the SDK waits for block inclusion.
843
+ *
844
+ * - `'sync'` (default): Uses `broadcast_transaction_synchronous` — waits for
845
+ * the transaction to be included in a block and returns `block_num`/`trx_num`.
846
+ * **Use for:** transfers, account updates, key changes, delegations, conversions.
847
+ *
848
+ * - `'async'`: Uses `broadcast_transaction` — returns as soon as the node
849
+ * accepts the transaction into its mempool. Transport and RPC errors are
850
+ * still thrown immediately; the only thing skipped is the block-inclusion wait.
851
+ * **Use for:** votes, follows/unfollows, reblogs, community subscribe/unsubscribe,
852
+ * custom_json social operations where faster response matters more than confirmation.
1031
853
  */
1032
- interface Profile {
1033
- id: number;
1034
- name: string;
1035
- created: string;
1036
- active: string;
1037
- post_count: number;
1038
- reputation: number;
1039
- blacklists: string[];
1040
- stats: {
1041
- rank: number;
1042
- following: number;
1043
- followers: number;
1044
- };
1045
- metadata: {
1046
- profile: {
1047
- about?: string;
1048
- blacklist_description?: string;
1049
- cover_image?: string;
1050
- location?: string;
1051
- muted_list_description?: string;
1052
- name?: string;
1053
- profile_image?: string;
1054
- website?: string;
1055
- };
1056
- };
854
+ type BroadcastMode = 'sync' | 'async';
855
+ /**
856
+ * React Query mutation hook for broadcasting Hive operations.
857
+ * Supports multiple authentication methods with automatic fallback.
858
+ *
859
+ * @template T - Type of the mutation payload
860
+ * @param mutationKey - React Query mutation key for cache management
861
+ * @param username - Hive username (required for broadcast)
862
+ * @param operations - Function that converts payload to Hive operations
863
+ * @param onSuccess - Success callback after broadcast completes
864
+ * @param auth - Authentication context (supports both legacy AuthContext and new AuthContextV2)
865
+ * @param authority - Key authority to use ('posting' | 'active' | 'owner' | 'memo'), defaults to 'posting'
866
+ *
867
+ * @returns React Query mutation result
868
+ *
869
+ * @remarks
870
+ * **Authentication Flow:**
871
+ *
872
+ * 1. **With AuthContextV2 + adapter + enableFallback** (recommended for new code):
873
+ * - Tries auth methods in fallbackChain order
874
+ * - Smart fallback: only retries on auth errors, not RC/network errors
875
+ * - Uses platform adapter for storage, UI, and broadcasting
876
+ *
877
+ * 2. **With legacy AuthContext** (backward compatible):
878
+ * - Tries auth.broadcast() first (custom implementation)
879
+ * - Falls back to postingKey if available
880
+ * - Falls back to accessToken (HiveSigner) if available
881
+ * - Throws if no auth method available
882
+ *
883
+ * **Backward Compatibility:**
884
+ * - All existing code using AuthContext will continue to work
885
+ * - AuthContextV2 extends AuthContext, so it's a drop-in replacement
886
+ * - enableFallback defaults to false if no adapter provided
887
+ *
888
+ * @example
889
+ * ```typescript
890
+ * // New pattern with platform adapter and fallback
891
+ * const mutation = useBroadcastMutation(
892
+ * ['vote'],
893
+ * username,
894
+ * (payload) => [voteOperation(payload)],
895
+ * () => console.log('Success!'),
896
+ * {
897
+ * adapter: myAdapter,
898
+ * enableFallback: true,
899
+ * fallbackChain: ['keychain', 'key', 'hivesigner']
900
+ * },
901
+ * 'posting'
902
+ * );
903
+ *
904
+ * // Legacy pattern (still works)
905
+ * const mutation = useBroadcastMutation(
906
+ * ['vote'],
907
+ * username,
908
+ * (payload) => [voteOperation(payload)],
909
+ * () => console.log('Success!'),
910
+ * { postingKey: 'wif-key' }
911
+ * );
912
+ * ```
913
+ */
914
+ declare function useBroadcastMutation<T>(mutationKey: MutationKey | undefined, username: string | undefined, operations: (payload: T) => Operation[], onSuccess?: UseMutationOptions<unknown, Error, T>["onSuccess"], auth?: AuthContextV2, authority?: AuthorityLevel, options?: {
915
+ onMutate?: UseMutationOptions<unknown, Error, T>["onMutate"];
916
+ onError?: UseMutationOptions<unknown, Error, T>["onError"];
917
+ onSettled?: UseMutationOptions<unknown, Error, T>["onSettled"];
918
+ /**
919
+ * Controls whether to wait for block inclusion or just mempool acceptance.
920
+ *
921
+ * - `'sync'` (default): Waits for block inclusion, returns block_num/trx_num.
922
+ * Use for transfers, delegations, account updates, key changes.
923
+ *
924
+ * - `'async'`: Returns after mempool acceptance. Faster but no block confirmation.
925
+ * Use for votes, follows, reblogs, community subscribes, custom_json social ops.
926
+ */
927
+ broadcastMode?: BroadcastMode;
928
+ }): _tanstack_react_query.UseMutationResult<unknown, Error, T, unknown>;
929
+
930
+ declare function broadcastJson<T>(username: string | undefined, id: string, payload: T, auth?: AuthContext): Promise<any>;
931
+
932
+ declare function withTimeoutSignal(timeoutMs: number, signal?: AbortSignal): AbortSignal;
933
+
934
+ /** Timeout for internal API calls (search, private API). */
935
+ declare const INTERNAL_API_TIMEOUT_MS = 10000;
936
+ declare const CONFIG: {
937
+ privateApiHost: string;
938
+ imageHost: string;
939
+ /** Current Hive RPC nodes. Reads from the unified hive-tx config. */
940
+ readonly hiveNodes: string[];
941
+ heliusApiKey: string | undefined;
942
+ queryClient: QueryClient;
943
+ pollsApiHost: string;
944
+ plausibleHost: string;
945
+ spkNode: string;
946
+ dmcaAccounts: string[];
947
+ dmcaTags: string[];
948
+ dmcaPatterns: string[];
949
+ dmcaTagRegexes: RegExp[];
950
+ dmcaPatternRegexes: RegExp[];
951
+ _dmcaInitialized: boolean;
952
+ };
953
+ type DmcaListsInput = {
954
+ accounts?: string[];
955
+ tags?: string[];
956
+ posts?: string[];
957
+ };
958
+ declare namespace ConfigManager {
959
+ function setQueryClient(client: QueryClient): void;
960
+ /**
961
+ * Set the private API host
962
+ * @param host - The private API host URL (e.g., "https://ecency.com" or "" for relative URLs)
963
+ */
964
+ function setPrivateApiHost(host: string): void;
965
+ /**
966
+ * Get a validated base URL for API requests
967
+ * Returns a valid base URL that can be used with new URL(path, baseUrl)
968
+ *
969
+ * Priority:
970
+ * 1. CONFIG.privateApiHost if set (dev/staging or explicit config)
971
+ * 2. window.location.origin if in browser (production with relative URLs)
972
+ * 3. 'https://ecency.com' as fallback for SSR (production default)
973
+ *
974
+ * @returns A valid base URL string
975
+ * @throws Never throws - always returns a valid URL
976
+ */
977
+ function getValidatedBaseUrl(): string;
978
+ /**
979
+ * Set the polls API host
980
+ * @param host - The polls API host URL (e.g., "https://poll.ecency.com")
981
+ */
982
+ function setPollsApiHost(host: string): void;
983
+ /**
984
+ * Set the image host
985
+ * @param host - The image host URL (e.g., "https://images.ecency.com")
986
+ */
987
+ function setImageHost(host: string): void;
988
+ /**
989
+ * Set Hive RPC nodes, replacing the default list.
990
+ * Directly updates the unified hive-tx config object.
991
+ * @param nodes - Array of Hive RPC node URLs
992
+ */
993
+ function setHiveNodes(nodes: string[]): void;
994
+ /**
995
+ * Set DMCA filtering lists
996
+ * @param lists - DMCA lists object containing accounts/tags/posts arrays
997
+ */
998
+ function setDmcaLists(lists?: DmcaListsInput): void;
1057
999
  }
1058
1000
 
1059
1001
  /**
1060
- * Friends list row data
1061
- * The `active` field contains raw timestamp - app should format it
1062
- */
1063
- interface FriendsRow {
1064
- name: string;
1065
- reputation: number;
1066
- active: string;
1067
- }
1068
- /**
1069
- * Friend search result with additional profile information
1070
- * The `active` field contains raw timestamp - app should format it
1002
+ * Chain error handling utilities
1003
+ * Extracted from web's operations.ts and mobile's dhive.ts error handling patterns
1071
1004
  */
1072
- interface FriendSearchResult {
1073
- name: string;
1074
- full_name: string;
1075
- reputation: number;
1076
- active: string;
1005
+ declare enum ErrorType {
1006
+ COMMON = "common",
1007
+ INFO = "info",
1008
+ INSUFFICIENT_RESOURCE_CREDITS = "insufficient_resource_credits",
1009
+ MISSING_AUTHORITY = "missing_authority",
1010
+ TOKEN_EXPIRED = "token_expired",
1011
+ NETWORK = "network",
1012
+ TIMEOUT = "timeout",
1013
+ VALIDATION = "validation"
1077
1014
  }
1078
-
1079
- interface Payload$4 {
1080
- profile: Partial<AccountProfile>;
1081
- tokens: AccountProfile["tokens"];
1015
+ interface ParsedChainError {
1016
+ message: string;
1017
+ type: ErrorType;
1018
+ originalError?: any;
1082
1019
  }
1083
1020
  /**
1084
- * React Query mutation hook for updating account profile metadata.
1021
+ * Parses Hive blockchain errors into standardized format.
1022
+ * Extracted from web's operations.ts and mobile's dhive.ts error handling.
1085
1023
  *
1086
- * This mutation broadcasts an account_update2 operation to update the user's
1087
- * profile information (name, about, location, avatar, cover image, etc.).
1024
+ * @param error - The error object or string from a blockchain operation
1025
+ * @returns Parsed error with user-friendly message and categorized type
1088
1026
  *
1089
- * @param username - The username to update (required for broadcast)
1090
- * @param auth - Authentication context with platform adapter and fallback configuration
1027
+ * @example
1028
+ * ```typescript
1029
+ * try {
1030
+ * await vote(...);
1031
+ * } catch (error) {
1032
+ * const parsed = parseChainError(error);
1033
+ * console.log(parsed.message); // "Insufficient Resource Credits. Please wait or power up."
1034
+ * console.log(parsed.type); // ErrorType.INSUFFICIENT_RESOURCE_CREDITS
1035
+ * }
1036
+ * ```
1037
+ */
1038
+ declare function parseChainError(error: any): ParsedChainError;
1039
+ /**
1040
+ * Formats error for display to user.
1041
+ * Returns tuple of [message, type] for backward compatibility with existing code.
1091
1042
  *
1092
- * @returns React Query mutation result
1043
+ * This function maintains compatibility with the old formatError signature from
1044
+ * web's operations.ts (line 59-84) and mobile's dhive.ts error handling.
1093
1045
  *
1094
- * @remarks
1095
- * **Profile Fields:**
1096
- * - name: Display name
1097
- * - about: Bio/description
1098
- * - location: Location
1099
- * - website: Website URL
1100
- * - profile_image: Avatar URL
1101
- * - cover_image: Cover/banner URL
1102
- * - tokens: Social tokens (Twitter, Facebook, etc.)
1103
- * - version: Profile metadata version (auto-set to 2)
1046
+ * @param error - The error object or string
1047
+ * @returns Tuple of [user-friendly message, error type]
1104
1048
  *
1105
- * **Authentication:**
1106
- * - Uses posting authority (account_update2 operation)
1107
- * - Supports all auth methods via platform adapter
1049
+ * @example
1050
+ * ```typescript
1051
+ * try {
1052
+ * await transfer(...);
1053
+ * } catch (error) {
1054
+ * const [message, type] = formatError(error);
1055
+ * showToast(message, type);
1056
+ * }
1057
+ * ```
1058
+ */
1059
+ declare function formatError(error: any): [string, ErrorType];
1060
+ /**
1061
+ * Checks if error indicates missing authority and should trigger auth fallback.
1062
+ * Used by the SDK's useBroadcastMutation to determine if it should retry with
1063
+ * an alternate authentication method.
1108
1064
  *
1109
- * **Post-Broadcast Actions:**
1110
- * - Optimistically updates account cache with new profile data
1111
- * - Invalidates account cache to refetch from blockchain
1065
+ * @param error - The error object or string
1066
+ * @returns true if auth fallback should be attempted
1112
1067
  *
1113
1068
  * @example
1114
1069
  * ```typescript
1115
- * const updateProfile = useAccountUpdate(username, {
1116
- * adapter: myAdapter,
1117
- * });
1118
- *
1119
- * // Update profile
1120
- * updateProfile.mutate({
1121
- * profile: {
1122
- * name: "John Doe",
1123
- * about: "Hive enthusiast",
1124
- * profile_image: "https://...",
1070
+ * try {
1071
+ * await broadcast(operations);
1072
+ * } catch (error) {
1073
+ * if (shouldTriggerAuthFallback(error)) {
1074
+ * // Try with alternate auth method
1075
+ * await broadcastWithHiveAuth(operations);
1125
1076
  * }
1126
- * });
1077
+ * }
1127
1078
  * ```
1128
1079
  */
1129
- declare function useAccountUpdate(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, Partial<Payload$4>, unknown>;
1130
-
1131
- type Kind = "toggle-ignore" | "toggle-follow";
1132
- declare function useAccountRelationsUpdate(reference: string | undefined, target: string | undefined, auth: AuthContext | undefined, onSuccess: (data: Partial<AccountRelationship> | undefined) => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<{
1133
- ignores: boolean | undefined;
1134
- follows: boolean | undefined;
1135
- is_blacklisted?: boolean | undefined;
1136
- follows_blacklists?: boolean | undefined;
1137
- }, Error, Kind, unknown>;
1138
-
1139
- /**
1140
- * Payload for following an account.
1141
- */
1142
- interface FollowPayload {
1143
- /** Account to follow */
1144
- following: string;
1145
- }
1080
+ declare function shouldTriggerAuthFallback(error: any): boolean;
1146
1081
  /**
1147
- * React Query mutation hook for following an account.
1148
- *
1149
- * This mutation broadcasts a follow operation to the Hive blockchain,
1150
- * adding the target account to the follower's "blog" follow list.
1151
- *
1152
- * @param username - The username of the follower (required for broadcast)
1153
- * @param auth - Authentication context with platform adapter and fallback configuration
1154
- *
1155
- * @returns React Query mutation result
1082
+ * Checks if error is a resource credits (RC) error.
1083
+ * Useful for showing specific UI feedback about RC issues.
1156
1084
  *
1157
- * @remarks
1158
- * **Post-Broadcast Actions:**
1159
- * - Invalidates relationship cache to show updated follow status
1160
- * - Invalidates account cache to refetch updated follower/following counts
1085
+ * @param error - The error object or string
1086
+ * @returns true if the error is related to insufficient RC
1161
1087
  *
1162
1088
  * @example
1163
1089
  * ```typescript
1164
- * const followMutation = useFollow(username, {
1165
- * adapter: myAdapter,
1166
- * enableFallback: true,
1167
- * fallbackChain: ['keychain', 'key', 'hivesigner']
1168
- * });
1169
- *
1170
- * // Follow an account
1171
- * followMutation.mutate({
1172
- * following: 'alice'
1173
- * });
1090
+ * try {
1091
+ * await vote(...);
1092
+ * } catch (error) {
1093
+ * if (isResourceCreditsError(error)) {
1094
+ * showRCWarning(); // Show specific RC education/power up UI
1095
+ * }
1096
+ * }
1174
1097
  * ```
1175
1098
  */
1176
- declare function useFollow(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, FollowPayload, unknown>;
1177
-
1099
+ declare function isResourceCreditsError(error: any): boolean;
1178
1100
  /**
1179
- * Payload for unfollowing an account.
1101
+ * Checks if error is informational (not critical).
1102
+ * Informational errors typically don't need retry logic.
1103
+ *
1104
+ * @param error - The error object or string
1105
+ * @returns true if the error is informational
1180
1106
  */
1181
- interface UnfollowPayload {
1182
- /** Account to unfollow */
1183
- following: string;
1184
- }
1107
+ declare function isInfoError(error: any): boolean;
1185
1108
  /**
1186
- * React Query mutation hook for unfollowing an account.
1187
- *
1188
- * This mutation broadcasts an unfollow operation to the Hive blockchain,
1189
- * removing the target account from the follower's follow list.
1190
- *
1191
- * @param username - The username of the follower (required for broadcast)
1192
- * @param auth - Authentication context with platform adapter and fallback configuration
1193
- *
1194
- * @returns React Query mutation result
1195
- *
1196
- * @remarks
1197
- * **Post-Broadcast Actions:**
1198
- * - Invalidates relationship cache to show updated follow status
1199
- * - Invalidates account cache to refetch updated follower/following counts
1200
- *
1201
- * @example
1202
- * ```typescript
1203
- * const unfollowMutation = useUnfollow(username, {
1204
- * adapter: myAdapter,
1205
- * enableFallback: true,
1206
- * fallbackChain: ['keychain', 'key', 'hivesigner']
1207
- * });
1109
+ * Checks if error is network-related and should be retried.
1208
1110
  *
1209
- * // Unfollow an account
1210
- * unfollowMutation.mutate({
1211
- * following: 'alice'
1212
- * });
1213
- * ```
1111
+ * @param error - The error object or string
1112
+ * @returns true if the error is network-related
1214
1113
  */
1215
- declare function useUnfollow(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, UnfollowPayload, unknown>;
1114
+ declare function isNetworkError(error: any): boolean;
1216
1115
 
1217
- interface Payload$3 {
1218
- author: string;
1219
- permlink: string;
1116
+ declare function makeQueryClient(): QueryClient;
1117
+ declare const getQueryClient: () => QueryClient;
1118
+ declare namespace EcencyQueriesManager {
1119
+ function getQueryData<T>(queryKey: QueryKey): T | undefined;
1120
+ function getInfiniteQueryData<T>(queryKey: QueryKey): InfiniteData<T, unknown> | undefined;
1121
+ function prefetchQuery<T>(options: UseQueryOptions<T>): Promise<T | undefined>;
1122
+ function prefetchInfiniteQuery<T, P>(options: UseInfiniteQueryOptions<T, Error, InfiniteData<T>, QueryKey, P>): Promise<InfiniteData<T, unknown> | undefined>;
1123
+ function generateClientServerQuery<T>(options: UseQueryOptions<T>): {
1124
+ prefetch: () => Promise<T | undefined>;
1125
+ getData: () => T | undefined;
1126
+ useClientQuery: () => _tanstack_react_query.UseQueryResult<_tanstack_react_query.NoInfer<T>, Error>;
1127
+ fetchAndGet: () => Promise<T>;
1128
+ };
1129
+ function generateClientServerInfiniteQuery<T, P>(options: UseInfiniteQueryOptions<T, Error, InfiniteData<T>, QueryKey, P>): {
1130
+ prefetch: () => Promise<InfiniteData<T, unknown> | undefined>;
1131
+ getData: () => InfiniteData<T, unknown> | undefined;
1132
+ useClientQuery: () => _tanstack_react_query.UseInfiniteQueryResult<InfiniteData<T, unknown>, Error>;
1133
+ fetchAndGet: () => Promise<InfiniteData<T, P>>;
1134
+ };
1220
1135
  }
1221
- declare function useBookmarkAdd(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, Payload$3, unknown>;
1222
1136
 
1223
- declare function useBookmarkDelete(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
1137
+ declare function getDynamicPropsQueryOptions(): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<DynamicProps$1, Error, DynamicProps$1, string[]>, "queryFn"> & {
1138
+ queryFn?: _tanstack_react_query.QueryFunction<DynamicProps$1, string[], never> | undefined;
1139
+ } & {
1140
+ queryKey: string[] & {
1141
+ [dataTagSymbol]: DynamicProps$1;
1142
+ [dataTagErrorSymbol]: Error;
1143
+ };
1144
+ };
1224
1145
 
1225
- declare function useAccountFavoriteAdd(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
1146
+ interface RewardFund {
1147
+ id: number;
1148
+ name: string;
1149
+ reward_balance: string;
1150
+ recent_claims: string;
1151
+ last_update: string;
1152
+ content_constant: string;
1153
+ percent_curation_rewards: number;
1154
+ percent_content_rewards: number;
1155
+ author_reward_curve: string;
1156
+ curation_reward_curve: string;
1157
+ }
1158
+ /**
1159
+ * Get reward fund information from the blockchain
1160
+ * @param fundName - Name of the reward fund (default: 'post')
1161
+ */
1162
+ declare function getRewardFundQueryOptions(fundName?: string): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<RewardFund, Error, RewardFund, string[]>, "queryFn"> & {
1163
+ queryFn?: _tanstack_react_query.QueryFunction<RewardFund, string[], never> | undefined;
1164
+ } & {
1165
+ queryKey: string[] & {
1166
+ [dataTagSymbol]: RewardFund;
1167
+ [dataTagErrorSymbol]: Error;
1168
+ };
1169
+ };
1226
1170
 
1227
- declare function useAccountFavoriteDelete(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, {
1228
- previousList: AccountFavorite[] | undefined;
1229
- previousInfinite: Map<readonly unknown[], InfiniteData<WrappedResponse<AccountFavorite>, unknown> | undefined>;
1230
- previousCheck: boolean | undefined;
1231
- } | undefined>;
1171
+ declare const QueryKeys: {
1172
+ readonly posts: {
1173
+ readonly entry: (entryPath: string) => string[];
1174
+ readonly postHeader: (author: string, permlink?: string) => (string | undefined)[];
1175
+ readonly content: (author: string, permlink: string) => string[];
1176
+ readonly contentReplies: (author: string, permlink: string) => string[];
1177
+ readonly accountPosts: (username: string, filter: string, limit: number, observer: string) => (string | number)[];
1178
+ readonly accountPostsPage: (username: string, filter: string, startAuthor: string, startPermlink: string, limit: number, observer: string) => (string | number)[];
1179
+ readonly userPostVote: (username: string, author: string, permlink: string) => string[];
1180
+ readonly reblogs: (username: string, limit: number) => (string | number)[];
1181
+ readonly entryActiveVotes: (author?: string, permlink?: string) => (string | undefined)[];
1182
+ readonly rebloggedBy: (author: string, permlink: string) => string[];
1183
+ readonly tips: (author: string, permlink: string) => string[];
1184
+ readonly normalize: (author: string, permlink: string) => string[];
1185
+ readonly drafts: (activeUsername?: string) => (string | undefined)[];
1186
+ readonly draftsInfinite: (activeUsername?: string, limit?: number) => unknown[];
1187
+ readonly schedules: (activeUsername?: string) => (string | undefined)[];
1188
+ readonly schedulesInfinite: (activeUsername?: string, limit?: number) => unknown[];
1189
+ readonly fragments: (username?: string) => (string | undefined)[];
1190
+ readonly fragmentsInfinite: (username?: string, limit?: number) => unknown[];
1191
+ readonly images: (username?: string) => (string | undefined)[];
1192
+ readonly galleryImages: (activeUsername?: string) => (string | undefined)[];
1193
+ readonly imagesInfinite: (username?: string, limit?: number) => unknown[];
1194
+ readonly promoted: (type: string) => string[];
1195
+ readonly _promotedPrefix: readonly ["posts", "promoted"];
1196
+ readonly accountPostsBlogPrefix: (username: string) => readonly ["posts", "account-posts", string, "blog"];
1197
+ readonly postsRanked: (sort: string, tag: string, limit: number, observer: string) => (string | number)[];
1198
+ readonly postsRankedPage: (sort: string, startAuthor: string, startPermlink: string, limit: number, tag: string, observer: string) => (string | number)[];
1199
+ readonly discussions: (author: string, permlink: string, order: string, observer: string) => string[];
1200
+ readonly discussion: (author: string, permlink: string, observer: string) => string[];
1201
+ readonly deletedEntry: (entryPath: string) => string[];
1202
+ readonly commentHistory: (author: string, permlink: string, onlyMeta: boolean) => (string | boolean)[];
1203
+ readonly trendingTags: () => string[];
1204
+ readonly trendingTagsWithStats: (limit: number) => (string | number)[];
1205
+ readonly wavesByHost: (host: string) => string[];
1206
+ readonly wavesByTag: (host: string, tag: string) => string[];
1207
+ readonly wavesFollowing: (host: string, username: string) => string[];
1208
+ readonly wavesTrendingTags: (host: string, hours: number) => (string | number)[];
1209
+ readonly wavesByAccount: (host: string, username: string) => string[];
1210
+ readonly wavesTrendingAuthors: (host: string) => string[];
1211
+ readonly _prefix: readonly ["posts"];
1212
+ };
1213
+ readonly accounts: {
1214
+ readonly full: (username?: string) => (string | undefined)[];
1215
+ readonly list: (...usernames: string[]) => string[];
1216
+ readonly friends: (following: string, mode: string, followType: string, limit: number) => (string | number)[];
1217
+ readonly searchFriends: (username: string, mode: string, query: string) => string[];
1218
+ readonly subscriptions: (username: string) => string[];
1219
+ readonly followCount: (username: string) => string[];
1220
+ readonly recoveries: (username: string) => string[];
1221
+ readonly pendingRecovery: (username: string) => string[];
1222
+ readonly checkWalletPending: (username: string, code: string | null) => (string | null)[];
1223
+ readonly mutedUsers: (username: string) => string[];
1224
+ readonly following: (follower: string, startFollowing: string, followType: string, limit: number) => (string | number)[];
1225
+ readonly followers: (following: string, startFollower: string, followType: string, limit: number) => (string | number)[];
1226
+ readonly search: (query: string, excludeList?: string[]) => (string | string[] | undefined)[];
1227
+ readonly profiles: (accounts: string[], observer: string) => (string | string[])[];
1228
+ readonly lookup: (query: string, limit: number) => (string | number)[];
1229
+ readonly transactions: (username: string, group: string, limit: number) => (string | number)[];
1230
+ readonly favorites: (activeUsername?: string) => (string | undefined)[];
1231
+ readonly favoritesInfinite: (activeUsername?: string, limit?: number) => unknown[];
1232
+ readonly checkFavorite: (activeUsername: string, targetUsername: string) => string[];
1233
+ readonly relations: (reference: string, target: string) => string[];
1234
+ readonly bots: () => string[];
1235
+ readonly voteHistory: (username: string, limit: number) => (string | number)[];
1236
+ readonly reputations: (query: string, limit: number) => (string | number)[];
1237
+ readonly bookmarks: (activeUsername?: string) => (string | undefined)[];
1238
+ readonly bookmarksInfinite: (activeUsername?: string, limit?: number) => unknown[];
1239
+ readonly referrals: (username: string) => string[];
1240
+ readonly referralsStats: (username: string) => string[];
1241
+ readonly _prefix: readonly ["accounts"];
1242
+ };
1243
+ readonly notifications: {
1244
+ readonly announcements: () => string[];
1245
+ readonly list: (activeUsername?: string, filter?: string) => (string | undefined)[];
1246
+ readonly unreadCount: (activeUsername?: string) => (string | undefined)[];
1247
+ readonly settings: (activeUsername?: string) => (string | undefined)[];
1248
+ readonly _prefix: readonly ["notifications"];
1249
+ };
1250
+ readonly core: {
1251
+ readonly rewardFund: (fundName: string) => string[];
1252
+ readonly dynamicProps: () => string[];
1253
+ readonly chainProperties: () => string[];
1254
+ readonly _prefix: readonly ["core"];
1255
+ };
1256
+ readonly communities: {
1257
+ readonly single: (name?: string, observer?: string) => (string | undefined)[];
1258
+ /** Prefix key for matching all observer variants of a community */
1259
+ readonly singlePrefix: (name: string) => readonly ["community", "single", string];
1260
+ readonly context: (username: string, communityName: string) => string[];
1261
+ readonly rewarded: () => string[];
1262
+ readonly list: (sort: string, query: string, limit: number) => (string | number)[];
1263
+ readonly subscribers: (communityName: string) => string[];
1264
+ readonly accountNotifications: (account: string, limit: number) => (string | number)[];
1265
+ };
1266
+ readonly proposals: {
1267
+ readonly list: () => string[];
1268
+ readonly proposal: (id: number) => (string | number)[];
1269
+ readonly votes: (proposalId: number, voter: string, limit: number) => (string | number)[];
1270
+ readonly votesPrefix: (proposalId: number) => readonly ["proposals", "votes", number];
1271
+ readonly votesByUser: (voter: string) => string[];
1272
+ };
1273
+ readonly search: {
1274
+ readonly topics: (q: string, limit: number) => (string | number)[];
1275
+ readonly path: (q: string) => string[];
1276
+ readonly account: (q: string, limit: number) => (string | number)[];
1277
+ readonly results: (q: string, sort: string, hideLow: boolean | string, since?: string, scrollId?: string, votes?: number) => readonly ["search", string, string, boolean, string | undefined, string | undefined, number | undefined];
1278
+ readonly controversialRising: (what: string, tag: string) => string[];
1279
+ readonly similarEntries: (author: string, permlink: string, query: string) => string[];
1280
+ readonly api: (q: string, sort: string, hideLow: boolean, since?: string, votes?: number) => (string | number | boolean | undefined)[];
1281
+ };
1282
+ readonly witnesses: {
1283
+ readonly list: (limit: number) => (string | number)[];
1284
+ readonly votes: (username: string | undefined) => (string | undefined)[];
1285
+ readonly proxy: () => string[];
1286
+ readonly voters: (witness: string, pageSize: number) => (string | number)[];
1287
+ readonly voterCount: (witness: string) => string[];
1288
+ };
1289
+ readonly wallet: {
1290
+ readonly outgoingRcDelegations: (username: string, limit: number) => (string | number)[];
1291
+ readonly vestingDelegations: (username: string, limit: number) => (string | number)[];
1292
+ readonly withdrawRoutes: (account: string) => string[];
1293
+ readonly incomingRc: (username: string) => string[];
1294
+ readonly conversionRequests: (account: string) => string[];
1295
+ readonly receivedVestingShares: (username: string) => string[];
1296
+ readonly savingsWithdraw: (account: string) => string[];
1297
+ readonly openOrders: (user: string) => string[];
1298
+ readonly collateralizedConversionRequests: (account: string) => string[];
1299
+ readonly recurrentTransfers: (username: string) => string[];
1300
+ readonly balanceHistory: (username: string, coinType: string, pageSize: number) => (string | number)[];
1301
+ readonly aggregatedHistory: (username: string, coinType: string) => string[];
1302
+ readonly portfolio: (username: string, onlyEnabled: string, currency: string) => string[];
1303
+ };
1304
+ readonly assets: {
1305
+ readonly hiveGeneralInfo: (username: string) => string[];
1306
+ readonly hiveTransactions: (username: string, limit: number, filterKey: string) => (string | number)[];
1307
+ readonly hiveWithdrawalRoutes: (username: string) => string[];
1308
+ readonly hiveMetrics: (bucketSeconds: number) => (string | number)[];
1309
+ readonly hbdGeneralInfo: (username: string) => string[];
1310
+ readonly hbdTransactions: (username: string, limit: number, filterKey: string) => (string | number)[];
1311
+ readonly hivePowerGeneralInfo: (username: string) => string[];
1312
+ readonly hivePowerDelegates: (username: string) => string[];
1313
+ readonly hivePowerDelegatings: (username: string) => string[];
1314
+ readonly hivePowerTransactions: (username: string, limit: number, filterKey: string) => (string | number)[];
1315
+ readonly pointsGeneralInfo: (username: string) => string[];
1316
+ readonly pointsTransactions: (username: string, type: string) => string[];
1317
+ readonly ecencyAssetInfo: (username: string, asset: string, currency: string) => string[];
1318
+ };
1319
+ readonly market: {
1320
+ readonly statistics: () => string[];
1321
+ readonly orderBook: (limit: number) => (string | number)[];
1322
+ readonly history: (seconds: number, startDate: number, endDate: number) => (string | number)[];
1323
+ readonly feedHistory: () => string[];
1324
+ readonly hiveHbdStats: () => string[];
1325
+ readonly data: (coin: string, vsCurrency: string, fromTs: number, toTs: number) => (string | number)[];
1326
+ readonly tradeHistory: (limit: number, start: number, end: number) => (string | number)[];
1327
+ readonly currentMedianHistoryPrice: () => string[];
1328
+ };
1329
+ readonly analytics: {
1330
+ readonly discoverCuration: (duration: string) => string[];
1331
+ readonly pageStats: (url: string, dimensions: string, metrics: string, dateRange: string) => string[];
1332
+ readonly discoverLeaderboard: (duration: string) => string[];
1333
+ };
1334
+ readonly promotions: {
1335
+ readonly promotePrice: () => string[];
1336
+ readonly boostPlusPrices: () => string[];
1337
+ readonly boostPlusAccounts: (account: string) => string[];
1338
+ };
1339
+ readonly resourceCredits: {
1340
+ readonly account: (username: string) => string[];
1341
+ readonly stats: () => string[];
1342
+ };
1343
+ readonly points: {
1344
+ readonly points: (username: string, filter: number) => (string | number)[];
1345
+ readonly _prefix: (username: string) => string[];
1346
+ };
1347
+ readonly polls: {
1348
+ readonly details: (author: string, permlink: string) => string[];
1349
+ readonly _prefix: readonly ["polls"];
1350
+ };
1351
+ readonly operations: {
1352
+ readonly chainProperties: () => string[];
1353
+ };
1354
+ readonly games: {
1355
+ readonly statusCheck: (gameType: string, username: string) => string[];
1356
+ };
1357
+ readonly badActors: {
1358
+ readonly list: () => string[];
1359
+ readonly _prefix: readonly ["bad-actors"];
1360
+ };
1361
+ readonly ai: {
1362
+ readonly prices: () => readonly ["ai", "prices"];
1363
+ readonly assistPrices: (username?: string) => readonly ["ai", "assist-prices", string | undefined];
1364
+ readonly _prefix: readonly ["ai"];
1365
+ };
1366
+ };
1232
1367
 
1233
- interface Keys {
1234
- owner: PrivateKey;
1235
- active: PrivateKey;
1236
- posting: PrivateKey;
1237
- memo_key: PrivateKey;
1368
+ declare function encodeObj(o: any): string;
1369
+ declare function decodeObj(o: any): any;
1370
+
1371
+ declare enum Symbol {
1372
+ HIVE = "HIVE",
1373
+ HBD = "HBD",
1374
+ VESTS = "VESTS",
1375
+ SPK = "SPK"
1238
1376
  }
1239
- interface Payload$2 {
1240
- keepCurrent?: boolean;
1241
- currentKey: PrivateKey;
1242
- keys: Keys[];
1243
- keysToRevoke?: string[];
1244
- keysToRevokeByAuthority?: Partial<Record<keyof Keys, string[]>>;
1377
+ declare enum NaiMap {
1378
+ "@@000000021" = "HIVE",
1379
+ "@@000000013" = "HBD",
1380
+ "@@000000037" = "VESTS"
1245
1381
  }
1246
- declare function dedupeAndSortKeyAuths(existing: Authority["key_auths"], additions: [string, number][]): Authority["key_auths"];
1247
- type UpdateKeyAuthsOptions = Pick<UseMutationOptions<unknown, Error, Payload$2>, "onSuccess" | "onError">;
1248
- declare function useAccountUpdateKeyAuths(username: string, options?: UpdateKeyAuthsOptions): _tanstack_react_query.UseMutationResult<TransactionConfirmation, Error, Payload$2, unknown>;
1382
+ interface Asset {
1383
+ amount: number;
1384
+ symbol: Symbol;
1385
+ }
1386
+ declare function parseAsset(sval: string | SMTAsset): Asset;
1249
1387
 
1250
- /**
1251
- * Authority levels for Hive blockchain operations.
1252
- * - posting: Social operations (voting, commenting, reblogging)
1253
- * - active: Financial and account management operations
1254
- * - owner: Critical security operations (key changes, account recovery)
1255
- * - memo: Memo encryption/decryption (rarely used for signing)
1256
- */
1257
- type AuthorityLevel = 'posting' | 'active' | 'owner' | 'memo';
1258
- /**
1259
- * Maps operation types to their required authority level.
1260
- *
1261
- * This mapping is used to determine which key is needed to sign a transaction,
1262
- * enabling smart auth fallback and auth upgrade UI.
1263
- *
1264
- * @remarks
1265
- * - Most social operations (vote, comment, reblog) require posting authority
1266
- * - Financial operations (transfer, withdraw) require active authority
1267
- * - Account management operations require active authority
1268
- * - Security operations (password change, account recovery) require owner authority
1269
- * - custom_json requires dynamic detection based on required_auths vs required_posting_auths
1270
- */
1271
- declare const OPERATION_AUTHORITY_MAP: Record<string, AuthorityLevel>;
1272
- /**
1273
- * Determines authority required for a custom_json operation.
1274
- *
1275
- * Custom JSON operations can require either posting or active authority
1276
- * depending on which field is populated:
1277
- * - required_auths (active authority)
1278
- * - required_posting_auths (posting authority)
1279
- *
1280
- * @param customJsonOp - The custom_json operation to inspect
1281
- * @returns 'active' if requires active authority, 'posting' if requires posting authority
1282
- *
1283
- * @example
1284
- * ```typescript
1285
- * // Reblog operation (posting authority)
1286
- * const reblogOp: Operation = ['custom_json', {
1287
- * required_auths: [],
1288
- * required_posting_auths: ['alice'],
1289
- * id: 'reblog',
1290
- * json: '...'
1291
- * }];
1292
- * getCustomJsonAuthority(reblogOp); // Returns 'posting'
1293
- *
1294
- * // Some active authority custom_json
1295
- * const activeOp: Operation = ['custom_json', {
1296
- * required_auths: ['alice'],
1297
- * required_posting_auths: [],
1298
- * id: 'some_active_op',
1299
- * json: '...'
1300
- * }];
1301
- * getCustomJsonAuthority(activeOp); // Returns 'active'
1302
- * ```
1303
- */
1304
- declare function getCustomJsonAuthority(customJsonOp: Operation): AuthorityLevel;
1305
- /**
1306
- * Determines authority required for a proposal operation.
1307
- *
1308
- * Proposal operations (create_proposal, update_proposal) typically require
1309
- * active authority as they involve financial commitments and funding allocations.
1310
- *
1311
- * @param proposalOp - The proposal operation to inspect
1312
- * @returns 'active' authority requirement
1313
- *
1314
- * @remarks
1315
- * Unlike custom_json, proposal operations don't have explicit required_auths fields.
1316
- * They always use the creator's authority, which defaults to active for financial
1317
- * operations involving the DAO treasury.
1318
- *
1319
- * @example
1320
- * ```typescript
1321
- * const proposalOp: Operation = ['create_proposal', {
1322
- * creator: 'alice',
1323
- * receiver: 'bob',
1324
- * subject: 'My Proposal',
1325
- * permlink: 'my-proposal',
1326
- * start: '2026-03-01T00:00:00',
1327
- * end: '2026-04-01T00:00:00',
1328
- * daily_pay: '100.000 HBD',
1329
- * extensions: []
1330
- * }];
1331
- * getProposalAuthority(proposalOp); // Returns 'active'
1332
- * ```
1333
- */
1334
- declare function getProposalAuthority(proposalOp: Operation): AuthorityLevel;
1335
- /**
1336
- * Determines the required authority level for any operation.
1337
- *
1338
- * Uses the OPERATION_AUTHORITY_MAP for standard operations, and dynamic
1339
- * detection for custom_json operations.
1340
- *
1341
- * @param op - The operation to check
1342
- * @returns 'posting' or 'active' authority requirement
1343
- *
1344
- * @example
1345
- * ```typescript
1346
- * const voteOp: Operation = ['vote', { voter: 'alice', author: 'bob', permlink: 'post', weight: 10000 }];
1347
- * getOperationAuthority(voteOp); // Returns 'posting'
1348
- *
1349
- * const transferOp: Operation = ['transfer', { from: 'alice', to: 'bob', amount: '1.000 HIVE', memo: '' }];
1350
- * getOperationAuthority(transferOp); // Returns 'active'
1351
- * ```
1352
- */
1353
- declare function getOperationAuthority(op: Operation): AuthorityLevel;
1354
- /**
1355
- * Determines the highest authority level required for a list of operations.
1356
- *
1357
- * Useful when broadcasting multiple operations together - the highest authority
1358
- * level required by any operation determines what key is needed for the batch.
1359
- *
1360
- * Authority hierarchy: owner > active > posting > memo
1361
- *
1362
- * @param ops - Array of operations
1363
- * @returns Highest authority level required ('owner', 'active', or 'posting')
1364
- *
1365
- * @example
1366
- * ```typescript
1367
- * const ops: Operation[] = [
1368
- * ['vote', { ... }], // posting
1369
- * ['comment', { ... }], // posting
1370
- * ];
1371
- * getRequiredAuthority(ops); // Returns 'posting'
1372
- *
1373
- * const mixedOps: Operation[] = [
1374
- * ['comment', { ... }], // posting
1375
- * ['transfer', { ... }], // active
1376
- * ];
1377
- * getRequiredAuthority(mixedOps); // Returns 'active'
1378
- *
1379
- * const securityOps: Operation[] = [
1380
- * ['transfer', { ... }], // active
1381
- * ['change_recovery_account', { ... }], // owner
1382
- * ];
1383
- * getRequiredAuthority(securityOps); // Returns 'owner'
1384
- * ```
1385
- */
1386
- declare function getRequiredAuthority(ops: Operation[]): AuthorityLevel;
1388
+ declare function getBoundFetch(): typeof fetch;
1389
+
1390
+ declare function isCommunity(value: unknown): boolean;
1387
1391
 
1388
1392
  /**
1389
- * Broadcast mode controls whether the SDK waits for block inclusion.
1390
- *
1391
- * - `'sync'` (default): Uses `broadcast_transaction_synchronous` — waits for
1392
- * the transaction to be included in a block and returns `block_num`/`trx_num`.
1393
- * **Use for:** transfers, account updates, key changes, delegations, conversions.
1394
- *
1395
- * - `'async'`: Uses `broadcast_transaction` — returns as soon as the node
1396
- * accepts the transaction into its mempool. Transport and RPC errors are
1397
- * still thrown immediately; the only thing skipped is the block-inclusion wait.
1398
- * **Use for:** votes, follows/unfollows, reblogs, community subscribe/unsubscribe,
1399
- * custom_json social operations where faster response matters more than confirmation.
1393
+ * Type guard to check if response is wrapped with pagination metadata
1400
1394
  */
1401
- type BroadcastMode = 'sync' | 'async';
1395
+ declare function isWrappedResponse<T>(response: any): response is WrappedResponse<T>;
1402
1396
  /**
1403
- * React Query mutation hook for broadcasting Hive operations.
1404
- * Supports multiple authentication methods with automatic fallback.
1405
- *
1406
- * @template T - Type of the mutation payload
1407
- * @param mutationKey - React Query mutation key for cache management
1408
- * @param username - Hive username (required for broadcast)
1409
- * @param operations - Function that converts payload to Hive operations
1410
- * @param onSuccess - Success callback after broadcast completes
1411
- * @param auth - Authentication context (supports both legacy AuthContext and new AuthContextV2)
1412
- * @param authority - Key authority to use ('posting' | 'active' | 'owner' | 'memo'), defaults to 'posting'
1413
- *
1414
- * @returns React Query mutation result
1415
- *
1416
- * @remarks
1417
- * **Authentication Flow:**
1418
- *
1419
- * 1. **With AuthContextV2 + adapter + enableFallback** (recommended for new code):
1420
- * - Tries auth methods in fallbackChain order
1421
- * - Smart fallback: only retries on auth errors, not RC/network errors
1422
- * - Uses platform adapter for storage, UI, and broadcasting
1423
- *
1424
- * 2. **With legacy AuthContext** (backward compatible):
1425
- * - Tries auth.broadcast() first (custom implementation)
1426
- * - Falls back to postingKey if available
1427
- * - Falls back to accessToken (HiveSigner) if available
1428
- * - Throws if no auth method available
1429
- *
1430
- * **Backward Compatibility:**
1431
- * - All existing code using AuthContext will continue to work
1432
- * - AuthContextV2 extends AuthContext, so it's a drop-in replacement
1433
- * - enableFallback defaults to false if no adapter provided
1434
- *
1435
- * @example
1436
- * ```typescript
1437
- * // New pattern with platform adapter and fallback
1438
- * const mutation = useBroadcastMutation(
1439
- * ['vote'],
1440
- * username,
1441
- * (payload) => [voteOperation(payload)],
1442
- * () => console.log('Success!'),
1443
- * {
1444
- * adapter: myAdapter,
1445
- * enableFallback: true,
1446
- * fallbackChain: ['keychain', 'key', 'hivesigner']
1447
- * },
1448
- * 'posting'
1449
- * );
1450
- *
1451
- * // Legacy pattern (still works)
1452
- * const mutation = useBroadcastMutation(
1453
- * ['vote'],
1454
- * username,
1455
- * (payload) => [voteOperation(payload)],
1456
- * () => console.log('Success!'),
1457
- * { postingKey: 'wif-key' }
1458
- * );
1459
- * ```
1397
+ * Normalize response to wrapped format for backwards compatibility
1398
+ * If the backend returns old format (array), convert it to wrapped format
1460
1399
  */
1461
- declare function useBroadcastMutation<T>(mutationKey: MutationKey | undefined, username: string | undefined, operations: (payload: T) => Operation[], onSuccess?: UseMutationOptions<unknown, Error, T>["onSuccess"], auth?: AuthContextV2, authority?: AuthorityLevel, options?: {
1462
- onMutate?: UseMutationOptions<unknown, Error, T>["onMutate"];
1463
- onError?: UseMutationOptions<unknown, Error, T>["onError"];
1464
- onSettled?: UseMutationOptions<unknown, Error, T>["onSettled"];
1465
- /**
1466
- * Controls whether to wait for block inclusion or just mempool acceptance.
1467
- *
1468
- * - `'sync'` (default): Waits for block inclusion, returns block_num/trx_num.
1469
- * Use for transfers, delegations, account updates, key changes.
1470
- *
1471
- * - `'async'`: Returns after mempool acceptance. Faster but no block confirmation.
1472
- * Use for votes, follows, reblogs, community subscribes, custom_json social ops.
1473
- */
1474
- broadcastMode?: BroadcastMode;
1475
- }): _tanstack_react_query.UseMutationResult<unknown, Error, T, unknown>;
1400
+ declare function normalizeToWrappedResponse<T>(response: T[] | WrappedResponse<T>, limit: number): WrappedResponse<T>;
1401
+
1402
+ declare function vestsToHp(vests: number, hivePerMVests: number): number;
1403
+
1404
+ declare function isEmptyDate(s: string | undefined): boolean;
1405
+
1406
+ interface AccountFollowStats {
1407
+ follower_count: number;
1408
+ following_count: number;
1409
+ account: string;
1410
+ }
1411
+
1412
+ interface AccountReputation {
1413
+ account: string;
1414
+ reputation: number;
1415
+ }
1476
1416
 
1477
- declare function broadcastJson<T>(username: string | undefined, id: string, payload: T, auth?: AuthContext): Promise<any>;
1417
+ interface AccountProfile {
1418
+ about?: string;
1419
+ cover_image?: string;
1420
+ location?: string;
1421
+ name?: string;
1422
+ profile_image?: string;
1423
+ website?: string;
1424
+ pinned?: string;
1425
+ reputation?: number;
1426
+ version?: number;
1427
+ beneficiary?: {
1428
+ account: string;
1429
+ weight: number;
1430
+ };
1431
+ tokens?: {
1432
+ symbol: string;
1433
+ type: string;
1434
+ meta: Record<string, any>;
1435
+ }[];
1436
+ }
1478
1437
 
1479
- declare function withTimeoutSignal(timeoutMs: number, signal?: AbortSignal): AbortSignal;
1438
+ interface FullAccount {
1439
+ name: string;
1440
+ owner: Authority;
1441
+ active: Authority;
1442
+ posting: Authority;
1443
+ memo_key: string;
1444
+ post_count: number;
1445
+ created: string;
1446
+ reputation: string | number;
1447
+ json_metadata: string;
1448
+ posting_json_metadata: string;
1449
+ last_vote_time: string;
1450
+ last_post: string;
1451
+ reward_hbd_balance: string;
1452
+ reward_vesting_hive: string;
1453
+ reward_hive_balance: string;
1454
+ reward_vesting_balance: string;
1455
+ balance: string;
1456
+ vesting_shares: string;
1457
+ hbd_balance: string;
1458
+ savings_balance: string;
1459
+ savings_hbd_balance: string;
1460
+ savings_hbd_seconds: string;
1461
+ savings_hbd_last_interest_payment: string;
1462
+ savings_hbd_seconds_last_update: string;
1463
+ next_vesting_withdrawal: string;
1464
+ pending_claimed_accounts: number;
1465
+ delegated_vesting_shares: string;
1466
+ received_vesting_shares: string;
1467
+ vesting_withdraw_rate: string;
1468
+ to_withdraw: string;
1469
+ withdrawn: string;
1470
+ witness_votes: string[];
1471
+ proxy: string;
1472
+ recovery_account: string;
1473
+ proxied_vsf_votes: number[] | string[];
1474
+ voting_manabar: {
1475
+ current_mana: string | number;
1476
+ last_update_time: number;
1477
+ };
1478
+ voting_power: number;
1479
+ downvote_manabar: {
1480
+ current_mana: string | number;
1481
+ last_update_time: number;
1482
+ };
1483
+ profile?: AccountProfile;
1484
+ follow_stats?: AccountFollowStats;
1485
+ proxyVotes?: [];
1486
+ }
1480
1487
 
1481
- /** Timeout for internal API calls (search, private API). */
1482
- declare const INTERNAL_API_TIMEOUT_MS = 10000;
1483
- declare const CONFIG: {
1484
- privateApiHost: string;
1485
- imageHost: string;
1486
- /** Current Hive RPC nodes. Reads from the unified hive-tx config. */
1487
- readonly hiveNodes: string[];
1488
- heliusApiKey: string | undefined;
1489
- queryClient: QueryClient;
1490
- plausibleHost: string;
1491
- spkNode: string;
1492
- dmcaAccounts: string[];
1493
- dmcaTags: string[];
1494
- dmcaPatterns: string[];
1495
- dmcaTagRegexes: RegExp[];
1496
- dmcaPatternRegexes: RegExp[];
1497
- _dmcaInitialized: boolean;
1498
- };
1499
- type DmcaListsInput = {
1500
- accounts?: string[];
1501
- tags?: string[];
1502
- posts?: string[];
1503
- };
1504
- declare namespace ConfigManager {
1505
- function setQueryClient(client: QueryClient): void;
1506
- /**
1507
- * Set the private API host
1508
- * @param host - The private API host URL (e.g., "https://ecency.com" or "" for relative URLs)
1509
- */
1510
- function setPrivateApiHost(host: string): void;
1511
- /**
1512
- * Get a validated base URL for API requests
1513
- * Returns a valid base URL that can be used with new URL(path, baseUrl)
1514
- *
1515
- * Priority:
1516
- * 1. CONFIG.privateApiHost if set (dev/staging or explicit config)
1517
- * 2. window.location.origin if in browser (production with relative URLs)
1518
- * 3. 'https://ecency.com' as fallback for SSR (production default)
1519
- *
1520
- * @returns A valid base URL string
1521
- * @throws Never throws - always returns a valid URL
1522
- */
1523
- function getValidatedBaseUrl(): string;
1524
- /**
1525
- * Set the image host
1526
- * @param host - The image host URL (e.g., "https://images.ecency.com")
1527
- */
1528
- function setImageHost(host: string): void;
1529
- /**
1530
- * Set Hive RPC nodes, replacing the default list.
1531
- * Directly updates the unified hive-tx config object.
1532
- * @param nodes - Array of Hive RPC node URLs
1533
- */
1534
- function setHiveNodes(nodes: string[]): void;
1535
- /**
1536
- * Set DMCA filtering lists
1537
- * @param lists - DMCA lists object containing accounts/tags/posts arrays
1538
- */
1539
- function setDmcaLists(lists?: DmcaListsInput): void;
1488
+ interface AccountRelationship {
1489
+ follows: boolean;
1490
+ ignores: boolean;
1491
+ is_blacklisted: boolean;
1492
+ follows_blacklists: boolean;
1493
+ }
1494
+
1495
+ interface AccountBookmark {
1496
+ _id: string;
1497
+ author: string;
1498
+ permlink: string;
1499
+ timestamp: number;
1500
+ created: string;
1501
+ }
1502
+
1503
+ interface AccountFavorite {
1504
+ _id: string;
1505
+ account: string;
1506
+ timestamp: number;
1507
+ }
1508
+
1509
+ interface Recoveries {
1510
+ username: string;
1511
+ email: string;
1512
+ publicKeys: Record<string, number>;
1513
+ }
1514
+ interface GetRecoveriesEmailResponse extends Recoveries {
1515
+ _id: string;
1516
+ }
1517
+
1518
+ interface Follow {
1519
+ follower: string;
1520
+ following: string;
1521
+ what: string[];
1522
+ }
1523
+
1524
+ interface BaseTransaction {
1525
+ num: number;
1526
+ type: string;
1527
+ timestamp: string;
1528
+ trx_id: string;
1529
+ }
1530
+ interface CurationReward extends BaseTransaction {
1531
+ type: "curation_reward";
1532
+ comment_author?: string;
1533
+ comment_permlink?: string;
1534
+ author?: string;
1535
+ permlink?: string;
1536
+ curator: string;
1537
+ reward: string;
1538
+ }
1539
+ interface AuthorReward extends BaseTransaction {
1540
+ type: "author_reward";
1541
+ author: string;
1542
+ permlink: string;
1543
+ hbd_payout: string;
1544
+ hive_payout: string;
1545
+ vesting_payout: string;
1546
+ }
1547
+ interface CommentBenefactor extends BaseTransaction {
1548
+ type: "comment_benefactor_reward";
1549
+ benefactor: string;
1550
+ author: string;
1551
+ permlink: string;
1552
+ hbd_payout: string;
1553
+ hive_payout: string;
1554
+ vesting_payout: string;
1555
+ }
1556
+ interface ClaimRewardBalance extends BaseTransaction {
1557
+ type: "claim_reward_balance";
1558
+ account: string;
1559
+ reward_hbd: string;
1560
+ reward_hive: string;
1561
+ reward_vests: string;
1562
+ }
1563
+ interface Transfer extends BaseTransaction {
1564
+ type: "transfer";
1565
+ amount: string;
1566
+ memo: string;
1567
+ from: string;
1568
+ to: string;
1569
+ }
1570
+ interface TransferToVesting extends BaseTransaction {
1571
+ type: "transfer_to_vesting";
1572
+ amount: string;
1573
+ memo?: string;
1574
+ from: string;
1575
+ to: string;
1576
+ }
1577
+ interface SetWithdrawRoute extends BaseTransaction {
1578
+ type: "set_withdraw_vesting_route";
1579
+ from_account: string;
1580
+ to_account: string;
1581
+ percent: number;
1582
+ auto_vest: boolean;
1583
+ }
1584
+ interface TransferToSavings extends BaseTransaction {
1585
+ type: "transfer_to_savings";
1586
+ amount: string;
1587
+ memo?: string;
1588
+ from: string;
1589
+ to: string;
1590
+ }
1591
+ interface CancelTransferFromSavings extends BaseTransaction {
1592
+ from: string;
1593
+ request_id: number;
1594
+ type: "cancel_transfer_from_savings";
1595
+ }
1596
+ interface WithdrawVesting extends BaseTransaction {
1597
+ type: "withdraw_vesting";
1598
+ acc: string;
1599
+ vesting_shares: string;
1600
+ }
1601
+ interface FillOrder extends BaseTransaction {
1602
+ type: "fill_order";
1603
+ current_pays: string;
1604
+ open_pays: string;
1605
+ }
1606
+ interface LimitOrderCancel extends BaseTransaction {
1607
+ type: "limit_order_cancel";
1608
+ owner: string;
1609
+ orderid: number;
1610
+ }
1611
+ interface ProducerReward extends BaseTransaction {
1612
+ type: "producer_reward";
1613
+ vesting_shares: string;
1614
+ producer: string;
1615
+ }
1616
+ interface Interest extends BaseTransaction {
1617
+ type: "interest";
1618
+ owner: string;
1619
+ interest: string;
1620
+ }
1621
+ interface FillConvertRequest extends BaseTransaction {
1622
+ type: "fill_convert_request";
1623
+ amount_in: string;
1624
+ amount_out: string;
1625
+ }
1626
+ interface FillCollateralizedConvertRequest extends BaseTransaction {
1627
+ type: "fill_collateralized_convert_request";
1628
+ owner: string;
1629
+ requestid: number;
1630
+ amount_in: string;
1631
+ amount_out: string;
1632
+ excess_collateral: string;
1633
+ }
1634
+ interface ReturnVestingDelegation extends BaseTransaction {
1635
+ type: "return_vesting_delegation";
1636
+ vesting_shares: string;
1637
+ }
1638
+ interface ProposalPay extends BaseTransaction {
1639
+ type: "proposal_pay";
1640
+ payment: string;
1641
+ }
1642
+ interface UpdateProposalVotes extends BaseTransaction {
1643
+ type: "update_proposal_votes";
1644
+ voter: string;
1645
+ proposal_ids: [number];
1646
+ approve: boolean;
1647
+ }
1648
+ interface CommentPayoutUpdate extends BaseTransaction {
1649
+ type: "comment_payout_update";
1650
+ author: string;
1651
+ permlink: string;
1652
+ }
1653
+ interface CommentReward extends BaseTransaction {
1654
+ type: "comment_reward";
1655
+ author: string;
1656
+ permlink: string;
1657
+ payout: string;
1658
+ }
1659
+ interface CollateralizedConvert extends BaseTransaction {
1660
+ type: "collateralized_convert";
1661
+ owner: string;
1662
+ requestid: number;
1663
+ amount: string;
1664
+ }
1665
+ interface RecurrentTransfers extends BaseTransaction {
1666
+ type: "recurrent_transfer";
1667
+ amount: string;
1668
+ memo: string;
1669
+ from: string;
1670
+ to: string;
1671
+ recurrence: number;
1672
+ executions: number;
1673
+ }
1674
+ interface FillRecurrentTransfers extends BaseTransaction {
1675
+ type: "fill_recurrent_transfer";
1676
+ amount: SMTAsset;
1677
+ memo: string;
1678
+ from: string;
1679
+ to: string;
1680
+ remaining_executions: number;
1681
+ }
1682
+ interface DelegateVestingShares extends BaseTransaction {
1683
+ type: "delegate_vesting_shares";
1684
+ delegator: string;
1685
+ delegatee: string;
1686
+ vesting_shares: string;
1687
+ }
1688
+ interface LimitOrderCreate extends BaseTransaction {
1689
+ type: "limit_order_create";
1690
+ owner: string;
1691
+ orderid: number;
1692
+ amount_to_sell: string;
1693
+ min_to_receive: string;
1694
+ expiration: string;
1695
+ }
1696
+ interface FillVestingWithdraw extends BaseTransaction {
1697
+ type: "fill_vesting_withdraw";
1698
+ from_account: string;
1699
+ to_account: string;
1700
+ withdrawn: string;
1701
+ deposited: string;
1702
+ }
1703
+ interface EffectiveCommentVote extends BaseTransaction {
1704
+ type: "effective_comment_vote";
1705
+ voter: string;
1706
+ author: string;
1707
+ permlink: string;
1708
+ pending_payout: string;
1709
+ total_vote_weight: number;
1710
+ rshares: number;
1711
+ weight: number;
1712
+ }
1713
+ interface VoteProxy extends BaseTransaction {
1714
+ type: "account_witness_proxy";
1715
+ account: string;
1716
+ proxy: string;
1540
1717
  }
1718
+ type Transaction = CurationReward | AuthorReward | CommentBenefactor | ClaimRewardBalance | Transfer | TransferToVesting | TransferToSavings | CancelTransferFromSavings | WithdrawVesting | SetWithdrawRoute | FillOrder | ProducerReward | Interest | FillConvertRequest | FillCollateralizedConvertRequest | ReturnVestingDelegation | ProposalPay | UpdateProposalVotes | CommentPayoutUpdate | CommentReward | CollateralizedConvert | RecurrentTransfers | FillRecurrentTransfers | LimitOrderCreate | LimitOrderCancel | FillVestingWithdraw | EffectiveCommentVote | VoteProxy | DelegateVestingShares;
1719
+ type OperationGroup = "transfers" | "market-orders" | "interests" | "stake-operations" | "rewards";
1541
1720
 
1542
- /**
1543
- * Chain error handling utilities
1544
- * Extracted from web's operations.ts and mobile's dhive.ts error handling patterns
1545
- */
1546
- declare enum ErrorType {
1547
- COMMON = "common",
1548
- INFO = "info",
1549
- INSUFFICIENT_RESOURCE_CREDITS = "insufficient_resource_credits",
1550
- MISSING_AUTHORITY = "missing_authority",
1551
- TOKEN_EXPIRED = "token_expired",
1552
- NETWORK = "network",
1553
- TIMEOUT = "timeout",
1554
- VALIDATION = "validation"
1721
+ interface ReferralItem {
1722
+ id: number;
1723
+ username: string;
1724
+ referrer: string;
1725
+ created: string;
1726
+ rewarded: number;
1727
+ v: number;
1555
1728
  }
1556
- interface ParsedChainError {
1557
- message: string;
1558
- type: ErrorType;
1559
- originalError?: any;
1729
+ interface ReferralItems {
1730
+ data: ReferralItem[];
1560
1731
  }
1732
+ interface ReferralStat {
1733
+ total: number;
1734
+ rewarded: number;
1735
+ }
1736
+
1561
1737
  /**
1562
- * Parses Hive blockchain errors into standardized format.
1563
- * Extracted from web's operations.ts and mobile's dhive.ts error handling.
1564
- *
1565
- * @param error - The error object or string from a blockchain operation
1566
- * @returns Parsed error with user-friendly message and categorized type
1567
- *
1568
- * @example
1569
- * ```typescript
1570
- * try {
1571
- * await vote(...);
1572
- * } catch (error) {
1573
- * const parsed = parseChainError(error);
1574
- * console.log(parsed.message); // "Insufficient Resource Credits. Please wait or power up."
1575
- * console.log(parsed.type); // ErrorType.INSUFFICIENT_RESOURCE_CREDITS
1576
- * }
1577
- * ```
1578
- */
1579
- declare function parseChainError(error: any): ParsedChainError;
1580
- /**
1581
- * Formats error for display to user.
1582
- * Returns tuple of [message, type] for backward compatibility with existing code.
1583
- *
1584
- * This function maintains compatibility with the old formatError signature from
1585
- * web's operations.ts (line 59-84) and mobile's dhive.ts error handling.
1586
- *
1587
- * @param error - The error object or string
1588
- * @returns Tuple of [user-friendly message, error type]
1589
- *
1590
- * @example
1591
- * ```typescript
1592
- * try {
1593
- * await transfer(...);
1594
- * } catch (error) {
1595
- * const [message, type] = formatError(error);
1596
- * showToast(message, type);
1597
- * }
1598
- * ```
1599
- */
1600
- declare function formatError(error: any): [string, ErrorType];
1601
- /**
1602
- * Checks if error indicates missing authority and should trigger auth fallback.
1603
- * Used by the SDK's useBroadcastMutation to determine if it should retry with
1604
- * an alternate authentication method.
1605
- *
1606
- * @param error - The error object or string
1607
- * @returns true if auth fallback should be attempted
1608
- *
1609
- * @example
1610
- * ```typescript
1611
- * try {
1612
- * await broadcast(operations);
1613
- * } catch (error) {
1614
- * if (shouldTriggerAuthFallback(error)) {
1615
- * // Try with alternate auth method
1616
- * await broadcastWithHiveAuth(operations);
1617
- * }
1618
- * }
1619
- * ```
1620
- */
1621
- declare function shouldTriggerAuthFallback(error: any): boolean;
1622
- /**
1623
- * Checks if error is a resource credits (RC) error.
1624
- * Useful for showing specific UI feedback about RC issues.
1625
- *
1626
- * @param error - The error object or string
1627
- * @returns true if the error is related to insufficient RC
1628
- *
1629
- * @example
1630
- * ```typescript
1631
- * try {
1632
- * await vote(...);
1633
- * } catch (error) {
1634
- * if (isResourceCreditsError(error)) {
1635
- * showRCWarning(); // Show specific RC education/power up UI
1636
- * }
1637
- * }
1638
- * ```
1639
- */
1640
- declare function isResourceCreditsError(error: any): boolean;
1641
- /**
1642
- * Checks if error is informational (not critical).
1643
- * Informational errors typically don't need retry logic.
1644
- *
1645
- * @param error - The error object or string
1646
- * @returns true if the error is informational
1647
- */
1648
- declare function isInfoError(error: any): boolean;
1649
- /**
1650
- * Checks if error is network-related and should be retried.
1651
- *
1652
- * @param error - The error object or string
1653
- * @returns true if the error is network-related
1738
+ * Account profile information from bridge API
1739
+ * Returned by get_profiles endpoint
1654
1740
  */
1655
- declare function isNetworkError(error: any): boolean;
1656
-
1657
- declare function makeQueryClient(): QueryClient;
1658
- declare const getQueryClient: () => QueryClient;
1659
- declare namespace EcencyQueriesManager {
1660
- function getQueryData<T>(queryKey: QueryKey): T | undefined;
1661
- function getInfiniteQueryData<T>(queryKey: QueryKey): InfiniteData<T, unknown> | undefined;
1662
- function prefetchQuery<T>(options: UseQueryOptions<T>): Promise<T | undefined>;
1663
- function prefetchInfiniteQuery<T, P>(options: UseInfiniteQueryOptions<T, Error, InfiniteData<T>, QueryKey, P>): Promise<InfiniteData<T, unknown> | undefined>;
1664
- function generateClientServerQuery<T>(options: UseQueryOptions<T>): {
1665
- prefetch: () => Promise<T | undefined>;
1666
- getData: () => T | undefined;
1667
- useClientQuery: () => _tanstack_react_query.UseQueryResult<_tanstack_react_query.NoInfer<T>, Error>;
1668
- fetchAndGet: () => Promise<T>;
1741
+ interface Profile {
1742
+ id: number;
1743
+ name: string;
1744
+ created: string;
1745
+ active: string;
1746
+ post_count: number;
1747
+ reputation: number;
1748
+ blacklists: string[];
1749
+ stats: {
1750
+ rank: number;
1751
+ following: number;
1752
+ followers: number;
1669
1753
  };
1670
- function generateClientServerInfiniteQuery<T, P>(options: UseInfiniteQueryOptions<T, Error, InfiniteData<T>, QueryKey, P>): {
1671
- prefetch: () => Promise<InfiniteData<T, unknown> | undefined>;
1672
- getData: () => InfiniteData<T, unknown> | undefined;
1673
- useClientQuery: () => _tanstack_react_query.UseInfiniteQueryResult<InfiniteData<T, unknown>, Error>;
1674
- fetchAndGet: () => Promise<InfiniteData<T, P>>;
1754
+ metadata: {
1755
+ profile: {
1756
+ about?: string;
1757
+ blacklist_description?: string;
1758
+ cover_image?: string;
1759
+ location?: string;
1760
+ muted_list_description?: string;
1761
+ name?: string;
1762
+ profile_image?: string;
1763
+ website?: string;
1764
+ };
1675
1765
  };
1676
1766
  }
1677
1767
 
1678
- declare function getDynamicPropsQueryOptions(): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<DynamicProps$1, Error, DynamicProps$1, string[]>, "queryFn"> & {
1679
- queryFn?: _tanstack_react_query.QueryFunction<DynamicProps$1, string[], never> | undefined;
1680
- } & {
1681
- queryKey: string[] & {
1682
- [dataTagSymbol]: DynamicProps$1;
1683
- [dataTagErrorSymbol]: Error;
1684
- };
1685
- };
1686
-
1687
- interface RewardFund {
1688
- id: number;
1768
+ /**
1769
+ * Friends list row data
1770
+ * The `active` field contains raw timestamp - app should format it
1771
+ */
1772
+ interface FriendsRow {
1689
1773
  name: string;
1690
- reward_balance: string;
1691
- recent_claims: string;
1692
- last_update: string;
1693
- content_constant: string;
1694
- percent_curation_rewards: number;
1695
- percent_content_rewards: number;
1696
- author_reward_curve: string;
1697
- curation_reward_curve: string;
1774
+ reputation: number;
1775
+ active: string;
1698
1776
  }
1699
1777
  /**
1700
- * Get reward fund information from the blockchain
1701
- * @param fundName - Name of the reward fund (default: 'post')
1778
+ * Friend search result with additional profile information
1779
+ * The `active` field contains raw timestamp - app should format it
1702
1780
  */
1703
- declare function getRewardFundQueryOptions(fundName?: string): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<RewardFund, Error, RewardFund, string[]>, "queryFn"> & {
1704
- queryFn?: _tanstack_react_query.QueryFunction<RewardFund, string[], never> | undefined;
1705
- } & {
1706
- queryKey: string[] & {
1707
- [dataTagSymbol]: RewardFund;
1708
- [dataTagErrorSymbol]: Error;
1709
- };
1710
- };
1711
-
1712
- declare const QueryKeys: {
1713
- readonly posts: {
1714
- readonly entry: (entryPath: string) => string[];
1715
- readonly postHeader: (author: string, permlink?: string) => (string | undefined)[];
1716
- readonly content: (author: string, permlink: string) => string[];
1717
- readonly contentReplies: (author: string, permlink: string) => string[];
1718
- readonly accountPosts: (username: string, filter: string, limit: number, observer: string) => (string | number)[];
1719
- readonly accountPostsPage: (username: string, filter: string, startAuthor: string, startPermlink: string, limit: number, observer: string) => (string | number)[];
1720
- readonly userPostVote: (username: string, author: string, permlink: string) => string[];
1721
- readonly reblogs: (username: string, limit: number) => (string | number)[];
1722
- readonly entryActiveVotes: (author?: string, permlink?: string) => (string | undefined)[];
1723
- readonly rebloggedBy: (author: string, permlink: string) => string[];
1724
- readonly tips: (author: string, permlink: string) => string[];
1725
- readonly normalize: (author: string, permlink: string) => string[];
1726
- readonly drafts: (activeUsername?: string) => (string | undefined)[];
1727
- readonly draftsInfinite: (activeUsername?: string, limit?: number) => unknown[];
1728
- readonly schedules: (activeUsername?: string) => (string | undefined)[];
1729
- readonly schedulesInfinite: (activeUsername?: string, limit?: number) => unknown[];
1730
- readonly fragments: (username?: string) => (string | undefined)[];
1731
- readonly fragmentsInfinite: (username?: string, limit?: number) => unknown[];
1732
- readonly images: (username?: string) => (string | undefined)[];
1733
- readonly galleryImages: (activeUsername?: string) => (string | undefined)[];
1734
- readonly imagesInfinite: (username?: string, limit?: number) => unknown[];
1735
- readonly promoted: (type: string) => string[];
1736
- readonly _promotedPrefix: readonly ["posts", "promoted"];
1737
- readonly accountPostsBlogPrefix: (username: string) => readonly ["posts", "account-posts", string, "blog"];
1738
- readonly postsRanked: (sort: string, tag: string, limit: number, observer: string) => (string | number)[];
1739
- readonly postsRankedPage: (sort: string, startAuthor: string, startPermlink: string, limit: number, tag: string, observer: string) => (string | number)[];
1740
- readonly discussions: (author: string, permlink: string, order: string, observer: string) => string[];
1741
- readonly discussion: (author: string, permlink: string, observer: string) => string[];
1742
- readonly deletedEntry: (entryPath: string) => string[];
1743
- readonly commentHistory: (author: string, permlink: string, onlyMeta: boolean) => (string | boolean)[];
1744
- readonly trendingTags: () => string[];
1745
- readonly trendingTagsWithStats: (limit: number) => (string | number)[];
1746
- readonly wavesByHost: (host: string) => string[];
1747
- readonly wavesByTag: (host: string, tag: string) => string[];
1748
- readonly wavesFollowing: (host: string, username: string) => string[];
1749
- readonly wavesTrendingTags: (host: string, hours: number) => (string | number)[];
1750
- readonly wavesByAccount: (host: string, username: string) => string[];
1751
- readonly wavesTrendingAuthors: (host: string) => string[];
1752
- readonly _prefix: readonly ["posts"];
1753
- };
1754
- readonly accounts: {
1755
- readonly full: (username?: string) => (string | undefined)[];
1756
- readonly list: (...usernames: string[]) => string[];
1757
- readonly friends: (following: string, mode: string, followType: string, limit: number) => (string | number)[];
1758
- readonly searchFriends: (username: string, mode: string, query: string) => string[];
1759
- readonly subscriptions: (username: string) => string[];
1760
- readonly followCount: (username: string) => string[];
1761
- readonly recoveries: (username: string) => string[];
1762
- readonly pendingRecovery: (username: string) => string[];
1763
- readonly checkWalletPending: (username: string, code: string | null) => (string | null)[];
1764
- readonly mutedUsers: (username: string) => string[];
1765
- readonly following: (follower: string, startFollowing: string, followType: string, limit: number) => (string | number)[];
1766
- readonly followers: (following: string, startFollower: string, followType: string, limit: number) => (string | number)[];
1767
- readonly search: (query: string, excludeList?: string[]) => (string | string[] | undefined)[];
1768
- readonly profiles: (accounts: string[], observer: string) => (string | string[])[];
1769
- readonly lookup: (query: string, limit: number) => (string | number)[];
1770
- readonly transactions: (username: string, group: string, limit: number) => (string | number)[];
1771
- readonly favorites: (activeUsername?: string) => (string | undefined)[];
1772
- readonly favoritesInfinite: (activeUsername?: string, limit?: number) => unknown[];
1773
- readonly checkFavorite: (activeUsername: string, targetUsername: string) => string[];
1774
- readonly relations: (reference: string, target: string) => string[];
1775
- readonly bots: () => string[];
1776
- readonly voteHistory: (username: string, limit: number) => (string | number)[];
1777
- readonly reputations: (query: string, limit: number) => (string | number)[];
1778
- readonly bookmarks: (activeUsername?: string) => (string | undefined)[];
1779
- readonly bookmarksInfinite: (activeUsername?: string, limit?: number) => unknown[];
1780
- readonly referrals: (username: string) => string[];
1781
- readonly referralsStats: (username: string) => string[];
1782
- readonly _prefix: readonly ["accounts"];
1783
- };
1784
- readonly notifications: {
1785
- readonly announcements: () => string[];
1786
- readonly list: (activeUsername?: string, filter?: string) => (string | undefined)[];
1787
- readonly unreadCount: (activeUsername?: string) => (string | undefined)[];
1788
- readonly settings: (activeUsername?: string) => (string | undefined)[];
1789
- readonly _prefix: readonly ["notifications"];
1790
- };
1791
- readonly core: {
1792
- readonly rewardFund: (fundName: string) => string[];
1793
- readonly dynamicProps: () => string[];
1794
- readonly chainProperties: () => string[];
1795
- readonly _prefix: readonly ["core"];
1796
- };
1797
- readonly communities: {
1798
- readonly single: (name?: string, observer?: string) => (string | undefined)[];
1799
- /** Prefix key for matching all observer variants of a community */
1800
- readonly singlePrefix: (name: string) => readonly ["community", "single", string];
1801
- readonly context: (username: string, communityName: string) => string[];
1802
- readonly rewarded: () => string[];
1803
- readonly list: (sort: string, query: string, limit: number) => (string | number)[];
1804
- readonly subscribers: (communityName: string) => string[];
1805
- readonly accountNotifications: (account: string, limit: number) => (string | number)[];
1806
- };
1807
- readonly proposals: {
1808
- readonly list: () => string[];
1809
- readonly proposal: (id: number) => (string | number)[];
1810
- readonly votes: (proposalId: number, voter: string, limit: number) => (string | number)[];
1811
- readonly votesPrefix: (proposalId: number) => readonly ["proposals", "votes", number];
1812
- readonly votesByUser: (voter: string) => string[];
1813
- };
1814
- readonly search: {
1815
- readonly topics: (q: string, limit: number) => (string | number)[];
1816
- readonly path: (q: string) => string[];
1817
- readonly account: (q: string, limit: number) => (string | number)[];
1818
- readonly results: (q: string, sort: string, hideLow: boolean | string, since?: string, scrollId?: string, votes?: number) => readonly ["search", string, string, boolean, string | undefined, string | undefined, number | undefined];
1819
- readonly controversialRising: (what: string, tag: string) => string[];
1820
- readonly similarEntries: (author: string, permlink: string, query: string) => string[];
1821
- readonly api: (q: string, sort: string, hideLow: boolean, since?: string, votes?: number) => (string | number | boolean | undefined)[];
1822
- };
1823
- readonly witnesses: {
1824
- readonly list: (limit: number) => (string | number)[];
1825
- readonly votes: (username: string | undefined) => (string | undefined)[];
1826
- readonly proxy: () => string[];
1827
- };
1828
- readonly wallet: {
1829
- readonly outgoingRcDelegations: (username: string, limit: number) => (string | number)[];
1830
- readonly vestingDelegations: (username: string, limit: number) => (string | number)[];
1831
- readonly withdrawRoutes: (account: string) => string[];
1832
- readonly incomingRc: (username: string) => string[];
1833
- readonly conversionRequests: (account: string) => string[];
1834
- readonly receivedVestingShares: (username: string) => string[];
1835
- readonly savingsWithdraw: (account: string) => string[];
1836
- readonly openOrders: (user: string) => string[];
1837
- readonly collateralizedConversionRequests: (account: string) => string[];
1838
- readonly recurrentTransfers: (username: string) => string[];
1839
- readonly portfolio: (username: string, onlyEnabled: string, currency: string) => string[];
1840
- };
1841
- readonly assets: {
1842
- readonly hiveGeneralInfo: (username: string) => string[];
1843
- readonly hiveTransactions: (username: string, limit: number, filterKey: string) => (string | number)[];
1844
- readonly hiveWithdrawalRoutes: (username: string) => string[];
1845
- readonly hiveMetrics: (bucketSeconds: number) => (string | number)[];
1846
- readonly hbdGeneralInfo: (username: string) => string[];
1847
- readonly hbdTransactions: (username: string, limit: number, filterKey: string) => (string | number)[];
1848
- readonly hivePowerGeneralInfo: (username: string) => string[];
1849
- readonly hivePowerDelegates: (username: string) => string[];
1850
- readonly hivePowerDelegatings: (username: string) => string[];
1851
- readonly hivePowerTransactions: (username: string, limit: number, filterKey: string) => (string | number)[];
1852
- readonly pointsGeneralInfo: (username: string) => string[];
1853
- readonly pointsTransactions: (username: string, type: string) => string[];
1854
- readonly ecencyAssetInfo: (username: string, asset: string, currency: string) => string[];
1855
- };
1856
- readonly market: {
1857
- readonly statistics: () => string[];
1858
- readonly orderBook: (limit: number) => (string | number)[];
1859
- readonly history: (seconds: number, startDate: number, endDate: number) => (string | number)[];
1860
- readonly feedHistory: () => string[];
1861
- readonly hiveHbdStats: () => string[];
1862
- readonly data: (coin: string, vsCurrency: string, fromTs: number, toTs: number) => (string | number)[];
1863
- readonly tradeHistory: (limit: number, start: number, end: number) => (string | number)[];
1864
- readonly currentMedianHistoryPrice: () => string[];
1865
- };
1866
- readonly analytics: {
1867
- readonly discoverCuration: (duration: string) => string[];
1868
- readonly pageStats: (url: string, dimensions: string, metrics: string, dateRange: string) => string[];
1869
- readonly discoverLeaderboard: (duration: string) => string[];
1870
- };
1871
- readonly promotions: {
1872
- readonly promotePrice: () => string[];
1873
- readonly boostPlusPrices: () => string[];
1874
- readonly boostPlusAccounts: (account: string) => string[];
1875
- };
1876
- readonly resourceCredits: {
1877
- readonly account: (username: string) => string[];
1878
- readonly stats: () => string[];
1879
- };
1880
- readonly points: {
1881
- readonly points: (username: string, filter: number) => (string | number)[];
1882
- readonly _prefix: (username: string) => string[];
1883
- };
1884
- readonly operations: {
1885
- readonly chainProperties: () => string[];
1886
- };
1887
- readonly games: {
1888
- readonly statusCheck: (gameType: string, username: string) => string[];
1889
- };
1890
- readonly badActors: {
1891
- readonly list: () => string[];
1892
- readonly _prefix: readonly ["bad-actors"];
1893
- };
1894
- readonly ai: {
1895
- readonly prices: () => readonly ["ai", "prices"];
1896
- readonly assistPrices: (username?: string) => readonly ["ai", "assist-prices", string | undefined];
1897
- readonly _prefix: readonly ["ai"];
1898
- };
1899
- };
1900
-
1901
- declare function encodeObj(o: any): string;
1902
- declare function decodeObj(o: any): any;
1903
-
1904
- declare enum Symbol {
1905
- HIVE = "HIVE",
1906
- HBD = "HBD",
1907
- VESTS = "VESTS",
1908
- SPK = "SPK"
1781
+ interface FriendSearchResult {
1782
+ name: string;
1783
+ full_name: string;
1784
+ reputation: number;
1785
+ active: string;
1909
1786
  }
1910
- declare enum NaiMap {
1911
- "@@000000021" = "HIVE",
1912
- "@@000000013" = "HBD",
1913
- "@@000000037" = "VESTS"
1787
+
1788
+ type BalanceCoinType = "HIVE" | "HBD" | "VESTS";
1789
+ interface BalanceHistoryEntry {
1790
+ block_num: number;
1791
+ operation_id: string;
1792
+ op_type_id: number;
1793
+ balance: string;
1794
+ prev_balance: string;
1795
+ balance_change: string;
1796
+ timestamp: string;
1914
1797
  }
1915
- interface Asset {
1916
- amount: number;
1917
- symbol: Symbol;
1798
+ interface BalanceHistoryResponse {
1799
+ total_operations: number;
1800
+ total_pages: number;
1801
+ operations_result: BalanceHistoryEntry[];
1802
+ }
1803
+ interface AggregatedBalanceEntry {
1804
+ date: string;
1805
+ balance: {
1806
+ balance: string;
1807
+ savings_balance: string;
1808
+ };
1809
+ prev_balance: {
1810
+ balance: string;
1811
+ savings_balance: string;
1812
+ };
1813
+ min_balance: {
1814
+ balance: string;
1815
+ savings_balance: string;
1816
+ };
1817
+ max_balance: {
1818
+ balance: string;
1819
+ savings_balance: string;
1820
+ };
1918
1821
  }
1919
- declare function parseAsset(sval: string | SMTAsset): Asset;
1920
1822
 
1921
- declare function getBoundFetch(): typeof fetch;
1823
+ interface Payload$4 {
1824
+ profile: Partial<AccountProfile>;
1825
+ tokens: AccountProfile["tokens"];
1826
+ }
1827
+ /**
1828
+ * React Query mutation hook for updating account profile metadata.
1829
+ *
1830
+ * This mutation broadcasts an account_update2 operation to update the user's
1831
+ * profile information (name, about, location, avatar, cover image, etc.).
1832
+ *
1833
+ * @param username - The username to update (required for broadcast)
1834
+ * @param auth - Authentication context with platform adapter and fallback configuration
1835
+ *
1836
+ * @returns React Query mutation result
1837
+ *
1838
+ * @remarks
1839
+ * **Profile Fields:**
1840
+ * - name: Display name
1841
+ * - about: Bio/description
1842
+ * - location: Location
1843
+ * - website: Website URL
1844
+ * - profile_image: Avatar URL
1845
+ * - cover_image: Cover/banner URL
1846
+ * - tokens: Social tokens (Twitter, Facebook, etc.)
1847
+ * - version: Profile metadata version (auto-set to 2)
1848
+ *
1849
+ * **Authentication:**
1850
+ * - Uses posting authority (account_update2 operation)
1851
+ * - Supports all auth methods via platform adapter
1852
+ *
1853
+ * **Post-Broadcast Actions:**
1854
+ * - Optimistically updates account cache with new profile data
1855
+ * - Invalidates account cache to refetch from blockchain
1856
+ *
1857
+ * @example
1858
+ * ```typescript
1859
+ * const updateProfile = useAccountUpdate(username, {
1860
+ * adapter: myAdapter,
1861
+ * });
1862
+ *
1863
+ * // Update profile
1864
+ * updateProfile.mutate({
1865
+ * profile: {
1866
+ * name: "John Doe",
1867
+ * about: "Hive enthusiast",
1868
+ * profile_image: "https://...",
1869
+ * }
1870
+ * });
1871
+ * ```
1872
+ */
1873
+ declare function useAccountUpdate(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, Partial<Payload$4>, unknown>;
1922
1874
 
1923
- declare function isCommunity(value: unknown): boolean;
1875
+ type Kind = "toggle-ignore" | "toggle-follow";
1876
+ declare function useAccountRelationsUpdate(reference: string | undefined, target: string | undefined, auth: AuthContext | undefined, onSuccess: (data: Partial<AccountRelationship> | undefined) => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<{
1877
+ ignores: boolean | undefined;
1878
+ follows: boolean | undefined;
1879
+ is_blacklisted?: boolean | undefined;
1880
+ follows_blacklists?: boolean | undefined;
1881
+ }, Error, Kind, unknown>;
1924
1882
 
1925
1883
  /**
1926
- * Type guard to check if response is wrapped with pagination metadata
1884
+ * Payload for following an account.
1927
1885
  */
1928
- declare function isWrappedResponse<T>(response: any): response is WrappedResponse<T>;
1886
+ interface FollowPayload {
1887
+ /** Account to follow */
1888
+ following: string;
1889
+ }
1929
1890
  /**
1930
- * Normalize response to wrapped format for backwards compatibility
1931
- * If the backend returns old format (array), convert it to wrapped format
1891
+ * React Query mutation hook for following an account.
1892
+ *
1893
+ * This mutation broadcasts a follow operation to the Hive blockchain,
1894
+ * adding the target account to the follower's "blog" follow list.
1895
+ *
1896
+ * @param username - The username of the follower (required for broadcast)
1897
+ * @param auth - Authentication context with platform adapter and fallback configuration
1898
+ *
1899
+ * @returns React Query mutation result
1900
+ *
1901
+ * @remarks
1902
+ * **Post-Broadcast Actions:**
1903
+ * - Invalidates relationship cache to show updated follow status
1904
+ * - Invalidates account cache to refetch updated follower/following counts
1905
+ *
1906
+ * @example
1907
+ * ```typescript
1908
+ * const followMutation = useFollow(username, {
1909
+ * adapter: myAdapter,
1910
+ * enableFallback: true,
1911
+ * fallbackChain: ['keychain', 'key', 'hivesigner']
1912
+ * });
1913
+ *
1914
+ * // Follow an account
1915
+ * followMutation.mutate({
1916
+ * following: 'alice'
1917
+ * });
1918
+ * ```
1932
1919
  */
1933
- declare function normalizeToWrappedResponse<T>(response: T[] | WrappedResponse<T>, limit: number): WrappedResponse<T>;
1920
+ declare function useFollow(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, FollowPayload, unknown>;
1934
1921
 
1935
- declare function vestsToHp(vests: number, hivePerMVests: number): number;
1922
+ /**
1923
+ * Payload for unfollowing an account.
1924
+ */
1925
+ interface UnfollowPayload {
1926
+ /** Account to unfollow */
1927
+ following: string;
1928
+ }
1929
+ /**
1930
+ * React Query mutation hook for unfollowing an account.
1931
+ *
1932
+ * This mutation broadcasts an unfollow operation to the Hive blockchain,
1933
+ * removing the target account from the follower's follow list.
1934
+ *
1935
+ * @param username - The username of the follower (required for broadcast)
1936
+ * @param auth - Authentication context with platform adapter and fallback configuration
1937
+ *
1938
+ * @returns React Query mutation result
1939
+ *
1940
+ * @remarks
1941
+ * **Post-Broadcast Actions:**
1942
+ * - Invalidates relationship cache to show updated follow status
1943
+ * - Invalidates account cache to refetch updated follower/following counts
1944
+ *
1945
+ * @example
1946
+ * ```typescript
1947
+ * const unfollowMutation = useUnfollow(username, {
1948
+ * adapter: myAdapter,
1949
+ * enableFallback: true,
1950
+ * fallbackChain: ['keychain', 'key', 'hivesigner']
1951
+ * });
1952
+ *
1953
+ * // Unfollow an account
1954
+ * unfollowMutation.mutate({
1955
+ * following: 'alice'
1956
+ * });
1957
+ * ```
1958
+ */
1959
+ declare function useUnfollow(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, UnfollowPayload, unknown>;
1936
1960
 
1937
- declare function isEmptyDate(s: string | undefined): boolean;
1961
+ interface Payload$3 {
1962
+ author: string;
1963
+ permlink: string;
1964
+ }
1965
+ declare function useBookmarkAdd(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, Payload$3, unknown>;
1966
+
1967
+ declare function useBookmarkDelete(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
1968
+
1969
+ declare function useAccountFavoriteAdd(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
1970
+
1971
+ declare function useAccountFavoriteDelete(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, {
1972
+ previousList: AccountFavorite[] | undefined;
1973
+ previousInfinite: Map<readonly unknown[], InfiniteData<WrappedResponse<AccountFavorite>, unknown> | undefined>;
1974
+ previousCheck: boolean | undefined;
1975
+ } | undefined>;
1976
+
1977
+ interface Keys {
1978
+ owner: PrivateKey;
1979
+ active: PrivateKey;
1980
+ posting: PrivateKey;
1981
+ memo_key: PrivateKey;
1982
+ }
1983
+ interface Payload$2 {
1984
+ keepCurrent?: boolean;
1985
+ currentKey: PrivateKey;
1986
+ keys: Keys[];
1987
+ keysToRevoke?: string[];
1988
+ keysToRevokeByAuthority?: Partial<Record<keyof Keys, string[]>>;
1989
+ }
1990
+ declare function dedupeAndSortKeyAuths(existing: Authority["key_auths"], additions: [string, number][]): Authority["key_auths"];
1991
+ type UpdateKeyAuthsOptions = Pick<UseMutationOptions<unknown, Error, Payload$2>, "onSuccess" | "onError">;
1992
+ declare function useAccountUpdateKeyAuths(username: string, options?: UpdateKeyAuthsOptions): _tanstack_react_query.UseMutationResult<TransactionConfirmation, Error, Payload$2, unknown>;
1938
1993
 
1939
1994
  interface Payload$1 {
1940
1995
  newPassword: string;
@@ -2068,7 +2123,7 @@ interface ClaimAccountPayload {
2068
2123
  * });
2069
2124
  * ```
2070
2125
  */
2071
- declare function useClaimAccount(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ClaimAccountPayload, unknown>;
2126
+ declare function useClaimAccount(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, ClaimAccountPayload, unknown>;
2072
2127
 
2073
2128
  /**
2074
2129
  * Content Operations
@@ -2728,7 +2783,7 @@ interface GrantPostingPermissionPayload {
2728
2783
  memoKey: string;
2729
2784
  jsonMetadata: string;
2730
2785
  }
2731
- declare function useGrantPostingPermission(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, GrantPostingPermissionPayload, unknown>;
2786
+ declare function useGrantPostingPermission(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, GrantPostingPermissionPayload, unknown>;
2732
2787
 
2733
2788
  interface CreateAccountPayload {
2734
2789
  newAccountName: string;
@@ -2737,7 +2792,7 @@ interface CreateAccountPayload {
2737
2792
  /** If true, uses a claimed account token instead of paying the fee */
2738
2793
  useClaimed?: boolean;
2739
2794
  }
2740
- declare function useCreateAccount(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, CreateAccountPayload, unknown>;
2795
+ declare function useCreateAccount(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, CreateAccountPayload, unknown>;
2741
2796
 
2742
2797
  declare function getAccountFullQueryOptions(username: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<{
2743
2798
  name: any;
@@ -3127,19 +3182,30 @@ declare function getAccountReputationsQueryOptions(query: string, limit?: number
3127
3182
 
3128
3183
  declare const ACCOUNT_OPERATION_GROUPS: Record<OperationGroup, number[]>;
3129
3184
  declare const ALL_ACCOUNT_OPERATIONS: number[];
3130
- type TxPage = Transaction[];
3185
+ interface TxPageRaw {
3186
+ entries: Transaction[];
3187
+ currentPage: number;
3188
+ }
3131
3189
  /**
3132
- * Get account transaction history with pagination and filtering
3190
+ * Cursor for transaction pagination.
3191
+ * null = first request (returns newest page, API omits page param).
3192
+ * number = specific page to fetch (decrementing for older data).
3193
+ */
3194
+ type TxCursor = number | null;
3195
+ /**
3196
+ * Get account transaction history with pagination and filtering.
3197
+ * Uses the hafah-api REST endpoint for server-side op-type filtering
3198
+ * and real pagination metadata.
3133
3199
  *
3134
3200
  * @param username - Account name to get transactions for
3135
3201
  * @param limit - Number of transactions per page
3136
3202
  * @param group - Filter by operation group (transfers, market-orders, etc.)
3137
3203
  */
3138
- declare function getTransactionsInfiniteQueryOptions(username?: string, limit?: number, group?: OperationGroup | ""): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseInfiniteQueryOptions<TxPage, Error, TxPage, (string | number)[], number>, "queryFn"> & {
3139
- queryFn?: _tanstack_react_query.QueryFunction<TxPage, (string | number)[], number> | undefined;
3204
+ declare function getTransactionsInfiniteQueryOptions(username?: string, limit?: number, group?: OperationGroup | ""): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseInfiniteQueryOptions<TxPageRaw, Error, TxPageRaw, (string | number)[], TxCursor>, "queryFn"> & {
3205
+ queryFn?: _tanstack_react_query.QueryFunction<TxPageRaw, (string | number)[], TxCursor> | undefined;
3140
3206
  } & {
3141
3207
  queryKey: (string | number)[] & {
3142
- [dataTagSymbol]: _tanstack_react_query.InfiniteData<TxPage, unknown>;
3208
+ [dataTagSymbol]: _tanstack_react_query.InfiniteData<TxPageRaw, unknown>;
3143
3209
  [dataTagErrorSymbol]: Error;
3144
3210
  };
3145
3211
  };
@@ -3455,6 +3521,54 @@ declare function getProfilesQueryOptions(accounts: string[], observer?: string,
3455
3521
  };
3456
3522
  };
3457
3523
 
3524
+ interface BalanceHistoryPage {
3525
+ entries: BalanceHistoryEntry[];
3526
+ currentPage: number;
3527
+ }
3528
+ /**
3529
+ * Cursor for balance history pagination.
3530
+ * null = first request (returns the newest page).
3531
+ * number = specific page to fetch (decrementing for older data).
3532
+ */
3533
+ type BalanceHistoryCursor = number | null;
3534
+ /**
3535
+ * Get balance history for an account with pagination, newest first.
3536
+ * Uses the balance-api REST endpoint with direction=desc.
3537
+ *
3538
+ * Pagination: first call omits `page` to get the newest data.
3539
+ * The response includes `total_pages` so we know the current page number.
3540
+ * Subsequent calls decrement the page number to load older data.
3541
+ *
3542
+ * @param username - Account name
3543
+ * @param coinType - HIVE, HBD, or VESTS
3544
+ * @param pageSize - Number of entries per page
3545
+ */
3546
+ declare function getBalanceHistoryInfiniteQueryOptions(username?: string, coinType?: BalanceCoinType, pageSize?: number): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseInfiniteQueryOptions<BalanceHistoryPage, Error, BalanceHistoryPage, (string | number)[], BalanceHistoryCursor>, "queryFn"> & {
3547
+ queryFn?: _tanstack_react_query.QueryFunction<BalanceHistoryPage, (string | number)[], BalanceHistoryCursor> | undefined;
3548
+ } & {
3549
+ queryKey: (string | number)[] & {
3550
+ [dataTagSymbol]: _tanstack_react_query.InfiniteData<BalanceHistoryPage, unknown>;
3551
+ [dataTagErrorSymbol]: Error;
3552
+ };
3553
+ };
3554
+
3555
+ /**
3556
+ * Get aggregated balance history for an account (yearly summaries).
3557
+ * Uses the balance-api REST endpoint - enables daily/weekly/monthly summary
3558
+ * widgets that are impossible via RPC.
3559
+ *
3560
+ * @param username - Account name
3561
+ * @param coinType - HIVE, HBD, or VESTS
3562
+ */
3563
+ declare function getAggregatedBalanceQueryOptions(username?: string, coinType?: BalanceCoinType): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<AggregatedBalanceEntry[], Error, AggregatedBalanceEntry[], string[]>, "queryFn"> & {
3564
+ queryFn?: _tanstack_react_query.QueryFunction<AggregatedBalanceEntry[], string[], never> | undefined;
3565
+ } & {
3566
+ queryKey: string[] & {
3567
+ [dataTagSymbol]: AggregatedBalanceEntry[];
3568
+ [dataTagErrorSymbol]: Error;
3569
+ };
3570
+ };
3571
+
3458
3572
  type ProfileTokens = AccountProfile["tokens"];
3459
3573
  interface BuildProfileMetadataArgs {
3460
3574
  existingProfile?: AccountProfile;
@@ -3471,6 +3585,7 @@ declare function buildProfileMetadata({ existingProfile, profile, tokens, }: Bui
3471
3585
  */
3472
3586
  declare function parseAccounts(rawAccounts: any[]): FullAccount[];
3473
3587
 
3588
+ declare function votingRshares(account: FullAccount, dynamicProps: DynamicProps$1, votingPowerValue: number, weight?: number): number;
3474
3589
  declare function votingPower(account: FullAccount): number;
3475
3590
  declare function powerRechargeTime(power: number): number;
3476
3591
  declare function downVotingPower(account: FullAccount): number;
@@ -4078,7 +4193,7 @@ interface VotePayload {
4078
4193
  * broadcastMode: async — Votes don't require block confirmation.
4079
4194
  * The vote is accepted into the mempool immediately; UI can optimistically update.
4080
4195
  */
4081
- declare function useVote(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, VotePayload, unknown>;
4196
+ declare function useVote(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, VotePayload, unknown>;
4082
4197
 
4083
4198
  /**
4084
4199
  * Payload for reblogging a post.
@@ -4134,7 +4249,7 @@ interface ReblogPayload {
4134
4249
  * });
4135
4250
  * ```
4136
4251
  */
4137
- declare function useReblog(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ReblogPayload, unknown>;
4252
+ declare function useReblog(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, ReblogPayload, unknown>;
4138
4253
 
4139
4254
  /**
4140
4255
  * Beneficiary account and weight.
@@ -4245,7 +4360,7 @@ interface CommentPayload {
4245
4360
  * });
4246
4361
  * ```
4247
4362
  */
4248
- declare function useComment(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, CommentPayload, unknown>;
4363
+ declare function useComment(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, CommentPayload, unknown>;
4249
4364
 
4250
4365
  /**
4251
4366
  * Payload for deleting a comment or post.
@@ -4275,7 +4390,7 @@ interface DeleteCommentPayload {
4275
4390
  *
4276
4391
  * @returns React Query mutation result
4277
4392
  */
4278
- declare function useDeleteComment(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, DeleteCommentPayload, unknown>;
4393
+ declare function useDeleteComment(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, DeleteCommentPayload, unknown>;
4279
4394
 
4280
4395
  /**
4281
4396
  * Payload for creating a cross-post.
@@ -4359,7 +4474,7 @@ interface CrossPostPayload {
4359
4474
  * });
4360
4475
  * ```
4361
4476
  */
4362
- declare function useCrossPost(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, CrossPostPayload, unknown>;
4477
+ declare function useCrossPost(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, CrossPostPayload, unknown>;
4363
4478
 
4364
4479
  /**
4365
4480
  * Payload for updating a reply/comment.
@@ -4449,7 +4564,7 @@ interface UpdateReplyPayload {
4449
4564
  * });
4450
4565
  * ```
4451
4566
  */
4452
- declare function useUpdateReply(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, UpdateReplyPayload, unknown>;
4567
+ declare function useUpdateReply(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, UpdateReplyPayload, unknown>;
4453
4568
 
4454
4569
  /**
4455
4570
  * Payload for promoting a post using Ecency Points.
@@ -4505,7 +4620,7 @@ interface PromotePayload {
4505
4620
  * });
4506
4621
  * ```
4507
4622
  */
4508
- declare function usePromote(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, PromotePayload, unknown>;
4623
+ declare function usePromote(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, PromotePayload, unknown>;
4509
4624
 
4510
4625
  /**
4511
4626
  * SDK-level entry cache utilities. These operate on SDK cache keys
@@ -4967,7 +5082,7 @@ interface SubscribeCommunityPayload {
4967
5082
  * });
4968
5083
  * ```
4969
5084
  */
4970
- declare function useSubscribeCommunity(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, SubscribeCommunityPayload, unknown>;
5085
+ declare function useSubscribeCommunity(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, SubscribeCommunityPayload, unknown>;
4971
5086
 
4972
5087
  /**
4973
5088
  * Payload for unsubscribing from a community.
@@ -5011,7 +5126,7 @@ interface UnsubscribeCommunityPayload {
5011
5126
  * });
5012
5127
  * ```
5013
5128
  */
5014
- declare function useUnsubscribeCommunity(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, UnsubscribeCommunityPayload, unknown>;
5129
+ declare function useUnsubscribeCommunity(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, UnsubscribeCommunityPayload, unknown>;
5015
5130
 
5016
5131
  /**
5017
5132
  * Payload for muting/unmuting a post in a community.
@@ -5086,7 +5201,7 @@ interface MutePostPayload {
5086
5201
  * });
5087
5202
  * ```
5088
5203
  */
5089
- declare function useMutePost(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, MutePostPayload, unknown>;
5204
+ declare function useMutePost(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, MutePostPayload, unknown>;
5090
5205
 
5091
5206
  /**
5092
5207
  * Payload for setting a user's role in a community.
@@ -5147,7 +5262,7 @@ interface SetCommunityRolePayload {
5147
5262
  * });
5148
5263
  * ```
5149
5264
  */
5150
- declare function useSetCommunityRole(community: string, username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, SetCommunityRolePayload, unknown>;
5265
+ declare function useSetCommunityRole(community: string, username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, SetCommunityRolePayload, unknown>;
5151
5266
 
5152
5267
  /**
5153
5268
  * Payload for updating community properties.
@@ -5203,7 +5318,7 @@ type UpdateCommunityPayload = CommunityProps;
5203
5318
  * });
5204
5319
  * ```
5205
5320
  */
5206
- declare function useUpdateCommunity(community: string, username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, CommunityProps, unknown>;
5321
+ declare function useUpdateCommunity(community: string, username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, CommunityProps, unknown>;
5207
5322
 
5208
5323
  /**
5209
5324
  * Payload for community rewards registration.
@@ -5252,7 +5367,7 @@ interface CommunityRewardsRegisterPayload {
5252
5367
  * });
5253
5368
  * ```
5254
5369
  */
5255
- declare function useRegisterCommunityRewards(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, CommunityRewardsRegisterPayload, unknown>;
5370
+ declare function useRegisterCommunityRewards(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, CommunityRewardsRegisterPayload, unknown>;
5256
5371
 
5257
5372
  interface PinPostPayload {
5258
5373
  community: string;
@@ -5260,7 +5375,7 @@ interface PinPostPayload {
5260
5375
  permlink: string;
5261
5376
  pin: boolean;
5262
5377
  }
5263
- declare function usePinPost(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, PinPostPayload, unknown>;
5378
+ declare function usePinPost(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, PinPostPayload, unknown>;
5264
5379
 
5265
5380
  declare enum ROLES {
5266
5381
  OWNER = "owner",
@@ -5715,7 +5830,7 @@ declare function useMarkNotificationsRead(username: string | undefined, code: st
5715
5830
  interface SetLastReadPayload {
5716
5831
  date?: string;
5717
5832
  }
5718
- declare function useSetLastRead(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, SetLastReadPayload, unknown>;
5833
+ declare function useSetLastRead(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, SetLastReadPayload, unknown>;
5719
5834
 
5720
5835
  interface Proposal {
5721
5836
  creator: string;
@@ -5862,9 +5977,9 @@ interface ProposalVotePayload {
5862
5977
  * });
5863
5978
  * ```
5864
5979
  */
5865
- declare function useProposalVote(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ProposalVotePayload, unknown>;
5980
+ declare function useProposalVote(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, ProposalVotePayload, unknown>;
5866
5981
 
5867
- declare function useProposalCreate(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ProposalCreatePayload, unknown>;
5982
+ declare function useProposalCreate(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, ProposalCreatePayload, unknown>;
5868
5983
 
5869
5984
  interface DelegatedVestingShare {
5870
5985
  id: number;
@@ -6620,7 +6735,7 @@ interface TransferPayload {
6620
6735
  *
6621
6736
  * @returns React Query mutation result
6622
6737
  */
6623
- declare function useTransfer(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, TransferPayload, unknown>;
6738
+ declare function useTransfer(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, TransferPayload, unknown>;
6624
6739
 
6625
6740
  interface TransferPointPayload {
6626
6741
  to: string;
@@ -6632,7 +6747,7 @@ interface TransferPointPayload {
6632
6747
  *
6633
6748
  * Uses `ecency_point_transfer` custom_json operation with ACTIVE authority.
6634
6749
  */
6635
- declare function useTransferPoint(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, TransferPointPayload, unknown>;
6750
+ declare function useTransferPoint(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, TransferPointPayload, unknown>;
6636
6751
 
6637
6752
  /**
6638
6753
  * Payload for delegating Hive Power (vesting shares).
@@ -6694,7 +6809,7 @@ interface DelegateVestingSharesPayload {
6694
6809
  * });
6695
6810
  * ```
6696
6811
  */
6697
- declare function useDelegateVestingShares(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, DelegateVestingSharesPayload, unknown>;
6812
+ declare function useDelegateVestingShares(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, DelegateVestingSharesPayload, unknown>;
6698
6813
 
6699
6814
  /**
6700
6815
  * Payload for setting withdraw vesting route.
@@ -6761,21 +6876,21 @@ interface SetWithdrawVestingRoutePayload {
6761
6876
  * });
6762
6877
  * ```
6763
6878
  */
6764
- declare function useSetWithdrawVestingRoute(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, SetWithdrawVestingRoutePayload, unknown>;
6879
+ declare function useSetWithdrawVestingRoute(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, SetWithdrawVestingRoutePayload, unknown>;
6765
6880
 
6766
6881
  interface TransferSpkPayload {
6767
6882
  to: string;
6768
6883
  amount: number;
6769
6884
  memo?: string;
6770
6885
  }
6771
- declare function useTransferSpk(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, TransferSpkPayload, unknown>;
6886
+ declare function useTransferSpk(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, TransferSpkPayload, unknown>;
6772
6887
 
6773
6888
  interface TransferLarynxPayload {
6774
6889
  to: string;
6775
6890
  amount: number;
6776
6891
  memo?: string;
6777
6892
  }
6778
- declare function useTransferLarynx(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, TransferLarynxPayload, unknown>;
6893
+ declare function useTransferLarynx(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, TransferLarynxPayload, unknown>;
6779
6894
 
6780
6895
  interface TransferEngineTokenPayload {
6781
6896
  to: string;
@@ -6783,14 +6898,14 @@ interface TransferEngineTokenPayload {
6783
6898
  quantity: string;
6784
6899
  memo: string;
6785
6900
  }
6786
- declare function useTransferEngineToken(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, TransferEngineTokenPayload, unknown>;
6901
+ declare function useTransferEngineToken(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, TransferEngineTokenPayload, unknown>;
6787
6902
 
6788
6903
  interface TransferToSavingsPayload {
6789
6904
  to: string;
6790
6905
  amount: string;
6791
6906
  memo: string;
6792
6907
  }
6793
- declare function useTransferToSavings(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, TransferToSavingsPayload, unknown>;
6908
+ declare function useTransferToSavings(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, TransferToSavingsPayload, unknown>;
6794
6909
 
6795
6910
  interface TransferFromSavingsPayload {
6796
6911
  to: string;
@@ -6798,25 +6913,25 @@ interface TransferFromSavingsPayload {
6798
6913
  memo: string;
6799
6914
  requestId: number;
6800
6915
  }
6801
- declare function useTransferFromSavings(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, TransferFromSavingsPayload, unknown>;
6916
+ declare function useTransferFromSavings(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, TransferFromSavingsPayload, unknown>;
6802
6917
 
6803
6918
  interface TransferToVestingPayload {
6804
6919
  to: string;
6805
6920
  amount: string;
6806
6921
  }
6807
- declare function useTransferToVesting(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, TransferToVestingPayload, unknown>;
6922
+ declare function useTransferToVesting(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, TransferToVestingPayload, unknown>;
6808
6923
 
6809
6924
  interface WithdrawVestingPayload {
6810
6925
  vestingShares: string;
6811
6926
  }
6812
- declare function useWithdrawVesting(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, WithdrawVestingPayload, unknown>;
6927
+ declare function useWithdrawVesting(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, WithdrawVestingPayload, unknown>;
6813
6928
 
6814
6929
  interface ConvertPayload {
6815
6930
  amount: string;
6816
6931
  requestId: number;
6817
6932
  collateralized?: boolean;
6818
6933
  }
6819
- declare function useConvert(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ConvertPayload, unknown>;
6934
+ declare function useConvert(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, ConvertPayload, unknown>;
6820
6935
 
6821
6936
  interface ClaimInterestPayload {
6822
6937
  to: string;
@@ -6824,59 +6939,59 @@ interface ClaimInterestPayload {
6824
6939
  memo: string;
6825
6940
  requestId: number;
6826
6941
  }
6827
- declare function useClaimInterest(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ClaimInterestPayload, unknown>;
6942
+ declare function useClaimInterest(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, ClaimInterestPayload, unknown>;
6828
6943
 
6829
6944
  interface ClaimRewardsPayload {
6830
6945
  rewardHive: string;
6831
6946
  rewardHbd: string;
6832
6947
  rewardVests: string;
6833
6948
  }
6834
- declare function useClaimRewards(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ClaimRewardsPayload, unknown>;
6949
+ declare function useClaimRewards(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, ClaimRewardsPayload, unknown>;
6835
6950
 
6836
6951
  interface LockLarynxPayload {
6837
6952
  mode: "lock" | "unlock";
6838
6953
  amount: number;
6839
6954
  }
6840
- declare function useLockLarynx(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, LockLarynxPayload, unknown>;
6955
+ declare function useLockLarynx(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, LockLarynxPayload, unknown>;
6841
6956
 
6842
6957
  interface PowerLarynxPayload {
6843
6958
  mode: "up" | "down";
6844
6959
  amount: number;
6845
6960
  }
6846
- declare function usePowerLarynx(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, PowerLarynxPayload, unknown>;
6961
+ declare function usePowerLarynx(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, PowerLarynxPayload, unknown>;
6847
6962
 
6848
6963
  interface DelegateEngineTokenPayload {
6849
6964
  to: string;
6850
6965
  symbol: string;
6851
6966
  quantity: string;
6852
6967
  }
6853
- declare function useDelegateEngineToken(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, DelegateEngineTokenPayload, unknown>;
6968
+ declare function useDelegateEngineToken(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, DelegateEngineTokenPayload, unknown>;
6854
6969
 
6855
6970
  interface UndelegateEngineTokenPayload {
6856
6971
  from: string;
6857
6972
  symbol: string;
6858
6973
  quantity: string;
6859
6974
  }
6860
- declare function useUndelegateEngineToken(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, UndelegateEngineTokenPayload, unknown>;
6975
+ declare function useUndelegateEngineToken(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, UndelegateEngineTokenPayload, unknown>;
6861
6976
 
6862
6977
  interface StakeEngineTokenPayload {
6863
6978
  to: string;
6864
6979
  symbol: string;
6865
6980
  quantity: string;
6866
6981
  }
6867
- declare function useStakeEngineToken(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, StakeEngineTokenPayload, unknown>;
6982
+ declare function useStakeEngineToken(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, StakeEngineTokenPayload, unknown>;
6868
6983
 
6869
6984
  interface UnstakeEngineTokenPayload {
6870
6985
  to: string;
6871
6986
  symbol: string;
6872
6987
  quantity: string;
6873
6988
  }
6874
- declare function useUnstakeEngineToken(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, UnstakeEngineTokenPayload, unknown>;
6989
+ declare function useUnstakeEngineToken(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, UnstakeEngineTokenPayload, unknown>;
6875
6990
 
6876
6991
  interface ClaimEngineRewardsPayload {
6877
6992
  tokens: string[];
6878
6993
  }
6879
- declare function useClaimEngineRewards(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ClaimEngineRewardsPayload, unknown>;
6994
+ declare function useClaimEngineRewards(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, ClaimEngineRewardsPayload, unknown>;
6880
6995
 
6881
6996
  interface EngineMarketOrderPayload {
6882
6997
  action: "buy" | "sell" | "cancel";
@@ -6886,7 +7001,7 @@ interface EngineMarketOrderPayload {
6886
7001
  orderId?: string;
6887
7002
  orderType?: "buy" | "sell";
6888
7003
  }
6889
- declare function useEngineMarketOrder(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, EngineMarketOrderPayload, unknown>;
7004
+ declare function useEngineMarketOrder(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, EngineMarketOrderPayload, unknown>;
6890
7005
 
6891
7006
  interface WalletOperationPayload {
6892
7007
  from: string;
@@ -6912,13 +7027,13 @@ interface WalletOperationPayload {
6912
7027
  * @param operation - The operation type from AssetOperation enum
6913
7028
  * @param auth - Auth context for broadcasting
6914
7029
  */
6915
- declare function useWalletOperation(username: string | undefined, asset: string, operation: AssetOperation, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, WalletOperationPayload, unknown>;
7030
+ declare function useWalletOperation(username: string | undefined, asset: string, operation: AssetOperation, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, WalletOperationPayload, unknown>;
6916
7031
 
6917
7032
  interface DelegateRcPayload {
6918
7033
  to: string;
6919
7034
  maxRc: string | number;
6920
7035
  }
6921
- declare function useDelegateRc(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, DelegateRcPayload, unknown>;
7036
+ declare function useDelegateRc(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, DelegateRcPayload, unknown>;
6922
7037
 
6923
7038
  declare const HIVE_ACCOUNT_OPERATION_GROUPS: Record<HiveOperationGroup, number[]>;
6924
7039
 
@@ -6980,12 +7095,12 @@ interface WitnessVotePayload {
6980
7095
  * });
6981
7096
  * ```
6982
7097
  */
6983
- declare function useWitnessVote(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, WitnessVotePayload, unknown>;
7098
+ declare function useWitnessVote(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, WitnessVotePayload, unknown>;
6984
7099
 
6985
7100
  interface WitnessProxyPayload {
6986
7101
  proxy: string;
6987
7102
  }
6988
- declare function useWitnessProxy(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, WitnessProxyPayload, unknown>;
7103
+ declare function useWitnessProxy(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, WitnessProxyPayload, unknown>;
6989
7104
 
6990
7105
  interface Witness {
6991
7106
  total_missed: number;
@@ -7003,22 +7118,78 @@ interface Witness {
7003
7118
  owner: string;
7004
7119
  signing_key: string;
7005
7120
  last_hbd_exchange_update: string;
7121
+ /** Rank by vote weight (only available via REST) */
7122
+ rank?: number;
7123
+ /** Total vests supporting this witness (only available via REST) */
7124
+ vests?: string;
7125
+ /** Number of accounts voting for this witness (only available via REST) */
7126
+ voters_num?: number;
7127
+ /** Daily change in voter count (only available via REST) */
7128
+ voters_num_daily_change?: number;
7129
+ /** Current price feed value (only available via REST) */
7130
+ price_feed?: number;
7131
+ /** HBD interest rate in basis points (only available via REST) */
7132
+ hbd_interest_rate?: number;
7133
+ /** Last confirmed block number (only available via REST) */
7134
+ last_confirmed_block_num?: number;
7135
+ }
7136
+ interface WitnessVoter {
7137
+ voter_name: string;
7138
+ vests: string;
7139
+ account_vests: string;
7140
+ proxied_vests: string;
7141
+ timestamp: string;
7142
+ }
7143
+ interface WitnessVotersResponse {
7144
+ total_votes: number;
7145
+ total_pages: number;
7146
+ voters: WitnessVoter[];
7006
7147
  }
7007
7148
 
7008
7149
  type WitnessPage = Witness[];
7009
7150
  /**
7010
- * Get witnesses ordered by vote count (infinite scroll)
7151
+ * Get witnesses ordered by vote count (infinite scroll).
7152
+ * Uses the hafbe-api REST endpoint - replaces multi-call RPC assembly
7153
+ * with a single paginated call. Includes voter count, rank, and other
7154
+ * data that was previously unavailable.
7011
7155
  *
7012
7156
  * @param limit - Number of witnesses per page
7013
7157
  */
7014
- declare function getWitnessesInfiniteQueryOptions(limit: number): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseInfiniteQueryOptions<WitnessPage, Error, WitnessPage, (string | number)[], string>, "queryFn"> & {
7015
- queryFn?: _tanstack_react_query.QueryFunction<WitnessPage, (string | number)[], string> | undefined;
7158
+ declare function getWitnessesInfiniteQueryOptions(limit: number): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseInfiniteQueryOptions<WitnessPage, Error, WitnessPage, (string | number)[], number>, "queryFn"> & {
7159
+ queryFn?: _tanstack_react_query.QueryFunction<WitnessPage, (string | number)[], number> | undefined;
7016
7160
  } & {
7017
7161
  queryKey: (string | number)[] & {
7018
7162
  [dataTagSymbol]: _tanstack_react_query.InfiniteData<WitnessPage, unknown>;
7019
7163
  [dataTagErrorSymbol]: Error;
7020
7164
  };
7021
7165
  };
7166
+ /**
7167
+ * Get voters for a specific witness with pagination.
7168
+ *
7169
+ * @param witness - Witness account name
7170
+ * @param pageSize - Number of voters per page
7171
+ */
7172
+ declare function getWitnessVotersInfiniteQueryOptions(witness: string, pageSize?: number): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseInfiniteQueryOptions<WitnessVoter[], Error, WitnessVoter[], (string | number)[], number>, "queryFn"> & {
7173
+ queryFn?: _tanstack_react_query.QueryFunction<WitnessVoter[], (string | number)[], number> | undefined;
7174
+ } & {
7175
+ queryKey: (string | number)[] & {
7176
+ [dataTagSymbol]: _tanstack_react_query.InfiniteData<WitnessVoter[], unknown>;
7177
+ [dataTagErrorSymbol]: Error;
7178
+ };
7179
+ };
7180
+ /**
7181
+ * Get total voter count for a witness.
7182
+ *
7183
+ * @param witness - Witness account name
7184
+ */
7185
+ declare function getWitnessVoterCountQueryOptions(witness: string): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<number, Error, number, string[]>, "queryFn"> & {
7186
+ queryFn?: _tanstack_react_query.QueryFunction<number, string[], never> | undefined;
7187
+ } & {
7188
+ queryKey: string[] & {
7189
+ [dataTagSymbol]: number;
7190
+ [dataTagErrorSymbol]: Error;
7191
+ };
7192
+ };
7022
7193
 
7023
7194
  interface OrdersDataItem {
7024
7195
  created: string;
@@ -7220,12 +7391,12 @@ interface LimitOrderCreatePayload {
7220
7391
  expiration: string;
7221
7392
  orderId: number;
7222
7393
  }
7223
- declare function useLimitOrderCreate(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, LimitOrderCreatePayload, unknown>;
7394
+ declare function useLimitOrderCreate(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, LimitOrderCreatePayload, unknown>;
7224
7395
 
7225
7396
  interface LimitOrderCancelPayload {
7226
7397
  orderId: number;
7227
7398
  }
7228
- declare function useLimitOrderCancel(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, LimitOrderCancelPayload, unknown>;
7399
+ declare function useLimitOrderCancel(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, LimitOrderCancelPayload, unknown>;
7229
7400
 
7230
7401
  interface ApiResponse<T> {
7231
7402
  status: number;
@@ -7537,7 +7708,7 @@ interface BoostPlusPayload {
7537
7708
  account: string;
7538
7709
  duration: number;
7539
7710
  }
7540
- declare function useBoostPlus(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, BoostPlusPayload, unknown>;
7711
+ declare function useBoostPlus(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, BoostPlusPayload, unknown>;
7541
7712
 
7542
7713
  type BridgeParams = Record<string, unknown> | unknown[];
7543
7714
  declare function bridgeApiCall<T>(endpoint: string, params: BridgeParams, signal?: AbortSignal): Promise<T>;
@@ -8215,4 +8386,76 @@ declare function getBadActorsQueryOptions(): _tanstack_react_query.OmitKeyof<_ta
8215
8386
  };
8216
8387
  };
8217
8388
 
8218
- export { ACCOUNT_OPERATION_GROUPS, ALL_ACCOUNT_OPERATIONS, ALL_NOTIFY_TYPES, type AccountBookmark, type AccountFavorite, type AccountFollowStats, type AccountKeys, type AccountNotification, type AccountProfile, type AccountRelationship, type AccountReputation, type AiAssistParams, type AiAssistPrice, type AiAssistResponse, type AiGenerationPrice, type AiGenerationRequest, type AiGenerationResponse, type AiImagePowerTier, type AiImagePriceResponse, type Announcement, type ApiBookmarkNotification, type ApiDelegationsNotification, type ApiFavoriteNotification, type ApiFollowNotification, type ApiInactiveNotification, type ApiMentionNotification, type ApiNotification, type ApiNotificationSetting, type ApiReblogNotification, type ApiReferralNotification, type ApiReplyNotification, type ApiResponse, type ApiSpinNotification, type ApiTransferNotification, type ApiVoteNotification, type ApiWeeklyEarningsNotification, type Asset, AssetOperation, type AuthContext, type AuthContextV2, type AuthMethod, type AuthorReward, Authority, type AuthorityLevel, type AuthorityType, type Beneficiary, type BlogEntry, type BoostPlusAccountPrice, type BoostPlusPayload, type BroadcastMode, BroadcastResult, type BuildProfileMetadataArgs, BuySellTransactionType, CONFIG, type CancelTransferFromSavings, type CantAfford, type CheckUsernameWalletsPendingResponse, type ClaimAccountPayload, type ClaimEngineRewardsPayload, type ClaimInterestPayload, type ClaimRewardBalance, type ClaimRewardsPayload, type CollateralizedConversionRequest, type CollateralizedConvert, type CommentBenefactor, type CommentPayload, type CommentPayoutUpdate, type CommentReward, type Communities, type Community, type CommunityProps, type CommunityRewardsRegisterPayload, type CommunityRole, type CommunityTeam, type CommunityType, ConfigManager, type ConversionRequest, type ConvertPayload, type CreateAccountPayload, type CrossPostPayload, type CurationDuration, type CurationItem, type CurationReward, type CurrencyRates, type DelegateEngineTokenPayload, type DelegateRcPayload, type DelegateVestingShares, type DelegateVestingSharesPayload, type DelegatedVestingShare, type DeleteCommentPayload, type DeletedEntry, type Draft, type DraftMetadata, type DraftsWrappedResponse, type DynamicProps$1 as DynamicProps, index as EcencyAnalytics, EcencyQueriesManager, type EffectiveCommentVote, type EngineMarketOrderPayload, EntriesCacheManagement, type Entry$1 as Entry, type EntryBeneficiaryRoute, type EntryHeader, type EntryStat, type EntryVote, ErrorType, type FeedHistoryItem, type FillCollateralizedConvertRequest, type FillConvertRequest, type FillOrder, type FillRecurrentTransfers, type FillVestingWithdraw, type Follow, type FollowPayload, type Fragment, type FriendSearchResult, type FriendsPageParam, type FriendsRow, type FullAccount, type GameClaim, type GeneralAssetInfo, type GeneralAssetTransaction, type GenerateImageParams, type GetGameStatus, type GetRecoveriesEmailResponse, type GrantPostingPermissionPayload, HIVE_ACCOUNT_OPERATION_GROUPS, HIVE_OPERATION_LIST, HIVE_OPERATION_NAME_BY_ID, HIVE_OPERATION_ORDERS, type HiveBasedAssetSignType, type HiveEngineMarketResponse, type HiveEngineMetric, type HiveEngineOpenOrder, type HiveEngineOrderBookEntry, HiveEngineToken, type HiveEngineTokenBalance, type HiveEngineTokenInfo, type HiveEngineTokenMetadataResponse, type HiveEngineTokenStatus, type HiveEngineTransaction, type HiveHbdStats, type HiveMarketMetric, type HiveOperationFilter, type HiveOperationFilterKey, type HiveOperationFilterValue, type HiveOperationGroup, type HiveOperationName, HiveSignerIntegration, type HiveTransaction, type HsTokenRenewResponse, INTERNAL_API_TIMEOUT_MS, type IncomingRcDelegation, type IncomingRcResponse, type Interest, type JsonMetadata, type JsonPollMetadata, type Keys, type LeaderBoardDuration, type LeaderBoardItem, type LimitOrderCancel, type LimitOrderCancelPayload, type LimitOrderCreate, type LimitOrderCreatePayload, type LockLarynxPayload, type MarketCandlestickDataItem, type MarketData, type MarketStatistics, type MedianHistoryPrice, type MutePostPayload, NaiMap, NotificationFilter, NotificationViewType, type Notifications, NotifyTypes, OPERATION_AUTHORITY_MAP, type OpenOrdersData, Operation, type OperationGroup, OperationName, OrderIdPrefix, type OrdersData, type OrdersDataItem, type PageStatsResponse, type PaginationMeta, type ParsedChainError, type Payer, type PinPostPayload, type PlatformAdapter, type PointTransaction, PointTransactionType, type Points, type PointsResponse, type PortfolioResponse, type PortfolioWalletItem, type PostTip, type PostTipsResponse, type PowerLarynxPayload, PrivateKey, type ProducerReward, type Profile, type ProfileTokens, type PromotePayload, type PromotePrice, type Proposal, type ProposalCreatePayload, type ProposalPay, type ProposalVote, type ProposalVotePayload, type ProposalVoteRow, PublicKey, QueryKeys, type RCAccount, ROLES, type RcDirectDelegation, type RcDirectDelegationsResponse, type RcStats, type Reblog, type ReblogPayload, type ReceivedVestingShare, type RecordActivityOptions, type Recoveries, type RecurrentTransfer, type RecurrentTransfers, type ReferralItem, type ReferralItems, type ReferralStat, type ReturnVestingDelegation, type RewardFund, type RewardedCommunity, type SMTAsset, type SavingsWithdrawRequest, type Schedule, type SearchResponse, type SearchResult, type SetCommunityRolePayload, type SetLastReadPayload, type SetWithdrawRoute, type SetWithdrawVestingRoutePayload, SortOrder, type SpkApiWallet, type SpkMarkets, type StakeEngineTokenPayload, type StatsResponse, type SubscribeCommunityPayload, type Subscription, Symbol, type ThreadItemEntry, ThreeSpeakIntegration, type ThreeSpeakVideo, type Token, type TokenMetadata, type Transaction, type TransactionConfirmation, type Transfer, type TransferEngineTokenPayload, type TransferFromSavingsPayload, type TransferLarynxPayload, type TransferPayload, type TransferPointPayload, type TransferSpkPayload, type TransferToSavings, type TransferToSavingsPayload, type TransferToVesting, type TransferToVestingPayload, type TransformedSpkMarkets, type TrendingTag, type UndelegateEngineTokenPayload, type UnfollowPayload, type UnstakeEngineTokenPayload, type UnsubscribeCommunityPayload, type UpdateCommunityPayload, type UpdateProposalVotes, type UpdateReplyPayload, type User, type UserImage, type ValidatePostCreatingOptions, type VestingDelegationExpiration, type Vote, type VoteHistoryPage, type VoteHistoryPageParam, type VotePayload, type VoteProxy, type WalletMetadataCandidate, type WalletOperationPayload, type WaveEntry, type WaveTrendingAuthor, type WaveTrendingTag, type WithdrawRoute, type WithdrawVesting, type WithdrawVestingPayload, type Witness, type WitnessProxyPayload, type WitnessVotePayload, type WrappedResponse, type WsBookmarkNotification, type WsDelegationsNotification, type WsFavoriteNotification, type WsFollowNotification, type WsInactiveNotification, type WsMentionNotification, type WsNotification, type WsReblogNotification, type WsReferralNotification, type WsReplyNotification, type WsSpinNotification, type WsTransferNotification, type WsVoteNotification, addDraft, addImage, addOptimisticDiscussionEntry, addSchedule, bridgeApiCall, broadcastJson, broadcastOperations, broadcastOperationsAsync, buildAccountCreateOp, buildAccountUpdate2Op, buildAccountUpdateOp, buildActiveCustomJsonOp, buildBoostOp, buildBoostOpWithPoints, buildBoostPlusOp, buildCancelTransferFromSavingsOp, buildChangeRecoveryAccountOp, buildClaimAccountOp, buildClaimInterestOps, buildClaimRewardBalanceOp, buildCollateralizedConvertOp, buildCommentOp, buildCommentOptionsOp, buildCommunityRegistrationOp, buildConvertOp, buildCreateClaimedAccountOp, buildDelegateRcOp, buildDelegateVestingSharesOp, buildDeleteCommentOp, buildEngineClaimOp, buildEngineOp, buildFlagPostOp, buildFollowOp, buildGrantPostingPermissionOp, buildIgnoreOp, buildLimitOrderCancelOp, buildLimitOrderCreateOp, buildLimitOrderCreateOpWithType, buildMultiPointTransferOps, buildMultiTransferOps, buildMutePostOp, buildMuteUserOp, buildPinPostOp, buildPointTransferOp, buildPostingCustomJsonOp, buildProfileMetadata, buildPromoteOp, buildProposalCreateOp, buildProposalVoteOp, buildReblogOp, buildRecoverAccountOp, buildRecurrentTransferOp, buildRemoveProposalOp, buildRequestAccountRecoveryOp, buildRevokeKeysOp, buildRevokePostingPermissionOp, buildSetLastReadOps, buildSetRoleOp, buildSetWithdrawVestingRouteOp, buildSpkCustomJsonOp, buildSubscribeOp, buildTransferFromSavingsOp, buildTransferOp, buildTransferToSavingsOp, buildTransferToVestingOp, buildUnfollowOp, buildUnignoreOp, buildUnsubscribeOp, buildUpdateCommunityOp, buildUpdateProposalOp, buildVoteOp, buildWithdrawVestingOp, buildWitnessProxyOp, buildWitnessVoteOp, calculateRCMana, calculateVPMana, canRevokeFromAuthority, checkFavoriteQueryOptions, checkUsernameWalletsPendingQueryOptions, decodeObj, dedupeAndSortKeyAuths, deleteDraft, deleteImage, deleteSchedule, downVotingPower, encodeObj, extractAccountProfile, formatError, formattedNumber, getAccountFullQueryOptions, getAccountNotificationsInfiniteQueryOptions, getAccountPendingRecoveryQueryOptions, getAccountPosts, getAccountPostsInfiniteQueryOptions, getAccountPostsQueryOptions, getAccountRcQueryOptions, getAccountRecoveriesQueryOptions, getAccountReputationsQueryOptions, getAccountSubscriptionsQueryOptions, getAccountVoteHistoryInfiniteQueryOptions, getAccountWalletAssetInfoQueryOptions, getAccountsQueryOptions, getAiAssistPriceQueryOptions, getAiGeneratePriceQueryOptions, getAllHiveEngineTokensQueryOptions, getAnnouncementsQueryOptions, getBadActorsQueryOptions, getBookmarksInfiniteQueryOptions, getBookmarksQueryOptions, getBoostPlusAccountPricesQueryOptions, getBoostPlusPricesQueryOptions, getBotsQueryOptions, getBoundFetch, getChainPropertiesQueryOptions, getCollateralizedConversionRequestsQueryOptions, getCommentHistoryQueryOptions, getCommunities, getCommunitiesQueryOptions, getCommunity, getCommunityContextQueryOptions, getCommunityPermissions, getCommunityQueryOptions, getCommunitySubscribersQueryOptions, getCommunityType, getContentQueryOptions, getContentRepliesQueryOptions, getControversialRisingInfiniteQueryOptions, getConversionRequestsQueryOptions, getCurrencyRate, getCurrencyRates, getCurrencyTokenRate, getCurrentMedianHistoryPriceQueryOptions, getCustomJsonAuthority, getDeletedEntryQueryOptions, getDiscoverCurationQueryOptions, getDiscoverLeaderboardQueryOptions, getDiscussion, getDiscussionQueryOptions, getDiscussionsQueryOptions, getDraftsInfiniteQueryOptions, getDraftsQueryOptions, getDynamicPropsQueryOptions, getEntryActiveVotesQueryOptions, getFavoritesInfiniteQueryOptions, getFavoritesQueryOptions, getFeedHistoryQueryOptions, getFollowCountQueryOptions, getFollowersQueryOptions, getFollowingQueryOptions, getFragmentsInfiniteQueryOptions, getFragmentsQueryOptions, getFriendsInfiniteQueryOptions, getGalleryImagesQueryOptions, getGameStatusCheckQueryOptions, getHbdAssetGeneralInfoQueryOptions, getHbdAssetTransactionsQueryOptions, getHiveAssetGeneralInfoQueryOptions, getHiveAssetMetricQueryOptions, getHiveAssetTransactionsQueryOptions, getHiveAssetWithdrawalRoutesQueryOptions, getHiveEngineBalancesWithUsdQueryOptions, getHiveEngineMetrics, getHiveEngineOpenOrders, getHiveEngineOrderBook, getHiveEngineTokenGeneralInfoQueryOptions, getHiveEngineTokenMetrics, getHiveEngineTokenTransactions, getHiveEngineTokenTransactionsQueryOptions, getHiveEngineTokensBalances, getHiveEngineTokensBalancesQueryOptions, getHiveEngineTokensMarket, getHiveEngineTokensMarketQueryOptions, getHiveEngineTokensMetadata, getHiveEngineTokensMetadataQueryOptions, getHiveEngineTokensMetricsQueryOptions, getHiveEngineTradeHistory, getHiveEngineUnclaimedRewards, getHiveEngineUnclaimedRewardsQueryOptions, getHiveHbdStatsQueryOptions, getHivePoshLinksQueryOptions, getHivePowerAssetGeneralInfoQueryOptions, getHivePowerAssetTransactionsQueryOptions, getHivePowerDelegatesInfiniteQueryOptions, getHivePowerDelegatingsQueryOptions, getHivePrice, getImagesInfiniteQueryOptions, getImagesQueryOptions, getIncomingRcQueryOptions, getLarynxAssetGeneralInfoQueryOptions, getLarynxPowerAssetGeneralInfoQueryOptions, getMarketData, getMarketDataQueryOptions, getMarketHistoryQueryOptions, getMarketStatisticsQueryOptions, getMutedUsersQueryOptions, getNormalizePostQueryOptions, getNotificationSetting, getNotifications, getNotificationsInfiniteQueryOptions, getNotificationsSettingsQueryOptions, getNotificationsUnreadCountQueryOptions, getOpenOrdersQueryOptions, getOperationAuthority, getOrderBookQueryOptions, getOutgoingRcDelegationsInfiniteQueryOptions, getPageStatsQueryOptions, getPointsAssetGeneralInfoQueryOptions, getPointsAssetTransactionsQueryOptions, getPointsQueryOptions, getPortfolioQueryOptions, getPost, getPostHeader, getPostHeaderQueryOptions, getPostQueryOptions, getPostTipsQueryOptions, getPostsRanked, getPostsRankedInfiniteQueryOptions, getPostsRankedQueryOptions, getProfiles, getProfilesQueryOptions, getPromotePriceQueryOptions, getPromotedPost, getPromotedPostsQuery, getProposalAuthority, getProposalQueryOptions, getProposalVotesInfiniteQueryOptions, getProposalsQueryOptions, getQueryClient, getRcStatsQueryOptions, getRebloggedByQueryOptions, getReblogsQueryOptions, getReceivedVestingSharesQueryOptions, getRecurrentTransfersQueryOptions, getReferralsInfiniteQueryOptions, getReferralsStatsQueryOptions, getRelationshipBetweenAccounts, getRelationshipBetweenAccountsQueryOptions, getRequiredAuthority, getRewardFundQueryOptions, getRewardedCommunitiesQueryOptions, getSavingsWithdrawFromQueryOptions, getSchedulesInfiniteQueryOptions, getSchedulesQueryOptions, getSearchAccountQueryOptions, getSearchAccountsByUsernameQueryOptions, getSearchApiInfiniteQueryOptions, getSearchFriendsQueryOptions, getSearchPathQueryOptions, getSearchTopicsQueryOptions, getSimilarEntriesQueryOptions, getSpkAssetGeneralInfoQueryOptions, getSpkMarkets, getSpkMarketsQueryOptions, getSpkWallet, getSpkWalletQueryOptions, getStatsQueryOptions, getSubscribers, getSubscriptions, getTradeHistoryQueryOptions, getTransactionsInfiniteQueryOptions, getTrendingTagsQueryOptions, getTrendingTagsWithStatsQueryOptions, getUserPostVoteQueryOptions, getUserProposalVotesQueryOptions, getVestingDelegationExpirationsQueryOptions, getVestingDelegationsQueryOptions, getVisibleFirstLevelThreadItems, getWavesByAccountQueryOptions, getWavesByHostQueryOptions, getWavesByTagQueryOptions, getWavesFollowingQueryOptions, getWavesTrendingAuthorsQueryOptions, getWavesTrendingTagsQueryOptions, getWithdrawRoutesQueryOptions, getWitnessesInfiniteQueryOptions, hsTokenRenew, isCommunity, isEmptyDate, isInfoError, isNetworkError, isResourceCreditsError, isWif, isWrappedResponse, lookupAccountsQueryOptions, makeQueryClient, mapThreadItemsToWaveEntries, markNotifications, moveSchedule, normalizePost, normalizeToWrappedResponse, normalizeWaveEntryFromApi, onboardEmail, parseAccounts, parseAsset, parseChainError, parseProfileMetadata, powerRechargeTime, rcPower, removeOptimisticDiscussionEntry, resolveHiveOperationFilters, resolvePost, restoreDiscussionSnapshots, restoreEntryInCache, rewardSpk, roleMap, saveNotificationSetting, search, searchPath, searchQueryOptions, sha256, shouldTriggerAuthFallback, signUp, sortDiscussions, subscribeEmail, toEntryArray, updateDraft, updateEntryInCache, uploadImage, uploadImageWithSignature, useAccountFavoriteAdd, useAccountFavoriteDelete, useAccountRelationsUpdate, useAccountRevokeKey, useAccountRevokePosting, useAccountUpdate, useAccountUpdateKeyAuths, useAccountUpdatePassword, useAccountUpdateRecovery, useAddDraft, useAddFragment, useAddImage, useAddSchedule, useAiAssist, useBookmarkAdd, useBookmarkDelete, useBoostPlus, useBroadcastMutation, useClaimAccount, useClaimEngineRewards, useClaimInterest, useClaimPoints, useClaimRewards, useComment, useConvert, useCreateAccount, useCrossPost, useDelegateEngineToken, useDelegateRc, useDelegateVestingShares, useDeleteComment, useDeleteDraft, useDeleteImage, useDeleteSchedule, useEditFragment, useEngineMarketOrder, useFollow, useGameClaim, useGenerateImage, useGrantPostingPermission, useLimitOrderCancel, useLimitOrderCreate, useLockLarynx, useMarkNotificationsRead, useMoveSchedule, useMutePost, usePinPost, usePowerLarynx, usePromote, useProposalCreate, useProposalVote, useReblog, useRecordActivity, useRegisterCommunityRewards, useRemoveFragment, useSetCommunityRole, useSetLastRead, useSetWithdrawVestingRoute, useSignOperationByHivesigner, useSignOperationByKey, useSignOperationByKeychain, useStakeEngineToken, useSubscribeCommunity, useTransfer, useTransferEngineToken, useTransferFromSavings, useTransferLarynx, useTransferPoint, useTransferSpk, useTransferToSavings, useTransferToVesting, useUndelegateEngineToken, useUnfollow, useUnstakeEngineToken, useUnsubscribeCommunity, useUpdateCommunity, useUpdateDraft, useUpdateReply, useUploadImage, useVote, useWalletOperation, useWithdrawVesting, useWitnessProxy, useWitnessVote, usrActivity, validatePostCreating, verifyPostOnAlternateNode, vestsToHp, votingPower, votingValue, withTimeoutSignal };
8389
+ declare const POLLS_PROTOCOL_VERSION = 1.1;
8390
+ declare enum PollPreferredInterpretation {
8391
+ NUMBER_OF_VOTES = "number_of_votes",
8392
+ TOKENS = "tokens"
8393
+ }
8394
+ interface PollChoiceVotes {
8395
+ total_votes: number;
8396
+ hive_hp?: number;
8397
+ hive_proxied_hp?: number;
8398
+ hive_hp_incl_proxied: number | null;
8399
+ }
8400
+ interface PollChoice {
8401
+ choice_num: number;
8402
+ choice_text: string;
8403
+ votes?: PollChoiceVotes;
8404
+ }
8405
+ interface PollVoter {
8406
+ name: string;
8407
+ choices: number[];
8408
+ hive_hp?: number;
8409
+ hive_proxied_hp?: number;
8410
+ hive_hp_incl_proxied?: number;
8411
+ }
8412
+ interface PollStats {
8413
+ total_voting_accounts_num: number;
8414
+ total_hive_hp?: number;
8415
+ total_hive_proxied_hp?: number;
8416
+ total_hive_hp_incl_proxied: number | null;
8417
+ }
8418
+ interface Poll {
8419
+ author: string;
8420
+ permlink: string;
8421
+ question: string;
8422
+ poll_choices: PollChoice[];
8423
+ poll_voters?: PollVoter[];
8424
+ poll_stats?: PollStats;
8425
+ poll_trx_id: string;
8426
+ status: string;
8427
+ end_time: string;
8428
+ preferred_interpretation: PollPreferredInterpretation | string;
8429
+ max_choices_voted: number;
8430
+ filter_account_age_days: number;
8431
+ protocol_version: number;
8432
+ created: string;
8433
+ post_title: string;
8434
+ post_body: string;
8435
+ parent_permlink: string;
8436
+ tags: string[];
8437
+ image: unknown[];
8438
+ token?: string | null;
8439
+ community_membership?: string[];
8440
+ allow_vote_changes?: boolean;
8441
+ ui_hide_res_until_voted?: boolean;
8442
+ platform?: string;
8443
+ }
8444
+ declare function mapMetaChoicesToPollChoices(metaChoices: string[]): PollChoice[];
8445
+
8446
+ declare function getPollQueryOptions(author: string | undefined, permlink: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<Poll, Error, Poll, string[]>, "queryFn"> & {
8447
+ queryFn?: _tanstack_react_query.QueryFunction<Poll, string[], never> | undefined;
8448
+ } & {
8449
+ queryKey: string[] & {
8450
+ [dataTagSymbol]: Poll;
8451
+ [dataTagErrorSymbol]: Error;
8452
+ };
8453
+ };
8454
+
8455
+ interface PollVotePayload {
8456
+ pollTrxId: string;
8457
+ choices: number[];
8458
+ }
8459
+ declare function usePollVote(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, PollVotePayload, unknown>;
8460
+
8461
+ export { ACCOUNT_OPERATION_GROUPS, ALL_ACCOUNT_OPERATIONS, ALL_NOTIFY_TYPES, type AccountBookmark, type AccountFavorite, type AccountFollowStats, type AccountKeys, type AccountNotification, type AccountProfile, type AccountRelationship, type AccountReputation, type AggregatedBalanceEntry, type AiAssistParams, type AiAssistPrice, type AiAssistResponse, type AiGenerationPrice, type AiGenerationRequest, type AiGenerationResponse, type AiImagePowerTier, type AiImagePriceResponse, type Announcement, type ApiBookmarkNotification, type ApiDelegationsNotification, type ApiFavoriteNotification, type ApiFollowNotification, type ApiInactiveNotification, type ApiMentionNotification, type ApiNotification, type ApiNotificationSetting, type ApiReblogNotification, type ApiReferralNotification, type ApiReplyNotification, type ApiResponse, type ApiSpinNotification, type ApiTransferNotification, type ApiVoteNotification, type ApiWeeklyEarningsNotification, type Asset, AssetOperation, type AuthContext, type AuthContextV2, type AuthMethod, type AuthorReward, Authority, type AuthorityLevel, type AuthorityType, type BalanceCoinType, type BalanceHistoryEntry, type BalanceHistoryResponse, type Beneficiary, type BlogEntry, type BoostPlusAccountPrice, type BoostPlusPayload, type BroadcastMode, BroadcastResult, type BuildProfileMetadataArgs, BuySellTransactionType, CONFIG, type CancelTransferFromSavings, type CantAfford, type CheckUsernameWalletsPendingResponse, type ClaimAccountPayload, type ClaimEngineRewardsPayload, type ClaimInterestPayload, type ClaimRewardBalance, type ClaimRewardsPayload, type CollateralizedConversionRequest, type CollateralizedConvert, type CommentBenefactor, type CommentPayload, type CommentPayoutUpdate, type CommentReward, type Communities, type Community, type CommunityProps, type CommunityRewardsRegisterPayload, type CommunityRole, type CommunityTeam, type CommunityType, ConfigManager, type ConversionRequest, type ConvertPayload, type CreateAccountPayload, type CrossPostPayload, type CurationDuration, type CurationItem, type CurationReward, type CurrencyRates, type DelegateEngineTokenPayload, type DelegateRcPayload, type DelegateVestingShares, type DelegateVestingSharesPayload, type DelegatedVestingShare, type DeleteCommentPayload, type DeletedEntry, type Draft, type DraftMetadata, type DraftsWrappedResponse, type DynamicProps$1 as DynamicProps, index as EcencyAnalytics, EcencyQueriesManager, type EffectiveCommentVote, type EngineMarketOrderPayload, EntriesCacheManagement, type Entry$1 as Entry, type EntryBeneficiaryRoute, type EntryHeader, type EntryStat, type EntryVote, ErrorType, type FeedHistoryItem, type FillCollateralizedConvertRequest, type FillConvertRequest, type FillOrder, type FillRecurrentTransfers, type FillVestingWithdraw, type Follow, type FollowPayload, type Fragment, type FriendSearchResult, type FriendsPageParam, type FriendsRow, type FullAccount, type GameClaim, type GeneralAssetInfo, type GeneralAssetTransaction, type GenerateImageParams, type GetGameStatus, type GetRecoveriesEmailResponse, type GrantPostingPermissionPayload, HIVE_ACCOUNT_OPERATION_GROUPS, HIVE_OPERATION_LIST, HIVE_OPERATION_NAME_BY_ID, HIVE_OPERATION_ORDERS, type HiveBasedAssetSignType, type HiveEngineMarketResponse, type HiveEngineMetric, type HiveEngineOpenOrder, type HiveEngineOrderBookEntry, HiveEngineToken, type HiveEngineTokenBalance, type HiveEngineTokenInfo, type HiveEngineTokenMetadataResponse, type HiveEngineTokenStatus, type HiveEngineTransaction, type HiveHbdStats, type HiveMarketMetric, type HiveOperationFilter, type HiveOperationFilterKey, type HiveOperationFilterValue, type HiveOperationGroup, type HiveOperationName, HiveSignerIntegration, type HiveTransaction, type HsTokenRenewResponse, INTERNAL_API_TIMEOUT_MS, type IncomingRcDelegation, type IncomingRcResponse, type Interest, type JsonMetadata, type JsonPollMetadata, type Keys, type LeaderBoardDuration, type LeaderBoardItem, type LimitOrderCancel, type LimitOrderCancelPayload, type LimitOrderCreate, type LimitOrderCreatePayload, type LockLarynxPayload, type MarketCandlestickDataItem, type MarketData, type MarketStatistics, type MedianHistoryPrice, type MutePostPayload, NaiMap, NotificationFilter, NotificationViewType, type Notifications, NotifyTypes, OPERATION_AUTHORITY_MAP, type OpenOrdersData, Operation, type OperationGroup, OperationName, OrderIdPrefix, type OrdersData, type OrdersDataItem, POLLS_PROTOCOL_VERSION, type PageStatsResponse, type PaginationMeta, type ParsedChainError, type Payer, type PinPostPayload, type PlatformAdapter, type PointTransaction, PointTransactionType, type Points, type PointsResponse, type Poll, type PollChoice, type PollChoiceVotes, PollPreferredInterpretation, type PollStats, type PollVotePayload, type PollVoter, type PortfolioResponse, type PortfolioWalletItem, type PostTip, type PostTipsResponse, type PowerLarynxPayload, PrivateKey, type ProducerReward, type Profile, type ProfileTokens, type PromotePayload, type PromotePrice, type Proposal, type ProposalCreatePayload, type ProposalPay, type ProposalVote, type ProposalVotePayload, type ProposalVoteRow, PublicKey, QueryKeys, type RCAccount, ROLES, type RcDirectDelegation, type RcDirectDelegationsResponse, type RcStats, type Reblog, type ReblogPayload, type ReceivedVestingShare, type RecordActivityOptions, type Recoveries, type RecurrentTransfer, type RecurrentTransfers, type ReferralItem, type ReferralItems, type ReferralStat, type ReturnVestingDelegation, type RewardFund, type RewardedCommunity, type SMTAsset, type SavingsWithdrawRequest, type Schedule, type SearchResponse, type SearchResult, type SetCommunityRolePayload, type SetLastReadPayload, type SetWithdrawRoute, type SetWithdrawVestingRoutePayload, SortOrder, type SpkApiWallet, type SpkMarkets, type StakeEngineTokenPayload, type StatsResponse, type SubscribeCommunityPayload, type Subscription, Symbol, type ThreadItemEntry, ThreeSpeakIntegration, type ThreeSpeakVideo, type Token, type TokenMetadata, type Transaction, type TransactionConfirmation, type Transfer, type TransferEngineTokenPayload, type TransferFromSavingsPayload, type TransferLarynxPayload, type TransferPayload, type TransferPointPayload, type TransferSpkPayload, type TransferToSavings, type TransferToSavingsPayload, type TransferToVesting, type TransferToVestingPayload, type TransformedSpkMarkets, type TrendingTag, type UndelegateEngineTokenPayload, type UnfollowPayload, type UnstakeEngineTokenPayload, type UnsubscribeCommunityPayload, type UpdateCommunityPayload, type UpdateProposalVotes, type UpdateReplyPayload, type User, type UserImage, type ValidatePostCreatingOptions, type VestingDelegationExpiration, type Vote, type VoteHistoryPage, type VoteHistoryPageParam, type VotePayload, type VoteProxy, type WalletMetadataCandidate, type WalletOperationPayload, type WaveEntry, type WaveTrendingAuthor, type WaveTrendingTag, type WithdrawRoute, type WithdrawVesting, type WithdrawVestingPayload, type Witness, type WitnessProxyPayload, type WitnessVotePayload, type WitnessVoter, type WitnessVotersResponse, type WrappedResponse, type WsBookmarkNotification, type WsDelegationsNotification, type WsFavoriteNotification, type WsFollowNotification, type WsInactiveNotification, type WsMentionNotification, type WsNotification, type WsReblogNotification, type WsReferralNotification, type WsReplyNotification, type WsSpinNotification, type WsTransferNotification, type WsVoteNotification, addDraft, addImage, addOptimisticDiscussionEntry, addSchedule, bridgeApiCall, broadcastJson, broadcastOperations, broadcastOperationsAsync, buildAccountCreateOp, buildAccountUpdate2Op, buildAccountUpdateOp, buildActiveCustomJsonOp, buildBoostOp, buildBoostOpWithPoints, buildBoostPlusOp, buildCancelTransferFromSavingsOp, buildChangeRecoveryAccountOp, buildClaimAccountOp, buildClaimInterestOps, buildClaimRewardBalanceOp, buildCollateralizedConvertOp, buildCommentOp, buildCommentOptionsOp, buildCommunityRegistrationOp, buildConvertOp, buildCreateClaimedAccountOp, buildDelegateRcOp, buildDelegateVestingSharesOp, buildDeleteCommentOp, buildEngineClaimOp, buildEngineOp, buildFlagPostOp, buildFollowOp, buildGrantPostingPermissionOp, buildIgnoreOp, buildLimitOrderCancelOp, buildLimitOrderCreateOp, buildLimitOrderCreateOpWithType, buildMultiPointTransferOps, buildMultiTransferOps, buildMutePostOp, buildMuteUserOp, buildPinPostOp, buildPointTransferOp, buildPostingCustomJsonOp, buildProfileMetadata, buildPromoteOp, buildProposalCreateOp, buildProposalVoteOp, buildReblogOp, buildRecoverAccountOp, buildRecurrentTransferOp, buildRemoveProposalOp, buildRequestAccountRecoveryOp, buildRevokeKeysOp, buildRevokePostingPermissionOp, buildSetLastReadOps, buildSetRoleOp, buildSetWithdrawVestingRouteOp, buildSpkCustomJsonOp, buildSubscribeOp, buildTransferFromSavingsOp, buildTransferOp, buildTransferToSavingsOp, buildTransferToVestingOp, buildUnfollowOp, buildUnignoreOp, buildUnsubscribeOp, buildUpdateCommunityOp, buildUpdateProposalOp, buildVoteOp, buildWithdrawVestingOp, buildWitnessProxyOp, buildWitnessVoteOp, calculateRCMana, calculateVPMana, canRevokeFromAuthority, checkFavoriteQueryOptions, checkUsernameWalletsPendingQueryOptions, decodeObj, dedupeAndSortKeyAuths, deleteDraft, deleteImage, deleteSchedule, downVotingPower, encodeObj, extractAccountProfile, formatError, formattedNumber, getAccountFullQueryOptions, getAccountNotificationsInfiniteQueryOptions, getAccountPendingRecoveryQueryOptions, getAccountPosts, getAccountPostsInfiniteQueryOptions, getAccountPostsQueryOptions, getAccountRcQueryOptions, getAccountRecoveriesQueryOptions, getAccountReputationsQueryOptions, getAccountSubscriptionsQueryOptions, getAccountVoteHistoryInfiniteQueryOptions, getAccountWalletAssetInfoQueryOptions, getAccountsQueryOptions, getAggregatedBalanceQueryOptions, getAiAssistPriceQueryOptions, getAiGeneratePriceQueryOptions, getAllHiveEngineTokensQueryOptions, getAnnouncementsQueryOptions, getBadActorsQueryOptions, getBalanceHistoryInfiniteQueryOptions, getBookmarksInfiniteQueryOptions, getBookmarksQueryOptions, getBoostPlusAccountPricesQueryOptions, getBoostPlusPricesQueryOptions, getBotsQueryOptions, getBoundFetch, getChainPropertiesQueryOptions, getCollateralizedConversionRequestsQueryOptions, getCommentHistoryQueryOptions, getCommunities, getCommunitiesQueryOptions, getCommunity, getCommunityContextQueryOptions, getCommunityPermissions, getCommunityQueryOptions, getCommunitySubscribersQueryOptions, getCommunityType, getContentQueryOptions, getContentRepliesQueryOptions, getControversialRisingInfiniteQueryOptions, getConversionRequestsQueryOptions, getCurrencyRate, getCurrencyRates, getCurrencyTokenRate, getCurrentMedianHistoryPriceQueryOptions, getCustomJsonAuthority, getDeletedEntryQueryOptions, getDiscoverCurationQueryOptions, getDiscoverLeaderboardQueryOptions, getDiscussion, getDiscussionQueryOptions, getDiscussionsQueryOptions, getDraftsInfiniteQueryOptions, getDraftsQueryOptions, getDynamicPropsQueryOptions, getEntryActiveVotesQueryOptions, getFavoritesInfiniteQueryOptions, getFavoritesQueryOptions, getFeedHistoryQueryOptions, getFollowCountQueryOptions, getFollowersQueryOptions, getFollowingQueryOptions, getFragmentsInfiniteQueryOptions, getFragmentsQueryOptions, getFriendsInfiniteQueryOptions, getGalleryImagesQueryOptions, getGameStatusCheckQueryOptions, getHbdAssetGeneralInfoQueryOptions, getHbdAssetTransactionsQueryOptions, getHiveAssetGeneralInfoQueryOptions, getHiveAssetMetricQueryOptions, getHiveAssetTransactionsQueryOptions, getHiveAssetWithdrawalRoutesQueryOptions, getHiveEngineBalancesWithUsdQueryOptions, getHiveEngineMetrics, getHiveEngineOpenOrders, getHiveEngineOrderBook, getHiveEngineTokenGeneralInfoQueryOptions, getHiveEngineTokenMetrics, getHiveEngineTokenTransactions, getHiveEngineTokenTransactionsQueryOptions, getHiveEngineTokensBalances, getHiveEngineTokensBalancesQueryOptions, getHiveEngineTokensMarket, getHiveEngineTokensMarketQueryOptions, getHiveEngineTokensMetadata, getHiveEngineTokensMetadataQueryOptions, getHiveEngineTokensMetricsQueryOptions, getHiveEngineTradeHistory, getHiveEngineUnclaimedRewards, getHiveEngineUnclaimedRewardsQueryOptions, getHiveHbdStatsQueryOptions, getHivePoshLinksQueryOptions, getHivePowerAssetGeneralInfoQueryOptions, getHivePowerAssetTransactionsQueryOptions, getHivePowerDelegatesInfiniteQueryOptions, getHivePowerDelegatingsQueryOptions, getHivePrice, getImagesInfiniteQueryOptions, getImagesQueryOptions, getIncomingRcQueryOptions, getLarynxAssetGeneralInfoQueryOptions, getLarynxPowerAssetGeneralInfoQueryOptions, getMarketData, getMarketDataQueryOptions, getMarketHistoryQueryOptions, getMarketStatisticsQueryOptions, getMutedUsersQueryOptions, getNormalizePostQueryOptions, getNotificationSetting, getNotifications, getNotificationsInfiniteQueryOptions, getNotificationsSettingsQueryOptions, getNotificationsUnreadCountQueryOptions, getOpenOrdersQueryOptions, getOperationAuthority, getOrderBookQueryOptions, getOutgoingRcDelegationsInfiniteQueryOptions, getPageStatsQueryOptions, getPointsAssetGeneralInfoQueryOptions, getPointsAssetTransactionsQueryOptions, getPointsQueryOptions, getPollQueryOptions, getPortfolioQueryOptions, getPost, getPostHeader, getPostHeaderQueryOptions, getPostQueryOptions, getPostTipsQueryOptions, getPostsRanked, getPostsRankedInfiniteQueryOptions, getPostsRankedQueryOptions, getProfiles, getProfilesQueryOptions, getPromotePriceQueryOptions, getPromotedPost, getPromotedPostsQuery, getProposalAuthority, getProposalQueryOptions, getProposalVotesInfiniteQueryOptions, getProposalsQueryOptions, getQueryClient, getRcStatsQueryOptions, getRebloggedByQueryOptions, getReblogsQueryOptions, getReceivedVestingSharesQueryOptions, getRecurrentTransfersQueryOptions, getReferralsInfiniteQueryOptions, getReferralsStatsQueryOptions, getRelationshipBetweenAccounts, getRelationshipBetweenAccountsQueryOptions, getRequiredAuthority, getRewardFundQueryOptions, getRewardedCommunitiesQueryOptions, getSavingsWithdrawFromQueryOptions, getSchedulesInfiniteQueryOptions, getSchedulesQueryOptions, getSearchAccountQueryOptions, getSearchAccountsByUsernameQueryOptions, getSearchApiInfiniteQueryOptions, getSearchFriendsQueryOptions, getSearchPathQueryOptions, getSearchTopicsQueryOptions, getSimilarEntriesQueryOptions, getSpkAssetGeneralInfoQueryOptions, getSpkMarkets, getSpkMarketsQueryOptions, getSpkWallet, getSpkWalletQueryOptions, getStatsQueryOptions, getSubscribers, getSubscriptions, getTradeHistoryQueryOptions, getTransactionsInfiniteQueryOptions, getTrendingTagsQueryOptions, getTrendingTagsWithStatsQueryOptions, getUserPostVoteQueryOptions, getUserProposalVotesQueryOptions, getVestingDelegationExpirationsQueryOptions, getVestingDelegationsQueryOptions, getVisibleFirstLevelThreadItems, getWavesByAccountQueryOptions, getWavesByHostQueryOptions, getWavesByTagQueryOptions, getWavesFollowingQueryOptions, getWavesTrendingAuthorsQueryOptions, getWavesTrendingTagsQueryOptions, getWithdrawRoutesQueryOptions, getWitnessVoterCountQueryOptions, getWitnessVotersInfiniteQueryOptions, getWitnessesInfiniteQueryOptions, hsTokenRenew, isCommunity, isEmptyDate, isInfoError, isNetworkError, isResourceCreditsError, isWif, isWrappedResponse, lookupAccountsQueryOptions, makeQueryClient, mapMetaChoicesToPollChoices, mapThreadItemsToWaveEntries, markNotifications, moveSchedule, normalizePost, normalizeToWrappedResponse, normalizeWaveEntryFromApi, onboardEmail, parseAccounts, parseAsset, parseChainError, parseProfileMetadata, powerRechargeTime, rcPower, removeOptimisticDiscussionEntry, resolveHiveOperationFilters, resolvePost, restoreDiscussionSnapshots, restoreEntryInCache, rewardSpk, roleMap, saveNotificationSetting, search, searchPath, searchQueryOptions, sha256, shouldTriggerAuthFallback, signUp, sortDiscussions, subscribeEmail, toEntryArray, updateDraft, updateEntryInCache, uploadImage, uploadImageWithSignature, useAccountFavoriteAdd, useAccountFavoriteDelete, useAccountRelationsUpdate, useAccountRevokeKey, useAccountRevokePosting, useAccountUpdate, useAccountUpdateKeyAuths, useAccountUpdatePassword, useAccountUpdateRecovery, useAddDraft, useAddFragment, useAddImage, useAddSchedule, useAiAssist, useBookmarkAdd, useBookmarkDelete, useBoostPlus, useBroadcastMutation, useClaimAccount, useClaimEngineRewards, useClaimInterest, useClaimPoints, useClaimRewards, useComment, useConvert, useCreateAccount, useCrossPost, useDelegateEngineToken, useDelegateRc, useDelegateVestingShares, useDeleteComment, useDeleteDraft, useDeleteImage, useDeleteSchedule, useEditFragment, useEngineMarketOrder, useFollow, useGameClaim, useGenerateImage, useGrantPostingPermission, useLimitOrderCancel, useLimitOrderCreate, useLockLarynx, useMarkNotificationsRead, useMoveSchedule, useMutePost, usePinPost, usePollVote, usePowerLarynx, usePromote, useProposalCreate, useProposalVote, useReblog, useRecordActivity, useRegisterCommunityRewards, useRemoveFragment, useSetCommunityRole, useSetLastRead, useSetWithdrawVestingRoute, useSignOperationByHivesigner, useSignOperationByKey, useSignOperationByKeychain, useStakeEngineToken, useSubscribeCommunity, useTransfer, useTransferEngineToken, useTransferFromSavings, useTransferLarynx, useTransferPoint, useTransferSpk, useTransferToSavings, useTransferToVesting, useUndelegateEngineToken, useUnfollow, useUnstakeEngineToken, useUnsubscribeCommunity, useUpdateCommunity, useUpdateDraft, useUpdateReply, useUploadImage, useVote, useWalletOperation, useWithdrawVesting, useWitnessProxy, useWitnessVote, usrActivity, validatePostCreating, verifyPostOnAlternateNode, vestsToHp, votingPower, votingRshares, votingValue, withTimeoutSignal };