@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
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/* --- Util Commands --- */
|
|
2
|
-
// progress 5/5
|
|
3
|
-
|
|
4
|
-
export interface CreateMultisig {
|
|
5
|
-
method: 'createmultisig';
|
|
6
|
-
params: [
|
|
7
|
-
nrequired: number,
|
|
8
|
-
keys: string[]
|
|
9
|
-
];
|
|
10
|
-
response: {
|
|
11
|
-
address: string;
|
|
12
|
-
redeemScript: string;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface EstimateFee {
|
|
17
|
-
method: 'estimatefee';
|
|
18
|
-
params: [];
|
|
19
|
-
response: number;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export interface SignMessageWithPrivKey {
|
|
24
|
-
method: 'signmessagewithprivkey';
|
|
25
|
-
params: [
|
|
26
|
-
privkey: string,
|
|
27
|
-
message: string
|
|
28
|
-
];
|
|
29
|
-
response: string; // The signature of the message encoded in base 64
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface ValidateAddress {
|
|
33
|
-
method: 'validateaddress';
|
|
34
|
-
params: [string];
|
|
35
|
-
response: {
|
|
36
|
-
isvalid: boolean;
|
|
37
|
-
address: string;
|
|
38
|
-
scriptPubKey?: string;
|
|
39
|
-
isscript: boolean;
|
|
40
|
-
istokenaware: boolean;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface VerifyMessage {
|
|
45
|
-
method: 'verifymessage';
|
|
46
|
-
params: [
|
|
47
|
-
address:string,
|
|
48
|
-
signature: string,
|
|
49
|
-
message:string
|
|
50
|
-
];
|
|
51
|
-
response: boolean;
|
|
52
|
-
}
|
|
@@ -1,674 +0,0 @@
|
|
|
1
|
-
/* --- Wallet Commands --- */
|
|
2
|
-
// progress 52/52
|
|
3
|
-
|
|
4
|
-
import type { TokenData } from "../interfaces.js";
|
|
5
|
-
|
|
6
|
-
export interface AbandonTransaction {
|
|
7
|
-
method: 'abandontransaction';
|
|
8
|
-
params: [
|
|
9
|
-
txid: string
|
|
10
|
-
];
|
|
11
|
-
response: null;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface AbortRescan {
|
|
15
|
-
method: 'abortrescan';
|
|
16
|
-
params: [];
|
|
17
|
-
response: null;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface AddMultisigAddress {
|
|
21
|
-
method: 'addmultisigaddress';
|
|
22
|
-
params: [
|
|
23
|
-
nrequired: number,
|
|
24
|
-
keys: string[],
|
|
25
|
-
label?: string
|
|
26
|
-
];
|
|
27
|
-
response: {
|
|
28
|
-
address: string;
|
|
29
|
-
redeemScript: string;
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface BackupWallet {
|
|
34
|
-
method: 'backupwallet';
|
|
35
|
-
params: [
|
|
36
|
-
destination: string
|
|
37
|
-
];
|
|
38
|
-
response: null;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface CreateWallet {
|
|
42
|
-
method: 'createwallet';
|
|
43
|
-
params: [
|
|
44
|
-
wallet_name: string,
|
|
45
|
-
disable_private_keys?: boolean,
|
|
46
|
-
blank?: boolean
|
|
47
|
-
];
|
|
48
|
-
response: {
|
|
49
|
-
name: string;
|
|
50
|
-
warning?: string;
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface DumpWallet {
|
|
55
|
-
method: 'dumpwallet';
|
|
56
|
-
params: [
|
|
57
|
-
filename: string
|
|
58
|
-
];
|
|
59
|
-
response: {
|
|
60
|
-
filename: string;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface DumpPrivKey {
|
|
65
|
-
method: 'dumpprivkey';
|
|
66
|
-
params: [
|
|
67
|
-
address: string,
|
|
68
|
-
];
|
|
69
|
-
response: string;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface EncryptWallet {
|
|
73
|
-
method: 'encryptwallet';
|
|
74
|
-
params: [
|
|
75
|
-
passphrase: string
|
|
76
|
-
];
|
|
77
|
-
response: string;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export interface GetAddressesByLabel {
|
|
81
|
-
method: 'getaddressesbylabel';
|
|
82
|
-
params: [
|
|
83
|
-
label: string
|
|
84
|
-
];
|
|
85
|
-
response: {
|
|
86
|
-
[address: string]: {
|
|
87
|
-
purpose: string;
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export interface GetAddressInfo {
|
|
93
|
-
method: 'getaddressinfo';
|
|
94
|
-
params: [string];
|
|
95
|
-
response: {
|
|
96
|
-
address: string;
|
|
97
|
-
scriptPubKey: string;
|
|
98
|
-
ismine: boolean;
|
|
99
|
-
iswatchonly: boolean;
|
|
100
|
-
isscript: boolean;
|
|
101
|
-
ischange: boolean;
|
|
102
|
-
script?: 'nonstandard' | 'pubkey' | 'pubkeyhash' | 'scripthash' | 'multisig' | 'nulldata';
|
|
103
|
-
hex?: string;
|
|
104
|
-
pubkeys?: string[];
|
|
105
|
-
sigsrequired?: number;
|
|
106
|
-
pubkey?: string;
|
|
107
|
-
embedded?: object;
|
|
108
|
-
iscompressed: boolean;
|
|
109
|
-
label: string;
|
|
110
|
-
timestamp?: number;
|
|
111
|
-
hdkeypath?: string;
|
|
112
|
-
hdseedid?: string;
|
|
113
|
-
hdmasterkeyid?: string;
|
|
114
|
-
labels: {
|
|
115
|
-
name: string;
|
|
116
|
-
purpose: 'send' | 'receive';
|
|
117
|
-
}[];
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export interface GetBalance {
|
|
122
|
-
method: 'getbalance';
|
|
123
|
-
params: [
|
|
124
|
-
dummy?: string,
|
|
125
|
-
minconf?: number,
|
|
126
|
-
include_watchonly?: boolean
|
|
127
|
-
];
|
|
128
|
-
response: number;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export interface GetNewAddress {
|
|
132
|
-
method: 'getnewaddress';
|
|
133
|
-
params: [
|
|
134
|
-
label?: string,
|
|
135
|
-
];
|
|
136
|
-
response: string;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export interface GetRawChangeAddress {
|
|
140
|
-
method: 'getrawchangeaddress';
|
|
141
|
-
params: [];
|
|
142
|
-
response: string;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export interface GetReceivedByAddress {
|
|
146
|
-
method: 'getreceivedbyaddress';
|
|
147
|
-
params: [
|
|
148
|
-
address: string,
|
|
149
|
-
minconf?: number
|
|
150
|
-
];
|
|
151
|
-
response: number;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export interface GetReceivedByLabel {
|
|
155
|
-
method: 'getreceivedbylabel';
|
|
156
|
-
params: [
|
|
157
|
-
label: string,
|
|
158
|
-
minconf?: number
|
|
159
|
-
];
|
|
160
|
-
response: number;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export interface GetTransaction {
|
|
164
|
-
method: 'gettransaction';
|
|
165
|
-
params: [
|
|
166
|
-
txid: string,
|
|
167
|
-
include_watchonly?: boolean
|
|
168
|
-
];
|
|
169
|
-
response: {
|
|
170
|
-
amount: number;
|
|
171
|
-
fee?: number;
|
|
172
|
-
confirmations: number;
|
|
173
|
-
blockhash?: string;
|
|
174
|
-
blockindex?: number;
|
|
175
|
-
blocktime?: number;
|
|
176
|
-
txid: string;
|
|
177
|
-
time: number;
|
|
178
|
-
timereceived: number;
|
|
179
|
-
'bip125-replaceable': 'yes' | 'no' | 'unknown';
|
|
180
|
-
details: {
|
|
181
|
-
address: string;
|
|
182
|
-
category: 'send' | 'receive';
|
|
183
|
-
amount: number;
|
|
184
|
-
label?: string;
|
|
185
|
-
vout: number;
|
|
186
|
-
fee?: number;
|
|
187
|
-
abandoned?: boolean;
|
|
188
|
-
}[];
|
|
189
|
-
hex: string;
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export interface GetUnconfirmedBalance {
|
|
194
|
-
method: 'getunconfirmedbalance';
|
|
195
|
-
params: [];
|
|
196
|
-
response: number;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
export interface GetWalletInfo {
|
|
200
|
-
method: 'getwalletinfo';
|
|
201
|
-
params: [];
|
|
202
|
-
response: {
|
|
203
|
-
walletname: string,
|
|
204
|
-
walletversion: number;
|
|
205
|
-
balance: number;
|
|
206
|
-
unconfirmed_balance: number;
|
|
207
|
-
immature_balance: number;
|
|
208
|
-
txcount: number;
|
|
209
|
-
keypoololdest: number;
|
|
210
|
-
keypoolsize: number;
|
|
211
|
-
keypoolsize_hd_internal: number;
|
|
212
|
-
unlocked_until: number;
|
|
213
|
-
paytxfee: number;
|
|
214
|
-
hdseedid?: string;
|
|
215
|
-
hdmasterkeyid?: string;
|
|
216
|
-
private_keys_enabled: boolean;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export interface ImportAddress {
|
|
221
|
-
method: 'importaddress';
|
|
222
|
-
params: [
|
|
223
|
-
address: string,
|
|
224
|
-
label?: string,
|
|
225
|
-
rescan?: boolean,
|
|
226
|
-
p2sh?: boolean
|
|
227
|
-
];
|
|
228
|
-
response: number;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export interface ImportMulti {
|
|
232
|
-
method: 'importmulti';
|
|
233
|
-
params: [
|
|
234
|
-
requests: {
|
|
235
|
-
scriptPubKey: string | { address: string };
|
|
236
|
-
timestamp: number | 'now';
|
|
237
|
-
redeemscript?: string;
|
|
238
|
-
pubkeys?: string[];
|
|
239
|
-
keys?: string[];
|
|
240
|
-
internal?: boolean;
|
|
241
|
-
watchonly?: boolean;
|
|
242
|
-
label?: string;
|
|
243
|
-
}[],
|
|
244
|
-
options?: {
|
|
245
|
-
rescan?: boolean;
|
|
246
|
-
}
|
|
247
|
-
];
|
|
248
|
-
response: {
|
|
249
|
-
success: boolean;
|
|
250
|
-
error?: {
|
|
251
|
-
code: number;
|
|
252
|
-
message: string;
|
|
253
|
-
};
|
|
254
|
-
}[];
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
export interface ImportPrivKey {
|
|
258
|
-
method: 'importprivkey';
|
|
259
|
-
params: [
|
|
260
|
-
privkey: string,
|
|
261
|
-
label?: string,
|
|
262
|
-
rescan?: boolean
|
|
263
|
-
];
|
|
264
|
-
response: null;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
export interface ImportPrunedFunds {
|
|
268
|
-
method: 'importprunedfunds';
|
|
269
|
-
params: [
|
|
270
|
-
rawtransaction: string,
|
|
271
|
-
txoutproof: string
|
|
272
|
-
];
|
|
273
|
-
response: null;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
export interface ImportPubKey {
|
|
277
|
-
method: 'importpubkey';
|
|
278
|
-
params: [
|
|
279
|
-
pubkey: string,
|
|
280
|
-
label?: string,
|
|
281
|
-
rescan?: boolean
|
|
282
|
-
];
|
|
283
|
-
response: null;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
export interface ImportWallet {
|
|
287
|
-
method: 'importwallet';
|
|
288
|
-
params: [
|
|
289
|
-
filename: string
|
|
290
|
-
];
|
|
291
|
-
response: null;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
export interface KeyPoolRefill {
|
|
295
|
-
method: 'keypoolrefill';
|
|
296
|
-
params: [
|
|
297
|
-
newsize?: number
|
|
298
|
-
];
|
|
299
|
-
response: null;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
export interface ListAddressGroupings {
|
|
303
|
-
method: 'listaddressgroupings';
|
|
304
|
-
params: [];
|
|
305
|
-
response: [
|
|
306
|
-
[
|
|
307
|
-
{
|
|
308
|
-
address: string;
|
|
309
|
-
amount: number;
|
|
310
|
-
label?: string;
|
|
311
|
-
}[]
|
|
312
|
-
][]
|
|
313
|
-
];
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
export interface ListLabels {
|
|
317
|
-
method: 'listlabels';
|
|
318
|
-
params: [
|
|
319
|
-
purpose?: string
|
|
320
|
-
];
|
|
321
|
-
response: string[];
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
export interface ListLockUnspent {
|
|
325
|
-
method: 'listlockunspent';
|
|
326
|
-
params: [];
|
|
327
|
-
response: {
|
|
328
|
-
txid: string;
|
|
329
|
-
vout: number;
|
|
330
|
-
}[];
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
export interface ListReceivedByAddress {
|
|
334
|
-
method: 'listreceivedbyaddress';
|
|
335
|
-
params: [
|
|
336
|
-
minconf?: number,
|
|
337
|
-
include_empty?: boolean,
|
|
338
|
-
include_watchonly?: boolean,
|
|
339
|
-
address_filter?: string
|
|
340
|
-
];
|
|
341
|
-
response: {
|
|
342
|
-
involvesWatchonly?: boolean;
|
|
343
|
-
address: string;
|
|
344
|
-
amount: number;
|
|
345
|
-
confirmations: number;
|
|
346
|
-
label: string;
|
|
347
|
-
txids: string[];
|
|
348
|
-
}[];
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
export interface ListReceivedByLabel {
|
|
352
|
-
method: 'listreceivedbylabel';
|
|
353
|
-
params: [
|
|
354
|
-
minconf?: number,
|
|
355
|
-
include_empty?: boolean,
|
|
356
|
-
include_watchonly?: boolean
|
|
357
|
-
];
|
|
358
|
-
response: {
|
|
359
|
-
involvesWatchonly?: boolean;
|
|
360
|
-
amount: number;
|
|
361
|
-
confirmations: number;
|
|
362
|
-
label: string;
|
|
363
|
-
}[];
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
interface TransactionWallet {
|
|
367
|
-
address?: string;
|
|
368
|
-
category: 'send' | 'receive';
|
|
369
|
-
amount: number;
|
|
370
|
-
vout: number;
|
|
371
|
-
fee?: number;
|
|
372
|
-
confirmations: number;
|
|
373
|
-
blockhash?: string;
|
|
374
|
-
blockindex?: number;
|
|
375
|
-
blocktime?: number;
|
|
376
|
-
txid: string;
|
|
377
|
-
time: number;
|
|
378
|
-
timereceived: number;
|
|
379
|
-
abandoned?: boolean;
|
|
380
|
-
comment?: string;
|
|
381
|
-
label?: string;
|
|
382
|
-
to?: string;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
export interface ListSinceBlock {
|
|
386
|
-
method: 'listsinceblock';
|
|
387
|
-
params: [
|
|
388
|
-
blockhash?: string,
|
|
389
|
-
target_confirmations?: number,
|
|
390
|
-
include_watchonly?: boolean,
|
|
391
|
-
include_removed?: boolean
|
|
392
|
-
];
|
|
393
|
-
response: {
|
|
394
|
-
transactions: TransactionWallet[];
|
|
395
|
-
removed?: TransactionWallet[];
|
|
396
|
-
lastblock: string;
|
|
397
|
-
};
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
export interface ListTransactions {
|
|
401
|
-
method: 'listtransactions';
|
|
402
|
-
params: [
|
|
403
|
-
label?: string,
|
|
404
|
-
count?: number,
|
|
405
|
-
skip?: number,
|
|
406
|
-
include_watchonly?: boolean
|
|
407
|
-
];
|
|
408
|
-
response: TransactionWallet[];
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
export interface ListUnspent {
|
|
412
|
-
method: 'listunspent';
|
|
413
|
-
params: [
|
|
414
|
-
minconf?: number,
|
|
415
|
-
maxconf?: number,
|
|
416
|
-
addresses?: string[],
|
|
417
|
-
include_unsafe?: boolean,
|
|
418
|
-
query_options?: {
|
|
419
|
-
minimumAmount?: number | string;
|
|
420
|
-
maximumAmount?: number | string;
|
|
421
|
-
maximumCount?: number;
|
|
422
|
-
minimumSumAmount?: number | string;
|
|
423
|
-
includeTokens?: boolean;
|
|
424
|
-
tokensOnly?: boolean;
|
|
425
|
-
}
|
|
426
|
-
];
|
|
427
|
-
response: ListUnspentItem[];
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
export interface ListUnspentItem {
|
|
431
|
-
txid: string;
|
|
432
|
-
vout: number;
|
|
433
|
-
address: string;
|
|
434
|
-
label: string;
|
|
435
|
-
scriptPubKey: string;
|
|
436
|
-
amount: number;
|
|
437
|
-
tokenData?: TokenData;
|
|
438
|
-
confirmations: number;
|
|
439
|
-
redeemScript: string;
|
|
440
|
-
spendable: boolean;
|
|
441
|
-
solvable: boolean;
|
|
442
|
-
safe: boolean;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
export interface ListWalletDir {
|
|
446
|
-
method: 'listwalletdir';
|
|
447
|
-
params: [];
|
|
448
|
-
response: {
|
|
449
|
-
wallets: {
|
|
450
|
-
name: string;
|
|
451
|
-
}[];
|
|
452
|
-
};
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
export interface ListWallets {
|
|
456
|
-
method: 'importaddress';
|
|
457
|
-
params: [];
|
|
458
|
-
response: string[];
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
export interface LoadWallet {
|
|
462
|
-
method: 'loadwallet';
|
|
463
|
-
params: [
|
|
464
|
-
filename: string
|
|
465
|
-
];
|
|
466
|
-
response: {
|
|
467
|
-
name: string;
|
|
468
|
-
warning?: string;
|
|
469
|
-
};
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
export interface LockUnspent {
|
|
473
|
-
method: 'lockunspent';
|
|
474
|
-
params: [
|
|
475
|
-
unlock: boolean,
|
|
476
|
-
transactions?: {
|
|
477
|
-
txid: string;
|
|
478
|
-
vout: number;
|
|
479
|
-
}[]
|
|
480
|
-
];
|
|
481
|
-
response: boolean;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
export interface RemovePrunedFunds {
|
|
485
|
-
method: 'removeprunedfunds';
|
|
486
|
-
params: [
|
|
487
|
-
txid: string
|
|
488
|
-
];
|
|
489
|
-
response: null;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
export interface RescanBlockchain {
|
|
493
|
-
method: 'rescanblockchain';
|
|
494
|
-
params: [
|
|
495
|
-
start_height?: number,
|
|
496
|
-
stop_height?: number
|
|
497
|
-
];
|
|
498
|
-
response: {
|
|
499
|
-
start_height: number;
|
|
500
|
-
stop_height: number;
|
|
501
|
-
};
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
export interface SendMany {
|
|
505
|
-
method: 'sendmany';
|
|
506
|
-
params: [
|
|
507
|
-
dummy: string,
|
|
508
|
-
amounts: {
|
|
509
|
-
[address: string]: number | string
|
|
510
|
-
},
|
|
511
|
-
minconf?: number,
|
|
512
|
-
comment?: string,
|
|
513
|
-
subtractfeefrom?: string[],
|
|
514
|
-
coinsel?: number,
|
|
515
|
-
include_unsafe?: boolean
|
|
516
|
-
];
|
|
517
|
-
response: string;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
export interface SendToAddress {
|
|
521
|
-
method: 'sendtoaddress';
|
|
522
|
-
params: [
|
|
523
|
-
address: string,
|
|
524
|
-
amount: number | string,
|
|
525
|
-
comment?: string,
|
|
526
|
-
comment_to?: string,
|
|
527
|
-
subtractfeefromamount?: boolean,
|
|
528
|
-
coinsel?: number,
|
|
529
|
-
include_unsafe?: boolean
|
|
530
|
-
];
|
|
531
|
-
response: string;
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
export interface SetHdSeed {
|
|
535
|
-
method: 'sethdseed';
|
|
536
|
-
params: [
|
|
537
|
-
newkeypool?: boolean,
|
|
538
|
-
seed?: string
|
|
539
|
-
];
|
|
540
|
-
response: null;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
export interface SetLabel {
|
|
544
|
-
method: 'setlabel';
|
|
545
|
-
params: [
|
|
546
|
-
address: string,
|
|
547
|
-
label: string
|
|
548
|
-
];
|
|
549
|
-
response: null;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
export interface SetTxFee {
|
|
553
|
-
method: 'settxfee';
|
|
554
|
-
params: [
|
|
555
|
-
amount: number | string
|
|
556
|
-
];
|
|
557
|
-
response: boolean;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
export interface SignMessage {
|
|
561
|
-
method: 'signmessage';
|
|
562
|
-
params: [
|
|
563
|
-
address: string,
|
|
564
|
-
message: string
|
|
565
|
-
];
|
|
566
|
-
response: string;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
export interface SignRawTransactionWithWallet {
|
|
570
|
-
method: 'signrawtransactionwithwallet';
|
|
571
|
-
params: [
|
|
572
|
-
hexstring: string,
|
|
573
|
-
prevtxs?: {
|
|
574
|
-
txid: string;
|
|
575
|
-
vout: number;
|
|
576
|
-
scriptPubKey: string;
|
|
577
|
-
redeemScript?: string;
|
|
578
|
-
amount: number | string;
|
|
579
|
-
tokenData?: TokenData
|
|
580
|
-
}[],
|
|
581
|
-
sighashtype?: string
|
|
582
|
-
];
|
|
583
|
-
response: {
|
|
584
|
-
hex: string;
|
|
585
|
-
complete: boolean;
|
|
586
|
-
errors?: {
|
|
587
|
-
txid: string;
|
|
588
|
-
vout: number;
|
|
589
|
-
scriptSig: string;
|
|
590
|
-
sequence: number;
|
|
591
|
-
error: string;
|
|
592
|
-
}[];
|
|
593
|
-
};
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
export interface UnloadWallet {
|
|
597
|
-
method: 'unloadwallet';
|
|
598
|
-
params: [
|
|
599
|
-
wallet_name?: string
|
|
600
|
-
];
|
|
601
|
-
response: null;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
export interface WalletCreateFundedPsbt {
|
|
605
|
-
method: 'walletcreatefundedpsbt';
|
|
606
|
-
params: [
|
|
607
|
-
inputs: {
|
|
608
|
-
txid: string;
|
|
609
|
-
vout: number;
|
|
610
|
-
sequence: number;
|
|
611
|
-
}[],
|
|
612
|
-
outputs: {
|
|
613
|
-
address?: number | string | {
|
|
614
|
-
amount: number | string;
|
|
615
|
-
tokenData?: TokenData;
|
|
616
|
-
};
|
|
617
|
-
data?: string | string[];
|
|
618
|
-
}[],
|
|
619
|
-
locktime?: number,
|
|
620
|
-
options?: {
|
|
621
|
-
include_unsafe?: boolean;
|
|
622
|
-
changeAddress?: string;
|
|
623
|
-
changePosition?: number;
|
|
624
|
-
includeWatching?: boolean;
|
|
625
|
-
lockUnspents?: boolean;
|
|
626
|
-
feeRate?: number | string;
|
|
627
|
-
subtractFeeFromOutputs?: number[];
|
|
628
|
-
},
|
|
629
|
-
bip32derivs?: boolean
|
|
630
|
-
];
|
|
631
|
-
response: {
|
|
632
|
-
psbt: string;
|
|
633
|
-
fee: number;
|
|
634
|
-
changepos: number;
|
|
635
|
-
};
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
export interface WalletLock {
|
|
639
|
-
method: 'walletlock';
|
|
640
|
-
params: [];
|
|
641
|
-
response: null;
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
export interface WalletPassphrase {
|
|
645
|
-
method: 'walletpassphrase';
|
|
646
|
-
params: [
|
|
647
|
-
passphrase: string,
|
|
648
|
-
timeout: number
|
|
649
|
-
];
|
|
650
|
-
response: null;
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
export interface WalletPassphraseChange {
|
|
654
|
-
method: 'walletpassphrasechange';
|
|
655
|
-
params: [
|
|
656
|
-
oldpassphrase: string,
|
|
657
|
-
newpassphrase: string
|
|
658
|
-
];
|
|
659
|
-
response: null;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
export interface WalletProcessPsbt {
|
|
663
|
-
method: 'walletprocesspsbt';
|
|
664
|
-
params: [
|
|
665
|
-
psbt: string,
|
|
666
|
-
sign?: boolean,
|
|
667
|
-
sighashtype?: string,
|
|
668
|
-
bip32derivs?: boolean
|
|
669
|
-
];
|
|
670
|
-
response: {
|
|
671
|
-
psbt: string;
|
|
672
|
-
complete: boolean;
|
|
673
|
-
};
|
|
674
|
-
}
|