@ecency/sdk 2.2.5 → 2.2.6

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
 
@@ -694,1247 +694,1247 @@ interface WrappedResponse<T> {
694
694
  pagination: PaginationMeta;
695
695
  }
696
696
 
697
- interface AccountFollowStats {
698
- follower_count: number;
699
- following_count: number;
700
- account: string;
701
- }
697
+ /**
698
+ * Authority levels for Hive blockchain operations.
699
+ * - posting: Social operations (voting, commenting, reblogging)
700
+ * - active: Financial and account management operations
701
+ * - owner: Critical security operations (key changes, account recovery)
702
+ * - memo: Memo encryption/decryption (rarely used for signing)
703
+ */
704
+ type AuthorityLevel = 'posting' | 'active' | 'owner' | 'memo';
705
+ /**
706
+ * Maps operation types to their required authority level.
707
+ *
708
+ * This mapping is used to determine which key is needed to sign a transaction,
709
+ * enabling smart auth fallback and auth upgrade UI.
710
+ *
711
+ * @remarks
712
+ * - Most social operations (vote, comment, reblog) require posting authority
713
+ * - Financial operations (transfer, withdraw) require active authority
714
+ * - Account management operations require active authority
715
+ * - Security operations (password change, account recovery) require owner authority
716
+ * - custom_json requires dynamic detection based on required_auths vs required_posting_auths
717
+ */
718
+ declare const OPERATION_AUTHORITY_MAP: Record<string, AuthorityLevel>;
719
+ /**
720
+ * Determines authority required for a custom_json operation.
721
+ *
722
+ * Custom JSON operations can require either posting or active authority
723
+ * depending on which field is populated:
724
+ * - required_auths (active authority)
725
+ * - required_posting_auths (posting authority)
726
+ *
727
+ * @param customJsonOp - The custom_json operation to inspect
728
+ * @returns 'active' if requires active authority, 'posting' if requires posting authority
729
+ *
730
+ * @example
731
+ * ```typescript
732
+ * // Reblog operation (posting authority)
733
+ * const reblogOp: Operation = ['custom_json', {
734
+ * required_auths: [],
735
+ * required_posting_auths: ['alice'],
736
+ * id: 'reblog',
737
+ * json: '...'
738
+ * }];
739
+ * getCustomJsonAuthority(reblogOp); // Returns 'posting'
740
+ *
741
+ * // Some active authority custom_json
742
+ * const activeOp: Operation = ['custom_json', {
743
+ * required_auths: ['alice'],
744
+ * required_posting_auths: [],
745
+ * id: 'some_active_op',
746
+ * json: '...'
747
+ * }];
748
+ * getCustomJsonAuthority(activeOp); // Returns 'active'
749
+ * ```
750
+ */
751
+ declare function getCustomJsonAuthority(customJsonOp: Operation): AuthorityLevel;
752
+ /**
753
+ * Determines authority required for a proposal operation.
754
+ *
755
+ * Proposal operations (create_proposal, update_proposal) typically require
756
+ * active authority as they involve financial commitments and funding allocations.
757
+ *
758
+ * @param proposalOp - The proposal operation to inspect
759
+ * @returns 'active' authority requirement
760
+ *
761
+ * @remarks
762
+ * Unlike custom_json, proposal operations don't have explicit required_auths fields.
763
+ * They always use the creator's authority, which defaults to active for financial
764
+ * operations involving the DAO treasury.
765
+ *
766
+ * @example
767
+ * ```typescript
768
+ * const proposalOp: Operation = ['create_proposal', {
769
+ * creator: 'alice',
770
+ * receiver: 'bob',
771
+ * subject: 'My Proposal',
772
+ * permlink: 'my-proposal',
773
+ * start: '2026-03-01T00:00:00',
774
+ * end: '2026-04-01T00:00:00',
775
+ * daily_pay: '100.000 HBD',
776
+ * extensions: []
777
+ * }];
778
+ * getProposalAuthority(proposalOp); // Returns 'active'
779
+ * ```
780
+ */
781
+ declare function getProposalAuthority(proposalOp: Operation): AuthorityLevel;
782
+ /**
783
+ * Determines the required authority level for any operation.
784
+ *
785
+ * Uses the OPERATION_AUTHORITY_MAP for standard operations, and dynamic
786
+ * detection for custom_json operations.
787
+ *
788
+ * @param op - The operation to check
789
+ * @returns 'posting' or 'active' authority requirement
790
+ *
791
+ * @example
792
+ * ```typescript
793
+ * const voteOp: Operation = ['vote', { voter: 'alice', author: 'bob', permlink: 'post', weight: 10000 }];
794
+ * getOperationAuthority(voteOp); // Returns 'posting'
795
+ *
796
+ * const transferOp: Operation = ['transfer', { from: 'alice', to: 'bob', amount: '1.000 HIVE', memo: '' }];
797
+ * getOperationAuthority(transferOp); // Returns 'active'
798
+ * ```
799
+ */
800
+ declare function getOperationAuthority(op: Operation): AuthorityLevel;
801
+ /**
802
+ * Determines the highest authority level required for a list of operations.
803
+ *
804
+ * Useful when broadcasting multiple operations together - the highest authority
805
+ * level required by any operation determines what key is needed for the batch.
806
+ *
807
+ * Authority hierarchy: owner > active > posting > memo
808
+ *
809
+ * @param ops - Array of operations
810
+ * @returns Highest authority level required ('owner', 'active', or 'posting')
811
+ *
812
+ * @example
813
+ * ```typescript
814
+ * const ops: Operation[] = [
815
+ * ['vote', { ... }], // posting
816
+ * ['comment', { ... }], // posting
817
+ * ];
818
+ * getRequiredAuthority(ops); // Returns 'posting'
819
+ *
820
+ * const mixedOps: Operation[] = [
821
+ * ['comment', { ... }], // posting
822
+ * ['transfer', { ... }], // active
823
+ * ];
824
+ * getRequiredAuthority(mixedOps); // Returns 'active'
825
+ *
826
+ * const securityOps: Operation[] = [
827
+ * ['transfer', { ... }], // active
828
+ * ['change_recovery_account', { ... }], // owner
829
+ * ];
830
+ * getRequiredAuthority(securityOps); // Returns 'owner'
831
+ * ```
832
+ */
833
+ declare function getRequiredAuthority(ops: Operation[]): AuthorityLevel;
702
834
 
703
- interface AccountReputation {
704
- account: string;
705
- reputation: number;
706
- }
835
+ /**
836
+ * Broadcast mode controls whether the SDK waits for block inclusion.
837
+ *
838
+ * - `'sync'` (default): Uses `broadcast_transaction_synchronous` — waits for
839
+ * the transaction to be included in a block and returns `block_num`/`trx_num`.
840
+ * **Use for:** transfers, account updates, key changes, delegations, conversions.
841
+ *
842
+ * - `'async'`: Uses `broadcast_transaction` — returns as soon as the node
843
+ * accepts the transaction into its mempool. Transport and RPC errors are
844
+ * still thrown immediately; the only thing skipped is the block-inclusion wait.
845
+ * **Use for:** votes, follows/unfollows, reblogs, community subscribe/unsubscribe,
846
+ * custom_json social operations where faster response matters more than confirmation.
847
+ */
848
+ type BroadcastMode = 'sync' | 'async';
849
+ /**
850
+ * React Query mutation hook for broadcasting Hive operations.
851
+ * Supports multiple authentication methods with automatic fallback.
852
+ *
853
+ * @template T - Type of the mutation payload
854
+ * @param mutationKey - React Query mutation key for cache management
855
+ * @param username - Hive username (required for broadcast)
856
+ * @param operations - Function that converts payload to Hive operations
857
+ * @param onSuccess - Success callback after broadcast completes
858
+ * @param auth - Authentication context (supports both legacy AuthContext and new AuthContextV2)
859
+ * @param authority - Key authority to use ('posting' | 'active' | 'owner' | 'memo'), defaults to 'posting'
860
+ *
861
+ * @returns React Query mutation result
862
+ *
863
+ * @remarks
864
+ * **Authentication Flow:**
865
+ *
866
+ * 1. **With AuthContextV2 + adapter + enableFallback** (recommended for new code):
867
+ * - Tries auth methods in fallbackChain order
868
+ * - Smart fallback: only retries on auth errors, not RC/network errors
869
+ * - Uses platform adapter for storage, UI, and broadcasting
870
+ *
871
+ * 2. **With legacy AuthContext** (backward compatible):
872
+ * - Tries auth.broadcast() first (custom implementation)
873
+ * - Falls back to postingKey if available
874
+ * - Falls back to accessToken (HiveSigner) if available
875
+ * - Throws if no auth method available
876
+ *
877
+ * **Backward Compatibility:**
878
+ * - All existing code using AuthContext will continue to work
879
+ * - AuthContextV2 extends AuthContext, so it's a drop-in replacement
880
+ * - enableFallback defaults to false if no adapter provided
881
+ *
882
+ * @example
883
+ * ```typescript
884
+ * // New pattern with platform adapter and fallback
885
+ * const mutation = useBroadcastMutation(
886
+ * ['vote'],
887
+ * username,
888
+ * (payload) => [voteOperation(payload)],
889
+ * () => console.log('Success!'),
890
+ * {
891
+ * adapter: myAdapter,
892
+ * enableFallback: true,
893
+ * fallbackChain: ['keychain', 'key', 'hivesigner']
894
+ * },
895
+ * 'posting'
896
+ * );
897
+ *
898
+ * // Legacy pattern (still works)
899
+ * const mutation = useBroadcastMutation(
900
+ * ['vote'],
901
+ * username,
902
+ * (payload) => [voteOperation(payload)],
903
+ * () => console.log('Success!'),
904
+ * { postingKey: 'wif-key' }
905
+ * );
906
+ * ```
907
+ */
908
+ 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?: {
909
+ onMutate?: UseMutationOptions<unknown, Error, T>["onMutate"];
910
+ onError?: UseMutationOptions<unknown, Error, T>["onError"];
911
+ onSettled?: UseMutationOptions<unknown, Error, T>["onSettled"];
912
+ /**
913
+ * Controls whether to wait for block inclusion or just mempool acceptance.
914
+ *
915
+ * - `'sync'` (default): Waits for block inclusion, returns block_num/trx_num.
916
+ * Use for transfers, delegations, account updates, key changes.
917
+ *
918
+ * - `'async'`: Returns after mempool acceptance. Faster but no block confirmation.
919
+ * Use for votes, follows, reblogs, community subscribes, custom_json social ops.
920
+ */
921
+ broadcastMode?: BroadcastMode;
922
+ }): _tanstack_react_query.UseMutationResult<unknown, Error, T, unknown>;
707
923
 
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
- }
924
+ declare function broadcastJson<T>(username: string | undefined, id: string, payload: T, auth?: AuthContext): Promise<any>;
728
925
 
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
- }
926
+ declare function withTimeoutSignal(timeoutMs: number, signal?: AbortSignal): AbortSignal;
778
927
 
