Ptarmigan REST API Lightning Network implementation Ptarmigan REST API
# copy .env file
$ cd $INSTALL_DIR/ptarmigan/ptarmapi/
$ cp .env-sample .env
# edit .env change to your environment
$ vi .env
$ cd $INSTALL_DIR/ptarmigan/ptarmapi/
$ sudo apt-get install npm
$ npm install
If use invoice notifications api
, please install this.
What's invoice notifications api
$ sudo apt install -y curl
# start development mode
$ npm run start
Not use invoice notifications.
$ npm run start:not-use-invoices-notification
Default API token is ptarmigan
.
$ curl -X POST "http://localhost:3000/getinfo" -H "accept: application/json/" -H "Authorization: Bearer ptarmigan"
Use this rest-api in a closed network. Use ssh port forwarding without exposing the port.
# ssh port forward from localhost 3333 to server 3000
$ ssh user@ipaddress -L 3333:localhost:3000
# access to ptarmigan rest-api OpenAPI(swagger) http://localhost:3333/api