Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
bitcoin-p2p
Advanced tools
This is a client library for the Bitcoin P2P network, written for Node.js, using MongoDB as its back end.
The official client contains the node, wallet, GUI and miner. This library only contains the node, i.e. the P2P part of Bitcoin. Its intended use is as a server component to give lighter clients access to the data in the block chain (in real-time.)
Node.js and NPM should be compiled manually based on the latest stable release. MongoDB can be installed using any method. The remaining dependencies can be installed as follows (on Debian/Ubuntu):
sudo apt-get install libssl-dev libgmp3-dev pkg-config
Once you have all prerequisites, this one-liner will install the latest version straight from NPM:
# Install node-bitcoin-p2p globally
sudo npm install bitcoin-p2p -g
Please refer to the wiki for detailed installation instructions.
If you run into problems, please take a look at the "Troubleshooting" section below or go to Issues to open a new ticket.
For your first experience with the BitcoinJS daemon, try running it right from the terminal.
bitcoinjs run --testnet --bchdbg
You can find out more about the various functions of the command line utility via the help feature:
bitcoinjs help
# Remove the database
bitcoinjs db-drop
# Uninstall the software
sudo npm uninstall bitcoin-p2p -g
node-bitcoin-p2p
logs using the winston library. Currently, it
defaults to logging anything on the debug
log level and higher. Here
are the available log levels:
netdbg
- Networking events (sending/receiving messages)bchdbg
- Block chain events (adding blocks)rpcdbg
- JSON-RPC API events (requests/responses)scrdbg
- Script interpreter events (custom scripts, errors)debug
- Other verbose logginginfo
- General information and status messageswarn
- Something rare happened (e.g. strange pubKeyScript)error
- Something bad happenedThe XXXdbg levels can be enabled individually by editing
lib/logger.js or via the command line, e.g. bitcoinjs run --bchdbg
.
node-bitcoin-p2p
is not only a daemon, but also a Node.js
module/library. In most cases it's best to use the daemon via RPC. But
sometimes you need the extra control that comes with directly linking
to the code.
For details on developing with node-bitcoin-p2p
as a library, take a
look at the Developer Guide on the
wiki.
When upgrading node-bitcoin-p2p it is a good idea to reset its database:
bitcoinjs db-drop
This won't be necessary once node-bitcoin-p2p is more stable, but for now new versions often break database compatibility and since it only takes about ten minutes to regenerate it makes sense to just reset it.
To run the test suite, please install Vows and run the following command:
vows test/* --spec
The library is currently alpha quality. Here are some things it currently lacks:
On top of that, it could use a lot more documentation, test cases and general bug fixing across the board.
You can find more information on the Issues tab on Github.
If you see this error:
Error: Cannot find module '../build-cc/default/native'
This happens when the native components of node-bitcoin-p2p are not compiled yet.
Make sure you have libgmp3-dev
installed, then go to the
node-bitcoin-p2p folder and run:
node-waf configure build
node-bitcoin-p2p - Node.js Bitcoin client
Copyright (c) 2011 Stefan Thomas justmoon@members.fsf.org.
Native extensions are
Copyright (c) 2011 Andrew Schaaf andrew@andrewschaaf.com
Parts of this software are based on BitcoinJ
Copyright (c) 2011 Google Inc.
FAQs
Implementation of Bitcoin's peer-to-peer layer for Node.js
The npm package bitcoin-p2p receives a total of 0 weekly downloads. As such, bitcoin-p2p popularity was classified as not popular.
We found that bitcoin-p2p demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.