779
- interface AccountRelationship {
780
- follows: boolean;
781
- ignores: boolean;
782
- is_blacklisted: boolean;
783
- follows_blacklists: boolean;
928
+ /** Timeout for internal API calls (search, private API). */
929
+ declare const INTERNAL_API_TIMEOUT_MS = 10000;
930
+ declare const CONFIG: {
931
+ privateApiHost: string;
932
+ imageHost: string;
933
+ /** Current Hive RPC nodes. Reads from the unified hive-tx config. */
934
+ readonly hiveNodes: string[];
935
+ heliusApiKey: string | undefined;
936
+ queryClient: QueryClient;
937
+ plausibleHost: string;
938
+ spkNode: string;
939
+ dmcaAccounts: string[];
940
+ dmcaTags: string[];
941
+ dmcaPatterns: string[];
942
+ dmcaTagRegexes: RegExp[];
943
+ dmcaPatternRegexes: RegExp[];
944
+ _dmcaInitialized: boolean;
945
+ };
946
+ type DmcaListsInput = {
947
+ accounts?: string[];
948
+ tags?: string[];
949
+ posts?: string[];
950
+ };
951
+ declare namespace ConfigManager {
952
+ function setQueryClient(client: QueryClient): void;
953
+ /**
954
+ * Set the private API host
955
+ * @param host - The private API host URL (e.g., "https://ecency.com" or "" for relative URLs)
956
+ */
957
+ function setPrivateApiHost(host: string): void;
958
+ /**
959
+ * Get a validated base URL for API requests
960
+ * Returns a valid base URL that can be used with new URL(path, baseUrl)
961
+ *
962
+ * Priority:
963
+ * 1. CONFIG.privateApiHost if set (dev/staging or explicit config)
964
+ * 2. window.location.origin if in browser (production with relative URLs)
965
+ * 3. 'https://ecency.com' as fallback for SSR (production default)
966
+ *
967
+ * @returns A valid base URL string
968
+ * @throws Never throws - always returns a valid URL
969
+ */
970
+ function getValidatedBaseUrl(): string;
971
+ /**
972
+ * Set the image host
973
+ * @param host - The image host URL (e.g., "https://images.ecency.com")
974
+ */
975
+ function setImageHost(host: string): void;
976
+ /**
977
+ * Set Hive RPC nodes, replacing the default list.
978
+ * Directly updates the unified hive-tx config object.
979
+ * @param nodes - Array of Hive RPC node URLs
980
+ */
981
+ function setHiveNodes(nodes: string[]): void;
982
+ /**
983
+ * Set DMCA filtering lists
984
+ * @param lists - DMCA lists object containing accounts/tags/posts arrays
985
+ */
986
+ function setDmcaLists(lists?: DmcaListsInput): void;
784
987
  }
785
988
 
786
- interface AccountBookmark {
787
- _id: string;
788
- author: string;
789
- permlink: string;
790
- timestamp: number;
791
- created: string;
989
+ /**
990
+ * Chain error handling utilities
991
+ * Extracted from web's operations.ts and mobile's dhive.ts error handling patterns
992
+ */
993
+ declare enum ErrorType {
994
+ COMMON = "common",
995
+ INFO = "info",
996
+ INSUFFICIENT_RESOURCE_CREDITS = "insufficient_resource_credits",
997
+ MISSING_AUTHORITY = "missing_authority",
998
+ TOKEN_EXPIRED = "token_expired",
999
+ NETWORK = "network",
1000
+ TIMEOUT = "timeout",
1001
+ VALIDATION = "validation"
1002
+ }
1003
+ interface ParsedChainError {
1004
+ message: string;
1005
+ type: ErrorType;
1006
+ originalError?: any;
792
1007
  }
1008
+ /**
1009
+ * Parses Hive blockchain errors into standardized format.
1010
+ * Extracted from web's operations.ts and mobile's dhive.ts error handling.
1011
+ *
1012
+ * @param error - The error object or string from a blockchain operation
1013
+ * @returns Parsed error with user-friendly message and categorized type
1014
+ *
1015
+ * @example
1016
+ * ```typescript
1017
+ * try {
1018
+ * await vote(...);
1019
+ * } catch (error) {
1020
+ * const parsed = parseChainError(error);
1021
+ * console.log(parsed.message); // "Insufficient Resource Credits. Please wait or power up."
1022
+ * console.log(parsed.type); // ErrorType.INSUFFICIENT_RESOURCE_CREDITS
1023
+ * }
1024
+ * ```
1025
+ */
1026
+ declare function parseChainError(error: any): ParsedChainError;
1027
+ /**
1028
+ * Formats error for display to user.
1029
+ * Returns tuple of [message, type] for backward compatibility with existing code.
1030
+ *
1031
+ * This function maintains compatibility with the old formatError signature from
1032
+ * web's operations.ts (line 59-84) and mobile's dhive.ts error handling.
1033
+ *
1034
+ * @param error - The error object or string
1035
+ * @returns Tuple of [user-friendly message, error type]
1036
+ *
1037
+ * @example
1038
+ * ```typescript
1039
+ * try {
1040
+ * await transfer(...);
1041
+ * } catch (error) {
1042
+ * const [message, type] = formatError(error);
1043
+ * showToast(message, type);
1044
+ * }
1045
+ * ```
1046
+ */
1047
+ declare function formatError(error: any): [string, ErrorType];
1048
+ /**
1049
+ * Checks if error indicates missing authority and should trigger auth fallback.
1050
+ * Used by the SDK's useBroadcastMutation to determine if it should retry with
1051
+ * an alternate authentication method.
1052
+ *
1053
+ * @param error - The error object or string
1054
+ * @returns true if auth fallback should be attempted
1055
+ *
1056
+ * @example
1057
+ * ```typescript
1058
+ * try {
1059
+ * await broadcast(operations);
1060
+ * } catch (error) {
1061
+ * if (shouldTriggerAuthFallback(error)) {
1062
+ * // Try with alternate auth method
1063
+ * await broadcastWithHiveAuth(operations);
1064
+ * }
1065
+ * }
1066
+ * ```
1067
+ */
1068
+ declare function shouldTriggerAuthFallback(error: any): boolean;
1069
+ /**
1070
+ * Checks if error is a resource credits (RC) error.
1071
+ * Useful for showing specific UI feedback about RC issues.
1072
+ *
1073
+ * @param error - The error object or string
1074
+ * @returns true if the error is related to insufficient RC
1075
+ *
1076
+ * @example
1077
+ * ```typescript
1078
+ * try {
1079
+ * await vote(...);
1080
+ * } catch (error) {
1081
+ * if (isResourceCreditsError(error)) {
1082
+ * showRCWarning(); // Show specific RC education/power up UI
1083
+ * }
1084
+ * }
1085
+ * ```
1086
+ */
1087
+ declare function isResourceCreditsError(error: any): boolean;
1088
+ /**
1089
+ * Checks if error is informational (not critical).
1090
+ * Informational errors typically don't need retry logic.
1091
+ *
1092
+ * @param error - The error object or string
1093
+ * @returns true if the error is informational
1094
+ */
1095
+ declare function isInfoError(error: any): boolean;
1096
+ /**
1097
+ * Checks if error is network-related and should be retried.
1098
+ *
1099
+ * @param error - The error object or string
1100
+ * @returns true if the error is network-related
1101
+ */
1102
+ declare function isNetworkError(error: any): boolean;
793
1103
 
794
- interface AccountFavorite {
795
- _id: string;
796
- account: string;
797
- timestamp: number;
1104
+ declare function makeQueryClient(): QueryClient;
1105
+ declare const getQueryClient: () => QueryClient;
1106
+ declare namespace EcencyQueriesManager {
1107
+ function getQueryData<T>(queryKey: QueryKey): T | undefined;
1108
+ function getInfiniteQueryData<T>(queryKey: QueryKey): InfiniteData<T, unknown> | undefined;
1109
+ function prefetchQuery<T>(options: UseQueryOptions<T>): Promise<T | undefined>;
1110
+ function prefetchInfiniteQuery<T, P>(options: UseInfiniteQueryOptions<T, Error, InfiniteData<T>, QueryKey, P>): Promise<InfiniteData<T, unknown> | undefined>;
1111
+ function generateClientServerQuery<T>(options: UseQueryOptions<T>): {
1112
+ prefetch: () => Promise<T | undefined>;
1113
+ getData: () => T | undefined;
1114
+ useClientQuery: () => _tanstack_react_query.UseQueryResult<_tanstack_react_query.NoInfer<T>, Error>;
1115
+ fetchAndGet: () => Promise<T>;
1116
+ };
1117
+ function generateClientServerInfiniteQuery<T, P>(options: UseInfiniteQueryOptions<T, Error, InfiniteData<T>, QueryKey, P>): {
1118
+ prefetch: () => Promise<InfiniteData<T, unknown> | undefined>;
1119
+ getData: () => InfiniteData<T, unknown> | undefined;
1120
+ useClientQuery: () => _tanstack_react_query.UseInfiniteQueryResult<InfiniteData<T, unknown>, Error>;
1121
+ fetchAndGet: () => Promise<InfiniteData<T, P>>;
1122
+ };
798
1123
  }
799
1124
 
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";
1125
+ declare function getDynamicPropsQueryOptions(): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<DynamicProps$1, Error, DynamicProps$1, string[]>, "queryFn"> & {
1126
+ queryFn?: _tanstack_react_query.QueryFunction<DynamicProps$1, string[], never> | undefined;
1127
+ } & {
1128
+ queryKey: string[] & {
1129
+ [dataTagSymbol]: DynamicProps$1;
1130
+ [dataTagErrorSymbol]: Error;
1131
+ };
1132
+ };
1011
1133
 
1012
- interface ReferralItem {
1134
+ interface RewardFund {
1013
1135
  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;
1136
+ name: string;
1137
+ reward_balance: string;
1138
+ recent_claims: string;
1139
+ last_update: string;
1140
+ content_constant: string;
1141
+ percent_curation_rewards: number;
1142
+ percent_content_rewards: number;
1143
+ author_reward_curve: string;
1144
+ curation_reward_curve: string;
1026
1145
  }
1027
-
1028
1146
  /**
1029
- * Account profile information from bridge API
1030
- * Returned by get_profiles endpoint
1147
+ * Get reward fund information from the blockchain
1148
+ * @param fundName - Name of the reward fund (default: 'post')
1031
1149
  */
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;
1150
+ declare function getRewardFundQueryOptions(fundName?: string): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<RewardFund, Error, RewardFund, string[]>, "queryFn"> & {
1151
+ queryFn?: _tanstack_react_query.QueryFunction<RewardFund, string[], never> | undefined;
1152
+ } & {
1153
+ queryKey: string[] & {
1154
+ [dataTagSymbol]: RewardFund;
1155
+ [dataTagErrorSymbol]: Error;
1044
1156
  };
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
- };
1157
+ };
1158
+
1159
+ declare const QueryKeys: {
1160
+ readonly posts: {
1161
+ readonly entry: (entryPath: string) => string[];
1162
+ readonly postHeader: (author: string, permlink?: string) => (string | undefined)[];
1163
+ readonly content: (author: string, permlink: string) => string[];
1164
+ readonly contentReplies: (author: string, permlink: string) => string[];
1165
+ readonly accountPosts: (username: string, filter: string, limit: number, observer: string) => (string | number)[];
1166
+ readonly accountPostsPage: (username: string, filter: string, startAuthor: string, startPermlink: string, limit: number, observer: string) => (string | number)[];
1167
+ readonly userPostVote: (username: string, author: string, permlink: string) => string[];
1168
+ readonly reblogs: (username: string, limit: number) => (string | number)[];
1169
+ readonly entryActiveVotes: (author?: string, permlink?: string) => (string | undefined)[];
1170
+ readonly rebloggedBy: (author: string, permlink: string) => string[];
1171
+ readonly tips: (author: string, permlink: string) => string[];
1172
+ readonly normalize: (author: string, permlink: string) => string[];
1173
+ readonly drafts: (activeUsername?: string) => (string | undefined)[];
1174
+ readonly draftsInfinite: (activeUsername?: string, limit?: number) => unknown[];
1175
+ readonly schedules: (activeUsername?: string) => (string | undefined)[];
1176
+ readonly schedulesInfinite: (activeUsername?: string, limit?: number) => unknown[];
1177
+ readonly fragments: (username?: string) => (string | undefined)[];
1178
+ readonly fragmentsInfinite: (username?: string, limit?: number) => unknown[];
1179
+ readonly images: (username?: string) => (string | undefined)[];
1180
+ readonly galleryImages: (activeUsername?: string) => (string | undefined)[];
1181
+ readonly imagesInfinite: (username?: string, limit?: number) => unknown[];
1182
+ readonly promoted: (type: string) => string[];
1183
+ readonly _promotedPrefix: readonly ["posts", "promoted"];
1184
+ readonly accountPostsBlogPrefix: (username: string) => readonly ["posts", "account-posts", string, "blog"];
1185
+ readonly postsRanked: (sort: string, tag: string, limit: number, observer: string) => (string | number)[];
1186
+ readonly postsRankedPage: (sort: string, startAuthor: string, startPermlink: string, limit: number, tag: string, observer: string) => (string | number)[];
1187
+ readonly discussions: (author: string, permlink: string, order: string, observer: string) => string[];
1188
+ readonly discussion: (author: string, permlink: string, observer: string) => string[];
1189
+ readonly deletedEntry: (entryPath: string) => string[];
1190
+ readonly commentHistory: (author: string, permlink: string, onlyMeta: boolean) => (string | boolean)[];
1191
+ readonly trendingTags: () => string[];
1192
+ readonly trendingTagsWithStats: (limit: number) => (string | number)[];
1193
+ readonly wavesByHost: (host: string) => string[];
1194
+ readonly wavesByTag: (host: string, tag: string) => string[];
1195
+ readonly wavesFollowing: (host: string, username: string) => string[];
1196
+ readonly wavesTrendingTags: (host: string, hours: number) => (string | number)[];
1197
+ readonly wavesByAccount: (host: string, username: string) => string[];
1198
+ readonly wavesTrendingAuthors: (host: string) => string[];
1199
+ readonly _prefix: readonly ["posts"];
1200
+ };
1201
+ readonly accounts: {
1202
+ readonly full: (username?: string) => (string | undefined)[];
1203
+ readonly list: (...usernames: string[]) => string[];
1204
+ readonly friends: (following: string, mode: string, followType: string, limit: number) => (string | number)[];
1205
+ readonly searchFriends: (username: string, mode: string, query: string) => string[];
1206
+ readonly subscriptions: (username: string) => string[];
1207
+ readonly followCount: (username: string) => string[];
1208
+ readonly recoveries: (username: string) => string[];
1209
+ readonly pendingRecovery: (username: string) => string[];
1210
+ readonly checkWalletPending: (username: string, code: string | null) => (string | null)[];
1211
+ readonly mutedUsers: (username: string) => string[];
1212
+ readonly following: (follower: string, startFollowing: string, followType: string, limit: number) => (string | number)[];
1213
+ readonly followers: (following: string, startFollower: string, followType: string, limit: number) => (string | number)[];
1214
+ readonly search: (query: string, excludeList?: string[]) => (string | string[] | undefined)[];
1215
+ readonly profiles: (accounts: string[], observer: string) => (string | string[])[];
1216
+ readonly lookup: (query: string, limit: number) => (string | number)[];
1217
+ readonly transactions: (username: string, group: string, limit: number) => (string | number)[];
1218
+ readonly favorites: (activeUsername?: string) => (string | undefined)[];
1219
+ readonly favoritesInfinite: (activeUsername?: string, limit?: number) => unknown[];
1220
+ readonly checkFavorite: (activeUsername: string, targetUsername: string) => string[];
1221
+ readonly relations: (reference: string, target: string) => string[];
1222
+ readonly bots: () => string[];
1223
+ readonly voteHistory: (username: string, limit: number) => (string | number)[];
1224
+ readonly reputations: (query: string, limit: number) => (string | number)[];
1225
+ readonly bookmarks: (activeUsername?: string) => (string | undefined)[];
1226
+ readonly bookmarksInfinite: (activeUsername?: string, limit?: number) => unknown[];
1227
+ readonly referrals: (username: string) => string[];
1228
+ readonly referralsStats: (username: string) => string[];
1229
+ readonly _prefix: readonly ["accounts"];
1230
+ };
1231
+ readonly notifications: {
1232
+ readonly announcements: () => string[];
1233
+ readonly list: (activeUsername?: string, filter?: string) => (string | undefined)[];
1234
+ readonly unreadCount: (activeUsername?: string) => (string | undefined)[];
1235
+ readonly settings: (activeUsername?: string) => (string | undefined)[];
1236
+ readonly _prefix: readonly ["notifications"];
1237
+ };
1238
+ readonly core: {
1239
+ readonly rewardFund: (fundName: string) => string[];
1240
+ readonly dynamicProps: () => string[];
1241
+ readonly chainProperties: () => string[];
1242
+ readonly _prefix: readonly ["core"];
1243
+ };
1244
+ readonly communities: {
1245
+ readonly single: (name?: string, observer?: string) => (string | undefined)[];
1246
+ /** Prefix key for matching all observer variants of a community */
1247
+ readonly singlePrefix: (name: string) => readonly ["community", "single", string];
1248
+ readonly context: (username: string, communityName: string) => string[];
1249
+ readonly rewarded: () => string[];
1250
+ readonly list: (sort: string, query: string, limit: number) => (string | number)[];
1251
+ readonly subscribers: (communityName: string) => string[];
1252
+ readonly accountNotifications: (account: string, limit: number) => (string | number)[];
1253
+ };
1254
+ readonly proposals: {
1255
+ readonly list: () => string[];
1256
+ readonly proposal: (id: number) => (string | number)[];
1257
+ readonly votes: (proposalId: number, voter: string, limit: number) => (string | number)[];
1258
+ readonly votesPrefix: (proposalId: number) => readonly ["proposals", "votes", number];
1259
+ readonly votesByUser: (voter: string) => string[];
1260
+ };
1261
+ readonly search: {
1262
+ readonly topics: (q: string, limit: number) => (string | number)[];
1263
+ readonly path: (q: string) => string[];
1264
+ readonly account: (q: string, limit: number) => (string | number)[];
1265
+ 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];
1266
+ readonly controversialRising: (what: string, tag: string) => string[];
1267
+ readonly similarEntries: (author: string, permlink: string, query: string) => string[];
1268
+ readonly api: (q: string, sort: string, hideLow: boolean, since?: string, votes?: number) => (string | number | boolean | undefined)[];
1269
+ };
1270
+ readonly witnesses: {
1271
+ readonly list: (limit: number) => (string | number)[];
1272
+ readonly votes: (username: string | undefined) => (string | undefined)[];
1273
+ readonly proxy: () => string[];
1274
+ };
1275
+ readonly wallet: {
1276
+ readonly outgoingRcDelegations: (username: string, limit: number) => (string | number)[];
1277
+ readonly vestingDelegations: (username: string, limit: number) => (string | number)[];
1278
+ readonly withdrawRoutes: (account: string) => string[];
1279
+ readonly incomingRc: (username: string) => string[];
1280
+ readonly conversionRequests: (account: string) => string[];
1281
+ readonly receivedVestingShares: (username: string) => string[];
1282
+ readonly savingsWithdraw: (account: string) => string[];
1283
+ readonly openOrders: (user: string) => string[];
1284
+ readonly collateralizedConversionRequests: (account: string) => string[];
1285
+ readonly recurrentTransfers: (username: string) => string[];
1286
+ readonly portfolio: (username: string, onlyEnabled: string, currency: string) => string[];
1287
+ };
1288
+ readonly assets: {
1289
+ readonly hiveGeneralInfo: (username: string) => string[];
1290
+ readonly hiveTransactions: (username: string, limit: number, filterKey: string) => (string | number)[];
1291
+ readonly hiveWithdrawalRoutes: (username: string) => string[];
1292
+ readonly hiveMetrics: (bucketSeconds: number) => (string | number)[];
1293
+ readonly hbdGeneralInfo: (username: string) => string[];
1294
+ readonly hbdTransactions: (username: string, limit: number, filterKey: string) => (string | number)[];
1295
+ readonly hivePowerGeneralInfo: (username: string) => string[];
1296
+ readonly hivePowerDelegates: (username: string) => string[];
1297
+ readonly hivePowerDelegatings: (username: string) => string[];
1298
+ readonly hivePowerTransactions: (username: string, limit: number, filterKey: string) => (string | number)[];
1299
+ readonly pointsGeneralInfo: (username: string) => string[];
1300
+ readonly pointsTransactions: (username: string, type: string) => string[];
1301
+ readonly ecencyAssetInfo: (username: string, asset: string, currency: string) => string[];
1302
+ };
1303
+ readonly market: {
1304
+ readonly statistics: () => string[];
1305
+ readonly orderBook: (limit: number) => (string | number)[];
1306
+ readonly history: (seconds: number, startDate: number, endDate: number) => (string | number)[];
1307
+ readonly feedHistory: () => string[];
1308
+ readonly hiveHbdStats: () => string[];
1309
+ readonly data: (coin: string, vsCurrency: string, fromTs: number, toTs: number) => (string | number)[];
1310
+ readonly tradeHistory: (limit: number, start: number, end: number) => (string | number)[];
1311
+ readonly currentMedianHistoryPrice: () => string[];
1312
+ };
1313
+ readonly analytics: {
1314
+ readonly discoverCuration: (duration: string) => string[];
1315
+ readonly pageStats: (url: string, dimensions: string, metrics: string, dateRange: string) => string[];
1316
+ readonly discoverLeaderboard: (duration: string) => string[];
1317
+ };
1318
+ readonly promotions: {
1319
+ readonly promotePrice: () => string[];
1320
+ readonly boostPlusPrices: () => string[];
1321
+ readonly boostPlusAccounts: (account: string) => string[];
1322
+ };
1323
+ readonly resourceCredits: {
1324
+ readonly account: (username: string) => string[];
1325
+ readonly stats: () => string[];
1326
+ };
1327
+ readonly points: {
1328
+ readonly points: (username: string, filter: number) => (string | number)[];
1329
+ readonly _prefix: (username: string) => string[];
1056
1330
  };
1331
+ readonly operations: {
1332
+ readonly chainProperties: () => string[];
1333
+ };
1334
+ readonly games: {
1335
+ readonly statusCheck: (gameType: string, username: string) => string[];
1336
+ };
1337
+ readonly badActors: {
1338
+ readonly list: () => string[];
1339
+ readonly _prefix: readonly ["bad-actors"];
1340
+ };
1341
+ readonly ai: {
1342
+ readonly prices: () => readonly ["ai", "prices"];
1343
+ readonly assistPrices: (username?: string) => readonly ["ai", "assist-prices", string | undefined];
1344
+ readonly _prefix: readonly ["ai"];
1345
+ };
1346
+ };
1347
+
1348
+ declare function encodeObj(o: any): string;
1349
+ declare function decodeObj(o: any): any;
1350
+
1351
+ declare enum Symbol {
1352
+ HIVE = "HIVE",
1353
+ HBD = "HBD",
1354
+ VESTS = "VESTS",
1355
+ SPK = "SPK"
1356
+ }
1357
+ declare enum NaiMap {
1358
+ "@@000000021" = "HIVE",
1359
+ "@@000000013" = "HBD",
1360
+ "@@000000037" = "VESTS"
1361
+ }
1362
+ interface Asset {
1363
+ amount: number;
1364
+ symbol: Symbol;
1057
1365
  }
1366
+ declare function parseAsset(sval: string | SMTAsset): Asset;
1367
+
1368
+ declare function getBoundFetch(): typeof fetch;
1369
+
1370
+ declare function isCommunity(value: unknown): boolean;
1058
1371
 
1059
1372
  /**
1060
- * Friends list row data
1061
- * The `active` field contains raw timestamp - app should format it
1373
+ * Type guard to check if response is wrapped with pagination metadata
1062
1374
  */
1063
- interface FriendsRow {
1064
- name: string;
1065
- reputation: number;
1066
- active: string;
1067
- }
1375
+ declare function isWrappedResponse<T>(response: any): response is WrappedResponse<T>;
1068
1376
  /**
1069
- * Friend search result with additional profile information
1070
- * The `active` field contains raw timestamp - app should format it
1377
+ * Normalize response to wrapped format for backwards compatibility
1378
+ * If the backend returns old format (array), convert it to wrapped format
1071
1379
  */
1072
- interface FriendSearchResult {
1073
- name: string;
1074
- full_name: string;
1075
- reputation: number;
1076
- active: string;
1077
- }
1380
+ declare function normalizeToWrappedResponse<T>(response: T[] | WrappedResponse<T>, limit: number): WrappedResponse<T>;
1078
1381
 
1079
- interface Payload$4 {
1080
- profile: Partial<AccountProfile>;
1081
- tokens: AccountProfile["tokens"];
1082
- }
1083
- /**
1084
- * React Query mutation hook for updating account profile metadata.
1085
- *
1086
- * This mutation broadcasts an account_update2 operation to update the user's
1087
- * profile information (name, about, location, avatar, cover image, etc.).
1088
- *
1089
- * @param username - The username to update (required for broadcast)
1090
- * @param auth - Authentication context with platform adapter and fallback configuration
1091
- *
1092
- * @returns React Query mutation result
1093
- *
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)
1104
- *
1105
- * **Authentication:**
1106
- * - Uses posting authority (account_update2 operation)
1107
- * - Supports all auth methods via platform adapter
1108
- *
1109
- * **Post-Broadcast Actions:**
1110
- * - Optimistically updates account cache with new profile data
1111
- * - Invalidates account cache to refetch from blockchain
1112
- *
1113
- * @example
1114
- * ```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://...",
1125
- * }
1126
- * });
1127
- * ```
1128
- */
1129
- declare function useAccountUpdate(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, Partial<Payload$4>, unknown>;
1382
+ declare function vestsToHp(vests: number, hivePerMVests: number): number;
1130
1383
 
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>;
1384
+ declare function isEmptyDate(s: string | undefined): boolean;
1138
1385
 
1139
- /**
1140
- * Payload for following an account.
1141
- */
1142
- interface FollowPayload {
1143
- /** Account to follow */
1144
- following: string;
1386
+ interface AccountFollowStats {
1387
+ follower_count: number;
1388
+ following_count: number;
1389
+ account: string;
1145
1390
  }
1146
- /**
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
1156
- *
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
1161
- *
1162
- * @example
1163
- * ```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
- * });
1174
- * ```
1175
- */
1176
- declare function useFollow(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, FollowPayload, unknown>;
1177
1391
 
1178
- /**
1179
- * Payload for unfollowing an account.
1180
- */
1181
- interface UnfollowPayload {
1182
- /** Account to unfollow */
1183
- following: string;
1392
+ interface AccountReputation {
1393
+ account: string;
1394
+ reputation: number;
1184
1395
  }
1185
- /**
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
- * });
1208
- *
1209
- * // Unfollow an account
1210
- * unfollowMutation.mutate({
1211
- * following: 'alice'
1212
- * });
1213
- * ```
1214
- */
1215
- declare function useUnfollow(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, UnfollowPayload, unknown>;
1216
1396
 
1217
- interface Payload$3 {
1218
- author: string;
1219
- permlink: string;
1397
+ interface AccountProfile {
1398
+ about?: string;
1399
+ cover_image?: string;
1400
+ location?: string;
1401
+ name?: string;
1402
+ profile_image?: string;
1403
+ website?: string;
1404
+ pinned?: string;
1405
+ reputation?: number;
1406
+ version?: number;
1407
+ beneficiary?: {
1408
+ account: string;
1409
+ weight: number;
1410
+ };
1411
+ tokens?: {
1412
+ symbol: string;
1413
+ type: string;
1414
+ meta: Record<string, any>;
1415
+ }[];
1220
1416
  }
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
1417
 
1223
- declare function useBookmarkDelete(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
1418
+ interface FullAccount {
1419
+ name: string;
1420
+ owner: Authority;
1421
+ active: Authority;
1422
+ posting: Authority;
1423
+ memo_key: string;
1424
+ post_count: number;
1425
+ created: string;
1426
+ reputation: string | number;
1427
+ json_metadata: string;
1428
+ posting_json_metadata: string;
1429
+ last_vote_time: string;
1430
+ last_post: string;
1431
+ reward_hbd_balance: string;
1432
+ reward_vesting_hive: string;
1433
+ reward_hive_balance: string;
1434
+ reward_vesting_balance: string;
1435
+ balance: string;
1436
+ vesting_shares: string;
1437
+ hbd_balance: string;
1438
+ savings_balance: string;
1439
+ savings_hbd_balance: string;
1440
+ savings_hbd_seconds: string;
1441
+ savings_hbd_last_interest_payment: string;
1442
+ savings_hbd_seconds_last_update: string;
1443
+ next_vesting_withdrawal: string;
1444
+ pending_claimed_accounts: number;
1445
+ delegated_vesting_shares: string;
1446
+ received_vesting_shares: string;
1447
+ vesting_withdraw_rate: string;
1448
+ to_withdraw: string;
1449
+ withdrawn: string;
1450
+ witness_votes: string[];
1451
+ proxy: string;
1452
+ recovery_account: string;
1453
+ proxied_vsf_votes: number[] | string[];
1454
+ voting_manabar: {
1455
+ current_mana: string | number;
1456
+ last_update_time: number;
1457
+ };
1458
+ voting_power: number;
1459
+ downvote_manabar: {
1460
+ current_mana: string | number;
1461
+ last_update_time: number;
1462
+ };
1463
+ profile?: AccountProfile;
1464
+ follow_stats?: AccountFollowStats;
1465
+ proxyVotes?: [];
1466
+ }
1224
1467
 
1225
- declare function useAccountFavoriteAdd(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
1468
+ interface AccountRelationship {
1469
+ follows: boolean;
1470
+ ignores: boolean;
1471
+ is_blacklisted: boolean;
1472
+ follows_blacklists: boolean;
1473
+ }
1226
1474
 
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>;
1475
+ interface AccountBookmark {
1476
+ _id: string;
1477
+ author: string;
1478
+ permlink: string;
1479
+ timestamp: number;
1480
+ created: string;
1481
+ }
1232
1482
 
1233
- interface Keys {
1234
- owner: PrivateKey;
1235
- active: PrivateKey;
1236
- posting: PrivateKey;
1237
- memo_key: PrivateKey;
1483
+ interface AccountFavorite {
1484
+ _id: string;
1485
+ account: string;
1486
+ timestamp: number;
1238
1487
  }
1239
- interface Payload$2 {
1240
- keepCurrent?: boolean;
1241
- currentKey: PrivateKey;
1242
- keys: Keys[];
1243
- keysToRevoke?: string[];
1244
- keysToRevokeByAuthority?: Partial<Record<keyof Keys, string[]>>;
1488
+
1489
+ interface Recoveries {
1490
+ username: string;
1491
+ email: string;
1492
+ publicKeys: Record<string, number>;
1493
+ }
1494
+ interface GetRecoveriesEmailResponse extends Recoveries {
1495
+ _id: string;
1245
1496
  }
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>;
1249
1497
 
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;
1387
-
1388
- /**
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.
1400
- */
1401
- type BroadcastMode = 'sync' | 'async';
1402
- /**
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
- * ```
1460
- */
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>;
1476
-
1477
- declare function broadcastJson<T>(username: string | undefined, id: string, payload: T, auth?: AuthContext): Promise<any>;
1478
-
1479
- declare function withTimeoutSignal(timeoutMs: number, signal?: AbortSignal): AbortSignal;
1498
+ interface Follow {
1499
+ follower: string;
1500
+ following: string;
1501
+ what: string[];
1502
+ }
1480
1503
 
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;
1504
+ interface BaseTransaction {
1505
+ num: number;
1506
+ type: string;
1507
+ timestamp: string;
1508
+ trx_id: string;
1509
+ }
1510
+ interface CurationReward extends BaseTransaction {
1511
+ type: "curation_reward";
1512
+ comment_author?: string;
1513
+ comment_permlink?: string;
1514
+ author?: string;
1515
+ permlink?: string;
1516
+ curator: string;
1517
+ reward: string;
1518
+ }
1519
+ interface AuthorReward extends BaseTransaction {
1520
+ type: "author_reward";
1521
+ author: string;
1522
+ permlink: string;
1523
+ hbd_payout: string;
1524
+ hive_payout: string;
1525
+ vesting_payout: string;
1540
1526
  }
1541
-
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"
1527
+ interface CommentBenefactor extends BaseTransaction {
1528
+ type: "comment_benefactor_reward";
1529
+ benefactor: string;
1530
+ author: string;
1531
+ permlink: string;
1532
+ hbd_payout: string;
1533
+ hive_payout: string;
1534
+ vesting_payout: string;
1555
1535
  }
1556
- interface ParsedChainError {
1557
- message: string;
1558
- type: ErrorType;
1559
- originalError?: any;
1536
+ interface ClaimRewardBalance extends BaseTransaction {
1537
+ type: "claim_reward_balance";
1538
+ account: string;
1539
+ reward_hbd: string;
1540
+ reward_hive: string;
1541
+ reward_vests: string;
1560
1542
  }
1561
- /**
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
1654
- */
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>;
1669
- };
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>>;
1675
- };
1543
+ interface Transfer extends BaseTransaction {
1544
+ type: "transfer";
1545
+ amount: string;
1546
+ memo: string;
1547
+ from: string;
1548
+ to: string;
1549
+ }
1550
+ interface TransferToVesting extends BaseTransaction {
1551
+ type: "transfer_to_vesting";
1552
+ amount: string;
1553
+ memo?: string;
1554
+ from: string;
1555
+ to: string;
1556
+ }
1557
+ interface SetWithdrawRoute extends BaseTransaction {
1558
+ type: "set_withdraw_vesting_route";
1559
+ from_account: string;
1560
+ to_account: string;
1561
+ percent: number;
1562
+ auto_vest: boolean;
1563
+ }
1564
+ interface TransferToSavings extends BaseTransaction {
1565
+ type: "transfer_to_savings";
1566
+ amount: string;
1567
+ memo?: string;
1568
+ from: string;
1569
+ to: string;
1570
+ }
1571
+ interface CancelTransferFromSavings extends BaseTransaction {
1572
+ from: string;
1573
+ request_id: number;
1574
+ type: "cancel_transfer_from_savings";
1575
+ }
1576
+ interface WithdrawVesting extends BaseTransaction {
1577
+ type: "withdraw_vesting";
1578
+ acc: string;
1579
+ vesting_shares: string;
1580
+ }
1581
+ interface FillOrder extends BaseTransaction {
1582
+ type: "fill_order";
1583
+ current_pays: string;
1584
+ open_pays: string;
1585
+ }
1586
+ interface LimitOrderCancel extends BaseTransaction {
1587
+ type: "limit_order_cancel";
1588
+ owner: string;
1589
+ orderid: number;
1590
+ }
1591
+ interface ProducerReward extends BaseTransaction {
1592
+ type: "producer_reward";
1593
+ vesting_shares: string;
1594
+ producer: string;
1595
+ }
1596
+ interface Interest extends BaseTransaction {
1597
+ type: "interest";
1598
+ owner: string;
1599
+ interest: string;
1600
+ }
1601
+ interface FillConvertRequest extends BaseTransaction {
1602
+ type: "fill_convert_request";
1603
+ amount_in: string;
1604
+ amount_out: string;
1605
+ }
1606
+ interface FillCollateralizedConvertRequest extends BaseTransaction {
1607
+ type: "fill_collateralized_convert_request";
1608
+ owner: string;
1609
+ requestid: number;
1610
+ amount_in: string;
1611
+ amount_out: string;
1612
+ excess_collateral: string;
1613
+ }
1614
+ interface ReturnVestingDelegation extends BaseTransaction {
1615
+ type: "return_vesting_delegation";
1616
+ vesting_shares: string;
1617
+ }
1618
+ interface ProposalPay extends BaseTransaction {
1619
+ type: "proposal_pay";
1620
+ payment: string;
1621
+ }
1622
+ interface UpdateProposalVotes extends BaseTransaction {
1623
+ type: "update_proposal_votes";
1624
+ voter: string;
1625
+ proposal_ids: [number];
1626
+ approve: boolean;
1627
+ }
1628
+ interface CommentPayoutUpdate extends BaseTransaction {
1629
+ type: "comment_payout_update";
1630
+ author: string;
1631
+ permlink: string;
1632
+ }
1633
+ interface CommentReward extends BaseTransaction {
1634
+ type: "comment_reward";
1635
+ author: string;
1636
+ permlink: string;
1637
+ payout: string;
1638
+ }
1639
+ interface CollateralizedConvert extends BaseTransaction {
1640
+ type: "collateralized_convert";
1641
+ owner: string;
1642
+ requestid: number;
1643
+ amount: string;
1644
+ }
1645
+ interface RecurrentTransfers extends BaseTransaction {
1646
+ type: "recurrent_transfer";
1647
+ amount: string;
1648
+ memo: string;
1649
+ from: string;
1650
+ to: string;
1651
+ recurrence: number;
1652
+ executions: number;
1676
1653
  }
1677
-
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;
1689
- 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;
1654
+ interface FillRecurrentTransfers extends BaseTransaction {
1655
+ type: "fill_recurrent_transfer";
1656
+ amount: SMTAsset;
1657
+ memo: string;
1658
+ from: string;
1659
+ to: string;
1660
+ remaining_executions: number;
1698
1661
  }
1699
- /**
1700
- * Get reward fund information from the blockchain
1701
- * @param fundName - Name of the reward fund (default: 'post')
1702
- */
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"];
1662
+ interface DelegateVestingShares extends BaseTransaction {
1663
+ type: "delegate_vesting_shares";
1664
+ delegator: string;
1665
+ delegatee: string;
1666
+ vesting_shares: string;
1667
+ }
1668
+ interface LimitOrderCreate extends BaseTransaction {
1669
+ type: "limit_order_create";
1670
+ owner: string;
1671
+ orderid: number;
1672
+ amount_to_sell: string;
1673
+ min_to_receive: string;
1674
+ expiration: string;
1675
+ }
1676
+ interface FillVestingWithdraw extends BaseTransaction {
1677
+ type: "fill_vesting_withdraw";
1678
+ from_account: string;
1679
+ to_account: string;
1680
+ withdrawn: string;
1681
+ deposited: string;
1682
+ }
1683
+ interface EffectiveCommentVote extends BaseTransaction {
1684
+ type: "effective_comment_vote";
1685
+ voter: string;
1686
+ author: string;
1687
+ permlink: string;
1688
+ pending_payout: string;
1689
+ total_vote_weight: number;
1690
+ rshares: number;
1691
+ weight: number;
1692
+ }
1693
+ interface VoteProxy extends BaseTransaction {
1694
+ type: "account_witness_proxy";
1695
+ account: string;
1696
+ proxy: string;
1697
+ }
1698
+ 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;
1699
+ type OperationGroup = "transfers" | "market-orders" | "interests" | "stake-operations" | "rewards";
1700
+
1701
+ interface ReferralItem {
1702
+ id: number;
1703
+ username: string;
1704
+ referrer: string;
1705
+ created: string;
1706
+ rewarded: number;
1707
+ v: number;
1708
+ }
1709
+ interface ReferralItems {
1710
+ data: ReferralItem[];
1711
+ }
1712
+ interface ReferralStat {
1713
+ total: number;
1714
+ rewarded: number;
1715
+ }
1716
+
1717
+ /**
1718
+ * Account profile information from bridge API
1719
+ * Returned by get_profiles endpoint
1720
+ */
1721
+ interface Profile {
1722
+ id: number;
1723
+ name: string;
1724
+ created: string;
1725
+ active: string;
1726
+ post_count: number;
1727
+ reputation: number;
1728
+ blacklists: string[];
1729
+ stats: {
1730
+ rank: number;
1731
+ following: number;
1732
+ followers: number;
1893
1733
  };
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"];
1734
+ metadata: {
1735
+ profile: {
1736
+ about?: string;
1737
+ blacklist_description?: string;
1738
+ cover_image?: string;
1739
+ location?: string;
1740
+ muted_list_description?: string;
1741
+ name?: string;
1742
+ profile_image?: string;
1743
+ website?: string;
1744
+ };
1898
1745
  };
1899
- };
1900
-
1901
- declare function encodeObj(o: any): string;
1902
- declare function decodeObj(o: any): any;
1746
+ }
1903
1747
 
1904
- declare enum Symbol {
1905
- HIVE = "HIVE",
1906
- HBD = "HBD",
1907
- VESTS = "VESTS",
1908
- SPK = "SPK"
1748
+ /**
1749
+ * Friends list row data
1750
+ * The `active` field contains raw timestamp - app should format it
1751
+ */
1752
+ interface FriendsRow {
1753
+ name: string;
1754
+ reputation: number;
1755
+ active: string;
1909
1756
  }
1910
- declare enum NaiMap {
1911
- "@@000000021" = "HIVE",
1912
- "@@000000013" = "HBD",
1913
- "@@000000037" = "VESTS"
1757
+ /**
1758
+ * Friend search result with additional profile information
1759
+ * The `active` field contains raw timestamp - app should format it
1760
+ */
1761
+ interface FriendSearchResult {
1762
+ name: string;
1763
+ full_name: string;
1764
+ reputation: number;
1765
+ active: string;
1914
1766
  }
1915
- interface Asset {
1916
- amount: number;
1917
- symbol: Symbol;
1767
+
1768
+ interface Payload$4 {
1769
+ profile: Partial<AccountProfile>;
1770
+ tokens: AccountProfile["tokens"];
1918
1771
  }
1919
- declare function parseAsset(sval: string | SMTAsset): Asset;
1772
+ /**
1773
+ * React Query mutation hook for updating account profile metadata.
1774
+ *
1775
+ * This mutation broadcasts an account_update2 operation to update the user's
1776
+ * profile information (name, about, location, avatar, cover image, etc.).
1777
+ *
1778
+ * @param username - The username to update (required for broadcast)
1779
+ * @param auth - Authentication context with platform adapter and fallback configuration
1780
+ *
1781
+ * @returns React Query mutation result
1782
+ *
1783
+ * @remarks
1784
+ * **Profile Fields:**
1785
+ * - name: Display name
1786
+ * - about: Bio/description
1787
+ * - location: Location
1788
+ * - website: Website URL
1789
+ * - profile_image: Avatar URL
1790
+ * - cover_image: Cover/banner URL
1791
+ * - tokens: Social tokens (Twitter, Facebook, etc.)
1792
+ * - version: Profile metadata version (auto-set to 2)
1793
+ *
1794
+ * **Authentication:**
1795
+ * - Uses posting authority (account_update2 operation)
1796
+ * - Supports all auth methods via platform adapter
1797
+ *
1798
+ * **Post-Broadcast Actions:**
1799
+ * - Optimistically updates account cache with new profile data
1800
+ * - Invalidates account cache to refetch from blockchain
1801
+ *
1802
+ * @example
1803
+ * ```typescript
1804
+ * const updateProfile = useAccountUpdate(username, {
1805
+ * adapter: myAdapter,
1806
+ * });
1807
+ *
1808
+ * // Update profile
1809
+ * updateProfile.mutate({
1810
+ * profile: {
1811
+ * name: "John Doe",
1812
+ * about: "Hive enthusiast",
1813
+ * profile_image: "https://...",
1814
+ * }
1815
+ * });
1816
+ * ```
1817
+ */
1818
+ declare function useAccountUpdate(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, Partial<Payload$4>, unknown>;
1920
1819
 
1921
- declare function getBoundFetch(): typeof fetch;
1820
+ type Kind = "toggle-ignore" | "toggle-follow";
1821
+ 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<{
1822
+ ignores: boolean | undefined;
1823
+ follows: boolean | undefined;
1824
+ is_blacklisted?: boolean | undefined;
1825
+ follows_blacklists?: boolean | undefined;
1826
+ }, Error, Kind, unknown>;
1922
1827
 
1923
- declare function isCommunity(value: unknown): boolean;
1828
+ /**
1829
+ * Payload for following an account.
1830
+ */
1831
+ interface FollowPayload {
1832
+ /** Account to follow */
1833
+ following: string;
1834
+ }
1835
+ /**
1836
+ * React Query mutation hook for following an account.
1837
+ *
1838
+ * This mutation broadcasts a follow operation to the Hive blockchain,
1839
+ * adding the target account to the follower's "blog" follow list.
1840
+ *
1841
+ * @param username - The username of the follower (required for broadcast)
1842
+ * @param auth - Authentication context with platform adapter and fallback configuration
1843
+ *
1844
+ * @returns React Query mutation result
1845
+ *
1846
+ * @remarks
1847
+ * **Post-Broadcast Actions:**
1848
+ * - Invalidates relationship cache to show updated follow status
1849
+ * - Invalidates account cache to refetch updated follower/following counts
1850
+ *
1851
+ * @example
1852
+ * ```typescript
1853
+ * const followMutation = useFollow(username, {
1854
+ * adapter: myAdapter,
1855
+ * enableFallback: true,
1856
+ * fallbackChain: ['keychain', 'key', 'hivesigner']
1857
+ * });
1858
+ *
1859
+ * // Follow an account
1860
+ * followMutation.mutate({
1861
+ * following: 'alice'
1862
+ * });
1863
+ * ```
1864
+ */
1865
+ declare function useFollow(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, FollowPayload, unknown>;
1924
1866
 
1925
1867
  /**
1926
- * Type guard to check if response is wrapped with pagination metadata
1868
+ * Payload for unfollowing an account.
1927
1869
  */
1928
- declare function isWrappedResponse<T>(response: any): response is WrappedResponse<T>;
1870
+ interface UnfollowPayload {
1871
+ /** Account to unfollow */
1872
+ following: string;
1873
+ }
1929
1874
  /**
1930
- * Normalize response to wrapped format for backwards compatibility
1931
- * If the backend returns old format (array), convert it to wrapped format
1875
+ * React Query mutation hook for unfollowing an account.
1876
+ *
1877
+ * This mutation broadcasts an unfollow operation to the Hive blockchain,
1878
+ * removing the target account from the follower's follow list.
1879
+ *
1880
+ * @param username - The username of the follower (required for broadcast)
1881
+ * @param auth - Authentication context with platform adapter and fallback configuration
1882
+ *
1883
+ * @returns React Query mutation result
1884
+ *
1885
+ * @remarks
1886
+ * **Post-Broadcast Actions:**
1887
+ * - Invalidates relationship cache to show updated follow status
1888
+ * - Invalidates account cache to refetch updated follower/following counts
1889
+ *
1890
+ * @example
1891
+ * ```typescript
1892
+ * const unfollowMutation = useUnfollow(username, {
1893
+ * adapter: myAdapter,
1894
+ * enableFallback: true,
1895
+ * fallbackChain: ['keychain', 'key', 'hivesigner']
1896
+ * });
1897
+ *
1898
+ * // Unfollow an account
1899
+ * unfollowMutation.mutate({
1900
+ * following: 'alice'
1901
+ * });
1902
+ * ```
1932
1903
  */
1933
- declare function normalizeToWrappedResponse<T>(response: T[] | WrappedResponse<T>, limit: number): WrappedResponse<T>;
1904
+ declare function useUnfollow(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, UnfollowPayload, unknown>;
1934
1905
 
1935
- declare function vestsToHp(vests: number, hivePerMVests: number): number;
1906
+ interface Payload$3 {
1907
+ author: string;
1908
+ permlink: string;
1909
+ }
1910
+ declare function useBookmarkAdd(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, Payload$3, unknown>;
1936
1911
 
1937
- declare function isEmptyDate(s: string | undefined): boolean;
1912
+ declare function useBookmarkDelete(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
1913
+
1914
+ declare function useAccountFavoriteAdd(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
1915
+
1916
+ declare function useAccountFavoriteDelete(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, {
1917
+ previousList: AccountFavorite[] | undefined;
1918
+ previousInfinite: Map<readonly unknown[], InfiniteData<WrappedResponse<AccountFavorite>, unknown> | undefined>;
1919
+ previousCheck: boolean | undefined;
1920
+ } | undefined>;
1921
+
1922
+ interface Keys {
1923
+ owner: PrivateKey;
1924
+ active: PrivateKey;
1925
+ posting: PrivateKey;
1926
+ memo_key: PrivateKey;
1927
+ }
1928
+ interface Payload$2 {
1929
+ keepCurrent?: boolean;
1930
+ currentKey: PrivateKey;
1931
+ keys: Keys[];
1932
+ keysToRevoke?: string[];
1933
+ keysToRevokeByAuthority?: Partial<Record<keyof Keys, string[]>>;
1934
+ }
1935
+ declare function dedupeAndSortKeyAuths(existing: Authority["key_auths"], additions: [string, number][]): Authority["key_auths"];
1936
+ type UpdateKeyAuthsOptions = Pick<UseMutationOptions<unknown, Error, Payload$2>, "onSuccess" | "onError">;
1937
+ declare function useAccountUpdateKeyAuths(username: string, options?: UpdateKeyAuthsOptions): _tanstack_react_query.UseMutationResult<TransactionConfirmation, Error, Payload$2, unknown>;
1938
1938
 
1939
1939
  interface Payload$1 {
1940
1940
  newPassword: string;
@@ -2068,7 +2068,7 @@ interface ClaimAccountPayload {
2068
2068
  * });
2069
2069
  * ```
2070
2070
  */
2071
- declare function useClaimAccount(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ClaimAccountPayload, unknown>;
2071
+ declare function useClaimAccount(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, ClaimAccountPayload, unknown>;
2072
2072
 
2073
2073
  /**
2074
2074
  * Content Operations
@@ -2728,7 +2728,7 @@ interface GrantPostingPermissionPayload {
2728
2728
  memoKey: string;
2729
2729
  jsonMetadata: string;
2730
2730
  }
2731
- declare function useGrantPostingPermission(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, GrantPostingPermissionPayload, unknown>;
2731
+ declare function useGrantPostingPermission(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, GrantPostingPermissionPayload, unknown>;
2732
2732
 
2733
2733
  interface CreateAccountPayload {
2734
2734
  newAccountName: string;
@@ -2737,7 +2737,7 @@ interface CreateAccountPayload {
2737
2737
  /** If true, uses a claimed account token instead of paying the fee */
2738
2738
  useClaimed?: boolean;
2739
2739
  }
2740
- declare function useCreateAccount(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, CreateAccountPayload, unknown>;
2740
+ declare function useCreateAccount(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, CreateAccountPayload, unknown>;
2741
2741
 
2742
2742
  declare function getAccountFullQueryOptions(username: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<{
2743
2743
  name: any;
@@ -4078,7 +4078,7 @@ interface VotePayload {
4078
4078
  * broadcastMode: async — Votes don't require block confirmation.
4079
4079
  * The vote is accepted into the mempool immediately; UI can optimistically update.
4080
4080
  */
4081
- declare function useVote(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, VotePayload, unknown>;
4081
+ declare function useVote(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, VotePayload, unknown>;
4082
4082
 
4083
4083
  /**
4084
4084
  * Payload for reblogging a post.
@@ -4134,7 +4134,7 @@ interface ReblogPayload {
4134
4134
  * });
4135
4135
  * ```
4136
4136
  */
4137
- declare function useReblog(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ReblogPayload, unknown>;
4137
+ declare function useReblog(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, ReblogPayload, unknown>;
4138
4138
 
4139
4139
  /**
4140
4140
  * Beneficiary account and weight.
@@ -4245,7 +4245,7 @@ interface CommentPayload {
4245
4245
  * });
4246
4246
  * ```
4247
4247
  */
4248
- declare function useComment(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, CommentPayload, unknown>;
4248
+ declare function useComment(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, CommentPayload, unknown>;
4249
4249
 
4250
4250
  /**
4251
4251
  * Payload for deleting a comment or post.
@@ -4275,7 +4275,7 @@ interface DeleteCommentPayload {
4275
4275
  *
4276
4276
  * @returns React Query mutation result
4277
4277
  */
4278
- declare function useDeleteComment(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, DeleteCommentPayload, unknown>;
4278
+ declare function useDeleteComment(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, DeleteCommentPayload, unknown>;
4279
4279
 
4280
4280
  /**
4281
4281
  * Payload for creating a cross-post.
@@ -4359,7 +4359,7 @@ interface CrossPostPayload {
4359
4359
  * });
4360
4360
  * ```
4361
4361
  */
4362
- declare function useCrossPost(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, CrossPostPayload, unknown>;
4362
+ declare function useCrossPost(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, CrossPostPayload, unknown>;
4363
4363
 
4364
4364
  /**
4365
4365
  * Payload for updating a reply/comment.
@@ -4449,7 +4449,7 @@ interface UpdateReplyPayload {
4449
4449
  * });
4450
4450
  * ```
4451
4451
  */
4452
- declare function useUpdateReply(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, UpdateReplyPayload, unknown>;
4452
+ declare function useUpdateReply(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, UpdateReplyPayload, unknown>;
4453
4453
 
4454
4454
  /**
4455
4455
  * Payload for promoting a post using Ecency Points.
@@ -4505,7 +4505,7 @@ interface PromotePayload {
4505
4505
  * });
4506
4506
  * ```
4507
4507
  */
4508
- declare function usePromote(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, PromotePayload, unknown>;
4508
+ declare function usePromote(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, PromotePayload, unknown>;
4509
4509
 
4510
4510
  /**
4511
4511
  * SDK-level entry cache utilities. These operate on SDK cache keys
@@ -4967,7 +4967,7 @@ interface SubscribeCommunityPayload {
4967
4967
  * });
4968
4968
  * ```
4969
4969
  */
4970
- declare function useSubscribeCommunity(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, SubscribeCommunityPayload, unknown>;
4970
+ declare function useSubscribeCommunity(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, SubscribeCommunityPayload, unknown>;
4971
4971
 
4972
4972
  /**
4973
4973
  * Payload for unsubscribing from a community.
@@ -5011,7 +5011,7 @@ interface UnsubscribeCommunityPayload {
5011
5011
  * });
5012
5012
  * ```
5013
5013
  */
5014
- declare function useUnsubscribeCommunity(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, UnsubscribeCommunityPayload, unknown>;
5014
+ declare function useUnsubscribeCommunity(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, UnsubscribeCommunityPayload, unknown>;
5015
5015
 
5016
5016
  /**
5017
5017
  * Payload for muting/unmuting a post in a community.
@@ -5086,7 +5086,7 @@ interface MutePostPayload {
5086
5086
  * });
5087
5087
  * ```
5088
5088
  */
5089
- declare function useMutePost(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, MutePostPayload, unknown>;
5089
+ declare function useMutePost(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, MutePostPayload, unknown>;
5090
5090
 
5091
5091
  /**
5092
5092
  * Payload for setting a user's role in a community.
@@ -5147,7 +5147,7 @@ interface SetCommunityRolePayload {
5147
5147
  * });
5148
5148
  * ```
5149
5149
  */
5150
- declare function useSetCommunityRole(community: string, username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, SetCommunityRolePayload, unknown>;
5150
+ declare function useSetCommunityRole(community: string, username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, SetCommunityRolePayload, unknown>;
5151
5151
 
5152
5152
  /**
5153
5153
  * Payload for updating community properties.
@@ -5203,7 +5203,7 @@ type UpdateCommunityPayload = CommunityProps;
5203
5203
  * });
5204
5204
  * ```
5205
5205
  */
5206
- declare function useUpdateCommunity(community: string, username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, CommunityProps, unknown>;
5206
+ declare function useUpdateCommunity(community: string, username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, CommunityProps, unknown>;
5207
5207
 
5208
5208
  /**
5209
5209
  * Payload for community rewards registration.
@@ -5252,7 +5252,7 @@ interface CommunityRewardsRegisterPayload {
5252
5252
  * });
5253
5253
  * ```
5254
5254
  */
5255
- declare function useRegisterCommunityRewards(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, CommunityRewardsRegisterPayload, unknown>;
5255
+ declare function useRegisterCommunityRewards(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, CommunityRewardsRegisterPayload, unknown>;
5256
5256
 
5257
5257
  interface PinPostPayload {
5258
5258
  community: string;
@@ -5260,7 +5260,7 @@ interface PinPostPayload {
5260
5260
  permlink: string;
5261
5261
  pin: boolean;
5262
5262
  }
5263
- declare function usePinPost(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, PinPostPayload, unknown>;
5263
+ declare function usePinPost(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, PinPostPayload, unknown>;
5264
5264
 
5265
5265
  declare enum ROLES {
5266
5266
  OWNER = "owner",
@@ -5715,7 +5715,7 @@ declare function useMarkNotificationsRead(username: string | undefined, code: st
5715
5715
  interface SetLastReadPayload {
5716
5716
  date?: string;
5717
5717
  }
5718
- declare function useSetLastRead(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, SetLastReadPayload, unknown>;
5718
+ declare function useSetLastRead(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, SetLastReadPayload, unknown>;
5719
5719
 
5720
5720
  interface Proposal {
5721
5721
  creator: string;
@@ -5862,9 +5862,9 @@ interface ProposalVotePayload {
5862
5862
  * });
5863
5863
  * ```
5864
5864
  */
5865
- declare function useProposalVote(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ProposalVotePayload, unknown>;
5865
+ declare function useProposalVote(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, ProposalVotePayload, unknown>;
5866
5866
 
5867
- declare function useProposalCreate(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ProposalCreatePayload, unknown>;
5867
+ declare function useProposalCreate(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, ProposalCreatePayload, unknown>;
5868
5868
 
5869
5869
  interface DelegatedVestingShare {
5870
5870
  id: number;
@@ -6620,7 +6620,7 @@ interface TransferPayload {
6620
6620
  *
6621
6621
  * @returns React Query mutation result
6622
6622
  */
6623
- declare function useTransfer(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, TransferPayload, unknown>;
6623
+ declare function useTransfer(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, TransferPayload, unknown>;
6624
6624
 
6625
6625
  interface TransferPointPayload {
6626
6626
  to: string;
@@ -6632,7 +6632,7 @@ interface TransferPointPayload {
6632
6632
  *
6633
6633
  * Uses `ecency_point_transfer` custom_json operation with ACTIVE authority.
6634
6634
  */
6635
- declare function useTransferPoint(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, TransferPointPayload, unknown>;
6635
+ declare function useTransferPoint(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, TransferPointPayload, unknown>;
6636
6636
 
6637
6637
  /**
6638
6638
  * Payload for delegating Hive Power (vesting shares).
@@ -6694,7 +6694,7 @@ interface DelegateVestingSharesPayload {
6694
6694
  * });
6695
6695
  * ```
6696
6696
  */
6697
- declare function useDelegateVestingShares(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, DelegateVestingSharesPayload, unknown>;
6697
+ declare function useDelegateVestingShares(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, DelegateVestingSharesPayload, unknown>;
6698
6698
 
6699
6699
  /**
6700
6700
  * Payload for setting withdraw vesting route.
@@ -6761,21 +6761,21 @@ interface SetWithdrawVestingRoutePayload {
6761
6761
  * });
6762
6762
  * ```
6763
6763
  */
6764
- declare function useSetWithdrawVestingRoute(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, SetWithdrawVestingRoutePayload, unknown>;
6764
+ declare function useSetWithdrawVestingRoute(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, SetWithdrawVestingRoutePayload, unknown>;
6765
6765
 
6766
6766
  interface TransferSpkPayload {
6767
6767
  to: string;
6768
6768
  amount: number;
6769
6769
  memo?: string;
6770
6770
  }
6771
- declare function useTransferSpk(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, TransferSpkPayload, unknown>;
6771
+ declare function useTransferSpk(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, TransferSpkPayload, unknown>;
6772
6772
 
6773
6773
  interface TransferLarynxPayload {
6774
6774
  to: string;
6775
6775
  amount: number;
6776
6776
  memo?: string;
6777
6777
  }
6778
- declare function useTransferLarynx(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, TransferLarynxPayload, unknown>;
6778
+ declare function useTransferLarynx(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, TransferLarynxPayload, unknown>;
6779
6779
 
6780
6780
  interface TransferEngineTokenPayload {
6781
6781
  to: string;
@@ -6783,14 +6783,14 @@ interface TransferEngineTokenPayload {
6783
6783
  quantity: string;
6784
6784
  memo: string;
6785
6785
  }
6786
- declare function useTransferEngineToken(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, TransferEngineTokenPayload, unknown>;
6786
+ declare function useTransferEngineToken(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, TransferEngineTokenPayload, unknown>;
6787
6787
 
6788
6788
  interface TransferToSavingsPayload {
6789
6789
  to: string;
6790
6790
  amount: string;
6791
6791
  memo: string;
6792
6792
  }
6793
- declare function useTransferToSavings(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, TransferToSavingsPayload, unknown>;
6793
+ declare function useTransferToSavings(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, TransferToSavingsPayload, unknown>;
6794
6794
 
6795
6795
  interface TransferFromSavingsPayload {
6796
6796
  to: string;
@@ -6798,25 +6798,25 @@ interface TransferFromSavingsPayload {
6798
6798
  memo: string;
6799
6799
  requestId: number;
6800
6800
  }
6801
- declare function useTransferFromSavings(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, TransferFromSavingsPayload, unknown>;
6801
+ declare function useTransferFromSavings(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, TransferFromSavingsPayload, unknown>;
6802
6802
 
6803
6803
  interface TransferToVestingPayload {
6804
6804
  to: string;
6805
6805
  amount: string;
6806
6806
  }
6807
- declare function useTransferToVesting(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, TransferToVestingPayload, unknown>;
6807
+ declare function useTransferToVesting(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, TransferToVestingPayload, unknown>;
6808
6808
 
6809
6809
  interface WithdrawVestingPayload {
6810
6810
  vestingShares: string;
6811
6811
  }
6812
- declare function useWithdrawVesting(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, WithdrawVestingPayload, unknown>;
6812
+ declare function useWithdrawVesting(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, WithdrawVestingPayload, unknown>;
6813
6813
 
6814
6814
  interface ConvertPayload {
6815
6815
  amount: string;
6816
6816
  requestId: number;
6817
6817
  collateralized?: boolean;
6818
6818
  }
6819
- declare function useConvert(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ConvertPayload, unknown>;
6819
+ declare function useConvert(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, ConvertPayload, unknown>;
6820
6820
 
6821
6821
  interface ClaimInterestPayload {
6822
6822
  to: string;
@@ -6824,59 +6824,59 @@ interface ClaimInterestPayload {
6824
6824
  memo: string;
6825
6825
  requestId: number;
6826
6826
  }
6827
- declare function useClaimInterest(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ClaimInterestPayload, unknown>;
6827
+ declare function useClaimInterest(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, ClaimInterestPayload, unknown>;
6828
6828
 
6829
6829
  interface ClaimRewardsPayload {
6830
6830
  rewardHive: string;
6831
6831
  rewardHbd: string;
6832
6832
  rewardVests: string;
6833
6833
  }
6834
- declare function useClaimRewards(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ClaimRewardsPayload, unknown>;
6834
+ declare function useClaimRewards(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, ClaimRewardsPayload, unknown>;
6835
6835
 
6836
6836
  interface LockLarynxPayload {
6837
6837
  mode: "lock" | "unlock";
6838
6838
  amount: number;
6839
6839
  }
6840
- declare function useLockLarynx(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, LockLarynxPayload, unknown>;
6840
+ declare function useLockLarynx(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, LockLarynxPayload, unknown>;
6841
6841
 
6842
6842
  interface PowerLarynxPayload {
6843
6843
  mode: "up" | "down";
6844
6844
  amount: number;
6845
6845
  }
6846
- declare function usePowerLarynx(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, PowerLarynxPayload, unknown>;
6846
+ declare function usePowerLarynx(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, PowerLarynxPayload, unknown>;
6847
6847
 
6848
6848
  interface DelegateEngineTokenPayload {
6849
6849
  to: string;
6850
6850
  symbol: string;
6851
6851
  quantity: string;
6852
6852
  }
6853
- declare function useDelegateEngineToken(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, DelegateEngineTokenPayload, unknown>;
6853
+ declare function useDelegateEngineToken(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, DelegateEngineTokenPayload, unknown>;
6854
6854
 
6855
6855
  interface UndelegateEngineTokenPayload {
6856
6856
  from: string;
6857
6857
  symbol: string;
6858
6858
  quantity: string;
6859
6859
  }
6860
- declare function useUndelegateEngineToken(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, UndelegateEngineTokenPayload, unknown>;
6860
+ declare function useUndelegateEngineToken(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, UndelegateEngineTokenPayload, unknown>;
6861
6861
 
6862
6862
  interface StakeEngineTokenPayload {
6863
6863
  to: string;
6864
6864
  symbol: string;
6865
6865
  quantity: string;
6866
6866
  }
6867
- declare function useStakeEngineToken(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, StakeEngineTokenPayload, unknown>;
6867
+ declare function useStakeEngineToken(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, StakeEngineTokenPayload, unknown>;
6868
6868
 
6869
6869
  interface UnstakeEngineTokenPayload {
6870
6870
  to: string;
6871
6871
  symbol: string;
6872
6872
  quantity: string;
6873
6873
  }
6874
- declare function useUnstakeEngineToken(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, UnstakeEngineTokenPayload, unknown>;
6874
+ declare function useUnstakeEngineToken(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, UnstakeEngineTokenPayload, unknown>;
6875
6875
 
6876
6876
  interface ClaimEngineRewardsPayload {
6877
6877
  tokens: string[];
6878
6878
  }
6879
- declare function useClaimEngineRewards(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ClaimEngineRewardsPayload, unknown>;
6879
+ declare function useClaimEngineRewards(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, ClaimEngineRewardsPayload, unknown>;
6880
6880
 
6881
6881
  interface EngineMarketOrderPayload {
6882
6882
  action: "buy" | "sell" | "cancel";
@@ -6886,7 +6886,7 @@ interface EngineMarketOrderPayload {
6886
6886
  orderId?: string;
6887
6887
  orderType?: "buy" | "sell";
6888
6888
  }
6889
- declare function useEngineMarketOrder(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, EngineMarketOrderPayload, unknown>;
6889
+ declare function useEngineMarketOrder(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, EngineMarketOrderPayload, unknown>;
6890
6890
 
6891
6891
  interface WalletOperationPayload {
6892
6892
  from: string;
@@ -6912,13 +6912,13 @@ interface WalletOperationPayload {
6912
6912
  * @param operation - The operation type from AssetOperation enum
6913
6913
  * @param auth - Auth context for broadcasting
6914
6914
  */
6915
- declare function useWalletOperation(username: string | undefined, asset: string, operation: AssetOperation, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, WalletOperationPayload, unknown>;
6915
+ declare function useWalletOperation(username: string | undefined, asset: string, operation: AssetOperation, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, WalletOperationPayload, unknown>;
6916
6916
 
6917
6917
  interface DelegateRcPayload {
6918
6918
  to: string;
6919
6919
  maxRc: string | number;
6920
6920
  }
6921
- declare function useDelegateRc(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, DelegateRcPayload, unknown>;
6921
+ declare function useDelegateRc(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, DelegateRcPayload, unknown>;
6922
6922
 
6923
6923
  declare const HIVE_ACCOUNT_OPERATION_GROUPS: Record<HiveOperationGroup, number[]>;
6924
6924
 
@@ -6980,12 +6980,12 @@ interface WitnessVotePayload {
6980
6980
  * });
6981
6981
  * ```
6982
6982
  */
6983
- declare function useWitnessVote(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, WitnessVotePayload, unknown>;
6983
+ declare function useWitnessVote(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, WitnessVotePayload, unknown>;
6984
6984
 
6985
6985
  interface WitnessProxyPayload {
6986
6986
  proxy: string;
6987
6987
  }
6988
- declare function useWitnessProxy(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, WitnessProxyPayload, unknown>;
6988
+ declare function useWitnessProxy(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, WitnessProxyPayload, unknown>;
6989
6989
 
6990
6990
  interface Witness {
6991
6991
  total_missed: number;
@@ -7220,12 +7220,12 @@ interface LimitOrderCreatePayload {
7220
7220
  expiration: string;
7221
7221
  orderId: number;
7222
7222
  }
7223
- declare function useLimitOrderCreate(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, LimitOrderCreatePayload, unknown>;
7223
+ declare function useLimitOrderCreate(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, LimitOrderCreatePayload, unknown>;
7224
7224
 
7225
7225
  interface LimitOrderCancelPayload {
7226
7226
  orderId: number;
7227
7227
  }
7228
- declare function useLimitOrderCancel(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, LimitOrderCancelPayload, unknown>;
7228
+ declare function useLimitOrderCancel(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, LimitOrderCancelPayload, unknown>;
7229
7229
 
7230
7230
  interface ApiResponse<T> {
7231
7231
  status: number;
@@ -7537,7 +7537,7 @@ interface BoostPlusPayload {
7537
7537
  account: string;
7538
7538
  duration: number;
7539
7539
  }
7540
- declare function useBoostPlus(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, BoostPlusPayload, unknown>;
7540
+ declare function useBoostPlus(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, BoostPlusPayload, unknown>;
7541
7541
 
7542
7542
  type BridgeParams = Record<string, unknown> | unknown[];
7543
7543
  declare function bridgeApiCall<T>(endpoint: string, params: BridgeParams, signal?: AbortSignal): Promise<T>;