@ecency/sdk 1.5.27 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { UseMutationOptions, MutationKey, QueryClient, QueryKey, InfiniteData, UseQueryOptions, UseInfiniteQueryOptions } from '@tanstack/react-query';
3
3
  import * as _hiveio_dhive from '@hiveio/dhive';
4
- import { Operation, Authority, SMTAsset, PrivateKey, AuthorityType, PublicKey, Client } from '@hiveio/dhive';
4
+ import { Operation, TransactionConfirmation, Authority as Authority$1, SMTAsset, PrivateKey, AuthorityType, PublicKey, Client } from '@hiveio/dhive';
5
5
  import * as _hiveio_dhive_lib_chain_rc from '@hiveio/dhive/lib/chain/rc';
6
6
  import { RCAccount } from '@hiveio/dhive/lib/chain/rc';
7
7
 
@@ -27,12 +27,489 @@ interface DynamicProps {
27
27
  };
28
28
  }
29
29
 
30
+ /**
31
+ * Platform-specific adapter for SDK mutations.
32
+ * Enables SDK to work across React Native (mobile) and Next.js (web).
33
+ *
34
+ * This interface allows the SDK to remain platform-agnostic while supporting
35
+ * platform-specific features like encrypted storage (mobile), localStorage (web),
36
+ * Keychain integration (web), and different state management solutions.
37
+ *
38
+ * @example
39
+ * ```typescript
40
+ * // Web adapter using localStorage and Zustand
41
+ * const webAdapter: PlatformAdapter = {
42
+ * getUser: async (username) => localStorage.getItem(`user-${username}`),
43
+ * getPostingKey: async (username) => localStorage.getItem(`key-${username}`),
44
+ * showError: (msg) => toast.error(msg),
45
+ * showSuccess: (msg) => toast.success(msg),
46
+ * };
47
+ *
48
+ * // Mobile adapter using Redux and encrypted storage
49
+ * const mobileAdapter: PlatformAdapter = {
50
+ * getUser: async (username) => store.getState().users[username],
51
+ * getPostingKey: async (username) => decryptKey(username),
52
+ * showError: (msg) => Alert.alert('Error', msg),
53
+ * showSuccess: (msg) => Alert.alert('Success', msg),
54
+ * };
55
+ * ```
56
+ */
57
+ interface PlatformAdapter {
58
+ /**
59
+ * Retrieve user data from platform-specific storage.
60
+ *
61
+ * @param username - The username to look up
62
+ * @returns User object or undefined if not found
63
+ *
64
+ * @remarks
65
+ * - Web: localStorage, Zustand store
66
+ * - Mobile: Redux store, AsyncStorage with PIN decryption
67
+ */
68
+ getUser: (username: string) => Promise<User | undefined>;
69
+ /**
70
+ * Retrieve posting key from secure storage.
71
+ *
72
+ * @param username - The username to get key for
73
+ * @returns Posting key (WIF format), null if Keychain/HiveAuth, undefined if not found
74
+ *
75
+ * @remarks
76
+ * - Returns null for Keychain/HiveAuth users (use broadcastWithKeychain instead)
77
+ * - Mobile: Decrypts key using PIN
78
+ * - Web: Retrieves from localStorage
79
+ */
80
+ getPostingKey: (username: string) => Promise<string | null | undefined>;
81
+ /**
82
+ * Retrieve active key from secure storage (for transfers and other active operations).
83
+ *
84
+ * @param username - The username to get key for
85
+ * @returns Active key (WIF format), null if Keychain/HiveAuth, undefined if not found
86
+ *
87
+ * @remarks
88
+ * - Returns null for Keychain/HiveAuth users (use broadcastWithKeychain instead)
89
+ * - Mobile: Decrypts key using PIN
90
+ * - Web: Retrieves from localStorage
91
+ * - Required for transfer, power down, and other active authority operations
92
+ */
93
+ getActiveKey?: (username: string) => Promise<string | null | undefined>;
94
+ /**
95
+ * Retrieve owner key from secure storage (for account recovery and password changes).
96
+ *
97
+ * @param username - The username to get key for
98
+ * @returns Owner key (WIF format), null if Keychain/HiveAuth, undefined if not found
99
+ *
100
+ * @remarks
101
+ * - Returns null for Keychain/HiveAuth users (use broadcastWithKeychain instead)
102
+ * - Mobile: Decrypts key using PIN (only available for master password logins)
103
+ * - Web: Retrieves from localStorage (only available for master password logins)
104
+ * - Required for account recovery, password changes, and key rotation
105
+ * - Most users won't have owner key stored - only master password logins
106
+ */
107
+ getOwnerKey?: (username: string) => Promise<string | null | undefined>;
108
+ /**
109
+ * Retrieve memo key from secure storage (for memo encryption/decryption).
110
+ *
111
+ * @param username - The username to get key for
112
+ * @returns Memo key (WIF format), null if Keychain/HiveAuth, undefined if not found
113
+ *
114
+ * @remarks
115
+ * - Returns null for Keychain/HiveAuth users
116
+ * - Mobile: Decrypts key using PIN
117
+ * - Web: Retrieves from localStorage
118
+ * - Used for encrypting/decrypting transfer memos
119
+ * - Rarely used for signing operations (mostly for encryption)
120
+ */
121
+ getMemoKey?: (username: string) => Promise<string | null | undefined>;
122
+ /**
123
+ * Retrieve HiveSigner access token from storage.
124
+ *
125
+ * @param username - The username to get token for
126
+ * @returns Access token or undefined if not using HiveSigner
127
+ */
128
+ getAccessToken: (username: string) => Promise<string | undefined>;
129
+ /**
130
+ * Get the login method used for this user.
131
+ *
132
+ * @param username - The username to check
133
+ * @returns Login type ('key', 'hivesigner', 'keychain', 'hiveauth') or null
134
+ */
135
+ getLoginType: (username: string) => Promise<string | null | undefined>;
136
+ /**
137
+ * Check if user has granted ecency.app posting authority.
138
+ *
139
+ * @param username - The username to check
140
+ * @returns true if ecency.app is in posting.account_auths, false otherwise
141
+ *
142
+ * @remarks
143
+ * Used to determine if posting operations can use HiveSigner access token
144
+ * instead of requiring direct key signing or HiveAuth/Keychain.
145
+ *
146
+ * When posting authority is granted:
147
+ * - Master password users: Can use token for faster posting ops
148
+ * - Active key users: Can use token for posting ops (key for active ops)
149
+ * - HiveAuth users: Can use token for faster posting ops (optional optimization)
150
+ *
151
+ * @example
152
+ * ```typescript
153
+ * const hasAuth = await adapter.hasPostingAuthorization('alice');
154
+ * if (hasAuth) {
155
+ * // Use HiveSigner API with access token (faster)
156
+ * await broadcastWithToken(ops);
157
+ * } else {
158
+ * // Use direct key signing or show grant prompt
159
+ * await broadcastWithKey(ops);
160
+ * }
161
+ * ```
162
+ */
163
+ hasPostingAuthorization?: (username: string) => Promise<boolean>;
164
+ /**
165
+ * Display error message to user.
166
+ *
167
+ * @param message - Error message to display
168
+ * @param type - Optional error type for categorization
169
+ *
170
+ * @remarks
171
+ * - Web: toast.error()
172
+ * - Mobile: Alert.alert(), custom error modal
173
+ */
174
+ showError: (message: string, type?: string) => void;
175
+ /**
176
+ * Display success message to user.
177
+ *
178
+ * @param message - Success message to display
179
+ *
180
+ * @remarks
181
+ * - Web: toast.success()
182
+ * - Mobile: Alert.alert(), custom success modal
183
+ */
184
+ showSuccess: (message: string) => void;
185
+ /**
186
+ * Display loading indicator (optional).
187
+ *
188
+ * @param message - Loading message to display
189
+ */
190
+ showLoading?: (message: string) => void;
191
+ /**
192
+ * Hide loading indicator (optional).
193
+ */
194
+ hideLoading?: () => void;
195
+ /**
196
+ * Show UI to prompt user to upgrade their auth method for an operation.
197
+ *
198
+ * @param requiredAuthority - The authority level needed ('posting' or 'active')
199
+ * @param operation - Description of the operation requiring upgrade
200
+ * @returns Promise that resolves to:
201
+ * - 'hiveauth' if user selected HiveAuth
202
+ * - 'hivesigner' if user selected HiveSigner
203
+ * - 'key' if user wants to enter key manually (temporary use)
204
+ * - false if user cancelled/declined
205
+ *
206
+ * @remarks
207
+ * Called when user's login method doesn't support the required operation:
208
+ * - Posting key user trying active operation → needs active key
209
+ * - No-key user trying any operation → needs auth method
210
+ *
211
+ * Platform should show modal/sheet offering:
212
+ * 1. Sign with HiveAuth (if available)
213
+ * 2. Sign with HiveSigner (if available)
214
+ * 3. Enter active/posting key manually (temporary use)
215
+ * 4. Cancel button
216
+ *
217
+ * Return the method user explicitly selected, allowing SDK to skip
218
+ * unavailable methods and provide better error messages.
219
+ *
220
+ * When 'key' is returned, platform should show a key entry modal,
221
+ * then call broadcastWithMethod('key', ...) with the entered key
222
+ * stored temporarily in the adapter.
223
+ *
224
+ * @example
225
+ * ```typescript
226
+ * // User logged in with posting key tries to transfer
227
+ * const method = await adapter.showAuthUpgradeUI('active', 'Transfer');
228
+ * if (method === 'hiveauth') {
229
+ * await broadcastWithHiveAuth(ops);
230
+ * } else if (method === 'hivesigner') {
231
+ * await broadcastWithHiveSigner(ops);
232
+ * } else if (method === 'key') {
233
+ * // Platform will show key entry modal and temporarily store the key
234
+ * await broadcastWithKey(ops);
235
+ * } else {
236
+ * // User cancelled
237
+ * throw new Error('Operation requires active authority');
238
+ * }
239
+ * ```
240
+ */
241
+ showAuthUpgradeUI?: (requiredAuthority: 'posting' | 'active', operation: string) => Promise<'hiveauth' | 'hivesigner' | 'key' | false>;
242
+ /**
243
+ * Broadcast operations using Keychain browser extension.
244
+ *
245
+ * @param username - Account broadcasting the operations
246
+ * @param ops - Operations to broadcast
247
+ * @param keyType - Authority level (lowercase: "posting", "active", "owner", "memo")
248
+ * @returns Transaction confirmation
249
+ *
250
+ * @remarks
251
+ * Web platform only. Implementations should map lowercase keyType to
252
+ * Keychain's expected PascalCase format internally if needed.
253
+ *
254
+ * @example
255
+ * ```typescript
256
+ * async broadcastWithKeychain(username, ops, keyType) {
257
+ * // Map to Keychain's expected format
258
+ * const keychainKeyType = keyType.charAt(0).toUpperCase() + keyType.slice(1);
259
+ * return await window.hive_keychain.requestBroadcast(username, ops, keychainKeyType);
260
+ * }
261
+ * ```
262
+ */
263
+ broadcastWithKeychain?: (username: string, ops: Operation[], keyType: "posting" | "active" | "owner" | "memo") => Promise<TransactionConfirmation>;
264
+ /**
265
+ * Broadcast operations using HiveAuth protocol.
266
+ *
267
+ * @param username - Username to broadcast for
268
+ * @param ops - Operations to broadcast
269
+ * @param keyType - Key authority required
270
+ * @returns Transaction confirmation
271
+ *
272
+ * @remarks
273
+ * - Shows platform-specific HiveAuth modal/screen
274
+ * - Generates QR code for mobile auth app
275
+ * - Handles WebSocket communication with auth app
276
+ */
277
+ broadcastWithHiveAuth?: (username: string, ops: Operation[], keyType: "posting" | "active" | "owner" | "memo") => Promise<TransactionConfirmation>;
278
+ /**
279
+ * Record user activity for analytics (optional).
280
+ *
281
+ * @param activityType - Numeric activity type code
282
+ * @param blockNum - Block number of the activity
283
+ * @param txId - Transaction ID
284
+ *
285
+ * @remarks
286
+ * - Used for tracking user engagement
287
+ * - Platform can implement custom analytics
288
+ */
289
+ recordActivity?: (activityType: number, blockNum: number, txId: string) => Promise<void>;
290
+ /**
291
+ * Invalidate React Query cache keys (optional).
292
+ *
293
+ * @param keys - Array of query keys to invalidate
294
+ *
295
+ * @remarks
296
+ * - Triggers refetch of cached data
297
+ * - Used after mutations to update UI
298
+ * - Example: [['posts', author, permlink], ['accountFull', username]]
299
+ */
300
+ invalidateQueries?: (keys: any[][]) => Promise<void>;
301
+ /**
302
+ * Grant ecency.app posting authority for the user (optional).
303
+ *
304
+ * @param username - The username to grant authority for
305
+ * @returns Promise that resolves when authority is granted
306
+ * @throws Error if grant fails or user doesn't have active key
307
+ *
308
+ * @remarks
309
+ * Adds 'ecency.app' to the user's posting.account_auths with appropriate weight.
310
+ * Requires active authority to broadcast the account_update operation.
311
+ *
312
+ * Called automatically during login for:
313
+ * - Master password logins (has active key)
314
+ * - Active key logins (has active key)
315
+ * - BIP44 seed logins (has active key)
316
+ *
317
+ * Can be called manually for HiveAuth users as an optimization.
318
+ *
319
+ * After granting, posting operations can use HiveSigner API with access token
320
+ * instead of requiring HiveAuth/Keychain each time (faster UX).
321
+ *
322
+ * @example
323
+ * ```typescript
324
+ * // Auto-grant on master password login
325
+ * if (authType === 'master' && !hasPostingAuth) {
326
+ * await adapter.grantPostingAuthority(username);
327
+ * }
328
+ *
329
+ * // Manual grant for HiveAuth optimization
330
+ * if (authType === 'hiveauth' && userWantsOptimization) {
331
+ * await adapter.grantPostingAuthority(username);
332
+ * }
333
+ * ```
334
+ */
335
+ grantPostingAuthority?: (username: string) => Promise<void>;
336
+ }
337
+ /**
338
+ * Authentication method types supported by the SDK.
339
+ */
340
+ type AuthMethod = 'key' | 'hiveauth' | 'hivesigner' | 'keychain' | 'custom';
341
+ /**
342
+ * Minimal user type for platform adapters.
343
+ * Platforms can extend this with their own user models.
344
+ *
345
+ * @example
346
+ * ```typescript
347
+ * // Web platform user
348
+ * interface WebUser extends User {
349
+ * username: string;
350
+ * postingKey?: string;
351
+ * accessToken?: string;
352
+ * loginType: 'keychain' | 'hivesigner';
353
+ * }
354
+ *
355
+ * // Mobile platform user
356
+ * interface MobileUser extends User {
357
+ * name: string;
358
+ * local: {
359
+ * authType: 'key' | 'hiveauth';
360
+ * postingKey: string; // encrypted
361
+ * };
362
+ * }
363
+ * ```
364
+ */
365
+ interface User {
366
+ /** Hive username */
367
+ username?: string;
368
+ /** Display name (alias for username on some platforms) */
369
+ name?: string;
370
+ /** Platform-specific user data */
371
+ [key: string]: any;
372
+ }
373
+
374
+ /**
375
+ * Original AuthContext for backward compatibility.
376
+ *
377
+ * This interface is maintained for existing SDK consumers who pass
378
+ * auth context directly to mutations.
379
+ *
380
+ * @deprecated Use AuthContextV2 for new implementations to enable platform adapters.
381
+ *
382
+ * @example
383
+ * ```typescript
384
+ * // Legacy usage (still supported)
385
+ * const authContext: AuthContext = {
386
+ * postingKey: 'wif-key',
387
+ * accessToken: 'hs-token',
388
+ * loginType: 'hivesigner'
389
+ * };
390
+ * ```
391
+ */
30
392
  interface AuthContext {
393
+ /** HiveSigner OAuth access token */
31
394
  accessToken?: string;
395
+ /** Posting key in WIF format (null for Keychain/HiveAuth users) */
32
396
  postingKey?: string | null;
397
+ /** Login method used ('key', 'hivesigner', 'keychain', 'hiveauth') */
33
398
  loginType?: string | null;
399
+ /**
400
+ * Custom broadcast function for platform-specific signing.
401
+ * @deprecated Use platform adapter's broadcastWithKeychain/broadcastWithHiveAuth instead.
402
+ */
34
403
  broadcast?: (operations: Operation[], authority?: "active" | "posting" | "owner" | "memo") => Promise<unknown>;
35
404
  }
