Commit Graph

558 Commits

Author SHA1 Message Date
Rusty Russell faac4b28ad plugins: support failure_message in invoice and htlc_accepted hooks.
As promised in the Changelog when we converted from failcodes to messages
internally.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-02-25 11:12:12 +10:30
darosior 230cebfb35 doc: clarify txprepare usage 2020-02-21 17:52:02 +01:00
ZmnSCPxj jxPCSnmZ 541472b77c doc/lightning-listpeers.7.md: Clarify `spendable_msat`.
Fixes: #3524

ChangeLog-none
2020-02-18 10:22:26 +10:30
Michael Schmoock ba36dfeba3 doc: all requirements.txt are needed for testing
the tests are not possible only by having tests/requirements.txt .
Running the whole testsuite also runs contrib/pyln-proto/tests/test_invoice.py
which needs requiremnets of pyln-proto and so on.

Also requirement coincurve requires libsecp256k1-dev headers.
As most developers need all requiremtents and we should tell them.
2020-02-18 10:10:17 +10:30
Rusty Russell 73f760342b doc: remove two more references to the '[Unreleased]' in CHANGELOG.md
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-02-17 19:07:09 +10:30
Rusty Russell 2c88ab53d4 doc: update MAKING-RELEASES.
1. GH_TOKEN is probably required to run the changelog script.
2. Note the footnotes need updating; we no longer have [Unreleased].

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-02-12 16:23:28 +10:30
ZmnSCPxj jxPCSnmZ 5c7f9b542a doc/lightning-listpeers.7.md: Expand and correct.
ChangeLog-Fixed: Corrected and expanded `lightning-listpeers.7` documentation.
2020-02-12 11:06:17 +10:30
Christian Decker c223932e40 doc: Update plugins.md to describe the chain-mode for hooks 2020-02-11 15:57:22 +10:30
Christian Decker bdbbfaeb40 doc: Reduce useless nesting in plugins.md
Triple nesting seems a bit excessive, I can't even read the titles in the
sidebar of http://lightning.readthedocs.org anymore :-)
2020-02-11 15:57:22 +10:30
Rusty Russell 30580731a6 Minor fixups on PR #3477
Feedback from @niftynei and me; nothing major, but avoids
another round-trip.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-02-11 13:53:31 +10:30
Christian Decker 5bd419d9fd doc: Document the featurebits functionality for plugins 2020-02-11 13:53:31 +10:30
ZmnSCPxj jxPCSnmZ e6c486f87c doc/lightning-listchannels.7.md: Fix factual errors.
Changelog-Fixed: Fixed factual errors in `lightning-listchannels.7` documentation.

`delay` is ***not*** the unilateral close delay for that channel-direction!
2020-02-10 15:57:55 +10:30
ZmnSCPxj jxPCSnmZ 6e34aa233a lightningd/: Hooks now support a consistent interface for 'no operation'.
Changelog-Changed: The hooks `db_write`, `invoice_payment`, and `rpc_command` now accept `{ "result": "continue" }` to mean "do default action", in addition to `true` (`db_write`), `{}` (`invoice_payment`), and `{"continue": true}` (`rpc_command`). The older "default" indicators are now deprecated and are now recognized only if `--deprecated-apis` is set.
2020-02-04 01:07:59 +00:00
Ken Sedgwick 5fd0ed79f4
lightningd: Added --subdaemon command to allow alternate subdaemons.
Changelog-Added: lightningd: Added --subdaemon command to allow alternate subdaemons.

