@ecency/sdk 1.5.26 → 1.5.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.d.ts +1512 -6
- package/dist/browser/index.js +1702 -114
- package/dist/browser/index.js.map +1 -1
- package/dist/node/index.cjs +1776 -113
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.mjs +1702 -114
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/index.browser.mjs +0 -1663
- package/dist/index.browser.mjs.map +0 -1
- package/dist/index.cjs +0 -1747
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -1106
- package/dist/index.mjs +0 -1659
- package/dist/index.mjs.map +0 -1
package/dist/browser/index.d.ts
CHANGED
|
@@ -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,351 @@ 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 HiveSigner access token from storage.
|
|
96
|
+
*
|
|
97
|
+
* @param username - The username to get token for
|
|
98
|
+
* @returns Access token or undefined if not using HiveSigner
|
|
99
|
+
*/
|
|
100
|
+
getAccessToken: (username: string) => Promise<string | undefined>;
|
|
101
|
+
/**
|
|
102
|
+
* Get the login method used for this user.
|
|
103
|
+
*
|
|
104
|
+
* @param username - The username to check
|
|
105
|
+
* @returns Login type ('key', 'hivesigner', 'keychain', 'hiveauth') or null
|
|
106
|
+
*/
|
|
107
|
+
getLoginType: (username: string) => Promise<string | null | undefined>;
|
|
108
|
+
/**
|
|
109
|
+
* Display error message to user.
|
|
110
|
+
*
|
|
111
|
+
* @param message - Error message to display
|
|
112
|
+
* @param type - Optional error type for categorization
|
|
113
|
+
*
|
|
114
|
+
* @remarks
|
|
115
|
+
* - Web: toast.error()
|
|
116
|
+
* - Mobile: Alert.alert(), custom error modal
|
|
117
|
+
*/
|
|
118
|
+
showError: (message: string, type?: string) => void;
|
|
119
|
+
/**
|
|
120
|
+
* Display success message to user.
|
|
121
|
+
*
|
|
122
|
+
* @param message - Success message to display
|
|
123
|
+
*
|
|
124
|
+
* @remarks
|
|
125
|
+
* - Web: toast.success()
|
|
126
|
+
* - Mobile: Alert.alert(), custom success modal
|
|
127
|
+
*/
|
|
128
|
+
showSuccess: (message: string) => void;
|
|
129
|
+
/**
|
|
130
|
+
* Display loading indicator (optional).
|
|
131
|
+
*
|
|
132
|
+
* @param message - Loading message to display
|
|
133
|
+
*/
|
|
134
|
+
showLoading?: (message: string) => void;
|
|
135
|
+
/**
|
|
136
|
+
* Hide loading indicator (optional).
|
|
137
|
+
*/
|
|
138
|
+
hideLoading?: () => void;
|
|
139
|
+
/**
|
|
140
|
+
* Broadcast operations using Keychain browser extension.
|
|
141
|
+
*
|
|
142
|
+
* @param username - Account broadcasting the operations
|
|
143
|
+
* @param ops - Operations to broadcast
|
|
144
|
+
* @param keyType - Authority level (lowercase: "posting", "active", "owner", "memo")
|
|
145
|
+
* @returns Transaction confirmation
|
|
146
|
+
*
|
|
147
|
+
* @remarks
|
|
148
|
+
* Web platform only. Implementations should map lowercase keyType to
|
|
149
|
+
* Keychain's expected PascalCase format internally if needed.
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```typescript
|
|
153
|
+
* async broadcastWithKeychain(username, ops, keyType) {
|
|
154
|
+
* // Map to Keychain's expected format
|
|
155
|
+
* const keychainKeyType = keyType.charAt(0).toUpperCase() + keyType.slice(1);
|
|
156
|
+
* return await window.hive_keychain.requestBroadcast(username, ops, keychainKeyType);
|
|
157
|
+
* }
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
broadcastWithKeychain?: (username: string, ops: Operation[], keyType: "posting" | "active" | "owner" | "memo") => Promise<TransactionConfirmation>;
|
|
161
|
+
/**
|
|
162
|
+
* Broadcast operations using HiveAuth protocol.
|
|
163
|
+
*
|
|
164
|
+
* @param username - Username to broadcast for
|
|
165
|
+
* @param ops - Operations to broadcast
|
|
166
|
+
* @param keyType - Key authority required
|
|
167
|
+
* @returns Transaction confirmation
|
|
168
|
+
*
|
|
169
|
+
* @remarks
|
|
170
|
+
* - Shows platform-specific HiveAuth modal/screen
|
|
171
|
+
* - Generates QR code for mobile auth app
|
|
172
|
+
* - Handles WebSocket communication with auth app
|
|
173
|
+
*/
|
|
174
|
+
broadcastWithHiveAuth?: (username: string, ops: Operation[], keyType: "posting" | "active" | "owner" | "memo") => Promise<TransactionConfirmation>;
|
|
175
|
+
/**
|
|
176
|
+
* Record user activity for analytics (optional).
|
|
177
|
+
*
|
|
178
|
+
* @param activityType - Numeric activity type code
|
|
179
|
+
* @param blockNum - Block number of the activity
|
|
180
|
+
* @param txId - Transaction ID
|
|
181
|
+
*
|
|
182
|
+
* @remarks
|
|
183
|
+
* - Used for tracking user engagement
|
|
184
|
+
* - Platform can implement custom analytics
|
|
185
|
+
*/
|
|
186
|
+
recordActivity?: (activityType: number, blockNum: number, txId: string) => Promise<void>;
|
|
187
|
+
/**
|
|
188
|
+
* Invalidate React Query cache keys (optional).
|
|
189
|
+
*
|
|
190
|
+
* @param keys - Array of query keys to invalidate
|
|
191
|
+
*
|
|
192
|
+
* @remarks
|
|
193
|
+
* - Triggers refetch of cached data
|
|
194
|
+
* - Used after mutations to update UI
|
|
195
|
+
* - Example: [['posts', author, permlink], ['accountFull', username]]
|
|
196
|
+
*/
|
|
197
|
+
invalidateQueries?: (keys: any[][]) => Promise<void>;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Authentication method types supported by the SDK.
|
|
201
|
+
*/
|
|
202
|
+
type AuthMethod = 'key' | 'hiveauth' | 'hivesigner' | 'keychain' | 'custom';
|
|
203
|
+
/**
|
|
204
|
+
* Minimal user type for platform adapters.
|
|
205
|
+
* Platforms can extend this with their own user models.
|
|
206
|
+
*
|
|
207
|
+
* @example
|
|
208
|
+
* ```typescript
|
|
209
|
+
* // Web platform user
|
|
210
|
+
* interface WebUser extends User {
|
|
211
|
+
* username: string;
|
|
212
|
+
* postingKey?: string;
|
|
213
|
+
* accessToken?: string;
|
|
214
|
+
* loginType: 'keychain' | 'hivesigner';
|
|
215
|
+
* }
|
|
216
|
+
*
|
|
217
|
+
* // Mobile platform user
|
|
218
|
+
* interface MobileUser extends User {
|
|
219
|
+
* name: string;
|
|
220
|
+
* local: {
|
|
221
|
+
* authType: 'key' | 'hiveauth';
|
|
222
|
+
* postingKey: string; // encrypted
|
|
223
|
+
* };
|
|
224
|
+
* }
|
|
225
|
+
* ```
|
|
226
|
+
*/
|
|
227
|
+
interface User {
|
|
228
|
+
/** Hive username */
|
|
229
|
+
username?: string;
|
|
230
|
+
/** Display name (alias for username on some platforms) */
|
|
231
|
+
name?: string;
|
|
232
|
+
/** Platform-specific user data */
|
|
233
|
+
[key: string]: any;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Original AuthContext for backward compatibility.
|
|
238
|
+
*
|
|
239
|
+
* This interface is maintained for existing SDK consumers who pass
|
|
240
|
+
* auth context directly to mutations.
|
|
241
|
+
*
|
|
242
|
+
* @deprecated Use AuthContextV2 for new implementations to enable platform adapters.
|
|
243
|
+
*
|
|
244
|
+
* @example
|
|
245
|
+
* ```typescript
|
|
246
|
+
* // Legacy usage (still supported)
|
|
247
|
+
* const authContext: AuthContext = {
|
|
248
|
+
* postingKey: 'wif-key',
|
|
249
|
+
* accessToken: 'hs-token',
|
|
250
|
+
* loginType: 'hivesigner'
|
|
251
|
+
* };
|
|
252
|
+
* ```
|
|
253
|
+
*/
|
|
30
254
|
interface AuthContext {
|
|
255
|
+
/** HiveSigner OAuth access token */
|
|
31
256
|
accessToken?: string;
|
|
257
|
+
/** Posting key in WIF format (null for Keychain/HiveAuth users) */
|
|
32
258
|
postingKey?: string | null;
|
|
259
|
+
/** Login method used ('key', 'hivesigner', 'keychain', 'hiveauth') */
|
|
33
260
|
loginType?: string | null;
|
|
261
|
+
/**
|
|
262
|
+
* Custom broadcast function for platform-specific signing.
|
|
263
|
+
* @deprecated Use platform adapter's broadcastWithKeychain/broadcastWithHiveAuth instead.
|
|
264
|
+
*/
|
|
34
265
|
broadcast?: (operations: Operation[], authority?: "active" | "posting" | "owner" | "memo") => Promise<unknown>;
|
|
35
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* Enhanced AuthContext with platform adapter support.
|
|
269
|
+
* Backward compatible with AuthContext.
|
|
270
|
+
*
|
|
271
|
+
* This is the recommended interface for new SDK integrations. It enables
|
|
272
|
+
* platform-specific features while keeping the SDK agnostic of implementation details.
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* ```typescript
|
|
276
|
+
* // Web usage with platform adapter
|
|
277
|
+
* const authContext: AuthContextV2 = {
|
|
278
|
+
* adapter: {
|
|
279
|
+
* getUser: async (username) => getUserFromZustand(username),
|
|
280
|
+
* getPostingKey: async (username) => localStorage.getItem(`key-${username}`),
|
|
281
|
+
* showError: (msg) => toast.error(msg),
|
|
282
|
+
* showSuccess: (msg) => toast.success(msg),
|
|
283
|
+
* broadcastWithKeychain: async (username, ops, keyType) => {
|
|
284
|
+
* // Map lowercase to Keychain's PascalCase format
|
|
285
|
+
* const keychainKeyType = keyType.charAt(0).toUpperCase() + keyType.slice(1);
|
|
286
|
+
* return window.hive_keychain.requestBroadcast(username, ops, keychainKeyType);
|
|
287
|
+
* },
|
|
288
|
+
* },
|
|
289
|
+
* enableFallback: true,
|
|
290
|
+
* fallbackChain: ['keychain', 'key', 'hivesigner'],
|
|
291
|
+
* };
|
|
292
|
+
*
|
|
293
|
+
* // Mobile usage with platform adapter
|
|
294
|
+
* const authContext: AuthContextV2 = {
|
|
295
|
+
* adapter: {
|
|
296
|
+
* getUser: async (username) => store.getState().users[username],
|
|
297
|
+
* getPostingKey: async (username) => decryptKey(username, pin),
|
|
298
|
+
* showError: (msg) => Alert.alert('Error', msg),
|
|
299
|
+
* showSuccess: (msg) => Alert.alert('Success', msg),
|
|
300
|
+
* broadcastWithHiveAuth: async (username, ops, keyType) => {
|
|
301
|
+
* return showHiveAuthModal(username, ops, keyType);
|
|
302
|
+
* },
|
|
303
|
+
* },
|
|
304
|
+
* enableFallback: true,
|
|
305
|
+
* fallbackChain: ['hiveauth', 'key'],
|
|
306
|
+
* };
|
|
307
|
+
*
|
|
308
|
+
* // Legacy usage (still works)
|
|
309
|
+
* const authContext: AuthContextV2 = {
|
|
310
|
+
* postingKey: 'wif-key',
|
|
311
|
+
* loginType: 'key',
|
|
312
|
+
* };
|
|
313
|
+
* ```
|
|
314
|
+
*/
|
|
315
|
+
interface AuthContextV2 extends AuthContext {
|
|
316
|
+
/**
|
|
317
|
+
* Platform-specific adapter for storage, UI, and broadcasting.
|
|
318
|
+
*
|
|
319
|
+
* When provided, the SDK will use the adapter to:
|
|
320
|
+
* - Retrieve user credentials from platform storage
|
|
321
|
+
* - Show error/success messages in platform UI
|
|
322
|
+
* - Broadcast operations using platform-specific methods (Keychain, HiveAuth)
|
|
323
|
+
* - Invalidate React Query caches after mutations
|
|
324
|
+
*
|
|
325
|
+
* @remarks
|
|
326
|
+
* If not provided, SDK falls back to using postingKey/accessToken directly.
|
|
327
|
+
*/
|
|
328
|
+
adapter?: PlatformAdapter;
|
|
329
|
+
/**
|
|
330
|
+
* Whether to enable automatic fallback between auth methods.
|
|
331
|
+
*
|
|
332
|
+
* @remarks
|
|
333
|
+
* The actual behavior is:
|
|
334
|
+
* - When adapter is provided: defaults to true (fallback enabled)
|
|
335
|
+
* - When no adapter: defaults to false (legacy behavior)
|
|
336
|
+
*
|
|
337
|
+
* This is evaluated at runtime as: `auth?.enableFallback !== false && auth?.adapter`
|
|
338
|
+
*
|
|
339
|
+
* Set to `false` explicitly to disable fallback even with an adapter.
|
|
340
|
+
*
|
|
341
|
+
* @default undefined (evaluated as true when adapter exists, false otherwise)
|
|
342
|
+
*
|
|
343
|
+
* @example
|
|
344
|
+
* ```typescript
|
|
345
|
+
* // User has Keychain but it fails -> try posting key -> try HiveSigner
|
|
346
|
+
* const authContext: AuthContextV2 = {
|
|
347
|
+
* adapter: myAdapter,
|
|
348
|
+
* enableFallback: true,
|
|
349
|
+
* fallbackChain: ['keychain', 'key', 'hivesigner'],
|
|
350
|
+
* };
|
|
351
|
+
* ```
|
|
352
|
+
*/
|
|
353
|
+
enableFallback?: boolean;
|
|
354
|
+
/**
|
|
355
|
+
* Order of authentication methods to try during fallback.
|
|
356
|
+
*
|
|
357
|
+
* Available methods:
|
|
358
|
+
* - 'key': Direct private key (adapter.getPostingKey or getActiveKey)
|
|
359
|
+
* - 'hiveauth': HiveAuth protocol (adapter.broadcastWithHiveAuth)
|
|
360
|
+
* - 'hivesigner': HiveSigner OAuth (adapter.getAccessToken)
|
|
361
|
+
* - 'keychain': Keychain extension (adapter.broadcastWithKeychain)
|
|
362
|
+
* - 'custom': Use AuthContext.broadcast()
|
|
363
|
+
*
|
|
364
|
+
* @default ['key', 'hiveauth', 'hivesigner', 'keychain', 'custom']
|
|
365
|
+
*
|
|
366
|
+
* @remarks
|
|
367
|
+
* Set this to customize the order or exclude methods. For example:
|
|
368
|
+
* - Mobile priority: ['hiveauth', 'hivesigner', 'key']
|
|
369
|
+
* - Web priority: ['keychain', 'key', 'hivesigner']
|
|
370
|
+
*
|
|
371
|
+
* @see broadcastWithFallback for the runtime implementation
|
|
372
|
+
*/
|
|
373
|
+
fallbackChain?: AuthMethod[];
|
|
374
|
+
}
|
|
36
375
|
|
|
37
376
|
/**
|
|
38
377
|
* Generic pagination metadata for wrapped API responses
|
|
@@ -85,9 +424,9 @@ interface AccountProfile {
|
|
|
85
424
|
|
|
86
425
|
interface FullAccount {
|
|
87
426
|
name: string;
|
|
88
|
-
owner: Authority;
|
|
89
|
-
active: Authority;
|
|
90
|
-
posting: Authority;
|
|
427
|
+
owner: Authority$1;
|
|
428
|
+
active: Authority$1;
|
|
429
|
+
posting: Authority$1;
|
|
91
430
|
memo_key: string;
|
|
92
431
|
post_count: number;
|
|
93
432
|
created: string;
|
|
@@ -834,7 +1173,66 @@ declare function getAccountSubscriptionsQueryOptions(username: string | undefine
|
|
|
834
1173
|
};
|
|
835
1174
|
};
|
|
836
1175
|
|
|
837
|
-
|
|
1176
|
+
/**
|
|
1177
|
+
* React Query mutation hook for broadcasting Hive operations.
|
|
1178
|
+
* Supports multiple authentication methods with automatic fallback.
|
|
1179
|
+
*
|
|
1180
|
+
* @template T - Type of the mutation payload
|
|
1181
|
+
* @param mutationKey - React Query mutation key for cache management
|
|
1182
|
+
* @param username - Hive username (required for broadcast)
|
|
1183
|
+
* @param operations - Function that converts payload to Hive operations
|
|
1184
|
+
* @param onSuccess - Success callback after broadcast completes
|
|
1185
|
+
* @param auth - Authentication context (supports both legacy AuthContext and new AuthContextV2)
|
|
1186
|
+
* @param authority - Key authority to use ('posting' | 'active' | 'owner' | 'memo'), defaults to 'posting'
|
|
1187
|
+
*
|
|
1188
|
+
* @returns React Query mutation result
|
|
1189
|
+
*
|
|
1190
|
+
* @remarks
|
|
1191
|
+
* **Authentication Flow:**
|
|
1192
|
+
*
|
|
1193
|
+
* 1. **With AuthContextV2 + adapter + enableFallback** (recommended for new code):
|
|
1194
|
+
* - Tries auth methods in fallbackChain order
|
|
1195
|
+
* - Smart fallback: only retries on auth errors, not RC/network errors
|
|
1196
|
+
* - Uses platform adapter for storage, UI, and broadcasting
|
|
1197
|
+
*
|
|
1198
|
+
* 2. **With legacy AuthContext** (backward compatible):
|
|
1199
|
+
* - Tries auth.broadcast() first (custom implementation)
|
|
1200
|
+
* - Falls back to postingKey if available
|
|
1201
|
+
* - Falls back to accessToken (HiveSigner) if available
|
|
1202
|
+
* - Throws if no auth method available
|
|
1203
|
+
*
|
|
1204
|
+
* **Backward Compatibility:**
|
|
1205
|
+
* - All existing code using AuthContext will continue to work
|
|
1206
|
+
* - AuthContextV2 extends AuthContext, so it's a drop-in replacement
|
|
1207
|
+
* - enableFallback defaults to false if no adapter provided
|
|
1208
|
+
*
|
|
1209
|
+
* @example
|
|
1210
|
+
* ```typescript
|
|
1211
|
+
* // New pattern with platform adapter and fallback
|
|
1212
|
+
* const mutation = useBroadcastMutation(
|
|
1213
|
+
* ['vote'],
|
|
1214
|
+
* username,
|
|
1215
|
+
* (payload) => [voteOperation(payload)],
|
|
1216
|
+
* () => console.log('Success!'),
|
|
1217
|
+
* {
|
|
1218
|
+
* adapter: myAdapter,
|
|
1219
|
+
* enableFallback: true,
|
|
1220
|
+
* fallbackChain: ['keychain', 'key', 'hivesigner']
|
|
1221
|
+
* },
|
|
1222
|
+
* 'posting'
|
|
1223
|
+
* );
|
|
1224
|
+
*
|
|
1225
|
+
* // Legacy pattern (still works)
|
|
1226
|
+
* const mutation = useBroadcastMutation(
|
|
1227
|
+
* ['vote'],
|
|
1228
|
+
* username,
|
|
1229
|
+
* (payload) => [voteOperation(payload)],
|
|
1230
|
+
* () => console.log('Success!'),
|
|
1231
|
+
* { postingKey: 'wif-key' }
|
|
1232
|
+
* );
|
|
1233
|
+
* ```
|
|
1234
|
+
*/
|
|
1235
|
+
declare function useBroadcastMutation<T>(mutationKey: MutationKey | undefined, username: string | undefined, operations: (payload: T) => Operation[], onSuccess?: UseMutationOptions<unknown, Error, T>["onSuccess"], auth?: AuthContextV2, authority?: 'posting' | 'active' | 'owner' | 'memo'): _tanstack_react_query.UseMutationResult<unknown, Error, T, unknown>;
|
|
838
1236
|
|
|
839
1237
|
declare function broadcastJson<T>(username: string | undefined, id: string, payload: T, auth?: AuthContext): Promise<any>;
|
|
840
1238
|
|
|
@@ -890,6 +1288,121 @@ declare namespace ConfigManager {
|
|
|
890
1288
|
function setDmcaLists(lists?: DmcaListsInput): void;
|
|
891
1289
|
}
|
|
892
1290
|
|
|
1291
|
+
/**
|
|
1292
|
+
* Chain error handling utilities
|
|
1293
|
+
* Extracted from web's operations.ts and mobile's dhive.ts error handling patterns
|
|
1294
|
+
*/
|
|
1295
|
+
declare enum ErrorType {
|
|
1296
|
+
COMMON = "common",
|
|
1297
|
+
INFO = "info",
|
|
1298
|
+
INSUFFICIENT_RESOURCE_CREDITS = "insufficient_resource_credits",
|
|
1299
|
+
MISSING_AUTHORITY = "missing_authority",
|
|
1300
|
+
TOKEN_EXPIRED = "token_expired",
|
|
1301
|
+
NETWORK = "network",
|
|
1302
|
+
TIMEOUT = "timeout",
|
|
1303
|
+
VALIDATION = "validation"
|
|
1304
|
+
}
|
|
1305
|
+
interface ParsedChainError {
|
|
1306
|
+
message: string;
|
|
1307
|
+
type: ErrorType;
|
|
1308
|
+
originalError?: any;
|
|
1309
|
+
}
|
|
1310
|
+
/**
|
|
1311
|
+
* Parses Hive blockchain errors into standardized format.
|
|
1312
|
+
* Extracted from web's operations.ts and mobile's dhive.ts error handling.
|
|
1313
|
+
*
|
|
1314
|
+
* @param error - The error object or string from a blockchain operation
|
|
1315
|
+
* @returns Parsed error with user-friendly message and categorized type
|
|
1316
|
+
*
|
|
1317
|
+
* @example
|
|
1318
|
+
* ```typescript
|
|
1319
|
+
* try {
|
|
1320
|
+
* await vote(...);
|
|
1321
|
+
* } catch (error) {
|
|
1322
|
+
* const parsed = parseChainError(error);
|
|
1323
|
+
* console.log(parsed.message); // "Insufficient Resource Credits. Please wait or power up."
|
|
1324
|
+
* console.log(parsed.type); // ErrorType.INSUFFICIENT_RESOURCE_CREDITS
|
|
1325
|
+
* }
|
|
1326
|
+
* ```
|
|
1327
|
+
*/
|
|
1328
|
+
declare function parseChainError(error: any): ParsedChainError;
|
|
1329
|
+
/**
|
|
1330
|
+
* Formats error for display to user.
|
|
1331
|
+
* Returns tuple of [message, type] for backward compatibility with existing code.
|
|
1332
|
+
*
|
|
1333
|
+
* This function maintains compatibility with the old formatError signature from
|
|
1334
|
+
* web's operations.ts (line 59-84) and mobile's dhive.ts error handling.
|
|
1335
|
+
*
|
|
1336
|
+
* @param error - The error object or string
|
|
1337
|
+
* @returns Tuple of [user-friendly message, error type]
|
|
1338
|
+
*
|
|
1339
|
+
* @example
|
|
1340
|
+
* ```typescript
|
|
1341
|
+
* try {
|
|
1342
|
+
* await transfer(...);
|
|
1343
|
+
* } catch (error) {
|
|
1344
|
+
* const [message, type] = formatError(error);
|
|
1345
|
+
* showToast(message, type);
|
|
1346
|
+
* }
|
|
1347
|
+
* ```
|
|
1348
|
+
*/
|
|
1349
|
+
declare function formatError(error: any): [string, ErrorType];
|
|
1350
|
+
/**
|
|
1351
|
+
* Checks if error indicates missing authority and should trigger auth fallback.
|
|
1352
|
+
* Used by the SDK's useBroadcastMutation to determine if it should retry with
|
|
1353
|
+
* an alternate authentication method.
|
|
1354
|
+
*
|
|
1355
|
+
* @param error - The error object or string
|
|
1356
|
+
* @returns true if auth fallback should be attempted
|
|
1357
|
+
*
|
|
1358
|
+
* @example
|
|
1359
|
+
* ```typescript
|
|
1360
|
+
* try {
|
|
1361
|
+
* await broadcast(operations);
|
|
1362
|
+
* } catch (error) {
|
|
1363
|
+
* if (shouldTriggerAuthFallback(error)) {
|
|
1364
|
+
* // Try with alternate auth method
|
|
1365
|
+
* await broadcastWithHiveAuth(operations);
|
|
1366
|
+
* }
|
|
1367
|
+
* }
|
|
1368
|
+
* ```
|
|
1369
|
+
*/
|
|
1370
|
+
declare function shouldTriggerAuthFallback(error: any): boolean;
|
|
1371
|
+
/**
|
|
1372
|
+
* Checks if error is a resource credits (RC) error.
|
|
1373
|
+
* Useful for showing specific UI feedback about RC issues.
|
|
1374
|
+
*
|
|
1375
|
+
* @param error - The error object or string
|
|
1376
|
+
* @returns true if the error is related to insufficient RC
|
|
1377
|
+
*
|
|
1378
|
+
* @example
|
|
1379
|
+
* ```typescript
|
|
1380
|
+
* try {
|
|
1381
|
+
* await vote(...);
|
|
1382
|
+
* } catch (error) {
|
|
1383
|
+
* if (isResourceCreditsError(error)) {
|
|
1384
|
+
* showRCWarning(); // Show specific RC education/power up UI
|
|
1385
|
+
* }
|
|
1386
|
+
* }
|
|
1387
|
+
* ```
|
|
1388
|
+
*/
|
|
1389
|
+
declare function isResourceCreditsError(error: any): boolean;
|
|
1390
|
+
/**
|
|
1391
|
+
* Checks if error is informational (not critical).
|
|
1392
|
+
* Informational errors typically don't need retry logic.
|
|
1393
|
+
*
|
|
1394
|
+
* @param error - The error object or string
|
|
1395
|
+
* @returns true if the error is informational
|
|
1396
|
+
*/
|
|
1397
|
+
declare function isInfoError(error: any): boolean;
|
|
1398
|
+
/**
|
|
1399
|
+
* Checks if error is network-related and should be retried.
|
|
1400
|
+
*
|
|
1401
|
+
* @param error - The error object or string
|
|
1402
|
+
* @returns true if the error is network-related
|
|
1403
|
+
*/
|
|
1404
|
+
declare function isNetworkError(error: any): boolean;
|
|
1405
|
+
|
|
893
1406
|
declare function makeQueryClient(): QueryClient;
|
|
894
1407
|
declare const getQueryClient: () => QueryClient;
|
|
895
1408
|
declare namespace EcencyQueriesManager {
|
|
@@ -1404,6 +1917,641 @@ declare function downVotingPower(account: FullAccount): number;
|
|
|
1404
1917
|
declare function rcPower(account: RCAccount): number;
|
|
1405
1918
|
declare function votingValue(account: FullAccount, dynamicProps: DynamicProps, votingPowerValue: number, weight?: number): number;
|
|
1406
1919
|
|
|
1920
|
+
/**
|
|
1921
|
+
* Content Operations
|
|
1922
|
+
* Operations for creating, voting, and managing content on Hive blockchain
|
|
1923
|
+
*/
|
|
1924
|
+
/**
|
|
1925
|
+
* Builds a vote operation.
|
|
1926
|
+
* @param voter - Account casting the vote
|
|
1927
|
+
* @param author - Author of the post/comment
|
|
1928
|
+
* @param permlink - Permlink of the post/comment
|
|
1929
|
+
* @param weight - Vote weight (-10000 to 10000, where 10000 = 100% upvote, -10000 = 100% downvote)
|
|
1930
|
+
* @returns Vote operation
|
|
1931
|
+
*/
|
|
1932
|
+
declare function buildVoteOp(voter: string, author: string, permlink: string, weight: number): Operation;
|
|
1933
|
+
/**
|
|
1934
|
+
* Builds a comment operation (for posts or replies).
|
|
1935
|
+
* @param author - Author of the comment/post
|
|
1936
|
+
* @param permlink - Permlink of the comment/post
|
|
1937
|
+
* @param parentAuthor - Parent author (empty string for top-level posts)
|
|
1938
|
+
* @param parentPermlink - Parent permlink (category/tag for top-level posts)
|
|
1939
|
+
* @param title - Title of the post (empty for comments)
|
|
1940
|
+
* @param body - Content body (required - cannot be empty)
|
|
1941
|
+
* @param jsonMetadata - JSON metadata object
|
|
1942
|
+
* @returns Comment operation
|
|
1943
|
+
*/
|
|
1944
|
+
declare function buildCommentOp(author: string, permlink: string, parentAuthor: string, parentPermlink: string, title: string, body: string, jsonMetadata: Record<string, any>): Operation;
|
|
1945
|
+
/**
|
|
1946
|
+
* Builds a comment options operation (for setting beneficiaries, rewards, etc.).
|
|
1947
|
+
* @param author - Author of the comment/post
|
|
1948
|
+
* @param permlink - Permlink of the comment/post
|
|
1949
|
+
* @param maxAcceptedPayout - Maximum accepted payout (e.g., "1000000.000 HBD")
|
|
1950
|
+
* @param percentHbd - Percent of payout in HBD (10000 = 100%)
|
|
1951
|
+
* @param allowVotes - Allow votes on this content
|
|
1952
|
+
* @param allowCurationRewards - Allow curation rewards
|
|
1953
|
+
* @param extensions - Extensions array (for beneficiaries, etc.)
|
|
1954
|
+
* @returns Comment options operation
|
|
1955
|
+
*/
|
|
1956
|
+
declare function buildCommentOptionsOp(author: string, permlink: string, maxAcceptedPayout: string, percentHbd: number, allowVotes: boolean, allowCurationRewards: boolean, extensions: any[]): Operation;
|
|
1957
|
+
/**
|
|
1958
|
+
* Builds a delete comment operation.
|
|
1959
|
+
* @param author - Author of the comment/post to delete
|
|
1960
|
+
* @param permlink - Permlink of the comment/post to delete
|
|
1961
|
+
* @returns Delete comment operation
|
|
1962
|
+
*/
|
|
1963
|
+
declare function buildDeleteCommentOp(author: string, permlink: string): Operation;
|
|
1964
|
+
/**
|
|
1965
|
+
* Builds a reblog operation (custom_json).
|
|
1966
|
+
* @param account - Account performing the reblog
|
|
1967
|
+
* @param author - Original post author
|
|
1968
|
+
* @param permlink - Original post permlink
|
|
1969
|
+
* @param deleteReblog - If true, removes the reblog
|
|
1970
|
+
* @returns Custom JSON operation for reblog
|
|
1971
|
+
*/
|
|
1972
|
+
declare function buildReblogOp(account: string, author: string, permlink: string, deleteReblog?: boolean): Operation;
|
|
1973
|
+
|
|
1974
|
+
/**
|
|
1975
|
+
* Wallet Operations
|
|
1976
|
+
* Operations for managing tokens, savings, vesting, and conversions
|
|
1977
|
+
*/
|
|
1978
|
+
/**
|
|
1979
|
+
* Builds a transfer operation.
|
|
1980
|
+
* @param from - Sender account
|
|
1981
|
+
* @param to - Receiver account
|
|
1982
|
+
* @param amount - Amount with asset symbol (e.g., "1.000 HIVE")
|
|
1983
|
+
* @param memo - Transfer memo
|
|
1984
|
+
* @returns Transfer operation
|
|
1985
|
+
*/
|
|
1986
|
+
declare function buildTransferOp(from: string, to: string, amount: string, memo: string): Operation;
|
|
1987
|
+
/**
|
|
1988
|
+
* Builds multiple transfer operations for multiple recipients.
|
|
1989
|
+
* @param from - Sender account
|
|
1990
|
+
* @param destinations - Comma or space separated list of recipient accounts
|
|
1991
|
+
* @param amount - Amount with asset symbol (e.g., "1.000 HIVE")
|
|
1992
|
+
* @param memo - Transfer memo
|
|
1993
|
+
* @returns Array of transfer operations
|
|
1994
|
+
*/
|
|
1995
|
+
declare function buildMultiTransferOps(from: string, destinations: string, amount: string, memo: string): Operation[];
|
|
1996
|
+
/**
|
|
1997
|
+
* Builds a recurrent transfer operation.
|
|
1998
|
+
* @param from - Sender account
|
|
1999
|
+
* @param to - Receiver account
|
|
2000
|
+
* @param amount - Amount with asset symbol (e.g., "1.000 HIVE")
|
|
2001
|
+
* @param memo - Transfer memo
|
|
2002
|
+
* @param recurrence - Recurrence in hours
|
|
2003
|
+
* @param executions - Number of executions (2 = executes twice)
|
|
2004
|
+
* @returns Recurrent transfer operation
|
|
2005
|
+
*/
|
|
2006
|
+
declare function buildRecurrentTransferOp(from: string, to: string, amount: string, memo: string, recurrence: number, executions: number): Operation;
|
|
2007
|
+
/**
|
|
2008
|
+
* Builds a transfer to savings operation.
|
|
2009
|
+
* @param from - Sender account
|
|
2010
|
+
* @param to - Receiver account
|
|
2011
|
+
* @param amount - Amount with asset symbol (e.g., "1.000 HIVE")
|
|
2012
|
+
* @param memo - Transfer memo
|
|
2013
|
+
* @returns Transfer to savings operation
|
|
2014
|
+
*/
|
|
2015
|
+
declare function buildTransferToSavingsOp(from: string, to: string, amount: string, memo: string): Operation;
|
|
2016
|
+
/**
|
|
2017
|
+
* Builds a transfer from savings operation.
|
|
2018
|
+
* @param from - Sender account
|
|
2019
|
+
* @param to - Receiver account
|
|
2020
|
+
* @param amount - Amount with asset symbol (e.g., "1.000 HIVE")
|
|
2021
|
+
* @param memo - Transfer memo
|
|
2022
|
+
* @param requestId - Unique request ID (use timestamp)
|
|
2023
|
+
* @returns Transfer from savings operation
|
|
2024
|
+
*/
|
|
2025
|
+
declare function buildTransferFromSavingsOp(from: string, to: string, amount: string, memo: string, requestId: number): Operation;
|
|
2026
|
+
/**
|
|
2027
|
+
* Builds a cancel transfer from savings operation.
|
|
2028
|
+
* @param from - Account that initiated the savings withdrawal
|
|
2029
|
+
* @param requestId - Request ID to cancel
|
|
2030
|
+
* @returns Cancel transfer from savings operation
|
|
2031
|
+
*/
|
|
2032
|
+
declare function buildCancelTransferFromSavingsOp(from: string, requestId: number): Operation;
|
|
2033
|
+
/**
|
|
2034
|
+
* Builds operations to claim savings interest.
|
|
2035
|
+
* Creates a transfer_from_savings and immediately cancels it to claim interest.
|
|
2036
|
+
* @param from - Account claiming interest
|
|
2037
|
+
* @param to - Receiver account
|
|
2038
|
+
* @param amount - Amount with asset symbol (e.g., "0.001 HIVE")
|
|
2039
|
+
* @param memo - Transfer memo
|
|
2040
|
+
* @param requestId - Unique request ID
|
|
2041
|
+
* @returns Array of operations [transfer_from_savings, cancel_transfer_from_savings]
|
|
2042
|
+
*/
|
|
2043
|
+
declare function buildClaimInterestOps(from: string, to: string, amount: string, memo: string, requestId: number): Operation[];
|
|
2044
|
+
/**
|
|
2045
|
+
* Builds a transfer to vesting operation (power up).
|
|
2046
|
+
* @param from - Account sending HIVE
|
|
2047
|
+
* @param to - Account receiving Hive Power
|
|
2048
|
+
* @param amount - Amount with HIVE symbol (e.g., "1.000 HIVE")
|
|
2049
|
+
* @returns Transfer to vesting operation
|
|
2050
|
+
*/
|
|
2051
|
+
declare function buildTransferToVestingOp(from: string, to: string, amount: string): Operation;
|
|
2052
|
+
/**
|
|
2053
|
+
* Builds a withdraw vesting operation (power down).
|
|
2054
|
+
* @param account - Account withdrawing vesting
|
|
2055
|
+
* @param vestingShares - Amount of VESTS to withdraw (e.g., "1.000000 VESTS")
|
|
2056
|
+
* @returns Withdraw vesting operation
|
|
2057
|
+
*/
|
|
2058
|
+
declare function buildWithdrawVestingOp(account: string, vestingShares: string): Operation;
|
|
2059
|
+
/**
|
|
2060
|
+
* Builds a delegate vesting shares operation (HP delegation).
|
|
2061
|
+
* @param delegator - Account delegating HP
|
|
2062
|
+
* @param delegatee - Account receiving HP delegation
|
|
2063
|
+
* @param vestingShares - Amount of VESTS to delegate (e.g., "1000.000000 VESTS")
|
|
2064
|
+
* @returns Delegate vesting shares operation
|
|
2065
|
+
*/
|
|
2066
|
+
declare function buildDelegateVestingSharesOp(delegator: string, delegatee: string, vestingShares: string): Operation;
|
|
2067
|
+
/**
|
|
2068
|
+
* Builds a set withdraw vesting route operation.
|
|
2069
|
+
* @param fromAccount - Account withdrawing vesting
|
|
2070
|
+
* @param toAccount - Account receiving withdrawn vesting
|
|
2071
|
+
* @param percent - Percentage to route (0-10000, where 10000 = 100%)
|
|
2072
|
+
* @param autoVest - Auto convert to vesting
|
|
2073
|
+
* @returns Set withdraw vesting route operation
|
|
2074
|
+
*/
|
|
2075
|
+
declare function buildSetWithdrawVestingRouteOp(fromAccount: string, toAccount: string, percent: number, autoVest: boolean): Operation;
|
|
2076
|
+
/**
|
|
2077
|
+
* Builds a convert operation (HBD to HIVE).
|
|
2078
|
+
* @param owner - Account converting HBD
|
|
2079
|
+
* @param amount - Amount of HBD to convert (e.g., "1.000 HBD")
|
|
2080
|
+
* @param requestId - Unique request ID (use timestamp)
|
|
2081
|
+
* @returns Convert operation
|
|
2082
|
+
*/
|
|
2083
|
+
declare function buildConvertOp(owner: string, amount: string, requestId: number): Operation;
|
|
2084
|
+
/**
|
|
2085
|
+
* Builds a collateralized convert operation (HIVE to HBD via collateral).
|
|
2086
|
+
* @param owner - Account converting HIVE
|
|
2087
|
+
* @param amount - Amount of HIVE to convert (e.g., "1.000 HIVE")
|
|
2088
|
+
* @param requestId - Unique request ID (use timestamp)
|
|
2089
|
+
* @returns Collateralized convert operation
|
|
2090
|
+
*/
|
|
2091
|
+
declare function buildCollateralizedConvertOp(owner: string, amount: string, requestId: number): Operation;
|
|
2092
|
+
/**
|
|
2093
|
+
* Builds a delegate RC operation (custom_json).
|
|
2094
|
+
* @param from - Account delegating RC
|
|
2095
|
+
* @param delegatees - Single delegatee or comma-separated list
|
|
2096
|
+
* @param maxRc - Maximum RC to delegate (in mana units)
|
|
2097
|
+
* @returns Custom JSON operation for RC delegation
|
|
2098
|
+
*/
|
|
2099
|
+
declare function buildDelegateRcOp(from: string, delegatees: string, maxRc: string | number): Operation;
|
|
2100
|
+
|
|
2101
|
+
/**
|
|
2102
|
+
* Social Operations
|
|
2103
|
+
* Operations for following, muting, and managing social relationships
|
|
2104
|
+
*/
|
|
2105
|
+
/**
|
|
2106
|
+
* Builds a follow operation (custom_json).
|
|
2107
|
+
* @param follower - Account following
|
|
2108
|
+
* @param following - Account to follow
|
|
2109
|
+
* @returns Custom JSON operation for follow
|
|
2110
|
+
*/
|
|
2111
|
+
declare function buildFollowOp(follower: string, following: string): Operation;
|
|
2112
|
+
/**
|
|
2113
|
+
* Builds an unfollow operation (custom_json).
|
|
2114
|
+
* @param follower - Account unfollowing
|
|
2115
|
+
* @param following - Account to unfollow
|
|
2116
|
+
* @returns Custom JSON operation for unfollow
|
|
2117
|
+
*/
|
|
2118
|
+
declare function buildUnfollowOp(follower: string, following: string): Operation;
|
|
2119
|
+
/**
|
|
2120
|
+
* Builds an ignore/mute operation (custom_json).
|
|
2121
|
+
* @param follower - Account ignoring
|
|
2122
|
+
* @param following - Account to ignore
|
|
2123
|
+
* @returns Custom JSON operation for ignore
|
|
2124
|
+
*/
|
|
2125
|
+
declare function buildIgnoreOp(follower: string, following: string): Operation;
|
|
2126
|
+
/**
|
|
2127
|
+
* Builds an unignore/unmute operation (custom_json).
|
|
2128
|
+
* @param follower - Account unignoring
|
|
2129
|
+
* @param following - Account to unignore
|
|
2130
|
+
* @returns Custom JSON operation for unignore
|
|
2131
|
+
*/
|
|
2132
|
+
declare function buildUnignoreOp(follower: string, following: string): Operation;
|
|
2133
|
+
/**
|
|
2134
|
+
* Builds a Hive Notify set last read operation (custom_json).
|
|
2135
|
+
* @param username - Account setting last read
|
|
2136
|
+
* @param date - ISO date string (defaults to now)
|
|
2137
|
+
* @returns Array of custom JSON operations for setting last read
|
|
2138
|
+
*/
|
|
2139
|
+
declare function buildSetLastReadOps(username: string, date?: string): Operation[];
|
|
2140
|
+
|
|
2141
|
+
/**
|
|
2142
|
+
* Governance Operations
|
|
2143
|
+
* Operations for witness voting, proposals, and proxy management
|
|
2144
|
+
*/
|
|
2145
|
+
/**
|
|
2146
|
+
* Builds an account witness vote operation.
|
|
2147
|
+
* @param account - Account voting
|
|
2148
|
+
* @param witness - Witness account name
|
|
2149
|
+
* @param approve - True to approve, false to disapprove
|
|
2150
|
+
* @returns Account witness vote operation
|
|
2151
|
+
*/
|
|
2152
|
+
declare function buildWitnessVoteOp(account: string, witness: string, approve: boolean): Operation;
|
|
2153
|
+
/**
|
|
2154
|
+
* Builds an account witness proxy operation.
|
|
2155
|
+
* @param account - Account setting proxy
|
|
2156
|
+
* @param proxy - Proxy account name (empty string to remove proxy)
|
|
2157
|
+
* @returns Account witness proxy operation
|
|
2158
|
+
*/
|
|
2159
|
+
declare function buildWitnessProxyOp(account: string, proxy: string): Operation;
|
|
2160
|
+
/**
|
|
2161
|
+
* Payload for proposal creation
|
|
2162
|
+
*/
|
|
2163
|
+
interface ProposalCreatePayload {
|
|
2164
|
+
receiver: string;
|
|
2165
|
+
subject: string;
|
|
2166
|
+
permlink: string;
|
|
2167
|
+
start: string;
|
|
2168
|
+
end: string;
|
|
2169
|
+
dailyPay: string;
|
|
2170
|
+
}
|
|
2171
|
+
/**
|
|
2172
|
+
* Builds a create proposal operation.
|
|
2173
|
+
* @param creator - Account creating the proposal
|
|
2174
|
+
* @param payload - Proposal details (must include start, end, and dailyPay)
|
|
2175
|
+
* @returns Create proposal operation
|
|
2176
|
+
*/
|
|
2177
|
+
declare function buildProposalCreateOp(creator: string, payload: ProposalCreatePayload): Operation;
|
|
2178
|
+
/**
|
|
2179
|
+
* Builds an update proposal votes operation.
|
|
2180
|
+
* @param voter - Account voting
|
|
2181
|
+
* @param proposalIds - Array of proposal IDs
|
|
2182
|
+
* @param approve - True to approve, false to disapprove
|
|
2183
|
+
* @returns Update proposal votes operation
|
|
2184
|
+
*/
|
|
2185
|
+
declare function buildProposalVoteOp(voter: string, proposalIds: number[], approve: boolean): Operation;
|
|
2186
|
+
/**
|
|
2187
|
+
* Builds a remove proposal operation.
|
|
2188
|
+
* @param proposalOwner - Owner of the proposal
|
|
2189
|
+
* @param proposalIds - Array of proposal IDs to remove
|
|
2190
|
+
* @returns Remove proposal operation
|
|
2191
|
+
*/
|
|
2192
|
+
declare function buildRemoveProposalOp(proposalOwner: string, proposalIds: number[]): Operation;
|
|
2193
|
+
/**
|
|
2194
|
+
* Builds an update proposal operation.
|
|
2195
|
+
* @param proposalId - Proposal ID to update (must be a valid number, including 0)
|
|
2196
|
+
* @param creator - Account that created the proposal
|
|
2197
|
+
* @param dailyPay - New daily pay amount
|
|
2198
|
+
* @param subject - New subject
|
|
2199
|
+
* @param permlink - New permlink
|
|
2200
|
+
* @returns Update proposal operation
|
|
2201
|
+
*/
|
|
2202
|
+
declare function buildUpdateProposalOp(proposalId: number, creator: string, dailyPay: string, subject: string, permlink: string): Operation;
|
|
2203
|
+
|
|
2204
|
+
/**
|
|
2205
|
+
* Community Operations
|
|
2206
|
+
* Operations for managing Hive communities
|
|
2207
|
+
*/
|
|
2208
|
+
/**
|
|
2209
|
+
* Builds a subscribe to community operation (custom_json).
|
|
2210
|
+
* @param username - Account subscribing
|
|
2211
|
+
* @param community - Community name (e.g., "hive-123456")
|
|
2212
|
+
* @returns Custom JSON operation for subscribe
|
|
2213
|
+
*/
|
|
2214
|
+
declare function buildSubscribeOp(username: string, community: string): Operation;
|
|
2215
|
+
/**
|
|
2216
|
+
* Builds an unsubscribe from community operation (custom_json).
|
|
2217
|
+
* @param username - Account unsubscribing
|
|
2218
|
+
* @param community - Community name (e.g., "hive-123456")
|
|
2219
|
+
* @returns Custom JSON operation for unsubscribe
|
|
2220
|
+
*/
|
|
2221
|
+
declare function buildUnsubscribeOp(username: string, community: string): Operation;
|
|
2222
|
+
/**
|
|
2223
|
+
* Builds a set user role in community operation (custom_json).
|
|
2224
|
+
* @param username - Account setting the role (must have permission)
|
|
2225
|
+
* @param community - Community name (e.g., "hive-123456")
|
|
2226
|
+
* @param account - Account to set role for
|
|
2227
|
+
* @param role - Role name (e.g., "admin", "mod", "member", "guest")
|
|
2228
|
+
* @returns Custom JSON operation for setRole
|
|
2229
|
+
*/
|
|
2230
|
+
declare function buildSetRoleOp(username: string, community: string, account: string, role: string): Operation;
|
|
2231
|
+
/**
|
|
2232
|
+
* Community properties for update
|
|
2233
|
+
*/
|
|
2234
|
+
interface CommunityProps {
|
|
2235
|
+
title: string;
|
|
2236
|
+
about: string;
|
|
2237
|
+
lang: string;
|
|
2238
|
+
description: string;
|
|
2239
|
+
flag_text: string;
|
|
2240
|
+
is_nsfw: boolean;
|
|
2241
|
+
}
|
|
2242
|
+
/**
|
|
2243
|
+
* Builds an update community properties operation (custom_json).
|
|
2244
|
+
* @param username - Account updating (must be community admin)
|
|
2245
|
+
* @param community - Community name (e.g., "hive-123456")
|
|
2246
|
+
* @param props - Properties to update
|
|
2247
|
+
* @returns Custom JSON operation for updateProps
|
|
2248
|
+
*/
|
|
2249
|
+
declare function buildUpdateCommunityOp(username: string, community: string, props: CommunityProps): Operation;
|
|
2250
|
+
/**
|
|
2251
|
+
* Builds a pin/unpin post in community operation (custom_json).
|
|
2252
|
+
* @param username - Account pinning (must have permission)
|
|
2253
|
+
* @param community - Community name (e.g., "hive-123456")
|
|
2254
|
+
* @param account - Post author
|
|
2255
|
+
* @param permlink - Post permlink
|
|
2256
|
+
* @param pin - True to pin, false to unpin
|
|
2257
|
+
* @returns Custom JSON operation for pinPost/unpinPost
|
|
2258
|
+
*/
|
|
2259
|
+
declare function buildPinPostOp(username: string, community: string, account: string, permlink: string, pin: boolean): Operation;
|
|
2260
|
+
/**
|
|
2261
|
+
* Builds a mute/unmute post in community operation (custom_json).
|
|
2262
|
+
* @param username - Account muting (must have permission)
|
|
2263
|
+
* @param community - Community name (e.g., "hive-123456")
|
|
2264
|
+
* @param account - Post author
|
|
2265
|
+
* @param permlink - Post permlink
|
|
2266
|
+
* @param notes - Mute reason/notes
|
|
2267
|
+
* @param mute - True to mute, false to unmute
|
|
2268
|
+
* @returns Custom JSON operation for mutePost/unmutePost
|
|
2269
|
+
*/
|
|
2270
|
+
declare function buildMutePostOp(username: string, community: string, account: string, permlink: string, notes: string, mute: boolean): Operation;
|
|
2271
|
+
/**
|
|
2272
|
+
* Builds a mute/unmute user in community operation (custom_json).
|
|
2273
|
+
* @param username - Account performing mute (must have permission)
|
|
2274
|
+
* @param community - Community name (e.g., "hive-123456")
|
|
2275
|
+
* @param account - Account to mute/unmute
|
|
2276
|
+
* @param notes - Mute reason/notes
|
|
2277
|
+
* @param mute - True to mute, false to unmute
|
|
2278
|
+
* @returns Custom JSON operation for muteUser/unmuteUser
|
|
2279
|
+
*/
|
|
2280
|
+
declare function buildMuteUserOp(username: string, community: string, account: string, notes: string, mute: boolean): Operation;
|
|
2281
|
+
/**
|
|
2282
|
+
* Builds a flag post in community operation (custom_json).
|
|
2283
|
+
* @param username - Account flagging
|
|
2284
|
+
* @param community - Community name (e.g., "hive-123456")
|
|
2285
|
+
* @param account - Post author
|
|
2286
|
+
* @param permlink - Post permlink
|
|
2287
|
+
* @param notes - Flag reason/notes
|
|
2288
|
+
* @returns Custom JSON operation for flagPost
|
|
2289
|
+
*/
|
|
2290
|
+
declare function buildFlagPostOp(username: string, community: string, account: string, permlink: string, notes: string): Operation;
|
|
2291
|
+
|
|
2292
|
+
/**
|
|
2293
|
+
* Market Operations
|
|
2294
|
+
* Operations for trading on the internal Hive market
|
|
2295
|
+
*/
|
|
2296
|
+
/**
|
|
2297
|
+
* Transaction type for buy/sell operations
|
|
2298
|
+
*/
|
|
2299
|
+
declare enum BuySellTransactionType {
|
|
2300
|
+
Buy = "buy",
|
|
2301
|
+
Sell = "sell"
|
|
2302
|
+
}
|
|
2303
|
+
/**
|
|
2304
|
+
* Order ID prefix for different order types
|
|
2305
|
+
*/
|
|
2306
|
+
declare enum OrderIdPrefix {
|
|
2307
|
+
EMPTY = "",
|
|
2308
|
+
SWAP = "9"
|
|
2309
|
+
}
|
|
2310
|
+
/**
|
|
2311
|
+
* Builds a limit order create operation.
|
|
2312
|
+
* @param owner - Account creating the order
|
|
2313
|
+
* @param amountToSell - Amount and asset to sell
|
|
2314
|
+
* @param minToReceive - Minimum amount and asset to receive
|
|
2315
|
+
* @param fillOrKill - If true, order must be filled immediately or cancelled
|
|
2316
|
+
* @param expiration - Expiration date (ISO string)
|
|
2317
|
+
* @param orderId - Unique order ID
|
|
2318
|
+
* @returns Limit order create operation
|
|
2319
|
+
*/
|
|
2320
|
+
declare function buildLimitOrderCreateOp(owner: string, amountToSell: string, minToReceive: string, fillOrKill: boolean, expiration: string, orderId: number): Operation;
|
|
2321
|
+
/**
|
|
2322
|
+
* Builds a limit order create operation with automatic formatting.
|
|
2323
|
+
* This is a convenience method that handles buy/sell logic and formatting.
|
|
2324
|
+
*
|
|
2325
|
+
* For Buy orders: You're buying HIVE with HBD
|
|
2326
|
+
* - amountToSell: HBD amount you're spending
|
|
2327
|
+
* - minToReceive: HIVE amount you want to receive
|
|
2328
|
+
*
|
|
2329
|
+
* For Sell orders: You're selling HIVE for HBD
|
|
2330
|
+
* - amountToSell: HIVE amount you're selling
|
|
2331
|
+
* - minToReceive: HBD amount you want to receive
|
|
2332
|
+
*
|
|
2333
|
+
* @param owner - Account creating the order
|
|
2334
|
+
* @param amountToSell - Amount to sell (number)
|
|
2335
|
+
* @param minToReceive - Minimum to receive (number)
|
|
2336
|
+
* @param orderType - Buy or Sell
|
|
2337
|
+
* @param idPrefix - Order ID prefix
|
|
2338
|
+
* @returns Limit order create operation
|
|
2339
|
+
*/
|
|
2340
|
+
declare function buildLimitOrderCreateOpWithType(owner: string, amountToSell: number, minToReceive: number, orderType: BuySellTransactionType, idPrefix?: OrderIdPrefix): Operation;
|
|
2341
|
+
/**
|
|
2342
|
+
* Builds a limit order cancel operation.
|
|
2343
|
+
* @param owner - Account cancelling the order
|
|
2344
|
+
* @param orderId - Order ID to cancel
|
|
2345
|
+
* @returns Limit order cancel operation
|
|
2346
|
+
*/
|
|
2347
|
+
declare function buildLimitOrderCancelOp(owner: string, orderId: number): Operation;
|
|
2348
|
+
/**
|
|
2349
|
+
* Builds a claim reward balance operation.
|
|
2350
|
+
* @param account - Account claiming rewards
|
|
2351
|
+
* @param rewardHive - HIVE reward to claim (e.g., "0.000 HIVE")
|
|
2352
|
+
* @param rewardHbd - HBD reward to claim (e.g., "0.000 HBD")
|
|
2353
|
+
* @param rewardVests - VESTS reward to claim (e.g., "0.000000 VESTS")
|
|
2354
|
+
* @returns Claim reward balance operation
|
|
2355
|
+
*/
|
|
2356
|
+
declare function buildClaimRewardBalanceOp(account: string, rewardHive: string, rewardHbd: string, rewardVests: string): Operation;
|
|
2357
|
+
|
|
2358
|
+
/**
|
|
2359
|
+
* Account Operations
|
|
2360
|
+
* Operations for managing accounts, keys, and permissions
|
|
2361
|
+
*/
|
|
2362
|
+
/**
|
|
2363
|
+
* Authority structure for account operations
|
|
2364
|
+
*/
|
|
2365
|
+
interface Authority {
|
|
2366
|
+
weight_threshold: number;
|
|
2367
|
+
account_auths: [string, number][];
|
|
2368
|
+
key_auths: [string, number][];
|
|
2369
|
+
}
|
|
2370
|
+
/**
|
|
2371
|
+
* Builds an account update operation.
|
|
2372
|
+
* @param account - Account name
|
|
2373
|
+
* @param owner - Owner authority (optional)
|
|
2374
|
+
* @param active - Active authority (optional)
|
|
2375
|
+
* @param posting - Posting authority (optional)
|
|
2376
|
+
* @param memoKey - Memo public key
|
|
2377
|
+
* @param jsonMetadata - Account JSON metadata
|
|
2378
|
+
* @returns Account update operation
|
|
2379
|
+
*/
|
|
2380
|
+
declare function buildAccountUpdateOp(account: string, owner: Authority | undefined, active: Authority | undefined, posting: Authority | undefined, memoKey: string, jsonMetadata: string): Operation;
|
|
2381
|
+
/**
|
|
2382
|
+
* Builds an account update2 operation (for posting_json_metadata).
|
|
2383
|
+
* @param account - Account name
|
|
2384
|
+
* @param jsonMetadata - Account JSON metadata (legacy, usually empty)
|
|
2385
|
+
* @param postingJsonMetadata - Posting JSON metadata string
|
|
2386
|
+
* @param extensions - Extensions array
|
|
2387
|
+
* @returns Account update2 operation
|
|
2388
|
+
*/
|
|
2389
|
+
declare function buildAccountUpdate2Op(account: string, jsonMetadata: string, postingJsonMetadata: string, extensions: any[]): Operation;
|
|
2390
|
+
/**
|
|
2391
|
+
* Public keys for account creation
|
|
2392
|
+
*/
|
|
2393
|
+
interface AccountKeys {
|
|
2394
|
+
ownerPublicKey: string;
|
|
2395
|
+
activePublicKey: string;
|
|
2396
|
+
postingPublicKey: string;
|
|
2397
|
+
memoPublicKey: string;
|
|
2398
|
+
}
|
|
2399
|
+
/**
|
|
2400
|
+
* Builds an account create operation.
|
|
2401
|
+
* @param creator - Creator account name
|
|
2402
|
+
* @param newAccountName - New account name
|
|
2403
|
+
* @param keys - Public keys for the new account
|
|
2404
|
+
* @param fee - Creation fee (e.g., "3.000 HIVE")
|
|
2405
|
+
* @returns Account create operation
|
|
2406
|
+
*/
|
|
2407
|
+
declare function buildAccountCreateOp(creator: string, newAccountName: string, keys: AccountKeys, fee: string): Operation;
|
|
2408
|
+
/**
|
|
2409
|
+
* Builds a create claimed account operation (using account creation tokens).
|
|
2410
|
+
* @param creator - Creator account name
|
|
2411
|
+
* @param newAccountName - New account name
|
|
2412
|
+
* @param keys - Public keys for the new account
|
|
2413
|
+
* @returns Create claimed account operation
|
|
2414
|
+
*/
|
|
2415
|
+
declare function buildCreateClaimedAccountOp(creator: string, newAccountName: string, keys: AccountKeys): Operation;
|
|
2416
|
+
/**
|
|
2417
|
+
* Builds a claim account operation.
|
|
2418
|
+
* @param creator - Account claiming the token
|
|
2419
|
+
* @param fee - Fee for claiming (usually "0.000 HIVE" for RC-based claims)
|
|
2420
|
+
* @returns Claim account operation
|
|
2421
|
+
*/
|
|
2422
|
+
declare function buildClaimAccountOp(creator: string, fee: string): Operation;
|
|
2423
|
+
/**
|
|
2424
|
+
* Builds an operation to grant posting permission to another account.
|
|
2425
|
+
* Helper that modifies posting authority to add an account.
|
|
2426
|
+
* @param account - Account granting permission
|
|
2427
|
+
* @param currentPosting - Current posting authority
|
|
2428
|
+
* @param grantedAccount - Account to grant permission to
|
|
2429
|
+
* @param weightThreshold - Weight threshold of the granted account
|
|
2430
|
+
* @param memoKey - Memo public key (required by Hive blockchain)
|
|
2431
|
+
* @param jsonMetadata - Account JSON metadata (required by Hive blockchain)
|
|
2432
|
+
* @returns Account update operation with modified posting authority
|
|
2433
|
+
*/
|
|
2434
|
+
declare function buildGrantPostingPermissionOp(account: string, currentPosting: Authority, grantedAccount: string, weightThreshold: number, memoKey: string, jsonMetadata: string): Operation;
|
|
2435
|
+
/**
|
|
2436
|
+
* Builds an operation to revoke posting permission from an account.
|
|
2437
|
+
* Helper that modifies posting authority to remove an account.
|
|
2438
|
+
* @param account - Account revoking permission
|
|
2439
|
+
* @param currentPosting - Current posting authority
|
|
2440
|
+
* @param revokedAccount - Account to revoke permission from
|
|
2441
|
+
* @param memoKey - Memo public key (required by Hive blockchain)
|
|
2442
|
+
* @param jsonMetadata - Account JSON metadata (required by Hive blockchain)
|
|
2443
|
+
* @returns Account update operation with modified posting authority
|
|
2444
|
+
*/
|
|
2445
|
+
declare function buildRevokePostingPermissionOp(account: string, currentPosting: Authority, revokedAccount: string, memoKey: string, jsonMetadata: string): Operation;
|
|
2446
|
+
/**
|
|
2447
|
+
* Builds a change recovery account operation.
|
|
2448
|
+
* @param accountToRecover - Account to change recovery account for
|
|
2449
|
+
* @param newRecoveryAccount - New recovery account name
|
|
2450
|
+
* @param extensions - Extensions array
|
|
2451
|
+
* @returns Change recovery account operation
|
|
2452
|
+
*/
|
|
2453
|
+
declare function buildChangeRecoveryAccountOp(accountToRecover: string, newRecoveryAccount: string, extensions?: any[]): Operation;
|
|
2454
|
+
/**
|
|
2455
|
+
* Builds a request account recovery operation.
|
|
2456
|
+
* @param recoveryAccount - Recovery account performing the recovery
|
|
2457
|
+
* @param accountToRecover - Account to recover
|
|
2458
|
+
* @param newOwnerAuthority - New owner authority
|
|
2459
|
+
* @param extensions - Extensions array
|
|
2460
|
+
* @returns Request account recovery operation
|
|
2461
|
+
*/
|
|
2462
|
+
declare function buildRequestAccountRecoveryOp(recoveryAccount: string, accountToRecover: string, newOwnerAuthority: Authority, extensions?: any[]): Operation;
|
|
2463
|
+
/**
|
|
2464
|
+
* Builds a recover account operation.
|
|
2465
|
+
* @param accountToRecover - Account to recover
|
|
2466
|
+
* @param newOwnerAuthority - New owner authority
|
|
2467
|
+
* @param recentOwnerAuthority - Recent owner authority (for proof)
|
|
2468
|
+
* @param extensions - Extensions array
|
|
2469
|
+
* @returns Recover account operation
|
|
2470
|
+
*/
|
|
2471
|
+
declare function buildRecoverAccountOp(accountToRecover: string, newOwnerAuthority: Authority, recentOwnerAuthority: Authority, extensions?: any[]): Operation;
|
|
2472
|
+
|
|
2473
|
+
/**
|
|
2474
|
+
* Ecency-Specific Operations
|
|
2475
|
+
* Custom operations for Ecency platform features (Points, Boost, Promote, etc.)
|
|
2476
|
+
*/
|
|
2477
|
+
/**
|
|
2478
|
+
* Builds an Ecency boost operation (custom_json with active authority).
|
|
2479
|
+
* @param user - User account
|
|
2480
|
+
* @param author - Post author
|
|
2481
|
+
* @param permlink - Post permlink
|
|
2482
|
+
* @param amount - Amount to boost (e.g., "1.000 POINT")
|
|
2483
|
+
* @returns Custom JSON operation for boost
|
|
2484
|
+
*/
|
|
2485
|
+
declare function buildBoostOp(user: string, author: string, permlink: string, amount: string): Operation;
|
|
2486
|
+
/**
|
|
2487
|
+
* Builds an Ecency boost operation with numeric point value.
|
|
2488
|
+
* @param user - User account
|
|
2489
|
+
* @param author - Post author
|
|
2490
|
+
* @param permlink - Post permlink
|
|
2491
|
+
* @param points - Points to spend (will be formatted as "X.XXX POINT", must be a valid finite number)
|
|
2492
|
+
* @returns Custom JSON operation for boost
|
|
2493
|
+
*/
|
|
2494
|
+
declare function buildBoostOpWithPoints(user: string, author: string, permlink: string, points: number): Operation;
|
|
2495
|
+
/**
|
|
2496
|
+
* Builds an Ecency Boost Plus subscription operation (custom_json).
|
|
2497
|
+
* @param user - User account
|
|
2498
|
+
* @param account - Account to subscribe
|
|
2499
|
+
* @param duration - Subscription duration in days (must be a valid finite number)
|
|
2500
|
+
* @returns Custom JSON operation for boost plus
|
|
2501
|
+
*/
|
|
2502
|
+
declare function buildBoostPlusOp(user: string, account: string, duration: number): Operation;
|
|
2503
|
+
/**
|
|
2504
|
+
* Builds an Ecency promote operation (custom_json).
|
|
2505
|
+
* @param user - User account
|
|
2506
|
+
* @param author - Post author
|
|
2507
|
+
* @param permlink - Post permlink
|
|
2508
|
+
* @param duration - Promotion duration in days (must be a valid finite number)
|
|
2509
|
+
* @returns Custom JSON operation for promote
|
|
2510
|
+
*/
|
|
2511
|
+
declare function buildPromoteOp(user: string, author: string, permlink: string, duration: number): Operation;
|
|
2512
|
+
/**
|
|
2513
|
+
* Builds an Ecency point transfer operation (custom_json).
|
|
2514
|
+
* @param sender - Sender account
|
|
2515
|
+
* @param receiver - Receiver account
|
|
2516
|
+
* @param amount - Amount to transfer
|
|
2517
|
+
* @param memo - Transfer memo
|
|
2518
|
+
* @returns Custom JSON operation for point transfer
|
|
2519
|
+
*/
|
|
2520
|
+
declare function buildPointTransferOp(sender: string, receiver: string, amount: string, memo: string): Operation;
|
|
2521
|
+
/**
|
|
2522
|
+
* Builds multiple Ecency point transfer operations for multiple recipients.
|
|
2523
|
+
* @param sender - Sender account
|
|
2524
|
+
* @param destinations - Comma or space separated list of recipients
|
|
2525
|
+
* @param amount - Amount to transfer
|
|
2526
|
+
* @param memo - Transfer memo
|
|
2527
|
+
* @returns Array of custom JSON operations for point transfers
|
|
2528
|
+
*/
|
|
2529
|
+
declare function buildMultiPointTransferOps(sender: string, destinations: string, amount: string, memo: string): Operation[];
|
|
2530
|
+
/**
|
|
2531
|
+
* Builds an Ecency community rewards registration operation (custom_json).
|
|
2532
|
+
* @param name - Account name to register
|
|
2533
|
+
* @returns Custom JSON operation for community registration
|
|
2534
|
+
*/
|
|
2535
|
+
declare function buildCommunityRegistrationOp(name: string): Operation;
|
|
2536
|
+
/**
|
|
2537
|
+
* Builds a generic active authority custom_json operation.
|
|
2538
|
+
* Used for various Ecency operations that require active authority.
|
|
2539
|
+
* @param username - Account performing the operation
|
|
2540
|
+
* @param operationId - Custom JSON operation ID
|
|
2541
|
+
* @param json - JSON payload
|
|
2542
|
+
* @returns Custom JSON operation with active authority
|
|
2543
|
+
*/
|
|
2544
|
+
declare function buildActiveCustomJsonOp(username: string, operationId: string, json: Record<string, any>): Operation;
|
|
2545
|
+
/**
|
|
2546
|
+
* Builds a generic posting authority custom_json operation.
|
|
2547
|
+
* Used for various operations that require posting authority.
|
|
2548
|
+
* @param username - Account performing the operation
|
|
2549
|
+
* @param operationId - Custom JSON operation ID
|
|
2550
|
+
* @param json - JSON payload
|
|
2551
|
+
* @returns Custom JSON operation with posting authority
|
|
2552
|
+
*/
|
|
2553
|
+
declare function buildPostingCustomJsonOp(username: string, operationId: string, json: Record<string, any> | any[]): Operation;
|
|
2554
|
+
|
|
1407
2555
|
declare function useSignOperationByKey(username: string | undefined): _tanstack_react_query.UseMutationResult<_hiveio_dhive.TransactionConfirmation, Error, {
|
|
1408
2556
|
operation: Operation;
|
|
1409
2557
|
keyOrSeed: string;
|
|
@@ -1914,6 +3062,234 @@ declare function useUploadImage(onSuccess?: (data: {
|
|
|
1914
3062
|
signal?: AbortSignal;
|
|
1915
3063
|
}, unknown>;
|
|
1916
3064
|
|
|
3065
|
+
/**
|
|
3066
|
+
* Payload for voting on a post or comment.
|
|
3067
|
+
*/
|
|
3068
|
+
interface VotePayload {
|
|
3069
|
+
/** Author of the post/comment to vote on */
|
|
3070
|
+
author: string;
|
|
3071
|
+
/** Permlink of the post/comment to vote on */
|
|
3072
|
+
permlink: string;
|
|
3073
|
+
/** Vote weight (-10000 to 10000, where 10000 = 100% upvote, -10000 = 100% downvote) */
|
|
3074
|
+
weight: number;
|
|
3075
|
+
}
|
|
3076
|
+
/**
|
|
3077
|
+
* React Query mutation hook for voting on posts and comments.
|
|
3078
|
+
*
|
|
3079
|
+
* This mutation broadcasts a vote operation to the Hive blockchain,
|
|
3080
|
+
* supporting upvotes (positive weight) and downvotes (negative weight).
|
|
3081
|
+
*
|
|
3082
|
+
* @param username - The username of the voter (required for broadcast)
|
|
3083
|
+
* @param auth - Authentication context with platform adapter and fallback configuration
|
|
3084
|
+
*
|
|
3085
|
+
* @returns React Query mutation result
|
|
3086
|
+
*
|
|
3087
|
+
* @remarks
|
|
3088
|
+
* **Post-Broadcast Actions:**
|
|
3089
|
+
* - Records activity (type 120) if adapter.recordActivity is available
|
|
3090
|
+
* - Invalidates post cache to refetch updated vote data
|
|
3091
|
+
* - Invalidates voting power cache to show updated VP
|
|
3092
|
+
*
|
|
3093
|
+
* **Vote Weight:**
|
|
3094
|
+
* - 10000 = 100% upvote
|
|
3095
|
+
* - 0 = remove vote
|
|
3096
|
+
* - -10000 = 100% downvote
|
|
3097
|
+
*
|
|
3098
|
+
* @example
|
|
3099
|
+
* ```typescript
|
|
3100
|
+
* const voteMutation = useVote(username, {
|
|
3101
|
+
* adapter: myAdapter,
|
|
3102
|
+
* enableFallback: true,
|
|
3103
|
+
* fallbackChain: ['keychain', 'key', 'hivesigner']
|
|
3104
|
+
* });
|
|
3105
|
+
*
|
|
3106
|
+
* // Upvote a post
|
|
3107
|
+
* voteMutation.mutate({
|
|
3108
|
+
* author: 'alice',
|
|
3109
|
+
* permlink: 'my-awesome-post',
|
|
3110
|
+
* weight: 10000
|
|
3111
|
+
* });
|
|
3112
|
+
*
|
|
3113
|
+
* // Remove vote
|
|
3114
|
+
* voteMutation.mutate({
|
|
3115
|
+
* author: 'alice',
|
|
3116
|
+
* permlink: 'my-awesome-post',
|
|
3117
|
+
* weight: 0
|
|
3118
|
+
* });
|
|
3119
|
+
*
|
|
3120
|
+
* // Downvote
|
|
3121
|
+
* voteMutation.mutate({
|
|
3122
|
+
* author: 'alice',
|
|
3123
|
+
* permlink: 'my-awesome-post',
|
|
3124
|
+
* weight: -10000
|
|
3125
|
+
* });
|
|
3126
|
+
* ```
|
|
3127
|
+
*/
|
|
3128
|
+
declare function useVote(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, VotePayload, unknown>;
|
|
3129
|
+
|
|
3130
|
+
/**
|
|
3131
|
+
* Payload for reblogging a post.
|
|
3132
|
+
*/
|
|
3133
|
+
interface ReblogPayload {
|
|
3134
|
+
/** Original post author */
|
|
3135
|
+
author: string;
|
|
3136
|
+
/** Original post permlink */
|
|
3137
|
+
permlink: string;
|
|
3138
|
+
/** If true, removes the reblog instead of creating it */
|
|
3139
|
+
deleteReblog?: boolean;
|
|
3140
|
+
}
|
|
3141
|
+
/**
|
|
3142
|
+
* React Query mutation hook for reblogging posts.
|
|
3143
|
+
*
|
|
3144
|
+
* This mutation broadcasts a custom_json operation to reblog (or un-reblog)
|
|
3145
|
+
* a post to the user's blog feed.
|
|
3146
|
+
*
|
|
3147
|
+
* @param username - The username performing the reblog (required for broadcast)
|
|
3148
|
+
* @param auth - Authentication context with platform adapter and fallback configuration
|
|
3149
|
+
*
|
|
3150
|
+
* @returns React Query mutation result
|
|
3151
|
+
*
|
|
3152
|
+
* @remarks
|
|
3153
|
+
* **Post-Broadcast Actions:**
|
|
3154
|
+
* - Records activity (type 130) if adapter.recordActivity is available
|
|
3155
|
+
* - Invalidates blog feed cache to show the reblogged post
|
|
3156
|
+
* - Invalidates post cache to update reblog status
|
|
3157
|
+
*
|
|
3158
|
+
* **Reblog vs Delete:**
|
|
3159
|
+
* - deleteReblog: false (default) - Creates a reblog
|
|
3160
|
+
* - deleteReblog: true - Removes an existing reblog
|
|
3161
|
+
*
|
|
3162
|
+
* @example
|
|
3163
|
+
* ```typescript
|
|
3164
|
+
* const reblogMutation = useReblog(username, {
|
|
3165
|
+
* adapter: myAdapter,
|
|
3166
|
+
* enableFallback: true,
|
|
3167
|
+
* fallbackChain: ['keychain', 'key', 'hivesigner']
|
|
3168
|
+
* });
|
|
3169
|
+
*
|
|
3170
|
+
* // Reblog a post
|
|
3171
|
+
* reblogMutation.mutate({
|
|
3172
|
+
* author: 'alice',
|
|
3173
|
+
* permlink: 'my-awesome-post'
|
|
3174
|
+
* });
|
|
3175
|
+
*
|
|
3176
|
+
* // Remove a reblog
|
|
3177
|
+
* reblogMutation.mutate({
|
|
3178
|
+
* author: 'alice',
|
|
3179
|
+
* permlink: 'my-awesome-post',
|
|
3180
|
+
* deleteReblog: true
|
|
3181
|
+
* });
|
|
3182
|
+
* ```
|
|
3183
|
+
*/
|
|
3184
|
+
declare function useReblog(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ReblogPayload, unknown>;
|
|
3185
|
+
|
|
3186
|
+
/**
|
|
3187
|
+
* Beneficiary account and weight.
|
|
3188
|
+
*/
|
|
3189
|
+
interface Beneficiary {
|
|
3190
|
+
/** Beneficiary account name */
|
|
3191
|
+
account: string;
|
|
3192
|
+
/** Beneficiary weight (10000 = 100%) */
|
|
3193
|
+
weight: number;
|
|
3194
|
+
}
|
|
3195
|
+
/**
|
|
3196
|
+
* Payload for creating a comment or post.
|
|
3197
|
+
*/
|
|
3198
|
+
interface CommentPayload {
|
|
3199
|
+
/** Author of the comment/post */
|
|
3200
|
+
author: string;
|
|
3201
|
+
/** Permlink of the comment/post */
|
|
3202
|
+
permlink: string;
|
|
3203
|
+
/** Parent author (empty string for top-level posts) */
|
|
3204
|
+
parentAuthor: string;
|
|
3205
|
+
/** Parent permlink (category/tag for top-level posts) */
|
|
3206
|
+
parentPermlink: string;
|
|
3207
|
+
/** Title of the post (empty for comments) */
|
|
3208
|
+
title: string;
|
|
3209
|
+
/** Content body */
|
|
3210
|
+
body: string;
|
|
3211
|
+
/** JSON metadata object */
|
|
3212
|
+
jsonMetadata: Record<string, any>;
|
|
3213
|
+
/** Optional: Comment options (beneficiaries, rewards) */
|
|
3214
|
+
options?: {
|
|
3215
|
+
/** Maximum accepted payout (e.g., "1000000.000 HBD") */
|
|
3216
|
+
maxAcceptedPayout?: string;
|
|
3217
|
+
/** Percent of payout in HBD (10000 = 100%) */
|
|
3218
|
+
percentHbd?: number;
|
|
3219
|
+
/** Allow votes on this content */
|
|
3220
|
+
allowVotes?: boolean;
|
|
3221
|
+
/** Allow curation rewards */
|
|
3222
|
+
allowCurationRewards?: boolean;
|
|
3223
|
+
/** Beneficiaries array */
|
|
3224
|
+
beneficiaries?: Beneficiary[];
|
|
3225
|
+
};
|
|
3226
|
+
}
|
|
3227
|
+
/**
|
|
3228
|
+
* React Query mutation hook for creating posts and comments.
|
|
3229
|
+
*
|
|
3230
|
+
* This mutation broadcasts a comment operation (and optionally comment_options)
|
|
3231
|
+
* to create a new post or reply on the Hive blockchain.
|
|
3232
|
+
*
|
|
3233
|
+
* @param username - The username creating the comment/post (required for broadcast)
|
|
3234
|
+
* @param auth - Authentication context with platform adapter and fallback configuration
|
|
3235
|
+
*
|
|
3236
|
+
* @returns React Query mutation result
|
|
3237
|
+
*
|
|
3238
|
+
* @remarks
|
|
3239
|
+
* **Post-Broadcast Actions:**
|
|
3240
|
+
* - Records activity (type 100 for posts, 110 for comments) if adapter.recordActivity is available
|
|
3241
|
+
* - Invalidates feed caches to show the new content
|
|
3242
|
+
* - Invalidates parent post cache if this is a reply
|
|
3243
|
+
*
|
|
3244
|
+
* **Operations:**
|
|
3245
|
+
* - Always includes a comment operation
|
|
3246
|
+
* - Optionally includes comment_options operation for beneficiaries/rewards
|
|
3247
|
+
*
|
|
3248
|
+
* **Post vs Comment:**
|
|
3249
|
+
* - Post: parentAuthor = "", parentPermlink = category/tag
|
|
3250
|
+
* - Comment: parentAuthor = parent author, parentPermlink = parent permlink
|
|
3251
|
+
*
|
|
3252
|
+
* @example
|
|
3253
|
+
* ```typescript
|
|
3254
|
+
* const commentMutation = useComment(username, {
|
|
3255
|
+
* adapter: myAdapter,
|
|
3256
|
+
* enableFallback: true,
|
|
3257
|
+
* fallbackChain: ['keychain', 'key', 'hivesigner']
|
|
3258
|
+
* });
|
|
3259
|
+
*
|
|
3260
|
+
* // Create a post
|
|
3261
|
+
* commentMutation.mutate({
|
|
3262
|
+
* author: 'alice',
|
|
3263
|
+
* permlink: 'my-awesome-post-20260209',
|
|
3264
|
+
* parentAuthor: '',
|
|
3265
|
+
* parentPermlink: 'technology',
|
|
3266
|
+
* title: 'My Awesome Post',
|
|
3267
|
+
* body: 'This is the post content...',
|
|
3268
|
+
* jsonMetadata: {
|
|
3269
|
+
* tags: ['technology', 'hive'],
|
|
3270
|
+
* app: 'ecency/3.0.0'
|
|
3271
|
+
* },
|
|
3272
|
+
* options: {
|
|
3273
|
+
* beneficiaries: [
|
|
3274
|
+
* { account: 'ecency', weight: 500 }
|
|
3275
|
+
* ]
|
|
3276
|
+
* }
|
|
3277
|
+
* });
|
|
3278
|
+
*
|
|
3279
|
+
* // Create a comment
|
|
3280
|
+
* commentMutation.mutate({
|
|
3281
|
+
* author: 'bob',
|
|
3282
|
+
* permlink: 're-alice-my-awesome-post-20260209',
|
|
3283
|
+
* parentAuthor: 'alice',
|
|
3284
|
+
* parentPermlink: 'my-awesome-post-20260209',
|
|
3285
|
+
* title: '',
|
|
3286
|
+
* body: 'Great post!',
|
|
3287
|
+
* jsonMetadata: { app: 'ecency/3.0.0' }
|
|
3288
|
+
* });
|
|
3289
|
+
* ```
|
|
3290
|
+
*/
|
|
3291
|
+
declare function useComment(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, CommentPayload, unknown>;
|
|
3292
|
+
|
|
1917
3293
|
type EntryWithPostId = Entry$1 & {
|
|
1918
3294
|
post_id: number;
|
|
1919
3295
|
};
|
|
@@ -2818,6 +4194,70 @@ declare function getUserProposalVotesQueryOptions(voter: string): _tanstack_reac
|
|
|
2818
4194
|
};
|
|
2819
4195
|
};
|
|
2820
4196
|
|
|
4197
|
+
/**
|
|
4198
|
+
* Payload for voting on proposals.
|
|
4199
|
+
*/
|
|
4200
|
+
interface ProposalVotePayload {
|
|
4201
|
+
/** Array of proposal IDs to vote on */
|
|
4202
|
+
proposalIds: number[];
|
|
4203
|
+
/** True to approve, false to disapprove */
|
|
4204
|
+
approve: boolean;
|
|
4205
|
+
}
|
|
4206
|
+
/**
|
|
4207
|
+
* React Query mutation hook for voting on Hive proposals.
|
|
4208
|
+
*
|
|
4209
|
+
* This mutation broadcasts an update_proposal_votes operation to vote on
|
|
4210
|
+
* one or more proposals in the Hive Decentralized Fund (HDF).
|
|
4211
|
+
*
|
|
4212
|
+
* @param username - The username voting on proposals (required for broadcast)
|
|
4213
|
+
* @param auth - Authentication context with platform adapter and fallback configuration
|
|
4214
|
+
*
|
|
4215
|
+
* @returns React Query mutation result
|
|
4216
|
+
*
|
|
4217
|
+
* @remarks
|
|
4218
|
+
* **Post-Broadcast Actions:**
|
|
4219
|
+
* - Records activity (type 150) if adapter.recordActivity is available
|
|
4220
|
+
* - Invalidates proposal list cache to show updated vote status
|
|
4221
|
+
* - Invalidates voter's proposal votes cache
|
|
4222
|
+
*
|
|
4223
|
+
* **Multiple Proposals:**
|
|
4224
|
+
* - You can vote on multiple proposals in a single transaction
|
|
4225
|
+
* - All proposals receive the same vote (approve or disapprove)
|
|
4226
|
+
* - Proposal IDs are integers, not strings
|
|
4227
|
+
*
|
|
4228
|
+
* **Vote Types:**
|
|
4229
|
+
* - approve: true - Vote in favor of the proposal(s)
|
|
4230
|
+
* - approve: false - Remove your vote from the proposal(s)
|
|
4231
|
+
*
|
|
4232
|
+
* @example
|
|
4233
|
+
* ```typescript
|
|
4234
|
+
* const proposalVoteMutation = useProposalVote(username, {
|
|
4235
|
+
* adapter: myAdapter,
|
|
4236
|
+
* enableFallback: true,
|
|
4237
|
+
* fallbackChain: ['keychain', 'key', 'hivesigner']
|
|
4238
|
+
* });
|
|
4239
|
+
*
|
|
4240
|
+
* // Approve a single proposal
|
|
4241
|
+
* proposalVoteMutation.mutate({
|
|
4242
|
+
* proposalIds: [123],
|
|
4243
|
+
* approve: true
|
|
4244
|
+
* });
|
|
4245
|
+
*
|
|
4246
|
+
* // Approve multiple proposals
|
|
4247
|
+
* proposalVoteMutation.mutate({
|
|
4248
|
+
* proposalIds: [123, 124, 125],
|
|
4249
|
+
* approve: true
|
|
4250
|
+
* });
|
|
4251
|
+
*
|
|
4252
|
+
* // Remove vote from a proposal
|
|
4253
|
+
* proposalVoteMutation.mutate({
|
|
4254
|
+
* proposalIds: [123],
|
|
4255
|
+
* approve: false
|
|
4256
|
+
* });
|
|
4257
|
+
* ```
|
|
4258
|
+
*/
|
|
4259
|
+
declare function useProposalVote(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<unknown, Error, ProposalVotePayload, unknown>;
|
|
4260
|
+
|
|
2821
4261
|
interface DelegatedVestingShare {
|
|
2822
4262
|
id: number;
|
|
2823
4263
|
delegatee: string;
|
|
@@ -3098,6 +4538,72 @@ declare function getPortfolioQueryOptions(username: string, currency?: string, o
|
|
|
3098
4538
|
};
|
|
3099
4539
|
};
|
|
3100
4540
|
|
|
4541
|
+
/**
|
|
4542
|
+
* Payload for transferring tokens.
|
|
4543
|
+
*/
|
|
4544
|
+
interface TransferPayload {
|
|
4545
|
+
/** Recipient account */
|
|
4546
|
+
to: string;
|
|
4547
|
+
/** Amount with asset symbol (e.g., "1.000 HIVE", "5.000 HBD") */
|
|
4548
|
+
amount: string;
|
|
4549
|
+
/** Transfer memo */
|
|
4550
|
+
memo: string;
|
|
4551
|
+
}
|
|
4552
|
+
/**
|
|
4553
|
+
* React Query mutation hook for transferring tokens.
|
|
4554
|
+
*
|
|
4555
|
+
* This mutation broadcasts a transfer operation to send HIVE, HBD, or other
|
|
4556
|
+
* Hive-based tokens to another account. **Requires ACTIVE authority**, not posting.
|
|
4557
|
+
*
|
|
4558
|
+
* @param username - The username sending the transfer (required for broadcast)
|
|
4559
|
+
* @param auth - Authentication context with platform adapter and fallback configuration
|
|
4560
|
+
*
|
|
4561
|
+
* @returns React Query mutation result
|
|
4562
|
+
*
|
|
4563
|
+
* @remarks
|
|
4564
|
+
* **IMPORTANT: Active Authority Required**
|
|
4565
|
+
* - Transfer operations require ACTIVE key, not posting key
|
|
4566
|
+
* - Make sure your auth adapter provides getActiveKey() method
|
|
4567
|
+
* - Keychain/HiveAuth will prompt for Active authority
|
|
4568
|
+
*
|
|
4569
|
+
* **Post-Broadcast Actions:**
|
|
4570
|
+
* - Records activity (type 140) if adapter.recordActivity is available
|
|
4571
|
+
* - Invalidates wallet balance caches to show updated balances
|
|
4572
|
+
* - Invalidates transaction history
|
|
4573
|
+
*
|
|
4574
|
+
* **Supported Assets:**
|
|
4575
|
+
* - HIVE: "1.000 HIVE"
|
|
4576
|
+
* - HBD: "5.000 HBD"
|
|
4577
|
+
* - Amount must include exactly 3 decimal places
|
|
4578
|
+
*
|
|
4579
|
+
* @example
|
|
4580
|
+
* ```typescript
|
|
4581
|
+
* const transferMutation = useTransfer(username, {
|
|
4582
|
+
* adapter: {
|
|
4583
|
+
* ...myAdapter,
|
|
4584
|
+
* getActiveKey: async (username) => getActiveKeyFromStorage(username)
|
|
4585
|
+
* },
|
|
4586
|
+
* enableFallback: true,
|
|
4587
|
+
* fallbackChain: ['keychain', 'key', 'hivesigner']
|
|
4588
|
+
* });
|
|
4589
|
+
*
|
|
4590
|
+
* // Transfer HIVE
|
|
4591
|
+
* transferMutation.mutate({
|
|
4592
|
+
* to: 'alice',
|
|
4593
|
+
* amount: '10.000 HIVE',
|
|
4594
|
+
* memo: 'Thanks for the post!'
|
|
4595
|
+
* });
|
|
4596
|
+
*
|
|
4597
|
+
* // Transfer HBD
|
|
4598
|
+
* transferMutation.mutate({
|
|
4599
|
+
* to: 'bob',
|
|
4600
|
+
* amount: '5.000 HBD',
|
|
4601
|
+
* memo: ''
|
|
4602
|
+
* });
|
|
4603
|
+
* ```
|
|
4604
|
+
*/
|
|
4605
|
+
declare function useTransfer(username: string | undefined, auth?: AuthContextV2): _tanstack_react_query.UseMutationResult<any, Error, TransferPayload, unknown>;
|
|
4606
|
+
|
|
3101
4607
|
interface Witness {
|
|
3102
4608
|
total_missed: number;
|
|
3103
4609
|
url: string;
|
|
@@ -3628,4 +5134,4 @@ declare function getHiveEngineUnclaimedRewards<T = Record<string, unknown>>(user
|
|
|
3628
5134
|
declare function getSpkWallet<T = Record<string, unknown>>(username: string): Promise<T>;
|
|
3629
5135
|
declare function getSpkMarkets<T = Record<string, unknown>>(): Promise<T>;
|
|
3630
5136
|
|
|
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 };
|
|
5137
|
+
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 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 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, 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 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, 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, 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, useGameClaim, useMarkNotificationsRead, useMoveSchedule, useProposalVote, useReblog, useRecordActivity, useRemoveFragment, useSignOperationByHivesigner, useSignOperationByKey, useSignOperationByKeychain, useTransfer, useUpdateDraft, useUploadImage, useVote, usrActivity, validatePostCreating, votingPower, votingValue };
|