lightningd-gjson-rpc

Talk with a lightningd/c-lightning with minimal overhead and gjson responses.

MIT License

Stars
44
Committers
6
lightningd-gjson-rpc - trustedcoin v0.2.4 Latest Release

Published by fiatjaf over 4 years ago

Minor fixes and add https://explorer.bullbitcoin.com/ as an alternative esplora backend.

lightningd-gjson-rpc - trustedcoin v0.2.2

Published by fiatjaf over 4 years ago

Updated mempool.space URL from /electrs to /api.
This was causing big breaks.

lightningd-gjson-rpc - sparko v2.1

Published by fiatjaf over 4 years ago

sparko v2.1 has support for Range headers that allow you to only get a slice of long lists of things returned by listinvoices, listsendpays, listforwards any anything else.

Just specify the header as Range: <jsonattrname>=<from>-<to> to get response[jsonattrname].slice(from, to) or Range: <jsonattrname>=-<from> to get response[jsonattrname].slice(-from).

A practical example. Imagine I want to get my last forwarded payment. If I call listforwards I'll have to download thousands of forwards and then only filter one locally. With a Range header I can do:

~> curl -k https://etleneum.com/rpc -H 'X-Access: secretkey' -d '{"method": "listforwards"}' -H 'Range: forwards=-1'
{
  "forwards": [
    {
      "payment_hash": "ad36317a3163e23f5b6d5c2376fddf908724bd449b841298d8b6c4ca6f93b91c",
      "in_channel": "626617x2512x1",
      "out_channel": "623255x1489x0",
      "in_msatoshi": 12860001,
      "in_msat": "12860001msat",
      "out_msatoshi": 12860000,
      "out_msat": "12860000msat",
      "fee": 1,
      "fee_msat": "1msat",
      "status": "local_failed",
      "failcode": 16392,
      "failreason": "WIRE_PERMANENT_CHANNEL_FAILURE",
      "received_time": 1590002068.897
    }
  ]
}
lightningd-gjson-rpc - sparko v2.0

Published by fiatjaf over 4 years ago

sparko v2.0 has

  • breaking changes in the way you define keys: now every method must be whitelisted, it's much simpler to write and reason about (if you don't specify any method than everything will be whitelisted).
  • event streaming: it's now 100x easier to write an app that talks to your node from a distance, you just open a long-lived SSE/EventSource listener (there are libraries for this in all languages) to /stream and wait until you get events (to call methods, as always you just call /rpc).
  • bug fixes and improvements.

More details at the README.

lightningd-gjson-rpc - trustedcoin v0.2.1

Published by fiatjaf over 4 years ago

Fixing a stupid bug that rarely happens.

lightningd-gjson-rpc - trustedcoin v0.2

Published by fiatjaf over 4 years ago

trustedcoin now is (hopefully) safer (in the sense that it won't constantly close your channels because of fee disagreements), adapted to c-lightning v0.8.2 which changed the Bitcoin backend interface.

lightningd-gjson-rpc - x1

Published by fiatjaf over 4 years ago

Single-binary executables for plugins.

Read more at https://github.com/fiatjaf/lightningd-gjson-rpc/tree/x1/cmd

lightningd-gjson-rpc - p8

Published by fiatjaf over 4 years ago

This release has nothing new except

  • the routetracker plugin, which is a mostly useless prototype that uses the rpc_command hook to track channels and nodes most present in your outgoing payment attempts;
  • a lot of bugfixes and small improvements;
  • smaller binaries for all plugins, because we strip some unnecessary code from the binaries using arcane build flags.
lightningd-gjson-rpc - p8.alpha

Published by fiatjaf almost 5 years ago

lightningd-gjson-rpc - p7

Published by fiatjaf about 5 years ago

Removing the signatures plugin

Since the new c-lightning version includes signing methods by default this plugin won't be maintained anymore and I've deleted it entirely. If you want you can still find the old releases or go to previous commits to see the source.

Introducing the shadows plugin

shadows is an experimental plugin that allows you to create invoices from random nodes and channels that don't actually exist and resolve them on your node!

sparko now supports LetsEncrypt certificates

Just specify sparko-letsencrypt-email and a domain name as sparko-host and you'll get a certificate for free automatically! (For now it's required that you're allowed to bind to port 80 and 443, which means you must either run lightningd as root or explicitly grant authorization so your user can bind to these ports.)

Sparko has has some other improvements too.

webhook filter names changed, but now supports all lightningd notifications!

Woohoo! This is good for everybody, except if you were using the ?filter-event= stuff on your webhook URLs. But it's easy to update to the new names nonetheless.

Plugins now have versions

The plugin framework allows you to specify a string version like v1.3 and the plugin will print that on startup!

waitpay bugfixes.

This is not interesting.

lightningd-gjson-rpc - p6

Published by fiatjaf about 5 years ago

Just some improvements and bug fixes.

lightningd-gjson-rpc - p5

Published by fiatjaf about 5 years ago

Introducing the signatures plugin

This plugin can sign messages using your node's public key and verify messages too (although you don't need a Lightning node to do that). It can also produce lnd-like "compact" signatures with which you can recover a public key using just the signature and the message -- however this is somewhat useless, as every combination of message and signature will yield a corresponding public key and we can't know if that key is controlled by someone or not.

Introducing the sparko plugin

This plugin deprecates https://github.com/fiatjaf/sparko and turns it into a plugin, which gives us many many advantages of having it as a standalone executable. See the list of advantages at https://github.com/fiatjaf/lightningd-gjson-rpc/tree/master/cmd/sparko.

New plugin builder framework

This release also introduces the plugin builder framework, which makes it easy to bootstrap a new plugin in a couple of minutes.

lightningd-gjson-rpc -

Published by fiatjaf about 5 years ago

Introducing the lnurl plugin

This plugin turns your c-lightning daemon into a full-featured lnurl wallet which can interact with all sorts of lnurl-enabled services (of course, the CLI is not the best place to use this, but at least it works).

See more at https://github.com/fiatjaf/lightningd-gjson-rpc/tree/master/cmd/lnurl.

waitpay plugin now supports an optional [description] parameter

Although c-lightning is gradually removing support for description_hash on its core, you don't have to fear! waitpay with this new parameter can now be used to pay such invoices (at least until c-lightning removes more needed stuff).

lightningd-gjson-rpc - p3

Published by fiatjaf over 5 years ago

Introducing the jqmethods plugin

An easy way to run prewritten jq filters on your lightningd outputs.

Read more at https://github.com/fiatjaf/lightningd-gjson-rpc/tree/master/cmd/jqmethods

lightningd-gjson-rpc - p2

Published by fiatjaf over 5 years ago

Introducing the webhook plugin

Dispatch webhooks whenever a payment is received.

Read more at https://github.com/fiatjaf/lightningd-gjson-rpc/tree/master/cmd/webhook

lightningd-gjson-rpc - v0.1.0

Published by fiatjaf over 5 years ago

The waitpay plugin.

Just call and wait until it pays. No more keep trying in the background in an asynchronous-unreliable manner such that you don't know if the payment succeeded or not or if it's still being tried. This is crucial for servers where withdrawals to untrusted third-parties are processed.

Read more about it on https://github.com/fiatjaf/lightningd-gjson-rpc/tree/master/cmd/waitpay