@ecency/sdk 2.3.28 → 2.3.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { MutationKey, UseMutationOptions, QueryClient, QueryKey, InfiniteData, UseQueryOptions, UseInfiniteQueryOptions, useMutation } from '@tanstack/react-query';
3
- import { O as Operation, R as PrivateKey, i as BroadcastResult, g as Authority, S as PublicKey, P as OperationName, aj as operations } from './hive-fkgMnAQs.js';
4
- export { A as AccountCreateOperation, f as AssetSymbol, u as CustomJsonOperation, $ as HiveTxTransaction, M as Memo, N as OperationBody, _ as Signature, ae as callREST, af as callRPC, ag as callRPCBroadcast, ah as callWithQuorum, ai as hiveTxConfig, am as hiveTxUtils } from './hive-fkgMnAQs.js';
3
+ import { O as Operation, S as PrivateKey, j as BroadcastResult, A as APIMethods, h as Authority, T as PublicKey, Q as OperationName, ak as operations } from './hive-CMt4SNd2.js';
4
+ export { a as AccountCreateOperation, g as AssetSymbol, v as CustomJsonOperation, a0 as HiveTxTransaction, N as Memo, P as OperationBody, $ as Signature, af as callREST, ag as callRPC, ah as callRPCBroadcast, ai as callWithQuorum, aj as hiveTxConfig, ap as hiveTxUtils } from './hive-CMt4SNd2.js';
5
5
 