[ Wow, that was mammoth; 44 comments over 12 commits. Feels almost unfair to squash it into one commit, so I wanted to note @ksedgwic's perseverence here! --RR ]
2020-02-04 10:44:13 +10:30
Vasil Dimov 149620ee0f build: fix and simplify doc/index.rst generation
* Fix usage of `echo "...\n..."` (without `-e`), generating a
broken output:
```
   lightningd-config <lightningd-config.5.md>
   lightningd\nlightning-autocleaninvoice.7.md <lightningd.8.md\nlightning-autocleaninvoice.7.md>
```

* Use `$(SORT)` instead of bare `sort` to avoid locale-dependent sort.

* Strip the trailing .[0-9].md without invoking sed.

* Sort all man pages as one block.

Changelog-None
2020-02-03 15:38:11 +00:00
ZmnSCPxj jxPCSnmZ 9346043f94 doc/PLUGINS.md: Mention `data_version` field of `db_write`, sketch how the backup plugin should work.
ChangeLog-Added: Fully documented `db_write` hooks in `doc/PLUGINS.md`.
2020-02-03 13:32:35 +01:00
ZmnSCPxj jxPCSnmZ fd76b8bfba doc/: Doc clarifications regarding connecting and funding.
ChangeLog-Fixed: Clarified about connection in documentation.  Also, `fundchannel`  already `connect`s if your node knows how to contact the desired peer for a few versions now, so clarify documentation about this as well.
2020-02-01 16:53:01 +01:00
Rusty Russell f3600d22a0 lightningd: disallow `msatoshi` arg to sendpay unless exact when non-MPP.
Using it with a different value to the amount sent causes a crash in 0.8.0,
which is effectively deprecating it, so let's disallow it now.

Changelog-Changed: If the optional `msatoshi` param to sendpay for non-MPP is set, it must be the exact amount sent to the final recipient.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-01-31 14:23:18 +01:00
Vasil Dimov 55173a56b7 Use dedicated type for error codes
Before this patch we used `int` for error codes. The problem with
`int` is that we try to pass it to/from wire and the size of `int` is
not defined by the standard. So a sender with 4-byte `int` would write
4 bytes to the wire and a receiver with 2-byte `int` (for example) would
read just 2 bytes from the wire.

To resolve this:

* Introduce an error code type with a known size:
  `typedef s32 errcode_t`.

* Change all error code macros to constants of type `errcode_t`.
  Constants also play better with gdb - it would visualize the name of
  the constant instead of the numeric value.

* Change all functions that take error codes to take the new type
  `errcode_t` instead of `int`.

* Introduce towire / fromwire functions to send / receive the newly added
  type `errcode_t` and use it instead of `towire_int()`.

In addition:

* Remove the now unneeded `towire_int()`.

* Replace a hardcoded error code `-2` with a new constant
  `INVOICE_EXPIRED_DURING_WAIT` (903).

Changelog-Changed: The waitinvoice command would now return error code 903 to designate that the invoice expired during wait, instead of the previous -2
2020-01-31 06:02:47 +00:00
Christian Decker 602b81fef2 doc: Add a section about the `custommsg` hook in the plugin doc 2020-01-28 23:50:52 +01:00
Christian Decker a3ddf9be9b docs: Add manpage for dev-sendcustommsg
It's a dev-* command for now, but better document it so people can use it
rather than having them guess how it's supposed to work.
2020-01-28 23:50:52 +01:00
ZmnSCPxj jxPCSnmZ 67590fc6be lightningd/invoice.c: Add `timeout` parameter to `waitanyinvoice`.
Fixes: #3192

Changelog-Added: `waitanyinvoice` now supports a `timeout` parameter, which when set will cause the command to fail when the timeout is reached; can set this to 0 to fail immediately if no new invoice has been paid yet.
2020-01-28 14:07:52 +01:00
ZmnSCPxj jxPCSnmZ 1e3fb8e750 doc/TOR.md: Mention about `statictor`.
Changelog-None
2020-01-28 13:46:33 +10:30
ZmnSCPxj jxPCSnmZ 7f4ed54b46 lightningd/jsonrpc.c: Set JSON-RPC socket permissions by command line.
Changelog-Added: Can now set the permissions on the JSON-RPC socket by `--rpc-file-mode`.
2020-01-27 21:11:57 +01:00
darosior f619124cb9 doc: update readthedocs index 2020-01-27 16:24:12 +00:00
darosior 6489e63991 doc/INSTALL: correct some typos
A double `git` and a `mode`.
2020-01-24 18:25:59 +01:00
ZmnSCPxj 54cc735201 lightningd/peer_control.c: Implement waitblockheight.
This is needed to fully implement handling of blockheight disagreements
between us and payee.
If payee believes the blockheight is higher than ours, then `pay`
should wait for our node to achieve that blockheight.

Changelog-Add: Implement `waitblockheight` to wait for a specific blockheight.
2020-01-21 22:23:21 +01:00
Vasil Dimov fc75d8a9e6 connectd: add own err codes instead of generic -1
Make it possible for connectd to send an error code to lightningd in
addition to the error message. Introduce two new error codes, replacing
the catch-all -1.

This change, together with
https://github.com/ElementsProject/lightning/pull/3395
will implement https://github.com/ElementsProject/lightning/issues/3366

Changelog-Changed: The `connect` command now returns its own error codes instead of a generic -1.
2020-01-21 16:59:18 +01:00
Vasil Dimov 3cf91b23b9 doc: unify man pages error sections
Change all man pages to follow the style of doc/lightning-pay.7.md for
the section on returning errors.

Changelog-None
2020-01-21 12:49:33 +08:00
Vasil Dimov 89466f0e55 doc: list the error codes of funding_* commands
Changelog-None
2020-01-21 12:49:33 +08:00
Vasil Dimov 3186215058 doc: update FreeBSD installation instructions
Now that c-lightning is in the FreeBSD ports system (\o/)
update the installation instructions, which basically boil down
to just `pkg install c-lightning`.

Changelog-None
2020-01-17 21:56:34 +01:00
fanquake 46f879d73f doc: openSSL is no longer required to build bitcoind
OpenSSL is no longer required after
https://github.com/bitcoin/bitcoin/pull/17265.

libsodium has never been required to build bitcoind on macOS.
2020-01-12 14:31:11 +01:00
Vasil Dimov 0ac91b4f99 doc: fix typo: s/these test/these tests/
Changelog-None
2020-01-06 12:57:59 +01:00
Vasil Dimov 50e7ecbe87 doc: add missing ":" in lightning-listpeers.7
Changelog-None
2020-01-06 12:57:59 +01:00
ZmnSCPxj ccece764f2 doc/lightningd.8.md: Fix formatting, remove old version.
Changelog-none
2020-01-05 03:00:47 +08:00
Rusty Russell c74fceb4c9 JSON RPC: invoice exposeprivatechannels can specify exact channels.
Changelog-Changed: JSON API: `invoice` `exposeprivatechannels` can specify exact channel candidates.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-01-04 08:07:22 +08:00
minidisk1147 f22595596a removed duplicate log-level subsystem 2020-01-02 16:40:24 +01:00
minidisk1147 1715b3d004 updated FreeBSD install instructions 2020-01-02 16:40:24 +01:00
Christian Decker b1e18e16a5 docs: Fix the `htlc_accepted` JSON payload in the docs
Had a spurious `}` in the example.
2020-01-02 16:05:52 +01:00
lisa neigut 689dd28ddd funding: enable push_msat
it's that time of year (merry xmas!)

enables the ability to push_msat on fundchannel

Changelog-Added: RPC: `fundchannel` and `fundchannel_start` can now accept an optional parameter, `push_msat`, which will gift that amount of satoshis to the peer at channel open.
2019-12-24 12:04:01 -06:00
Vasil Dimov b14b2b0490 doc: fix typos and minor rewording in doc/PLUGINS.md
Changelog-None
2019-12-17 23:21:51 +08:00
Vasil Dimov bf1f768a82 doc: fix the path to the sqlite database file
The sqlite database location has been changed in aab83e72.

Changelog-None
2019-12-16 15:31:42 +01:00
Vasil Dimov 1fe8cd8149 doc: fix typos in doc/TOR.md 2019-12-16 13:02:27 +01:00
Vasil Dimov 250fc79e93 doc: remove trailing whitespace from doc/TOR.md 2019-12-16 13:02:27 +01:00
Rusty Russell 839909d2cf Protocol: make var_onion, payment_secret and basic_mpp non-EXPERIMENTAL.
Thanks to @t-bast, who made this possible by interop testing with Eclair!

Changelog-Added: Protocol: can now send and receive TLV-style onion messages.
Changelog-Added: Protocol: can now send and receive BOLT11 payment_secrets.
Changelog-Added: Protocol: can now receive basic multi-part payments.
Changelog-Added: RPC: low-level commands sendpay and waitsendpay can now be used to manually send multi-part payments.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-12-12 22:16:03 +01:00
Vasil Dimov 38d88f1aff doc: fix commit-time formatting 2019-12-11 16:19:43 +01:00
darosior b4c18a10cf doc/lightningd-config: precise alias are 32 __bytes__ long.
And not 32 characters long, as a character (for example 🐨) can be 4
bytes long.

Reported-By: Vasil Dimov <@vasild>
2019-12-11 16:19:43 +01:00
darosior 2986854c88 doc/lightningd-config: correct misaligned RGB option paragraph 2019-12-11 16:19:43 +01:00
Rusty Russell f7ebbb2ec5 common: make sphinx code ignorant of payload format.
Now "raw_payload" is always the complete string (including realm or length
bytes at the front).

This has several effects:
1. We can receive an decrypt an onion which is grossly malformed.
2. We can still hand this to the htlc_accepted hook.
3. We then fail it unless the htlc_accepted accepts it manually.
4. The createonion API now takes the raw payload, and does not know
   anything about "style".

The only caveat is that the sphinx code needs to know the payload
length: we have a call for that, which simply tells it to copy the
entire onion (and treat us as the final node) if it's invalid.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-12-09 14:33:31 +01:00
Rusty Russell f8d8348c9f doc: add 'id' to rpc_command
It's required, so at least hint about its presence!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-12-08 15:26:28 +01:00
Rusty Russell 4683d096dd doc: feerate is not obvious, refer to fundchannel documentation:
It has a whole *two paragraphs* on it:

*feerate* is an optional feerate used for the opening transaction and as
initial feerate for commitment and HTLC transactions. It can be one of
the strings *urgent* (aim for next block), *normal* (next 4 blocks or
so) or *slow* (next 100 blocks or so) to use lightningd’s internal
estimates: *normal* is the default.

Otherwise, *feerate* is a number, with an optional suffix: *perkw* means
the number is interpreted as satoshi-per-kilosipa (weight), and *perkb*
means it is interpreted bitcoind-style as satoshi-per-kilobyte. Omitting
the suffix is equivalent to *perkb*.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-12-04 08:35:50 -06:00
Saibato b18510a7e3 Reflect the changes in documentation
Signed-off-by: Saibato <saibato.naga@pm.me>
2019-12-03 23:35:18 +01:00
fiatjaf 99ff86f6fe update docs with `payment_preimage`.
Changelog-Added: JSON-RPC: `listinvoices` now displays the payment preimage if the invoice was paid.
2019-12-03 01:16:07 +00:00
Christian Decker 21b5b59c8c json-rpc: Rename onion payload type to style
Suggested-by: Rusty Russell <@rustyrussell>
2019-12-01 15:40:47 +01:00
Christian Decker 2080416a89 doc: Add manpages for `createonion` and `sendonion`
Changelog-Added: Added `createonion` and `sendonion` JSON-RPC methods allowing the implementation of custom protocol extensions that are not directly implemented in c-lightning itself.
2019-12-01 15:40:47 +01:00
Michael Schmoock 895e06122c doc: adds pyln deps to command for running blackbox tests
This one got missing when introducting `pyln` packages as test dependencies.
2019-11-29 21:23:23 +01:00
Rusty Russell ebac3d2a85 spec: update to experimental BOLTs with secret/total_amount.
Also pulls in a new onion error (mpp_timeout).  We change our
route_step_decode_end() to always return the total_msat and optional
secret.

We check total_amount (to prohibit mpp), but we do nothing with
secret for now other than hand it to the htlc_accepted hook.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-24 23:33:17 +00:00
Rusty Russell a56f2b25b0 common: parse --allow-deprecated-apis extremely early.
We're going to want this for changing the default network.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-23 22:42:34 +00:00
Rusty Russell aab83e729b lightningd: change config-dir from plugin / wallet / hsm POV into <network> subdir
Changelog-changed: .lightningd plugins and files moved into <network>/ subdir
Changelog-changed: WARNING: If you don't have a config file, you now may need to specify the network to lightning-cli
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-23 22:42:34 +00:00
Rusty Russell dc23c308e4 config: Read both top-level and network-subdir config files.
This lets you have a default, but also a network-specific config.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-changed: Options: `config` and <network>/`config` read by default.
2019-11-23 22:42:34 +00:00
Rusty Russell 8b1aa3ef8b lightningd: move basic parameter parsing into common/configdir
lightning-cli is going to need to know what network we're on, so
it will need to parse the config files.  Move the code which does
the initial bootstrap parsing into common, as well as the config
file parsing core.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-23 22:42:34 +00:00
Rusty Russell 34c89cb226 config: Add include directive support.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: Config: configuration files now support `include`.
2019-11-23 22:42:34 +00:00
lisa neigut de16d0f0b4 openchannel hook: add new `close_to` field
Rounds out the application of `upfront_shutdown_script`, allowing
an accepting node to specify a close_to address.

Prior to this, only the opening node could specify one.

Changelog-Added: Plugins: Allow the 'accepter' to specify an upfront_shutdown_script for a channel via a `close_to` field in the openchannel hook result
2019-11-22 00:41:15 +00:00
Rusty Russell 709c98f539 logging: remove spaces from subsystem names.
Spaces just make life a little harder for everyone.

(Plus, fix documentation: it's 'jsonrpc' not 'json' subsystem).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-18 04:50:22 +00:00
Rusty Russell 0aad532db1 logging: add examples for logging.
As suggested by @cdecker, but also did a bit of minor reformatting.

I don't like the excessive indenting in our man pages though,
but that's a separate problem.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-18 04:50:22 +00:00
Rusty Russell 0607f998d1 options: allow --log-level <level>:<prefix> for finegrained log control.
This allows finegrained logging control of particular subdaemons or
subsystems.

To do this, we defer setting the logging levels for each log object
until after early argument parsing (since e.g. "bitcoind" log object
is created early).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-changed: Options: log-level can now specify different levels for different subsystems.
2019-11-18 04:50:22 +00:00
Rusty Russell b0a72a67e8 doc/lightningd-config.5.txt: remove
Replaced by doc/lightningd-config.5.md.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-18 04:50:22 +00:00
Rusty Russell c83834ca82 lightningd: expose/accept "style" parameter in routes.
Default is legacy.  If we have future styles, new strings can be defined,
but for now it's "tlv" or "legacy".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-14 10:15:33 +01:00
Rusty Russell 2a2259083a lightningd: handle tlv-style payloads.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-changed: JSON API: `htlc_accepted` hook has `type` (currently `legacy` or `tlv`) and other fields directly inside `onion`.
Changelog-deprecated: JSON API: `htlc_accepted` hook `per_hop_v0` object deprecated, as is `short_channel_id` for the final hop.
2019-11-14 10:15:33 +01:00
darosior 6427ccba50 Document the 'rpc_command' hook 2019-11-11 22:30:01 +01:00
darosior 5766231d98 pay: restore payment value randomization through shadow routing
When doing the random walk through the channel, we now add the fees
(both the base and the proportional one) for that channel in addition to
the cltv delta.

Changelog-Added: Payment amount fuzzing is restored, but through shadow routing.
2019-11-08 03:27:58 +00:00
Christian Decker 290b4d68b3 changelog: Add a tool to extract changelog entries from the commits
Since the `CHANGELOG.md` file is a major source for merge conflicts I decided
to build a tiny tool that generates the entries for the changelog
automatically from the commit messages.
2019-11-08 00:23:09 +00:00
lisa neigut 7374134dab doc: add reminder to close out Milestone to Making-Releases 2019-11-01 18:55:54 +01:00
lisa neigut 16fde5c79d releases: break up first git tag for verification purposes
I'm not sure what went wrong, but the first RC I cut had some trouble
with the tag being picked up with `git describe`, I think it was missing
a 'tag message'. I'm not sure what caused this.

This commit breaks up the first git tag procedure to have the releaser
verify that the tag command works as intended (and sensitizes them to
checking this for subsequent release cuts, if necessary)
2019-11-01 18:55:54 +01:00
lisa neigut c581fd9956 releases: update with niftynei's notes from release 0.7.3 2019-11-01 18:55:54 +01:00
arowser 67ce27aac7 remove repeat line in doc/requirements.txt 2019-10-29 12:18:45 -05:00
arowser cd894468e7 remove repeat install dependencies 2019-10-29 12:18:45 -05:00
Kristaps Kaupe e16ac08f6f Change order of paragraphs in manpage of fundchannel 2019-10-21 14:01:49 +02:00
lisa neigut 422b4502d3 funding: add RPC arg to specify a 'close_to' address
Takes advantage of upfront-shutdown-script to permit users to
specify the close-to address for a channel at open, by adding
a `close_to` field to `fundchannel_start`.

Note that this only is in effect if `fundchannel_start` returns
with `close_to` set -- otherwise, peer doesn't
support `option_upfront_shutdown_script`.
2019-10-15 19:10:05 +02:00
Rusty Russell ad48814746 doc: man pages for checkmessage and signmessage.
They're a little subtle, so let's spell out exactly what checkmessage
means.  In particular, we avoid discussing key derivation from a
signature, as it tends to get people (like me!) into trouble: we
describe it instead as iterating through every known node.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-10-14 18:58:44 -05:00
Rusty Russell bd55f6d940
common/features: only support a single feature bitset.
This is mainly an internal-only change, especially since we don't
offer any globalfeatures.

However, LND (as of next release) will offer global features, and also
expect option_static_remotekey to be a *global* feature.  So we send
our (merged) feature bitset as both global and local in init, and fold
those bitsets together when we get an init msg.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-10-11 02:52:04 +00:00
darosior a698395bf0 lightningd: '--encrypted-hsm', a new startup option
Add a new startup option which will, if set, prompt the user for a
password to derive a key from. This key will later be used to encrypt
and/or decrypt `hsm_secret`.

This was made a noarg option even if it would have been preferable to
let the user the choice of how to specify the password. Since we have
to chose, better to not let the password in the commands history.
2019-10-09 22:00:38 -05:00
trueptolemy e53d065230 doc: Update the doc about `destination` of `close` 2019-10-09 21:04:16 -05:00
trueptolemy e4cd5df06c doc: Use `amount` as the parameter name for `fundchannel` 2019-10-09 16:51:42 -05:00
trueptolemy 25583ffe37 doc: Use `amount` as the parameter name for `fundchannel` 2019-10-09 16:51:42 -05:00
trueptolemy c6a4bac8b6 Fix: Fix the doc of `txprepare`. Add the description of some parameters. 2019-10-09 16:51:42 -05:00
darosior 0d73777695 doc: update mrkd requirement 2019-10-05 03:25:12 +00:00
darosior 61c07bca45 doc: Document the changes to the 'plugin' command 2019-09-30 00:20:16 +00:00
darosior 2c43606895 doc: update mrkd version
The new tag includes @cdecker's modifications for better list handling
2019-09-29 14:06:40 +02:00
Saibato 32a1b782f3 Add lines in regard to enable-autotor-v2-mode flag to doc files
Signed-off-by: Saibato <saibato.naga@pm.me>
2019-09-28 00:31:02 +02:00
lambrosini 6999a4ce2d Remove the python-dev dependency which is useless in python3 2019-09-25 20:37:50 +02:00
lambrosini eb28268bd7 Install in the OS dependencies required to successfully install the python requirements 2019-09-25 20:37:50 +02:00
lambrosini 08573fbc4b Clone the repository before than installing requirements, which are specified in the repository 2019-09-25 20:37:50 +02:00
Christian Decker 5953a5051c cli: Add command line option to specify the wallet location
Will be demuxed into starting the selected DB backend in one of the next
commits. Defaults to the old database location.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-09-22 02:03:43 +00:00
fiatjaf 1d5bbc874a format JSON snippets with jq. 2019-09-21 19:41:43 +02:00
Rusty Russell fe66b53fb9 jsonrpc: add more fields to listfunds.
This avoids having to correlate with listpeers for the most pertinent
information.

This API predates plugins, otherwise we'd have listutxos and listpeers
and this would simply combine them appropriately.  Still, it exists so
there's little reason not to make it more friendly.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-09-19 01:03:09 +00:00
darosior 697b501132 doc: place lightningd manpages first in index.rst 2019-09-16 13:16:08 +02:00
Jacob Rapoport 6360ffb2ac fix macOS build & update docs 2019-09-16 05:08:42 +00:00
trueptolemy a795f5e600 doc: Update the document of `getroute`about excluding nodes 2019-09-16 12:22:06 +08:00
lisa neigut 5c70890efa rpc: add 'utxos' parameter to txprepare + withdraw
Allow a user to select the utxo set that will be added to a
transaction, via the `utxos` parameter. Optional.

Format for utxos should be of the form ["txid:vout","..."]
2019-09-11 23:56:27 +00:00
lisa neigut b1f05795a8 rpc: have fundchannel_start also return scriptpubkey
Easier to pass it back than dig it out of the address, since we
have it. Needed for extracting fundchannel
2019-09-11 23:56:27 +00:00
trueptolemy 264b3692fb doc: update the document of `fundchannel_cancel` 2019-09-11 17:04:14 -05:00
trueptolemy 3722d169ae doc: Add the description for 'sendpay_success' and 'sendpay_failure' notifications 2019-09-11 00:57:39 +00:00
darosior e52af0d1ea doc: Document the new dependency 2019-09-10 02:17:27 +00:00
darosior 0b0ad4c22d transition from status_trace() to status_debug 2019-09-10 02:02:51 +00:00
darosior d0fe0d658f doc: remove duplicate lines from index.rst 2019-09-08 15:59:04 +02:00
lisa neigut 6e991eaebb docs: add install line 2019-09-07 12:21:22 +02:00
trueptolemy d813dff3b4 doc: Update the document of `txprepare` 2019-09-05 16:05:36 -05:00
Michael Schmoock 76f27f47dc doc: HACKING - point out how to run the pylightning tests 2019-09-03 19:02:04 +02:00
darosior 0e2ec27576 doc/requirements.txt: update 'mrkd' dependency 2019-09-02 16:31:36 +02:00
Christian Decker c3254e6639 docs: Update manpages to be recognized correctly by mrkd
mrkd started enforcing the `name -- short description` style of top-level
headings somewhere, and was thus failing to build the man-pages. I swapped
the title and with the existing short description to make it work
again. `mrkd` will automatically infer the section from the filename so no
need to put it in the title as well.

In addition I removed the "last updated" lines at the bottom since they are
out of date at best, and misleading at the worst. If we want to keep them, I'd
suggest generating them from the commit that last touched them.
2019-09-02 16:31:36 +02:00
darosior 8f8e955421 Update installation instructions and Dockerfile
Get rid of the 'asciidoc' dependency, make developers also install 'doc/requirements.txt'
2019-08-30 00:34:11 +00:00
Christian Decker b77270fa46 docs: Add the title of the manpage to TOC and sort alphabetically
Fixes #2987
2019-08-29 14:56:24 +02:00
Rusty Russell dbc1ebe06a Makefile: fix race when checking manpages.
By not depending on plugins, we can call lightningd before plugins are
built, and not get all options:

    diff of command names vs manpage names:
    --- /dev/fd/63  2019-08-22 05:06:55.265659216 +0000
    +++ /dev/fd/62  2019-08-22 05:06:55.265659216 +0000
    @@ -3,6 +3,8 @@
     allow-deprecated-apis=
     always-use-proxy=
     announce-addr=
    +autocleaninvoice-cycle=
    +autocleaninvoice-expired-by=
     autolisten=
     bind-addr=
     bitcoin-cli=

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-28 04:04:28 +00:00
Damian Mee e4d0ef6e11 doc: fix wording for fundchannel_complete 2019-08-23 08:23:42 -07:00
darosior 529630a453 doc/Makefile: update readthedocs pages on doc-all
Stolen from @rustyrussell's #2928
2019-08-22 01:35:01 +00:00
darosior 77f34fad2b doc/Makefile: adapt 'check-manpages' to markdown 2019-08-22 01:35:01 +00:00
darosior 49be9b5545 doc/manpages: Add manpages to readthedocs 2019-08-22 01:35:01 +00:00
darosior d37a2d7c3e doc/manpages: regenerate manpages using markdown templates 2019-08-22 01:35:01 +00:00
darosior 76a4c5f287 doc/Makefile: Use mrkd to generate manpages 2019-08-22 01:35:01 +00:00
darosior 80927039e0 doc/manpages: replace asciidoc by markdown 2019-08-22 01:35:01 +00:00
darosior 3f29216f7b doc/Makefile: Add lightning-plugin manpage 2019-08-22 01:35:01 +00:00
Rusty Russell 04a57ae4af doc/MAKING-RELEASES.md: update.
1. These days we delete the [Unreleased] tag during rcs.
2. Make sure we test the release build process during rc1, since I
   screwed that up last release.
3. Add a section on rc2, etc.
4. Do final release via a github PR, since I screwed that up on the
   prior release.
5. Update `tools/build-release.sh` and instructions to show that we now
   make a reproducible build for Ubuntu 18.04 x86-64.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-19 03:43:13 +00:00
Rusty Russell 1bd1829a8e doc: update lightning-listforwards(7)
It didn't have the new payment_hash field in it, and needed updating to
list optional fields.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-15 03:12:56 +00:00
Rusty Russell ca28c30eff funding: don't allow funding new channels until we're synced.
This is probably worth preventing.

1. Our depth estimate would be inaccurate possibly leading to us
   timing out too early.
2. If we're not up-to-date our onchain funds are unknown.
3. We wouldn't be able to send or receive HTLCs until we're synced anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-10 22:09:09 +02:00
Christian Decker cc5f2dcae3 readme: First pass at homogenizing the readme a bit
We haven't touched the readme for quite some time, just randomly added to it,
and it's starting to show. This is my attempt at cleaning it up a bit (more to
come):

 - No longer discourage users from running on mainnet, we're way beyond that
   point.
 - No longer instruct users to build from source, when we have real binary
   releases, on the PPA, the releases page and the docker images.
 - Cut down on the docker specific instructions, they are taking a lot of room
   when only a minority will likely run them that way
 - Generally make the README more of a dispatch for more in-depth
   documentation rather than trying to address everything right on the
   front-page.
 - Add a bit of context about running on top of a pruned node

Signed-off-by: Christian Decker <decker.christian@gmail.com>


Header from folded patch 'fixup!_readme__first_pass_at_homogenizing_the_readme_a_bit.patch':

fixup! readme: First pass at homogenizing the readme a bit
2019-08-09 10:29:37 +00:00
Rusty Russell 83e654a106 close: change to a unilateraltimeout argument.
`close` takes two optional arguments: `force` and `timeout`.
`timeout` doesn't timeout the close (there's no way to do that), just
the JSON call.  `force` (default `false`) if set, means we unilaterally
close at the timeout, instead of just failing.

