You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Await style based on promises with headers enabled:
104
-
const [body, headers] =awaitclient.getInfo();
105
-
```
106
-
107
51
## Named parameters
108
52
109
53
Since version v0.14.0, it is possible to send commands via the JSON-RPC interface using named parameters instead of positional ones. This comes with the advantage of making the order of arguments irrelevant. It also helps improving the readability of certain function calls when leaving out arguments for their default value.
These configuration values may also be set on the `bitcoin.conf` file of your platform installation.
225
169
226
-
By default, port `8332` is used to listen for requests in `mainnet` mode, or `18332` in `testnet` and `regtest` modes (the regtest change will be changed to `18443` in [0.16](https://github.com/bitcoin/bitcoin/pull/10825)). Use the `network` property to initialize the client on the desired mode and automatically set the respective default port. You can optionally set a custom port of your choice too.
227
-
228
170
The RPC services binds to the localhost loopback network interface, so use `rpcbind` to change where to bind to and `rpcallowip` to whitelist source IP access.
This client supports SSL out of the box. Simply pass the SSL public certificate to the client and optionally disable strict SSL checking which will bypass SSL validation (the connection is still encrypted but the server it is connecting to may not be trusted). This is, of course, discouraged unless for testing purposes when using something like self-signed certificates.
391
-
392
-
#### Generating a self-signed certificates for testing purposes
393
-
Please note that the following procedure should only be used for testing purposes.
394
-
395
-
Generate an self-signed certificate together with an unprotected private key:
On Bitcoin Core >0.12, use must use `stunnel` (`brew install stunnel` or `sudo apt-get install stunnel4`) or an HTTPS reverse proxy to configure SSL since the built-in support for SSL has been removed. The trade off with `stunnel` is performance and simplicity versus features, as it lacks more powerful capacities such as Basic Authentication and caching which are standard in reverse proxies.
409
-
410
-
You can use `stunnel` by configuring `stunnel.conf` with the following service requirements:
411
-
412
-
```
413
-
[bitcoin]
414
-
accept = 28332
415
-
connect = 18332
416
-
cert = /etc/ssl/bitcoind/cert.pem
417
-
key = /etc/ssl/bitcoind/key.pem
418
-
```
419
-
420
-
The `key` option may be omitted if you concatenating your private and public certificates into a single `stunnel.pem` file.
421
-
422
-
On some versions of `stunnel` it is also possible to start a service using command line arguments. The equivalent would be:
0 commit comments