@ecency/sdk 1.4.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -390,7 +390,10 @@ interface Payload$4 {
390
390
  profile: Partial<AccountProfile>;
391
391
  tokens: AccountProfile["tokens"];
392
392
  }
393
- declare function useAccountUpdate(username: string): _tanstack_react_query.UseMutationResult<unknown, Error, Partial<Payload$4>, unknown>;
393
+ declare function useAccountUpdate(username: string, accessToken: string | undefined, auth?: {
394
+ postingKey?: string | null;
395
+ loginType?: string | null;
396
+ }): _tanstack_react_query.UseMutationResult<unknown, Error, Partial<Payload$4>, unknown>;
394
397
 
395
398
  type Kind = "toggle-ignore" | "toggle-follow";
396
399
  declare function useAccountRelationsUpdate(reference: string | undefined, target: string | undefined, onSuccess: (data: Partial<AccountRelationship> | undefined) => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<{
@@ -404,13 +407,13 @@ interface Payload$3 {
404
407
  author: string;
405
408
  permlink: string;
406
409
  }
407
- declare function useBookmarkAdd(username: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, Payload$3, unknown>;
410
+ declare function useBookmarkAdd(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, Payload$3, unknown>;
408
411
 
409
- declare function useBookmarkDelete(username: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
412
+ declare function useBookmarkDelete(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
410
413
 
411
- declare function useAccountFavouriteAdd(username: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
414
+ declare function useAccountFavouriteAdd(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
412
415
 
413
- declare function useAccountFavouriteDelete(username: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
416
+ declare function useAccountFavouriteDelete(username: string | undefined, code: string | undefined, onSuccess: () => void, onError: (e: Error) => void): _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
414
417
 
415
418
  interface Keys {
416
419
  owner: PrivateKey;
@@ -456,7 +459,7 @@ interface CommonPayload {
456
459
  email?: string;
457
460
  }
458
461
  type UpdateRecoveryOptions = Pick<UseMutationOptions<unknown, Error, CommonPayload>, "onSuccess" | "onError">;
459
- declare function useAccountUpdateRecovery(username: string | undefined, options: UpdateRecoveryOptions): _tanstack_react_query.UseMutationResult<unknown, Error, CommonPayload, unknown>;
462
+ declare function useAccountUpdateRecovery(username: string | undefined, code: string | undefined, options: UpdateRecoveryOptions): _tanstack_react_query.UseMutationResult<unknown, Error, CommonPayload, unknown>;
460
463
 
461
464
  interface Payload {
462
465
  currentKey: PrivateKey;
@@ -771,7 +774,7 @@ declare function getAccountSubscriptionsQueryOptions(username: string | undefine
771
774
  };
772
775
  };
773
776
 
774
- declare function getActiveAccountBookmarksQueryOptions(activeUsername: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<AccountBookmark[], Error, AccountBookmark[], (string | undefined)[]>, "queryFn"> & {
777
+ declare function getActiveAccountBookmarksQueryOptions(activeUsername: string | undefined, code: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<AccountBookmark[], Error, AccountBookmark[], (string | undefined)[]>, "queryFn"> & {
775
778
  queryFn?: _tanstack_react_query.QueryFunction<AccountBookmark[], (string | undefined)[], never> | undefined;
776
779
  } & {
777
780
  queryKey: (string | undefined)[] & {
@@ -780,7 +783,7 @@ declare function getActiveAccountBookmarksQueryOptions(activeUsername: string |
780
783
  };
781
784
  };
782
785
 
783
- declare function getActiveAccountFavouritesQueryOptions(activeUsername: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<AccountFavorite[], Error, AccountFavorite[], (string | undefined)[]>, "queryFn"> & {
786
+ declare function getActiveAccountFavouritesQueryOptions(activeUsername: string | undefined, code: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<AccountFavorite[], Error, AccountFavorite[], (string | undefined)[]>, "queryFn"> & {
784
787
  queryFn?: _tanstack_react_query.QueryFunction<AccountFavorite[], (string | undefined)[], never> | undefined;
785
788
  } & {
786
789
  queryKey: (string | undefined)[] & {
@@ -789,7 +792,7 @@ declare function getActiveAccountFavouritesQueryOptions(activeUsername: string |
789
792
  };
790
793
  };
791
794
 
792
- declare function getAccountRecoveriesQueryOptions(username: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<GetRecoveriesEmailResponse[], Error, GetRecoveriesEmailResponse[], (string | undefined)[]>, "queryFn"> & {
795
+ declare function getAccountRecoveriesQueryOptions(username: string | undefined, code: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<GetRecoveriesEmailResponse[], Error, GetRecoveriesEmailResponse[], (string | undefined)[]>, "queryFn"> & {
793
796
  queryFn?: _tanstack_react_query.QueryFunction<GetRecoveriesEmailResponse[], (string | undefined)[], never> | undefined;
794
797
  } & {
795
798
  queryKey: (string | undefined)[] & {
@@ -1049,6 +1052,51 @@ interface WaveTrendingTag {
1049
1052
  posts: number;
1050
1053
  }
1051
1054
 
1055
+ interface DraftMetadata {
1056
+ beneficiaries?: Array<{
1057
+ account: string;
1058
+ weight: number;
1059
+ }>;
1060
+ rewardType?: string;
1061
+ videos?: Record<string, any>;
1062
+ poll?: any;
1063
+ [key: string]: any;
1064
+ }
1065
+ interface Draft {
1066
+ body: string;
1067
+ created: string;
1068
+ modified: string;
1069
+ post_type: string;
1070
+ tags_arr: string[];
1071
+ tags: string;
1072
+ timestamp: number;
1073
+ title: string;
1074
+ _id: string;
1075
+ meta?: DraftMetadata;
1076
+ }
1077
+
1078
+ interface Schedule {
1079
+ _id: string;
1080
+ username: string;
1081
+ permlink: string;
1082
+ title: string;
1083
+ body: string;
1084
+ tags: string[];
1085
+ tags_arr: string;
1086
+ schedule: string;
1087
+ original_schedule: string;
1088
+ reblog: boolean;
1089
+ status: 1 | 2 | 3 | 4;
1090
+ message: string | null;
1091
+ }
1092
+
1093
+ interface UserImage {
1094
+ created: string;
1095
+ timestamp: number;
1096
+ url: string;
1097
+ _id: string;
1098
+ }
1099
+
1052
1100
  interface VoteHistoryPageParam {
1053
1101
  start: number;
1054
1102
  }
@@ -1133,9 +1181,15 @@ declare function getChainPropertiesQueryOptions(): _tanstack_react_query.OmitKey
1133
1181
  };
1134
1182
  };
1135
1183
 
1136
- declare function useBroadcastMutation<T>(mutationKey: MutationKey | undefined, username: string | undefined, operations: (payload: T) => Operation[], onSuccess?: UseMutationOptions<unknown, Error, T>["onSuccess"]): _tanstack_react_query.UseMutationResult<unknown, Error, T, unknown>;
1184
+ declare function useBroadcastMutation<T>(mutationKey: MutationKey | undefined, username: string | undefined, accessToken: string | undefined, operations: (payload: T) => Operation[], onSuccess?: UseMutationOptions<unknown, Error, T>["onSuccess"], auth?: {
1185
+ postingKey?: string | null;
1186
+ loginType?: string | null;
1187
+ }): _tanstack_react_query.UseMutationResult<unknown, Error, T, unknown>;
1137
1188
 
1138
- declare function broadcastJson<T>(username: string | undefined, id: string, payload: T): Promise<any>;
1189
+ declare function broadcastJson<T>(username: string | undefined, id: string, payload: T, accessToken?: string, auth?: {
1190
+ postingKey?: string | null;
1191
+ loginType?: string | null;
1192
+ }): Promise<any>;
1139
1193
 
1140
1194
  interface StoringUser {
1141
1195
  username: string;
@@ -1155,6 +1209,7 @@ declare const getRefreshToken: (username: string) => string | undefined;
1155
1209
 
1156
1210
  declare const CONFIG: {
1157
1211
  privateApiHost: string;
1212
+ imageHost: string;
1158
1213
  storage: Storage;
1159
1214
  storagePrefix: string;
1160
1215
  hiveClient: Client;
@@ -1176,6 +1231,11 @@ declare namespace ConfigManager {
1176
1231
  * @param host - The private API host URL (e.g., "https://ecency.com" or "" for relative URLs)
1177
1232
  */
1178
1233
  function setPrivateApiHost(host: string): void;
1234
+ /**
1235
+ * Set the image host
1236
+ * @param host - The image host URL (e.g., "https://images.ecency.com")
1237
+ */
1238
+ function setImageHost(host: string): void;
1179
1239
  /**
1180
1240
  * Set DMCA filtering lists
1181
1241
  * @param accounts - List of account usernames to filter (plain strings)
@@ -1281,7 +1341,7 @@ declare function getTrendingTagsWithStatsQueryOptions(limit?: number): _tanstack
1281
1341
  };
1282
1342
  };
1283
1343
 
1284
- declare function getFragmentsQueryOptions(username: string): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<Fragment[], Error, Fragment[], string[]>, "queryFn"> & {
1344
+ declare function getFragmentsQueryOptions(username: string, code?: string): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<Fragment[], Error, Fragment[], string[]>, "queryFn"> & {
1285
1345
  queryFn?: _tanstack_react_query.QueryFunction<Fragment[], string[], never> | undefined;
1286
1346
  } & {
1287
1347
  queryKey: string[] & {
@@ -1396,22 +1456,7 @@ declare function getReblogsQueryOptions(username?: string, activeUsername?: stri
1396
1456
  };
1397
1457
  };
1398
1458
 
1399
- interface Schedule {
1400
- _id: string;
1401
- username: string;
1402
- permlink: string;
1403
- title: string;
1404
- body: string;
1405
- tags: string[];
1406
- tags_arr: string;
1407
- schedule: string;
1408
- original_schedule: string;
1409
- reblog: boolean;
1410
- status: 1 | 2 | 3 | 4;
1411
- message: string | null;
1412
- }
1413
-
1414
- declare function getSchedulesQueryOptions(activeUsername: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<Schedule[], Error, Schedule[], (string | undefined)[]>, "queryFn"> & {
1459
+ declare function getSchedulesQueryOptions(activeUsername: string | undefined, code?: string): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<Schedule[], Error, Schedule[], (string | undefined)[]>, "queryFn"> & {
1415
1460
  queryFn?: _tanstack_react_query.QueryFunction<Schedule[], (string | undefined)[], never> | undefined;
1416
1461
  } & {
1417
1462
  queryKey: (string | undefined)[] & {
@@ -1420,30 +1465,7 @@ declare function getSchedulesQueryOptions(activeUsername: string | undefined): _
1420
1465
  };
1421
1466
  };
1422
1467
 
1423
- interface DraftMetadata {
1424
- beneficiaries?: Array<{
1425
- account: string;
1426
- weight: number;
1427
- }>;
1428
- rewardType?: string;
1429
- videos?: Record<string, any>;
1430
- poll?: any;
1431
- [key: string]: any;
1432
- }
1433
- interface Draft {
1434
- body: string;
1435
- created: string;
1436
- modified: string;
1437
- post_type: string;
1438
- tags_arr: string[];
1439
- tags: string;
1440
- timestamp: number;
1441
- title: string;
1442
- _id: string;
1443
- meta?: DraftMetadata;
1444
- }
1445
-
1446
- declare function getDraftsQueryOptions(activeUsername: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<Draft[], Error, Draft[], (string | undefined)[]>, "queryFn"> & {
1468
+ declare function getDraftsQueryOptions(activeUsername: string | undefined, code?: string): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<Draft[], Error, Draft[], (string | undefined)[]>, "queryFn"> & {
1447
1469
  queryFn?: _tanstack_react_query.QueryFunction<Draft[], (string | undefined)[], never> | undefined;
1448
1470
  } & {
1449
1471
  queryKey: (string | undefined)[] & {
@@ -1452,14 +1474,7 @@ declare function getDraftsQueryOptions(activeUsername: string | undefined): _tan
1452
1474
  };
1453
1475
  };
1454
1476
 
1455
- interface UserImage {
1456
- created: string;
1457
- timestamp: number;
1458
- url: string;
1459
- _id: string;
1460
- }
1461
-
1462
- declare function getImagesQueryOptions(username?: string): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<UserImage[], Error, UserImage[], (string | undefined)[]>, "queryFn"> & {
1477
+ declare function getImagesQueryOptions(username?: string, code?: string): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<UserImage[], Error, UserImage[], (string | undefined)[]>, "queryFn"> & {
1463
1478
  queryFn?: _tanstack_react_query.QueryFunction<UserImage[], (string | undefined)[], never> | undefined;
1464
1479
  } & {
1465
1480
  queryKey: (string | undefined)[] & {
@@ -1467,7 +1482,7 @@ declare function getImagesQueryOptions(username?: string): _tanstack_react_query
1467
1482
  [dataTagErrorSymbol]: Error;
1468
1483
  };
1469
1484
  };
1470
- declare function getGalleryImagesQueryOptions(activeUsername: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<UserImage[], Error, UserImage[], (string | undefined)[]>, "queryFn"> & {
1485
+ declare function getGalleryImagesQueryOptions(activeUsername: string | undefined, code?: string): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<UserImage[], Error, UserImage[], (string | undefined)[]>, "queryFn"> & {
1471
1486
  queryFn?: _tanstack_react_query.QueryFunction<UserImage[], (string | undefined)[], never> | undefined;
1472
1487
  } & {
1473
1488
  queryKey: (string | undefined)[] & {
@@ -1560,17 +1575,17 @@ declare function getWavesTrendingTagsQueryOptions(host: string, hours?: number):
1560
1575
  };
1561
1576
  };
1562
1577
 
1563
- declare function useAddFragment(username: string): _tanstack_react_query.UseMutationResult<Fragment, Error, {
1578
+ declare function useAddFragment(username: string, code: string | undefined): _tanstack_react_query.UseMutationResult<Fragment, Error, {
1564
1579
  title: string;
1565
1580
  body: string;
1566
1581
  }, unknown>;
1567
1582
 
1568
- declare function useEditFragment(username: string, fragmentId: string): _tanstack_react_query.UseMutationResult<Fragment, Error, {
1583
+ declare function useEditFragment(username: string, fragmentId: string, code: string | undefined): _tanstack_react_query.UseMutationResult<Fragment, Error, {
1569
1584
  title: string;
1570
1585
  body: string;
1571
1586
  }, unknown>;
1572
1587
 
1573
- declare function useRemoveFragment(username: string, fragmentId: string): _tanstack_react_query.UseMutationResult<Response, Error, void, unknown>;
1588
+ declare function useRemoveFragment(username: string, fragmentId: string, code: string | undefined): _tanstack_react_query.UseMutationResult<Response, Error, void, unknown>;
1574
1589
 
1575
1590
  type EntryWithPostId = Entry$1 & {
1576
1591
  post_id: number;
@@ -1711,7 +1726,7 @@ interface ThreeSpeakVideo {
1711
1726
  _id: string;
1712
1727
  }
1713
1728
 
1714
- declare function getAccountTokenQueryOptions(username: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<any, Error, any, (string | undefined)[]>, "queryFn"> & {
1729
+ declare function getAccountTokenQueryOptions(username: string | undefined, accessToken: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<any, Error, any, (string | undefined)[]>, "queryFn"> & {
1715
1730
  queryFn?: _tanstack_react_query.QueryFunction<any, (string | undefined)[], never> | undefined;
1716
1731
  } & {
1717
1732
  queryKey: (string | undefined)[] & {
@@ -1720,7 +1735,7 @@ declare function getAccountTokenQueryOptions(username: string | undefined): _tan
1720
1735
  };
1721
1736
  };
1722
1737
 
1723
- declare function getAccountVideosQueryOptions(username: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<ThreeSpeakVideo[], Error, ThreeSpeakVideo[], (string | undefined)[]>, "queryFn"> & {
1738
+ declare function getAccountVideosQueryOptions(username: string | undefined, accessToken: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<ThreeSpeakVideo[], Error, ThreeSpeakVideo[], (string | undefined)[]>, "queryFn"> & {
1724
1739
  queryFn?: _tanstack_react_query.QueryFunction<ThreeSpeakVideo[], (string | undefined)[], never> | undefined;
1725
1740
  } & {
1726
1741
  queryKey: (string | undefined)[] & {
@@ -1739,7 +1754,7 @@ declare const ThreeSpeakIntegration: {
1739
1754
  queries: typeof queries$1;
1740
1755
  };
1741
1756
 
1742
- declare function getDecodeMemoQueryOptions(username: string, memo: string): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<any, Error, any, string[]>, "queryFn"> & {
1757
+ declare function getDecodeMemoQueryOptions(username: string, memo: string, accessToken: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<any, Error, any, string[]>, "queryFn"> & {
1743
1758
  queryFn?: _tanstack_react_query.QueryFunction<any, string[], never> | undefined;
1744
1759
  } & {
1745
1760
  queryKey: string[] & {
@@ -1928,7 +1943,7 @@ interface GameClaim {
1928
1943
  score: number;
1929
1944
  }
1930
1945
 
1931
- declare function getGameStatusCheckQueryOptions(username: string | undefined, gameType: "spin"): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<GetGameStatus, Error, GetGameStatus, (string | undefined)[]>, "queryFn"> & {
1946
+ declare function getGameStatusCheckQueryOptions(username: string | undefined, code: string | undefined, gameType: "spin"): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<GetGameStatus, Error, GetGameStatus, (string | undefined)[]>, "queryFn"> & {
1932
1947
  queryFn?: _tanstack_react_query.QueryFunction<GetGameStatus, (string | undefined)[], never> | undefined;
1933
1948
  } & {
1934
1949
  queryKey: (string | undefined)[] & {
@@ -1937,7 +1952,7 @@ declare function getGameStatusCheckQueryOptions(username: string | undefined, ga
1937
1952
  };
1938
1953
  };
1939
1954
 
1940
- declare function useGameClaim(username: string | undefined, gameType: "spin", key: string): _tanstack_react_query.UseMutationResult<GameClaim, Error, void, unknown>;
1955
+ declare function useGameClaim(username: string | undefined, code: string | undefined, gameType: "spin", key: string): _tanstack_react_query.UseMutationResult<GameClaim, Error, void, unknown>;
1941
1956
 
1942
1957
  declare enum ROLES {
1943
1958
  OWNER = "owner",
@@ -2071,7 +2086,7 @@ declare function getCommunityPermissions({ communityType, userRole, subscribed,
2071
2086
  isModerator: boolean;
2072
2087
  };
2073
2088
 
2074
- declare function getNotificationsUnreadCountQueryOptions(activeUsername: string | undefined): Omit<_tanstack_react_query.UseQueryOptions<number, Error, number, (string | undefined)[]>, "queryFn"> & {
2089
+ declare function getNotificationsUnreadCountQueryOptions(activeUsername: string | undefined, code: string | undefined): Omit<_tanstack_react_query.UseQueryOptions<number, Error, number, (string | undefined)[]>, "queryFn"> & {
2075
2090
  initialData: number | (() => number);
2076
2091
  queryFn?: _tanstack_react_query.QueryFunction<number, (string | undefined)[]> | undefined;
2077
2092
  } & {
@@ -2319,7 +2334,7 @@ interface Announcement {
2319
2334
  auth: boolean;
2320
2335
  }
2321
2336
 
2322
- declare function getNotificationsInfiniteQueryOptions(activeUsername: string | undefined, filter?: NotificationFilter | undefined): _tanstack_react_query.UseInfiniteQueryOptions<ApiNotification[], Error, _tanstack_react_query.InfiniteData<ApiNotification[], unknown>, (string | undefined)[], string> & {
2337
+ declare function getNotificationsInfiniteQueryOptions(activeUsername: string | undefined, code: string | undefined, filter?: NotificationFilter | undefined): _tanstack_react_query.UseInfiniteQueryOptions<ApiNotification[], Error, _tanstack_react_query.InfiniteData<ApiNotification[], unknown>, (string | undefined)[], string> & {
2323
2338
  initialData: _tanstack_react_query.InfiniteData<ApiNotification[], string> | (() => _tanstack_react_query.InfiniteData<ApiNotification[], string>) | undefined;
2324
2339
  } & {
2325
2340
  queryKey: (string | undefined)[] & {
@@ -2328,7 +2343,7 @@ declare function getNotificationsInfiniteQueryOptions(activeUsername: string | u
2328
2343
  };
2329
2344
  };
2330
2345
 
2331
- declare function getNotificationsSettingsQueryOptions(activeUsername: string | undefined): Omit<_tanstack_react_query.UseQueryOptions<ApiNotificationSetting, Error, ApiNotificationSetting, (string | undefined)[]>, "queryFn"> & {
2346
+ declare function getNotificationsSettingsQueryOptions(activeUsername: string | undefined, code: string | undefined): Omit<_tanstack_react_query.UseQueryOptions<ApiNotificationSetting, Error, ApiNotificationSetting, (string | undefined)[]>, "queryFn"> & {
2332
2347
  initialData: ApiNotificationSetting | (() => ApiNotificationSetting);
2333
2348
  queryFn?: _tanstack_react_query.QueryFunction<ApiNotificationSetting, (string | undefined)[]> | undefined;
2334
2349
  } & {
@@ -2780,6 +2795,27 @@ declare function getMarketDataQueryOptions(coin: string, vsCurrency: string, fro
2780
2795
  };
2781
2796
  };
2782
2797
 
2798
+ interface ApiResponse<T> {
2799
+ status: number;
2800
+ data: T;
2801
+ }
2802
+ interface CurrencyRates {
2803
+ [currency: string]: {
2804
+ quotes: {
2805
+ [currency: string]: {
2806
+ last_updated: string;
2807
+ percent_change: number;
2808
+ price: number;
2809
+ };
2810
+ };
2811
+ };
2812
+ }
2813
+
2814
+ declare function getMarketData(coin: string, vsCurrency: string, fromTs: string, toTs: string): Promise<MarketData>;
2815
+ declare function getCurrencyRate(cur: string): Promise<number>;
2816
+ declare function getCurrencyTokenRate(currency: string, token: string): Promise<number>;
2817
+ declare function getCurrencyRates(): Promise<CurrencyRates>;
2818
+
2783
2819
  interface PointTransaction {
2784
2820
  id: number;
2785
2821
  type: number;
@@ -2964,4 +3000,41 @@ declare function getBoostPlusAccountPricesQueryOptions(account: string, accessTo
2964
3000
  };
2965
3001
  };
2966
3002
 
2967
- 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 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 DelegateVestingShares, type DelegatedVestingShare, type DeletedEntry, 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 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 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 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, broadcastJson, buildProfileMetadata, checkUsernameWalletsPendingQueryOptions, decodeObj, dedupeAndSortKeyAuths, encodeObj, extractAccountProfile, getAccessToken, getAccountFullQueryOptions, getAccountNotificationsInfiniteQueryOptions, getAccountPendingRecoveryQueryOptions, getAccountPostsInfiniteQueryOptions, getAccountRcQueryOptions, getAccountRecoveriesQueryOptions, getAccountSubscriptionsQueryOptions, getAccountVoteHistoryInfiniteQueryOptions, getAccountsQueryOptions, getActiveAccountBookmarksQueryOptions, getActiveAccountFavouritesQueryOptions, getAnnouncementsQueryOptions, getBoostPlusAccountPricesQueryOptions, getBoostPlusPricesQueryOptions, getBotsQueryOptions, getBoundFetch, getChainPropertiesQueryOptions, getCollateralizedConversionRequestsQueryOptions, getCommentHistoryQueryOptions, getCommunitiesQueryOptions, getCommunityContextQueryOptions, getCommunityPermissions, getCommunitySubscribersQueryOptions, getCommunityType, getControversialRisingInfiniteQueryOptions, getConversionRequestsQueryOptions, getDeletedEntryQueryOptions, getDiscoverCurationQueryOptions, getDiscoverLeaderboardQueryOptions, getDiscussionsQueryOptions, getDraftsQueryOptions, getDynamicPropsQueryOptions, getEntryActiveVotesQueryOptions, getFollowCountQueryOptions, getFollowingQueryOptions, getFragmentsQueryOptions, getFriendsInfiniteQueryOptions, getGalleryImagesQueryOptions, getGameStatusCheckQueryOptions, getHiveHbdStatsQueryOptions, getHivePoshLinksQueryOptions, getImagesQueryOptions, getLoginType, getMarketDataQueryOptions, getMarketHistoryQueryOptions, getMarketStatisticsQueryOptions, getMutedUsersQueryOptions, getNotificationsInfiniteQueryOptions, getNotificationsSettingsQueryOptions, getNotificationsUnreadCountQueryOptions, getOpenOrdersQueryOptions, getOrderBookQueryOptions, getOutgoingRcDelegationsInfiniteQueryOptions, getPageStatsQueryOptions, getPointsQueryOptions, getPostHeaderQueryOptions, getPostQueryOptions, getPostTipsQueryOptions, getPostingKey, getPostsRankedInfiniteQueryOptions, getPromotePriceQueryOptions, getPromotedPostsQuery, getProposalQueryOptions, getProposalVotesInfiniteQueryOptions, getProposalsQueryOptions, getQueryClient, getRcStatsQueryOptions, getReblogsQueryOptions, getReceivedVestingSharesQueryOptions, getReferralsInfiniteQueryOptions, getReferralsStatsQueryOptions, getRefreshToken, getRelationshipBetweenAccountsQueryOptions, getRewardedCommunitiesQueryOptions, getSavingsWithdrawFromQueryOptions, getSchedulesQueryOptions, getSearchAccountQueryOptions, getSearchAccountsByUsernameQueryOptions, getSearchApiInfiniteQueryOptions, getSearchFriendsQueryOptions, getSearchPathQueryOptions, getSearchTopicsQueryOptions, getSimilarEntriesQueryOptions, getStatsQueryOptions, getTransactionsInfiniteQueryOptions, getTrendingTagsQueryOptions, getTrendingTagsWithStatsQueryOptions, getUser, getUserProposalVotesQueryOptions, getVestingDelegationsQueryOptions, getVisibleFirstLevelThreadItems, getWavesByHostQueryOptions, getWavesByTagQueryOptions, getWavesFollowingQueryOptions, getWavesTrendingTagsQueryOptions, getWithdrawRoutesQueryOptions, getWitnessesInfiniteQueryOptions, isCommunity, lookupAccountsQueryOptions, makeQueryClient, mapThreadItemsToWaveEntries, normalizeWaveEntryFromApi, parseAccounts, parseAsset, parseProfileMetadata, roleMap, searchQueryOptions, sortDiscussions, toEntryArray, useAccountFavouriteAdd, useAccountFavouriteDelete, useAccountRelationsUpdate, useAccountRevokeKey, useAccountRevokePosting, useAccountUpdate, useAccountUpdateKeyAuths, useAccountUpdatePassword, useAccountUpdateRecovery, useAddFragment, useBookmarkAdd, useBookmarkDelete, useBroadcastMutation, useEditFragment, useGameClaim, useRecordActivity, useRemoveFragment, useSignOperationByHivesigner, useSignOperationByKey, useSignOperationByKeychain };
3003
+ declare function signUp(username: string, email: string, referral: string): Promise<ApiResponse<Record<string, unknown>>>;
3004
+ declare function subscribeEmail(email: string): Promise<ApiResponse<Record<string, unknown>>>;
3005
+ declare function usrActivity(code: string | undefined, ty: number, bl?: string | number, tx?: string | number): Promise<void>;
3006
+ declare function getNotifications(code: string | undefined, filter: string | null, since?: string | null, user?: string | null): Promise<ApiNotification[]>;
3007
+ declare function saveNotificationSetting(code: string | undefined, username: string, system: string, allows_notify: number, notify_types: number[], token: string): Promise<ApiNotificationSetting>;
3008
+ declare function getNotificationSetting(code: string | undefined, username: string, token: string): Promise<ApiNotificationSetting>;
3009
+ declare function markNotifications(code: string | undefined, id?: string): Promise<Record<string, unknown>>;
3010
+ declare function addImage(code: string | undefined, url: string): Promise<Record<string, unknown>>;
3011
+ declare function uploadImage(file: File, token: string, signal?: AbortSignal): Promise<{
3012
+ url: string;
3013
+ }>;
3014
+ declare function deleteImage(code: string | undefined, imageId: string): Promise<Record<string, unknown>>;
3015
+ declare function addDraft(code: string | undefined, title: string, body: string, tags: string, meta: DraftMetadata): Promise<{
3016
+ drafts: Draft[];
3017
+ }>;
3018
+ declare function updateDraft(code: string | undefined, draftId: string, title: string, body: string, tags: string, meta: DraftMetadata): Promise<{
3019
+ drafts: Draft[];
3020
+ }>;
3021
+ declare function deleteDraft(code: string | undefined, draftId: string): Promise<Record<string, unknown>>;
3022
+ declare function addSchedule(code: string | undefined, permlink: string, title: string, body: string, meta: Record<string, unknown>, options: Record<string, unknown> | null, schedule: string, reblog: boolean): Promise<Record<string, unknown>>;
3023
+ declare function deleteSchedule(code: string | undefined, id: string): Promise<Record<string, unknown>>;
3024
+ declare function moveSchedule(code: string | undefined, id: string): Promise<Schedule[]>;
3025
+ declare function getPromotedPost(code: string | undefined, author: string, permlink: string): Promise<{
3026
+ author: string;
3027
+ permlink: string;
3028
+ } | "">;
3029
+ declare function onboardEmail(username: string, email: string, friend: string): Promise<Record<string, unknown>>;
3030
+
3031
+ interface HsTokenRenewResponse {
3032
+ username: string;
3033
+ access_token: string;
3034
+ refresh_token: string;
3035
+ expires_in: number;
3036
+ }
3037
+
3038
+ declare function hsTokenRenew(code: string): Promise<HsTokenRenewResponse>;
3039
+
3040
+ 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 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 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, broadcastJson, buildProfileMetadata, checkUsernameWalletsPendingQueryOptions, decodeObj, dedupeAndSortKeyAuths, deleteDraft, deleteImage, deleteSchedule, encodeObj, extractAccountProfile, getAccessToken, getAccountFullQueryOptions, getAccountNotificationsInfiniteQueryOptions, getAccountPendingRecoveryQueryOptions, getAccountPostsInfiniteQueryOptions, getAccountRcQueryOptions, getAccountRecoveriesQueryOptions, getAccountSubscriptionsQueryOptions, getAccountVoteHistoryInfiniteQueryOptions, getAccountsQueryOptions, getActiveAccountBookmarksQueryOptions, getActiveAccountFavouritesQueryOptions, getAnnouncementsQueryOptions, getBoostPlusAccountPricesQueryOptions, getBoostPlusPricesQueryOptions, getBotsQueryOptions, getBoundFetch, getChainPropertiesQueryOptions, getCollateralizedConversionRequestsQueryOptions, getCommentHistoryQueryOptions, getCommunitiesQueryOptions, getCommunityContextQueryOptions, getCommunityPermissions, getCommunitySubscribersQueryOptions, getCommunityType, getControversialRisingInfiniteQueryOptions, getConversionRequestsQueryOptions, getCurrencyRate, getCurrencyRates, getCurrencyTokenRate, getDeletedEntryQueryOptions, getDiscoverCurationQueryOptions, getDiscoverLeaderboardQueryOptions, getDiscussionsQueryOptions, getDraftsQueryOptions, getDynamicPropsQueryOptions, getEntryActiveVotesQueryOptions, getFollowCountQueryOptions, getFollowingQueryOptions, getFragmentsQueryOptions, getFriendsInfiniteQueryOptions, getGalleryImagesQueryOptions, getGameStatusCheckQueryOptions, getHiveHbdStatsQueryOptions, getHivePoshLinksQueryOptions, getImagesQueryOptions, getLoginType, getMarketData, getMarketDataQueryOptions, getMarketHistoryQueryOptions, getMarketStatisticsQueryOptions, getMutedUsersQueryOptions, getNotificationSetting, getNotifications, getNotificationsInfiniteQueryOptions, getNotificationsSettingsQueryOptions, getNotificationsUnreadCountQueryOptions, getOpenOrdersQueryOptions, getOrderBookQueryOptions, getOutgoingRcDelegationsInfiniteQueryOptions, getPageStatsQueryOptions, getPointsQueryOptions, getPostHeaderQueryOptions, getPostQueryOptions, getPostTipsQueryOptions, getPostingKey, getPostsRankedInfiniteQueryOptions, getPromotePriceQueryOptions, getPromotedPost, getPromotedPostsQuery, getProposalQueryOptions, getProposalVotesInfiniteQueryOptions, getProposalsQueryOptions, getQueryClient, getRcStatsQueryOptions, getReblogsQueryOptions, getReceivedVestingSharesQueryOptions, getReferralsInfiniteQueryOptions, getReferralsStatsQueryOptions, getRefreshToken, getRelationshipBetweenAccountsQueryOptions, getRewardedCommunitiesQueryOptions, getSavingsWithdrawFromQueryOptions, getSchedulesQueryOptions, getSearchAccountQueryOptions, getSearchAccountsByUsernameQueryOptions, getSearchApiInfiniteQueryOptions, getSearchFriendsQueryOptions, getSearchPathQueryOptions, getSearchTopicsQueryOptions, getSimilarEntriesQueryOptions, getStatsQueryOptions, getTransactionsInfiniteQueryOptions, getTrendingTagsQueryOptions, getTrendingTagsWithStatsQueryOptions, getUser, getUserProposalVotesQueryOptions, getVestingDelegationsQueryOptions, getVisibleFirstLevelThreadItems, getWavesByHostQueryOptions, getWavesByTagQueryOptions, getWavesFollowingQueryOptions, getWavesTrendingTagsQueryOptions, getWithdrawRoutesQueryOptions, getWitnessesInfiniteQueryOptions, hsTokenRenew, isCommunity, lookupAccountsQueryOptions, makeQueryClient, mapThreadItemsToWaveEntries, markNotifications, moveSchedule, normalizeWaveEntryFromApi, onboardEmail, parseAccounts, parseAsset, parseProfileMetadata, roleMap, saveNotificationSetting, searchQueryOptions, 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 };