@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.js
CHANGED
|
@@ -14708,151 +14708,116 @@ const rpcAuth = /*#__PURE__*/Object.freeze({
|
|
|
14708
14708
|
validate: validate
|
|
14709
14709
|
});
|
|
14710
14710
|
|
|
14711
|
+
/**
|
|
14712
|
+
* Registry of JSON-RPC methods exposed as steem.api.* helpers.
|
|
14713
|
+
*
|
|
14714
|
+
* Each entry's `api` field is the Steem node plugin namespace sent on the wire
|
|
14715
|
+
* (legacy HTTP transport uses JSON-RPC `call` with [api, method, params]).
|
|
14716
|
+
*
|
|
14717
|
+
* Routing policy (aligned with steemit/steem):
|
|
14718
|
+
* - condenser_api: legacy read helpers (get_accounts, get_content, discussions, …)
|
|
14719
|
+
* - database_api: chain/validation APIs still on the modern database_api plugin
|
|
14720
|
+
* - follow_api, network_broadcast_api, market_history_api, etc.: other plugins
|
|
14721
|
+
*
|
|
14722
|
+
* Methods removed from this list in v1.0.16 are no longer served by current nodes
|
|
14723
|
+
* (e.g. websocket subscriptions, category listings, proposed-transaction getters).
|
|
14724
|
+
*/
|
|
14711
14725
|
const methods = [
|
|
14712
14726
|
{
|
|
14713
|
-
api: '
|
|
14714
|
-
method: 'set_subscribe_callback',
|
|
14715
|
-
params: ['callback', 'clearFilter']
|
|
14716
|
-
},
|
|
14717
|
-
{
|
|
14718
|
-
api: 'database_api',
|
|
14719
|
-
method: 'set_pending_transaction_callback',
|
|
14720
|
-
params: ['cb']
|
|
14721
|
-
},
|
|
14722
|
-
{
|
|
14723
|
-
api: 'database_api',
|
|
14724
|
-
method: 'set_block_applied_callback',
|
|
14725
|
-
params: ['cb']
|
|
14726
|
-
},
|
|
14727
|
-
{
|
|
14728
|
-
api: 'database_api',
|
|
14729
|
-
method: 'cancel_all_subscriptions'
|
|
14730
|
-
},
|
|
14731
|
-
{
|
|
14732
|
-
api: 'database_api',
|
|
14727
|
+
api: 'condenser_api',
|
|
14733
14728
|
method: 'get_trending_tags',
|
|
14734
14729
|
params: ['afterTag', 'limit']
|
|
14735
14730
|
},
|
|
14736
14731
|
{
|
|
14737
|
-
api: '
|
|
14732
|
+
api: 'condenser_api',
|
|
14738
14733
|
method: 'get_tags_used_by_author',
|
|
14739
14734
|
params: ['author']
|
|
14740
14735
|
},
|
|
14741
14736
|
{
|
|
14742
|
-
api: '
|
|
14737
|
+
api: 'condenser_api',
|
|
14743
14738
|
method: 'get_post_discussions_by_payout',
|
|
14744
14739
|
params: ['query']
|
|
14745
14740
|
},
|
|
14746
14741
|
{
|
|
14747
|
-
api: '
|
|
14742
|
+
api: 'condenser_api',
|
|
14748
14743
|
method: 'get_comment_discussions_by_payout',
|
|
14749
14744
|
params: ['query']
|
|
14750
14745
|
},
|
|
14751
14746
|
{
|
|
14752
|
-
api: '
|
|
14747
|
+
api: 'condenser_api',
|
|
14753
14748
|
method: 'get_discussions_by_trending',
|
|
14754
14749
|
params: ['query']
|
|
14755
14750
|
},
|
|
14756
14751
|
{
|
|
14757
|
-
api: '
|
|
14758
|
-
method: 'get_discussions_by_trending30',
|
|
14759
|
-
params: ['query']
|
|
14760
|
-
},
|
|
14761
|
-
{
|
|
14762
|
-
api: 'database_api',
|
|
14752
|
+
api: 'condenser_api',
|
|
14763
14753
|
method: 'get_discussions_by_created',
|
|
14764
14754
|
params: ['query']
|
|
14765
14755
|
},
|
|
14766
14756
|
{
|
|
14767
|
-
api: '
|
|
14757
|
+
api: 'condenser_api',
|
|
14768
14758
|
method: 'get_discussions_by_active',
|
|
14769
14759
|
params: ['query']
|
|
14770
14760
|
},
|
|
14771
14761
|
{
|
|
14772
|
-
api: '
|
|
14762
|
+
api: 'condenser_api',
|
|
14773
14763
|
method: 'get_discussions_by_cashout',
|
|
14774
14764
|
params: ['query']
|
|
14775
14765
|
},
|
|
14776
14766
|
{
|
|
14777
|
-
api: '
|
|
14778
|
-
method: 'get_discussions_by_payout',
|
|
14779
|
-
params: ['query']
|
|
14780
|
-
},
|
|
14781
|
-
{
|
|
14782
|
-
api: 'database_api',
|
|
14767
|
+
api: 'condenser_api',
|
|
14783
14768
|
method: 'get_discussions_by_votes',
|
|
14784
14769
|
params: ['query']
|
|
14785
14770
|
},
|
|
14786
14771
|
{
|
|
14787
|
-
api: '
|
|
14772
|
+
api: 'condenser_api',
|
|
14788
14773
|
method: 'get_discussions_by_children',
|
|
14789
14774
|
params: ['query']
|
|
14790
14775
|
},
|
|
14791
14776
|
{
|
|
14792
|
-
api: '
|
|
14777
|
+
api: 'condenser_api',
|
|
14793
14778
|
method: 'get_discussions_by_hot',
|
|
14794
14779
|
params: ['query']
|
|
14795
14780
|
},
|
|
14796
14781
|
{
|
|
14797
|
-
api: '
|
|
14782
|
+
api: 'condenser_api',
|
|
14798
14783
|
method: 'get_discussions_by_feed',
|
|
14799
14784
|
params: ['query']
|
|
14800
14785
|
},
|
|
14801
14786
|
{
|
|
14802
|
-
api: '
|
|
14787
|
+
api: 'condenser_api',
|
|
14803
14788
|
method: 'get_discussions_by_blog',
|
|
14804
14789
|
params: ['query']
|
|
14805
14790
|
},
|
|
14806
14791
|
{
|
|
14807
|
-
api: '
|
|
14792
|
+
api: 'condenser_api',
|
|
14808
14793
|
method: 'get_discussions_by_comments',
|
|
14809
14794
|
params: ['query']
|
|
14810
14795
|
},
|
|
14811
14796
|
{
|
|
14812
|
-
api: '
|
|
14797
|
+
api: 'condenser_api',
|
|
14813
14798
|
method: 'get_discussions_by_promoted',
|
|
14814
14799
|
params: ['query']
|
|
14815
14800
|
},
|
|
14816
14801
|
{
|
|
14817
|
-
api: '
|
|
14802
|
+
api: 'condenser_api',
|
|
14818
14803
|
method: 'get_block_header',
|
|
14819
14804
|
params: ['blockNum']
|
|
14820
14805
|
},
|
|
14821
14806
|
{
|
|
14822
|
-
api: '
|
|
14807
|
+
api: 'condenser_api',
|
|
14823
14808
|
method: 'get_block',
|
|
14824
14809
|
params: ['blockNum']
|
|
14825
14810
|
},
|
|
14826
14811
|
{
|
|
14827
|
-
api: '
|
|
14812
|
+
api: 'condenser_api',
|
|
14828
14813
|
method: 'get_ops_in_block',
|
|
14829
14814
|
params: ['blockNum', 'onlyVirtual']
|
|
14830
14815
|
},
|
|
14831
14816
|
{
|
|
14832
|
-
api: '
|
|
14817
|
+
api: 'condenser_api',
|
|
14833
14818
|
method: 'get_state',
|
|
14834
14819
|
params: ['path']
|
|
14835
14820
|
},
|
|
14836
|
-
{
|
|
14837
|
-
api: 'database_api',
|
|
14838
|
-
method: 'get_trending_categories',
|
|
14839
|
-
params: ['after', 'limit']
|
|
14840
|
-
},
|
|
14841
|
-
{
|
|
14842
|
-
api: 'database_api',
|
|
14843
|
-
method: 'get_best_categories',
|
|
14844
|
-
params: ['after', 'limit']
|
|
14845
|
-
},
|
|
14846
|
-
{
|
|
14847
|
-
api: 'database_api',
|
|
14848
|
-
method: 'get_active_categories',
|
|
14849
|
-
params: ['after', 'limit']
|
|
14850
|
-
},
|
|
14851
|
-
{
|
|
14852
|
-
api: 'database_api',
|
|
14853
|
-
method: 'get_recent_categories',
|
|
14854
|
-
params: ['after', 'limit']
|
|
14855
|
-
},
|
|
14856
14821
|
{
|
|
14857
14822
|
api: 'database_api',
|
|
14858
14823
|
method: 'get_config'
|
|
@@ -14862,7 +14827,7 @@ const methods = [
|
|
|
14862
14827
|
method: 'get_dynamic_global_properties'
|
|
14863
14828
|
},
|
|
14864
14829
|
{
|
|
14865
|
-
api: '
|
|
14830
|
+
api: 'condenser_api',
|
|
14866
14831
|
method: 'get_chain_properties'
|
|
14867
14832
|
},
|
|
14868
14833
|
{
|
|
@@ -14870,7 +14835,7 @@ const methods = [
|
|
|
14870
14835
|
method: 'get_feed_history'
|
|
14871
14836
|
},
|
|
14872
14837
|
{
|
|
14873
|
-
api: '
|
|
14838
|
+
api: 'condenser_api',
|
|
14874
14839
|
method: 'get_current_median_history_price'
|
|
14875
14840
|
},
|
|
14876
14841
|
{
|
|
@@ -14878,11 +14843,11 @@ const methods = [
|
|
|
14878
14843
|
method: 'get_witness_schedule'
|
|
14879
14844
|
},
|
|
14880
14845
|
{
|
|
14881
|
-
api: '
|
|
14846
|
+
api: 'condenser_api',
|
|
14882
14847
|
method: 'get_hardfork_version'
|
|
14883
14848
|
},
|
|
14884
14849
|
{
|
|
14885
|
-
api: '
|
|
14850
|
+
api: 'condenser_api',
|
|
14886
14851
|
method: 'get_next_scheduled_hardfork'
|
|
14887
14852
|
},
|
|
14888
14853
|
{
|
|
@@ -14891,46 +14856,46 @@ const methods = [
|
|
|
14891
14856
|
params: ['key']
|
|
14892
14857
|
},
|
|
14893
14858
|
{
|
|
14894
|
-
api: '
|
|
14859
|
+
api: 'condenser_api',
|
|
14895
14860
|
method: 'get_accounts',
|
|
14896
14861
|
params: ['names']
|
|
14897
14862
|
},
|
|
14898
14863
|
{
|
|
14899
|
-
api: '
|
|
14864
|
+
api: 'condenser_api',
|
|
14900
14865
|
method: 'get_account_references',
|
|
14901
14866
|
params: ['accountId']
|
|
14902
14867
|
},
|
|
14903
14868
|
{
|
|
14904
|
-
api: '
|
|
14869
|
+
api: 'condenser_api',
|
|
14905
14870
|
method: 'lookup_account_names',
|
|
14906
14871
|
params: ['accountNames']
|
|
14907
14872
|
},
|
|
14908
14873
|
{
|
|
14909
|
-
api: '
|
|
14874
|
+
api: 'condenser_api',
|
|
14910
14875
|
method: 'lookup_accounts',
|
|
14911
14876
|
params: ['lowerBoundName', 'limit']
|
|
14912
14877
|
},
|
|
14913
14878
|
{
|
|
14914
|
-
api: '
|
|
14879
|
+
api: 'condenser_api',
|
|
14915
14880
|
method: 'get_account_count'
|
|
14916
14881
|
},
|
|
14917
14882
|
{
|
|
14918
|
-
api: '
|
|
14883
|
+
api: 'condenser_api',
|
|
14919
14884
|
method: 'get_conversion_requests',
|
|
14920
14885
|
params: ['accountName']
|
|
14921
14886
|
},
|
|
14922
14887
|
{
|
|
14923
|
-
api: '
|
|
14888
|
+
api: 'condenser_api',
|
|
14924
14889
|
method: 'get_account_history',
|
|
14925
14890
|
params: ['account', 'from', 'limit']
|
|
14926
14891
|
},
|
|
14927
14892
|
{
|
|
14928
|
-
api: '
|
|
14893
|
+
api: 'condenser_api',
|
|
14929
14894
|
method: 'get_owner_history',
|
|
14930
14895
|
params: ['account']
|
|
14931
14896
|
},
|
|
14932
14897
|
{
|
|
14933
|
-
api: '
|
|
14898
|
+
api: 'condenser_api',
|
|
14934
14899
|
method: 'get_recovery_request',
|
|
14935
14900
|
params: ['account']
|
|
14936
14901
|
},
|
|
@@ -14980,42 +14945,27 @@ const methods = [
|
|
|
14980
14945
|
params: ['author', 'permlink']
|
|
14981
14946
|
},
|
|
14982
14947
|
{
|
|
14983
|
-
api: '
|
|
14948
|
+
api: 'condenser_api',
|
|
14984
14949
|
method: 'get_content',
|
|
14985
14950
|
params: ['author', 'permlink']
|
|
14986
14951
|
},
|
|
14987
14952
|
{
|
|
14988
|
-
api: '
|
|
14989
|
-
method: 'get_account_notifications',
|
|
14990
|
-
params: ['account', 'from', 'limit']
|
|
14991
|
-
},
|
|
14992
|
-
{
|
|
14993
|
-
api: 'database_api',
|
|
14994
|
-
method: 'get_account_reputation',
|
|
14995
|
-
params: ['account']
|
|
14996
|
-
},
|
|
14997
|
-
{
|
|
14998
|
-
api: 'database_api',
|
|
14953
|
+
api: 'condenser_api',
|
|
14999
14954
|
method: 'get_escrow',
|
|
15000
14955
|
params: ['from', 'escrowId']
|
|
15001
14956
|
},
|
|
15002
14957
|
{
|
|
15003
|
-
api: '
|
|
14958
|
+
api: 'condenser_api',
|
|
15004
14959
|
method: 'get_withdraw_routes',
|
|
15005
14960
|
params: ['account', 'withdrawRouteType']
|
|
15006
14961
|
},
|
|
15007
14962
|
{
|
|
15008
|
-
api: '
|
|
15009
|
-
method: 'get_account_bandwidth',
|
|
15010
|
-
params: ['account', 'bandwidthType']
|
|
15011
|
-
},
|
|
15012
|
-
{
|
|
15013
|
-
api: 'database_api',
|
|
14963
|
+
api: 'condenser_api',
|
|
15014
14964
|
method: 'get_savings_withdraw_from',
|
|
15015
14965
|
params: ['account']
|
|
15016
14966
|
},
|
|
15017
14967
|
{
|
|
15018
|
-
api: '
|
|
14968
|
+
api: 'condenser_api',
|
|
15019
14969
|
method: 'get_savings_withdraw_to',
|
|
15020
14970
|
params: ['account']
|
|
15021
14971
|
},
|
|
@@ -15025,22 +14975,17 @@ const methods = [
|
|
|
15025
14975
|
params: ['limit']
|
|
15026
14976
|
},
|
|
15027
14977
|
{
|
|
15028
|
-
api: '
|
|
14978
|
+
api: 'condenser_api',
|
|
15029
14979
|
method: 'get_open_orders',
|
|
15030
14980
|
params: ['owner']
|
|
15031
14981
|
},
|
|
15032
|
-
{
|
|
15033
|
-
api: 'database_api',
|
|
15034
|
-
method: 'get_liquidity_queue',
|
|
15035
|
-
params: ['startAccount', 'limit']
|
|
15036
|
-
},
|
|
15037
14982
|
{
|
|
15038
14983
|
api: 'database_api',
|
|
15039
14984
|
method: 'get_transaction_hex',
|
|
15040
14985
|
params: ['trx']
|
|
15041
14986
|
},
|
|
15042
14987
|
{
|
|
15043
|
-
api: '
|
|
14988
|
+
api: 'condenser_api',
|
|
15044
14989
|
method: 'get_transaction',
|
|
15045
14990
|
params: ['trxId']
|
|
15046
14991
|
},
|
|
@@ -15065,52 +15010,52 @@ const methods = [
|
|
|
15065
15010
|
params: ['nameOrId', 'signers']
|
|
15066
15011
|
},
|
|
15067
15012
|
{
|
|
15068
|
-
api: '
|
|
15013
|
+
api: 'condenser_api',
|
|
15069
15014
|
method: 'get_active_votes',
|
|
15070
15015
|
params: ['author', 'permlink']
|
|
15071
15016
|
},
|
|
15072
15017
|
{
|
|
15073
|
-
api: '
|
|
15018
|
+
api: 'condenser_api',
|
|
15074
15019
|
method: 'get_account_votes',
|
|
15075
15020
|
params: ['voter']
|
|
15076
15021
|
},
|
|
15077
15022
|
{
|
|
15078
|
-
api: '
|
|
15023
|
+
api: 'condenser_api',
|
|
15079
15024
|
method: 'get_content_replies',
|
|
15080
15025
|
params: ['author', 'permlink']
|
|
15081
15026
|
},
|
|
15082
15027
|
{
|
|
15083
|
-
api: '
|
|
15028
|
+
api: 'condenser_api',
|
|
15084
15029
|
method: 'get_discussions_by_author_before_date',
|
|
15085
15030
|
params: ['author', 'startPermlink', 'beforeDate', 'limit']
|
|
15086
15031
|
},
|
|
15087
15032
|
{
|
|
15088
|
-
api: '
|
|
15033
|
+
api: 'condenser_api',
|
|
15089
15034
|
method: 'get_replies_by_last_update',
|
|
15090
15035
|
params: ['startAuthor', 'startPermlink', 'limit']
|
|
15091
15036
|
},
|
|
15092
15037
|
{
|
|
15093
|
-
api: '
|
|
15038
|
+
api: 'condenser_api',
|
|
15094
15039
|
method: 'get_witnesses',
|
|
15095
15040
|
params: ['witnessIds']
|
|
15096
15041
|
},
|
|
15097
15042
|
{
|
|
15098
|
-
api: '
|
|
15043
|
+
api: 'condenser_api',
|
|
15099
15044
|
method: 'get_witness_by_account',
|
|
15100
15045
|
params: ['accountName']
|
|
15101
15046
|
},
|
|
15102
15047
|
{
|
|
15103
|
-
api: '
|
|
15048
|
+
api: 'condenser_api',
|
|
15104
15049
|
method: 'get_witnesses_by_vote',
|
|
15105
15050
|
params: ['from', 'limit']
|
|
15106
15051
|
},
|
|
15107
15052
|
{
|
|
15108
|
-
api: '
|
|
15053
|
+
api: 'condenser_api',
|
|
15109
15054
|
method: 'lookup_witness_accounts',
|
|
15110
15055
|
params: ['lowerBoundName', 'limit']
|
|
15111
15056
|
},
|
|
15112
15057
|
{
|
|
15113
|
-
api: '
|
|
15058
|
+
api: 'condenser_api',
|
|
15114
15059
|
method: 'get_witness_count'
|
|
15115
15060
|
},
|
|
15116
15061
|
{
|
|
@@ -15118,16 +15063,12 @@ const methods = [
|
|
|
15118
15063
|
method: 'get_active_witnesses'
|
|
15119
15064
|
},
|
|
15120
15065
|
{
|
|
15121
|
-
api: '
|
|
15122
|
-
method: 'get_miner_queue'
|
|
15123
|
-
},
|
|
15124
|
-
{
|
|
15125
|
-
api: 'database_api',
|
|
15066
|
+
api: 'condenser_api',
|
|
15126
15067
|
method: 'get_reward_fund',
|
|
15127
15068
|
params: ['name']
|
|
15128
15069
|
},
|
|
15129
15070
|
{
|
|
15130
|
-
api: '
|
|
15071
|
+
api: 'condenser_api',
|
|
15131
15072
|
method: 'get_vesting_delegations',
|
|
15132
15073
|
params: ['account', 'from', 'limit']
|
|
15133
15074
|
},
|
|
@@ -15248,81 +15189,6 @@ const methods = [
|
|
|
15248
15189
|
params: ['account'],
|
|
15249
15190
|
is_object: true
|
|
15250
15191
|
},
|
|
15251
|
-
{
|
|
15252
|
-
api: 'database_api',
|
|
15253
|
-
method: 'get_escrow_by_from',
|
|
15254
|
-
params: ['from', 'escrowId']
|
|
15255
|
-
},
|
|
15256
|
-
{
|
|
15257
|
-
api: 'database_api',
|
|
15258
|
-
method: 'get_escrow_by_to',
|
|
15259
|
-
params: ['to', 'escrowId']
|
|
15260
|
-
},
|
|
15261
|
-
{
|
|
15262
|
-
api: 'database_api',
|
|
15263
|
-
method: 'get_escrow_by_agent',
|
|
15264
|
-
params: ['agent', 'escrowId']
|
|
15265
|
-
},
|
|
15266
|
-
{
|
|
15267
|
-
api: 'database_api',
|
|
15268
|
-
method: 'get_account_bandwidth_by_type',
|
|
15269
|
-
params: ['account', 'bandwidthType']
|
|
15270
|
-
},
|
|
15271
|
-
{
|
|
15272
|
-
api: 'database_api',
|
|
15273
|
-
method: 'get_account_bandwidth_by_type_and_time',
|
|
15274
|
-
params: ['account', 'bandwidthType', 'time']
|
|
15275
|
-
},
|
|
15276
|
-
{
|
|
15277
|
-
api: 'database_api',
|
|
15278
|
-
method: 'get_proposed_transactions',
|
|
15279
|
-
params: ['account']
|
|
15280
|
-
},
|
|
15281
|
-
{
|
|
15282
|
-
api: 'database_api',
|
|
15283
|
-
method: 'get_proposed_transaction',
|
|
15284
|
-
params: ['account', 'proposalId']
|
|
15285
|
-
},
|
|
15286
|
-
{
|
|
15287
|
-
api: 'database_api',
|
|
15288
|
-
method: 'get_proposed_transaction_expirations',
|
|
15289
|
-
params: ['account']
|
|
15290
|
-
},
|
|
15291
|
-
{
|
|
15292
|
-
api: 'database_api',
|
|
15293
|
-
method: 'get_proposed_transaction_approvals',
|
|
15294
|
-
params: ['account']
|
|
15295
|
-
},
|
|
15296
|
-
{
|
|
15297
|
-
api: 'database_api',
|
|
15298
|
-
method: 'get_proposed_transaction_approvals_by_id',
|
|
15299
|
-
params: ['proposalId']
|
|
15300
|
-
},
|
|
15301
|
-
{
|
|
15302
|
-
api: 'database_api',
|
|
15303
|
-
method: 'get_proposed_transaction_approvals_by_account',
|
|
15304
|
-
params: ['account']
|
|
15305
|
-
},
|
|
15306
|
-
{
|
|
15307
|
-
api: 'database_api',
|
|
15308
|
-
method: 'get_proposed_transaction_approvals_by_account_and_id',
|
|
15309
|
-
params: ['account', 'proposalId']
|
|
15310
|
-
},
|
|
15311
|
-
{
|
|
15312
|
-
api: 'database_api',
|
|
15313
|
-
method: 'get_proposed_transaction_approvals_by_account_and_time',
|
|
15314
|
-
params: ['account', 'time']
|
|
15315
|
-
},
|
|
15316
|
-
{
|
|
15317
|
-
api: 'database_api',
|
|
15318
|
-
method: 'get_proposed_transaction_approvals_by_account_and_time_and_id',
|
|
15319
|
-
params: ['account', 'time', 'proposalId']
|
|
15320
|
-
},
|
|
15321
|
-
{
|
|
15322
|
-
api: 'database_api',
|
|
15323
|
-
method: 'get_proposed_transaction_approvals_by_account_and_time_and_id_and_approver',
|
|
15324
|
-
params: ['account', 'time', 'proposalId', 'approver']
|
|
15325
|
-
}
|
|
15326
15192
|
];
|
|
15327
15193
|
|
|
15328
15194
|
var retry$2 = {};
|
|
@@ -15766,6 +15632,10 @@ class HttpTransport extends BaseTransport {
|
|
|
15766
15632
|
isBroadcastOperation(method) {
|
|
15767
15633
|
return this.nonRetriableOperations.includes(method);
|
|
15768
15634
|
}
|
|
15635
|
+
/**
|
|
15636
|
+
* POST JSON-RPC to the node. Body uses method `call` with params [api, methodName, args]
|
|
15637
|
+
* for backwards compatibility with steemd; alternatively use Api.call('plugin.method', …).
|
|
15638
|
+
*/
|
|
15769
15639
|
send(api, data, callback) {
|
|
15770
15640
|
if (typeof callback !== 'function') {
|
|
15771
15641
|
callback = () => { };
|
|
@@ -23097,7 +22967,7 @@ function serializeCommentOptions(bb, data) {
|
|
|
23097
22967
|
bb.writeUint16(dataObj.percent_steem_dollars ?? 0);
|
|
23098
22968
|
serializeBool(bb, dataObj.allow_votes);
|
|
23099
22969
|
serializeBool(bb, dataObj.allow_curation_rewards);
|
|
23100
|
-
|
|
22970
|
+
serializeCommentOptionsExtensions(bb, dataObj.extensions);
|
|
23101
22971
|
}
|
|
23102
22972
|
/**
|
|
23103
22973
|
* Serialize custom_json operation
|
|
@@ -23174,7 +23044,7 @@ function serializeAuthority(bb, auth) {
|
|
|
23174
23044
|
*
|
|
23175
23045
|
* Format: int64 amount (little-endian) + uint8 precision + 7-byte symbol (UTF-8, null-padded).
|
|
23176
23046
|
*
|
|
23177
|
-
* This helper is reused across all operations
|
|
23047
|
+
* This helper is reused for asset fields across all operations, e.g.
|
|
23178
23048
|
* - amount / vesting_shares / reward_* / *_pays
|
|
23179
23049
|
*/
|
|
23180
23050
|
function serializeAsset(bb, amount) {
|
|
@@ -23194,7 +23064,7 @@ function serializeAsset(bb, amount) {
|
|
|
23194
23064
|
}
|
|
23195
23065
|
/**
|
|
23196
23066
|
* Write a string using ByteBuffer's writeVString method.
|
|
23197
|
-
*
|
|
23067
|
+
* All string fields are serialized through this helper to avoid calling ByteBuffer API directly everywhere.
|
|
23198
23068
|
*/
|
|
23199
23069
|
function writeString(bb, str) {
|
|
23200
23070
|
bb.writeVString(str);
|
|
@@ -23202,8 +23072,8 @@ function writeString(bb, str) {
|
|
|
23202
23072
|
/**
|
|
23203
23073
|
* Serialize a time_point_sec-style field.
|
|
23204
23074
|
*
|
|
23205
|
-
*
|
|
23206
|
-
*
|
|
23075
|
+
* Accepts ISO string / Date / seconds number; writes uint32 (seconds since epoch).
|
|
23076
|
+
* Used for proposal start/end, escrow_deadline, and similar fields.
|
|
23207
23077
|
*/
|
|
23208
23078
|
function serializeTimePointSec(bb, value) {
|
|
23209
23079
|
let seconds;
|
|
@@ -23216,7 +23086,7 @@ function serializeTimePointSec(bb, value) {
|
|
|
23216
23086
|
seconds = Math.floor(value.getTime() / 1000);
|
|
23217
23087
|
}
|
|
23218
23088
|
else if (typeof value === 'number') {
|
|
23219
|
-
//
|
|
23089
|
+
// Assume value is already in seconds
|
|
23220
23090
|
seconds = value;
|
|
23221
23091
|
}
|
|
23222
23092
|
else {
|
|
@@ -23226,29 +23096,61 @@ function serializeTimePointSec(bb, value) {
|
|
|
23226
23096
|
}
|
|
23227
23097
|
/**
|
|
23228
23098
|
* Serialize a generic bool flag as uint8(0/1).
|
|
23229
|
-
*
|
|
23099
|
+
* Reused for optional / approve / decline and similar fields.
|
|
23230
23100
|
*/
|
|
23231
23101
|
function serializeBool(bb, value) {
|
|
23232
23102
|
bb.writeUint8(value ? 1 : 0);
|
|
23233
23103
|
}
|
|
23234
23104
|
/**
|
|
23235
|
-
* Serialize
|
|
23105
|
+
* Serialize comment_options extensions (flat_set<comment_options_extension>).
|
|
23106
|
+
* Used only for comment_options operation. Supports tag 0 (comment_payout_beneficiaries).
|
|
23107
|
+
* Beneficiaries are sorted alphabetically by account name before encoding to satisfy Steem protocol.
|
|
23108
|
+
* Other extension tags are skipped; only tag 0 is serialized.
|
|
23109
|
+
*/
|
|
23110
|
+
function serializeCommentOptionsExtensions(bb, extensions) {
|
|
23111
|
+
if (!Array.isArray(extensions) || extensions.length === 0) {
|
|
23112
|
+
bb.writeVarint32(0);
|
|
23113
|
+
return;
|
|
23114
|
+
}
|
|
23115
|
+
// Only serialize tag 0 (comment_payout_beneficiaries); skip unknown tags
|
|
23116
|
+
const supported = extensions.filter((ext) => {
|
|
23117
|
+
const tag = Array.isArray(ext) && ext.length >= 1 ? Number(ext[0]) : -1;
|
|
23118
|
+
return tag === 0;
|
|
23119
|
+
});
|
|
23120
|
+
bb.writeVarint32(supported.length);
|
|
23121
|
+
for (const ext of supported) {
|
|
23122
|
+
const tag = ext[0];
|
|
23123
|
+
const value = ext[1];
|
|
23124
|
+
bb.writeVarint32(tag);
|
|
23125
|
+
if (tag === 0) {
|
|
23126
|
+
const beneficiaries = Array.isArray(value?.beneficiaries) ? value.beneficiaries.slice() : [];
|
|
23127
|
+
beneficiaries.sort((a, b) => String(a.account).localeCompare(String(b.account)));
|
|
23128
|
+
bb.writeVarint32(beneficiaries.length);
|
|
23129
|
+
for (const b of beneficiaries) {
|
|
23130
|
+
writeString(bb, String(b.account ?? ''));
|
|
23131
|
+
bb.writeUint16(Number(b.weight) & 0xffff);
|
|
23132
|
+
}
|
|
23133
|
+
}
|
|
23134
|
+
}
|
|
23135
|
+
}
|
|
23136
|
+
/**
|
|
23137
|
+
* Serialize a future_extensions / extensions-style field.
|
|
23236
23138
|
*
|
|
23237
|
-
*
|
|
23139
|
+
* For most on-chain transactions extensions are still an empty set. Protocol format:
|
|
23238
23140
|
* - varint32 length
|
|
23239
|
-
* -
|
|
23141
|
+
* - then each element serialized per convention (current implementation supports empty only).
|
|
23240
23142
|
*
|
|
23241
|
-
*
|
|
23242
|
-
*
|
|
23143
|
+
* To stay compatible with existing usage, we only write length 0 and ignore content here;
|
|
23144
|
+
* when supporting specific extension types, extend this after verification.
|
|
23243
23145
|
*/
|
|
23244
23146
|
function serializeExtensions(bb, extensions) {
|
|
23245
23147
|
if (!Array.isArray(extensions) || extensions.length === 0) {
|
|
23246
23148
|
bb.writeVarint32(0);
|
|
23247
23149
|
return;
|
|
23248
23150
|
}
|
|
23249
|
-
//
|
|
23250
|
-
//
|
|
23251
|
-
//
|
|
23151
|
+
// Protocol-wise extensions are future_extensions; on mainnet they are typically 0.
|
|
23152
|
+
// To avoid serializing data incompatible with C++ nodes, we still write 0 conservatively.
|
|
23153
|
+
// To support non-empty extensions in the future, enable the logic below after tests:
|
|
23252
23154
|
//
|
|
23253
23155
|
// bb.writeVarint32(extensions.length);
|
|
23254
23156
|
// for (const ext of extensions) {
|
|
@@ -23560,6 +23462,7 @@ class Api extends EventEmitter {
|
|
|
23560
23462
|
this._setTransport(options);
|
|
23561
23463
|
this._setLogger(options);
|
|
23562
23464
|
this.options = options;
|
|
23465
|
+
// Register steem.api.* from src/api/methods.ts; each call uses method.api as the RPC namespace.
|
|
23563
23466
|
methods.forEach(method => {
|
|
23564
23467
|
const methodName = method.method_name || camelCase(method.method);
|
|
23565
23468
|
const methodParams = method.params || [];
|
|
@@ -23693,6 +23596,11 @@ class Api extends EventEmitter {
|
|
|
23693
23596
|
}
|
|
23694
23597
|
return this.transport.stop();
|
|
23695
23598
|
}
|
|
23599
|
+
/**
|
|
23600
|
+
* Send a JSON-RPC request via the active transport.
|
|
23601
|
+
* HTTP uses the legacy `call` wrapper: params are [apiNamespace, methodName, args].
|
|
23602
|
+
* @param api Plugin namespace (e.g. condenser_api, database_api)
|
|
23603
|
+
*/
|
|
23696
23604
|
send(api, data, callback) {
|
|
23697
23605
|
let cb = callback;
|
|
23698
23606
|
if (this.__logger) {
|
|
@@ -24226,7 +24134,8 @@ class Api extends EventEmitter {
|
|
|
24226
24134
|
});
|
|
24227
24135
|
}
|
|
24228
24136
|
/**
|
|
24229
|
-
* Verify transaction authority.
|
|
24137
|
+
* Verify transaction authority (database_api.verify_authority on the node).
|
|
24138
|
+
* Prefer verifyAuthorityAsync; dynamically generated helpers also exist from methods.ts.
|
|
24230
24139
|
* @param trx Transaction object to verify
|
|
24231
24140
|
* @param callback Optional callback function
|
|
24232
24141
|
* @returns Promise with verification result if no callback provided
|
|
@@ -24261,7 +24170,7 @@ class Api extends EventEmitter {
|
|
|
24261
24170
|
});
|
|
24262
24171
|
}
|
|
24263
24172
|
/**
|
|
24264
|
-
* Verify account authority.
|
|
24173
|
+
* Verify account authority (database_api.verify_account_authority on the node).
|
|
24265
24174
|
* @param nameOrId Account name or ID
|
|
24266
24175
|
* @param signers Array of signer public keys
|
|
24267
24176
|
* @param callback Optional callback function
|
|
@@ -26324,7 +26233,7 @@ const steem = {
|
|
|
26324
26233
|
memo,
|
|
26325
26234
|
operations,
|
|
26326
26235
|
utils: utils$3,
|
|
26327
|
-
version: '1.0.
|
|
26236
|
+
version: '1.0.16',
|
|
26328
26237
|
config: {
|
|
26329
26238
|
set: (options) => {
|
|
26330
26239
|
// If nodes is provided, extract the first node as url for API
|