@ecency/sdk 1.5.1 → 1.5.3

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/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # @ecency/sdk
2
2
 
3
- Utilities for building Hive applications with React and TypeScript.
3
+ Framework-agnostic data layer for Hive apps with first-class React Query support.
4
4
 
5
- ## Features
5
+ ## What’s Inside
6
6
 
7
7
  - Query and mutation option builders powered by [@tanstack/react-query](https://tanstack.com/query)
8
- - Modules for accounts, posts, operations, communities, games, analytics, keychain integrations, and more
9
- - Configurable Hive RPC client and storage via the `CONFIG` object
8
+ - Modular APIs: accounts, posts, communities, market, wallet, notifications, analytics, integrations, core, auth, bridge, games, hive-engine, operations, points, private-api, promotions, proposals, resource-credits, search, spk, witnesses
9
+ - Central configuration via `CONFIG` / `ConfigManager` (RPC client, QueryClient)
10
10
 
11
11
  ## Installation
12
12
 
@@ -16,15 +16,150 @@ yarn add @ecency/sdk
16
16
  npm install @ecency/sdk
17
17
  ```
18
18
 
19
- ## Usage
19
+ ## Quick Start (React Query)
20
20
 
21
21
  ```ts
22
- import { getAccountFullQueryOptions, ConfigManager } from '@ecency/sdk';
23
- import { useQuery } from '@tanstack/react-query';
22
+ import { getAccountFullQueryOptions } from "@ecency/sdk";
23
+ import { useQuery } from "@tanstack/react-query";
24
24
 
25
- // optionally provide a custom QueryClient
26
- // ConfigManager.setQueryClient(myQueryClient);
25
+ const { data, isLoading } = useQuery(getAccountFullQueryOptions("ecency"));
26
+ ```
27
+
28
+ ## Configuration
29
+
30
+ The SDK uses a shared configuration singleton for the Hive RPC client and query client.
31
+
32
+ ```ts
33
+ import { ConfigManager, makeQueryClient } from "@ecency/sdk";
34
+
35
+ // Optional: provide your own QueryClient
36
+ ConfigManager.setQueryClient(makeQueryClient());
37
+ ```
38
+
39
+ If your app sets up a custom Hive client, configure it at startup so all SDK
40
+ modules share the same instance.
41
+
42
+ ## Query Options vs Direct Calls
43
+
44
+ Most APIs are exposed as **query option builders** to keep caching consistent:
45
+
46
+ ```ts
47
+ import { getPostsRankedQueryOptions } from "@ecency/sdk";
27
48
 
28
- const { data } = useQuery(getAccountFullQueryOptions('ecency'));
49
+ // Use in React Query hooks
50
+ useQuery(getPostsRankedQueryOptions("trending", "", "", 20));
29
51
  ```
30
52
 
53
+ Direct request helpers still exist for non-React contexts (e.g., server jobs).
54
+ Prefer query options in UI code.
55
+
56
+ ## Mutations
57
+
58
+ Mutations are provided as hooks that wrap `useMutation`:
59
+
60
+ ```ts
61
+ import { useAccountUpdate } from "@ecency/sdk";
62
+
63
+ const auth = {
64
+ accessToken,
65
+ postingKey,
66
+ loginType
67
+ };
68
+
69
+ const { mutateAsync } = useAccountUpdate(username, auth);
70
+ await mutateAsync({ metadata });
71
+ ```
72
+
73
+ `AuthContext` properties are optional. The example above works without an
74
+ explicit `broadcast` function; the SDK will use `postingKey` or `accessToken`
75
+ if provided. If your app needs custom broadcasting (Keychain, HiveAuth, mobile),
76
+ add the optional `broadcast` function as shown below.
77
+
78
+ ## Broadcasting and Auth Context
79
+
80
+ The SDK does not manage storage or platform-specific signers. Instead, it uses an
81
+ `AuthContext` that you pass from the app:
82
+
83
+ ```ts
84
+ import type { AuthContext } from "@ecency/sdk";
85
+
86
+ const auth: AuthContext = {
87
+ accessToken,
88
+ postingKey,
89
+ loginType,
90
+ broadcast: async (operations, authority = "posting") => {
91
+ // App-specific broadcaster (Keychain, HiveAuth, mobile wallet)
92
+ return myBroadcaster(operations, authority);
93
+ }
94
+ };
95
+ ```
96
+
97
+ If `auth.broadcast` is provided, the SDK will call it for posting broadcasts and
98
+ keychain/hiveauth flows. Otherwise it falls back to:
99
+
100
+ - `postingKey` (direct signing via dhive)
101
+ - `accessToken` (Hivesigner)
102
+
103
+ ## Active/Owner Key Signing
104
+
105
+ For operations that must be signed with Active or Owner authority, use
106
+ `useSignOperationByKey` and pass the appropriate private key:
107
+
108
+ ```ts
109
+ import { useSignOperationByKey } from "@ecency/sdk";
110
+
111
+ const { mutateAsync } = useSignOperationByKey(username);
112
+ await mutateAsync({
113
+ operation: ["account_update", { /* ... */ }],
114
+ keyOrSeed: activeKey
115
+ });
116
+ ```
117
+
118
+ If you want the SDK to broadcast Active/Owner operations through an external
119
+ signer (Keychain, HiveAuth, mobile), provide an `auth.broadcast` handler and
120
+ use the `authority` argument:
121
+
122
+ ```ts
123
+ const auth = {
124
+ broadcast: (ops, authority = "posting") => {
125
+ return myBroadcaster(ops, authority);
126
+ }
127
+ };
128
+ ```
129
+
130
+ ## Module Layout
131
+
132
+ ```text
133
+ src/modules/
134
+ accounts/ account data, relationships, mutations
135
+ analytics/ activity tracking and stats
136
+ auth/ login, tokens, and auth helpers
137
+ bridge/ bridge API helpers
138
+ communities/ community queries and utils
139
+ core/ config, client, query manager, helpers
140
+ games/ game-related endpoints
141
+ hive-engine/ hive-engine data helpers
142
+ integrations/ external integrations (hivesigner, 3speak, etc.)
143
+ market/ market data and pricing
144
+ notifications/ notification queries and enums
145
+ operations/ operation signing helpers
146
+ points/ points queries and mutations
147
+ posts/ post queries, mutations, utils
148
+ private-api/ private API helpers
149
+ promotions/ promotion queries
150
+ proposals/ proposal queries and mutations
151
+ resource-credits/ RC stats helpers
152
+ search/ search queries
153
+ spk/ SPK data helpers
154
+ wallet/ wallet-related queries and types
155
+ witnesses/ witness queries and votes
156
+ ```
157
+
158
+ ## SSR / RSC Notes
159
+
160
+ - Query options are safe to use on the server, but hooks are client-only.
161
+ - If you use Next.js App Router, keep hook usage in client components.
162
+
163
+ ## Versioning
164
+
165
+ See `CHANGELOG.md` for release notes.
@@ -1,10 +1,33 @@
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 { Authority, SMTAsset, PrivateKey, AuthorityType, PublicKey, Operation, Client } from '@hiveio/dhive';
4
+ import { Operation, Authority, 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
 
8
+ interface DynamicProps {
9
+ hivePerMVests: number;
10
+ base: number;
11
+ quote: number;
12
+ fundRewardBalance: number;
13
+ fundRecentClaims: number;
14
+ hbdPrintRate: number;
15
+ hbdInterestRate: number;
16
+ headBlock: number;
17
+ totalVestingFund: number;
18
+ totalVestingShares: number;
19
+ virtualSupply: number;
20
+ vestingRewardPercent: number;
21
+ accountCreationFee: string;
22
+ }
23
+
24
+ interface AuthContext {
25
+ accessToken?: string;
26
+ postingKey?: string | null;
27
+ loginType?: string | null;
28
+ broadcast?: (operations: Operation[], authority?: "active" | "posting" | "owner" | "memo") => Promise<unknown>;
29
+ }
30
+
8
31
  interface AccountFollowStats {
9
32
  follower_count: number;
10
33
  following_count: number;
@@ -391,13 +414,10 @@ interface Payload$4 {
391
414
  profile: Partial<AccountProfile>;
392
415
  tokens: AccountProfile["tokens"];
393
416
  }
394
- declare function useAccountUpdate(username: string, accessToken: string | undefined, auth?: {
395
- postingKey?: string | null;
396
- loginType?: string | null;
397
- }): _tanstack_react_query.UseMutationResult<unknown, Error, Partial<Payload$4>, unknown>;
417
+ declare function useAccountUpdate(username: string, auth?: AuthContext): _tanstack_react_query.UseMutationResult<unknown, Error, Partial<Payload$4>, unknown>;
398
418
 
399
419
  type Kind = "toggle-ignore" | "toggle-follow";
400
- declare function useAccountRelationsUpdate(reference: string | undefined, target: string | undefined, onSuccess: (data: Partial<AccountRelationship> | undefined) => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<{
420
+ declare function useAccountRelationsUpdate(reference: string | undefined, target: string | undefined, auth: AuthContext | undefined, onSuccess: (data: Partial<AccountRelationship> | undefined) => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<{
401
421
  ignores: boolean | undefined;
402
422
  follows: boolean | undefined;
403
423
  is_blacklisted?: boolean | undefined;
@@ -450,7 +470,7 @@ interface CommonPayload$1 {
450
470
  key?: PrivateKey;
451
471
  }
452
472
  type RevokePostingOptions = Pick<UseMutationOptions<unknown, Error, CommonPayload$1>, "onSuccess" | "onError">;
453
- declare function useAccountRevokePosting(username: string | undefined, options: RevokePostingOptions): _tanstack_react_query.UseMutationResult<any, Error, CommonPayload$1, unknown>;
473
+ declare function useAccountRevokePosting(username: string | undefined, options: RevokePostingOptions, auth?: AuthContext): _tanstack_react_query.UseMutationResult<unknown, Error, CommonPayload$1, unknown>;
454
474
 
455
475
  type SignType = "key" | "keychain" | "hivesigner" | "ecency";
456
476
  interface CommonPayload {
@@ -460,7 +480,7 @@ interface CommonPayload {
460
480
  email?: string;
461
481
  }
462
482
  type UpdateRecoveryOptions = Pick<UseMutationOptions<unknown, Error, CommonPayload>, "onSuccess" | "onError">;
463
- declare function useAccountUpdateRecovery(username: string | undefined, code: string | undefined, options: UpdateRecoveryOptions): _tanstack_react_query.UseMutationResult<unknown, Error, CommonPayload, unknown>;
483
+ declare function useAccountUpdateRecovery(username: string | undefined, code: string | undefined, options: UpdateRecoveryOptions, auth?: AuthContext): _tanstack_react_query.UseMutationResult<unknown, Error, CommonPayload, unknown>;
464
484
 
465
485
  interface Payload {
466
486
  currentKey: PrivateKey;
@@ -1158,22 +1178,6 @@ declare function buildProfileMetadata({ existingProfile, profile, tokens, }: Bui
1158
1178
  */
1159
1179
  declare function parseAccounts(rawAccounts: any[]): FullAccount[];
1160
1180
 
1161
- interface DynamicProps {
1162
- hivePerMVests: number;
1163
- base: number;
1164
- quote: number;
1165
- fundRewardBalance: number;
1166
- fundRecentClaims: number;
1167
- hbdPrintRate: number;
1168
- hbdInterestRate: number;
1169
- headBlock: number;
1170
- totalVestingFund: number;
1171
- totalVestingShares: number;
1172
- virtualSupply: number;
1173
- vestingRewardPercent: number;
1174
- accountCreationFee: string;
1175
- }
1176
-
1177
1181
  declare function votingPower(account: FullAccount): number;
1178
1182
  declare function powerRechargeTime(power: number): number;
1179
1183
  declare function downVotingPower(account: FullAccount): number;
@@ -1185,24 +1189,7 @@ declare function useSignOperationByKey(username: string | undefined): _tanstack_
1185
1189
  keyOrSeed: string;
1186
1190
  }, unknown>;
1187
1191
 
1188
- type KeychainAuthorityTypes = "Owner" | "Active" | "Posting" | "Memo";
1189
- interface TxResponse {
1190
- success: boolean;
1191
- result: string;
1192
- }
1193
- declare function handshake(): Promise<void>;
1194
- declare const broadcast: (account: string, operations: Operation[], key: KeychainAuthorityTypes, rpc?: string | null) => Promise<TxResponse>;
1195
- declare const customJson: (account: string, id: string, key: KeychainAuthorityTypes, json: string, display_msg: string, rpc?: string | null) => Promise<TxResponse>;
1196
-
1197
- type keychain_KeychainAuthorityTypes = KeychainAuthorityTypes;
1198
- declare const keychain_broadcast: typeof broadcast;
1199
- declare const keychain_customJson: typeof customJson;
1200
- declare const keychain_handshake: typeof handshake;
1201
- declare namespace keychain {
1202
- export { type keychain_KeychainAuthorityTypes as KeychainAuthorityTypes, keychain_broadcast as broadcast, keychain_customJson as customJson, keychain_handshake as handshake };
1203
- }
1204
-
1205
- declare function useSignOperationByKeychain(username: string | undefined, keyType?: KeychainAuthorityTypes): _tanstack_react_query.UseMutationResult<any, Error, {
1192
+ declare function useSignOperationByKeychain(username: string | undefined, auth?: AuthContext, keyType?: "owner" | "active" | "posting" | "memo"): _tanstack_react_query.UseMutationResult<unknown, Error, {
1206
1193
  operation: Operation;
1207
1194
  }, unknown>;
1208
1195
 
@@ -1219,37 +1206,13 @@ declare function getChainPropertiesQueryOptions(): _tanstack_react_query.OmitKey
1219
1206
  };
1220
1207
  };
1221
1208
 
1222
- declare function useBroadcastMutation<T>(mutationKey: MutationKey | undefined, username: string | undefined, accessToken: string | undefined, operations: (payload: T) => Operation[], onSuccess?: UseMutationOptions<unknown, Error, T>["onSuccess"], auth?: {
1223
- postingKey?: string | null;
1224
- loginType?: string | null;
1225
- }): _tanstack_react_query.UseMutationResult<unknown, Error, T, unknown>;
1226
-
1227
- declare function broadcastJson<T>(username: string | undefined, id: string, payload: T, accessToken?: string, auth?: {
1228
- postingKey?: string | null;
1229
- loginType?: string | null;
1230
- }): Promise<any>;
1231
-
1232
- interface StoringUser {
1233
- username: string;
1234
- accessToken: string;
1235
- refreshToken: string;
1236
- expiresIn: number;
1237
- postingKey: null | undefined | string;
1238
- loginType: null | undefined | string;
1239
- index?: number;
1240
- }
1209
+ declare function useBroadcastMutation<T>(mutationKey: MutationKey | undefined, username: string | undefined, operations: (payload: T) => Operation[], onSuccess?: UseMutationOptions<unknown, Error, T>["onSuccess"], auth?: AuthContext): _tanstack_react_query.UseMutationResult<unknown, Error, T, unknown>;
1241
1210
 
1242
- declare const getUser: (username: string) => StoringUser | undefined;
1243
- declare const getAccessToken: (username: string) => string | undefined;
1244
- declare const getPostingKey: (username: string) => null | undefined | string;
1245
- declare const getLoginType: (username: string) => null | undefined | string;
1246
- declare const getRefreshToken: (username: string) => string | undefined;
1211
+ declare function broadcastJson<T>(username: string | undefined, id: string, payload: T, auth?: AuthContext): Promise<any>;
1247
1212
 
1248
1213
  declare const CONFIG: {
1249
1214
  privateApiHost: string;
1250
1215
  imageHost: string;
1251
- storage: Storage;
1252
- storagePrefix: string;
1253
1216
  hiveClient: Client;
1254
1217
  heliusApiKey: string | undefined;
1255
1218
  queryClient: QueryClient;
@@ -2931,6 +2894,11 @@ declare function getMarketData(coin: string, vsCurrency: string, fromTs: string,
2931
2894
  declare function getCurrencyRate(cur: string): Promise<number>;
2932
2895
  declare function getCurrencyTokenRate(currency: string, token: string): Promise<number>;
2933
2896
  declare function getCurrencyRates(): Promise<CurrencyRates>;
2897
+ declare function getHivePrice(): Promise<{
2898
+ hive: {
2899
+ usd: number;
2900
+ };
2901
+ }>;
2934
2902
 
2935
2903
  interface PointTransaction {
2936
2904
  id: number;
@@ -3174,4 +3142,40 @@ interface HsTokenRenewResponse {
3174
3142
 
3175
3143
  declare function hsTokenRenew(code: string): Promise<HsTokenRenewResponse>;
3176
3144
 
3177
- 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 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 DynamicProps, index as EcencyAnalytics, EcencyQueriesManager, type EffectiveCommentVote, type Entry$1 as Entry, type EntryBeneficiaryRoute, type EntryHeader, type EntryStat, type EntryVote, 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 HiveHbdStats, HiveSignerIntegration, type HsTokenRenewResponse, type IncomingRcDelegation, type IncomingRcResponse, type Interest, type JsonMetadata, type JsonPollMetadata, keychain as Keychain, type Keys, type LeaderBoardDuration, type LeaderBoardItem, type LimitOrderCancel, type LimitOrderCreate, type MarketCandlestickDataItem, type MarketData, type MarketStatistics, NaiMap, NotificationFilter, NotificationViewType, type Notifications, NotifyTypes, type OpenOrdersData, type OperationGroup, type OrdersData, type OrdersDataItem, type PageStatsResponse, type Payer, type PointTransaction, type Points, 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 Recoveries, type RecurrentTransfers, type ReferralItem, type ReferralItems, type ReferralStat, type ReturnVestingDelegation, type RewardedCommunity, type SavingsWithdrawRequest, type Schedule, type SearchResponse, type SearchResult, type SetWithdrawRoute, SortOrder, type StatsResponse, type StoringUser, 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 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, checkUsernameWalletsPendingQueryOptions, decodeObj, dedupeAndSortKeyAuths, deleteDraft, deleteImage, deleteSchedule, downVotingPower, encodeObj, extractAccountProfile, getAccessToken, getAccountFullQueryOptions, getAccountNotificationsInfiniteQueryOptions, getAccountPendingRecoveryQueryOptions, getAccountPosts, getAccountPostsInfiniteQueryOptions, getAccountPostsQueryOptions, getAccountRcQueryOptions, getAccountRecoveriesQueryOptions, getAccountReputationsQueryOptions, getAccountSubscriptionsQueryOptions, getAccountVoteHistoryInfiniteQueryOptions, getAccountsQueryOptions, getActiveAccountBookmarksQueryOptions, getActiveAccountFavouritesQueryOptions, getAnnouncementsQueryOptions, getBoostPlusAccountPricesQueryOptions, getBoostPlusPricesQueryOptions, getBotsQueryOptions, getBoundFetch, getChainPropertiesQueryOptions, getCollateralizedConversionRequestsQueryOptions, getCommentHistoryQueryOptions, getCommunities, getCommunitiesQueryOptions, getCommunity, getCommunityContextQueryOptions, getCommunityPermissions, getCommunityQueryOptions, getCommunitySubscribersQueryOptions, getCommunityType, getContentQueryOptions, getContentRepliesQueryOptions, getControversialRisingInfiniteQueryOptions, getConversionRequestsQueryOptions, getCurrencyRate, getCurrencyRates, getCurrencyTokenRate, getDeletedEntryQueryOptions, getDiscoverCurationQueryOptions, getDiscoverLeaderboardQueryOptions, getDiscussion, getDiscussionQueryOptions, getDiscussionsQueryOptions, getDraftsQueryOptions, getDynamicPropsQueryOptions, getEntryActiveVotesQueryOptions, getFollowCountQueryOptions, getFollowingQueryOptions, getFragmentsQueryOptions, getFriendsInfiniteQueryOptions, getGalleryImagesQueryOptions, getGameStatusCheckQueryOptions, getHiveHbdStatsQueryOptions, getHivePoshLinksQueryOptions, getImagesQueryOptions, getIncomingRcQueryOptions, getLoginType, getMarketData, getMarketDataQueryOptions, getMarketHistoryQueryOptions, getMarketStatisticsQueryOptions, getMutedUsersQueryOptions, getNormalizePostQueryOptions, getNotificationSetting, getNotifications, getNotificationsInfiniteQueryOptions, getNotificationsSettingsQueryOptions, getNotificationsUnreadCountQueryOptions, getOpenOrdersQueryOptions, getOrderBookQueryOptions, getOutgoingRcDelegationsInfiniteQueryOptions, getPageStatsQueryOptions, getPointsQueryOptions, getPost, getPostHeader, getPostHeaderQueryOptions, getPostQueryOptions, getPostTipsQueryOptions, getPostingKey, getPostsRanked, getPostsRankedInfiniteQueryOptions, getPostsRankedQueryOptions, getProfiles, getProfilesQueryOptions, getPromotePriceQueryOptions, getPromotedPost, getPromotedPostsQuery, getProposalQueryOptions, getProposalVotesInfiniteQueryOptions, getProposalsQueryOptions, getQueryClient, getRcStatsQueryOptions, getReblogsQueryOptions, getReceivedVestingSharesQueryOptions, getReferralsInfiniteQueryOptions, getReferralsStatsQueryOptions, getRefreshToken, getRelationshipBetweenAccounts, getRelationshipBetweenAccountsQueryOptions, getRewardedCommunitiesQueryOptions, getSavingsWithdrawFromQueryOptions, getSchedulesQueryOptions, getSearchAccountQueryOptions, getSearchAccountsByUsernameQueryOptions, getSearchApiInfiniteQueryOptions, getSearchFriendsQueryOptions, getSearchPathQueryOptions, getSearchTopicsQueryOptions, getSimilarEntriesQueryOptions, getStatsQueryOptions, getSubscribers, getSubscriptions, getTradeHistoryQueryOptions, getTransactionsInfiniteQueryOptions, getTrendingTagsQueryOptions, getTrendingTagsWithStatsQueryOptions, getUser, getUserProposalVotesQueryOptions, getVestingDelegationsQueryOptions, getVisibleFirstLevelThreadItems, getWavesByHostQueryOptions, getWavesByTagQueryOptions, getWavesFollowingQueryOptions, getWavesTrendingTagsQueryOptions, getWithdrawRoutesQueryOptions, getWitnessesInfiniteQueryOptions, hsTokenRenew, isCommunity, lookupAccountsQueryOptions, makeQueryClient, mapThreadItemsToWaveEntries, markNotifications, moveSchedule, normalizePost, 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, useAddFragment, useBookmarkAdd, useBookmarkDelete, useBroadcastMutation, useEditFragment, useGameClaim, useRecordActivity, useRemoveFragment, useSignOperationByHivesigner, useSignOperationByKey, useSignOperationByKeychain, usrActivity, validatePostCreating, votingPower, votingValue };
3145
+ type EngineOrderBookEntry = {
3146
+ txId: string;
3147
+ timestamp: number;
3148
+ account: string;
3149
+ symbol: string;
3150
+ quantity: string;
3151
+ price: string;
3152
+ tokensLocked?: string;
3153
+ };
3154
+ interface HiveEngineOpenOrder {
3155
+ id: string;
3156
+ type: "buy" | "sell";
3157
+ account: string;
3158
+ symbol: string;
3159
+ quantity: string;
3160
+ price: string;
3161
+ total: string;
3162
+ timestamp: number;
3163
+ }
3164
+ declare function getHiveEngineOrderBook<T = EngineOrderBookEntry>(symbol: string, limit?: number): Promise<{
3165
+ buy: T[];
3166
+ sell: T[];
3167
+ }>;
3168
+ declare function getHiveEngineTradeHistory<T = Record<string, unknown>>(symbol: string, limit?: number): Promise<T[]>;
3169
+ declare function getHiveEngineOpenOrders<T = HiveEngineOpenOrder>(account: string, symbol: string, limit?: number): Promise<T[]>;
3170
+ declare function getHiveEngineMetrics<T = Record<string, unknown>>(symbol?: string, account?: string): Promise<T[]>;
3171
+ declare function getHiveEngineTokensMarket<T = Record<string, unknown>>(account?: string, symbol?: string): Promise<T[]>;
3172
+ declare function getHiveEngineTokensBalances<T = Record<string, unknown>>(username: string): Promise<T[]>;
3173
+ declare function getHiveEngineTokensMetadata<T = Record<string, unknown>>(tokens: string[]): Promise<T[]>;
3174
+ declare function getHiveEngineTokenTransactions<T = Record<string, unknown>>(username: string, symbol: string, limit: number, offset: number): Promise<T[]>;
3175
+ declare function getHiveEngineTokenMetrics<T = Record<string, unknown>>(symbol: string, interval?: string): Promise<T[]>;
3176
+ declare function getHiveEngineUnclaimedRewards<T = Record<string, unknown>>(username: string): Promise<Record<string, T>>;
3177
+
3178
+ declare function getSpkWallet<T = Record<string, unknown>>(username: string): Promise<T>;
3179
+ declare function getSpkMarkets<T = Record<string, unknown>>(): Promise<T>;
3180
+
3181
+ 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 DynamicProps, index as EcencyAnalytics, EcencyQueriesManager, type EffectiveCommentVote, type Entry$1 as Entry, type EntryBeneficiaryRoute, type EntryHeader, type EntryStat, type EntryVote, 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, NaiMap, NotificationFilter, NotificationViewType, type Notifications, NotifyTypes, type OpenOrdersData, type OperationGroup, type OrdersData, type OrdersDataItem, type PageStatsResponse, type Payer, type PointTransaction, type Points, 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 Recoveries, type RecurrentTransfers, type ReferralItem, type ReferralItems, type ReferralStat, type ReturnVestingDelegation, 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 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, checkUsernameWalletsPendingQueryOptions, decodeObj, dedupeAndSortKeyAuths, deleteDraft, deleteImage, deleteSchedule, downVotingPower, encodeObj, extractAccountProfile, getAccountFullQueryOptions, getAccountNotificationsInfiniteQueryOptions, getAccountPendingRecoveryQueryOptions, getAccountPosts, getAccountPostsInfiniteQueryOptions, getAccountPostsQueryOptions, getAccountRcQueryOptions, getAccountRecoveriesQueryOptions, getAccountReputationsQueryOptions, getAccountSubscriptionsQueryOptions, getAccountVoteHistoryInfiniteQueryOptions, getAccountsQueryOptions, getActiveAccountBookmarksQueryOptions, getActiveAccountFavouritesQueryOptions, getAnnouncementsQueryOptions, getBoostPlusAccountPricesQueryOptions, getBoostPlusPricesQueryOptions, getBotsQueryOptions, getBoundFetch, getChainPropertiesQueryOptions, getCollateralizedConversionRequestsQueryOptions, getCommentHistoryQueryOptions, getCommunities, getCommunitiesQueryOptions, getCommunity, getCommunityContextQueryOptions, getCommunityPermissions, getCommunityQueryOptions, getCommunitySubscribersQueryOptions, getCommunityType, getContentQueryOptions, getContentRepliesQueryOptions, getControversialRisingInfiniteQueryOptions, getConversionRequestsQueryOptions, getCurrencyRate, getCurrencyRates, getCurrencyTokenRate, getDeletedEntryQueryOptions, getDiscoverCurationQueryOptions, getDiscoverLeaderboardQueryOptions, getDiscussion, getDiscussionQueryOptions, getDiscussionsQueryOptions, getDraftsQueryOptions, getDynamicPropsQueryOptions, getEntryActiveVotesQueryOptions, getFollowCountQueryOptions, getFollowingQueryOptions, getFragmentsQueryOptions, getFriendsInfiniteQueryOptions, getGalleryImagesQueryOptions, getGameStatusCheckQueryOptions, getHiveEngineMetrics, getHiveEngineOpenOrders, getHiveEngineOrderBook, getHiveEngineTokenMetrics, getHiveEngineTokenTransactions, getHiveEngineTokensBalances, getHiveEngineTokensMarket, getHiveEngineTokensMetadata, getHiveEngineTradeHistory, getHiveEngineUnclaimedRewards, getHiveHbdStatsQueryOptions, getHivePoshLinksQueryOptions, getHivePrice, getImagesQueryOptions, getIncomingRcQueryOptions, getMarketData, getMarketDataQueryOptions, getMarketHistoryQueryOptions, getMarketStatisticsQueryOptions, getMutedUsersQueryOptions, getNormalizePostQueryOptions, getNotificationSetting, getNotifications, getNotificationsInfiniteQueryOptions, getNotificationsSettingsQueryOptions, getNotificationsUnreadCountQueryOptions, getOpenOrdersQueryOptions, getOrderBookQueryOptions, getOutgoingRcDelegationsInfiniteQueryOptions, getPageStatsQueryOptions, getPointsQueryOptions, getPost, getPostHeader, getPostHeaderQueryOptions, getPostQueryOptions, getPostTipsQueryOptions, getPostsRanked, getPostsRankedInfiniteQueryOptions, getPostsRankedQueryOptions, getProfiles, getProfilesQueryOptions, getPromotePriceQueryOptions, getPromotedPost, getPromotedPostsQuery, getProposalQueryOptions, getProposalVotesInfiniteQueryOptions, getProposalsQueryOptions, getQueryClient, getRcStatsQueryOptions, getReblogsQueryOptions, getReceivedVestingSharesQueryOptions, getReferralsInfiniteQueryOptions, getReferralsStatsQueryOptions, getRelationshipBetweenAccounts, getRelationshipBetweenAccountsQueryOptions, getRewardedCommunitiesQueryOptions, getSavingsWithdrawFromQueryOptions, getSchedulesQueryOptions, getSearchAccountQueryOptions, getSearchAccountsByUsernameQueryOptions, getSearchApiInfiniteQueryOptions, getSearchFriendsQueryOptions, getSearchPathQueryOptions, getSearchTopicsQueryOptions, getSimilarEntriesQueryOptions, getSpkMarkets, getSpkWallet, getStatsQueryOptions, getSubscribers, getSubscriptions, getTradeHistoryQueryOptions, getTransactionsInfiniteQueryOptions, getTrendingTagsQueryOptions, getTrendingTagsWithStatsQueryOptions, getUserProposalVotesQueryOptions, getVestingDelegationsQueryOptions, getVisibleFirstLevelThreadItems, getWavesByHostQueryOptions, getWavesByTagQueryOptions, getWavesFollowingQueryOptions, getWavesTrendingTagsQueryOptions, getWithdrawRoutesQueryOptions, getWitnessesInfiniteQueryOptions, hsTokenRenew, isCommunity, lookupAccountsQueryOptions, makeQueryClient, mapThreadItemsToWaveEntries, markNotifications, moveSchedule, normalizePost, 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, useAddFragment, useBookmarkAdd, useBookmarkDelete, useBroadcastMutation, useEditFragment, useGameClaim, useRecordActivity, useRemoveFragment, useSignOperationByHivesigner, useSignOperationByKey, useSignOperationByKeychain, usrActivity, validatePostCreating, votingPower, votingValue };