ptarmigan

Lightning Network (BOLT)

View the Project on GitHub nayutaco/ptarmigan

ptarmigan-api

ptarmigan rest-api Lightning Network implementation ptarmigan REST-API

Configration

# copy .env file
$ cd $INSTALL_DIR/ptarmigan/ptarmapi/
$ cp.env-sample .env

# edit .env change to your environment
$ vi .env

Installation

$ cd $INSTALL_DIR/ptarmigan/ptarmapi/
$ sudo apt-get install npm
$ npm install

Running the app

# start development mode
$ npm run start

Example

$ curl -X POST "http://localhost:3000/getinfo" -H "accept: application/json"

Browser of local PC

Use this rest-api in a closed network. Use ssh port forwarding without exposing the port.

# ssh port foward from localhost 3333 to server 3000
$ ssh user@ipaddress -L 3333:localhost:3000
# access to ptarmigan rest-api OpenAPI(swagger) http://localhost:3333/api