2017 © Pedro Peláez
 

library bitcoin-node

A bitcoin node

image

bitwasp/bitcoin-node

A bitcoin node

  • Monday, August 7, 2017
  • by thomaskerin
  • Repository
  • 5 Watchers
  • 11 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

PHPNODE

A toolkit for building a bitcoin node, built with ReactPHP. See Design.md for more detailed overview., (*1)

This repository includes a console application built from the Symfony Console package., (*2)

The BitcoinNode class supports headers first download, and will then attempt to download the full block history. Since this will likely take a few days, I haven't had the patience to leave it running. Still much code to write., (*3)

Requirements

  • ext-zmq
  • ext-gmp
  • ext-json
  • ext-curl
  • ext-mcrypt

Installation

To run the software:, (*4)

git clone https://github.com/Bit-Wasp/node-php.git
composer install

To include in your projects:, (*5)

composer require bitwasp/bitcoin-node

You'll need a SQL database & credentials. Schema files are in ./sql Warning: these may be ruthlessly updated!, (*6)

Configuration

Dump a blank config file: phpnode print-config > config.ini, (*7)

Create in the default location: mkdir ~/.phpnode && phpnode print-config > ~/.phpnode/bitcoin.ini, (*8)

Run the software

See the list of commands: phpnode list, (*9)

Or general help: phpnode help, (*10)

Controlling the node

Start with config file in the default location: phpnode node:start, (*11)

IMPORTANT: How to the stop the software (don't use CTRL-C) phpnode node:stop, (*12)

Run with configuration in an alternative location: phpnode node:start -c /tmp/yourconfig, (*13)

Watch a debug log of events reported by the node: phpnode node:watch, (*14)

Show information about the node's best chain: phpnode node:info, (*15)

Show information about all tracked chains: phpnode node:chains, (*16)

Administering the database

Wipe the database: phpnode db:wipe, (*17)

Empty all tables: phpnode db:reset, (*18)

Empty only full block data (leave headers/index alone): phpnode db:blocks:reset, (*19)

The Versions