@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/index.cjs
CHANGED
|
@@ -14728,151 +14728,116 @@ var rpcAuth = /*#__PURE__*/Object.freeze({
|
|
|
14728
14728
|
validate: validate
|
|
14729
14729
|
});
|
|
14730
14730
|
|
|
14731
|
+
/**
|
|
14732
|
+
* Registry of JSON-RPC methods exposed as steem.api.* helpers.
|
|
14733
|
+
*
|
|
14734
|
+
* Each entry's `api` field is the Steem node plugin namespace sent on the wire
|
|
14735
|
+
* (legacy HTTP transport uses JSON-RPC `call` with [api, method, params]).
|
|
14736
|
+
*
|
|
14737
|
+
* Routing policy (aligned with steemit/steem):
|
|
14738
|
+
* - condenser_api: legacy read helpers (get_accounts, get_content, discussions, …)
|
|
14739
|
+
* - database_api: chain/validation APIs still on the modern database_api plugin
|
|
14740
|
+
* - follow_api, network_broadcast_api, market_history_api, etc.: other plugins
|
|
14741
|
+
*
|
|
14742
|
+
* Methods removed from this list in v1.0.16 are no longer served by current nodes
|
|
14743
|
+
* (e.g. websocket subscriptions, category listings, proposed-transaction getters).
|
|
14744
|
+
*/
|
|
14731
14745
|
const methods = [
|
|
14732
14746
|
{
|
|
14733
|
-
api: '
|
|
14734
|
-
method: 'set_subscribe_callback',
|
|
14735
|
-
params: ['callback', 'clearFilter']
|
|
14736
|
-
},
|
|
14737
|
-
{
|
|
14738
|
-
api: 'database_api',
|
|
14739
|
-
method: 'set_pending_transaction_callback',
|
|
14740
|
-
params: ['cb']
|
|
14741
|
-
},
|
|
14742
|
-
{
|
|
14743
|
-
api: 'database_api',
|
|
14744
|
-
method: 'set_block_applied_callback',
|
|
14745
|
-
params: ['cb']
|
|
14746
|
-
},
|
|
14747
|
-
{
|
|
14748
|
-
api: 'database_api',
|
|
14749
|
-
method: 'cancel_all_subscriptions'
|
|
14750
|
-
},
|
|
14751
|
-
{
|
|
14752
|
-
api: 'database_api',
|
|
14747
|
+
api: 'condenser_api',
|
|
14753
14748
|
method: 'get_trending_tags',
|
|
14754
14749
|
params: ['afterTag', 'limit']
|
|
14755
14750
|
},
|
|
14756
14751
|
{
|
|
14757
|
-
api: '
|
|
14752
|
+
api: 'condenser_api',
|
|
14758
14753
|
method: 'get_tags_used_by_author',
|
|
14759
14754
|
params: ['author']
|
|
14760
14755
|
},
|
|
14761
14756
|
{
|
|
14762
|
-
api: '
|
|
14757
|
+
api: 'condenser_api',
|
|
14763
14758
|
method: 'get_post_discussions_by_payout',
|
|
14764
14759
|
params: ['query']
|
|
14765
14760
|
},
|
|
14766
14761
|
{
|
|
14767
|
-
api: '
|
|
14762
|
+
api: 'condenser_api',
|
|
14768
14763
|
method: 'get_comment_discussions_by_payout',
|
|
14769
14764
|
params: ['query']
|
|
14770
14765
|
},
|
|
14771
14766
|
{
|
|
14772
|
-
api: '
|
|
14767
|
+
api: 'condenser_api',
|
|
14773
14768
|
method: 'get_discussions_by_trending',
|
|
14774
14769
|
params: ['query']
|
|
14775
14770
|
},
|
|
14776
14771
|
{
|
|
14777
|
-
api: '
|
|
14778
|
-
method: 'get_discussions_by_trending30',
|
|
14779
|
-
params: ['query']
|
|
14780
|
-
},
|
|
14781
|
-
{
|
|
14782
|
-
api: 'database_api',
|
|
14772
|
+
api: 'condenser_api',
|
|
14783
14773
|
method: 'get_discussions_by_created',
|
|
14784
14774
|
params: ['query']
|
|
14785
14775
|
},
|
|
14786
14776
|
{
|
|
14787
|
-
api: '
|
|
14777
|
+
api: 'condenser_api',
|
|
14788
14778
|
method: 'get_discussions_by_active',
|
|
14789
14779
|
params: ['query']
|
|
14790
14780
|
},
|
|
14791
14781
|
{
|
|
14792
|
-
api: '
|
|
14782
|
+
api: 'condenser_api',
|
|
14793
14783
|
method: 'get_discussions_by_cashout',
|
|
14794
14784
|
params: ['query']
|
|
14795
14785
|
},
|
|
14796
14786
|
{
|
|
14797
|
-
api: '
|
|
14798
|
-
method: 'get_discussions_by_payout',
|
|
14799
|
-
params: ['query']
|
|
14800
|
-
},
|
|
14801
|
-
{
|
|
14802
|
-
api: 'database_api',
|
|
14787
|
+
api: 'condenser_api',
|
|
14803
14788
|
method: 'get_discussions_by_votes',
|
|
14804
14789
|
params: ['query']
|
|
14805
14790
|
},
|
|
14806
14791
|
{
|
|
14807
|
-
api: '
|
|
14792
|
+
api: 'condenser_api',
|
|
14808
14793
|
method: 'get_discussions_by_children',
|
|
14809
14794
|
params: ['query']
|
|
14810
14795
|
},
|
|
14811
14796
|
{
|
|
14812
|
-
api: '
|
|
14797
|
+
api: 'condenser_api',
|
|
14813
14798
|
method: 'get_discussions_by_hot',
|
|
14814
14799
|
params: ['query']
|
|
14815
14800
|
},
|
|
14816
14801
|
{
|
|
14817
|
-
api: '
|
|
14802
|
+
api: 'condenser_api',
|
|
14818
14803
|
method: 'get_discussions_by_feed',
|
|
14819
14804
|
params: ['query']
|
|
14820
14805
|
},
|
|
14821
14806
|
{
|
|
14822
|
-
api: '
|
|
14807
|
+
api: 'condenser_api',
|
|
14823
14808
|
method: 'get_discussions_by_blog',
|
|
14824
14809
|
params: ['query']
|
|
14825
14810
|
},
|
|
14826
14811
|
{
|
|
14827
|
-
api: '
|
|
14812
|
+
api: 'condenser_api',
|
|
14828
14813
|
method: 'get_discussions_by_comments',
|
|
14829
14814
|
params: ['query']
|
|
14830
14815
|
},
|
|
14831
14816
|
{
|
|
14832
|
-
api: '
|
|
14817
|
+
api: 'condenser_api',
|
|
14833
14818
|
method: 'get_discussions_by_promoted',
|
|
14834
14819
|
params: ['query']
|
|
14835
14820
|
},
|
|
14836
14821
|
{
|
|
14837
|
-
api: '
|
|
14822
|
+
api: 'condenser_api',
|
|
14838
14823
|
method: 'get_block_header',
|
|
14839
14824
|
params: ['blockNum']
|
|
14840
14825
|
},
|
|
14841
14826
|
{
|
|
14842
|
-
api: '
|
|
14827
|
+
api: 'condenser_api',
|
|
14843
14828
|
method: 'get_block',
|
|
14844
14829
|
params: ['blockNum']
|
|
14845
14830
|
},
|
|
14846
14831
|
{
|
|
14847
|
-
api: '
|
|
14832
|
+
api: 'condenser_api',
|
|
14848
14833
|
method: 'get_ops_in_block',
|
|
14849
14834
|
params: ['blockNum', 'onlyVirtual']
|
|
14850
14835
|
},
|
|
14851
14836
|
{
|
|
14852
|
-
api: '
|
|
14837
|
+
api: 'condenser_api',
|
|
14853
14838
|
method: 'get_state',
|
|
14854
14839
|
params: ['path']
|
|
14855
14840
|
},
|
|
14856
|
-
{
|
|
14857
|
-
api: 'database_api',
|
|
14858
|
-
method: 'get_trending_categories',
|
|
14859
|
-
params: ['after', 'limit']
|
|
14860
|
-
},
|
|
14861
|
-
{
|
|
14862
|
-
api: 'database_api',
|
|
14863
|
-
method: 'get_best_categories',
|
|
14864
|
-
params: ['after', 'limit']
|
|
14865
|
-
},
|
|
14866
|
-
{
|
|
14867
|
-
api: 'database_api',
|
|
14868
|
-
method: 'get_active_categories',
|
|
14869
|
-
params: ['after', 'limit']
|
|
14870
|
-
},
|
|
14871
|
-
{
|
|
14872
|
-
api: 'database_api',
|
|
14873
|
-
method: 'get_recent_categories',
|
|
14874
|
-
params: ['after', 'limit']
|
|
14875
|
-
},
|
|
14876
14841
|
{
|
|
14877
14842
|
api: 'database_api',
|
|
14878
14843
|
method: 'get_config'
|
|
@@ -14882,7 +14847,7 @@ const methods = [
|
|
|
14882
14847
|
method: 'get_dynamic_global_properties'
|
|
14883
14848
|
},
|
|
14884
14849
|
{
|
|
14885
|
-
api: '
|
|
14850
|
+
api: 'condenser_api',
|
|
14886
14851
|
method: 'get_chain_properties'
|
|
14887
14852
|
},
|
|
14888
14853
|
{
|
|
@@ -14890,7 +14855,7 @@ const methods = [
|
|
|
14890
14855
|
method: 'get_feed_history'
|
|
14891
14856
|
},
|
|
14892
14857
|
{
|
|
14893
|
-
api: '
|
|
14858
|
+
api: 'condenser_api',
|
|
14894
14859
|
method: 'get_current_median_history_price'
|
|
14895
14860
|
},
|
|
14896
14861
|
{
|
|
@@ -14898,11 +14863,11 @@ const methods = [
|
|
|
14898
14863
|
method: 'get_witness_schedule'
|
|
14899
14864
|
},
|
|
14900
14865
|
{
|
|
14901
|
-
api: '
|
|
14866
|
+
api: 'condenser_api',
|
|
14902
14867
|
method: 'get_hardfork_version'
|
|
14903
14868
|
},
|
|
14904
14869
|
{
|
|
14905
|
-
api: '
|
|
14870
|
+
api: 'condenser_api',
|
|
14906
14871
|
method: 'get_next_scheduled_hardfork'
|
|
14907
14872
|
},
|
|
14908
14873
|
{
|
|
@@ -14911,46 +14876,46 @@ const methods = [
|
|
|
14911
14876
|
params: ['key']
|
|
14912
14877
|
},
|
|
14913
14878
|
{
|
|
14914
|
-
api: '
|
|
14879
|
+
api: 'condenser_api',
|
|
14915
14880
|
method: 'get_accounts',
|
|
14916
14881
|
params: ['names']
|
|
14917
14882
|
},
|
|
14918
14883
|
{
|
|
14919
|
-
api: '
|
|
14884
|
+
api: 'condenser_api',
|
|
14920
14885
|
method: 'get_account_references',
|
|
14921
14886
|
params: ['accountId']
|
|
14922
14887
|
},
|
|
14923
14888
|
{
|
|
14924
|
-
api: '
|
|
14889
|
+
api: 'condenser_api',
|
|
14925
14890
|
method: 'lookup_account_names',
|
|
14926
14891
|
params: ['accountNames']
|
|
14927
14892
|
},
|
|
14928
14893
|
{
|
|
14929
|
-
api: '
|
|
14894
|
+
api: 'condenser_api',
|
|
14930
14895
|
method: 'lookup_accounts',
|
|
14931
14896
|
params: ['lowerBoundName', 'limit']
|
|
14932
14897
|
},
|
|
14933
14898
|
{
|
|
14934
|
-
api: '
|
|
14899
|
+
api: 'condenser_api',
|
|
14935
14900
|
method: 'get_account_count'
|
|
14936
14901
|
},
|
|
14937
14902
|
{
|
|
14938
|
-
api: '
|
|
14903
|
+
api: 'condenser_api',
|
|
14939
14904
|
method: 'get_conversion_requests',
|
|
14940
14905
|
params: ['accountName']
|
|
14941
14906
|
},
|
|
14942
14907
|
{
|
|
14943
|
-
api: '
|
|
14908
|
+
api: 'condenser_api',
|
|
14944
14909
|
method: 'get_account_history',
|
|
14945
14910
|
params: ['account', 'from', 'limit']
|
|
14946
14911
|
},
|
|
14947
14912
|
{
|
|
14948
|
-
api: '
|
|
14913
|
+
api: 'condenser_api',
|
|
14949
14914
|
method: 'get_owner_history',
|
|
14950
14915
|
params: ['account']
|
|
14951
14916
|
},
|
|
14952
14917
|
{
|
|
14953
|
-
api: '
|
|
14918
|
+
api: 'condenser_api',
|
|
14954
14919
|
method: 'get_recovery_request',
|
|
14955
14920
|
params: ['account']
|
|
14956
14921
|
},
|
|
@@ -15000,42 +14965,27 @@ const methods = [
|
|
|
15000
14965
|
params: ['author', 'permlink']
|
|
15001
14966
|
},
|
|
15002
14967
|
{
|
|
15003
|
-
api: '
|
|
14968
|
+
api: 'condenser_api',
|
|
15004
14969
|
method: 'get_content',
|
|
15005
14970
|
params: ['author', 'permlink']
|
|
15006
14971
|
},
|
|
15007
14972
|
{
|
|
15008
|
-
api: '
|
|
15009
|
-
method: 'get_account_notifications',
|
|
15010
|
-
params: ['account', 'from', 'limit']
|
|
15011
|
-
},
|
|
15012
|
-
{
|
|
15013
|
-
api: 'database_api',
|
|
15014
|
-
method: 'get_account_reputation',
|
|
15015
|
-
params: ['account']
|
|
15016
|
-
},
|
|
15017
|
-
{
|
|
15018
|
-
api: 'database_api',
|
|
14973
|
+
api: 'condenser_api',
|
|
15019
14974
|
method: 'get_escrow',
|
|
15020
14975
|
params: ['from', 'escrowId']
|
|
15021
14976
|
},
|
|
15022
14977
|
{
|
|
15023
|
-
api: '
|
|
14978
|
+
api: 'condenser_api',
|
|
15024
14979
|
method: 'get_withdraw_routes',
|
|
15025
14980
|
params: ['account', 'withdrawRouteType']
|
|
15026
14981
|
},
|
|
15027
14982
|
{
|
|
15028
|
-
api: '
|
|
15029
|
-
method: 'get_account_bandwidth',
|
|
15030
|
-
params: ['account', 'bandwidthType']
|
|
15031
|
-
},
|
|
15032
|
-
{
|
|
15033
|
-
api: 'database_api',
|
|
14983
|
+
api: 'condenser_api',
|
|
15034
14984
|
method: 'get_savings_withdraw_from',
|
|
15035
14985
|
params: ['account']
|
|
15036
14986
|
},
|
|
15037
14987
|
{
|
|
15038
|
-
api: '
|
|
14988
|
+
api: 'condenser_api',
|
|
15039
14989
|
method: 'get_savings_withdraw_to',
|
|
15040
14990
|
params: ['account']
|
|
15041
14991
|
},
|
|
@@ -15045,22 +14995,17 @@ const methods = [
|
|
|
15045
14995
|
params: ['limit']
|
|
15046
14996
|
},
|
|
15047
14997
|
{
|
|
15048
|
-
api: '
|
|
14998
|
+
api: 'condenser_api',
|
|
15049
14999
|
method: 'get_open_orders',
|
|
15050
15000
|
params: ['owner']
|
|
15051
15001
|
},
|
|
15052
|
-
{
|
|
15053
|
-
api: 'database_api',
|
|
15054
|
-
method: 'get_liquidity_queue',
|
|
15055
|
-
params: ['startAccount', 'limit']
|
|
15056
|
-
},
|
|
15057
15002
|
{
|
|
15058
15003
|
api: 'database_api',
|
|
15059
15004
|
method: 'get_transaction_hex',
|
|
15060
15005
|
params: ['trx']
|
|
15061
15006
|
},
|
|
15062
15007
|
{
|
|
15063
|
-
api: '
|
|
15008
|
+
api: 'condenser_api',
|
|
15064
15009
|
method: 'get_transaction',
|
|
15065
15010
|
params: ['trxId']
|
|
15066
15011
|
},
|
|
@@ -15085,52 +15030,52 @@ const methods = [
|
|
|
15085
15030
|
params: ['nameOrId', 'signers']
|
|
15086
15031
|
},
|
|
15087
15032
|
{
|
|
15088
|
-
api: '
|
|
15033
|
+
api: 'condenser_api',
|
|
15089
15034
|
method: 'get_active_votes',
|
|
15090
15035
|
params: ['author', 'permlink']
|
|
15091
15036
|
},
|
|
15092
15037
|
{
|
|
15093
|
-
api: '
|
|
15038
|
+
api: 'condenser_api',
|
|
15094
15039
|
method: 'get_account_votes',
|
|
15095
15040
|
params: ['voter']
|
|
15096
15041
|
},
|
|
15097
15042
|
{
|
|
15098
|
-
api: '
|
|
15043
|
+
api: 'condenser_api',
|
|
15099
15044
|
method: 'get_content_replies',
|
|
15100
15045
|
params: ['author', 'permlink']
|
|
15101
15046
|
},
|
|
15102
15047
|
{
|
|
15103
|
-
api: '
|
|
15048
|
+
api: 'condenser_api',
|
|
15104
15049
|
method: 'get_discussions_by_author_before_date',
|
|
15105
15050
|
params: ['author', 'startPermlink', 'beforeDate', 'limit']
|
|
15106
15051
|
},
|
|
15107
15052
|
{
|
|
15108
|
-
api: '
|
|
15053
|
+
api: 'condenser_api',
|
|
15109
15054
|
method: 'get_replies_by_last_update',
|
|
15110
15055
|
params: ['startAuthor', 'startPermlink', 'limit']
|
|
15111
15056
|
},
|
|
15112
15057
|
{
|
|
15113
|
-
api: '
|
|
15058
|
+
api: 'condenser_api',
|
|
15114
15059
|
method: 'get_witnesses',
|
|
15115
15060
|
params: ['witnessIds']
|
|
15116
15061
|
},
|
|
15117
15062
|
{
|
|
15118
|
-
api: '
|
|
15063
|
+
api: 'condenser_api',
|
|
15119
15064
|
method: 'get_witness_by_account',
|
|
15120
15065
|
params: ['accountName']
|
|
15121
15066
|
},
|
|
15122
15067
|
{
|
|
15123
|
-
api: '
|
|
15068
|
+
api: 'condenser_api',
|
|
15124
15069
|
method: 'get_witnesses_by_vote',
|
|
15125
15070
|
params: ['from', 'limit']
|
|
15126
15071
|
},
|
|
15127
15072
|
{
|
|
15128
|
-
api: '
|
|
15073
|
+
api: 'condenser_api',
|
|
15129
15074
|
method: 'lookup_witness_accounts',
|
|
15130
15075
|
params: ['lowerBoundName', 'limit']
|
|
15131
15076
|
},
|
|
15132
15077
|
{
|
|
15133
|
-
api: '
|
|
15078
|
+
api: 'condenser_api',
|
|
15134
15079
|
method: 'get_witness_count'
|
|
15135
15080
|
},
|
|
15136
15081
|
{
|
|
@@ -15138,16 +15083,12 @@ const methods = [
|
|
|
15138
15083
|
method: 'get_active_witnesses'
|
|
15139
15084
|
},
|
|
15140
15085
|
{
|
|
15141
|
-
api: '
|
|
15142
|
-
method: 'get_miner_queue'
|
|
15143
|
-
},
|
|
15144
|
-
{
|
|
15145
|
-
api: 'database_api',
|
|
15086
|
+
api: 'condenser_api',
|
|
15146
15087
|
method: 'get_reward_fund',
|
|
15147
15088
|
params: ['name']
|
|
15148
15089
|
},
|
|
15149
15090
|
{
|
|
15150
|
-
api: '
|
|
15091
|
+
api: 'condenser_api',
|
|
15151
15092
|
method: 'get_vesting_delegations',
|
|
15152
15093
|
params: ['account', 'from', 'limit']
|
|
15153
15094
|
},
|
|
@@ -15268,81 +15209,6 @@ const methods = [
|
|
|
15268
15209
|
params: ['account'],
|
|
15269
15210
|
is_object: true
|
|
15270
15211
|
},
|
|
15271
|
-
{
|
|
15272
|
-
api: 'database_api',
|
|
15273
|
-
method: 'get_escrow_by_from',
|
|
15274
|
-
params: ['from', 'escrowId']
|
|
15275
|
-
},
|
|
15276
|
-
{
|
|
15277
|
-
api: 'database_api',
|
|
15278
|
-
method: 'get_escrow_by_to',
|
|
15279
|
-
params: ['to', 'escrowId']
|
|
15280
|
-
},
|
|
15281
|
-
{
|
|
15282
|
-
api: 'database_api',
|
|
15283
|
-
method: 'get_escrow_by_agent',
|
|
15284
|
-
params: ['agent', 'escrowId']
|
|
15285
|
-
},
|
|
15286
|
-
{
|
|
15287
|
-
api: 'database_api',
|
|
15288
|
-
method: 'get_account_bandwidth_by_type',
|
|
15289
|
-
params: ['account', 'bandwidthType']
|
|
15290
|
-
},
|
|
15291
|
-
{
|
|
15292
|
-
api: 'database_api',
|
|
15293
|
-
method: 'get_account_bandwidth_by_type_and_time',
|
|
15294
|
-
params: ['account', 'bandwidthType', 'time']
|
|
15295
|
-
},
|
|
15296
|
-
{
|
|
15297
|
-
api: 'database_api',
|
|
15298
|
-
method: 'get_proposed_transactions',
|
|
15299
|
-
params: ['account']
|
|
15300
|
-
},
|
|
15301
|
-
{
|
|
15302
|
-
api: 'database_api',
|
|
15303
|
-
method: 'get_proposed_transaction',
|
|
15304
|
-
params: ['account', 'proposalId']
|
|
15305
|
-
},
|
|
15306
|
-
{
|
|
15307
|
-
api: 'database_api',
|
|
15308
|
-
method: 'get_proposed_transaction_expirations',
|
|
15309
|
-
params: ['account']
|
|
15310
|
-
},
|
|
15311
|
-
{
|
|
15312
|
-
api: 'database_api',
|
|
15313
|
-
method: 'get_proposed_transaction_approvals',
|
|
15314
|
-
params: ['account']
|
|
15315
|
-
},
|
|
15316
|
-
{
|
|
15317
|
-
api: 'database_api',
|
|
15318
|
-
method: 'get_proposed_transaction_approvals_by_id',
|
|
15319
|
-
params: ['proposalId']
|
|
15320
|
-
},
|
|
15321
|
-
{
|
|
15322
|
-
api: 'database_api',
|
|
15323
|
-
method: 'get_proposed_transaction_approvals_by_account',
|
|
15324
|
-
params: ['account']
|
|
15325
|
-
},
|
|
15326
|
-
{
|
|
15327
|
-
api: 'database_api',
|
|
15328
|
-
method: 'get_proposed_transaction_approvals_by_account_and_id',
|
|
15329
|
-
params: ['account', 'proposalId']
|
|
15330
|
-
},
|
|
15331
|
-
{
|
|
15332
|
-
api: 'database_api',
|
|
15333
|
-
method: 'get_proposed_transaction_approvals_by_account_and_time',
|
|
15334
|
-
params: ['account', 'time']
|
|
15335
|
-
},
|
|
15336
|
-
{
|
|
15337
|
-
api: 'database_api',
|
|
15338
|
-
method: 'get_proposed_transaction_approvals_by_account_and_time_and_id',
|
|
15339
|
-
params: ['account', 'time', 'proposalId']
|
|
15340
|
-
},
|
|
15341
|
-
{
|
|
15342
|
-
api: 'database_api',
|
|
15343
|
-
method: 'get_proposed_transaction_approvals_by_account_and_time_and_id_and_approver',
|
|
15344
|
-
params: ['account', 'time', 'proposalId', 'approver']
|
|
15345
|
-
}
|
|
15346
15212
|
];
|
|
15347
15213
|
|
|
15348
15214
|
var retry$2 = {};
|
|
@@ -15786,6 +15652,10 @@ class HttpTransport extends BaseTransport {
|
|
|
15786
15652
|
isBroadcastOperation(method) {
|
|
15787
15653
|
return this.nonRetriableOperations.includes(method);
|
|
15788
15654
|
}
|
|
15655
|
+
/**
|
|
15656
|
+
* POST JSON-RPC to the node. Body uses method `call` with params [api, methodName, args]
|
|
15657
|
+
* for backwards compatibility with steemd; alternatively use Api.call('plugin.method', …).
|
|
15658
|
+
*/
|
|
15789
15659
|
send(api, data, callback) {
|
|
15790
15660
|
if (typeof callback !== 'function') {
|
|
15791
15661
|
callback = () => { };
|
|
@@ -23117,7 +22987,7 @@ function serializeCommentOptions(bb, data) {
|
|
|
23117
22987
|
bb.writeUint16(dataObj.percent_steem_dollars ?? 0);
|
|
23118
22988
|
serializeBool(bb, dataObj.allow_votes);
|
|
23119
22989
|
serializeBool(bb, dataObj.allow_curation_rewards);
|
|
23120
|
-
|
|
22990
|
+
serializeCommentOptionsExtensions(bb, dataObj.extensions);
|
|
23121
22991
|
}
|
|
23122
22992
|
/**
|
|
23123
22993
|
* Serialize custom_json operation
|
|
@@ -23194,7 +23064,7 @@ function serializeAuthority(bb, auth) {
|
|
|
23194
23064
|
*
|
|
23195
23065
|
* Format: int64 amount (little-endian) + uint8 precision + 7-byte symbol (UTF-8, null-padded).
|
|
23196
23066
|
*
|
|
23197
|
-
* This helper is reused across all operations
|
|
23067
|
+
* This helper is reused for asset fields across all operations, e.g.
|
|
23198
23068
|
* - amount / vesting_shares / reward_* / *_pays
|
|
23199
23069
|
*/
|
|
23200
23070
|
function serializeAsset(bb, amount) {
|
|
@@ -23214,7 +23084,7 @@ function serializeAsset(bb, amount) {
|
|
|
23214
23084
|
}
|
|
23215
23085
|
/**
|
|
23216
23086
|
* Write a string using ByteBuffer's writeVString method.
|
|
23217
|
-
*
|
|
23087
|
+
* All string fields are serialized through this helper to avoid calling ByteBuffer API directly everywhere.
|
|
23218
23088
|
*/
|
|
23219
23089
|
function writeString(bb, str) {
|
|
23220
23090
|
bb.writeVString(str);
|
|
@@ -23222,8 +23092,8 @@ function writeString(bb, str) {
|
|
|
23222
23092
|
/**
|
|
23223
23093
|
* Serialize a time_point_sec-style field.
|
|
23224
23094
|
*
|
|
23225
|
-
*
|
|
23226
|
-
*
|
|
23095
|
+
* Accepts ISO string / Date / seconds number; writes uint32 (seconds since epoch).
|
|
23096
|
+
* Used for proposal start/end, escrow_deadline, and similar fields.
|
|
23227
23097
|
*/
|
|
23228
23098
|
function serializeTimePointSec(bb, value) {
|
|
23229
23099
|
let seconds;
|
|
@@ -23236,7 +23106,7 @@ function serializeTimePointSec(bb, value) {
|
|
|
23236
23106
|
seconds = Math.floor(value.getTime() / 1000);
|
|
23237
23107
|
}
|
|
23238
23108
|
else if (typeof value === 'number') {
|
|
23239
|
-
//
|
|
23109
|
+
// Assume value is already in seconds
|
|
23240
23110
|
seconds = value;
|
|
23241
23111
|
}
|
|
23242
23112
|
else {
|
|
@@ -23246,29 +23116,61 @@ function serializeTimePointSec(bb, value) {
|
|
|
23246
23116
|
}
|
|
23247
23117
|
/**
|
|
23248
23118
|
* Serialize a generic bool flag as uint8(0/1).
|
|
23249
|
-
*
|
|
23119
|
+
* Reused for optional / approve / decline and similar fields.
|
|
23250
23120
|
*/
|
|
23251
23121
|
function serializeBool(bb, value) {
|
|
23252
23122
|
bb.writeUint8(value ? 1 : 0);
|
|
23253
23123
|
}
|
|
23254
23124
|
/**
|
|
23255
|
-
* Serialize
|
|
23125
|
+
* Serialize comment_options extensions (flat_set<comment_options_extension>).
|
|
23126
|
+
* Used only for comment_options operation. Supports tag 0 (comment_payout_beneficiaries).
|
|
23127
|
+
* Beneficiaries are sorted alphabetically by account name before encoding to satisfy Steem protocol.
|
|
23128
|
+
* Other extension tags are skipped; only tag 0 is serialized.
|
|
23129
|
+
*/
|
|
23130
|
+
function serializeCommentOptionsExtensions(bb, extensions) {
|
|
23131
|
+
if (!Array.isArray(extensions) || extensions.length === 0) {
|
|
23132
|
+
bb.writeVarint32(0);
|
|
23133
|
+
return;
|
|
23134
|
+
}
|
|
23135
|
+
// Only serialize tag 0 (comment_payout_beneficiaries); skip unknown tags
|
|
23136
|
+
const supported = extensions.filter((ext) => {
|
|
23137
|
+
const tag = Array.isArray(ext) && ext.length >= 1 ? Number(ext[0]) : -1;
|
|
23138
|
+
return tag === 0;
|
|
23139
|
+
});
|
|
23140
|
+
bb.writeVarint32(supported.length);
|
|
23141
|
+
for (const ext of supported) {
|
|
23142
|
+
const tag = ext[0];
|
|
23143
|
+
const value = ext[1];
|
|
23144
|
+
bb.writeVarint32(tag);
|
|
23145
|
+
if (tag === 0) {
|
|
23146
|
+
const beneficiaries = Array.isArray(value?.beneficiaries) ? value.beneficiaries.slice() : [];
|
|
23147
|
+
beneficiaries.sort((a, b) => String(a.account).localeCompare(String(b.account)));
|
|
23148
|
+
bb.writeVarint32(beneficiaries.length);
|
|
23149
|
+
for (const b of beneficiaries) {
|
|
23150
|
+
writeString(bb, String(b.account ?? ''));
|
|
23151
|
+
bb.writeUint16(Number(b.weight) & 0xffff);
|
|
23152
|
+
}
|
|
23153
|
+
}
|
|
23154
|
+
}
|
|
23155
|
+
}
|
|
23156
|
+
/**
|
|
23157
|
+
* Serialize a future_extensions / extensions-style field.
|
|
23256
23158
|
*
|
|
23257
|
-
*
|
|
23159
|
+
* For most on-chain transactions extensions are still an empty set. Protocol format:
|
|
23258
23160
|
* - varint32 length
|
|
23259
|
-
* -
|
|
23161
|
+
* - then each element serialized per convention (current implementation supports empty only).
|
|
23260
23162
|
*
|
|
23261
|
-
*
|
|
23262
|
-
*
|
|
23163
|
+
* To stay compatible with existing usage, we only write length 0 and ignore content here;
|
|
23164
|
+
* when supporting specific extension types, extend this after verification.
|
|
23263
23165
|
*/
|
|
23264
23166
|
function serializeExtensions(bb, extensions) {
|
|
23265
23167
|
if (!Array.isArray(extensions) || extensions.length === 0) {
|
|
23266
23168
|
bb.writeVarint32(0);
|
|
23267
23169
|
return;
|
|
23268
23170
|
}
|
|
23269
|
-
//
|
|
23270
|
-
//
|
|
23271
|
-
//
|
|
23171
|
+
// Protocol-wise extensions are future_extensions; on mainnet they are typically 0.
|
|
23172
|
+
// To avoid serializing data incompatible with C++ nodes, we still write 0 conservatively.
|
|
23173
|
+
// To support non-empty extensions in the future, enable the logic below after tests:
|
|
23272
23174
|
//
|
|
23273
23175
|
// bb.writeVarint32(extensions.length);
|
|
23274
23176
|
// for (const ext of extensions) {
|
|
@@ -23580,6 +23482,7 @@ class Api extends events.EventEmitter {
|
|
|
23580
23482
|
this._setTransport(options);
|
|
23581
23483
|
this._setLogger(options);
|
|
23582
23484
|
this.options = options;
|
|
23485
|
+
// Register steem.api.* from src/api/methods.ts; each call uses method.api as the RPC namespace.
|
|
23583
23486
|
methods.forEach(method => {
|
|
23584
23487
|
const methodName = method.method_name || camelCase(method.method);
|
|
23585
23488
|
const methodParams = method.params || [];
|
|
@@ -23713,6 +23616,11 @@ class Api extends events.EventEmitter {
|
|
|
23713
23616
|
}
|
|
23714
23617
|
return this.transport.stop();
|
|
23715
23618
|
}
|
|
23619
|
+
/**
|
|
23620
|
+
* Send a JSON-RPC request via the active transport.
|
|
23621
|
+
* HTTP uses the legacy `call` wrapper: params are [apiNamespace, methodName, args].
|
|
23622
|
+
* @param api Plugin namespace (e.g. condenser_api, database_api)
|
|
23623
|
+
*/
|
|
23716
23624
|
send(api, data, callback) {
|
|
23717
23625
|
let cb = callback;
|
|
23718
23626
|
if (this.__logger) {
|
|
@@ -24246,7 +24154,8 @@ class Api extends events.EventEmitter {
|
|
|
24246
24154
|
});
|
|
24247
24155
|
}
|
|
24248
24156
|
/**
|
|
24249
|
-
* Verify transaction authority.
|
|
24157
|
+
* Verify transaction authority (database_api.verify_authority on the node).
|
|
24158
|
+
* Prefer verifyAuthorityAsync; dynamically generated helpers also exist from methods.ts.
|
|
24250
24159
|
* @param trx Transaction object to verify
|
|
24251
24160
|
* @param callback Optional callback function
|
|
24252
24161
|
* @returns Promise with verification result if no callback provided
|
|
@@ -24281,7 +24190,7 @@ class Api extends events.EventEmitter {
|
|
|
24281
24190
|
});
|
|
24282
24191
|
}
|
|
24283
24192
|
/**
|
|
24284
|
-
* Verify account authority.
|
|
24193
|
+
* Verify account authority (database_api.verify_account_authority on the node).
|
|
24285
24194
|
* @param nameOrId Account name or ID
|
|
24286
24195
|
* @param signers Array of signer public keys
|
|
24287
24196
|
* @param callback Optional callback function
|
|
@@ -26344,7 +26253,7 @@ const steem = {
|
|
|
26344
26253
|
memo,
|
|
26345
26254
|
operations,
|
|
26346
26255
|
utils: utils$3,
|
|
26347
|
-
version: '1.0.
|
|
26256
|
+
version: '1.0.16',
|
|
26348
26257
|
config: {
|
|
26349
26258
|
set: (options) => {
|
|
26350
26259
|
// If nodes is provided, extract the first node as url for API
|