Home

Awesome

Nigiri chopsticks

This is an API passthrough that simply proxies requests to the underlying services. It expects an electrum REST server and an optional RPC server for faucet and custom broadcasting services.

Usage

Clone the repo:

$ git clone git@github.com:vulpmeventures/nigiri-chopsticks.git

Run tests:

$ bash scripts/test local

To run tests locally you must have a running Nigiri instance.

Build for Linux x64:

nigiri-chopsticks $ bash scripts/build linux amd64

Build for Mac:

nigiri-chopsticks $ bash scripts/build darwin amd64

Run:

nigiri-chopsticks $ ./build/nigiri-chopsticks-darwin-amd64

Routes and Customization

The web server starts at default address localhost:3000 with the following routes:

Note:
If mining is enabled, the esplora broadcast endpoint is wrapped so that a block is mined just after the transaction is published to get it confirmed; this is useful when running in regtest network.
All requests to chopsticks are (optionally) logged using a logger inspired by negroni package.

To customize server urls and ports use flags when running the binary: