@mr-zwets/bchn-api-wrapper 1.0.1 → 1.0.3
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 +121 -129
- package/dist/interfaces/interfaces.d.ts +13 -0
- package/dist/interfaces/restInterfaces/interfaces.d.ts +124 -18
- package/dist/interfaces/rpcInterfaces/blockchain.d.ts +293 -102
- package/dist/interfaces/rpcInterfaces/control.d.ts +6 -0
- package/dist/interfaces/rpcInterfaces/generating.d.ts +2 -0
- package/dist/interfaces/rpcInterfaces/mining.d.ts +9 -0
- package/dist/interfaces/rpcInterfaces/network.d.ts +18 -0
- package/dist/interfaces/rpcInterfaces/rawtransactions.d.ts +21 -0
- package/dist/interfaces/rpcInterfaces/util.d.ts +5 -0
- package/dist/interfaces/rpcInterfaces/wallet.d.ts +54 -0
- package/dist/interfaces/rpcInterfaces/zmq.d.ts +1 -0
- package/dist/restClient.d.ts +13 -1
- package/dist/restClient.js +19 -6
- package/dist/rpcClient.d.ts +7 -0
- package/dist/rpcClient.js +7 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.js +4 -0
- package/dist/src/interfaces/interfaces.d.ts +83 -0
- package/dist/src/interfaces/interfaces.js +1 -0
- package/dist/src/interfaces/restInterfaces/interfaces.d.ts +215 -0
- package/dist/src/interfaces/restInterfaces/interfaces.js +1 -0
- package/dist/src/interfaces/rpcInterfaces/blockchain.d.ts +883 -0
- package/dist/src/interfaces/rpcInterfaces/blockchain.js +3 -0
- package/dist/src/interfaces/rpcInterfaces/control.d.ts +60 -0
- package/dist/src/interfaces/rpcInterfaces/control.js +3 -0
- package/dist/src/interfaces/rpcInterfaces/generating.d.ts +19 -0
- package/dist/src/interfaces/rpcInterfaces/generating.js +3 -0
- package/dist/src/interfaces/rpcInterfaces/index.d.ts +9 -0
- package/{src/interfaces/rpcInterfaces/index.ts → dist/src/interfaces/rpcInterfaces/index.js} +12 -14
- package/dist/src/interfaces/rpcInterfaces/mining.d.ts +140 -0
- package/dist/src/interfaces/rpcInterfaces/mining.js +3 -0
- package/dist/src/interfaces/rpcInterfaces/network.d.ts +197 -0
- package/dist/src/interfaces/rpcInterfaces/network.js +3 -0
- package/dist/src/interfaces/rpcInterfaces/rawtransactions.d.ts +304 -0
- package/dist/src/interfaces/rpcInterfaces/rawtransactions.js +3 -0
- package/dist/src/interfaces/rpcInterfaces/util.d.ts +49 -0
- package/dist/src/interfaces/rpcInterfaces/util.js +3 -0
- package/dist/src/interfaces/rpcInterfaces/wallet.d.ts +674 -0
- package/dist/src/interfaces/rpcInterfaces/wallet.js +3 -0
- package/dist/src/interfaces/rpcInterfaces/zmq.d.ts +9 -0
- package/dist/src/interfaces/rpcInterfaces/zmq.js +3 -0
- package/dist/src/restClient.d.ts +29 -0
- package/dist/src/restClient.js +113 -0
- package/dist/src/rpcClient.d.ts +19 -0
- package/dist/src/rpcClient.js +92 -0
- package/dist/src/utils/errors.d.ts +3 -0
- package/dist/src/utils/errors.js +6 -0
- package/dist/src/utils/utils.d.ts +11 -0
- package/dist/src/utils/utils.js +49 -0
- package/package.json +11 -8
- package/CHANGELOG.md +0 -7
- package/src/index.ts +0 -4
- package/src/interfaces/interfaces.ts +0 -87
- package/src/interfaces/restInterfaces/interfaces.ts +0 -117
- package/src/interfaces/rpcInterfaces/blockchain.ts +0 -759
- package/src/interfaces/rpcInterfaces/control.ts +0 -62
- package/src/interfaces/rpcInterfaces/generating.ts +0 -21
- package/src/interfaces/rpcInterfaces/mining.ts +0 -143
- package/src/interfaces/rpcInterfaces/network.ts +0 -195
- package/src/interfaces/rpcInterfaces/rawtransactions.ts +0 -314
- package/src/interfaces/rpcInterfaces/util.ts +0 -52
- package/src/interfaces/rpcInterfaces/wallet.ts +0 -674
- package/src/interfaces/rpcInterfaces/zmq.ts +0 -11
- package/src/restClient.ts +0 -119
- package/src/rpcClient.ts +0 -93
- package/src/utils/errors.ts +0 -6
- package/src/utils/utils.ts +0 -55
- package/test/restClient.test.ts +0 -32
- package/test/rpcClient.test.ts +0 -115
- package/test/setupTests.ts +0 -54
- package/test/tsconfig.json +0 -4
- package/tsconfig.json +0 -13
- package/vitest.config.ts +0 -9
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** Returns memory usage information. */
|
|
2
|
+
export interface GetMemoryInfo {
|
|
3
|
+
method: 'getmemoryinfo';
|
|
4
|
+
params: [
|
|
5
|
+
mode?: 'stats' | 'mallocinfo'
|
|
6
|
+
];
|
|
7
|
+
response: {
|
|
8
|
+
locked: {
|
|
9
|
+
used: number;
|
|
10
|
+
free: number;
|
|
11
|
+
total: number;
|
|
12
|
+
locked: number;
|
|
13
|
+
chunks_used: number;
|
|
14
|
+
chunks_free: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/** Returns details about the RPC server. */
|
|
19
|
+
export interface GetRpcInfo {
|
|
20
|
+
method: 'getrpcinfo';
|
|
21
|
+
params: [];
|
|
22
|
+
response: {
|
|
23
|
+
active_commands: {
|
|
24
|
+
method: string;
|
|
25
|
+
duration: number;
|
|
26
|
+
}[];
|
|
27
|
+
logpath: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/** Returns help text for RPC commands. */
|
|
31
|
+
export interface Help {
|
|
32
|
+
method: 'help';
|
|
33
|
+
params: [
|
|
34
|
+
command?: string
|
|
35
|
+
];
|
|
36
|
+
response: string;
|
|
37
|
+
}
|
|
38
|
+
/** Gets or sets logging categories. */
|
|
39
|
+
export interface Logging {
|
|
40
|
+
method: 'logging';
|
|
41
|
+
params: [
|
|
42
|
+
include_category?: string[],
|
|
43
|
+
exclude_category?: string[]
|
|
44
|
+
];
|
|
45
|
+
response: {
|
|
46
|
+
[category: string]: boolean;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/** Stops the BCHN server. */
|
|
50
|
+
export interface Stop {
|
|
51
|
+
method: 'stop';
|
|
52
|
+
params: [];
|
|
53
|
+
response: string;
|
|
54
|
+
}
|
|
55
|
+
/** Returns server uptime in seconds. */
|
|
56
|
+
export interface Uptime {
|
|
57
|
+
method: 'uptime';
|
|
58
|
+
params: [];
|
|
59
|
+
response: number;
|
|
60
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Mines blocks to the wallet (regtest only). */
|
|
2
|
+
export interface Generate {
|
|
3
|
+
method: 'generate';
|
|
4
|
+
params: [
|
|
5
|
+
nblocks: number,
|
|
6
|
+
maxtries?: number
|
|
7
|
+
];
|
|
8
|
+
response: string[];
|
|
9
|
+
}
|
|
10
|
+
/** Mines blocks to a specified address (regtest only). */
|
|
11
|
+
export interface GenerateToAddress {
|
|
12
|
+
method: 'generatetoaddress';
|
|
13
|
+
params: [
|
|
14
|
+
nblocks: number,
|
|
15
|
+
address: string,
|
|
16
|
+
maxtries?: number
|
|
17
|
+
];
|
|
18
|
+
response: string[];
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './blockchain.js';
|
|
2
|
+
export * from './control.js';
|
|
3
|
+
export * from './generating.js';
|
|
4
|
+
export * from './mining.js';
|
|
5
|
+
export * from './network.js';
|
|
6
|
+
export * from './rawtransactions.js';
|
|
7
|
+
export * from './util.js';
|
|
8
|
+
export * from './wallet.js';
|
|
9
|
+
export * from './zmq.js';
|
package/{src/interfaces/rpcInterfaces/index.ts → dist/src/interfaces/rpcInterfaces/index.js}
RENAMED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
// For the full list of commands see the documentation on
|
|
2
|
-
// https://docs.bitcoincashnode.org/doc/json-rpc/
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './wallet.js';
|
|
14
|
-
export * from './zmq.js'
|
|
1
|
+
// For the full list of commands see the documentation on
|
|
2
|
+
// https://docs.bitcoincashnode.org/doc/json-rpc/
|
|
3
|
+
// Total progress 136/136 (100%)
|
|
4
|
+
export * from './blockchain.js';
|
|
5
|
+
export * from './control.js';
|
|
6
|
+
export * from './generating.js';
|
|
7
|
+
export * from './mining.js';
|
|
8
|
+
export * from './network.js';
|
|
9
|
+
export * from './rawtransactions.js';
|
|
10
|
+
export * from './util.js';
|
|
11
|
+
export * from './wallet.js';
|
|
12
|
+
export * from './zmq.js';
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/** Returns a block template for mining. */
|
|
2
|
+
export interface GetBlockTemplate {
|
|
3
|
+
method: 'getblocktemplate';
|
|
4
|
+
params: {
|
|
5
|
+
mode?: 'template' | 'proposal';
|
|
6
|
+
capabilities?: ('longpoll' | 'coinbasetxn' | 'coinbasevalue' | 'proposal' | 'serverlist' | 'workid')[];
|
|
7
|
+
longpollid?: string;
|
|
8
|
+
checkvalidity?: boolean;
|
|
9
|
+
ignorecache?: boolean;
|
|
10
|
+
};
|
|
11
|
+
response: {
|
|
12
|
+
version: number;
|
|
13
|
+
previousblockhash: string;
|
|
14
|
+
transactions: {
|
|
15
|
+
data: string;
|
|
16
|
+
txid: string;
|
|
17
|
+
hash: string;
|
|
18
|
+
depends: number[];
|
|
19
|
+
fee: number;
|
|
20
|
+
sigops: number;
|
|
21
|
+
required: boolean;
|
|
22
|
+
}[];
|
|
23
|
+
coinbaseaux: {
|
|
24
|
+
flags: string;
|
|
25
|
+
};
|
|
26
|
+
coinbasevalue: number;
|
|
27
|
+
coinbasetxn?: object;
|
|
28
|
+
target: string;
|
|
29
|
+
mintime: number;
|
|
30
|
+
mutable: string[];
|
|
31
|
+
noncerange: string;
|
|
32
|
+
sigoplimit: number;
|
|
33
|
+
sizelimit: number;
|
|
34
|
+
curtime: number;
|
|
35
|
+
bits: string;
|
|
36
|
+
height: number;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/** Returns a lightweight block template (for mining pools). */
|
|
40
|
+
export interface GetBlockTemplateLight {
|
|
41
|
+
method: 'getblocktemplatelight';
|
|
42
|
+
params: [
|
|
43
|
+
{
|
|
44
|
+
mode?: 'template' | 'proposal';
|
|
45
|
+
capabilities?: ('longpoll' | 'coinbasetxn' | 'coinbasevalue' | 'proposal' | 'serverlist' | 'workid')[];
|
|
46
|
+
longpollid?: string;
|
|
47
|
+
checkvalidity?: boolean;
|
|
48
|
+
ignorecache?: boolean;
|
|
49
|
+
},
|
|
50
|
+
additional_txs?: string[]
|
|
51
|
+
];
|
|
52
|
+
response: {
|
|
53
|
+
version: number;
|
|
54
|
+
previousblockhash: string;
|
|
55
|
+
job_id: string;
|
|
56
|
+
merkle: string[];
|
|
57
|
+
coinbaseaux: {
|
|
58
|
+
flags: string;
|
|
59
|
+
};
|
|
60
|
+
coinbasevalue: number;
|
|
61
|
+
coinbasetxn: object;
|
|
62
|
+
target: string;
|
|
63
|
+
mintime: number;
|
|
64
|
+
mutable: string[];
|
|
65
|
+
noncerange: string;
|
|
66
|
+
sigoplimit: number;
|
|
67
|
+
sizelimit: number;
|
|
68
|
+
curtime: number;
|
|
69
|
+
bits: string;
|
|
70
|
+
height: number;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/** Returns mining-related information. */
|
|
74
|
+
export interface GetMiningInfo {
|
|
75
|
+
method: 'getmininginfo';
|
|
76
|
+
params: [];
|
|
77
|
+
response: {
|
|
78
|
+
blocks: number;
|
|
79
|
+
currentblocksize: number;
|
|
80
|
+
currentblocktx: number;
|
|
81
|
+
difficulty: number;
|
|
82
|
+
networkhashps: number;
|
|
83
|
+
miningblocksizelimit: number;
|
|
84
|
+
pooledtx: number;
|
|
85
|
+
chain: string;
|
|
86
|
+
warnings: string;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/** Returns estimated network hash rate. */
|
|
90
|
+
export interface GetNetworkHashps {
|
|
91
|
+
method: 'getnetworkhashps';
|
|
92
|
+
params: [
|
|
93
|
+
nblocks?: number,
|
|
94
|
+
height?: number
|
|
95
|
+
];
|
|
96
|
+
response: number;
|
|
97
|
+
}
|
|
98
|
+
/** Modifies a mempool transaction's priority. */
|
|
99
|
+
export interface PrioritiseTransaction {
|
|
100
|
+
method: 'prioritisetransaction';
|
|
101
|
+
params: [
|
|
102
|
+
txid: string,
|
|
103
|
+
fee_delta: number
|
|
104
|
+
];
|
|
105
|
+
response: true;
|
|
106
|
+
}
|
|
107
|
+
/** Submits a mined block to the network. */
|
|
108
|
+
export interface SubmitBlock {
|
|
109
|
+
method: 'submitblock';
|
|
110
|
+
params: [
|
|
111
|
+
hexdata: string,
|
|
112
|
+
dummy?: string
|
|
113
|
+
];
|
|
114
|
+
response: {};
|
|
115
|
+
}
|
|
116
|
+
/** Submits a lightweight block (for mining pools). */
|
|
117
|
+
export interface SubmitBlockLight {
|
|
118
|
+
method: 'submitblocklight';
|
|
119
|
+
params: [
|
|
120
|
+
hexdata: string,
|
|
121
|
+
job_id: string
|
|
122
|
+
];
|
|
123
|
+
response: {};
|
|
124
|
+
}
|
|
125
|
+
/** Submits a block header for validation. */
|
|
126
|
+
export interface SubmitHeader {
|
|
127
|
+
method: 'submitheader';
|
|
128
|
+
params: [
|
|
129
|
+
hexdata: string
|
|
130
|
+
];
|
|
131
|
+
response: {};
|
|
132
|
+
}
|
|
133
|
+
/** Validates a block template without mining. */
|
|
134
|
+
export interface ValidateBlockTemplate {
|
|
135
|
+
method: 'validateblocktemplate';
|
|
136
|
+
params: [
|
|
137
|
+
hexdata: string
|
|
138
|
+
];
|
|
139
|
+
response: true;
|
|
140
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/** Adds or removes a node from the addnode list. */
|
|
2
|
+
export interface AddNode {
|
|
3
|
+
method: 'addnode';
|
|
4
|
+
params: [
|
|
5
|
+
node: string,
|
|
6
|
+
command: 'add' | 'remove' | 'onetry'
|
|
7
|
+
];
|
|
8
|
+
response: null;
|
|
9
|
+
}
|
|
10
|
+
/** Clears all banned IPs. */
|
|
11
|
+
export interface ClearBanned {
|
|
12
|
+
method: 'clearbanned';
|
|
13
|
+
params: [
|
|
14
|
+
manual?: boolean,
|
|
15
|
+
automatic?: boolean
|
|
16
|
+
];
|
|
17
|
+
response: null;
|
|
18
|
+
}
|
|
19
|
+
/** Disconnects a node by address or node ID. */
|
|
20
|
+
export interface DisconnectNode {
|
|
21
|
+
method: 'disconnectnode';
|
|
22
|
+
params: [
|
|
23
|
+
address?: string,
|
|
24
|
+
nodeid?: number
|
|
25
|
+
];
|
|
26
|
+
response: null;
|
|
27
|
+
}
|
|
28
|
+
/** Returns info about manually added nodes. */
|
|
29
|
+
export interface GetAddedNodeInfo {
|
|
30
|
+
method: 'getaddednodeinfo';
|
|
31
|
+
params: [
|
|
32
|
+
node?: string
|
|
33
|
+
];
|
|
34
|
+
response: {
|
|
35
|
+
addednode: string;
|
|
36
|
+
connected: boolean;
|
|
37
|
+
addresses?: {
|
|
38
|
+
address: string;
|
|
39
|
+
connected: string;
|
|
40
|
+
}[];
|
|
41
|
+
}[];
|
|
42
|
+
}
|
|
43
|
+
/** Returns the number of connections to other nodes. */
|
|
44
|
+
export interface GetConnectionCount {
|
|
45
|
+
method: 'getconnectioncount';
|
|
46
|
+
params: [];
|
|
47
|
+
response: number;
|
|
48
|
+
}
|
|
49
|
+
/** Returns the excessive block size setting. */
|
|
50
|
+
export interface GetExcessiveBlock {
|
|
51
|
+
method: 'getexcessiveblock';
|
|
52
|
+
params: [];
|
|
53
|
+
response: number;
|
|
54
|
+
}
|
|
55
|
+
/** Returns network traffic statistics. */
|
|
56
|
+
export interface GetNetTotals {
|
|
57
|
+
method: 'getnettotals';
|
|
58
|
+
params: [];
|
|
59
|
+
response: {
|
|
60
|
+
totalbytesrecv: number;
|
|
61
|
+
totalbytessent: number;
|
|
62
|
+
timemillis: number;
|
|
63
|
+
uploadtarget: {
|
|
64
|
+
timeframe: number;
|
|
65
|
+
target: number;
|
|
66
|
+
target_reached: boolean;
|
|
67
|
+
serve_historical_blocks: boolean;
|
|
68
|
+
bytes_left_in_cycle: number;
|
|
69
|
+
time_left_in_cycle: number;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/** Returns network configuration and status. */
|
|
74
|
+
export interface GetNetworkInfo {
|
|
75
|
+
method: 'getnetworkinfo';
|
|
76
|
+
params: [];
|
|
77
|
+
response: {
|
|
78
|
+
version: number;
|
|
79
|
+
subversion: string;
|
|
80
|
+
protocolversion: number;
|
|
81
|
+
localservices: string;
|
|
82
|
+
localrelay: boolean;
|
|
83
|
+
timeoffset: number;
|
|
84
|
+
connections: number;
|
|
85
|
+
connections_in: number;
|
|
86
|
+
connections_out: number;
|
|
87
|
+
networkactive: boolean;
|
|
88
|
+
networks: {
|
|
89
|
+
name: string;
|
|
90
|
+
limited: boolean;
|
|
91
|
+
reachable: boolean;
|
|
92
|
+
proxy: string;
|
|
93
|
+
proxy_randomize_credentials: boolean;
|
|
94
|
+
}[];
|
|
95
|
+
relayfee: number;
|
|
96
|
+
excessutxocharge: number;
|
|
97
|
+
localaddresses: {
|
|
98
|
+
address: string;
|
|
99
|
+
port: number;
|
|
100
|
+
score: number;
|
|
101
|
+
}[];
|
|
102
|
+
warnings: string;
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/** Returns known peer addresses from the address manager. */
|
|
106
|
+
export interface GetNodeAddresses {
|
|
107
|
+
method: 'getnodeaddresses';
|
|
108
|
+
params: [
|
|
109
|
+
count?: number
|
|
110
|
+
];
|
|
111
|
+
response: {
|
|
112
|
+
time: number;
|
|
113
|
+
services: number;
|
|
114
|
+
address: string;
|
|
115
|
+
port: number;
|
|
116
|
+
}[];
|
|
117
|
+
}
|
|
118
|
+
/** Returns detailed info about each connected peer. */
|
|
119
|
+
export interface GetPeerInfo {
|
|
120
|
+
method: 'getpeerinfo';
|
|
121
|
+
params: [];
|
|
122
|
+
response: {
|
|
123
|
+
id: number;
|
|
124
|
+
addr: string;
|
|
125
|
+
addrbind: string;
|
|
126
|
+
addrlocal: string;
|
|
127
|
+
mapped_as: string;
|
|
128
|
+
services: string;
|
|
129
|
+
relaytxes: boolean;
|
|
130
|
+
lastsend: number;
|
|
131
|
+
lastrecv: number;
|
|
132
|
+
bytessent: number;
|
|
133
|
+
bytesrecv: number;
|
|
134
|
+
conntime: number;
|
|
135
|
+
timeoffset: number;
|
|
136
|
+
pingtime: number;
|
|
137
|
+
minping: number;
|
|
138
|
+
pingwait: number;
|
|
139
|
+
version: number;
|
|
140
|
+
subver: string;
|
|
141
|
+
inbound: boolean;
|
|
142
|
+
addnode: boolean;
|
|
143
|
+
startingheight: number;
|
|
144
|
+
banscore: number;
|
|
145
|
+
synced_headers: number;
|
|
146
|
+
synced_blocks: number;
|
|
147
|
+
inflight: number[];
|
|
148
|
+
addr_processed: number;
|
|
149
|
+
addr_rate_limited: number;
|
|
150
|
+
whitelisted: boolean;
|
|
151
|
+
minfeefilter: number;
|
|
152
|
+
bip152_hb_to: boolean;
|
|
153
|
+
bip152_hb_from: boolean;
|
|
154
|
+
bytessent_per_msg: {
|
|
155
|
+
[msg: string]: number;
|
|
156
|
+
};
|
|
157
|
+
bytesrecv_per_msg: {
|
|
158
|
+
[msg: string]: number;
|
|
159
|
+
};
|
|
160
|
+
}[];
|
|
161
|
+
}
|
|
162
|
+
/** Returns list of banned IPs/subnets. */
|
|
163
|
+
export interface ListBanned {
|
|
164
|
+
method: 'listbanned';
|
|
165
|
+
params: [];
|
|
166
|
+
response: {
|
|
167
|
+
address: string;
|
|
168
|
+
banned_until: number;
|
|
169
|
+
ban_created: number;
|
|
170
|
+
ban_reason: string;
|
|
171
|
+
}[];
|
|
172
|
+
}
|
|
173
|
+
/** Pings all connected nodes to measure latency. */
|
|
174
|
+
export interface Ping {
|
|
175
|
+
method: 'ping';
|
|
176
|
+
params: [];
|
|
177
|
+
response: null;
|
|
178
|
+
}
|
|
179
|
+
/** Bans or unbans a node by subnet. */
|
|
180
|
+
export interface SetBan {
|
|
181
|
+
method: 'setban';
|
|
182
|
+
params: [
|
|
183
|
+
subnet: string,
|
|
184
|
+
command: 'add' | 'remove',
|
|
185
|
+
bantime?: number,
|
|
186
|
+
absolute?: boolean
|
|
187
|
+
];
|
|
188
|
+
response: null;
|
|
189
|
+
}
|
|
190
|
+
/** Enables or disables all P2P network activity. */
|
|
191
|
+
export interface SetNetworkActive {
|
|
192
|
+
method: 'setnetworkactive';
|
|
193
|
+
params: [
|
|
194
|
+
state: boolean
|
|
195
|
+
];
|
|
196
|
+
response: null;
|
|
197
|
+
}
|