Hello Nigiri!
Today we announce a new tool for Bitcoin developers: Bitcoin 🍣 Nigiri
Overview
Bitcoin Nigiri is a cross-platform command line tool that allows to quickly fire up a personal regtest Bitcoin blockchain along with a Liquid sidechain, Electrum explorer and other special developer tools.
You can run tests and execute commands locally for development or in a continuous integration pipeline.
At the moment Docker and Compose are used under the hood to ensure a reproducible installation. Bare metal installations for major platforms are coming.
Get started
- Download and install
nigiricommand line interface
$ curl https://getnigiri.vulpem.com | bash- Launch Docker daemon (Mac OSX)
$ open -a Docker- Close and reopen your terminal, then start Bitcoin and Liquid
$ nigiri start --liquidThat’s it.
Go to http://localhost:5000 for quickly inspect the Bitcoin blockchain or http://localhost:5001 for Liquid.
Commands
Start Bitcoin
nigiri startStart Bitcoin and Liquid
nigiri start --liquidStop
nigiri stopDelete
nigiri stop --deleteVersion
nigiri --versionLog
To see services (node, electrs, esplora, chopsticks) pass as first argument.
Pass an optional flag --liquid for Liquid related services.
nigiri logs SERVICE --liquidWhat’s inside?
Data directory
When starting, you can specify a directory where all your container will stay with --datadir flag. By default it will be ~/.nigiri
You can fully configure your own environment, just by tweaking ports and containers via compose and conf files in ~/.nigiri/resources
Bitcoin + Liquid nodes
Bitcoin and Liquid (if selected with —liquid ) rpc interfaces are exposed both with user admin1 and password 123 .
At the moment the nodes are started on regtest network. testnet and mainnet compose files will be released soon.
Electrum & Nigiri Chopstick
For each chain an Electrum server is started and exposes and the rpc interface. We use the Blockstream Electrs fork that and wrap the REST interface with Nigiri Chopstick, an API pass-through that simply proxies requests to Electrs and adds some handy features for a developer sandbox:
- POST endpoint
/faucetto get Bitcoins or Liquid Bitcoin with a application/json body as{"address":"yourBitcoinOrLiquidAddr"} - automatic block mining once
/txPOST endpoint’s called
Esplora
Quickly inspect the blocks via the browser using the Esplora explorer, deployed for both bitcoin and liquid.