6
6
  interface AiGenerationPrice {
7
7
  aspect_ratio: string;
@@ -1015,6 +1015,23 @@ declare namespace ConfigManager {
1015
1015
  * @param nodes - Array of Hive RPC node URLs
1016
1016
  */
1017
1017
  function setHiveNodes(nodes: string[]): void;
1018
+ /**
1019
+ * Set the REST-API node list, replacing the default `restNodes`. Lets an app
1020
+ * add/remove REST hosts at runtime (e.g. drop an own node being decommissioned,
1021
+ * or widen the public pool) without forking + republishing the SDK. Delegates to
1022
+ * the unified hive-tx `setRestNodes` (validated, shared with `@ecency/sdk/hive`).
1023
+ * @param nodes - Array of REST-capable node URLs (without a trailing slash)
1024
+ */
1025
+ function setRestNodes(nodes: string[]): void;
1026
+ /**
1027
+ * Merge per-API REST node overrides. For each API a non-empty valid list pins it
1028
+ * to those hosts (so `callREST` never wastes its retry budget on a node that
1029
+ * 404/503s the API); an empty list removes the pin (falls back to `restNodes`).
1030
+ * Other APIs' pins (e.g. the built-in `hivesense`) are preserved. Delegates to the
1031
+ * unified hive-tx `setRestNodesByApi`.
1032
+ * @param map - Partial map of REST API name → capable node URLs
1033
+ */
1034
+ function setRestNodesByApi(map: Partial<Record<APIMethods, string[]>>): void;
1018
1035
  /**
1019
1036
  * Set the User-Agent sent on server-side (Node) requests to Hive nodes.
1020
1037
  * Lets an app label its own SSR/server traffic (otherwise Node's fetch sends a
@@ -2840,127 +2857,167 @@ interface CreateAccountPayload {
2840
2857
  }
2841
2858
  declare function useCreateAccount(username: string | undefined, auth?: AuthContextV2, broadcastMode?: BroadcastMode): _tanstack_react_query.UseMutationResult<unknown, Error, CreateAccountPayload, unknown>;
2842
2859
 
2860
+ declare function useSignOperationByKey(username: string | undefined): _tanstack_react_query.UseMutationResult<TransactionConfirmation, Error, {
2861
+ operation: Operation;
2862
+ keyOrSeed: string;
2863
+ }, unknown>;
2864
+
2865
+ declare function useSignOperationByKeychain(username: string | undefined, auth?: AuthContext, keyType?: "owner" | "active" | "posting" | "memo"): _tanstack_react_query.UseMutationResult<unknown, Error, {
2866
+ operation: Operation;
2867
+ }, unknown>;
2868
+
2869
+ declare function useSignOperationByHivesigner(callbackUri?: string): _tanstack_react_query.UseMutationResult<string | void, Error, {
2870
+ operation: Operation;
2871
+ }, unknown>;
2872
+
2873
+ declare function getChainPropertiesQueryOptions(): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<any, Error, any, string[]>, "queryFn"> & {
2874
+ queryFn?: _tanstack_react_query.QueryFunction<any, string[], never> | undefined;
2875
+ } & {
2876
+ queryKey: string[] & {
2877
+ [dataTagSymbol]: any;
2878
+ [dataTagErrorSymbol]: Error;
2879
+ };
2880
+ };
2881
+
2843
2882
  declare function getAccountFullQueryOptions(username: string | undefined): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<{
2844
- name: any;
2845
- owner: any;
2846
- active: any;
2847
- posting: any;
2848
- memo_key: any;
2849
- post_count: any;
2850
- created: any;
2851
- posting_json_metadata: any;
2852
- last_vote_time: any;
2853
- last_post: any;
2854
- json_metadata: any;
2855
- reward_hive_balance: any;
2856
- reward_hbd_balance: any;
2857
- reward_vesting_hive: any;
2858
- reward_vesting_balance: any;
2859
- balance: any;
2860
- hbd_balance: any;
2861
- savings_balance: any;
2862
- savings_hbd_balance: any;
2863
- savings_hbd_last_interest_payment: any;
2864
- savings_hbd_seconds_last_update: any;
2865
- savings_hbd_seconds: any;
2866
- next_vesting_withdrawal: any;
2867
- pending_claimed_accounts: any;
2868
- vesting_shares: any;
2869
- delegated_vesting_shares: any;
2870
- received_vesting_shares: any;
2871
- vesting_withdraw_rate: any;
2872
- to_withdraw: any;
2873
- withdrawn: any;
2874
- witness_votes: any;
2875
- proxy: any;
2876
- recovery_account: any;
2877
- proxied_vsf_votes: any;
2878
- voting_manabar: any;
2879
- voting_power: any;
2880
- downvote_manabar: any;
2883
+ name: string;
2884
+ owner: Authority;
2885
+ active: Authority;
2886
+ posting: Authority;
2887
+ memo_key: string;
2888
+ post_count: number;
2889
+ created: string;
2890
+ posting_json_metadata: string;
2891
+ last_vote_time: string;
2892
+ last_post: string;
2893
+ json_metadata: string;
2894
+ reward_hive_balance: string;
2895
+ reward_hbd_balance: string;
2896
+ reward_vesting_hive: string;
2897
+ reward_vesting_balance: string;
2898
+ balance: string;
2899
+ hbd_balance: string;
2900
+ savings_balance: string;
2901
+ savings_hbd_balance: string;
2902
+ savings_hbd_last_interest_payment: string;
2903
+ savings_hbd_seconds_last_update: string;
2904
+ savings_hbd_seconds: string;
2905
+ next_vesting_withdrawal: string;
2906
+ pending_claimed_accounts: number;
2907
+ vesting_shares: string;
2908
+ delegated_vesting_shares: string;
2909
+ received_vesting_shares: string;
2910
+ vesting_withdraw_rate: string;
2911
+ to_withdraw: string;
2912
+ withdrawn: string;
2913
+ witness_votes: string[];
2914
+ proxy: string;
2915
+ recovery_account: string;
2916
+ proxied_vsf_votes: string[] | number[];
2917
+ voting_manabar: {
2918
+ current_mana: string | number;
2919
+ last_update_time: number;
2920
+ };
2921
+ voting_power: number;
2922
+ downvote_manabar: {
2923
+ current_mana: string | number;
2924
+ last_update_time: number;
2925
+ };
2881
2926
  follow_stats: AccountFollowStats | undefined;
2882
2927
  reputation: number;
2883
2928
  profile: AccountProfile;
2884
2929
  } | null, Error, {
2885
- name: any;
2886
- owner: any;
2887
- active: any;
2888
- posting: any;
2889
- memo_key: any;
2890
- post_count: any;
2891
- created: any;
2892
- posting_json_metadata: any;
2893
- last_vote_time: any;
2894
- last_post: any;
2895
- json_metadata: any;
2896
- reward_hive_balance: any;
2897
- reward_hbd_balance: any;
2898
- reward_vesting_hive: any;
2899
- reward_vesting_balance: any;
2900
- balance: any;
2901
- hbd_balance: any;
2902
- savings_balance: any;
2903
- savings_hbd_balance: any;
2904
- savings_hbd_last_interest_payment: any;
2905
- savings_hbd_seconds_last_update: any;
2906
- savings_hbd_seconds: any;
2907
- next_vesting_withdrawal: any;
2908
- pending_claimed_accounts: any;
2909
- vesting_shares: any;
2910
- delegated_vesting_shares: any;
2911
- received_vesting_shares: any;
2912
- vesting_withdraw_rate: any;
2913
- to_withdraw: any;
2914
- withdrawn: any;
2915
- witness_votes: any;
2916
- proxy: any;
2917
- recovery_account: any;
2918
- proxied_vsf_votes: any;
2919
- voting_manabar: any;
2920
- voting_power: any;
2921
- downvote_manabar: any;
2930
+ name: string;
2931
+ owner: Authority;
2932
+ active: Authority;
2933
+ posting: Authority;
2934
+ memo_key: string;
2935
+ post_count: number;
2936
+ created: string;
2937
+ posting_json_metadata: string;
2938
+ last_vote_time: string;
2939
+ last_post: string;
2940
+ json_metadata: string;
2941
+ reward_hive_balance: string;
2942
+ reward_hbd_balance: string;
2943
+ reward_vesting_hive: string;
2944
+ reward_vesting_balance: string;
2945
+ balance: string;
2946
+ hbd_balance: string;
2947
+ savings_balance: string;
2948
+ savings_hbd_balance: string;
2949
+ savings_hbd_last_interest_payment: string;
2950
+ savings_hbd_seconds_last_update: string;
2951
+ savings_hbd_seconds: string;
2952
+ next_vesting_withdrawal: string;
2953
+ pending_claimed_accounts: number;
2954
+ vesting_shares: string;
2955
+ delegated_vesting_shares: string;
2956
+ received_vesting_shares: string;
2957
+ vesting_withdraw_rate: string;
2958
+ to_withdraw: string;
2959
+ withdrawn: string;
2960
+ witness_votes: string[];
2961
+ proxy: string;
2962
+ recovery_account: string;
2963
+ proxied_vsf_votes: string[] | number[];
2964
+ voting_manabar: {
2965
+ current_mana: string | number;
2966
+ last_update_time: number;
2967
+ };
2968
+ voting_power: number;
2969
+ downvote_manabar: {
2970
+ current_mana: string | number;
2971
+ last_update_time: number;
2972
+ };
2922
2973
  follow_stats: AccountFollowStats | undefined;
2923
2974
  reputation: number;
2924
2975
  profile: AccountProfile;
2925
2976
  } | null, (string | undefined)[]>, "queryFn"> & {
2926
2977
  queryFn?: _tanstack_react_query.QueryFunction<{
2927
- name: any;
2928
- owner: any;
2929
- active: any;
2930
- posting: any;
2931
- memo_key: any;
2932
- post_count: any;
2933
- created: any;
2934
- posting_json_metadata: any;
2935
- last_vote_time: any;
2936
- last_post: any;
2937
- json_metadata: any;
2938
- reward_hive_balance: any;
2939
- reward_hbd_balance: any;
2940
- reward_vesting_hive: any;
2941
- reward_vesting_balance: any;
2942
- balance: any;
2943
- hbd_balance: any;
2944
- savings_balance: any;
2945
- savings_hbd_balance: any;
2946
- savings_hbd_last_interest_payment: any;
2947
- savings_hbd_seconds_last_update: any;
2948
- savings_hbd_seconds: any;
2949
- next_vesting_withdrawal: any;
2950
- pending_claimed_accounts: any;
2951
- vesting_shares: any;
2952
- delegated_vesting_shares: any;
2953
- received_vesting_shares: any;
2954
- vesting_withdraw_rate: any;
2955
- to_withdraw: any;
2956
- withdrawn: any;
2957
- witness_votes: any;
2958
- proxy: any;
2959
- recovery_account: any;
2960
- proxied_vsf_votes: any;
2961
- voting_manabar: any;
2962
- voting_power: any;
2963
- downvote_manabar: any;
2978
+ name: string;
2979
+ owner: Authority;
2980
+ active: Authority;
2981
+ posting: Authority;
2982
+ memo_key: string;
2983
+ post_count: number;
2984
+ created: string;
2985
+ posting_json_metadata: string;
2986
+ last_vote_time: string;
2987
+ last_post: string;
2988
+ json_metadata: string;
2989
+ reward_hive_balance: string;
2990
+ reward_hbd_balance: string;
2991
+ reward_vesting_hive: string;
2992
+ reward_vesting_balance: string;
2993
+ balance: string;
2994
+ hbd_balance: string;
2995
+ savings_balance: string;
2996
+ savings_hbd_balance: string;
2997
+ savings_hbd_last_interest_payment: string;
2998
+ savings_hbd_seconds_last_update: string;
2999
+ savings_hbd_seconds: string;
3000
+ next_vesting_withdrawal: string;
3001
+ pending_claimed_accounts: number;
3002
+ vesting_shares: string;
3003
+ delegated_vesting_shares: string;
3004
+ received_vesting_shares: string;
3005
+ vesting_withdraw_rate: string;
3006
+ to_withdraw: string;
3007
+ withdrawn: string;
3008
+ witness_votes: string[];
3009
+ proxy: string;
3010
+ recovery_account: string;
3011
+ proxied_vsf_votes: string[] | number[];
3012
+ voting_manabar: {
3013
+ current_mana: string | number;
3014
+ last_update_time: number;
3015
+ };
3016
+ voting_power: number;
3017
+ downvote_manabar: {
3018
+ current_mana: string | number;
3019
+ last_update_time: number;
3020
+ };
2964
3021
  follow_stats: AccountFollowStats | undefined;
2965
3022
  reputation: number;
2966
3023
  profile: AccountProfile;
@@ -2968,43 +3025,49 @@ declare function getAccountFullQueryOptions(username: string | undefined): _tans
2968
3025
  } & {
2969
3026
  queryKey: (string | undefined)[] & {
2970
3027
  [dataTagSymbol]: {
2971
- name: any;
2972
- owner: any;
2973
- active: any;
2974
- posting: any;
2975
- memo_key: any;
2976
- post_count: any;
2977
- created: any;
2978
- posting_json_metadata: any;
2979
- last_vote_time: any;
2980
- last_post: any;
2981
- json_metadata: any;
2982
- reward_hive_balance: any;
2983
- reward_hbd_balance: any;
2984
- reward_vesting_hive: any;
2985
- reward_vesting_balance: any;
2986
- balance: any;
2987
- hbd_balance: any;
2988
- savings_balance: any;
2989
- savings_hbd_balance: any;
2990
- savings_hbd_last_interest_payment: any;
2991
- savings_hbd_seconds_last_update: any;
2992
- savings_hbd_seconds: any;
2993
- next_vesting_withdrawal: any;
2994
- pending_claimed_accounts: any;
2995
- vesting_shares: any;
2996
- delegated_vesting_shares: any;
2997
- received_vesting_shares: any;
2998
- vesting_withdraw_rate: any;
2999
- to_withdraw: any;
3000
- withdrawn: any;
3001
- witness_votes: any;
3002
- proxy: any;
3003
- recovery_account: any;
3004
- proxied_vsf_votes: any;
3005
- voting_manabar: any;
3006
- voting_power: any;
3007
- downvote_manabar: any;
3028
+ name: string;
3029
+ owner: Authority;
3030
+ active: Authority;
3031
+ posting: Authority;
3032
+ memo_key: string;
3033
+ post_count: number;
3034
+ created: string;
3035
+ posting_json_metadata: string;
3036
+ last_vote_time: string;
3037
+ last_post: string;
3038
+ json_metadata: string;
3039
+ reward_hive_balance: string;
3040
+ reward_hbd_balance: string;
3041
+ reward_vesting_hive: string;
3042
+ reward_vesting_balance: string;
3043
+ balance: string;
3044
+ hbd_balance: string;
3045
+ savings_balance: string;
3046
+ savings_hbd_balance: string;
3047
+ savings_hbd_last_interest_payment: string;
3048
+ savings_hbd_seconds_last_update: string;
3049
+ savings_hbd_seconds: string;
3050
+ next_vesting_withdrawal: string;
3051
+ pending_claimed_accounts: number;
3052
+ vesting_shares: string;
3053
+ delegated_vesting_shares: string;
3054
+ received_vesting_shares: string;
3055
+ vesting_withdraw_rate: string;
3056
+ to_withdraw: string;
3057
+ withdrawn: string;
3058
+ witness_votes: string[];
3059
+ proxy: string;
3060
+ recovery_account: string;
3061
+ proxied_vsf_votes: string[] | number[];
3062
+ voting_manabar: {
3063
+ current_mana: string | number;
3064
+ last_update_time: number;
3065
+ };
3066
+ voting_power: number;
3067
+ downvote_manabar: {
3068
+ current_mana: string | number;
3069
+ last_update_time: number;
3070
+ };
3008
3071
  follow_stats: AccountFollowStats | undefined;
3009
3072
  reputation: number;
3010
3073
  profile: AccountProfile;
@@ -3665,28 +3728,6 @@ declare function downVotingPower(account: FullAccount): number;
3665
3728
  declare function rcPower(account: RCAccount): number;
3666
3729
  declare function votingValue(account: FullAccount, dynamicProps: DynamicProps$1, votingPowerValue: number, weight?: number): number;
3667
3730
 
3668
- declare function useSignOperationByKey(username: string | undefined): _tanstack_react_query.UseMutationResult<TransactionConfirmation, Error, {
3669
- operation: Operation;
3670
- keyOrSeed: string;
3671
- }, unknown>;
3672
-
3673
- declare function useSignOperationByKeychain(username: string | undefined, auth?: AuthContext, keyType?: "owner" | "active" | "posting" | "memo"): _tanstack_react_query.UseMutationResult<unknown, Error, {
3674
- operation: Operation;
3675
- }, unknown>;
3676
-
3677
- declare function useSignOperationByHivesigner(callbackUri?: string): _tanstack_react_query.UseMutationResult<string | void, Error, {
3678
- operation: Operation;
3679
- }, unknown>;
3680
-
3681
- declare function getChainPropertiesQueryOptions(): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<any, Error, any, string[]>, "queryFn"> & {
3682
- queryFn?: _tanstack_react_query.QueryFunction<any, string[], never> | undefined;
3683
- } & {
3684
- queryKey: string[] & {
3685
- [dataTagSymbol]: any;
3686
- [dataTagErrorSymbol]: Error;
3687
- };
3688
- };
3689
-
3690
3731
  declare function getTrendingTagsQueryOptions(limit?: number): _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseInfiniteQueryOptions<string[], Error, _tanstack_react_query.InfiniteData<string[], unknown>, string[], {
3691
3732
  afterTag: string;
3692
3733
  }>, "queryFn"> & {