405
+ /**
406
+ * Enhanced AuthContext with platform adapter support.
407
+ * Backward compatible with AuthContext.
408
+ *
409
+ * This is the recommended interface for new SDK integrations. It enables
410
+ * platform-specific features while keeping the SDK agnostic of implementation details.
411
+ *
412
+ * @example
413
+ * ```typescript
414
+ * // Web usage with platform adapter
415
+ * const authContext: AuthContextV2 = {
416
+ * adapter: {
417
+ * getUser: async (username) => getUserFromZustand(username),
418
+ * getPostingKey: async (username) => localStorage.getItem(`key-${username}`),
419
+ * showError: (msg) => toast.error(msg),
420
+ * showSuccess: (msg) => toast.success(msg),
421
+ * broadcastWithKeychain: async (username, ops, keyType) => {
422
+ * // Map lowercase to Keychain's PascalCase format
423
+ * const keychainKeyType = keyType.charAt(0).toUpperCase() + keyType.slice(1);
424
+ * return window.hive_keychain.requestBroadcast(username, ops, keychainKeyType);
425
+ * },
426
+ * },
427
+ * enableFallback: true,
428
+ * fallbackChain: ['keychain', 'key', 'hivesigner'],
429
+ * };
430
+ *
431
+ * // Mobile usage with platform adapter
432
+ * const authContext: AuthContextV2 = {
433
+ * adapter: {
434
+ * getUser: async (username) => store.getState().users[username],
435
+ * getPostingKey: async (username) => decryptKey(username, pin),
436
+ * showError: (msg) => Alert.alert('Error', msg),
437
+ * showSuccess: (msg) => Alert.alert('Success', msg),
438
+ * broadcastWithHiveAuth: async (username, ops, keyType) => {
439
+ * return showHiveAuthModal(username, ops, keyType);
440
+ * },
441
+ * },
442
+ * enableFallback: true,
443
+ * fallbackChain: ['hiveauth', 'key'],
444
+ * };
445
+ *
446
+ * // Legacy usage (still works)
447
+ * const authContext: AuthContextV2 = {
448
+ * postingKey: 'wif-key',
449
+ * loginType: 'key',
450
+ * };
451
+ * ```
452
+ */
453
+ interface AuthContextV2 extends AuthContext {
454
+ /**
455
+ * Platform-specific adapter for storage, UI, and broadcasting.
456
+ *
457
+ * When provided, the SDK will use the adapter to:
458
+ * - Retrieve user credentials from platform storage
459
+ * - Show error/success messages in platform UI
460
+ * - Broadcast operations using platform-specific methods (Keychain, HiveAuth)
461
+ * - Invalidate React Query caches after mutations
462
+ *
463
+ * @remarks
464
+ * If not provided, SDK falls back to using postingKey/accessToken directly.
465
+ */
466
+ adapter?: PlatformAdapter;
467
+ /**
468
+ * Whether to enable automatic fallback between auth methods.
469
+ *
470
+ * @remarks
471
+ * The actual behavior is:
472
+ * - When adapter is provided: defaults to true (fallback enabled)
473
+ * - When no adapter: defaults to false (legacy behavior)
474
+ *
475
+ * This is evaluated at runtime as: `auth?.enableFallback !== false && auth?.adapter`
476
+ *
477
+ * Set to `false` explicitly to disable fallback even with an adapter.
478
+ *
479
+ * @default undefined (evaluated as true when adapter exists, false otherwise)
480
+ *
481
+ * @example
482
+ * ```typescript
483
+ * // User has Keychain but it fails -> try posting key -> try HiveSigner
484
+ * const authContext: AuthContextV2 = {
485
+ * adapter: myAdapter,
486
+ * enableFallback: true,
487
+ * fallbackChain: ['keychain', 'key', 'hivesigner'],
488
+ * };
489
+ * ```
490
+ */
491
+ enableFallback?: boolean;
492
+ /**
493
+ * Order of authentication methods to try during fallback.
494
+ *
495
+ * Available methods:
496
+ * - 'key': Direct private key (adapter.getPostingKey or getActiveKey)
497
+ * - 'hiveauth': HiveAuth protocol (adapter.broadcastWithHiveAuth)
498
+ * - 'hivesigner': HiveSigner OAuth (adapter.getAccessToken)
499
+ * - 'keychain': Keychain extension (adapter.broadcastWithKeychain)
500
+ * - 'custom': Use AuthContext.broadcast()
501
+ *
502
+ * @default ['key', 'hiveauth', 'hivesigner', 'keychain', 'custom']
503
+ *
504
+ * @remarks
505
+ * Set this to customize the order or exclude methods. For example:
506
+ * - Mobile priority: ['hiveauth', 'hivesigner', 'key']
507
+ * - Web priority: ['keychain', 'key', 'hivesigner']
508
+ *
509
+ * @see broadcastWithFallback for the runtime implementation
510
+ */
511
+ fallbackChain?: AuthMethod[];
512
+ }
36
513
 
