@steemit/steem-js 1.0.15 → 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 +79 -202
- package/dist/browser.esm.js.map +1 -1
- package/dist/index.cjs +79 -202
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +79 -202
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +79 -202
- 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 +1 -1
package/README.md
CHANGED
|
@@ -11,6 +11,10 @@ A modern JavaScript/TypeScript library for interacting with the Steem blockchain
|
|
|
11
11
|
|
|
12
12
|
**[👉 Complete API Documentation](./docs/README.md)** - Comprehensive guide with all methods, examples, and usage patterns
|
|
13
13
|
|
|
14
|
+
**[API routing (condenser_api vs database_api)](./docs/README.md#api-routing)** - How RPC namespaces map to current Steem nodes (v1.0.16+)
|
|
15
|
+
|
|
16
|
+
**[📋 Changelog](./CHANGELOG.md)** - Version history and breaking changes
|
|
17
|
+
|
|
14
18
|
**[🔧 Refactoring Details](./docs/refactoring-2025.md)** - Technical details about the 2025 modernization
|
|
15
19
|
|
|
16
20
|
## 🚀 Quick Start
|
|
@@ -65,6 +69,7 @@ await steem.broadcast.voteAsync(postingWif, 'voter', 'author', 'permlink', 10000
|
|
|
65
69
|
|
|
66
70
|
## ✨ Key Features
|
|
67
71
|
|
|
72
|
+
- **🔗 Correct RPC routing** - Legacy read APIs use `condenser_api`; chain/validation APIs use `database_api` (v1.0.16+, aligned with [steem](https://github.com/steemit/steem))
|
|
68
73
|
- **🔒 Type Safety** - Full TypeScript support with complete type definitions
|
|
69
74
|
- **⚡ Modern** - ES modules, async/await, modern cryptography libraries
|
|
70
75
|
- **🌐 Universal** - Works in Node.js, browsers, and bundlers
|
|
@@ -102,7 +107,7 @@ This is a complete modernization of the original steem-js library:
|
|
|
102
107
|
|
|
103
108
|
```
|
|
104
109
|
src/
|
|
105
|
-
├── api/ # Blockchain API client (HTTP)
|
|
110
|
+
├── api/ # Blockchain API client (HTTP; methods.ts → condenser_api / database_api / …)
|
|
106
111
|
├── auth/ # Authentication and key management
|
|
107
112
|
├── broadcast/ # Transaction broadcasting
|
|
108
113
|
├── crypto/ # Cryptographic utilities
|
package/dist/api/index.d.ts
CHANGED
|
@@ -33,6 +33,11 @@ export declare class Api extends EventEmitter {
|
|
|
33
33
|
log(logLevel: string, ...args: unknown[]): void;
|
|
34
34
|
start(): Promise<void>;
|
|
35
35
|
stop(): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Send a JSON-RPC request via the active transport.
|
|
38
|
+
* HTTP uses the legacy `call` wrapper: params are [apiNamespace, methodName, args].
|
|
39
|
+
* @param api Plugin namespace (e.g. condenser_api, database_api)
|
|
40
|
+
*/
|
|
36
41
|
send(api: string, data: unknown, callback: unknown): void | Promise<void>;
|
|
37
42
|
call(method: string, params: unknown[], callback: (err: Error | null, result?: unknown) => void): void;
|
|
38
43
|
/**
|
|
@@ -160,14 +165,15 @@ export declare class Api extends EventEmitter {
|
|
|
160
165
|
*/
|
|
161
166
|
setMaxBlockAgeAsync(maxBlockAge: number): Promise<unknown>;
|
|
162
167
|
/**
|
|
163
|
-
* Verify transaction authority.
|
|
168
|
+
* Verify transaction authority (database_api.verify_authority on the node).
|
|
169
|
+
* Prefer verifyAuthorityAsync; dynamically generated helpers also exist from methods.ts.
|
|
164
170
|
* @param trx Transaction object to verify
|
|
165
171
|
* @param callback Optional callback function
|
|
166
172
|
* @returns Promise with verification result if no callback provided
|
|
167
173
|
*/
|
|
168
174
|
verifyAuthority(trx: unknown, callback?: (err: Error | null, result?: boolean) => void): Promise<boolean> | void;
|
|
169
175
|
/**
|
|
170
|
-
* Verify account authority.
|
|
176
|
+
* Verify account authority (database_api.verify_account_authority on the node).
|
|
171
177
|
* @param nameOrId Account name or ID
|
|
172
178
|
* @param signers Array of signer public keys
|
|
173
179
|
* @param callback Optional callback function
|
|
@@ -179,6 +185,7 @@ declare const api: Api;
|
|
|
179
185
|
export declare function setOptions(options: ApiOptions): void;
|
|
180
186
|
export declare function call(method: string, params: unknown[], callback: (err: Error | null, result?: unknown) => void): void;
|
|
181
187
|
export declare function signTransaction(trx: unknown, keys: string[]): unknown;
|
|
188
|
+
/** @deprecated Use `api.verifyAuthority` / `verifyAuthorityAsync` on the Api instance instead. */
|
|
182
189
|
export declare function verifyAuthority(..._args: unknown[]): boolean;
|
|
183
190
|
export default api;
|
|
184
191
|
export declare const getDynamicGlobalPropertiesAsync: () => Promise<unknown>;
|
package/dist/api/methods.d.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry of JSON-RPC methods exposed as steem.api.* helpers.
|
|
3
|
+
*
|
|
4
|
+
* Each entry's `api` field is the Steem node plugin namespace sent on the wire
|
|
5
|
+
* (legacy HTTP transport uses JSON-RPC `call` with [api, method, params]).
|
|
6
|
+
*
|
|
7
|
+
* Routing policy (aligned with steemit/steem):
|
|
8
|
+
* - condenser_api: legacy read helpers (get_accounts, get_content, discussions, …)
|
|
9
|
+
* - database_api: chain/validation APIs still on the modern database_api plugin
|
|
10
|
+
* - follow_api, network_broadcast_api, market_history_api, etc.: other plugins
|
|
11
|
+
*
|
|
12
|
+
* Methods removed from this list in v1.0.16 are no longer served by current nodes
|
|
13
|
+
* (e.g. websocket subscriptions, category listings, proposed-transaction getters).
|
|
14
|
+
*/
|
|
1
15
|
interface ApiMethod {
|
|
2
16
|
api: string;
|
|
3
17
|
method: string;
|
|
@@ -19,6 +19,10 @@ export declare class HttpTransport extends BaseTransport {
|
|
|
19
19
|
constructor(options: TransportOptions);
|
|
20
20
|
get nonRetriableOperations(): string[];
|
|
21
21
|
isBroadcastOperation(method: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* POST JSON-RPC to the node. Body uses method `call` with params [api, methodName, args]
|
|
24
|
+
* for backwards compatibility with steemd; alternatively use Api.call('plugin.method', …).
|
|
25
|
+
*/
|
|
22
26
|
send(api: string, data: {
|
|
23
27
|
id?: number;
|
|
24
28
|
method: string;
|
package/dist/api/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Type definitions for dynamically generated API methods
|
|
3
|
-
*
|
|
2
|
+
* Type definitions for dynamically generated API methods.
|
|
3
|
+
* Runtime routing (condenser_api vs database_api) is defined in methods.ts; see docs/README.md#api-routing.
|
|
4
4
|
*/
|
|
5
5
|
export type ApiCallback<T = unknown> = (err: Error | null, result?: T) => void;
|
|
6
6
|
type ApiMethodWithParams<TResult = unknown> = (...args: unknown[]) => Promise<TResult> | void;
|
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 = () => { };
|
|
@@ -26920,6 +26790,7 @@ class Api extends eventsExports.EventEmitter {
|
|
|
26920
26790
|
this._setTransport(options);
|
|
26921
26791
|
this._setLogger(options);
|
|
26922
26792
|
this.options = options;
|
|
26793
|
+
// Register steem.api.* from src/api/methods.ts; each call uses method.api as the RPC namespace.
|
|
26923
26794
|
methods.forEach(method => {
|
|
26924
26795
|
const methodName = method.method_name || camelCase(method.method);
|
|
26925
26796
|
const methodParams = method.params || [];
|
|
@@ -27053,6 +26924,11 @@ class Api extends eventsExports.EventEmitter {
|
|
|
27053
26924
|
}
|
|
27054
26925
|
return this.transport.stop();
|
|
27055
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
|
+
*/
|
|
27056
26932
|
send(api, data, callback) {
|
|
27057
26933
|
let cb = callback;
|
|
27058
26934
|
if (this.__logger) {
|
|
@@ -27586,7 +27462,8 @@ class Api extends eventsExports.EventEmitter {
|
|
|
27586
27462
|
});
|
|
27587
27463
|
}
|
|
27588
27464
|
/**
|
|
27589
|
-
* 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.
|
|
27590
27467
|
* @param trx Transaction object to verify
|
|
27591
27468
|
* @param callback Optional callback function
|
|
27592
27469
|
* @returns Promise with verification result if no callback provided
|
|
@@ -27621,7 +27498,7 @@ class Api extends eventsExports.EventEmitter {
|
|
|
27621
27498
|
});
|
|
27622
27499
|
}
|
|
27623
27500
|
/**
|
|
27624
|
-
* Verify account authority.
|
|
27501
|
+
* Verify account authority (database_api.verify_account_authority on the node).
|
|
27625
27502
|
* @param nameOrId Account name or ID
|
|
27626
27503
|
* @param signers Array of signer public keys
|
|
27627
27504
|
* @param callback Optional callback function
|
|
@@ -29684,7 +29561,7 @@ const steem = {
|
|
|
29684
29561
|
memo,
|
|
29685
29562
|
operations,
|
|
29686
29563
|
utils: utils$3,
|
|
29687
|
-
version: '1.0.
|
|
29564
|
+
version: '1.0.16',
|
|
29688
29565
|
config: {
|
|
29689
29566
|
set: (options) => {
|
|
29690
29567
|
// If nodes is provided, extract the first node as url for API
|