Timing out JSON calls is generally deprecated: that's the job of the
client.  And the semantics of this are confusing, even to me!  A
better API is a timeout which, if non-zero, is the time at which we
give up and unilaterally close.

The transition code is awkward, but we'll manage for the three
releases until we can remove it.

The new defaults are to unilaterally close after 48 hours.

Fixes: #2791
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-09 05:47:16 +00:00
Rene Pickhardt 1dd890825a doc: Document max-concurrent-htlcs option. 2019-08-09 05:45:06 +00:00
darosior f98ae2d1d3 Correct version regex in Makefile, add git as dependency 2019-08-09 02:49:45 +00:00
ZmnSCPxj 821832032d doc/lightningd.8.txt: Initial manpage for lightningd itself.
Closes: #1360
2019-08-09 02:36:59 +00:00
Rusty Russell bcff30bb3f fixup! doc: fix up documentation about when we move into lightning-dir. 2019-08-08 18:17:12 +08:00
Rusty Russell 202ab91234 doc: fix up documentation about when we move into lightning-dir.
And make sure that plugins know that they should not touch things
until their init call.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-08 18:17:12 +08:00
Rusty Russell fd63b8bf53 lightningd: chdir as soon as we know lightning dir.
This is easy since we did the option parsing cleanup, but it has the
effect that plugins are launched from the lightning-dir.  Now
we have dynamic plugins, this means startup and post-startup plugins
experience the same environment.

This is absolutely a desirable thing: they can just drop files in
their cwd rather than having to move (including, I might note, core
files!).

We also highlight the change in various places (and a drive-up update
of PLUGINS.md which says you have to use --plugin).

The next patch adds a backwards compatibility wedge for old users of
relative plugin paths.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-03 09:10:11 +00:00
trueptolemy 7b59431a6c doc: Add the description for 'forward_event' notification 2019-08-01 18:49:25 +08:00
Simon Vrouwe 1ae8b73f0e doc: invoice manpage: add some details about route hint selection
Also add more detail to the warnings returned by the invoice command.
2019-07-31 23:25:37 +00:00
Rusty Russell 488ef67b9b doc: fix typo in default port number.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-07-30 05:05:45 +00:00
Rusty Russell 310d806dd3 plugins: document and extend the ~/.lightning/plugins/ dir.
Load any plugins directly as well as subdirs.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-07-29 14:32:07 +02:00
Rusty Russell 9e5b9a31c9 FreeBSD: fix build.
This makes it build for me on FreeBSD 11:
1. $(MAKE) has to passed through into update-mocks.
2. FreeBSD sed doesn't turn \n into a newline on RHS.
3. Bash and mako dependencies were missing from INSTALL.md

Fixes: #2850
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-07-29 14:24:29 +02:00
darosior dda154612c doc: add the new init and getmanifest fields 2019-07-28 07:24:04 +00:00
darosior e61e0cc28b Add a manpage for the 'plugin' command 2019-07-28 07:24:04 +00:00
Rusty Russell 6da420a65b lightning-cli: change default printing in response to "format-hint": "simple".
And set it for 'help <command>'.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-07-28 06:09:56 +00:00
darosior 2683170da8 Test and document 'channel_opened' notification 2019-07-27 12:18:25 +02:00
Kristaps Kaupe d02496b89b Return output idx for a funding tx in a channel information in listfunds 2019-07-26 06:25:13 +08:00
darosior 5dee59e969 Plugins: update the doc and add a changelog bragline about 'invoice_payment' notification 2019-07-25 11:19:47 +08:00
sskender 2235d3b9d7 Update INSTALL.md
Missing dependency for Ubuntu 18.04
2019-07-25 07:54:38 +08:00
lisa neigut 068496298c bolt-gen: rm unused bolt-generator; rename new bolt generator
delete now unused wire-generator and replace it with the newer
version.
2019-07-24 06:31:46 +00:00
Karl-Johan Alm 918e130448 add signet support 2019-07-22 16:38:32 -05:00
ZmnSCPxj bb301040e4 lightningd/options.c: Add option for setting how long to keep trying bitcoin-cli command. 2019-07-18 18:59:11 +02:00
Kristaps Kaupe 868bde5e00 Add missing return fields to the manpage of listforwards 2019-07-18 04:50:00 +00:00
darosior 7984a55339 doc: Add hooks to the 'getmanifest' example in PLUGINS.md 2019-07-17 20:16:08 -05:00
lisa neigut 5c07afac7d bolt: update to BOLT spec changes (extract format + type specifications)
updates the bolt version to 6639cef095a2ecc7b8f0c48c6e7f2f906fbfbc58.