37
514
  /**
38
515
  * Generic pagination metadata for wrapped API responses
@@ -85,9 +562,9 @@ interface AccountProfile {
85
562
 
86
563
  interface FullAccount {
87
564
  name: string;
88
- owner: Authority;
89
- active: Authority;
90
- posting: Authority;
565
+ owner: Authority$1;
566
+ active: Authority$1;
567
+ posting: Authority$1;
91
568
  memo_key: string;
92
569
  post_count: number;
93
570
  created: string;
@@ -447,6 +924,84 @@ declare function useAccountRelationsUpdate(reference: string | undefined, target
447
924
  follows_blacklists?: boolean | undefined;
448
925
  }, Error, Kind, unknown>;
449
926
 
927
+ /**
928
+ * Payload for following an account.
929
+ */
930
+ interface FollowPayload {
931
+ /** Account to follow */
932
+ following: string;
933
+ }
934
+ /**
935
+ * React Query mutation hook for following an account.
936
+ *
937
+ * This mutation broadcasts a follow operation to the Hive blockchain,
938
+ * adding the target account to the follower's "blog" follow list.
939
+ *
940
+ * @param username - The username of the follower (required for broadcast)
941
+ * @param auth - Authentication context with platform adapter and fallback configuration
942
+ *
943
+ * @returns React Query mutation result
944
+ *
945
+ * @remarks
946
+ * **Post-Broadcast Actions:**
947
+ * - Invalidates relationship cache to show updated follow status
948
+ * - Invalidates account cache to refetch updated follower/following counts
949
+ *
950
+ * @example
951
+ * ```typescript
952
+ * const followMutation = useFollow(username, {
953
+ * adapter: myAdapter,
954
+ * enableFallback: true,
955
+ * fallbackChain: ['keychain', 'key', 'hivesigner']
956
+ * });
957
+ *
958
+ * // Follow an account
959
+ * followMutation.mutate({
960
+ * following: 'alice'
961
+ * });
962
+ * ```
963
+ */
964
+ declare function useFollow(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, FollowPayload, unknown>;
965
+
966
+ /**
967
+ * Payload for unfollowing an account.
968
+ */
969
+ interface UnfollowPayload {
970
+ /** Account to unfollow */
971
+ following: string;
972
+ }
973
+ /**
974
+ * React Query mutation hook for unfollowing an account.
975
+ *
976
+ * This mutation broadcasts an unfollow operation to the Hive blockchain,
977
+ * removing the target account from the follower's follow list.
978
+ *
979
+ * @param username - The username of the follower (required for broadcast)
980
+ * @param auth - Authentication context with platform adapter and fallback configuration
981
+ *
982
+ * @returns React Query mutation result
983
+ *
984
+ * @remarks
985
+ * **Post-Broadcast Actions:**
986
+ * - Invalidates relationship cache to show updated follow status
987
+ * - Invalidates account cache to refetch updated follower/following counts
988
+ *
989
+ * @example
990
+ * ```typescript
991
+ * const unfollowMutation = useUnfollow(username, {
992
+ * adapter: myAdapter,
993
+ * enableFallback: true,
994
+ * fallbackChain: ['keychain', 'key', 'hivesigner']
995
+ * });
996
+ *
997
+ * // Unfollow an account
998
+ * unfollowMutation.mutate({
999
+ * following: 'alice'
1000
+ * });
1001
+ * ```
1002
+ */
1003
+ declare function useUnfollow(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, UnfollowPayload, unknown>;
1004
+
450
1005
  interface Payload$3 {
451
1006
  author: string;
452
1007
  permlink: string;
@@ -834,7 +1389,204 @@ declare function getAccountSubscriptionsQueryOptions(username: string | undefine
834
1389
  };
835
1390
  };
836
1391
 
837
- declare function useBroadcastMutation<T>(mutationKey: MutationKey | undefined, username: string | undefined, operations: (payload: T) => Operation[], onSuccess?: UseMutationOptions<unknown, Error, T>["onSuccess"], auth?: AuthContext): _tanstack_react_query.UseMutationResult<unknown, Error, T, unknown>;
1392
+ /**
1393
+ * Authority levels for Hive blockchain operations.
1394
+ * - posting: Social operations (voting, commenting, reblogging)
1395
+ * - active: Financial and account management operations
1396
+ * - owner: Critical security operations (key changes, account recovery)
1397
+ * - memo: Memo encryption/decryption (rarely used for signing)
1398
+ */
1399
+ type AuthorityLevel = 'posting' | 'active' | 'owner' | 'memo';
1400
+ /**
1401
+ * Maps operation types to their required authority level.
1402
+ *
1403
+ * This mapping is used to determine which key is needed to sign a transaction,
1404
+ * enabling smart auth fallback and auth upgrade UI.
1405
+ *
1406
+ * @remarks
1407
+ * - Most social operations (vote, comment, reblog) require posting authority
1408
+ * - Financial operations (transfer, withdraw) require active authority
1409
+ * - Account management operations require active authority
1410
+ * - Security operations (password change, account recovery) require owner authority
1411
+ * - custom_json requires dynamic detection based on required_auths vs required_posting_auths
1412
+ */
1413
+ declare const OPERATION_AUTHORITY_MAP: Record<string, AuthorityLevel>;
1414
+ /**
1415
+ * Determines authority required for a custom_json operation.
1416
+ *
1417
+ * Custom JSON operations can require either posting or active authority
1418
+ * depending on which field is populated:
1419
+ * - required_auths (active authority)
1420
+ * - required_posting_auths (posting authority)
1421
+ *
1422
+ * @param customJsonOp - The custom_json operation to inspect
1423
+ * @returns 'active' if requires active authority, 'posting' if requires posting authority
1424
+ *
1425
+ * @example
1426
+ * ```typescript
1427
+ * // Reblog operation (posting authority)
1428
+ * const reblogOp: Operation = ['custom_json', {
1429
+ * required_auths: [],
1430
+ * required_posting_auths: ['alice'],
1431
+ * id: 'reblog',
1432
+ * json: '...'
1433
+ * }];
1434
+ * getCustomJsonAuthority(reblogOp); // Returns 'posting'
1435
+ *
1436
+ * // Some active authority custom_json
1437
+ * const activeOp: Operation = ['custom_json', {
1438
+ * required_auths: ['alice'],
1439
+ * required_posting_auths: [],
1440
+ * id: 'some_active_op',
1441
+ * json: '...'
1442
+ * }];
1443
+ * getCustomJsonAuthority(activeOp); // Returns 'active'
1444
+ * ```
1445
+ */
1446
+ declare function getCustomJsonAuthority(customJsonOp: Operation): AuthorityLevel;
1447
+ /**
1448
+ * Determines authority required for a proposal operation.
1449
+ *
1450
+ * Proposal operations (create_proposal, update_proposal) typically require
1451
+ * active authority as they involve financial commitments and funding allocations.
1452
+ *
1453
+ * @param proposalOp - The proposal operation to inspect
1454
+ * @returns 'active' authority requirement
1455
+ *
1456
+ * @remarks
1457
+ * Unlike custom_json, proposal operations don't have explicit required_auths fields.
1458
+ * They always use the creator's authority, which defaults to active for financial
1459
+ * operations involving the DAO treasury.
1460
+ *
1461
+ * @example
1462
+ * ```typescript
1463
+ * const proposalOp: Operation = ['create_proposal', {
1464
+ * creator: 'alice',
1465
+ * receiver: 'bob',
1466
+ * subject: 'My Proposal',
1467
+ * permlink: 'my-proposal',
1468
+ * start: '2026-03-01T00:00:00',
1469
+ * end: '2026-04-01T00:00:00',
1470
+ * daily_pay: '100.000 HBD',
1471
+ * extensions: []
1472
+ * }];
1473
+ * getProposalAuthority(proposalOp); // Returns 'active'
1474
+ * ```
1475
+ */
1476
+ declare function getProposalAuthority(proposalOp: Operation): AuthorityLevel;
1477
+ /**
1478
+ * Determines the required authority level for any operation.
1479
+ *
1480
+ * Uses the OPERATION_AUTHORITY_MAP for standard operations, and dynamic
1481
+ * detection for custom_json operations.
1482
+ *
1483
+ * @param op - The operation to check
1484
+ * @returns 'posting' or 'active' authority requirement
1485
+ *
1486
+ * @example
1487
+ * ```typescript
1488
+ * const voteOp: Operation = ['vote', { voter: 'alice', author: 'bob', permlink: 'post', weight: 10000 }];
1489
+ * getOperationAuthority(voteOp); // Returns 'posting'
1490
+ *
1491
+ * const transferOp: Operation = ['transfer', { from: 'alice', to: 'bob', amount: '1.000 HIVE', memo: '' }];
1492
+ * getOperationAuthority(transferOp); // Returns 'active'
1493
+ * ```
1494
+ */
1495
+ declare function getOperationAuthority(op: Operation): AuthorityLevel;
1496
+ /**
1497
+ * Determines the highest authority level required for a list of operations.
1498
+ *
1499
+ * Useful when broadcasting multiple operations together - the highest authority
1500
+ * level required by any operation determines what key is needed for the batch.
1501
+ *
1502
+ * Authority hierarchy: owner > active > posting > memo
1503
+ *
1504
+ * @param ops - Array of operations
1505
+ * @returns Highest authority level required ('owner', 'active', or 'posting')
1506
+ *
1507
+ * @example
1508
+ * ```typescript
1509
+ * const ops: Operation[] = [
1510
+ * ['vote', { ... }], // posting
1511
+ * ['comment', { ... }], // posting
1512
+ * ];
1513
+ * getRequiredAuthority(ops); // Returns 'posting'
1514
+ *
1515
+ * const mixedOps: Operation[] = [
1516
+ * ['comment', { ... }], // posting
1517
+ * ['transfer', { ... }], // active
1518
+ * ];
1519
+ * getRequiredAuthority(mixedOps); // Returns 'active'
1520
+ *
1521
+ * const securityOps: Operation[] = [
1522
+ * ['transfer', { ... }], // active
1523
+ * ['change_recovery_account', { ... }], // owner
1524
+ * ];
1525
+ * getRequiredAuthority(securityOps); // Returns 'owner'
1526
+ * ```
1527
+ */
1528
+ declare function getRequiredAuthority(ops: Operation[]): AuthorityLevel;
1529
+
1530
+ /**
1531
+ * React Query mutation hook for broadcasting Hive operations.
1532
+ * Supports multiple authentication methods with automatic fallback.
1533
+ *
1534
+ * @template T - Type of the mutation payload
1535
+ * @param mutationKey - React Query mutation key for cache management
1536
+ * @param username - Hive username (required for broadcast)
1537
+ * @param operations - Function that converts payload to Hive operations
1538
+ * @param onSuccess - Success callback after broadcast completes
1539
+ * @param auth - Authentication context (supports both legacy AuthContext and new AuthContextV2)
1540
+ * @param authority - Key authority to use ('posting' | 'active' | 'owner' | 'memo'), defaults to 'posting'
1541
+ *
1542
+ * @returns React Query mutation result
1543
+ *
1544
+ * @remarks
1545
+ * **Authentication Flow:**
1546
+ *
1547
+ * 1. **With AuthContextV2 + adapter + enableFallback** (recommended for new code):
1548
+ * - Tries auth methods in fallbackChain order
1549
+ * - Smart fallback: only retries on auth errors, not RC/network errors
1550
+ * - Uses platform adapter for storage, UI, and broadcasting
1551
+ *
1552
+ * 2. **With legacy AuthContext** (backward compatible):
1553
+ * - Tries auth.broadcast() first (custom implementation)
1554
+ * - Falls back to postingKey if available
1555
+ * - Falls back to accessToken (HiveSigner) if available
1556
+ * - Throws if no auth method available
1557
+ *
1558
+ * **Backward Compatibility:**
1559
+ * - All existing code using AuthContext will continue to work
1560
+ * - AuthContextV2 extends AuthContext, so it's a drop-in replacement
1561
+ * - enableFallback defaults to false if no adapter provided
1562
+ *
1563
+ * @example
1564
+ * ```typescript
1565
+ * // New pattern with platform adapter and fallback
1566
+ * const mutation = useBroadcastMutation(
1567
+ * ['vote'],
1568
+ * username,
1569
+ * (payload) => [voteOperation(payload)],
1570
+ * () => console.log('Success!'),
1571
+ * {
1572
+ * adapter: myAdapter,
1573
+ * enableFallback: true,
1574
+ * fallbackChain: ['keychain', 'key', 'hivesigner']
1575
+ * },
1576
+ * 'posting'
1577
+ * );
1578
+ *
1579
+ * // Legacy pattern (still works)
1580
+ * const mutation = useBroadcastMutation(
1581
+ * ['vote'],
1582
+ * username,
1583
+ * (payload) => [voteOperation(payload)],
1584
+ * () => console.log('Success!'),
1585
+ * { postingKey: 'wif-key' }
1586
+ * );
1587
+ * ```
1588
+ */
1589
+ declare function useBroadcastMutation<T>(mutationKey: MutationKey | undefined, username: string | undefined, operations: (payload: T) => Operation[], onSuccess?: UseMutationOptions<unknown, Error, T>["onSuccess"], auth?: AuthContextV2, authority?: AuthorityLevel): _tanstack_react_query.UseMutationResult<unknown, Error, T, unknown>;
838
1590
 
839
1591
  declare function broadcastJson<T>(username: string | undefined, id: string, payload: T, auth?: AuthContext): Promise<any>;
840
1592
 
@@ -890,6 +1642,121 @@ declare namespace ConfigManager {
890
1642
  function setDmcaLists(lists?: DmcaListsInput): void;
891
1643
  }
892
1644
 
1645
+ /**
1646
+ * Chain error handling utilities
1647
+ * Extracted from web's operations.ts and mobile's dhive.ts error handling patterns
1648
+ */
1649
+ declare enum ErrorType {
1650
+ COMMON = "common",
1651
+ INFO = "info",
1652
+ INSUFFICIENT_RESOURCE_CREDITS = "insufficient_resource_credits",
1653
+ MISSING_AUTHORITY = "missing_authority",
1654
+ TOKEN_EXPIRED = "token_expired",
1655
+ NETWORK = "network",
1656
+ TIMEOUT = "timeout",
1657
+ VALIDATION = "validation"
1658
+ }
1659
+ interface ParsedChainError {
1660
+ message: string;
1661
+ type: ErrorType;
1662
+ originalError?: any;
1663
+ }
1664
+ /**
1665
+ * Parses Hive blockchain errors into standardized format.
1666
+ * Extracted from web's operations.ts and mobile's dhive.ts error handling.
1667
+ *
1668
+ * @param error - The error object or string from a blockchain operation
1669
+ * @returns Parsed error with user-friendly message and categorized type
1670
+ *
1671
+ * @example
1672
+ * ```typescript
1673
+ * try {
1674
+ * await vote(...);
1675
+ * } catch (error) {
1676
+ * const parsed = parseChainError(error);
1677
+ * console.log(parsed.message); // "Insufficient Resource Credits. Please wait or power up."
1678
+ * console.log(parsed.type); // ErrorType.INSUFFICIENT_RESOURCE_CREDITS
1679
+ * }
1680
+ * ```
1681
+ */
1682
+ declare function parseChainError(error: any): ParsedChainError;
1683
+ /**
1684
+ * Formats error for display to user.
1685
+ * Returns tuple of [message, type] for backward compatibility with existing code.
1686
+ *
1687
+ * This function maintains compatibility with the old formatError signature from
1688
+ * web's operations.ts (line 59-84) and mobile's dhive.ts error handling.
1689
+ *
1690
+ * @param error - The error object or string
1691
+ * @returns Tuple of [user-friendly message, error type]
1692
+ *
1693
+ * @example
1694
+ * ```typescript
1695
+ * try {
1696
+ * await transfer(...);
1697
+ * } catch (error) {
1698
+ * const [message, type] = formatError(error);
1699
+ * showToast(message, type);
1700
+ * }
1701
+ * ```
1702
+ */
1703
+ declare function formatError(error: any): [string, ErrorType];
1704
+ /**
1705
+ * Checks if error indicates missing authority and should trigger auth fallback.
1706
+ * Used by the SDK's useBroadcastMutation to determine if it should retry with
1707
+ * an alternate authentication method.
1708
+ *
1709
+ * @param error - The error object or string
1710
+ * @returns true if auth fallback should be attempted
1711
+ *
1712
+ * @example
1713
+ * ```typescript
1714
+ * try {
1715
+ * await broadcast(operations);
1716
+ * } catch (error) {
1717
+ * if (shouldTriggerAuthFallback(error)) {
1718
+ * // Try with alternate auth method
1719
+ * await broadcastWithHiveAuth(operations);
1720
+ * }
1721
+ * }
1722
+ * ```
1723
+ */
1724
+ declare function shouldTriggerAuthFallback(error: any): boolean;
1725
+ /**
1726
+ * Checks if error is a resource credits (RC) error.
1727
+ * Useful for showing specific UI feedback about RC issues.
1728
+ *
1729
+ * @param error - The error object or string
1730
+ * @returns true if the error is related to insufficient RC
1731
+ *
1732
+ * @example
1733
+ * ```typescript
1734
+ * try {
1735
+ * await vote(...);
1736
+ * } catch (error) {
1737
+ * if (isResourceCreditsError(error)) {
1738
+ * showRCWarning(); // Show specific RC education/power up UI
1739
+ * }
1740
+ * }
1741
+ * ```
1742
+ */
1743
+ declare function isResourceCreditsError(error: any): boolean;
1744
+ /**
1745
+ * Checks if error is informational (not critical).
1746
+ * Informational errors typically don't need retry logic.
1747
+ *
1748
+ * @param error - The error object or string
1749
+ * @returns true if the error is informational
1750
+ */
1751
+ declare function isInfoError(error: any): boolean;
1752
+ /**
1753
+ * Checks if error is network-related and should be retried.
1754
+ *
1755
+ * @param error - The error object or string
1756
+ * @returns true if the error is network-related
1757
+ */
1758
+ declare function isNetworkError(error: any): boolean;
1759
+
893
1760
  declare function makeQueryClient(): QueryClient;
894
1761
  declare const getQueryClient: () => QueryClient;
895
1762
  declare namespace EcencyQueriesManager {
@@ -1337,72 +2204,707 @@ interface Schedule {
1337
2204
  message: string | null;
1338
2205
  }
1339
2206
 
1340
- interface UserImage {
1341
- created: string;
1342
- timestamp: number;
1343
- url: string;
1344
- _id: string;
2207
+ interface UserImage {
2208
+ created: string;
2209
+ timestamp: number;
2210
+ url: string;
2211
+ _id: string;
2212
+ }
2213
+
2214
+ interface VoteHistoryPageParam {
2215
+ start: number;
2216
+ }
2217
+ interface VoteHistoryPage {
2218
+ lastDate: number;
2219
+ lastItemFetched: number;
2220
+ entries: Entry$1[];
2221
+ }
2222
+ /**
2223
+ * Get account vote history with entries
2224
+ *
2225
+ * @param username - Account name to get vote history for
2226
+ * @param limit - Number of history items per page (default: 20)
2227
+ * @param filters - Additional filters to pass to get_account_history
2228
+ * @param dayLimit - Only include votes from last N days (default: 7)
2229
+ */
2230
+ declare function getAccountVoteHistoryInfiniteQueryOptions<F>(username: string, options?: {
2231
+ limit?: number;
2232
+ filters?: F[];
2233
+ dayLimit?: number;
2234
+ }): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseInfiniteQueryOptions<VoteHistoryPage, Error, VoteHistoryPage, (string | number)[], VoteHistoryPageParam>, "queryFn"> & {
2235
+ queryFn?: _tanstack_react_query.QueryFunction<VoteHistoryPage, (string | number)[], VoteHistoryPageParam> | undefined;
2236
+ } & {
2237
+ queryKey: (string | number)[] & {
2238
+ [dataTagSymbol]: _tanstack_react_query.InfiniteData<VoteHistoryPage, unknown>;
2239
+ [dataTagErrorSymbol]: Error;
2240
+ };
2241
+ };
2242
+
2243
+ declare function getProfilesQueryOptions(accounts: string[], observer?: string, enabled?: boolean): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<Profile[], Error, Profile[], (string | string[])[]>, "queryFn"> & {
2244
+ queryFn?: _tanstack_react_query.QueryFunction<Profile[], (string | string[])[], never> | undefined;
2245
+ } & {
2246
+ queryKey: (string | string[])[] & {
2247
+ [dataTagSymbol]: Profile[];
2248
+ [dataTagErrorSymbol]: Error;
2249
+ };
2250
+ };
2251
+
2252
+ type ProfileTokens = AccountProfile["tokens"];
2253
+ interface BuildProfileMetadataArgs {
2254
+ existingProfile?: AccountProfile;
2255
+ profile?: Partial<AccountProfile> | null;
2256
+ tokens?: ProfileTokens | null;
2257
+ }
2258
+ declare function parseProfileMetadata(postingJsonMetadata?: string | null): AccountProfile;
2259
+ declare function extractAccountProfile(data?: Pick<FullAccount, "posting_json_metadata"> | null): AccountProfile;
2260
+ declare function buildProfileMetadata({ existingProfile, profile, tokens, }: BuildProfileMetadataArgs): AccountProfile;
2261
+
2262
+ /**
2263
+ * Parses raw account data from Hive API into FullAccount type
2264
+ * Handles profile metadata extraction from posting_json_metadata or json_metadata
2265
+ */
2266
+ declare function parseAccounts(rawAccounts: any[]): FullAccount[];
2267
+
2268
+ declare function votingPower(account: FullAccount): number;
2269
+ declare function powerRechargeTime(power: number): number;
2270
+ declare function downVotingPower(account: FullAccount): number;
2271
+ declare function rcPower(account: RCAccount): number;
2272
+ declare function votingValue(account: FullAccount, dynamicProps: DynamicProps, votingPowerValue: number, weight?: number): number;
2273
+
2274
+ /**
2275
+ * Content Operations
2276
+ * Operations for creating, voting, and managing content on Hive blockchain
2277
+ */
2278
+ /**
2279
+ * Builds a vote operation.
2280
+ * @param voter - Account casting the vote
2281
+ * @param author - Author of the post/comment
2282
+ * @param permlink - Permlink of the post/comment
2283
+ * @param weight - Vote weight (-10000 to 10000, where 10000 = 100% upvote, -10000 = 100% downvote)
2284
+ * @returns Vote operation
2285
+ */
2286
+ declare function buildVoteOp(voter: string, author: string, permlink: string, weight: number): Operation;
2287
+ /**
2288
+ * Builds a comment operation (for posts or replies).
2289
+ * @param author - Author of the comment/post
2290
+ * @param permlink - Permlink of the comment/post
2291
+ * @param parentAuthor - Parent author (empty string for top-level posts)
2292
+ * @param parentPermlink - Parent permlink (category/tag for top-level posts)
2293
+ * @param title - Title of the post (empty for comments)
2294
+ * @param body - Content body (required - cannot be empty)
2295
+ * @param jsonMetadata - JSON metadata object
2296
+ * @returns Comment operation
2297
+ */
2298
+ declare function buildCommentOp(author: string, permlink: string, parentAuthor: string, parentPermlink: string, title: string, body: string, jsonMetadata: Record<string, any>): Operation;
2299
+ /**
2300
+ * Builds a comment options operation (for setting beneficiaries, rewards, etc.).
2301
+ * @param author - Author of the comment/post
2302
+ * @param permlink - Permlink of the comment/post
2303
+ * @param maxAcceptedPayout - Maximum accepted payout (e.g., "1000000.000 HBD")
2304
+ * @param percentHbd - Percent of payout in HBD (10000 = 100%)
2305
+ * @param allowVotes - Allow votes on this content
2306
+ * @param allowCurationRewards - Allow curation rewards
2307
+ * @param extensions - Extensions array (for beneficiaries, etc.)
2308
+ * @returns Comment options operation
2309
+ */
2310
+ declare function buildCommentOptionsOp(author: string, permlink: string, maxAcceptedPayout: string, percentHbd: number, allowVotes: boolean, allowCurationRewards: boolean, extensions: any[]): Operation;
2311
+ /**
2312
+ * Builds a delete comment operation.
2313
+ * @param author - Author of the comment/post to delete
2314
+ * @param permlink - Permlink of the comment/post to delete
2315
+ * @returns Delete comment operation
2316
+ */
2317
+ declare function buildDeleteCommentOp(author: string, permlink: string): Operation;
2318
+ /**
2319
+ * Builds a reblog operation (custom_json).
2320
+ * @param account - Account performing the reblog
2321
+ * @param author - Original post author
2322
+ * @param permlink - Original post permlink
2323
+ * @param deleteReblog - If true, removes the reblog
2324
+ * @returns Custom JSON operation for reblog
2325
+ */
2326
+ declare function buildReblogOp(account: string, author: string, permlink: string, deleteReblog?: boolean): Operation;
2327
+
2328
+ /**
2329
+ * Wallet Operations
2330
+ * Operations for managing tokens, savings, vesting, and conversions
2331
+ */
2332
+ /**
2333
+ * Builds a transfer operation.
2334
+ * @param from - Sender account
2335
+ * @param to - Receiver account
2336
+ * @param amount - Amount with asset symbol (e.g., "1.000 HIVE")
2337
+ * @param memo - Transfer memo
2338
+ * @returns Transfer operation
2339
+ */
2340
+ declare function buildTransferOp(from: string, to: string, amount: string, memo: string): Operation;
2341
+ /**
2342
+ * Builds multiple transfer operations for multiple recipients.
2343
+ * @param from - Sender account
2344
+ * @param destinations - Comma or space separated list of recipient accounts
2345
+ * @param amount - Amount with asset symbol (e.g., "1.000 HIVE")
2346
+ * @param memo - Transfer memo
2347
+ * @returns Array of transfer operations
2348
+ */
2349
+ declare function buildMultiTransferOps(from: string, destinations: string, amount: string, memo: string): Operation[];
2350
+ /**
2351
+ * Builds a recurrent transfer operation.
2352
+ * @param from - Sender account
2353
+ * @param to - Receiver account
2354
+ * @param amount - Amount with asset symbol (e.g., "1.000 HIVE")
2355
+ * @param memo - Transfer memo
2356
+ * @param recurrence - Recurrence in hours
2357
+ * @param executions - Number of executions (2 = executes twice)
2358
+ * @returns Recurrent transfer operation
2359
+ */
2360
+ declare function buildRecurrentTransferOp(from: string, to: string, amount: string, memo: string, recurrence: number, executions: number): Operation;
2361
+ /**
2362
+ * Builds a transfer to savings operation.
2363
+ * @param from - Sender account
2364
+ * @param to - Receiver account
2365
+ * @param amount - Amount with asset symbol (e.g., "1.000 HIVE")
2366
+ * @param memo - Transfer memo
2367
+ * @returns Transfer to savings operation
2368
+ */
2369
+ declare function buildTransferToSavingsOp(from: string, to: string, amount: string, memo: string): Operation;
2370
+ /**
2371
+ * Builds a transfer from savings operation.
2372
+ * @param from - Sender account
2373
+ * @param to - Receiver account
2374
+ * @param amount - Amount with asset symbol (e.g., "1.000 HIVE")
2375
+ * @param memo - Transfer memo
2376
+ * @param requestId - Unique request ID (use timestamp)
2377
+ * @returns Transfer from savings operation
2378
+ */
2379
+ declare function buildTransferFromSavingsOp(from: string, to: string, amount: string, memo: string, requestId: number): Operation;
2380
+ /**
2381
+ * Builds a cancel transfer from savings operation.
2382
+ * @param from - Account that initiated the savings withdrawal
2383
+ * @param requestId - Request ID to cancel
2384
+ * @returns Cancel transfer from savings operation
2385
+ */
2386
+ declare function buildCancelTransferFromSavingsOp(from: string, requestId: number): Operation;
2387
+ /**
2388
+ * Builds operations to claim savings interest.
2389
+ * Creates a transfer_from_savings and immediately cancels it to claim interest.
2390
+ * @param from - Account claiming interest
2391
+ * @param to - Receiver account
2392
+ * @param amount - Amount with asset symbol (e.g., "0.001 HIVE")
2393
+ * @param memo - Transfer memo
2394
+ * @param requestId - Unique request ID
2395
+ * @returns Array of operations [transfer_from_savings, cancel_transfer_from_savings]
2396
+ */
2397
+ declare function buildClaimInterestOps(from: string, to: string, amount: string, memo: string, requestId: number): Operation[];
2398
+ /**
2399
+ * Builds a transfer to vesting operation (power up).
2400
+ * @param from - Account sending HIVE
2401
+ * @param to - Account receiving Hive Power
2402
+ * @param amount - Amount with HIVE symbol (e.g., "1.000 HIVE")
2403
+ * @returns Transfer to vesting operation
2404
+ */
2405
+ declare function buildTransferToVestingOp(from: string, to: string, amount: string): Operation;
2406
+ /**
2407
+ * Builds a withdraw vesting operation (power down).
2408
+ * @param account - Account withdrawing vesting
2409
+ * @param vestingShares - Amount of VESTS to withdraw (e.g., "1.000000 VESTS")
2410
+ * @returns Withdraw vesting operation
2411
+ */
2412
+ declare function buildWithdrawVestingOp(account: string, vestingShares: string): Operation;
2413
+ /**
2414
+ * Builds a delegate vesting shares operation (HP delegation).
2415
+ * @param delegator - Account delegating HP
2416
+ * @param delegatee - Account receiving HP delegation
2417
+ * @param vestingShares - Amount of VESTS to delegate (e.g., "1000.000000 VESTS")
2418
+ * @returns Delegate vesting shares operation
2419
+ */
2420
+ declare function buildDelegateVestingSharesOp(delegator: string, delegatee: string, vestingShares: string): Operation;
2421
+ /**
2422
+ * Builds a set withdraw vesting route operation.
2423
+ * @param fromAccount - Account withdrawing vesting
2424
+ * @param toAccount - Account receiving withdrawn vesting
2425
+ * @param percent - Percentage to route (0-10000, where 10000 = 100%)
2426
+ * @param autoVest - Auto convert to vesting
2427
+ * @returns Set withdraw vesting route operation
2428
+ */
2429
+ declare function buildSetWithdrawVestingRouteOp(fromAccount: string, toAccount: string, percent: number, autoVest: boolean): Operation;
2430
+ /**
2431
+ * Builds a convert operation (HBD to HIVE).
2432
+ * @param owner - Account converting HBD
2433
+ * @param amount - Amount of HBD to convert (e.g., "1.000 HBD")
2434
+ * @param requestId - Unique request ID (use timestamp)
2435
+ * @returns Convert operation
2436
+ */
2437
+ declare function buildConvertOp(owner: string, amount: string, requestId: number): Operation;
2438
+ /**
2439
+ * Builds a collateralized convert operation (HIVE to HBD via collateral).
2440
+ * @param owner - Account converting HIVE
2441
+ * @param amount - Amount of HIVE to convert (e.g., "1.000 HIVE")
2442
+ * @param requestId - Unique request ID (use timestamp)
2443
+ * @returns Collateralized convert operation
2444
+ */
2445
+ declare function buildCollateralizedConvertOp(owner: string, amount: string, requestId: number): Operation;
2446
+ /**
2447
+ * Builds a delegate RC operation (custom_json).
2448
+ * @param from - Account delegating RC
2449
+ * @param delegatees - Single delegatee or comma-separated list
2450
+ * @param maxRc - Maximum RC to delegate (in mana units)
2451
+ * @returns Custom JSON operation for RC delegation
2452
+ */
2453
+ declare function buildDelegateRcOp(from: string, delegatees: string, maxRc: string | number): Operation;
2454
+
2455
+ /**
2456
+ * Social Operations
2457
+ * Operations for following, muting, and managing social relationships
2458
+ */
2459
+ /**
2460
+ * Builds a follow operation (custom_json).
2461
+ * @param follower - Account following
2462
+ * @param following - Account to follow
2463
+ * @returns Custom JSON operation for follow
2464
+ */
2465
+ declare function buildFollowOp(follower: string, following: string): Operation;
2466
+ /**
2467
+ * Builds an unfollow operation (custom_json).
2468
+ * @param follower - Account unfollowing
2469
+ * @param following - Account to unfollow
2470
+ * @returns Custom JSON operation for unfollow
2471
+ */
2472
+ declare function buildUnfollowOp(follower: string, following: string): Operation;
2473
+ /**
2474
+ * Builds an ignore/mute operation (custom_json).
2475
+ * @param follower - Account ignoring
2476
+ * @param following - Account to ignore
2477
+ * @returns Custom JSON operation for ignore
2478
+ */
2479
+ declare function buildIgnoreOp(follower: string, following: string): Operation;
2480
+ /**
2481
+ * Builds an unignore/unmute operation (custom_json).
2482
+ * @param follower - Account unignoring
2483
+ * @param following - Account to unignore
2484
+ * @returns Custom JSON operation for unignore
2485
+ */
2486
+ declare function buildUnignoreOp(follower: string, following: string): Operation;
2487
+ /**
2488
+ * Builds a Hive Notify set last read operation (custom_json).
2489
+ * @param username - Account setting last read
2490
+ * @param date - ISO date string (defaults to now)
2491
+ * @returns Array of custom JSON operations for setting last read
2492
+ */
2493
+ declare function buildSetLastReadOps(username: string, date?: string): Operation[];
2494
+
2495
+ /**
2496
+ * Governance Operations
2497
+ * Operations for witness voting, proposals, and proxy management
2498
+ */
2499
+ /**
2500
+ * Builds an account witness vote operation.
2501
+ * @param account - Account voting
2502
+ * @param witness - Witness account name
2503
+ * @param approve - True to approve, false to disapprove
2504
+ * @returns Account witness vote operation
2505
+ */
2506
+ declare function buildWitnessVoteOp(account: string, witness: string, approve: boolean): Operation;
2507
+ /**
2508
+ * Builds an account witness proxy operation.
2509
+ * @param account - Account setting proxy
2510
+ * @param proxy - Proxy account name (empty string to remove proxy)
2511
+ * @returns Account witness proxy operation
2512
+ */
2513
+ declare function buildWitnessProxyOp(account: string, proxy: string): Operation;
2514
+ /**
2515
+ * Payload for proposal creation
2516
+ */
2517
+ interface ProposalCreatePayload {
2518
+ receiver: string;
2519
+ subject: string;
2520
+ permlink: string;
2521
+ start: string;
2522
+ end: string;
2523
+ dailyPay: string;
2524
+ }
2525
+ /**
2526
+ * Builds a create proposal operation.
2527
+ * @param creator - Account creating the proposal
2528
+ * @param payload - Proposal details (must include start, end, and dailyPay)
2529
+ * @returns Create proposal operation
2530
+ */
2531
+ declare function buildProposalCreateOp(creator: string, payload: ProposalCreatePayload): Operation;
2532
+ /**
2533
+ * Builds an update proposal votes operation.
2534
+ * @param voter - Account voting
2535
+ * @param proposalIds - Array of proposal IDs
2536
+ * @param approve - True to approve, false to disapprove
2537
+ * @returns Update proposal votes operation
2538
+ */
2539
+ declare function buildProposalVoteOp(voter: string, proposalIds: number[], approve: boolean): Operation;
2540
+ /**
2541
+ * Builds a remove proposal operation.
2542
+ * @param proposalOwner - Owner of the proposal
2543
+ * @param proposalIds - Array of proposal IDs to remove
2544
+ * @returns Remove proposal operation
2545
+ */
2546
+ declare function buildRemoveProposalOp(proposalOwner: string, proposalIds: number[]): Operation;
2547
+ /**
2548
+ * Builds an update proposal operation.
2549
+ * @param proposalId - Proposal ID to update (must be a valid number, including 0)
2550
+ * @param creator - Account that created the proposal
2551
+ * @param dailyPay - New daily pay amount
2552
+ * @param subject - New subject
2553
+ * @param permlink - New permlink
2554
+ * @returns Update proposal operation
2555
+ */
2556
+ declare function buildUpdateProposalOp(proposalId: number, creator: string, dailyPay: string, subject: string, permlink: string): Operation;
2557
+
2558
+ /**
2559
+ * Community Operations
2560
+ * Operations for managing Hive communities
2561
+ */
2562
+ /**
2563
+ * Builds a subscribe to community operation (custom_json).
2564
+ * @param username - Account subscribing
2565
+ * @param community - Community name (e.g., "hive-123456")
2566
+ * @returns Custom JSON operation for subscribe
2567
+ */
2568
+ declare function buildSubscribeOp(username: string, community: string): Operation;
2569
+ /**
2570
+ * Builds an unsubscribe from community operation (custom_json).
2571
+ * @param username - Account unsubscribing
2572
+ * @param community - Community name (e.g., "hive-123456")
2573
+ * @returns Custom JSON operation for unsubscribe
2574
+ */
2575
+ declare function buildUnsubscribeOp(username: string, community: string): Operation;
2576
+ /**
2577
+ * Builds a set user role in community operation (custom_json).
2578
+ * @param username - Account setting the role (must have permission)
2579
+ * @param community - Community name (e.g., "hive-123456")
2580
+ * @param account - Account to set role for
2581
+ * @param role - Role name (e.g., "admin", "mod", "member", "guest")
2582
+ * @returns Custom JSON operation for setRole
2583
+ */
2584
+ declare function buildSetRoleOp(username: string, community: string, account: string, role: string): Operation;
2585
+ /**
2586
+ * Community properties for update
2587
+ */
2588
+ interface CommunityProps {
2589
+ title: string;
2590
+ about: string;
2591
+ lang: string;
2592
+ description: string;
2593
+ flag_text: string;
2594
+ is_nsfw: boolean;
1345
2595
  }
2596
+ /**
2597
+ * Builds an update community properties operation (custom_json).
2598
+ * @param username - Account updating (must be community admin)
2599
+ * @param community - Community name (e.g., "hive-123456")
2600
+ * @param props - Properties to update
2601
+ * @returns Custom JSON operation for updateProps
2602
+ */
2603
+ declare function buildUpdateCommunityOp(username: string, community: string, props: CommunityProps): Operation;
2604
+ /**
2605
+ * Builds a pin/unpin post in community operation (custom_json).
2606
+ * @param username - Account pinning (must have permission)
2607
+ * @param community - Community name (e.g., "hive-123456")
2608
+ * @param account - Post author
2609
+ * @param permlink - Post permlink
2610
+ * @param pin - True to pin, false to unpin
2611
+ * @returns Custom JSON operation for pinPost/unpinPost
2612
+ */
2613
+ declare function buildPinPostOp(username: string, community: string, account: string, permlink: string, pin: boolean): Operation;
2614
+ /**
2615
+ * Builds a mute/unmute post in community operation (custom_json).
2616
+ * @param username - Account muting (must have permission)
2617
+ * @param community - Community name (e.g., "hive-123456")
2618
+ * @param account - Post author
2619
+ * @param permlink - Post permlink
2620
+ * @param notes - Mute reason/notes
2621
+ * @param mute - True to mute, false to unmute
2622
+ * @returns Custom JSON operation for mutePost/unmutePost
2623
+ */
2624
+ declare function buildMutePostOp(username: string, community: string, account: string, permlink: string, notes: string, mute: boolean): Operation;
2625
+ /**
2626
+ * Builds a mute/unmute user in community operation (custom_json).
2627
+ * @param username - Account performing mute (must have permission)
2628
+ * @param community - Community name (e.g., "hive-123456")
2629
+ * @param account - Account to mute/unmute
2630
+ * @param notes - Mute reason/notes
2631
+ * @param mute - True to mute, false to unmute
2632
+ * @returns Custom JSON operation for muteUser/unmuteUser
2633
+ */
2634
+ declare function buildMuteUserOp(username: string, community: string, account: string, notes: string, mute: boolean): Operation;
2635
+ /**
2636
+ * Builds a flag post in community operation (custom_json).
2637
+ * @param username - Account flagging
2638
+ * @param community - Community name (e.g., "hive-123456")
2639
+ * @param account - Post author
2640
+ * @param permlink - Post permlink
2641
+ * @param notes - Flag reason/notes
2642
+ * @returns Custom JSON operation for flagPost
2643
+ */
2644
+ declare function buildFlagPostOp(username: string, community: string, account: string, permlink: string, notes: string): Operation;
1346
2645
 
1347
- interface VoteHistoryPageParam {
1348
- start: number;
2646
+ /**
2647
+ * Market Operations
2648
+ * Operations for trading on the internal Hive market
2649
+ */
2650
+ /**
2651
+ * Transaction type for buy/sell operations
2652
+ */
2653
+ declare enum BuySellTransactionType {
2654
+ Buy = "buy",
2655
+ Sell = "sell"
1349
2656
  }
1350
- interface VoteHistoryPage {
1351
- lastDate: number;
1352
- lastItemFetched: number;
1353
- entries: Entry$1[];
2657
+ /**
2658
+ * Order ID prefix for different order types
2659
+ */
2660
+ declare enum OrderIdPrefix {
2661
+ EMPTY = "",
2662
+ SWAP = "9"
1354
2663
  }
1355
2664
  /**
1356
- * Get account vote history with entries
2665
+ * Builds a limit order create operation.
2666
+ * @param owner - Account creating the order
2667
+ * @param amountToSell - Amount and asset to sell
2668
+ * @param minToReceive - Minimum amount and asset to receive
2669
+ * @param fillOrKill - If true, order must be filled immediately or cancelled
2670
+ * @param expiration - Expiration date (ISO string)
2671
+ * @param orderId - Unique order ID
2672
+ * @returns Limit order create operation
2673
+ */
2674
+ declare function buildLimitOrderCreateOp(owner: string, amountToSell: string, minToReceive: string, fillOrKill: boolean, expiration: string, orderId: number): Operation;
2675
+ /**
2676
+ * Builds a limit order create operation with automatic formatting.
2677
+ * This is a convenience method that handles buy/sell logic and formatting.
1357
2678
  *
1358
- * @param username - Account name to get vote history for
1359
- * @param limit - Number of history items per page (default: 20)
1360
- * @param filters - Additional filters to pass to get_account_history
1361
- * @param dayLimit - Only include votes from last N days (default: 7)
2679
+ * For Buy orders: You're buying HIVE with HBD
2680
+ * - amountToSell: HBD amount you're spending
2681
+ * - minToReceive: HIVE amount you want to receive
2682
+ *
2683
+ * For Sell orders: You're selling HIVE for HBD
2684
+ * - amountToSell: HIVE amount you're selling
2685
+ * - minToReceive: HBD amount you want to receive
2686
+ *
2687
+ * @param owner - Account creating the order
2688
+ * @param amountToSell - Amount to sell (number)
2689
+ * @param minToReceive - Minimum to receive (number)
2690
+ * @param orderType - Buy or Sell
2691
+ * @param idPrefix - Order ID prefix
2692
+ * @returns Limit order create operation
1362
2693
  */
1363
- declare function getAccountVoteHistoryInfiniteQueryOptions<F>(username: string, options?: {
1364
- limit?: number;
1365
- filters?: F[];
1366
- dayLimit?: number;
1367
- }): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseInfiniteQueryOptions<VoteHistoryPage, Error, VoteHistoryPage, (string | number)[], VoteHistoryPageParam>, "queryFn"> & {
1368
- queryFn?: _tanstack_react_query.QueryFunction<VoteHistoryPage, (string | number)[], VoteHistoryPageParam> | undefined;
1369
- } & {
1370
- queryKey: (string | number)[] & {
1371
- [dataTagSymbol]: _tanstack_react_query.InfiniteData<VoteHistoryPage, unknown>;
1372
- [dataTagErrorSymbol]: Error;
1373
- };
1374
- };
1375
-
1376
- declare function getProfilesQueryOptions(accounts: string[], observer?: string, enabled?: boolean): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<Profile[], Error, Profile[], (string | string[])[]>, "queryFn"> & {
1377
- queryFn?: _tanstack_react_query.QueryFunction<Profile[], (string | string[])[], never> | undefined;
1378
- } & {
1379
- queryKey: (string | string[])[] & {
1380
- [dataTagSymbol]: Profile[];
1381
- [dataTagErrorSymbol]: Error;
1382
- };
1383
- };
2694
+ declare function buildLimitOrderCreateOpWithType(owner: string, amountToSell: number, minToReceive: number, orderType: BuySellTransactionType, idPrefix?: OrderIdPrefix): Operation;
2695
+ /**
2696
+ * Builds a limit order cancel operation.
2697
+ * @param owner - Account cancelling the order
2698
+ * @param orderId - Order ID to cancel
2699
+ * @returns Limit order cancel operation
2700
+ */
2701
+ declare function buildLimitOrderCancelOp(owner: string, orderId: number): Operation;
2702
+ /**
2703
+ * Builds a claim reward balance operation.
2704
+ * @param account - Account claiming rewards
2705
+ * @param rewardHive - HIVE reward to claim (e.g., "0.000 HIVE")
2706
+ * @param rewardHbd - HBD reward to claim (e.g., "0.000 HBD")
2707
+ * @param rewardVests - VESTS reward to claim (e.g., "0.000000 VESTS")
2708
+ * @returns Claim reward balance operation
2709
+ */
2710
+ declare function buildClaimRewardBalanceOp(account: string, rewardHive: string, rewardHbd: string, rewardVests: string): Operation;
1384
2711
 
1385
- type ProfileTokens = AccountProfile["tokens"];
1386
- interface BuildProfileMetadataArgs {
1387
- existingProfile?: AccountProfile;
1388
- profile?: Partial<AccountProfile> | null;
1389
- tokens?: ProfileTokens | null;
2712
+ /**
2713
+ * Account Operations
2714
+ * Operations for managing accounts, keys, and permissions
2715
+ */
2716
+ /**
2717
+ * Authority structure for account operations
2718
+ */
2719
+ interface Authority {
2720
+ weight_threshold: number;
2721
+ account_auths: [string, number][];
2722
+ key_auths: [string, number][];
1390
2723
  }
1391
- declare function parseProfileMetadata(postingJsonMetadata?: string | null): AccountProfile;
1392
- declare function extractAccountProfile(data?: Pick<FullAccount, "posting_json_metadata"> | null): AccountProfile;
1393
- declare function buildProfileMetadata({ existingProfile, profile, tokens, }: BuildProfileMetadataArgs): AccountProfile;
1394
-
1395
2724
  /**
1396
- * Parses raw account data from Hive API into FullAccount type
1397
- * Handles profile metadata extraction from posting_json_metadata or json_metadata
2725
+ * Builds an account update operation.
2726
+ * @param account - Account name
2727
+ * @param owner - Owner authority (optional)
2728
+ * @param active - Active authority (optional)
2729
+ * @param posting - Posting authority (optional)
2730
+ * @param memoKey - Memo public key
2731
+ * @param jsonMetadata - Account JSON metadata
2732
+ * @returns Account update operation
1398
2733
  */
1399
- declare function parseAccounts(rawAccounts: any[]): FullAccount[];
2734
+ declare function buildAccountUpdateOp(account: string, owner: Authority | undefined, active: Authority | undefined, posting: Authority | undefined, memoKey: string, jsonMetadata: string): Operation;
2735
+ /**
2736
+ * Builds an account update2 operation (for posting_json_metadata).
2737
+ * @param account - Account name
2738
+ * @param jsonMetadata - Account JSON metadata (legacy, usually empty)
2739
+ * @param postingJsonMetadata - Posting JSON metadata string
2740
+ * @param extensions - Extensions array
2741
+ * @returns Account update2 operation
2742
+ */
2743
+ declare function buildAccountUpdate2Op(account: string, jsonMetadata: string, postingJsonMetadata: string, extensions: any[]): Operation;
2744
+ /**
2745
+ * Public keys for account creation
2746
+ */
2747
+ interface AccountKeys {
2748
+ ownerPublicKey: string;
2749
+ activePublicKey: string;
2750
+ postingPublicKey: string;
2751
+ memoPublicKey: string;
2752
+ }
2753
+ /**
2754
+ * Builds an account create operation.
2755
+ * @param creator - Creator account name
2756
+ * @param newAccountName - New account name
2757
+ * @param keys - Public keys for the new account
2758
+ * @param fee - Creation fee (e.g., "3.000 HIVE")
2759
+ * @returns Account create operation
2760
+ */
2761
+ declare function buildAccountCreateOp(creator: string, newAccountName: string, keys: AccountKeys, fee: string): Operation;
2762
+ /**
2763
+ * Builds a create claimed account operation (using account creation tokens).
2764
+ * @param creator - Creator account name
2765
+ * @param newAccountName - New account name
2766
+ * @param keys - Public keys for the new account
2767
+ * @returns Create claimed account operation
2768
+ */
2769
+ declare function buildCreateClaimedAccountOp(creator: string, newAccountName: string, keys: AccountKeys): Operation;
2770
+ /**
2771
+ * Builds a claim account operation.
2772
+ * @param creator - Account claiming the token
2773
+ * @param fee - Fee for claiming (usually "0.000 HIVE" for RC-based claims)
2774
+ * @returns Claim account operation
2775
+ */
2776
+ declare function buildClaimAccountOp(creator: string, fee: string): Operation;
2777
+ /**
2778
+ * Builds an operation to grant posting permission to another account.
2779
+ * Helper that modifies posting authority to add an account.
2780
+ * @param account - Account granting permission
2781
+ * @param currentPosting - Current posting authority
2782
+ * @param grantedAccount - Account to grant permission to
2783
+ * @param weightThreshold - Weight threshold of the granted account
2784
+ * @param memoKey - Memo public key (required by Hive blockchain)
2785
+ * @param jsonMetadata - Account JSON metadata (required by Hive blockchain)
2786
+ * @returns Account update operation with modified posting authority
2787
+ */
2788
+ declare function buildGrantPostingPermissionOp(account: string, currentPosting: Authority, grantedAccount: string, weightThreshold: number, memoKey: string, jsonMetadata: string): Operation;
2789
+ /**
2790
+ * Builds an operation to revoke posting permission from an account.
2791
+ * Helper that modifies posting authority to remove an account.
2792
+ * @param account - Account revoking permission
2793
+ * @param currentPosting - Current posting authority
2794
+ * @param revokedAccount - Account to revoke permission from
2795
+ * @param memoKey - Memo public key (required by Hive blockchain)
2796
+ * @param jsonMetadata - Account JSON metadata (required by Hive blockchain)
2797
+ * @returns Account update operation with modified posting authority
2798
+ */
2799
+ declare function buildRevokePostingPermissionOp(account: string, currentPosting: Authority, revokedAccount: string, memoKey: string, jsonMetadata: string): Operation;
2800
+ /**
2801
+ * Builds a change recovery account operation.
2802
+ * @param accountToRecover - Account to change recovery account for
2803
+ * @param newRecoveryAccount - New recovery account name
2804
+ * @param extensions - Extensions array
2805
+ * @returns Change recovery account operation
2806
+ */
2807
+ declare function buildChangeRecoveryAccountOp(accountToRecover: string, newRecoveryAccount: string, extensions?: any[]): Operation;
2808
+ /**
2809
+ * Builds a request account recovery operation.
2810
+ * @param recoveryAccount - Recovery account performing the recovery
2811
+ * @param accountToRecover - Account to recover
2812
+ * @param newOwnerAuthority - New owner authority
2813
+ * @param extensions - Extensions array
2814
+ * @returns Request account recovery operation
2815
+ */
2816
+ declare function buildRequestAccountRecoveryOp(recoveryAccount: string, accountToRecover: string, newOwnerAuthority: Authority, extensions?: any[]): Operation;
2817
+ /**
2818
+ * Builds a recover account operation.
2819
+ * @param accountToRecover - Account to recover
2820
+ * @param newOwnerAuthority - New owner authority
2821
+ * @param recentOwnerAuthority - Recent owner authority (for proof)
2822
+ * @param extensions - Extensions array
2823
+ * @returns Recover account operation
2824
+ */
2825
+ declare function buildRecoverAccountOp(accountToRecover: string, newOwnerAuthority: Authority, recentOwnerAuthority: Authority, extensions?: any[]): Operation;
1400
2826
 
1401
- declare function votingPower(account: FullAccount): number;
1402
- declare function powerRechargeTime(power: number): number;
1403
- declare function downVotingPower(account: FullAccount): number;
1404
- declare function rcPower(account: RCAccount): number;
1405
- declare function votingValue(account: FullAccount, dynamicProps: DynamicProps, votingPowerValue: number, weight?: number): number;
2827
+ /**
2828
+ * Ecency-Specific Operations
2829
+ * Custom operations for Ecency platform features (Points, Boost, Promote, etc.)
2830
+ */
2831
+ /**
2832
+ * Builds an Ecency boost operation (custom_json with active authority).
2833
+ * @param user - User account
2834
+ * @param author - Post author
2835
+ * @param permlink - Post permlink
2836
+ * @param amount - Amount to boost (e.g., "1.000 POINT")
2837
+ * @returns Custom JSON operation for boost
2838
+ */
2839
+ declare function buildBoostOp(user: string, author: string, permlink: string, amount: string): Operation;
2840
+ /**
2841
+ * Builds an Ecency boost operation with numeric point value.
2842
+ * @param user - User account
2843
+ * @param author - Post author
2844
+ * @param permlink - Post permlink
2845
+ * @param points - Points to spend (will be formatted as "X.XXX POINT", must be a valid finite number)
2846
+ * @returns Custom JSON operation for boost
2847
+ */
2848
+ declare function buildBoostOpWithPoints(user: string, author: string, permlink: string, points: number): Operation;
2849
+ /**
2850
+ * Builds an Ecency Boost Plus subscription operation (custom_json).
2851
+ * @param user - User account
2852
+ * @param account - Account to subscribe
2853
+ * @param duration - Subscription duration in days (must be a valid finite number)
2854
+ * @returns Custom JSON operation for boost plus
2855
+ */
2856
+ declare function buildBoostPlusOp(user: string, account: string, duration: number): Operation;
2857
+ /**
2858
+ * Builds an Ecency promote operation (custom_json).
2859
+ * @param user - User account
2860
+ * @param author - Post author
2861
+ * @param permlink - Post permlink
2862
+ * @param duration - Promotion duration in days (must be a valid finite number)
2863
+ * @returns Custom JSON operation for promote
2864
+ */
2865
+ declare function buildPromoteOp(user: string, author: string, permlink: string, duration: number): Operation;
2866
+ /**
2867
+ * Builds an Ecency point transfer operation (custom_json).
2868
+ * @param sender - Sender account
2869
+ * @param receiver - Receiver account
2870
+ * @param amount - Amount to transfer
2871
+ * @param memo - Transfer memo
2872
+ * @returns Custom JSON operation for point transfer
2873
+ */
2874
+ declare function buildPointTransferOp(sender: string, receiver: string, amount: string, memo: string): Operation;
2875
+ /**
2876
+ * Builds multiple Ecency point transfer operations for multiple recipients.
2877
+ * @param sender - Sender account
2878
+ * @param destinations - Comma or space separated list of recipients
2879
+ * @param amount - Amount to transfer
2880
+ * @param memo - Transfer memo
2881
+ * @returns Array of custom JSON operations for point transfers
2882
+ */
2883
+ declare function buildMultiPointTransferOps(sender: string, destinations: string, amount: string, memo: string): Operation[];
2884
+ /**
2885
+ * Builds an Ecency community rewards registration operation (custom_json).
2886
+ * @param name - Account name to register
2887
+ * @returns Custom JSON operation for community registration
2888
+ */
2889
+ declare function buildCommunityRegistrationOp(name: string): Operation;
2890
+ /**
2891
+ * Builds a generic active authority custom_json operation.
2892
+ * Used for various Ecency operations that require active authority.
2893
+ * @param username - Account performing the operation
2894
+ * @param operationId - Custom JSON operation ID
2895
+ * @param json - JSON payload
2896
+ * @returns Custom JSON operation with active authority
2897
+ */
2898
+ declare function buildActiveCustomJsonOp(username: string, operationId: string, json: Record<string, any>): Operation;
2899
+ /**
2900
+ * Builds a generic posting authority custom_json operation.
2901
+ * Used for various operations that require posting authority.
2902
+ * @param username - Account performing the operation
2903
+ * @param operationId - Custom JSON operation ID
2904
+ * @param json - JSON payload
2905
+ * @returns Custom JSON operation with posting authority
2906
+ */
2907
+ declare function buildPostingCustomJsonOp(username: string, operationId: string, json: Record<string, any> | any[]): Operation;
1406
2908
 
1407
2909
  declare function useSignOperationByKey(username: string | undefined): _tanstack_react_query.UseMutationResult<_hiveio_dhive.TransactionConfirmation, Error, {
1408
2910
  operation: Operation;
@@ -1914,6 +3416,234 @@ declare function useUploadImage(onSuccess?: (data: {
1914
3416
  signal?: AbortSignal;
1915
3417
  }, unknown>;
1916
3418
 
3419
+ /**
3420
+ * Payload for voting on a post or comment.
3421
+ */
3422
+ interface VotePayload {
3423
+ /** Author of the post/comment to vote on */
3424
+ author: string;
3425
+ /** Permlink of the post/comment to vote on */
3426
+ permlink: string;
3427
+ /** Vote weight (-10000 to 10000, where 10000 = 100% upvote, -10000 = 100% downvote) */
3428
+ weight: number;
3429
+ }
3430
+ /**
3431
+ * React Query mutation hook for voting on posts and comments.
3432
+ *
3433
+ * This mutation broadcasts a vote operation to the Hive blockchain,
3434
+ * supporting upvotes (positive weight) and downvotes (negative weight).
3435
+ *
3436
+ * @param username - The username of the voter (required for broadcast)
3437
+ * @param auth - Authentication context with platform adapter and fallback configuration
3438
+ *
3439
+ * @returns React Query mutation result
3440
+ *
3441
+ * @remarks
3442
+ * **Post-Broadcast Actions:**
3443
+ * - Records activity (type 120) if adapter.recordActivity is available
3444
+ * - Invalidates post cache to refetch updated vote data
3445
+ * - Invalidates voting power cache to show updated VP
3446
+ *
3447
+ * **Vote Weight:**
3448
+ * - 10000 = 100% upvote
3449
+ * - 0 = remove vote
3450
+ * - -10000 = 100% downvote
3451
+ *
3452
+ * @example
3453
+ * ```typescript
3454
+ * const voteMutation = useVote(username, {
3455
+ * adapter: myAdapter,
3456
+ * enableFallback: true,
3457
+ * fallbackChain: ['keychain', 'key', 'hivesigner']
3458
+ * });
3459
+ *
3460
+ * // Upvote a post
3461
+ * voteMutation.mutate({
3462
+ * author: 'alice',
3463
+ * permlink: 'my-awesome-post',
3464
+ * weight: 10000
3465
+ * });
3466
+ *
3467
+ * // Remove vote
3468
+ * voteMutation.mutate({
3469
+ * author: 'alice',
3470
+ * permlink: 'my-awesome-post',
3471
+ * weight: 0
3472
+ * });
3473
+ *
3474
+ * // Downvote
3475
+ * voteMutation.mutate({
3476
+ * author: 'alice',
3477
+ * permlink: 'my-awesome-post',
3478
+ * weight: -10000
3479
+ * });
3480
+ * ```
3481
+ */
3482
+ declare function useVote(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, VotePayload, unknown>;
3483
+
3484
+ /**
3485
+ * Payload for reblogging a post.
3486
+ */
3487
+ interface ReblogPayload {
3488
+ /** Original post author */
3489
+ author: string;
3490
+ /** Original post permlink */
3491
+ permlink: string;
3492
+ /** If true, removes the reblog instead of creating it */
3493
+ deleteReblog?: boolean;
3494
+ }
3495
+ /**
3496
+ * React Query mutation hook for reblogging posts.
3497
+ *
3498
+ * This mutation broadcasts a custom_json operation to reblog (or un-reblog)
3499
+ * a post to the user's blog feed.
3500
+ *
3501
+ * @param username - The username performing the reblog (required for broadcast)
3502
+ * @param auth - Authentication context with platform adapter and fallback configuration
3503
+ *
3504
+ * @returns React Query mutation result
3505
+ *
3506
+ * @remarks
3507
+ * **Post-Broadcast Actions:**
3508
+ * - Records activity (type 130) if adapter.recordActivity is available
3509
+ * - Invalidates blog feed cache to show the reblogged post
3510
+ * - Invalidates post cache to update reblog status
3511
+ *
3512
+ * **Reblog vs Delete:**
3513
+ * - deleteReblog: false (default) - Creates a reblog
3514
+ * - deleteReblog: true - Removes an existing reblog
3515
+ *
3516
+ * @example
3517
+ * ```typescript
3518
+ * const reblogMutation = useReblog(username, {
3519
+ * adapter: myAdapter,
3520
+ * enableFallback: true,
3521
+ * fallbackChain: ['keychain', 'key', 'hivesigner']
3522
+ * });
3523
+ *
3524
+ * // Reblog a post
3525
+ * reblogMutation.mutate({
3526
+ * author: 'alice',
3527
+ * permlink: 'my-awesome-post'
3528
+ * });
3529
+ *
3530
+ * // Remove a reblog
3531
+ * reblogMutation.mutate({
3532
+ * author: 'alice',
3533
+ * permlink: 'my-awesome-post',
3534
+ * deleteReblog: true
3535
+ * });
3536
+ * ```
3537
+ */
3538
+ declare function useReblog(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ReblogPayload, unknown>;
3539
+
3540
+ /**
3541
+ * Beneficiary account and weight.
3542
+ */
3543
+ interface Beneficiary {
3544
+ /** Beneficiary account name */
3545
+ account: string;
3546
+ /** Beneficiary weight (10000 = 100%) */
3547
+ weight: number;
3548
+ }
3549
+ /**
3550
+ * Payload for creating a comment or post.
3551
+ */
3552
+ interface CommentPayload {
3553
+ /** Author of the comment/post */
3554
+ author: string;
3555
+ /** Permlink of the comment/post */
3556
+ permlink: string;
3557
+ /** Parent author (empty string for top-level posts) */
3558
+ parentAuthor: string;
3559
+ /** Parent permlink (category/tag for top-level posts) */
3560
+ parentPermlink: string;
3561
+ /** Title of the post (empty for comments) */
3562
+ title: string;
3563
+ /** Content body */
3564
+ body: string;
3565
+ /** JSON metadata object */
3566
+ jsonMetadata: Record<string, any>;
3567
+ /** Optional: Comment options (beneficiaries, rewards) */
3568
+ options?: {
3569
+ /** Maximum accepted payout (e.g., "1000000.000 HBD") */
3570
+ maxAcceptedPayout?: string;
3571
+ /** Percent of payout in HBD (10000 = 100%) */
3572
+ percentHbd?: number;
3573
+ /** Allow votes on this content */
3574
+ allowVotes?: boolean;
3575
+ /** Allow curation rewards */
3576
+ allowCurationRewards?: boolean;
3577
+ /** Beneficiaries array */
3578
+ beneficiaries?: Beneficiary[];
3579
+ };
3580
+ }
3581
+ /**
3582
+ * React Query mutation hook for creating posts and comments.
3583
+ *
3584
+ * This mutation broadcasts a comment operation (and optionally comment_options)
3585
+ * to create a new post or reply on the Hive blockchain.
3586
+ *
3587
+ * @param username - The username creating the comment/post (required for broadcast)
3588
+ * @param auth - Authentication context with platform adapter and fallback configuration
3589
+ *
3590
+ * @returns React Query mutation result
3591
+ *
3592
+ * @remarks
3593
+ * **Post-Broadcast Actions:**
3594
+ * - Records activity (type 100 for posts, 110 for comments) if adapter.recordActivity is available
3595
+ * - Invalidates feed caches to show the new content
3596
+ * - Invalidates parent post cache if this is a reply
3597
+ *
3598
+ * **Operations:**
3599
+ * - Always includes a comment operation
3600
+ * - Optionally includes comment_options operation for beneficiaries/rewards
3601
+ *
3602
+ * **Post vs Comment:**
3603
+ * - Post: parentAuthor = "", parentPermlink = category/tag
3604
+ * - Comment: parentAuthor = parent author, parentPermlink = parent permlink
3605
+ *
3606
+ * @example
3607
+ * ```typescript
3608
+ * const commentMutation = useComment(username, {
3609
+ * adapter: myAdapter,
3610
+ * enableFallback: true,
3611
+ * fallbackChain: ['keychain', 'key', 'hivesigner']
3612
+ * });
3613
+ *
3614
+ * // Create a post
3615
+ * commentMutation.mutate({
3616
+ * author: 'alice',
3617
+ * permlink: 'my-awesome-post-20260209',
3618
+ * parentAuthor: '',
3619
+ * parentPermlink: 'technology',
3620
+ * title: 'My Awesome Post',
3621
+ * body: 'This is the post content...',
3622
+ * jsonMetadata: {
3623
+ * tags: ['technology', 'hive'],
3624
+ * app: 'ecency/3.0.0'
3625
+ * },
3626
+ * options: {
3627
+ * beneficiaries: [
3628
+ * { account: 'ecency', weight: 500 }
3629
+ * ]
3630
+ * }
3631
+ * });
3632
+ *
3633
+ * // Create a comment
3634
+ * commentMutation.mutate({
3635
+ * author: 'bob',
3636
+ * permlink: 're-alice-my-awesome-post-20260209',
3637
+ * parentAuthor: 'alice',
3638
+ * parentPermlink: 'my-awesome-post-20260209',
3639
+ * title: '',
3640
+ * body: 'Great post!',
3641
+ * jsonMetadata: { app: 'ecency/3.0.0' }
3642
+ * });
3643
+ * ```
3644
+ */
3645
+ declare function useComment(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, CommentPayload, unknown>;
3646
+
1917
3647
  type EntryWithPostId = Entry$1 & {
1918
3648
  post_id: number;
1919
3649
  };
@@ -2818,6 +4548,70 @@ declare function getUserProposalVotesQueryOptions(voter: string): _tanstack_reac
2818
4548
  };
2819
4549
  };
2820
4550
 
4551
+ /**
4552
+ * Payload for voting on proposals.
4553
+ */
4554
+ interface ProposalVotePayload {
4555
+ /** Array of proposal IDs to vote on */
4556
+ proposalIds: number[];
4557
+ /** True to approve, false to disapprove */
4558
+ approve: boolean;
4559
+ }
4560
+ /**
4561
+ * React Query mutation hook for voting on Hive proposals.
4562
+ *
4563
+ * This mutation broadcasts an update_proposal_votes operation to vote on
4564
+ * one or more proposals in the Hive Decentralized Fund (HDF).
4565
+ *
4566
+ * @param username - The username voting on proposals (required for broadcast)
4567
+ * @param auth - Authentication context with platform adapter and fallback configuration
4568
+ *
4569
+ * @returns React Query mutation result
4570
+ *
4571
+ * @remarks
4572
+ * **Post-Broadcast Actions:**
4573
+ * - Records activity (type 150) if adapter.recordActivity is available
4574
+ * - Invalidates proposal list cache to show updated vote status
4575
+ * - Invalidates voter's proposal votes cache
4576
+ *
4577
+ * **Multiple Proposals:**
4578
+ * - You can vote on multiple proposals in a single transaction
4579
+ * - All proposals receive the same vote (approve or disapprove)
4580
+ * - Proposal IDs are integers, not strings
4581
+ *
4582
+ * **Vote Types:**
4583
+ * - approve: true - Vote in favor of the proposal(s)
4584
+ * - approve: false - Remove your vote from the proposal(s)
4585
+ *
4586
+ * @example
4587
+ * ```typescript
4588
+ * const proposalVoteMutation = useProposalVote(username, {
4589
+ * adapter: myAdapter,
4590
+ * enableFallback: true,
4591
+ * fallbackChain: ['keychain', 'key', 'hivesigner']
4592
+ * });
4593
+ *
4594
+ * // Approve a single proposal
4595
+ * proposalVoteMutation.mutate({
4596
+ * proposalIds: [123],
4597
+ * approve: true
4598
+ * });
4599
+ *
4600
+ * // Approve multiple proposals
4601
+ * proposalVoteMutation.mutate({
4602
+ * proposalIds: [123, 124, 125],
4603
+ * approve: true
4604
+ * });
4605
+ *
4606
+ * // Remove vote from a proposal
4607
+ * proposalVoteMutation.mutate({
4608
+ * proposalIds: [123],
4609
+ * approve: false
4610
+ * });
4611
+ * ```
4612
+ */
4613
+ declare function useProposalVote(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ProposalVotePayload, unknown>;
4614
+
2821
4615
  interface DelegatedVestingShare {
2822
4616
  id: number;
2823
4617
  delegatee: string;
@@ -3098,6 +4892,72 @@ declare function getPortfolioQueryOptions(username: string, currency?: string, o
3098
4892
  };
3099
4893
  };
3100
4894
 
4895
+ /**
4896
+ * Payload for transferring tokens.
4897
+ */
4898
+ interface TransferPayload {
4899
+ /** Recipient account */
4900
+ to: string;
4901
+ /** Amount with asset symbol (e.g., "1.000 HIVE", "5.000 HBD") */
4902
+ amount: string;
4903
+ /** Transfer memo */
4904
+ memo: string;
4905
+ }
4906
+ /**
4907
+ * React Query mutation hook for transferring tokens.
4908
+ *
4909
+ * This mutation broadcasts a transfer operation to send HIVE, HBD, or other
4910
+ * Hive-based tokens to another account. **Requires ACTIVE authority**, not posting.
4911
+ *
4912
+ * @param username - The username sending the transfer (required for broadcast)
4913
+ * @param auth - Authentication context with platform adapter and fallback configuration
4914
+ *
4915
+ * @returns React Query mutation result
4916
+ *
4917
+ * @remarks
4918
+ * **IMPORTANT: Active Authority Required**
4919
+ * - Transfer operations require ACTIVE key, not posting key
4920
+ * - Make sure your auth adapter provides getActiveKey() method
4921
+ * - Keychain/HiveAuth will prompt for Active authority
4922
+ *
4923
+ * **Post-Broadcast Actions:**
4924
+ * - Records activity (type 140) if adapter.recordActivity is available
4925
+ * - Invalidates wallet balance caches to show updated balances
4926
+ * - Invalidates transaction history
4927
+ *
4928
+ * **Supported Assets:**
4929
+ * - HIVE: "1.000 HIVE"
4930
+ * - HBD: "5.000 HBD"
4931
+ * - Amount must include exactly 3 decimal places
4932
+ *
4933
+ * @example
4934
+ * ```typescript
4935
+ * const transferMutation = useTransfer(username, {
4936
+ * adapter: {
4937
+ * ...myAdapter,
4938
+ * getActiveKey: async (username) => getActiveKeyFromStorage(username)
4939
+ * },
4940
+ * enableFallback: true,
4941
+ * fallbackChain: ['keychain', 'key', 'hivesigner']
4942
+ * });
4943
+ *
4944
+ * // Transfer HIVE
4945
+ * transferMutation.mutate({
4946
+ * to: 'alice',
4947
+ * amount: '10.000 HIVE',
4948
+ * memo: 'Thanks for the post!'
4949
+ * });
4950
+ *
4951
+ * // Transfer HBD
4952
+ * transferMutation.mutate({
4953
+ * to: 'bob',
4954
+ * amount: '5.000 HBD',
4955
+ * memo: ''
4956
+ * });
4957
+ * ```
4958
+ */
4959
+ declare function useTransfer(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<any, Error, TransferPayload, unknown>;
4960
+
3101
4961
  interface Witness {
3102
4962
  total_missed: number;
3103
4963
  url: string;
@@ -3628,4 +5488,4 @@ declare function getHiveEngineUnclaimedRewards<T = Record<string, unknown>>(user
3628
5488
  declare function getSpkWallet<T = Record<string, unknown>>(username: string): Promise<T>;
3629
5489
  declare function getSpkMarkets<T = Record<string, unknown>>(): Promise<T>;
3630
5490
 
3631
- export { ACCOUNT_OPERATION_GROUPS, ALL_ACCOUNT_OPERATIONS, ALL_NOTIFY_TYPES, type AccountBookmark, type AccountFavorite, type AccountFollowStats, type AccountNotification, type AccountProfile, type AccountRelationship, type AccountReputation, type AccountSearchResult, type Announcement, type ApiBookmarkNotification, type ApiDelegationsNotification, type ApiFavoriteNotification, type ApiFollowNotification, type ApiInactiveNotification, type ApiMentionNotification, type ApiNotification, type ApiNotificationSetting, type ApiReblogNotification, type ApiReferralNotification, type ApiReplyNotification, type ApiResponse, type ApiSpinNotification, type ApiTransferNotification, type ApiVoteNotification, type Asset, type AuthContext, type AuthorReward, type BlogEntry, type BoostPlusAccountPrice, type BuildProfileMetadataArgs, CONFIG, type CancelTransferFromSavings, type CantAfford, type CheckUsernameWalletsPendingResponse, type ClaimRewardBalance, type CollateralizedConversionRequest, type CollateralizedConvert, type CommentBenefactor, type CommentPayoutUpdate, type CommentReward, type Communities, type Community, type CommunityRole, type CommunityTeam, type CommunityType, ConfigManager, type ConversionRequest, type CurationDuration, type CurationItem, type CurationReward, type CurrencyRates, type DelegateVestingShares, type DelegatedVestingShare, type DeletedEntry, type Draft, type DraftMetadata, type DraftsWrappedResponse, type DynamicProps, index as EcencyAnalytics, EcencyQueriesManager, type EffectiveCommentVote, type Entry$1 as Entry, type EntryBeneficiaryRoute, type EntryHeader, type EntryStat, type EntryVote, type FeedHistoryItem, type FillCollateralizedConvertRequest, type FillConvertRequest, type FillOrder, type FillRecurrentTransfers, type FillVestingWithdraw, type Follow, type Fragment, type FriendSearchResult, type FriendsPageParam, type FriendsRow, type FullAccount, type GameClaim, type GetGameStatus, type GetRecoveriesEmailResponse, type HiveEngineOpenOrder, type HiveHbdStats, HiveSignerIntegration, type HsTokenRenewResponse, type IncomingRcDelegation, type IncomingRcResponse, type Interest, type JsonMetadata, type JsonPollMetadata, type Keys, type LeaderBoardDuration, type LeaderBoardItem, type LimitOrderCancel, type LimitOrderCreate, type MarketCandlestickDataItem, type MarketData, type MarketStatistics, type MedianHistoryPrice, NaiMap, NotificationFilter, NotificationViewType, type Notifications, NotifyTypes, type OpenOrdersData, type OperationGroup, type OrdersData, type OrdersDataItem, type PageStatsResponse, type PaginationMeta, type Payer, type PointTransaction, type Points, type PortfolioResponse, type PortfolioWalletItem, type PostTip, type PostTipsResponse, type ProducerReward, type Profile, type ProfileTokens, type PromotePrice, type Proposal, type ProposalPay, type ProposalVote, type ProposalVoteRow, ROLES, type RcDirectDelegation, type RcDirectDelegationsResponse, type RcStats, type Reblog, type ReceivedVestingShare, type RecordActivityOptions, type Recoveries, type RecurrentTransfer, type RecurrentTransfers, type ReferralItem, type ReferralItems, type ReferralStat, type ReturnVestingDelegation, type RewardFund, type RewardedCommunity, type SavingsWithdrawRequest, type Schedule, type SearchResponse, type SearchResult, type SetWithdrawRoute, SortOrder, type StatsResponse, type Subscription, Symbol, type TagSearchResult, type ThreadItemEntry, ThreeSpeakIntegration, type ThreeSpeakVideo, type Transaction, type Transfer, type TransferToSavings, type TransferToVesting, type TrendingTag, type UpdateProposalVotes, type UserImage, type ValidatePostCreatingOptions, type Vote, type VoteHistoryPage, type VoteHistoryPageParam, type VoteProxy, type WalletMetadataCandidate, type WaveEntry, type WaveTrendingTag, type WithdrawRoute, type WithdrawVesting, type Witness, type WrappedResponse, type WsBookmarkNotification, type WsDelegationsNotification, type WsFavoriteNotification, type WsFollowNotification, type WsInactiveNotification, type WsMentionNotification, type WsNotification, type WsReblogNotification, type WsReferralNotification, type WsReplyNotification, type WsSpinNotification, type WsTransferNotification, type WsVoteNotification, addDraft, addImage, addSchedule, bridgeApiCall, broadcastJson, buildProfileMetadata, checkFavouriteQueryOptions, checkUsernameWalletsPendingQueryOptions, decodeObj, dedupeAndSortKeyAuths, deleteDraft, deleteImage, deleteSchedule, downVotingPower, encodeObj, extractAccountProfile, getAccountFullQueryOptions, getAccountNotificationsInfiniteQueryOptions, getAccountPendingRecoveryQueryOptions, getAccountPosts, getAccountPostsInfiniteQueryOptions, getAccountPostsQueryOptions, getAccountRcQueryOptions, getAccountRecoveriesQueryOptions, getAccountReputationsQueryOptions, getAccountSubscriptionsQueryOptions, getAccountVoteHistoryInfiniteQueryOptions, getAccountsQueryOptions, getAnnouncementsQueryOptions, getBookmarksInfiniteQueryOptions, getBookmarksQueryOptions, getBoostPlusAccountPricesQueryOptions, getBoostPlusPricesQueryOptions, getBotsQueryOptions, getBoundFetch, getChainPropertiesQueryOptions, getCollateralizedConversionRequestsQueryOptions, getCommentHistoryQueryOptions, getCommunities, getCommunitiesQueryOptions, getCommunity, getCommunityContextQueryOptions, getCommunityPermissions, getCommunityQueryOptions, getCommunitySubscribersQueryOptions, getCommunityType, getContentQueryOptions, getContentRepliesQueryOptions, getControversialRisingInfiniteQueryOptions, getConversionRequestsQueryOptions, getCurrencyRate, getCurrencyRates, getCurrencyTokenRate, getCurrentMedianHistoryPriceQueryOptions, getDeletedEntryQueryOptions, getDiscoverCurationQueryOptions, getDiscoverLeaderboardQueryOptions, getDiscussion, getDiscussionQueryOptions, getDiscussionsQueryOptions, getDraftsInfiniteQueryOptions, getDraftsQueryOptions, getDynamicPropsQueryOptions, getEntryActiveVotesQueryOptions, getFavouritesInfiniteQueryOptions, getFavouritesQueryOptions, getFeedHistoryQueryOptions, getFollowCountQueryOptions, getFollowersQueryOptions, getFollowingQueryOptions, getFragmentsInfiniteQueryOptions, getFragmentsQueryOptions, getFriendsInfiniteQueryOptions, getGalleryImagesQueryOptions, getGameStatusCheckQueryOptions, getHiveEngineMetrics, getHiveEngineOpenOrders, getHiveEngineOrderBook, getHiveEngineTokenMetrics, getHiveEngineTokenTransactions, getHiveEngineTokensBalances, getHiveEngineTokensMarket, getHiveEngineTokensMetadata, getHiveEngineTradeHistory, getHiveEngineUnclaimedRewards, getHiveHbdStatsQueryOptions, getHivePoshLinksQueryOptions, getHivePrice, getImagesInfiniteQueryOptions, getImagesQueryOptions, getIncomingRcQueryOptions, getMarketData, getMarketDataQueryOptions, getMarketHistoryQueryOptions, getMarketStatisticsQueryOptions, getMutedUsersQueryOptions, getNormalizePostQueryOptions, getNotificationSetting, getNotifications, getNotificationsInfiniteQueryOptions, getNotificationsSettingsQueryOptions, getNotificationsUnreadCountQueryOptions, getOpenOrdersQueryOptions, getOrderBookQueryOptions, getOutgoingRcDelegationsInfiniteQueryOptions, getPageStatsQueryOptions, getPointsQueryOptions, getPortfolioQueryOptions, getPost, getPostHeader, getPostHeaderQueryOptions, getPostQueryOptions, getPostTipsQueryOptions, getPostsRanked, getPostsRankedInfiniteQueryOptions, getPostsRankedQueryOptions, getProfiles, getProfilesQueryOptions, getPromotePriceQueryOptions, getPromotedPost, getPromotedPostsQuery, getProposalQueryOptions, getProposalVotesInfiniteQueryOptions, getProposalsQueryOptions, getQueryClient, getRcStatsQueryOptions, getRebloggedByQueryOptions, getReblogsQueryOptions, getReceivedVestingSharesQueryOptions, getRecurrentTransfersQueryOptions, getReferralsInfiniteQueryOptions, getReferralsStatsQueryOptions, getRelationshipBetweenAccounts, getRelationshipBetweenAccountsQueryOptions, getRewardFundQueryOptions, getRewardedCommunitiesQueryOptions, getSavingsWithdrawFromQueryOptions, getSchedulesInfiniteQueryOptions, getSchedulesQueryOptions, getSearchAccountQueryOptions, getSearchAccountsByUsernameQueryOptions, getSearchApiInfiniteQueryOptions, getSearchFriendsQueryOptions, getSearchPathQueryOptions, getSearchTopicsQueryOptions, getSimilarEntriesQueryOptions, getSpkMarkets, getSpkWallet, getStatsQueryOptions, getSubscribers, getSubscriptions, getTradeHistoryQueryOptions, getTransactionsInfiniteQueryOptions, getTrendingTagsQueryOptions, getTrendingTagsWithStatsQueryOptions, getUserPostVoteQueryOptions, getUserProposalVotesQueryOptions, getVestingDelegationsQueryOptions, getVisibleFirstLevelThreadItems, getWavesByHostQueryOptions, getWavesByTagQueryOptions, getWavesFollowingQueryOptions, getWavesTrendingTagsQueryOptions, getWithdrawRoutesQueryOptions, getWitnessesInfiniteQueryOptions, hsTokenRenew, isCommunity, isWrappedResponse, lookupAccountsQueryOptions, makeQueryClient, mapThreadItemsToWaveEntries, markNotifications, moveSchedule, normalizePost, normalizeToWrappedResponse, normalizeWaveEntryFromApi, onboardEmail, parseAccounts, parseAsset, parseProfileMetadata, powerRechargeTime, rcPower, resolvePost, roleMap, saveNotificationSetting, search, searchAccount, searchPath, searchQueryOptions, searchTag, signUp, sortDiscussions, subscribeEmail, toEntryArray, updateDraft, uploadImage, useAccountFavouriteAdd, useAccountFavouriteDelete, useAccountRelationsUpdate, useAccountRevokeKey, useAccountRevokePosting, useAccountUpdate, useAccountUpdateKeyAuths, useAccountUpdatePassword, useAccountUpdateRecovery, useAddDraft, useAddFragment, useAddImage, useAddSchedule, useBookmarkAdd, useBookmarkDelete, useBroadcastMutation, useDeleteDraft, useDeleteImage, useDeleteSchedule, useEditFragment, useGameClaim, useMarkNotificationsRead, useMoveSchedule, useRecordActivity, useRemoveFragment, useSignOperationByHivesigner, useSignOperationByKey, useSignOperationByKeychain, useUpdateDraft, useUploadImage, usrActivity, validatePostCreating, votingPower, votingValue };
5491
+ export { ACCOUNT_OPERATION_GROUPS, ALL_ACCOUNT_OPERATIONS, ALL_NOTIFY_TYPES, type AccountBookmark, type AccountFavorite, type AccountFollowStats, type AccountKeys, type AccountNotification, type AccountProfile, type AccountRelationship, type AccountReputation, type AccountSearchResult, type Announcement, type ApiBookmarkNotification, type ApiDelegationsNotification, type ApiFavoriteNotification, type ApiFollowNotification, type ApiInactiveNotification, type ApiMentionNotification, type ApiNotification, type ApiNotificationSetting, type ApiReblogNotification, type ApiReferralNotification, type ApiReplyNotification, type ApiResponse, type ApiSpinNotification, type ApiTransferNotification, type ApiVoteNotification, type Asset, type AuthContext, type AuthContextV2, type AuthMethod, type AuthorReward, type Authority, type AuthorityLevel, type Beneficiary, type BlogEntry, type BoostPlusAccountPrice, type BuildProfileMetadataArgs, BuySellTransactionType, CONFIG, type CancelTransferFromSavings, type CantAfford, type CheckUsernameWalletsPendingResponse, type ClaimRewardBalance, type CollateralizedConversionRequest, type CollateralizedConvert, type CommentBenefactor, type CommentPayload, type CommentPayoutUpdate, type CommentReward, type Communities, type Community, type CommunityProps, type CommunityRole, type CommunityTeam, type CommunityType, ConfigManager, type ConversionRequest, type CurationDuration, type CurationItem, type CurationReward, type CurrencyRates, type DelegateVestingShares, type DelegatedVestingShare, type DeletedEntry, type Draft, type DraftMetadata, type DraftsWrappedResponse, type DynamicProps, index as EcencyAnalytics, EcencyQueriesManager, type EffectiveCommentVote, type Entry$1 as Entry, type EntryBeneficiaryRoute, type EntryHeader, type EntryStat, type EntryVote, ErrorType, type FeedHistoryItem, type FillCollateralizedConvertRequest, type FillConvertRequest, type FillOrder, type FillRecurrentTransfers, type FillVestingWithdraw, type Follow, type FollowPayload, type Fragment, type FriendSearchResult, type FriendsPageParam, type FriendsRow, type FullAccount, type GameClaim, type GetGameStatus, type GetRecoveriesEmailResponse, type HiveEngineOpenOrder, type HiveHbdStats, HiveSignerIntegration, type HsTokenRenewResponse, type IncomingRcDelegation, type IncomingRcResponse, type Interest, type JsonMetadata, type JsonPollMetadata, type Keys, type LeaderBoardDuration, type LeaderBoardItem, type LimitOrderCancel, type LimitOrderCreate, type MarketCandlestickDataItem, type MarketData, type MarketStatistics, type MedianHistoryPrice, NaiMap, NotificationFilter, NotificationViewType, type Notifications, NotifyTypes, OPERATION_AUTHORITY_MAP, type OpenOrdersData, type OperationGroup, OrderIdPrefix, type OrdersData, type OrdersDataItem, type PageStatsResponse, type PaginationMeta, type ParsedChainError, type Payer, type PlatformAdapter, type PointTransaction, type Points, type PortfolioResponse, type PortfolioWalletItem, type PostTip, type PostTipsResponse, type ProducerReward, type Profile, type ProfileTokens, type PromotePrice, type Proposal, type ProposalCreatePayload, type ProposalPay, type ProposalVote, type ProposalVotePayload, type ProposalVoteRow, ROLES, type RcDirectDelegation, type RcDirectDelegationsResponse, type RcStats, type Reblog, type ReblogPayload, type ReceivedVestingShare, type RecordActivityOptions, type Recoveries, type RecurrentTransfer, type RecurrentTransfers, type ReferralItem, type ReferralItems, type ReferralStat, type ReturnVestingDelegation, type RewardFund, type RewardedCommunity, type SavingsWithdrawRequest, type Schedule, type SearchResponse, type SearchResult, type SetWithdrawRoute, SortOrder, type StatsResponse, type Subscription, Symbol, type TagSearchResult, type ThreadItemEntry, ThreeSpeakIntegration, type ThreeSpeakVideo, type Transaction, type Transfer, type TransferPayload, type TransferToSavings, type TransferToVesting, type TrendingTag, type UnfollowPayload, type UpdateProposalVotes, type User, type UserImage, type ValidatePostCreatingOptions, type Vote, type VoteHistoryPage, type VoteHistoryPageParam, type VotePayload, type VoteProxy, type WalletMetadataCandidate, type WaveEntry, type WaveTrendingTag, type WithdrawRoute, type WithdrawVesting, type Witness, type WrappedResponse, type WsBookmarkNotification, type WsDelegationsNotification, type WsFavoriteNotification, type WsFollowNotification, type WsInactiveNotification, type WsMentionNotification, type WsNotification, type WsReblogNotification, type WsReferralNotification, type WsReplyNotification, type WsSpinNotification, type WsTransferNotification, type WsVoteNotification, addDraft, addImage, addSchedule, bridgeApiCall, broadcastJson, buildAccountCreateOp, buildAccountUpdate2Op, buildAccountUpdateOp, buildActiveCustomJsonOp, buildBoostOp, buildBoostOpWithPoints, buildBoostPlusOp, buildCancelTransferFromSavingsOp, buildChangeRecoveryAccountOp, buildClaimAccountOp, buildClaimInterestOps, buildClaimRewardBalanceOp, buildCollateralizedConvertOp, buildCommentOp, buildCommentOptionsOp, buildCommunityRegistrationOp, buildConvertOp, buildCreateClaimedAccountOp, buildDelegateRcOp, buildDelegateVestingSharesOp, buildDeleteCommentOp, buildFlagPostOp, buildFollowOp, buildGrantPostingPermissionOp, buildIgnoreOp, buildLimitOrderCancelOp, buildLimitOrderCreateOp, buildLimitOrderCreateOpWithType, buildMultiPointTransferOps, buildMultiTransferOps, buildMutePostOp, buildMuteUserOp, buildPinPostOp, buildPointTransferOp, buildPostingCustomJsonOp, buildProfileMetadata, buildPromoteOp, buildProposalCreateOp, buildProposalVoteOp, buildReblogOp, buildRecoverAccountOp, buildRecurrentTransferOp, buildRemoveProposalOp, buildRequestAccountRecoveryOp, buildRevokePostingPermissionOp, buildSetLastReadOps, buildSetRoleOp, buildSetWithdrawVestingRouteOp, buildSubscribeOp, buildTransferFromSavingsOp, buildTransferOp, buildTransferToSavingsOp, buildTransferToVestingOp, buildUnfollowOp, buildUnignoreOp, buildUnsubscribeOp, buildUpdateCommunityOp, buildUpdateProposalOp, buildVoteOp, buildWithdrawVestingOp, buildWitnessProxyOp, buildWitnessVoteOp, checkFavouriteQueryOptions, checkUsernameWalletsPendingQueryOptions, decodeObj, dedupeAndSortKeyAuths, deleteDraft, deleteImage, deleteSchedule, downVotingPower, encodeObj, extractAccountProfile, formatError, getAccountFullQueryOptions, getAccountNotificationsInfiniteQueryOptions, getAccountPendingRecoveryQueryOptions, getAccountPosts, getAccountPostsInfiniteQueryOptions, getAccountPostsQueryOptions, getAccountRcQueryOptions, getAccountRecoveriesQueryOptions, getAccountReputationsQueryOptions, getAccountSubscriptionsQueryOptions, getAccountVoteHistoryInfiniteQueryOptions, getAccountsQueryOptions, getAnnouncementsQueryOptions, getBookmarksInfiniteQueryOptions, getBookmarksQueryOptions, getBoostPlusAccountPricesQueryOptions, getBoostPlusPricesQueryOptions, getBotsQueryOptions, getBoundFetch, getChainPropertiesQueryOptions, getCollateralizedConversionRequestsQueryOptions, getCommentHistoryQueryOptions, getCommunities, getCommunitiesQueryOptions, getCommunity, getCommunityContextQueryOptions, getCommunityPermissions, getCommunityQueryOptions, getCommunitySubscribersQueryOptions, getCommunityType, getContentQueryOptions, getContentRepliesQueryOptions, getControversialRisingInfiniteQueryOptions, getConversionRequestsQueryOptions, getCurrencyRate, getCurrencyRates, getCurrencyTokenRate, getCurrentMedianHistoryPriceQueryOptions, getCustomJsonAuthority, getDeletedEntryQueryOptions, getDiscoverCurationQueryOptions, getDiscoverLeaderboardQueryOptions, getDiscussion, getDiscussionQueryOptions, getDiscussionsQueryOptions, getDraftsInfiniteQueryOptions, getDraftsQueryOptions, getDynamicPropsQueryOptions, getEntryActiveVotesQueryOptions, getFavouritesInfiniteQueryOptions, getFavouritesQueryOptions, getFeedHistoryQueryOptions, getFollowCountQueryOptions, getFollowersQueryOptions, getFollowingQueryOptions, getFragmentsInfiniteQueryOptions, getFragmentsQueryOptions, getFriendsInfiniteQueryOptions, getGalleryImagesQueryOptions, getGameStatusCheckQueryOptions, getHiveEngineMetrics, getHiveEngineOpenOrders, getHiveEngineOrderBook, getHiveEngineTokenMetrics, getHiveEngineTokenTransactions, getHiveEngineTokensBalances, getHiveEngineTokensMarket, getHiveEngineTokensMetadata, getHiveEngineTradeHistory, getHiveEngineUnclaimedRewards, getHiveHbdStatsQueryOptions, getHivePoshLinksQueryOptions, getHivePrice, getImagesInfiniteQueryOptions, getImagesQueryOptions, getIncomingRcQueryOptions, getMarketData, getMarketDataQueryOptions, getMarketHistoryQueryOptions, getMarketStatisticsQueryOptions, getMutedUsersQueryOptions, getNormalizePostQueryOptions, getNotificationSetting, getNotifications, getNotificationsInfiniteQueryOptions, getNotificationsSettingsQueryOptions, getNotificationsUnreadCountQueryOptions, getOpenOrdersQueryOptions, getOperationAuthority, getOrderBookQueryOptions, getOutgoingRcDelegationsInfiniteQueryOptions, getPageStatsQueryOptions, getPointsQueryOptions, getPortfolioQueryOptions, getPost, getPostHeader, getPostHeaderQueryOptions, getPostQueryOptions, getPostTipsQueryOptions, getPostsRanked, getPostsRankedInfiniteQueryOptions, getPostsRankedQueryOptions, getProfiles, getProfilesQueryOptions, getPromotePriceQueryOptions, getPromotedPost, getPromotedPostsQuery, getProposalAuthority, getProposalQueryOptions, getProposalVotesInfiniteQueryOptions, getProposalsQueryOptions, getQueryClient, getRcStatsQueryOptions, getRebloggedByQueryOptions, getReblogsQueryOptions, getReceivedVestingSharesQueryOptions, getRecurrentTransfersQueryOptions, getReferralsInfiniteQueryOptions, getReferralsStatsQueryOptions, getRelationshipBetweenAccounts, getRelationshipBetweenAccountsQueryOptions, getRequiredAuthority, getRewardFundQueryOptions, getRewardedCommunitiesQueryOptions, getSavingsWithdrawFromQueryOptions, getSchedulesInfiniteQueryOptions, getSchedulesQueryOptions, getSearchAccountQueryOptions, getSearchAccountsByUsernameQueryOptions, getSearchApiInfiniteQueryOptions, getSearchFriendsQueryOptions, getSearchPathQueryOptions, getSearchTopicsQueryOptions, getSimilarEntriesQueryOptions, getSpkMarkets, getSpkWallet, getStatsQueryOptions, getSubscribers, getSubscriptions, getTradeHistoryQueryOptions, getTransactionsInfiniteQueryOptions, getTrendingTagsQueryOptions, getTrendingTagsWithStatsQueryOptions, getUserPostVoteQueryOptions, getUserProposalVotesQueryOptions, getVestingDelegationsQueryOptions, getVisibleFirstLevelThreadItems, getWavesByHostQueryOptions, getWavesByTagQueryOptions, getWavesFollowingQueryOptions, getWavesTrendingTagsQueryOptions, getWithdrawRoutesQueryOptions, getWitnessesInfiniteQueryOptions, hsTokenRenew, isCommunity, isInfoError, isNetworkError, isResourceCreditsError, isWrappedResponse, lookupAccountsQueryOptions, makeQueryClient, mapThreadItemsToWaveEntries, markNotifications, moveSchedule, normalizePost, normalizeToWrappedResponse, normalizeWaveEntryFromApi, onboardEmail, parseAccounts, parseAsset, parseChainError, parseProfileMetadata, powerRechargeTime, rcPower, resolvePost, roleMap, saveNotificationSetting, search, searchAccount, searchPath, searchQueryOptions, searchTag, shouldTriggerAuthFallback, signUp, sortDiscussions, subscribeEmail, toEntryArray, updateDraft, uploadImage, useAccountFavouriteAdd, useAccountFavouriteDelete, useAccountRelationsUpdate, useAccountRevokeKey, useAccountRevokePosting, useAccountUpdate, useAccountUpdateKeyAuths, useAccountUpdatePassword, useAccountUpdateRecovery, useAddDraft, useAddFragment, useAddImage, useAddSchedule, useBookmarkAdd, useBookmarkDelete, useBroadcastMutation, useComment, useDeleteDraft, useDeleteImage, useDeleteSchedule, useEditFragment, useFollow, useGameClaim, useMarkNotificationsRead, useMoveSchedule, useProposalVote, useReblog, useRecordActivity, useRemoveFragment, useSignOperationByHivesigner, useSignOperationByKey, useSignOperationByKeychain, useTransfer, useUnfollow, useUpdateDraft, useUploadImage, useVote, usrActivity, validatePostCreating, votingPower, votingValue };