@steemit/steem-js 1.0.14 → 1.0.16
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 +6 -1
- package/dist/api/index.d.ts +9 -2
- package/dist/api/methods.d.ts +14 -0
- package/dist/api/transports/http.d.ts +4 -0
- package/dist/api/types.d.ts +2 -2
- package/dist/browser.esm.js +126 -217
- package/dist/browser.esm.js.map +1 -1
- package/dist/index.cjs +126 -217
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +126 -217
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +126 -217
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +3 -2
package/dist/browser.esm.js
CHANGED
|
@@ -17746,151 +17746,116 @@ const rpcAuth = /*#__PURE__*/Object.freeze({
|
|
|
17746
17746
|
validate: validate
|
|
17747
17747
|
});
|
|
17748
17748
|
|
|
17749
|
+
/**
|
|
17750
|
+
* Registry of JSON-RPC methods exposed as steem.api.* helpers.
|
|
17751
|
+
*
|
|
17752
|
+
* Each entry's `api` field is the Steem node plugin namespace sent on the wire
|
|
17753
|
+
* (legacy HTTP transport uses JSON-RPC `call` with [api, method, params]).
|
|
17754
|
+
*
|
|
17755
|
+
* Routing policy (aligned with steemit/steem):
|
|
17756
|
+
* - condenser_api: legacy read helpers (get_accounts, get_content, discussions, …)
|
|
17757
|
+
* - database_api: chain/validation APIs still on the modern database_api plugin
|
|
17758
|
+
* - follow_api, network_broadcast_api, market_history_api, etc.: other plugins
|
|
17759
|
+
*
|
|
17760
|
+
* Methods removed from this list in v1.0.16 are no longer served by current nodes
|
|
17761
|
+
* (e.g. websocket subscriptions, category listings, proposed-transaction getters).
|
|
17762
|
+
*/
|
|
17749
17763
|
const methods = [
|
|
17750
17764
|
{
|
|
17751
|
-
api: '
|
|
17752
|
-
method: 'set_subscribe_callback',
|
|
17753
|
-
params: ['callback', 'clearFilter']
|
|
17754
|
-
},
|
|
17755
|
-
{
|
|
17756
|
-
api: 'database_api',
|
|
17757
|
-
method: 'set_pending_transaction_callback',
|
|
17758
|
-
params: ['cb']
|
|
17759
|
-
},
|
|
17760
|
-
{
|
|
17761
|
-
api: 'database_api',
|
|
17762
|
-
method: 'set_block_applied_callback',
|
|
17763
|
-
params: ['cb']
|
|
17764
|
-
},
|
|
17765
|
-
{
|
|
17766
|
-
api: 'database_api',
|
|
17767
|
-
method: 'cancel_all_subscriptions'
|
|
17768
|
-
},
|
|
17769
|
-
{
|
|
17770
|
-
api: 'database_api',
|
|
17765
|
+
api: 'condenser_api',
|
|
17771
17766
|
method: 'get_trending_tags',
|
|
17772
17767
|
params: ['afterTag', 'limit']
|
|
17773
17768
|
},
|
|
17774
17769
|
{
|
|
17775
|
-
api: '
|
|
17770
|
+
api: 'condenser_api',
|
|
17776
17771
|
method: 'get_tags_used_by_author',
|
|
17777
17772
|
params: ['author']
|
|
17778
17773
|
},
|
|
17779
17774
|
{
|
|
17780
|
-
api: '
|
|
17775
|
+
api: 'condenser_api',
|
|
17781
17776
|
method: 'get_post_discussions_by_payout',
|
|
17782
17777
|
params: ['query']
|
|
17783
17778
|
},
|
|
17784
17779
|
{
|
|
17785
|
-
api: '
|
|
17780
|
+
api: 'condenser_api',
|
|
17786
17781
|
method: 'get_comment_discussions_by_payout',
|
|
17787
17782
|
params: ['query']
|
|
17788
17783
|
},
|
|
17789
17784
|
{
|
|
17790
|
-
api: '
|
|
17785
|
+
api: 'condenser_api',
|
|
17791
17786
|
method: 'get_discussions_by_trending',
|
|
17792
17787
|
params: ['query']
|
|
17793
17788
|
},
|
|
17794
17789
|
{
|
|
17795
|
-
api: '
|
|
17796
|
-
method: 'get_discussions_by_trending30',
|
|
17797
|
-
params: ['query']
|
|
17798
|
-
},
|
|
17799
|
-
{
|
|
17800
|
-
api: 'database_api',
|
|
17790
|
+
api: 'condenser_api',
|
|
17801
17791
|
method: 'get_discussions_by_created',
|
|
17802
17792
|
params: ['query']
|
|
17803
17793
|
},
|
|
17804
17794
|
{
|
|
17805
|
-
api: '
|
|
17795
|
+
api: 'condenser_api',
|
|
17806
17796
|
method: 'get_discussions_by_active',
|
|
17807
17797
|
params: ['query']
|
|
17808
17798
|
},
|
|
17809
17799
|
{
|
|
17810
|
-
api: '
|
|
17800
|
+
api: 'condenser_api',
|
|
17811
17801
|
method: 'get_discussions_by_cashout',
|
|
17812
17802
|
params: ['query']
|
|
17813
17803
|
},
|
|
17814
17804
|
{
|
|
17815
|
-
api: '
|
|
17816
|
-
method: 'get_discussions_by_payout',
|
|
17817
|
-
params: ['query']
|
|
17818
|
-
},
|
|
17819
|
-
{
|
|
17820
|
-
api: 'database_api',
|
|
17805
|
+
api: 'condenser_api',
|
|
17821
17806
|
method: 'get_discussions_by_votes',
|
|
17822
17807
|
params: ['query']
|
|
17823
17808
|
},
|
|
17824
17809
|
{
|
|
17825
|
-
api: '
|
|
17810
|
+
api: 'condenser_api',
|
|
17826
17811
|
method: 'get_discussions_by_children',
|
|
17827
17812
|
params: ['query']
|
|
17828
17813
|
},
|
|
17829
17814
|
{
|
|
17830
|
-
api: '
|
|
17815
|
+
api: 'condenser_api',
|
|
17831
17816
|
method: 'get_discussions_by_hot',
|
|
17832
17817
|
params: ['query']
|
|
17833
17818
|
},
|
|
17834
17819
|
{
|
|
17835
|
-
api: '
|
|
17820
|
+
api: 'condenser_api',
|
|
17836
17821
|
method: 'get_discussions_by_feed',
|
|
17837
17822
|
params: ['query']
|
|
17838
17823
|
},
|
|
17839
17824
|
{
|
|
17840
|
-
api: '
|
|
17825
|
+
api: 'condenser_api',
|
|
17841
17826
|
method: 'get_discussions_by_blog',
|
|
17842
17827
|
params: ['query']
|
|
17843
17828
|
},
|
|
17844
17829
|
{
|
|
17845
|
-
api: '
|
|
17830
|
+
api: 'condenser_api',
|
|
17846
17831
|
method: 'get_discussions_by_comments',
|
|
17847
17832
|
params: ['query']
|
|
17848
17833
|
},
|
|
17849
17834
|
{
|
|
17850
|
-
api: '
|
|
17835
|
+
api: 'condenser_api',
|
|
17851
17836
|
method: 'get_discussions_by_promoted',
|
|
17852
17837
|
params: ['query']
|
|
17853
17838
|
},
|
|
17854
17839
|
{
|
|
17855
|
-
api: '
|
|
17840
|
+
api: 'condenser_api',
|
|
17856
17841
|
method: 'get_block_header',
|
|
17857
17842
|
params: ['blockNum']
|
|
17858
17843
|
},
|
|
17859
17844
|
{
|
|
17860
|
-
api: '
|
|
17845
|
+
api: 'condenser_api',
|
|
17861
17846
|
method: 'get_block',
|
|
17862
17847
|
params: ['blockNum']
|
|
17863
17848
|
},
|
|
17864
17849
|
{
|
|
17865
|
-
api: '
|
|
17850
|
+
api: 'condenser_api',
|
|
17866
17851
|
method: 'get_ops_in_block',
|
|
17867
17852
|
params: ['blockNum', 'onlyVirtual']
|
|
17868
17853
|
},
|
|
17869
17854
|
{
|
|
17870
|
-
api: '
|
|
17855
|
+
api: 'condenser_api',
|
|
17871
17856
|
method: 'get_state',
|
|
17872
17857
|
params: ['path']
|
|
17873
17858
|
},
|
|
17874
|
-
{
|
|
17875
|
-
api: 'database_api',
|
|
17876
|
-
method: 'get_trending_categories',
|
|
17877
|
-
params: ['after', 'limit']
|
|
17878
|
-
},
|
|
17879
|
-
{
|
|
17880
|
-
api: 'database_api',
|
|
17881
|
-
method: 'get_best_categories',
|
|
17882
|
-
params: ['after', 'limit']
|
|
17883
|
-
},
|
|
17884
|
-
{
|
|
17885
|
-
api: 'database_api',
|
|
17886
|
-
method: 'get_active_categories',
|
|
17887
|
-
params: ['after', 'limit']
|
|
17888
|
-
},
|
|
17889
|
-
{
|
|
17890
|
-
api: 'database_api',
|
|
17891
|
-
method: 'get_recent_categories',
|
|
17892
|
-
params: ['after', 'limit']
|
|
17893
|
-
},
|
|
17894
17859
|
{
|
|
17895
17860
|
api: 'database_api',
|
|
17896
17861
|
method: 'get_config'
|
|
@@ -17900,7 +17865,7 @@ const methods = [
|
|
|
17900
17865
|
method: 'get_dynamic_global_properties'
|
|
17901
17866
|
},
|
|
17902
17867
|
{
|
|
17903
|
-
api: '
|
|
17868
|
+
api: 'condenser_api',
|
|
17904
17869
|
method: 'get_chain_properties'
|
|
17905
17870
|
},
|
|
17906
17871
|
{
|
|
@@ -17908,7 +17873,7 @@ const methods = [
|
|
|
17908
17873
|
method: 'get_feed_history'
|
|
17909
17874
|
},
|
|
17910
17875
|
{
|
|
17911
|
-
api: '
|
|
17876
|
+
api: 'condenser_api',
|
|
17912
17877
|
method: 'get_current_median_history_price'
|
|
17913
17878
|
},
|
|
17914
17879
|
{
|
|
@@ -17916,11 +17881,11 @@ const methods = [
|
|
|
17916
17881
|
method: 'get_witness_schedule'
|
|
17917
17882
|
},
|
|
17918
17883
|
{
|
|
17919
|
-
api: '
|
|
17884
|
+
api: 'condenser_api',
|
|
17920
17885
|
method: 'get_hardfork_version'
|
|
17921
17886
|
},
|
|
17922
17887
|
{
|
|
17923
|
-
api: '
|
|
17888
|
+
api: 'condenser_api',
|
|
17924
17889
|
method: 'get_next_scheduled_hardfork'
|
|
17925
17890
|
},
|
|
17926
17891
|
{
|
|
@@ -17929,46 +17894,46 @@ const methods = [
|
|
|
17929
17894
|
params: ['key']
|
|
17930
17895
|
},
|
|
17931
17896
|
{
|
|
17932
|
-
api: '
|
|
17897
|
+
api: 'condenser_api',
|
|
17933
17898
|
method: 'get_accounts',
|
|
17934
17899
|
params: ['names']
|
|
17935
17900
|
},
|
|
17936
17901
|
{
|
|
17937
|
-
api: '
|
|
17902
|
+
api: 'condenser_api',
|
|
17938
17903
|
method: 'get_account_references',
|
|
17939
17904
|
params: ['accountId']
|
|
17940
17905
|
},
|
|
17941
17906
|
{
|
|
17942
|
-
api: '
|
|
17907
|
+
api: 'condenser_api',
|
|
17943
17908
|
method: 'lookup_account_names',
|
|
17944
17909
|
params: ['accountNames']
|
|
17945
17910
|
},
|
|
17946
17911
|
{
|
|
17947
|
-
api: '
|
|
17912
|
+
api: 'condenser_api',
|
|
17948
17913
|
method: 'lookup_accounts',
|
|
17949
17914
|
params: ['lowerBoundName', 'limit']
|
|
17950
17915
|
},
|
|
17951
17916
|
{
|
|
17952
|
-
api: '
|
|
17917
|
+
api: 'condenser_api',
|
|
17953
17918
|
method: 'get_account_count'
|
|
17954
17919
|
},
|
|
17955
17920
|
{
|
|
17956
|
-
api: '
|
|
17921
|
+
api: 'condenser_api',
|
|
17957
17922
|
method: 'get_conversion_requests',
|
|
17958
17923
|
params: ['accountName']
|
|
17959
17924
|
},
|
|
17960
17925
|
{
|
|
17961
|
-
api: '
|
|
17926
|
+
api: 'condenser_api',
|
|
17962
17927
|
method: 'get_account_history',
|
|
17963
17928
|
params: ['account', 'from', 'limit']
|
|
17964
17929
|
},
|
|
17965
17930
|
{
|
|
17966
|
-
api: '
|
|
17931
|
+
api: 'condenser_api',
|
|
17967
17932
|
method: 'get_owner_history',
|
|
17968
17933
|
params: ['account']
|
|
17969
17934
|
},
|
|
17970
17935
|
{
|
|
17971
|
-
api: '
|
|
17936
|
+
api: 'condenser_api',
|
|
17972
17937
|
method: 'get_recovery_request',
|
|
17973
17938
|
params: ['account']
|
|
17974
17939
|
},
|
|
@@ -18018,42 +17983,27 @@ const methods = [
|
|
|
18018
17983
|
params: ['author', 'permlink']
|
|
18019
17984
|
},
|
|
18020
17985
|
{
|
|
18021
|
-
api: '
|
|
17986
|
+
api: 'condenser_api',
|
|
18022
17987
|
method: 'get_content',
|
|
18023
17988
|
params: ['author', 'permlink']
|
|
18024
17989
|
},
|
|
18025
17990
|
{
|
|
18026
|
-
api: '
|
|
18027
|
-
method: 'get_account_notifications',
|
|
18028
|
-
params: ['account', 'from', 'limit']
|
|
18029
|
-
},
|
|
18030
|
-
{
|
|
18031
|
-
api: 'database_api',
|
|
18032
|
-
method: 'get_account_reputation',
|
|
18033
|
-
params: ['account']
|
|
18034
|
-
},
|
|
18035
|
-
{
|
|
18036
|
-
api: 'database_api',
|
|
17991
|
+
api: 'condenser_api',
|
|
18037
17992
|
method: 'get_escrow',
|
|
18038
17993
|
params: ['from', 'escrowId']
|
|
18039
17994
|
},
|
|
18040
17995
|
{
|
|
18041
|
-
api: '
|
|
17996
|
+
api: 'condenser_api',
|
|
18042
17997
|
method: 'get_withdraw_routes',
|
|
18043
17998
|
params: ['account', 'withdrawRouteType']
|
|
18044
17999
|
},
|
|
18045
18000
|
{
|
|
18046
|
-
api: '
|
|
18047
|
-
method: 'get_account_bandwidth',
|
|
18048
|
-
params: ['account', 'bandwidthType']
|
|
18049
|
-
},
|
|
18050
|
-
{
|
|
18051
|
-
api: 'database_api',
|
|
18001
|
+
api: 'condenser_api',
|
|
18052
18002
|
method: 'get_savings_withdraw_from',
|
|
18053
18003
|
params: ['account']
|
|
18054
18004
|
},
|
|
18055
18005
|
{
|
|
18056
|
-
api: '
|
|
18006
|
+
api: 'condenser_api',
|
|
18057
18007
|
method: 'get_savings_withdraw_to',
|
|
18058
18008
|
params: ['account']
|
|
18059
18009
|
},
|
|
@@ -18063,22 +18013,17 @@ const methods = [
|
|
|
18063
18013
|
params: ['limit']
|
|
18064
18014
|
},
|
|
18065
18015
|
{
|
|
18066
|
-
api: '
|
|
18016
|
+
api: 'condenser_api',
|
|
18067
18017
|
method: 'get_open_orders',
|
|
18068
18018
|
params: ['owner']
|
|
18069
18019
|
},
|
|
18070
|
-
{
|
|
18071
|
-
api: 'database_api',
|
|
18072
|
-
method: 'get_liquidity_queue',
|
|
18073
|
-
params: ['startAccount', 'limit']
|
|
18074
|
-
},
|
|
18075
18020
|
{
|
|
18076
18021
|
api: 'database_api',
|
|
18077
18022
|
method: 'get_transaction_hex',
|
|
18078
18023
|
params: ['trx']
|
|
18079
18024
|
},
|
|
18080
18025
|
{
|
|
18081
|
-
api: '
|
|
18026
|
+
api: 'condenser_api',
|
|
18082
18027
|
method: 'get_transaction',
|
|
18083
18028
|
params: ['trxId']
|
|
18084
18029
|
},
|
|
@@ -18103,52 +18048,52 @@ const methods = [
|
|
|
18103
18048
|
params: ['nameOrId', 'signers']
|
|
18104
18049
|
},
|
|
18105
18050
|
{
|
|
18106
|
-
api: '
|
|
18051
|
+
api: 'condenser_api',
|
|
18107
18052
|
method: 'get_active_votes',
|
|
18108
18053
|
params: ['author', 'permlink']
|
|
18109
18054
|
},
|
|
18110
18055
|
{
|
|
18111
|
-
api: '
|
|
18056
|
+
api: 'condenser_api',
|
|
18112
18057
|
method: 'get_account_votes',
|
|
18113
18058
|
params: ['voter']
|
|
18114
18059
|
},
|
|
18115
18060
|
{
|
|
18116
|
-
api: '
|
|
18061
|
+
api: 'condenser_api',
|
|
18117
18062
|
method: 'get_content_replies',
|
|
18118
18063
|
params: ['author', 'permlink']
|
|
18119
18064
|
},
|
|
18120
18065
|
{
|
|
18121
|
-
api: '
|
|
18066
|
+
api: 'condenser_api',
|
|
18122
18067
|
method: 'get_discussions_by_author_before_date',
|
|
18123
18068
|
params: ['author', 'startPermlink', 'beforeDate', 'limit']
|
|
18124
18069
|
},
|
|
18125
18070
|
{
|
|
18126
|
-
api: '
|
|
18071
|
+
api: 'condenser_api',
|
|
18127
18072
|
method: 'get_replies_by_last_update',
|
|
18128
18073
|
params: ['startAuthor', 'startPermlink', 'limit']
|
|
18129
18074
|
},
|
|
18130
18075
|
{
|
|
18131
|
-
api: '
|
|
18076
|
+
api: 'condenser_api',
|
|
18132
18077
|
method: 'get_witnesses',
|
|
18133
18078
|
params: ['witnessIds']
|
|
18134
18079
|
},
|
|
18135
18080
|
{
|
|
18136
|
-
api: '
|
|
18081
|
+
api: 'condenser_api',
|
|
18137
18082
|
method: 'get_witness_by_account',
|
|
18138
18083
|
params: ['accountName']
|
|
18139
18084
|
},
|
|
18140
18085
|
{
|
|
18141
|
-
api: '
|
|
18086
|
+
api: 'condenser_api',
|
|
18142
18087
|
method: 'get_witnesses_by_vote',
|
|
18143
18088
|
params: ['from', 'limit']
|
|
18144
18089
|
},
|
|
18145
18090
|
{
|
|
18146
|
-
api: '
|
|
18091
|
+
api: 'condenser_api',
|
|
18147
18092
|
method: 'lookup_witness_accounts',
|
|
18148
18093
|
params: ['lowerBoundName', 'limit']
|
|
18149
18094
|
},
|
|
18150
18095
|
{
|
|
18151
|
-
api: '
|
|
18096
|
+
api: 'condenser_api',
|
|
18152
18097
|
method: 'get_witness_count'
|
|
18153
18098
|
},
|
|
18154
18099
|
{
|
|
@@ -18156,16 +18101,12 @@ const methods = [
|
|
|
18156
18101
|
method: 'get_active_witnesses'
|
|
18157
18102
|
},
|
|
18158
18103
|
{
|
|
18159
|
-
api: '
|
|
18160
|
-
method: 'get_miner_queue'
|
|
18161
|
-
},
|
|
18162
|
-
{
|
|
18163
|
-
api: 'database_api',
|
|
18104
|
+
api: 'condenser_api',
|
|
18164
18105
|
method: 'get_reward_fund',
|
|
18165
18106
|
params: ['name']
|
|
18166
18107
|
},
|
|
18167
18108
|
{
|
|
18168
|
-
api: '
|
|
18109
|
+
api: 'condenser_api',
|
|
18169
18110
|
method: 'get_vesting_delegations',
|
|
18170
18111
|
params: ['account', 'from', 'limit']
|
|
18171
18112
|
},
|
|
@@ -18286,81 +18227,6 @@ const methods = [
|
|
|
18286
18227
|
params: ['account'],
|
|
18287
18228
|
is_object: true
|
|
18288
18229
|
},
|
|
18289
|
-
{
|
|
18290
|
-
api: 'database_api',
|
|
18291
|
-
method: 'get_escrow_by_from',
|
|
18292
|
-
params: ['from', 'escrowId']
|
|
18293
|
-
},
|
|
18294
|
-
{
|
|
18295
|
-
api: 'database_api',
|
|
18296
|
-
method: 'get_escrow_by_to',
|
|
18297
|
-
params: ['to', 'escrowId']
|
|
18298
|
-
},
|
|
18299
|
-
{
|
|
18300
|
-
api: 'database_api',
|
|
18301
|
-
method: 'get_escrow_by_agent',
|
|
18302
|
-
params: ['agent', 'escrowId']
|
|
18303
|
-
},
|
|
18304
|
-
{
|
|
18305
|
-
api: 'database_api',
|
|
18306
|
-
method: 'get_account_bandwidth_by_type',
|
|
18307
|
-
params: ['account', 'bandwidthType']
|
|
18308
|
-
},
|
|
18309
|
-
{
|
|
18310
|
-
api: 'database_api',
|
|
18311
|
-
method: 'get_account_bandwidth_by_type_and_time',
|
|
18312
|
-
params: ['account', 'bandwidthType', 'time']
|
|
18313
|
-
},
|
|
18314
|
-
{
|
|
18315
|
-
api: 'database_api',
|
|
18316
|
-
method: 'get_proposed_transactions',
|
|
18317
|
-
params: ['account']
|
|
18318
|
-
},
|
|
18319
|
-
{
|
|
18320
|
-
api: 'database_api',
|
|
18321
|
-
method: 'get_proposed_transaction',
|
|
18322
|
-
params: ['account', 'proposalId']
|
|
18323
|
-
},
|
|
18324
|
-
{
|
|
18325
|
-
api: 'database_api',
|
|
18326
|
-
method: 'get_proposed_transaction_expirations',
|
|
18327
|
-
params: ['account']
|
|
18328
|
-
},
|
|
18329
|
-
{
|
|
18330
|
-
api: 'database_api',
|
|
18331
|
-
method: 'get_proposed_transaction_approvals',
|
|
18332
|
-
params: ['account']
|
|
18333
|
-
},
|
|
18334
|
-
{
|
|
18335
|
-
api: 'database_api',
|
|
18336
|
-
method: 'get_proposed_transaction_approvals_by_id',
|
|
18337
|
-
params: ['proposalId']
|
|
18338
|
-
},
|
|
18339
|
-
{
|
|
18340
|
-
api: 'database_api',
|
|
18341
|
-
method: 'get_proposed_transaction_approvals_by_account',
|
|
18342
|
-
params: ['account']
|
|
18343
|
-
},
|
|
18344
|
-
{
|
|
18345
|
-
api: 'database_api',
|
|
18346
|
-
method: 'get_proposed_transaction_approvals_by_account_and_id',
|
|
18347
|
-
params: ['account', 'proposalId']
|
|
18348
|
-
},
|
|
18349
|
-
{
|
|
18350
|
-
api: 'database_api',
|
|
18351
|
-
method: 'get_proposed_transaction_approvals_by_account_and_time',
|
|
18352
|
-
params: ['account', 'time']
|
|
18353
|
-
},
|
|
18354
|
-
{
|
|
18355
|
-
api: 'database_api',
|
|
18356
|
-
method: 'get_proposed_transaction_approvals_by_account_and_time_and_id',
|
|
18357
|
-
params: ['account', 'time', 'proposalId']
|
|
18358
|
-
},
|
|
18359
|
-
{
|
|
18360
|
-
api: 'database_api',
|
|
18361
|
-
method: 'get_proposed_transaction_approvals_by_account_and_time_and_id_and_approver',
|
|
18362
|
-
params: ['account', 'time', 'proposalId', 'approver']
|
|
18363
|
-
}
|
|
18364
18230
|
];
|
|
18365
18231
|
|
|
18366
18232
|
var retry$2 = {};
|
|
@@ -18803,6 +18669,10 @@ class HttpTransport extends BaseTransport {
|
|
|
18803
18669
|
isBroadcastOperation(method) {
|
|
18804
18670
|
return this.nonRetriableOperations.includes(method);
|
|
18805
18671
|
}
|
|
18672
|
+
/**
|
|
18673
|
+
* POST JSON-RPC to the node. Body uses method `call` with params [api, methodName, args]
|
|
18674
|
+
* for backwards compatibility with steemd; alternatively use Api.call('plugin.method', …).
|
|
18675
|
+
*/
|
|
18806
18676
|
send(api, data, callback) {
|
|
18807
18677
|
if (typeof callback !== 'function') {
|
|
18808
18678
|
callback = () => { };
|
|
@@ -26425,7 +26295,7 @@ function serializeCommentOptions(bb, data) {
|
|
|
26425
26295
|
bb.writeUint16(dataObj.percent_steem_dollars ?? 0);
|
|
26426
26296
|
serializeBool(bb, dataObj.allow_votes);
|
|
26427
26297
|
serializeBool(bb, dataObj.allow_curation_rewards);
|
|
26428
|
-
|
|
26298
|
+
serializeCommentOptionsExtensions(bb, dataObj.extensions);
|
|
26429
26299
|
}
|
|
26430
26300
|
/**
|
|
26431
26301
|
* Serialize custom_json operation
|
|
@@ -26502,7 +26372,7 @@ function serializeAuthority(bb, auth) {
|
|
|
26502
26372
|
*
|
|
26503
26373
|
* Format: int64 amount (little-endian) + uint8 precision + 7-byte symbol (UTF-8, null-padded).
|
|
26504
26374
|
*
|
|
26505
|
-
* This helper is reused across all operations
|
|
26375
|
+
* This helper is reused for asset fields across all operations, e.g.
|
|
26506
26376
|
* - amount / vesting_shares / reward_* / *_pays
|
|
26507
26377
|
*/
|
|
26508
26378
|
function serializeAsset(bb, amount) {
|
|
@@ -26522,7 +26392,7 @@ function serializeAsset(bb, amount) {
|
|
|
26522
26392
|
}
|
|
26523
26393
|
/**
|
|
26524
26394
|
* Write a string using ByteBuffer's writeVString method.
|
|
26525
|
-
*
|
|
26395
|
+
* All string fields are serialized through this helper to avoid calling ByteBuffer API directly everywhere.
|
|
26526
26396
|
*/
|
|
26527
26397
|
function writeString(bb, str) {
|
|
26528
26398
|
bb.writeVString(str);
|
|
@@ -26530,8 +26400,8 @@ function writeString(bb, str) {
|
|
|
26530
26400
|
/**
|
|
26531
26401
|
* Serialize a time_point_sec-style field.
|
|
26532
26402
|
*
|
|
26533
|
-
*
|
|
26534
|
-
*
|
|
26403
|
+
* Accepts ISO string / Date / seconds number; writes uint32 (seconds since epoch).
|
|
26404
|
+
* Used for proposal start/end, escrow_deadline, and similar fields.
|
|
26535
26405
|
*/
|
|
26536
26406
|
function serializeTimePointSec(bb, value) {
|
|
26537
26407
|
let seconds;
|
|
@@ -26544,7 +26414,7 @@ function serializeTimePointSec(bb, value) {
|
|
|
26544
26414
|
seconds = Math.floor(value.getTime() / 1000);
|
|
26545
26415
|
}
|
|
26546
26416
|
else if (typeof value === 'number') {
|
|
26547
|
-
//
|
|
26417
|
+
// Assume value is already in seconds
|
|
26548
26418
|
seconds = value;
|
|
26549
26419
|
}
|
|
26550
26420
|
else {
|
|
@@ -26554,29 +26424,61 @@ function serializeTimePointSec(bb, value) {
|
|
|
26554
26424
|
}
|
|
26555
26425
|
/**
|
|
26556
26426
|
* Serialize a generic bool flag as uint8(0/1).
|
|
26557
|
-
*
|
|
26427
|
+
* Reused for optional / approve / decline and similar fields.
|
|
26558
26428
|
*/
|
|
26559
26429
|
function serializeBool(bb, value) {
|
|
26560
26430
|
bb.writeUint8(value ? 1 : 0);
|
|
26561
26431
|
}
|
|
26562
26432
|
/**
|
|
26563
|
-
* Serialize
|
|
26433
|
+
* Serialize comment_options extensions (flat_set<comment_options_extension>).
|
|
26434
|
+
* Used only for comment_options operation. Supports tag 0 (comment_payout_beneficiaries).
|
|
26435
|
+
* Beneficiaries are sorted alphabetically by account name before encoding to satisfy Steem protocol.
|
|
26436
|
+
* Other extension tags are skipped; only tag 0 is serialized.
|
|
26437
|
+
*/
|
|
26438
|
+
function serializeCommentOptionsExtensions(bb, extensions) {
|
|
26439
|
+
if (!Array.isArray(extensions) || extensions.length === 0) {
|
|
26440
|
+
bb.writeVarint32(0);
|
|
26441
|
+
return;
|
|
26442
|
+
}
|
|
26443
|
+
// Only serialize tag 0 (comment_payout_beneficiaries); skip unknown tags
|
|
26444
|
+
const supported = extensions.filter((ext) => {
|
|
26445
|
+
const tag = Array.isArray(ext) && ext.length >= 1 ? Number(ext[0]) : -1;
|
|
26446
|
+
return tag === 0;
|
|
26447
|
+
});
|
|
26448
|
+
bb.writeVarint32(supported.length);
|
|
26449
|
+
for (const ext of supported) {
|
|
26450
|
+
const tag = ext[0];
|
|
26451
|
+
const value = ext[1];
|
|
26452
|
+
bb.writeVarint32(tag);
|
|
26453
|
+
if (tag === 0) {
|
|
26454
|
+
const beneficiaries = Array.isArray(value?.beneficiaries) ? value.beneficiaries.slice() : [];
|
|
26455
|
+
beneficiaries.sort((a, b) => String(a.account).localeCompare(String(b.account)));
|
|
26456
|
+
bb.writeVarint32(beneficiaries.length);
|
|
26457
|
+
for (const b of beneficiaries) {
|
|
26458
|
+
writeString(bb, String(b.account ?? ''));
|
|
26459
|
+
bb.writeUint16(Number(b.weight) & 0xffff);
|
|
26460
|
+
}
|
|
26461
|
+
}
|
|
26462
|
+
}
|
|
26463
|
+
}
|
|
26464
|
+
/**
|
|
26465
|
+
* Serialize a future_extensions / extensions-style field.
|
|
26564
26466
|
*
|
|
26565
|
-
*
|
|
26467
|
+
* For most on-chain transactions extensions are still an empty set. Protocol format:
|
|
26566
26468
|
* - varint32 length
|
|
26567
|
-
* -
|
|
26469
|
+
* - then each element serialized per convention (current implementation supports empty only).
|
|
26568
26470
|
*
|
|
26569
|
-
*
|
|
26570
|
-
*
|
|
26471
|
+
* To stay compatible with existing usage, we only write length 0 and ignore content here;
|
|
26472
|
+
* when supporting specific extension types, extend this after verification.
|
|
26571
26473
|
*/
|
|
26572
26474
|
function serializeExtensions(bb, extensions) {
|
|
26573
26475
|
if (!Array.isArray(extensions) || extensions.length === 0) {
|
|
26574
26476
|
bb.writeVarint32(0);
|
|
26575
26477
|
return;
|
|
26576
26478
|
}
|
|
26577
|
-
//
|
|
26578
|
-
//
|
|
26579
|
-
//
|
|
26479
|
+
// Protocol-wise extensions are future_extensions; on mainnet they are typically 0.
|
|
26480
|
+
// To avoid serializing data incompatible with C++ nodes, we still write 0 conservatively.
|
|
26481
|
+
// To support non-empty extensions in the future, enable the logic below after tests:
|
|
26580
26482
|
//
|
|
26581
26483
|
// bb.writeVarint32(extensions.length);
|
|
26582
26484
|
// for (const ext of extensions) {
|
|
@@ -26888,6 +26790,7 @@ class Api extends eventsExports.EventEmitter {
|
|
|
26888
26790
|
this._setTransport(options);
|
|
26889
26791
|
this._setLogger(options);
|
|
26890
26792
|
this.options = options;
|
|
26793
|
+
// Register steem.api.* from src/api/methods.ts; each call uses method.api as the RPC namespace.
|
|
26891
26794
|
methods.forEach(method => {
|
|
26892
26795
|
const methodName = method.method_name || camelCase(method.method);
|
|
26893
26796
|
const methodParams = method.params || [];
|
|
@@ -27021,6 +26924,11 @@ class Api extends eventsExports.EventEmitter {
|
|
|
27021
26924
|
}
|
|
27022
26925
|
return this.transport.stop();
|
|
27023
26926
|
}
|
|
26927
|
+
/**
|
|
26928
|
+
* Send a JSON-RPC request via the active transport.
|
|
26929
|
+
* HTTP uses the legacy `call` wrapper: params are [apiNamespace, methodName, args].
|
|
26930
|
+
* @param api Plugin namespace (e.g. condenser_api, database_api)
|
|
26931
|
+
*/
|
|
27024
26932
|
send(api, data, callback) {
|
|
27025
26933
|
let cb = callback;
|
|
27026
26934
|
if (this.__logger) {
|
|
@@ -27554,7 +27462,8 @@ class Api extends eventsExports.EventEmitter {
|
|
|
27554
27462
|
});
|
|
27555
27463
|
}
|
|
27556
27464
|
/**
|
|
27557
|
-
* Verify transaction authority.
|
|
27465
|
+
* Verify transaction authority (database_api.verify_authority on the node).
|
|
27466
|
+
* Prefer verifyAuthorityAsync; dynamically generated helpers also exist from methods.ts.
|
|
27558
27467
|
* @param trx Transaction object to verify
|
|
27559
27468
|
* @param callback Optional callback function
|
|
27560
27469
|
* @returns Promise with verification result if no callback provided
|
|
@@ -27589,7 +27498,7 @@ class Api extends eventsExports.EventEmitter {
|
|
|
27589
27498
|
});
|
|
27590
27499
|
}
|
|
27591
27500
|
/**
|
|
27592
|
-
* Verify account authority.
|
|
27501
|
+
* Verify account authority (database_api.verify_account_authority on the node).
|
|
27593
27502
|
* @param nameOrId Account name or ID
|
|
27594
27503
|
* @param signers Array of signer public keys
|
|
27595
27504
|
* @param callback Optional callback function
|
|
@@ -29652,7 +29561,7 @@ const steem = {
|
|
|
29652
29561
|
memo,
|
|
29653
29562
|
operations,
|
|
29654
29563
|
utils: utils$3,
|
|
29655
|
-
version: '1.0.
|
|
29564
|
+
version: '1.0.16',
|
|
29656
29565
|
config: {
|
|
29657
29566
|
set: (options) => {
|
|
29658
29567
|
// If nodes is provided, extract the first node as url for API
|