Awesome
graphql api for c-lightning.
to run (must be already running bitcoind for backend):
-
Must have Go version 12
-
git clone https://github.com/nettijoe96/c-lightning-graphql.git
(make sure it is outside gopath) -
go build -o c-lightning-graphql
-
ln -s c-lightning-graphql <path to c-lightning source>/plugins/c-lightning-graphql
-
Create openssl rsa key and self signed cert for server
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyin key.pem -out cert.pem
-
`./lightningd --keyfile=/path/to/server/keyfile --certfile=/path/to/server/certfile --graphql-port=<port>
-
./lightning-cli graphql
All graphql mutations calls are protected under Json Web Token authentification. jwt-factory is needed. You need to use the same cert and keyfile that you created here for jwt-factory (because the cmdline options have the same name)
Supported c-lightning commands: the argument structure follows exactly as c-lightning/lightning-cli.
Protected by token authentification: the auth for a command requires a token with "graphql-<command-name>" or "graphql-admin"
- close
- connect
- delinvoice
- disconnect
- fundchannel
- invoice
- pay
- sendpay
No authentification required:
- decodepay
- feerates
- getinfo
- getroute
- listchannels
- listforwards
- listfunds
- listinvoices
- listnodes
- listpayments
- listpeers
- waitanyinvoice
- waitinvoice