this requires us to use the new bolt parser at generate-bolt.py
and updates to all of the type specifications (ie. from u8 -> byte)
2019-07-16 06:10:58 +00:00
Juraj Bednar ab52638f93 Fix typos and options
--proxy= instead of --proxy:
--always-use-proxy needs value (true)
2019-07-15 01:00:57 +00:00
lisa neigut 7046d0220c makefiles: move all unit tests under `make check-units`
Isolate unit tests under their own make directive.
2019-06-30 16:41:30 +09:30
darosior da676baac4 plugins doc: remove the 'only string options' warning
int and bool are now also accepted ! :)
2019-06-17 10:25:30 +00:00
darosior 8edf55b34a doc: Correct preimage field name in pay return value 2019-06-15 10:49:29 +02:00
lisa neigut c0475d0d9d doc: add manpages for fundchannel_[start,complete,cancel]
Manpages for the manpage-god!!
2019-06-12 02:22:43 +00:00
darosior 1b29b063b2 fundchannel: Update the manpage and Pylightning's method
Add the new 'utxo' parameter to both
2019-06-11 23:24:07 +00:00
Rusty Russell b48c644e7a listchannels: add `htlc_minimum_msat` and `htlc_maximum_msat` fields.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-06-11 23:19:11 +00:00
Rusty Russell 0e7b26d7c7 devtools/credit: script to highlight contributions for this commit.
And update MAKING-RELEASES.md to refer to it

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-06-07 13:37:58 +02:00
trueptolemy 1ca0eef744 doc: Add the description for 'warning' notification and add a CHANGELOG entry 2019-06-07 01:23:51 +00:00
Rusty Russell 985048edf8 wallet: new commands 'txprepare', 'txsend' and 'txdiscard'.
This allows you to prepare a tx, then release or discard it later.

