https://github.com/bitcoin-api/bitcoin-request
Do Bitcoin Request on Bitcoin Node
https://github.com/bitcoin-api/bitcoin-request
Last synced: 4 months ago
JSON representation
Do Bitcoin Request on Bitcoin Node
- Host: GitHub
- URL: https://github.com/bitcoin-api/bitcoin-request
- Owner: bitcoin-api
- License: bsd-3-clause
- Created: 2020-08-08T17:10:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-08T17:49:50.000Z (over 5 years ago)
- Last Synced: 2025-01-13T06:45:14.494Z (about 1 year ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: funding.yml
- License: LICENSE
Awesome Lists containing this project
README
# bitcoin-request
[](https://badge.fury.io/js/bitcoin-request)
bitcoin-request - Do Bitcoin Request on Bitcoin Node
## About
Do Bitcoin request on a bitcoin node. Set `process.env.BITCOIN_REQUEST_MODE` to the string `livenet` to make livenet requests to your Bitcoin node. Here's a list of commands you can use on your bitcoin node: [Chain Query list of commands](https://chainquery.com/bitcoin-cli).
## Example
```.js
'use strict';
const bitcoinRequest = require( 'bitcoin-request' );
(async () => {
const balance = await bitcoinRequest({
command: [
'getbalance'
],
livenet: false, // overrides BITCOIN_REQUEST_MODE env setting
});
console.log( balance );
// logs 0
})();
```