Shares almost all the code with json_withdraw (which is now technically
superfluous).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-06-06 04:47:44 +00:00
Christian Decker a57fdf2033 plugin: Added CHANGELOG entry and docs for the htlc_accepted hook
Signed-off-by: Christian Decker <@cdecker>
2019-06-04 00:27:15 +00:00
Rene Pickhardt 22600faed7 manually added a list-forward manpage because I have no idea how a2x works 2019-05-27 17:35:06 +02:00
Kristaps Kaupe 441c571650 Better describe "urgent", "normal" and "slow" feerates 2019-05-25 23:48:37 +00:00
ZmnSCPxj bbec8f62e0 doc/lightning-pay.7.txt: Remove references to value randomization, since it is no longer implemented, and describe shadow routes.
Fixes: #2659

Value randomization is not implemented since `pay` was made into a plugin.
Nobody has been asking for it, so do not implement it and just remove
from documentation.

Shadow routes is implemented, and not describe, so describe it now.
2019-05-24 19:08:19 +02:00
Rusty Russell 5506924f2f pay: update documentation.
Reported-by: @ZmnSCPxj
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-05-22 04:32:34 +00:00
Rusty Russell 8b2a84a0c7 plugins: don't hand empty strings for unset options.
This was deeply surprising to me; there's a difference between a value not being
specified, and it being specified as "".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-05-22 00:18:29 +02:00
Rusty Russell e5b5f1d7e5 openingd: add openchannel hook.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-05-20 20:31:07 -04:00
darosior 7e7358ec1e Doc: update 'waitsendpay' manpage
We no longer disable a channel on routing error.
2019-05-19 20:03:05 +02:00
darosior 182556cfda Updated 'listfunds' doc and manpage 2019-05-10 02:06:50 +00:00
Rusty Russell e51a13975f Makefile: don't generate CSVs unless explicitly told to.
ANd rename them: every other "gen" file can be discarded and rebuilt.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-05-02 01:20:41 +00:00
GreenAddress fb07265663 remove libbase58, use base58 from libwally (#2594)
* remove libbase58, use base58 from libwally

This removes libbase58 and uses libwally instead.

It allocates and then frees some memory, we may want to
add a function in wally that doesn't or override
wally_operations to use tal.

Signed-off-by: Lawrence Nahum lawrence@greenaddress.it
2019-04-30 23:07:31 +02:00
Christian Decker f82e779f71 check: Run `check-manpages` in /tmp/ instead of the user config
If we have plugins configured in the default config location, then
`check-manpages` may fail due to plugin cli options being added to the
`--help` output.
2019-04-25 21:16:37 -05:00
Rusty Russell 7f7ad4f89f connected_hook: allow hook to specify an error message.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-23 15:26:42 +02:00
Michael Schmoock 05b1b3f488 doc: adds capacity default values to manpage
- also adds CHANGELOG
- Cleanup: also add defaults for channel fees to manpage
2019-04-16 15:01:28 -07:00
Rusty Russell 43d07aaed2 lightningd: implement invoice hook.
This also allows plugins to do "hold invoices" a-la LND, useful for
just-in-time inventory handling.

We're careful to handle the invoice getting paid behind our backs, and
the incoming HTLC going away.

Once @cdecker's sphinx rework is in, we can also hand the raw payload
to the invoice_payment_hook, for special effects.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-12 03:32:48 +00:00
Rusty Russell ba41238df9 invoice: allow suffixes.
Makes it much easier to set it to 6 hours, for example.

Fixes: #2551
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-10 20:03:39 -07:00
Rusty Russell 1d6584e733 invoice: change default expiry to 7 days.
For online services, shorter may be fine, but for casual use I'm usually
in a different timezone than the payer, so needs to be at least 1 day.

Certainly 1 hr is short if they have to open a channel.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-10 20:03:39 -07:00
Rusty Russell 5009d628a3 lightning-cli: do pretty-printing.
Plugins don't do it right anyway, and we're about to remove it from
lightningd.  Produces same format as json_pp.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-09 12:37:16 -07:00
Michael Schmoock 0fc9368167 doc: commandline switch min-capacity-sat 2019-04-09 13:20:52 +02:00
darosior b60b09a2ca Update 'withdraw' and 'fundchannel' calls documentation 2019-04-08 21:56:52 +02:00
Rusty Russell ae614c2e96 doc: document the current limitations of the db_write hook.
In theory we could allow a db_write-using plugin to have other
hooks/commands by embargoing their other responses until the exclusive
period is over.  That would be nice for a 'dbmirrorinfo' command, for
example.

The other option would be to *always* go exclusive on a db_write-using
plugin, so responses can never get intermingled.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-08 01:56:17 +00:00
andrewtoth 90f9985dd2 Update disconnect manpage 2019-04-04 15:13:47 +02:00
Jeff Vandrew Jr 02ddeed2a7 Clean Up Case #5 in Tor Documentation
Case 5 in the Tor documentation currently states that if you use `--bind-addr=autotor:127.0.0.1:9051`, you can get your onion address by running `lightning-cli getinfo`. I have not found that to be the case; with that flag no onion address will be generated.

On the other hand, if `--addr=autotor:127.0.0.1:9051` is used instead, an onion address is generated and `lightning-cli getinfo` behaves as the docs say.
2019-03-29 20:05:04 -07:00
andrewtoth 938addfba8 Cleanup tor doc 2019-03-25 18:52:31 +01:00
Michael Schmoock f1add556d6 doc: setchannelfee 'all' feature 2019-03-19 00:14:09 +00:00
Rusty Russell 2af3996bea doc: document explicitly that you can use prefixes for setchannelfee 'base'
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-03-16 03:02:34 +00:00
Michael Schmoock c7ab5102ba doc: adds manpage and changelog 2019-03-15 02:48:18 +00:00
Rusty Russell 435843acfa doc: document UNIX domain sockets in lightning-connect.
We document how to bind to them, just not how to connect to them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

1diff --git a/doc/lightning-connect.7 b/doc/lightning-connect.7
index f143563ca..53619c44f 100644
2019-03-14 15:05:56 +01:00
Rusty Russell 3e67c09d5e newaddr: support getting both bech32 and p2sh addresses.
Higher layers consume less addresses this way.

Fixes: #2390
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-03-04 15:11:20 +01:00
Rusty Russell 1da8e498c0 doc: fill in parameters in getroute manpage.
Fixes: #2419
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-03-01 06:20:58 +00:00
Rusty Russell a988ed70b9 doc/REPRODUCIBLE.md: describe to do reproducible builds.
This is a separate commit, as it describes the results (as sha256sum)
of doing a test on the previous commit.  Obviously these values will
have to updated after a rebase!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-03-01 03:48:04 +00:00
Rusty Russell 1dcc482350 Update CHANGELOG.md for -rc2.
And fix trivial typo in MAKING-RELEASES.md, and date retreival in
build-release.sh and repro-build.sh (real git tags start with v!)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-26 04:16:34 +00:00
Rusty Russell ce5d61be32 CHANGELOG.md: order into user impact and coolness, while maintaining sections.
Add the one 'Changelog-fixed' entry from a405c22fc9,
and reorder a bit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-23 10:19:33 +00:00
Rusty Russell 203ef2ed0b listsendpays: updated version of listpayments.
New name is less confusing, and most people should be transitioning to
listpays rather than this anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-23 05:45:25 +00:00
Rusty Russell 56dfbec6bd listpays: new command to summarize pay commands.
This is to future-proof against multi-part-payments: the low-level commands
will start returning multiple results once we have that, so prepare
transition plan now.

Closes: #2372
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-23 05:45:25 +00:00
Rusty Russell e0605466bf doc: update listpayments man page to match current semantics.
It didn't show the optional parameters, and the output fields were
obsolete.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-23 05:45:25 +00:00
Rusty Russell 1ec959752b plugin/pay: rename 'description' to 'label', deprecate 'description'.
This is the same deprecation, but one level up.  For the moment, we
still support invoices with a `h` field (where description will be
necessary) but that will be removed once this option is removed.

Note that I just changed pylightning without backwards compatibility,
since the field was unlikely to be used, but we could do something
more complex here?

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-23 05:45:25 +00:00
Rusty Russell 919f390a93 sendpay: rename 'description' to 'label'.
This field was used by `pay` to hold the bolt11 description if the bolt11
string used `h` to hash the description (which nobody ever did).  If the
`h` field wasn't present, it could contain anything, as it wasn't checked.

It's really useful to have a label for payments (eg. '1 Cuban'), but adding
yet-another option would be painful, so we simply rename 'description'
to 'label' except inside the db.

This means we need to do some tricky parameter parsing to handle array
and keyword JSON arguments, but only until we remove the old name.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-23 05:45:25 +00:00
Rusty Russell 5e14274f41 sendpay: provide 'bolt11' parameter.
Without this, there's no proof of payment, since it is the signed invoice
that make the receipt valid.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-23 05:45:25 +00:00