Compare commits

...

31 Commits

Author SHA1 Message Date
Christian Decker 0389cd9365 docker: Fix v0.12.1 release dockerfile 2022-10-13 12:16:40 +02:00
niftynei 4e87e100e8
Changelog for v0.12.1 2022-09-21 21:44:55 -05:00
niftynei b381da6a2e
pyln: update to v0.12.1 2022-09-21 21:44:54 -05:00
Rusty Russell 838400c702
libplugin: handle JSON reply after command freed.
This can happen, and in fact does below in our test_autoclean_once
test where we update the datastore, and return from the cmd.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-21 21:44:54 -05:00
Rusty Russell 4249c6176a
libplugin: forget pending requests if associated command freed.
This is usually fine, but without this, commando (another branch!) has
a race:

1. A command has multiple parts.
2. We start sending them out.
3. We get a response, which completes the cmd.
4. We go to send the next one out, but it's been freed.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-21 21:44:54 -05:00
Rusty Russell 1781fad8b8
contrib/pyln-client: allow lightningd to give us non-numeric ids.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-21 21:44:53 -05:00
niftynei 8055a2228a
build-release: configure before submodcheck
We added a submod dep (lowdown) that requires config to run first.
2022-09-21 20:49:56 -05:00
Michael Schmoock e1290b496b
peer_control: getinfo show correct port on discovered IPs
Changelog-Fixed: peer_control: getinfo shows the correct port on discovered IPs
2022-09-19 17:02:41 -05:00
Michael Schmoock 9f4dba14dc
cleanup: fix mixed indentation of json_getinfo
This one got badly messed up over time. I know we usually don't fix
these to have easier git-bisect. I can remove this commit if required.
2022-09-19 17:02:41 -05:00
Michael Schmoock 095f65043a
peer_control: fix getinfo showing unannounced addr
Currently discovered IPs are only announced when we don't have any
usable addresses detected or configured already. However, the cli
command `getinfo` still showed theses unannounced addr as if they
were announced.

Changelog-Fixed: peer_control: getinfo showing unannounced addresses.
2022-09-19 17:02:40 -05:00
Dustin Dettmer 2853da1715
connectd+: Flake/race fix for new channels
1) dualopen has fd to connectd
2) channeld needs to take over
3) dualopen passes fd that leads to a connectd over for channeld to use
4) lightningd must receive the fd transfer request and process
5) dualopen shuts down and closes everything it owns

4 & 5 end up in a race. If 5 happens before 4, channeld ends up with an invalid fd for connectd — leaving it in a position to not receive messages.

Lingering for a second makes 4 win the race. Since the daemon is closing anyway, waiting for a second should be alright.

Changelog-Fixed: Fixed a condition for newly created channels that could trigger a need for reconnect.
2022-09-18 10:03:47 -05:00
Rusty Russell 7b506d573a
gossmap: don't crash if we see a duplicate channel_announce.
Apparently we had two private channel announcements (the !private assert
failed).  While this shouldn't happen, don't crash because of it.

Fixes: #5578
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: Plugins: topology plugin could crash when it sees duplicate private channel announcements.
2022-09-14 14:05:36 -05:00
Alex Myers 1cd6e1d41f
gossip_store: fix offset error
The gossip_store version byte was unaccounted for in the initial traversal
of gossip_store_end. This lead to an offset and a bogus message length
field. As a result, an early portion of the gossip_store could have been
skipped, potentially leading to gossip propagation issues downstream.

Fixes #5572 #5565

Changelog-fixed: proper gossip_store operation may resolve some previous gossip propagation issues
2022-09-14 14:05:35 -05:00
niftynei 0a4c030b6f
bkpr-test: maybe fix race in test_bookkeeping_closing_trimmed_htlcs
test_bookkeeping_closing_trimmed_htlcs fails to find 'all outputs
resolved' occassionally, seems like it's because the
OUR_DELAYED_TO_WALLET doesn't make it into the mempool before we start
mining blocks?

So here make sure there's something in the mempool before before we
start making new blocks.
2022-09-14 14:05:35 -05:00
niftynei c83b9a2987
bkpr: confirm that replaying the open+lock-in txs at start is ok
Make sure that we're not issuing duplicate lease_fee events!
2022-09-14 14:05:35 -05:00
niftynei 52f1938c57
bkpr: migration to delete any duplicate lease_fee entries
Clean up for #5557.

If you've got duplicate 'lease_fee' entries, we delete them!
2022-09-14 14:05:34 -05:00
niftynei af41c7c883
notif: dont send balance snapshot for not yet opened channel
We were double counting channel lease fees because we were double firing
the channel open event sequence (so to speak). If we don't report
balances for unopened channels, we don't have this problem?

Changelog-Changed: Plugins: `balance_snapshot` notification does not send balances for channels that aren't locked-in/opened yet
2022-09-14 14:05:34 -05:00
niftynei b2708cfe36
bkpr: failing test for bookkeeper crash
Reproduce crash for #5557!

If we record the channel open because bookkeeper was added after the
channel open request started but the channel confirms later, we end up
with re-recording any associated push or leased fees (paid or rcvd).

In the case where you've paid for these fees, your channel balance goes
negative and the node crashes the next time you call `listbalances`.

Reported-by: @chrisguida
2022-09-14 14:05:34 -05:00
niftynei 7cb754cb02
builds: cleanup duplicate and unused code, fix spelling
Few extremely minor updates to the ubuntu dockerfile and ci builds
2022-09-13 12:30:49 -05:00
niftynei 6285110c75
build: use ubuntu 22.04 LTS
Requires us to update to latest lnproto which is now using the most up
to date python-bitcoinlib, as well as updating our python lock files
(which pin the grpcio deps, because of locking problems h/t @cdecker)
2022-09-13 12:30:38 -05:00
Rusty Russell 3763c5007b
connectd: better diagnostics on invalid gossip_store entries.
Should help diagnose https://github.com/ElementsProject/lightning/issues/5572
which hit the invalid csum on a >64MB entry, if it happens again.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-13 12:30:28 -05:00
Rusty Russell 67b75b1f59
doc: document that we can build lowdown, remove from Alpine.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-13 12:30:21 -05:00
Rusty Russell 5c8edadcc6
external: build lowdown if not already found.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-13 12:30:13 -05:00
Rusty Russell db1cd3bd58
external/lowdown: local import of lowdown source.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-13 12:30:01 -05:00
Rusty Russell 2536fd5b21
doc: always escape underscores in property names
If there's only a single underscore, lowdown ignores it, but if there are multiple
(see min_final_cltv_expiry) it decides we're trying to highlight part of the word.

Reported-by: @wtogami
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-13 12:29:55 -05:00
Rusty Russell 0145e8ecec
Makefile: Revert ba7d4a8f6b (make-schema: don't include tools/fromschema.py in SHASUMS)
1. If the tool changes, you need to regenerate since the output may
   change.

2. This didn't just filter that out, ignored all but the first
   dependency, which made bisecting the bookkeeper plugin a nightmare:
   it didn't regenerate the .po file, causing random crashes.

If we want this, try $(filter-out tools/fromschema.py) instead.  But I
don't think we want that.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-13 12:29:46 -05:00
Rusty Russell 9ce6b6ce85
doc: generate correct markdown from schemas.
You can't start a list without a paragraph separator.

```diff
 --- /tmp/before	2022-07-20 22:02:23.485372596 +0930
 +++ /tmp/after	2022-07-20 22:02:33.745528456 +0930
 @@ -21,12 +21,16 @@
         On startup of the daemon, no autoclean is set up.
  
  RETURN VALUE
 -       On success, an object is returned,  containing:  -  enabled  (boolean):
 -       whether invoice autocleaning is active
 +       On success, an object is returned, containing:
  
 -       If enabled is true: - expired_by (u64): how long an invoice must be ex‐
 -       pired (seconds) before we delete it - cycle_seconds (u64): how long  an
 -       invoice must be expired (seconds) before we delete it
 +       • enabled (boolean): whether invoice autocleaning is active
 +
 +       If enabled is true:
 +
 +       • expired_by (u64): how long an invoice must be expired  (seconds)  be‐
 +         fore we delete it
 +       • cycle_seconds  (u64):  how  long an invoice must be expired (seconds)
 +         before we delete it
  
  AUTHOR
         ZmnSCPxj <ZmnSCPxj@protonmail.com> is mainly responsible.
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-13 12:29:32 -05:00
Rusty Russell 237d16fdbf
doc: format markdown correctly.
There are no definition lists in Markdown, and lists get mangled if
they follow immediately: they need a line between them.

So use bullets for options, and use an indent so the text gets in the
line below.

Here's a before-and-after example:

```diff
 --- /tmp/after	2022-07-20 21:55:54.355487769 +0930
 +++ /tmp/after2	2022-07-20 21:58:17.305642576 +0930
 @@ -10,38 +10,71 @@
         lightning-cli sends commands to the lightning daemon.

  OPTIONS
 -       --lightning-dir=DIR Set the directory for the lightning daemon we're talking to; defaults to $HOME/.lightning.
 +       • --lightning-dir=DIR

 -       --conf=PATH Sets configuration file (default: lightning-dir/config ).
 +         Set the directory for the lightning daemon we're talking to; defaults to $HOME/.lightning.

 -       --network=network --mainnet --testnet --signet Sets network explicitly.
 +       • --conf=PATH

 -       --rpc-file=FILE Named pipe to use to talk to lightning daemon: default is lightning-rpc in the lightning directory.
 +         Sets configuration file (default: lightning-dir/config ).

 -       --keywords/-k Use format key=value for parameters in any order
 +       • --network=network

 -       --order/-o Follow strictly the order of parameters for the command
 +       • --mainnet

 -       --json/-J Return result in JSON format (default unless help command, or result contains a format-hint field).
 +       • --testnet

 -       --raw/-R Return raw JSON directly as lightningd replies; this can be faster for large requests.
 +       • --signet

 -       --human-readable/-H Return result in human-readable output.
 +         Sets network explicitly.

 -       --flat/-F  Return  JSON result in flattened one-per-line output, e.g. { "help": [ { "command": "check" } ] } would become
 +       • --rpc-file=FILE
 +
 +         Named pipe to use to talk to lightning daemon: default is lightning-rpc in the lightning directory.
 +
 +       • --keywords/-k
 +
 +         Use format key=value for parameters in any order
 +
 +       • --order/-o
 +
 +         Follow strictly the order of parameters for the command
 +
 +       • --json/-J
 +
 +         Return result in JSON format (default unless help command, or result contains a format-hint field).
 +
 +       • --raw/-R
 +
 +         Return raw JSON directly as lightningd replies; this can be faster for large requests.
 +
 +       • --human-readable/-H
 +
 +         Return result in human-readable output.
 +
 +       • --flat/-F
 +
 +         Return  JSON  result  in  flattened  one-per-line  output,  e.g.  {  "help":  [ { "command": "check" } ] } would become
         help[0].command=check.  This is useful for simple scripts which want to find a  specific  output  field  without  parsing
         JSON.

 -       --notifications/-N=LEVEL  If  LEVEL is 'none', then never print out notifications.  Otherwise, print out notifications of
 -       LEVEL or above (one of io, debug, info (the default), unusual or broken: they are prefixed with # .
 +       • --notifications/-N=LEVEL
 +
 +         If  LEVEL  is 'none', then never print out notifications.  Otherwise, print out notifications of LEVEL or above (one of
 +         io, debug, info (the default), unusual or broken: they are prefixed with # .
 +
 +       • --help/-h
 +
 +         Pretty-print summary of options to standard output and exit.  The format can be changed using -F, -R, -J, -H etc.
 +
 +       • --version/-V

 -       --help/-h Pretty-print summary of options to standard output and exit.  The format can be changed using -F,  -R,  -J,  -H
 -       etc.
 +         Print version number to standard output and exit.

 -       --version/-V Print version number to standard output and exit.
 +       • allow-deprecated-apis=BOOL

 -       allow-deprecated-apis=BOOL Enable deprecated options. It defaults to true, but you should set it to false when testing to
 -       ensure that an upgrade won't break your configuration.
 +         Enable deprecated options. It defaults to true, but you should set it to false when testing to ensure that  an  upgrade
 +         won't break your configuration.

  COMMANDS
         lightning-cli simply uses the JSON RPC interface to talk to lightningd, and prints the results. Thus the commands  avail‐
 @@ -60,13 +93,13 @@
         this is not encouraged.

  EXAMPLES
 -       1.     List commands
 +       1.     List commands:

 -       lightning-cli help
 +              • lightning-cli help

 -       2.     Fund a 10k sat channel using uncomfirmed outputs
 +       2.     Fund a 10k sat channel using uncomfirmed outputs:

 -       lightning-cli --keywords fundchannel id=028f...ae7d amount=10000sat minconf=0
 +              • lightning-cli --keywords fundchannel id=028f...ae7d amount=10000sat minconf=0

  BUGS
         This manpage documents how it should work, not how it does work. The pretty printing of results isn't pretty.
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-13 12:29:20 -05:00
Rusty Russell 76b57a221d
Makefile: replace mrkd with lowdown(1).
Here's the before-vs-after comparison (ignoring whitespace changes):

```diff
 --- /tmp/before	2022-07-20 21:52:44.336641810 +0930
 +++ /tmp/after	2022-07-20 21:55:54.355487769 +0930
 @@ -1,7 +1,7 @@
 -LIGHTNING-CLI(1)                                          lightning-cli                                         LIGHTNING-CLI(1)
 +LIGHTNING-CLI(1)                                                                                                LIGHTNING-CLI(1)
  
  NAME
 -       lightning-cli - Control lightning daemon
 +       lightning-cli -- Control lightning daemon
  
  SYNOPSIS
         lightning-cli [OPTIONS] command
 @@ -14,10 +14,7 @@
  
          --conf=PATH Sets configuration file (default: lightning-dir/config ).
  
 -        --network=network
 -        --mainnet
 -        --testnet
 -        --signet Sets network explicitly.
 +       --network=network --mainnet --testnet --signet Sets network explicitly.
  
          --rpc-file=FILE Named pipe to use to talk to lightning daemon: default is lightning-rpc in the lightning directory.
  
 @@ -43,8 +40,8 @@
  
          --version/-V Print version number to standard output and exit.
  
 -        allow-deprecated-apis=BOOL  Enable  deprecated options. It defaults to true, but you should set it to false when testing
 -       to ensure that an upgrade won't break your configuration.
 +       allow-deprecated-apis=BOOL Enable deprecated options. It defaults to true, but you should set it to false when testing to
 +       ensure that an upgrade won't break your configuration.
  
  COMMANDS
         lightning-cli simply uses the JSON RPC interface to talk to lightningd, and prints the results. Thus the commands  avail‐
 @@ -67,7 +64,7 @@
  
         lightning-cli help
  
 -              1.     Fund a 10k sat channel using uncomfirmed outputs
 +       2.     Fund a 10k sat channel using uncomfirmed outputs
  
         lightning-cli --keywords fundchannel id=028f...ae7d amount=10000sat minconf=0
  
 @@ -84,4 +81,4 @@
         Note: the modules in the ccan/ directory have their own licenses, but the rest of the code is covered  by  the  BSD-style
         MIT license.
  
 -                                                                                                                LIGHTNING-CLI(1)
 +Core Lightning v0.11.0.1-350-gac2e137                                                                           LIGHTNING-CLI(1)
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Fixes: #5437
2022-09-13 12:29:06 -05:00
Rusty Russell 5865fce831
tools: add md2man.sh tool, using lowdown.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-13 12:28:57 -05:00
Alex Myers 0798a5dab0
pytest: Add debugging to test_gossip_store_compact_on_load
This flake has been difficult to reproduce, so let's dump the gossip
store to aid in debugging. See issue #5410.

Changelog-None
2022-09-13 12:27:33 -05:00
135 changed files with 1652 additions and 1533 deletions

View File

@ -99,7 +99,7 @@ jobs:
proto-test:
name: Protocol Test Config
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
timeout-minutes: 300
needs: [smoke-test]
strategy:
@ -122,7 +122,7 @@ jobs:
-e VALGRIND=${{ matrix.valgrind }} \
-e DEVELOPER=1 \
-e EXPERIMENTAL_FEATURES=1 \
-e COMPA=0 \
-e COMPAT=0 \
-e PYTEST_PAR=2 \
-e PYTEST_OPTS="--timeout=300" \
-e TEST_CMD="make check-protos" \

7
.gitmodules vendored
View File

@ -16,4 +16,9 @@
url = https://github.com/valyala/gheap
[submodule "external/lnprototest"]
path = external/lnprototest
url = https://github.com/rustyrussell/lnprototest.git
url = https://github.com/niftynei/lnprototest.git
branch = nifty/ripemd160-fallback
[submodule "external/lowdown"]
path = external/lowdown
url = https://github.com/kristapsdz/lowdown.git
ignore = dirty

View File

@ -8,6 +8,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
TODO: Insert version codename, and username of the contributor that named the release.
-->
## [0.12.1] - 2022-09-13: Web-8 init (dot one)
Point release with some bugfixes and patches.
### Added
None
### Changed
None
### Deprecated
None
### Removed
- build: `mrkd` and `mistune` not required to build project
### Fixed
- lnprototest: builds for lnprototest tests now use 22.04 LTS, which fixes a problem with loading `mako`. ([#5583])
- Plugins: topology plugin could crash when it sees duplicate private channel announcements ([#5593])
- connectd: proper `gossip_store` operation may resolve some previous gossip propagation issues and connectd crashes ([#5591])
- connectd: Fixed a condition for newly created channels that could trigger a need for reconnect. ([#5601])
- `peer_control`: getinfo showing unannounced addresses. ([#5584])
- `peer_control`: getinfo shows the correct port on discovered IPs ([#5585])
[#5583]: https://github.com/ElementsProject/lightning/pull/5583
[#5584]: https://github.com/ElementsProject/lightning/pull/5584
[#5585]: https://github.com/ElementsProject/lightning/pull/5585
[#5593]: https://github.com/ElementsProject/lightning/pull/5593
[#5591]: https://github.com/ElementsProject/lightning/pull/5591
[#5601]: https://github.com/ElementsProject/lightning/pull/5601
## [0.12.0] - 2022-08-23: Web-8 init
This release named by @adi2011.
@ -1863,6 +1901,7 @@ There predate the BOLT specifications, and are only of vague historic interest:
6. [0.5.1] - 2016-10-21
7. [0.5.2] - 2016-11-21: "Bitcoin Savings & Trust Daily Interest II"
[0.12.1]: https://github.com/ElementsProject/lightning/releases/tag/v0.12.1
[0.12.0]: https://github.com/ElementsProject/lightning/releases/tag/v0.12.0
[0.11.2]: https://github.com/ElementsProject/lightning/releases/tag/v0.11.2
[0.11.1]: https://github.com/ElementsProject/lightning/releases/tag/v0.11.1

View File

@ -106,8 +106,8 @@ ENV PYTHON_VERSION=3
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python3 - \
&& pip3 install -U pip \
&& pip3 install -U wheel \
&& /root/.local/bin/poetry config virtualenvs.create false \
&& /root/.local/bin/poetry install
&& /root/.local/bin/poetry export --without-hashes -o requirements.txt \
&& pip3 install -r requirements.txt
RUN ./configure --prefix=/tmp/lightning_install --enable-static && make -j3 DEVELOPER=${DEVELOPER} && make install

View File

@ -317,19 +317,13 @@ endif
ifeq ($(SUPPRESS_GENERATION),1)
SHA256STAMP_CHANGED = false
SHA256STAMP = exit 1
SHA256STAMP_CHANGED_ALL = false
SHA256STAMP_ALL = exit 1
else
# Git doesn't maintain timestamps, so we only regen if sources actually changed:
# We place the SHA inside some generated files so we can tell if they need updating.
# Usage: $(call SHA256STAMP_CHANGED)
SHA256STAMP_CHANGED = [ x"`sed -n 's/.*SHA256STAMP:\([a-f0-9]*\).*/\1/p' $@ 2>/dev/null`" != x"`cat $(sort $(filter-out FORCE,$<)) | $(SHA256SUM) | cut -c1-64`" ]
SHA256STAMP_CHANGED = [ x"`sed -n 's/.*SHA256STAMP:\([a-f0-9]*\).*/\1/p' $@ 2>/dev/null`" != x"`cat $(sort $(filter-out FORCE,$^)) | $(SHA256SUM) | cut -c1-64`" ]
# Usage: $(call SHA256STAMP,commentprefix,commentpostfix)
SHA256STAMP = echo "$(1) SHA256STAMP:"`cat $(sort $(filter-out FORCE,$<)) | $(SHA256SUM) | cut -c1-64`"$(2)" >> $@
SHA256STAMP_CHANGED_ALL = [ x"`sed -n 's/.*SHA256STAMP:\([a-f0-9]*\).*/\1/p' $@ 2>/dev/null`" != x"`cat $(sort $(filter-out FORCE,$^)) | $(SHA256SUM) | cut -c1-64`" ]
# Usage: $(call SHA256STAMP,commentprefix,commentpostfix)
SHA256STAMP_ALL = echo "$(1) SHA256STAMP:"`cat $(sort $(filter-out FORCE,$^)) | $(SHA256SUM) | cut -c1-64`"$(2)" >> $@
SHA256STAMP = echo "$(1) SHA256STAMP:"`cat $(sort $(filter-out FORCE,$^)) | $(SHA256SUM) | cut -c1-64`"$(2)" >> $@
endif
# generate-wire.py --page [header|impl] hdrfilename wirename < csv > file

View File

@ -955,6 +955,10 @@ static void send_shutdown_complete(struct peer *peer)
wire_sync_write(MASTER_FD,
take(towire_channeld_shutdown_complete(NULL)));
per_peer_state_fdpass_send(MASTER_FD, peer->pps);
/* Give master a chance to pass the fd along */
sleep(1);
close(MASTER_FD);
}

View File

@ -115,6 +115,7 @@ u8 *gossip_store_next(const tal_t *ctx,
size_t *off, size_t *end)
{
u8 *msg = NULL;
size_t initial_off = *off;
while (!msg) {
struct gossip_hdr hdr;
@ -146,6 +147,14 @@ u8 *gossip_store_next(const tal_t *ctx,
continue;
}
/* Messages can be up to 64k, but we also have internal ones:
* 128k is plenty. */
if (msglen > 128 * 1024)
status_failed(STATUS_FAIL_INTERNAL_ERROR,
"gossip_store: oversize msg len %u at"
" offset %zu (was at %zu)",
msglen, *off, initial_off);
checksum = be32_to_cpu(hdr.crc);
msg = tal_arr(ctx, u8, msglen);
r = pread(*gossip_store_fd, msg, msglen, *off + r);
@ -155,8 +164,8 @@ u8 *gossip_store_next(const tal_t *ctx,
if (checksum != crc32c(be32_to_cpu(hdr.timestamp), msg, msglen))
status_failed(STATUS_FAIL_INTERNAL_ERROR,
"gossip_store: bad checksum at offset %zu"
": %s",
*off, tal_hex(tmpctx, msg));
"(was at %zu): %s",
*off, initial_off, tal_hex(tmpctx, msg));
/* Definitely processing it now */
*off += sizeof(hdr) + msglen;
@ -190,8 +199,8 @@ size_t find_gossip_store_end(int gossip_store_fd, size_t off)
} buf;
int r;
while ((r = read(gossip_store_fd, &buf,
sizeof(buf.hdr) + sizeof(buf.type)))
while ((r = pread(gossip_store_fd, &buf,
sizeof(buf.hdr) + sizeof(buf.type), off))
== sizeof(buf.hdr) + sizeof(buf.type)) {
u32 msglen = be32_to_cpu(buf.hdr.len) & GOSSIP_STORE_LEN_MASK;
@ -200,7 +209,6 @@ size_t find_gossip_store_end(int gossip_store_fd, size_t off)
break;
off += sizeof(buf.hdr) + msglen;
lseek(gossip_store_fd, off, SEEK_SET);
}
return off;
}

View File

@ -414,11 +414,8 @@ static struct gossmap_chan *add_channel(struct gossmap *map,
* that's the only time we get duplicates */
scid.u64 = map_be64(map, cannounce_off + plus_scid_off);
chan = gossmap_find_chan(map, &scid);
if (chan) {
assert(chan->private);
assert(!private);
if (chan)
gossmap_remove_chan(map, chan);
}
/* We carefully map pointers to indexes, since new_node can move them! */
n[0] = gossmap_find_node(map, &node_id[0]);

9
configure vendored
View File

@ -102,7 +102,7 @@ check_command()
shift 1
echo -n "checking for $name... "
if "$@" >/dev/null 2>&1; then
if "$@" >/dev/null 2>&1 </dev/null; then
echo 'found'
return 0
fi
@ -417,6 +417,12 @@ else
HAVE_PYTHON3_MAKO=0
fi
if check_command 'lowdown' lowdown; then
HAVE_LOWDOWN=1
else
HAVE_LOWDOWN=0
fi
if echo | check_command sha256sum sha256sum; then
SHA256SUM=sha256sum
elif echo | check_command "shasum -a 256" shasum -a 256; then
@ -455,6 +461,7 @@ add_var ASAN "$ASAN"
add_var UBSAN "$UBSAN"
add_var TEST_NETWORK "$TEST_NETWORK"
add_var HAVE_PYTHON3_MAKO "$HAVE_PYTHON3_MAKO"
add_var HAVE_LOWDOWN "$HAVE_LOWDOWN"
add_var SHA256SUM "$SHA256SUM"
add_var FUZZING "$FUZZING"
add_var RUST "$RUST"

View File

@ -1,10 +1,8 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
LABEL mantainer="Vincenzo Palazzo vincenzopalazzodev@gmail.com"
WORKDIR /work
COPY . .
ENV DEBIAN_FRONTEND=noninteractive
ENV LANGUAGE=en_US.UTF-8
ENV LANG=en_US.UTF-8
@ -23,7 +21,7 @@ RUN locale-gen en_US.UTF-8 && dpkg-reconfigure --frontend noninteractive tzdata
COPY . .
# install package for pytho cryptography lib
# install package for python cryptography lib
# https://cryptography.io/en/latest/installation/#debian-ubuntu
RUN apt-get -qq update && \

View File

@ -6,8 +6,6 @@ export ELEMENTS_VERSION=0.18.1.8
export RUST_VERSION=nightly
export TZ="Europe/London"
sudo useradd -ms /bin/bash tester
sudo apt-get update -qq
sudo apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \
@ -54,9 +52,6 @@ sudo apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \
zlib1g-dev
echo "tester ALL=(root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/tester
sudo chmod 0440 /etc/sudoers.d/tester
(
cd /tmp/ || exit 1
wget https://storage.googleapis.com/c-lightning-tests/bitcoin-$BITCOIN_VERSION-x86_64-linux-gnu.tar.bz2

View File

@ -2,7 +2,7 @@ from .lightning import LightningRpc, RpcError, Millisatoshi
from .plugin import Plugin, monkey_patch, RpcException
from .gossmap import Gossmap, GossmapNode, GossmapChannel, GossmapNodeId
__version__ = "0.12.0"
__version__ = "0.12.1"
__all__ = [
"LightningRpc",

View File

@ -72,7 +72,7 @@ class RpcException(Exception):
class Request(dict):
"""A request object that wraps params and allows async return
"""
def __init__(self, plugin: 'Plugin', req_id: Optional[int], method: str,
def __init__(self, plugin: 'Plugin', req_id: Optional[str], method: str,
params: Any, background: bool = False):
self.method = method
self.params = params
@ -700,13 +700,9 @@ class Plugin(object):
request.progress(progress, progress_total, stage, stage_total)
def _parse_request(self, jsrequest: Dict[str, JSONType]) -> Request:
i = jsrequest.get('id', None)
if not isinstance(i, int) and i is not None:
raise ValueError('Non-integer request id "{i}"'.format(i=i))
request = Request(
plugin=self,
req_id=i,
req_id=jsrequest.get('id', None),
method=str(jsrequest['method']),
params=jsrequest['params'],
background=False,

View File

@ -4,7 +4,7 @@ from .invoice import Invoice
from .onion import OnionPayload, TlvPayload, LegacyOnionPayload
from .wire import LightningConnection, LightningServerSocket
__version__ = "0.12.0"
__version__ = "0.12.1"
__all__ = [
"Invoice",

View File

@ -1,4 +1,4 @@
__version__ = "0.12.0"
__version__ = "0.12.1"
__all__ = [
"__version__",

View File

@ -1435,8 +1435,8 @@ class NodeFactory(object):
return [j.result() for j in jobs]
def get_node(self, node_id=None, options=None, dbfile=None,
feerates=(15000, 11000, 7500, 3750), start=True,
wait_for_bitcoind_sync=True, may_fail=False,
bkpr_dbfile=None, feerates=(15000, 11000, 7500, 3750),
start=True, wait_for_bitcoind_sync=True, may_fail=False,
expect_fail=False, cleandir=True, **kwargs):
self.throttler.wait()
node_id = self.get_node_id() if not node_id else node_id
@ -1470,6 +1470,12 @@ class NodeFactory(object):
with lzma.open(os.path.join('tests/data', dbfile), 'rb') as f:
out.write(f.read())
if bkpr_dbfile:
out = open(os.path.join(node.daemon.lightning_dir, TEST_NETWORK,
'accounts.sqlite3'), 'xb')
with lzma.open(os.path.join('tests/data', bkpr_dbfile), 'rb') as f:
out.write(f.read())
if start:
try:
node.start(wait_for_bitcoind_sync)

View File

@ -65,6 +65,8 @@ For development or running tests, get additional dependencies:
sudo apt-get install -y valgrind libpq-dev shellcheck cppcheck \
libsecp256k1-dev jq
If you can't install `lowdown`, a version will be built in-tree.
If you want to build the Rust plugins (currently, cln-grpc):
sudo apt-get install -y cargo rustfmt

View File

@ -125,10 +125,19 @@ RBRACKET=)
$(MARKDOWN_WITH_SCHEMA): doc/lightning-%.7.md: doc/schemas/%.schema.json tools/fromschema.py
@if $(call SHA256STAMP_CHANGED); then $(call VERBOSE, "fromschema $@", tools/fromschema.py --markdownfile=$@ doc/schemas/$*.schema.json > $@.tmp && grep -v SHA256STAMP: $@.tmp > $@ && rm -f $@.tmp && $(call SHA256STAMP,[comment]: # $(LBRACKET),$(RBRACKET))); else touch $@; fi
# mrkd doesn't format nested lists properly, so we fixup with sed (see doc/lightning-connect.7
# and https://github.com/refi64/mrkd/issues/4
$(MANPAGES): doc/%: doc/%.md
@if $(call SHA256STAMP_CHANGED); then $(call VERBOSE, "mrkd $<", mrkd $< $@.tmp && sed -e 's/\(.\)\.RS$$/\1\n.RS/' < $@.tmp > $@ && rm $@.tmp && $(call SHA256STAMP,\\\",)); else touch $@; fi
# If we need to build lowdown, make tools/md2man.sh depend on it.
# That way it's not used in SHA256STAMP (which only uses direct
# dependencies), but make will be forced to build it.
ifeq ($(HAVE_LOWDOWN),0)
LOWDOWN := $(TARGET_DIR)/lowdown-build/bin/lowdown
tools/md2man.sh: $(LOWDOWN)
touch $@
else
LOWDOWN := lowdown
endif
$(MANPAGES): doc/%: doc/%.md tools/md2man.sh version_gen.h
@if $(call SHA256STAMP_CHANGED); then $(call VERBOSE, "md2man $<", VERSION=$(VERSION) tools/md2man.sh $(LOWDOWN) $< > $@ && $(call SHA256STAMP,\\\",)); else touch $@; fi
$(MANPAGES): $(FORCE)
$(MARKDOWN_WITH_SCHEMA): $(FORCE)

View File

@ -42,4 +42,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:c801b02463804504c2387387a36a6739351330a2c496aaa10de2b1f49c36ed32)
[comment]: # ( SHA256STAMP:4d9f888d10faca2bf94d1b52510cf21fbeebae4efda0946f03d04b0ef4bc88a2)

View File

@ -27,11 +27,13 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **enabled** (boolean): whether invoice autocleaning is active
If **enabled** is *true*:
- **expired_by** (u64): how long an invoice must be expired (seconds) before we delete it
- **cycle_seconds** (u64): how long an invoice must be expired (seconds) before we delete it
- **expired\_by** (u64): how long an invoice must be expired (seconds) before we delete it
- **cycle\_seconds** (u64): how long an invoice must be expired (seconds) before we delete it
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -50,4 +52,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:c5aedf100597dd0bd1bbbdf82964327035cd49df00d7b0aef6454e3b1ef39dbc)
[comment]: # ( SHA256STAMP:06bb1ef610c0f82d3d370f468575f2d6e837a11473acd1267baab829aa505052)

View File

@ -21,29 +21,30 @@ RETURN VALUE
------------
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **channels_apy** is returned. It is an array of objects, where each object contains:
On success, an object containing **channels\_apy** is returned. It is an array of objects, where each object contains:
- **account** (string): The account name. If the account is a channel, the channel_id. The 'net' entry is the rollup of all channel accounts
- **routed_out_msat** (msat): Sats routed (outbound)
- **routed_in_msat** (msat): Sats routed (inbound)
- **lease_fee_paid_msat** (msat): Sats paid for leasing inbound (liquidity ads)
- **lease_fee_earned_msat** (msat): Sats earned for leasing outbound (liquidity ads)
- **pushed_out_msat** (msat): Sats pushed to peer at open
- **pushed_in_msat** (msat): Sats pushed in from peer at open
- **our_start_balance_msat** (msat): Starting balance in channel at funding. Note that if our start ballance is zero, any _initial field will be omitted (can't divide by zero)
- **channel_start_balance_msat** (msat): Total starting balance at funding
- **fees_out_msat** (msat): Fees earned on routed outbound
- **utilization_out** (string): Sats routed outbound / total start balance
- **utilization_in** (string): Sats routed inbound / total start balance
- **apy_out** (string): Fees earned on outbound routed payments / total start balance for the length of time this channel has been open amortized to a year (APY)
- **apy_in** (string): Fees earned on inbound routed payments / total start balance for the length of time this channel has been open amortized to a year (APY)
- **apy_total** (string): Total fees earned on routed payments / total start balance for the length of time this channel has been open amortized to a year (APY)
- **fees_in_msat** (msat, optional): Fees earned on routed inbound
- **utilization_out_initial** (string, optional): Sats routed outbound / our start balance
- **utilization_in_initial** (string, optional): Sats routed inbound / our start balance
- **apy_out_initial** (string, optional): Fees earned on outbound routed payments / our start balance for the length of time this channel has been open amortized to a year (APY)
- **apy_in_initial** (string, optional): Fees earned on inbound routed payments / our start balance for the length of time this channel has been open amortized to a year (APY)
- **apy_total_initial** (string, optional): Total fees earned on routed payments / our start balance for the length of time this channel has been open amortized to a year (APY)
- **apy_lease** (string, optional): Lease fees earned over total amount leased for the lease term, amortized to a year (APY). Only appears if channel was leased out by us
- **routed\_out\_msat** (msat): Sats routed (outbound)
- **routed\_in\_msat** (msat): Sats routed (inbound)
- **lease\_fee\_paid\_msat** (msat): Sats paid for leasing inbound (liquidity ads)
- **lease\_fee\_earned\_msat** (msat): Sats earned for leasing outbound (liquidity ads)
- **pushed\_out\_msat** (msat): Sats pushed to peer at open
- **pushed\_in\_msat** (msat): Sats pushed in from peer at open
- **our\_start\_balance\_msat** (msat): Starting balance in channel at funding. Note that if our start ballance is zero, any _initial field will be omitted (can't divide by zero)
- **channel\_start\_balance\_msat** (msat): Total starting balance at funding
- **fees\_out\_msat** (msat): Fees earned on routed outbound
- **utilization\_out** (string): Sats routed outbound / total start balance
- **utilization\_in** (string): Sats routed inbound / total start balance
- **apy\_out** (string): Fees earned on outbound routed payments / total start balance for the length of time this channel has been open amortized to a year (APY)
- **apy\_in** (string): Fees earned on inbound routed payments / total start balance for the length of time this channel has been open amortized to a year (APY)
- **apy\_total** (string): Total fees earned on routed payments / total start balance for the length of time this channel has been open amortized to a year (APY)
- **fees\_in\_msat** (msat, optional): Fees earned on routed inbound
- **utilization\_out\_initial** (string, optional): Sats routed outbound / our start balance
- **utilization\_in\_initial** (string, optional): Sats routed inbound / our start balance
- **apy\_out\_initial** (string, optional): Fees earned on outbound routed payments / our start balance for the length of time this channel has been open amortized to a year (APY)
- **apy\_in\_initial** (string, optional): Fees earned on inbound routed payments / our start balance for the length of time this channel has been open amortized to a year (APY)
- **apy\_total\_initial** (string, optional): Total fees earned on routed payments / our start balance for the length of time this channel has been open amortized to a year (APY)
- **apy\_lease** (string, optional): Lease fees earned over total amount leased for the lease term, amortized to a year (APY). Only appears if channel was leased out by us
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -64,4 +65,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:435fd03765ef0a8bcaef7f309673cdac9cb7c8ba776ac77de21aea8d702998a3)
[comment]: # ( SHA256STAMP:296069892023c371e26305e8ab54d04a50aefeeff37a8a465d07893a8c39e61c)

View File

@ -34,8 +34,9 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **csv_file** (string): File that the csv was generated to
- **csv_format** (string): Format to print csv as (one of "cointracker", "koinly", "harmony", "quickbooks")
- **csv\_file** (string): File that the csv was generated to
- **csv\_format** (string): Format to print csv as (one of "cointracker", "koinly", "harmony", "quickbooks")
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -56,4 +57,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:e6000f40905c4fa23a5115e8bc82f4f1556f55118fb4ede41dd5e54957da0fa3)
[comment]: # ( SHA256STAMP:4d9326acde55e8124ea61a7e2430f035d3a4957995a76ddef61ecb2a3debd042)

View File

@ -18,20 +18,21 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **txs** is returned. It is an array of objects, where each object contains:
- **txid** (txid): transaction id
- **fees_paid_msat** (msat): Amount paid in sats for this tx
- **fees\_paid\_msat** (msat): Amount paid in sats for this tx
- **outputs** (array of objects):
- **account** (string): Account this output affected
- **outnum** (u32): Index of output
- **output_value_msat** (msat): Value of the output
- **output\_value\_msat** (msat): Value of the output
- **currency** (string): human-readable bech32 part for this coin type
- **credit_msat** (msat, optional): Amount credited to account
- **debit_msat** (msat, optional): Amount debited from account
- **originating_account** (string, optional): Account this output originated from
- **output_tag** (string, optional): Description of output creation event
- **spend_tag** (string, optional): Description of output spend event
- **spending_txid** (txid, optional): Transaction this output was spent in
- **payment_id** (hex, optional): lightning payment identifier. For an htlc, this will be the preimage.
- **credit\_msat** (msat, optional): Amount credited to account
- **debit\_msat** (msat, optional): Amount debited from account
- **originating\_account** (string, optional): Account this output originated from
- **output\_tag** (string, optional): Description of output creation event
- **spend\_tag** (string, optional): Description of output spend event
- **spending\_txid** (txid, optional): Transaction this output was spent in
- **payment\_id** (hex, optional): lightning payment identifier. For an htlc, this will be the preimage.
- **blockheight** (u32, optional): Blockheight of transaction
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -51,4 +52,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:9df98d40e1ed1b0c72f4a4e8c00d243e10f159b99c534818f04631ec3d17a445)
[comment]: # ( SHA256STAMP:022a11cd4bdaec7b1b39e30faaf5489de1db08684a3952b3a3152343e91c8c4c)

View File

@ -24,30 +24,34 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **events** is returned. It is an array of objects, where each object contains:
- **account** (string): The account name. If the account is a channel, the channel_id
- **type** (string): Coin movement type (one of "onchain_fee", "chain", "channel")
- **tag** (string): Description of movement
- **credit_msat** (msat): Amount credited
- **debit_msat** (msat): Amount debited
- **credit\_msat** (msat): Amount credited
- **debit\_msat** (msat): Amount debited
- **currency** (string): human-readable bech32 part for this coin type
- **timestamp** (u32): Timestamp this event was recorded by the node. For consolidated events such as onchain_fees, the most recent timestamp
If **type** is "chain":
- **outpoint** (string): The txid:outnum for this event
- **blockheight** (u32): For chain events, blockheight this occured at
- **origin** (string, optional): The account this movement originated from
- **payment_id** (hex, optional): lightning payment identifier. For an htlc, this will be the preimage.
- **payment\_id** (hex, optional): lightning payment identifier. For an htlc, this will be the preimage.
- **txid** (txid, optional): The txid of the transaction that created this event
- **description** (string, optional): The description of this event
If **type** is "onchain_fee":
- **txid** (txid): The txid of the transaction that created this event
If **type** is "channel":
- **fees_msat** (msat, optional): Amount paid in fees
- **is_rebalance** (boolean, optional): Is this payment part of a rebalance
- **payment_id** (hex, optional): lightning payment identifier. For an htlc, this will be the preimage.
- **part_id** (u32, optional): Counter for multi-part payments
- **fees\_msat** (msat, optional): Amount paid in fees
- **is\_rebalance** (boolean, optional): Is this payment part of a rebalance
- **payment\_id** (hex, optional): lightning payment identifier. For an htlc, this will be the preimage.
- **part\_id** (u32, optional): Counter for multi-part payments
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -67,4 +71,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:8568188808cb649d7182ffb628950b93b18406a0498b5b6768371bc94375e258)
[comment]: # ( SHA256STAMP:3b120f28969d50351823707c11f77a0264031b1ddec07794ac117b0e8e2d7a75)

View File

@ -20,17 +20,19 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **accounts** is returned. It is an array of objects, where each object contains:
- **account** (string): The account name. If the account is a channel, the channel_id
- **balances** (array of objects):
- **balance_msat** (msat): Current account balance
- **coin_type** (string): coin type, same as HRP for bech32
- **balance\_msat** (msat): Current account balance
- **coin\_type** (string): coin type, same as HRP for bech32
If **peer_id** is present:
- **peer_id** (pubkey): Node id for the peer this account is with
- **we_opened** (boolean): Did we initiate this account open (open the channel)
- **account_closed** (boolean):
- **account_resolved** (boolean): Has this channel been closed and all outputs resolved?
- **resolved_at_block** (u32, optional): Blockheight account resolved on chain
If **peer\_id** is present:
- **peer\_id** (pubkey): Node id for the peer this account is with
- **we\_opened** (boolean): Did we initiate this account open (open the channel)
- **account\_closed** (boolean):
- **account\_resolved** (boolean): Has this channel been closed and all outputs resolved?
- **resolved\_at\_block** (u32, optional): Blockheight account resolved on chain
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -51,4 +53,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:a3d1423f12bffc76fd1f2fdb5a07ff8a881290f2ea5eefa528cbb04fc3a7c639)
[comment]: # ( SHA256STAMP:ae354f9ee2c0f3805923c7c1fbbf490d43c838449fe25758a6884c2f1686d20e)

View File

@ -26,17 +26,18 @@ RETURN VALUE
------------
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **income_events** is returned. It is an array of objects, where each object contains:
On success, an object containing **income\_events** is returned. It is an array of objects, where each object contains:
- **account** (string): The account name. If the account is a channel, the channel_id
- **tag** (string): Type of income event
- **credit_msat** (msat): Amount earned (income)
- **debit_msat** (msat): Amount spent (expenses)
- **credit\_msat** (msat): Amount earned (income)
- **debit\_msat** (msat): Amount spent (expenses)
- **currency** (string): human-readable bech32 part for this coin type
- **timestamp** (u32): Timestamp this event was recorded by the node. For consolidated events such as onchain_fees, the most recent timestamp
- **description** (string, optional): More information about this event. If a `invoice` type, typically the bolt11/bolt12 description
- **outpoint** (string, optional): The txid:outnum for this event, if applicable
- **txid** (txid, optional): The txid of the transaction that created this event, if applicable
- **payment_id** (hex, optional): lightning payment identifier. For an htlc, this will be the preimage.
- **payment\_id** (hex, optional): lightning payment identifier. For an htlc, this will be the preimage.
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -56,4 +57,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:ab8508af0f40587c5a804f6981591564fe2d18b4fe3fbe7793e6a489607f7e0a)
[comment]: # ( SHA256STAMP:23bcaf41a3451f716cbeedc992c84b88a823d3aa219fd848e3c6c47ae9bbca55)

View File

@ -25,7 +25,8 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **command_to_check** (string): the *command_to_check* argument
- **command\_to\_check** (string): the *command_to_check* argument
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -40,4 +41,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:c676fc0dbfdabc729b3fdbee7e64c91f8180100c9945db06cbaed955a3d63cfc)
[comment]: # ( SHA256STAMP:bd1993b3b95a6c1a9e21873632a829514eb4e9d00ad5084bb099798c8977de06)

View File

@ -29,6 +29,7 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **verified** (boolean): whether the signature was valid (always *true*)
- **pubkey** (pubkey): the *pubkey* parameter, or the pubkey found by looking for known nodes
@ -49,4 +50,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:733247e44d555f9c480a684ceb30440f4f33daf5755253249b5c7b9269c96e49)
[comment]: # ( SHA256STAMP:9642945217c12b5ce41af5aef0547a42b6db5baa97ed88e6fde91345bb9a75f3)

View File

@ -14,61 +14,75 @@ DESCRIPTION
OPTIONS
-------
**--lightning-dir**=*DIR*
Set the directory for the lightning daemon we're talking to; defaults to
* **--lightning-dir**=*DIR*
Set the directory for the lightning daemon we're talking to; defaults to
*$HOME/.lightning*.
**--conf**=*PATH*
Sets configuration file (default: **lightning-dir**/*config* ).
* **--conf**=*PATH*
**--network**=*network*
**--mainnet**
**--testnet**
**--signet**
Sets network explicitly.
Sets configuration file (default: **lightning-dir**/*config* ).
**--rpc-file**=*FILE*
Named pipe to use to talk to lightning daemon: default is
* **--network**=*network*
* **--mainnet**
* **--testnet**
* **--signet**
Sets network explicitly.
* **--rpc-file**=*FILE*
Named pipe to use to talk to lightning daemon: default is
*lightning-rpc* in the lightning directory.
**--keywords**/**-k**
Use format *key*=*value* for parameters in any order
* **--keywords**/**-k**
**--order**/**-o**
Follow strictly the order of parameters for the command
Use format *key*=*value* for parameters in any order
**--json**/**-J**
Return result in JSON format (default unless *help* command,
* **--order**/**-o**
Follow strictly the order of parameters for the command
* **--json**/**-J**
Return result in JSON format (default unless *help* command,
or result contains a `format-hint` field).
**--raw**/**-R**
Return raw JSON directly as lightningd replies; this can be faster for
* **--raw**/**-R**
Return raw JSON directly as lightningd replies; this can be faster for
large requests.
**--human-readable**/**-H**
Return result in human-readable output.
* **--human-readable**/**-H**
**--flat**/**-F**
Return JSON result in flattened one-per-line output, e.g. `{ "help":
Return result in human-readable output.
* **--flat**/**-F**
Return JSON result in flattened one-per-line output, e.g. `{ "help":
[ { "command": "check" } ] }` would become `help[0].command=check`.
This is useful for simple scripts which want to find a specific output
field without parsing JSON.
**--notifications**/**-N**=*LEVEL*
If *LEVEL* is 'none', then never print out notifications. Otherwise,
* **--notifications**/**-N**=*LEVEL*
If *LEVEL* is 'none', then never print out notifications. Otherwise,
print out notifications of *LEVEL* or above (one of `io`, `debug`,
`info` (the default), `unusual` or `broken`: they are prefixed with `#
`.
**--help**/**-h**
Pretty-print summary of options to standard output and exit. The format can
be changed using -F, -R, -J, -H etc.
* **--help**/**-h**
**--version**/**-V**
Print version number to standard output and exit.
Pretty-print summary of options to standard output and exit. The format can
be changed using `-F`, `-R`, `-J`, `-H` etc.
**allow-deprecated-apis**=*BOOL*
Enable deprecated options. It defaults to *true*, but you should set
* **--version**/**-V**
Print version number to standard output and exit.
* **allow-deprecated-apis**=*BOOL*
Enable deprecated options. It defaults to *true*, but you should set
it to *false* when testing to ensure that an upgrade won't break your
configuration.
@ -98,13 +112,13 @@ optional arguments to provide later arguments, although this is not encouraged.
EXAMPLES
--------
1. List commands
1. List commands:
lightning-cli help
* `lightning-cli help`
2. Fund a 10k sat channel using uncomfirmed outputs
2. Fund a 10k sat channel using uncomfirmed outputs:
lightning-cli --keywords fundchannel id=028f...ae7d amount=10000sat minconf=0
* `lightning-cli --keywords fundchannel id=028f...ae7d amount=10000sat minconf=0`
BUGS
----

View File

@ -104,9 +104,11 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **type** (string): Whether we successfully negotiated a mutual close, closed without them, or discarded not-yet-opened channel (one of "mutual", "unilateral", "unopened")
If **type** is "mutual" or "unilateral":
- **tx** (hex): the raw bitcoin transaction used to close the channel (if it was open)
- **txid** (txid): the transaction id of the *tx* field
@ -133,4 +135,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:3b645a2105f2b428889d097283cb56ba9c8d6cba90343ac779f2fb6e26a1c202)
[comment]: # ( SHA256STAMP:89f0bd65ba94f07afaddac259a766d89e26a9acf646c0491c869d923db3091eb)

View File

@ -190,11 +190,13 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **rune** (string): the resulting rune
- **unique_id** (string): the id of this rune: this is set at creation and cannot be changed (even as restrictions are added)
- **unique\_id** (string): the id of this rune: this is set at creation and cannot be changed (even as restrictions are added)
The following warnings may also be returned:
- **warning_unrestricted_rune**: A warning shown when runes are created with powers that could drain your node
- **warning\_unrestricted\_rune**: A warning shown when runes are created with powers that could drain your node
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -217,4 +219,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:34c6d5222fee79f4648be4a717041d32004b5bb3644364dc6569b87b16ed2ebe)
[comment]: # ( SHA256STAMP:843aaf64ccded63baf949f0103dd0f18b9652f259f1d35e0fd67f45ee58c4e8f)

View File

@ -49,6 +49,7 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **id** (pubkey): the peer we connected to
- **features** (hex): BOLT 9 features bitmap offered by peer
- **direction** (string): Whether they initiated connection or we did (one of "in", "out")
@ -56,9 +57,11 @@ On success, an object is returned, containing:
- **type** (string): Type of connection (*torv2*/*torv3* only if **direction** is *out*) (one of "local socket", "ipv4", "ipv6", "torv2", "torv3")
If **type** is "local socket":
- **socket** (string): socket filename
If **type** is "ipv4", "ipv6", "torv2" or "torv3":
- **address** (string): address in expected format for **type**
- **port** (u16): port number
@ -101,4 +104,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:ad52e3b3042a8910c106e0730d9d54d09ebdd3cffdb6ba3fd776f8ec4be57e46)
[comment]: # ( SHA256STAMP:27f1e0ad88e7908bbb450ffc1ba5c53855225adf126155cd62ddbd61a599c3ea)

View File

@ -32,20 +32,21 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **label** (string): the label for the invoice
- **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **payment\_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **status** (string): Whether it has been paid, or can no longer be paid (one of "paid", "expired", "unpaid")
- **description** (string): Description extracted from **bolt11** or **bolt12**
- **expires_at** (u64): UNIX timestamp of when invoice expires (or expired)
- **expires\_at** (u64): UNIX timestamp of when invoice expires (or expired)
- **bolt11** (string, optional): the bolt11 string (always present unless **bolt12** is)
- **bolt12** (string, optional): the bolt12 string instead of **bolt11** (**experimental-offers** only)
- **amount_msat** (msat, optional): The amount of the invoice (if it has one)
- **pay_index** (u64, optional): Incrementing id for when this was paid (**status** *paid* only)
- **amount_received_msat** (msat, optional): Amount actually received (**status** *paid* only)
- **paid_at** (u64, optional): UNIX timestamp of when invoice was paid (**status** *paid* only)
- **payment_preimage** (secret, optional): the proof of payment: SHA256 of this **payment_hash** (always 64 characters)
- **local_offer_id** (hex, optional): the *id* of our offer which created this invoice (**experimental-offers** only). (always 64 characters)
- **payer_note** (string, optional): the optional *payer_note* from invoice_request which created this invoice (**experimental-offers** only).
- **amount\_msat** (msat, optional): The amount of the invoice (if it has one)
- **pay\_index** (u64, optional): Incrementing id for when this was paid (**status** *paid* only)
- **amount\_received\_msat** (msat, optional): Amount actually received (**status** *paid* only)
- **paid\_at** (u64, optional): UNIX timestamp of when invoice was paid (**status** *paid* only)
- **payment\_preimage** (secret, optional): the proof of payment: SHA256 of this **payment_hash** (always 64 characters)
- **local\_offer\_id** (hex, optional): the *id* of our offer which created this invoice (**experimental-offers** only). (always 64 characters)
- **payer\_note** (string, optional): the optional *payer_note* from invoice_request which created this invoice (**experimental-offers** only).
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -74,4 +75,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:34ba2cc01db3e516b257dbe6a47cf764d1e34b85ee89fd4b49aed1fc2e0bb0ba)
[comment]: # ( SHA256STAMP:1d552c5038b6062cd384b7f143ad139ab5275a2b44be09e6d51d7111109caca2)

View File

@ -91,8 +91,9 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **onion** (hex): the onion packet (*onion_size* bytes)
- **shared_secrets** (array of secrets): one shared secret for each node in the *hops* parameter:
- **shared\_secrets** (array of secrets): one shared secret for each node in the *hops* parameter:
- the shared secret with this hop (always 64 characters)
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -132,4 +133,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:d313a15317ee4b09d151312071fb6aa2f7fc16128ca4485096783347bffdeca2)
[comment]: # ( SHA256STAMP:719bc9feedb006638b14f3e6cd01aba479620f771868d8d954b34166224f1c8f)

View File

@ -34,6 +34,7 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **key** (array of strings):
- Part of the key added to the datastore
- **generation** (u64, optional): The number of times this has been updated
@ -65,4 +66,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:ce6a72f08dd7f6026eab58bb6ea732aead4512e714fab4f9a1cf54cdb1374f59)
[comment]: # ( SHA256STAMP:f3f48ed1c5c5ccab128c4ce782b2f209896fe0ca6440e00799935dff9bef3f2e)

View File

@ -23,131 +23,139 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **type** (string): what kind of object it decoded to (one of "bolt12 offer", "bolt12 invoice", "bolt12 invoice_request", "bolt11 invoice", "rune")
- **valid** (boolean): if this is false, you *MUST* not use the result except for diagnostics!
If **type** is "bolt12 offer", and **valid** is *true*:
- **offer_id** (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
- **node_id** (point32): x-only public key of the offering node
- **offer\_id** (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
- **node\_id** (point32): x-only public key of the offering node
- **description** (string): the description of the purpose of the offer
- **signature** (bip340sig, optional): BIP-340 signature of the *node_id* on this offer
- **chains** (array of hexs, optional): which blockchains this offer is for (missing implies bitcoin mainnet only):
- the genesis blockhash (always 64 characters)
- **currency** (string, optional): ISO 4217 code of the currency (missing implies Bitcoin) (always 3 characters)
- **minor_unit** (u32, optional): the number of decimal places to apply to amount (if currency known)
- **minor\_unit** (u32, optional): the number of decimal places to apply to amount (if currency known)
- **amount** (u64, optional): the amount in the *currency* adjusted by *minor_unit*, if any
- **amount_msat** (msat, optional): the amount in bitcoin (if specified, and no *currency*)
- **send_invoice** (boolean, optional): present if this is a send_invoice offer (always *true*)
- **refund_for** (hex, optional): the *payment_preimage* of invoice this is a refund for (always 64 characters)
- **amount\_msat** (msat, optional): the amount in bitcoin (if specified, and no *currency*)
- **send\_invoice** (boolean, optional): present if this is a send_invoice offer (always *true*)
- **refund\_for** (hex, optional): the *payment_preimage* of invoice this is a refund for (always 64 characters)
- **vendor** (string, optional): the name of the vendor for this offer
- **features** (hex, optional): the array of feature bits for this offer
- **absolute_expiry** (u64, optional): UNIX timestamp of when this offer expires
- **absolute\_expiry** (u64, optional): UNIX timestamp of when this offer expires
- **paths** (array of objects, optional): Paths to the destination:
- **blinding** (pubkey): blinding factor for this path
- **path** (array of objects): an individual path:
- **node_id** (pubkey): node_id of the hop
- **encrypted_recipient_data** (hex): encrypted TLV entry for this hop
- **quantity_min** (u64, optional): the minimum quantity
- **quantity_max** (u64, optional): the maximum quantity
- **node\_id** (pubkey): node_id of the hop
- **encrypted\_recipient\_data** (hex): encrypted TLV entry for this hop
- **quantity\_min** (u64, optional): the minimum quantity
- **quantity\_max** (u64, optional): the maximum quantity
- **recurrence** (object, optional): how often to this offer should be used:
- **time_unit** (u32): the BOLT12 time unit
- **time\_unit** (u32): the BOLT12 time unit
- **period** (u32): how many *time_unit* per payment period
- **time_unit_name** (string, optional): the name of *time_unit* (if valid)
- **time\_unit\_name** (string, optional): the name of *time_unit* (if valid)
- **basetime** (u64, optional): period starts at this UNIX timestamp
- **start_any_period** (u64, optional): you can start at any period (only if **basetime** present)
- **start\_any\_period** (u64, optional): you can start at any period (only if **basetime** present)
- **limit** (u32, optional): maximum period number for recurrence
- **paywindow** (object, optional): when within a period will payment be accepted (default is prior and during the period):
- **seconds_before** (u32): seconds prior to period start
- **seconds_after** (u32): seconds after to period start
- **proportional_amount** (boolean, optional): amount should be scaled if payed after period start (always *true*)
- **seconds\_before** (u32): seconds prior to period start
- **seconds\_after** (u32): seconds after to period start
- **proportional\_amount** (boolean, optional): amount should be scaled if payed after period start (always *true*)
- the following warnings are possible:
- **warning_offer_unknown_currency**: The currency code is unknown (so no **minor_unit**)
- **warning\_offer\_unknown\_currency**: The currency code is unknown (so no **minor_unit**)
If **type** is "bolt12 offer", and **valid** is *false*:
- the following warnings are possible:
- **warning_offer_missing_description**: No **description**
- **warning\_offer\_missing\_description**: No **description**
If **type** is "bolt12 invoice", and **valid** is *true*:
- **node_id** (point32): x-only public key of the offering node
- **node\_id** (point32): x-only public key of the offering node
- **signature** (bip340sig): BIP-340 signature of the *node_id* on this offer
- **amount_msat** (msat): the amount in bitcoin
- **amount\_msat** (msat): the amount in bitcoin
- **description** (string): the description of the purpose of the offer
- **created_at** (u64): the UNIX timestamp of invoice creation
- **payment_hash** (hex): the hash of the *payment_preimage* (always 64 characters)
- **relative_expiry** (u32): the number of seconds after *created_at* when this expires
- **min_final_cltv_expiry** (u32): the number of blocks required by destination
- **offer_id** (hex, optional): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
- **created\_at** (u64): the UNIX timestamp of invoice creation
- **payment\_hash** (hex): the hash of the *payment_preimage* (always 64 characters)
- **relative\_expiry** (u32): the number of seconds after *created_at* when this expires
- **min\_final\_cltv\_expiry** (u32): the number of blocks required by destination
- **offer\_id** (hex, optional): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
- **chain** (hex, optional): which blockchain this invoice is for (missing implies bitcoin mainnet only) (always 64 characters)
- **send_invoice** (boolean, optional): present if this offer was a send_invoice offer (always *true*)
- **refund_for** (hex, optional): the *payment_preimage* of invoice this is a refund for (always 64 characters)
- **send\_invoice** (boolean, optional): present if this offer was a send_invoice offer (always *true*)
- **refund\_for** (hex, optional): the *payment_preimage* of invoice this is a refund for (always 64 characters)
- **vendor** (string, optional): the name of the vendor for this offer
- **features** (hex, optional): the array of feature bits for this offer
- **paths** (array of objects, optional): Paths to the destination:
- **blinding** (pubkey): blinding factor for this path
- **path** (array of objects): an individual path:
- **node_id** (pubkey): node_id of the hop
- **encrypted_recipient_data** (hex): encrypted TLV entry for this hop
- **node\_id** (pubkey): node_id of the hop
- **encrypted\_recipient\_data** (hex): encrypted TLV entry for this hop
- **quantity** (u64, optional): the quantity ordered
- **recurrence_counter** (u32, optional): the 0-based counter for a recurring payment
- **recurrence_start** (u32, optional): the optional start period for a recurring payment
- **recurrence_basetime** (u32, optional): the UNIX timestamp of the first recurrence period start
- **payer_key** (point32, optional): the transient key which identifies the payer
- **payer_info** (hex, optional): the payer-provided blob to derive payer_key
- **recurrence\_counter** (u32, optional): the 0-based counter for a recurring payment
- **recurrence\_start** (u32, optional): the optional start period for a recurring payment
- **recurrence\_basetime** (u32, optional): the UNIX timestamp of the first recurrence period start
- **payer\_key** (point32, optional): the transient key which identifies the payer
- **payer\_info** (hex, optional): the payer-provided blob to derive payer_key
- **fallbacks** (array of objects, optional): onchain addresses:
- **version** (u8): Segwit address version
- **hex** (hex): Raw encoded segwit address
- **address** (string, optional): bech32 segwit address
- **refund_signature** (bip340sig, optional): the payer key signature to get a refund
- **refund\_signature** (bip340sig, optional): the payer key signature to get a refund
If **type** is "bolt12 invoice", and **valid** is *false*:
- **fallbacks** (array of objects, optional):
- the following warnings are possible:
- **warning_invoice_fallbacks_version_invalid**: **version** is > 16
- **warning\_invoice\_fallbacks\_version\_invalid**: **version** is > 16
- the following warnings are possible:
- **warning_invoice_missing_amount**: **amount_msat* missing
- **warning_invoice_missing_description**: No **description**
- **warning_invoice_missing_blinded_payinfo**: Has **paths** without payinfo
- **warning_invoice_invalid_blinded_payinfo**: Does not have exactly one payinfo for each of **paths**
- **warning_invoice_missing_recurrence_basetime**: Has **recurrence_counter** without **recurrence_basetime**
- **warning_invoice_missing_created_at**: Missing **created_at**
- **warning_invoice_missing_payment_hash**: Missing **payment_hash**
- **warning_invoice_refund_signature_missing_payer_key**: Missing **payer_key** for refund_signature
- **warning_invoice_refund_signature_invalid**: **refund_signature** incorrect
- **warning_invoice_refund_missing_signature**: No **refund_signature**
- **warning\_invoice\_missing\_amount**: **amount_msat* missing
- **warning\_invoice\_missing\_description**: No **description**
- **warning\_invoice\_missing\_blinded\_payinfo**: Has **paths** without payinfo
- **warning\_invoice\_invalid\_blinded\_payinfo**: Does not have exactly one payinfo for each of **paths**
- **warning\_invoice\_missing\_recurrence\_basetime**: Has **recurrence_counter** without **recurrence_basetime**
- **warning\_invoice\_missing\_created\_at**: Missing **created_at**
- **warning\_invoice\_missing\_payment\_hash**: Missing **payment_hash**
- **warning\_invoice\_refund\_signature\_missing\_payer\_key**: Missing **payer_key** for refund_signature
- **warning\_invoice\_refund\_signature\_invalid**: **refund_signature** incorrect
- **warning\_invoice\_refund\_missing\_signature**: No **refund_signature**
If **type** is "bolt12 invoice_request", and **valid** is *true*:
- **offer_id** (hex): the id of the offer this is requesting (merkle hash of non-signature fields) (always 64 characters)
- **payer_key** (point32): the transient key which identifies the payer
- **offer\_id** (hex): the id of the offer this is requesting (merkle hash of non-signature fields) (always 64 characters)
- **payer\_key** (point32): the transient key which identifies the payer
- **chain** (hex, optional): which blockchain this invoice_request is for (missing implies bitcoin mainnet only) (always 64 characters)
- **amount_msat** (msat, optional): the amount in bitcoin
- **amount\_msat** (msat, optional): the amount in bitcoin
- **features** (hex, optional): the array of feature bits for this offer
- **quantity** (u64, optional): the quantity ordered
- **recurrence_counter** (u32, optional): the 0-based counter for a recurring payment
- **recurrence_start** (u32, optional): the optional start period for a recurring payment
- **payer_info** (hex, optional): the payer-provided blob to derive payer_key
- **recurrence_signature** (bip340sig, optional): the payer key signature
- **recurrence\_counter** (u32, optional): the 0-based counter for a recurring payment
- **recurrence\_start** (u32, optional): the optional start period for a recurring payment
- **payer\_info** (hex, optional): the payer-provided blob to derive payer_key
- **recurrence\_signature** (bip340sig, optional): the payer key signature
If **type** is "bolt12 invoice_request", and **valid** is *false*:
- the following warnings are possible:
- **warning_invoice_request_missing_offer_id**: No **offer_id**
- **warning_invoice_request_missing_payer_key**: No **payer_key**
- **warning_invoice_request_missing_recurrence_signature**: No **recurrence_signature**
- **warning_invoice_request_invalid_recurrence_signature**: **recurrence_signature** incorrect
- **warning\_invoice\_request\_missing\_offer\_id**: No **offer_id**
- **warning\_invoice\_request\_missing\_payer\_key**: No **payer_key**
- **warning\_invoice\_request\_missing\_recurrence\_signature**: No **recurrence_signature**
- **warning\_invoice\_request\_invalid\_recurrence\_signature**: **recurrence_signature** incorrect
If **type** is "bolt11 invoice", and **valid** is *true*:
- **currency** (string): the BIP173 name for the currency
- **created_at** (u64): the UNIX-style timestamp of the invoice
- **created\_at** (u64): the UNIX-style timestamp of the invoice
- **expiry** (u64): the number of seconds this is valid after *timestamp*
- **payee** (pubkey): the public key of the recipient
- **payment_hash** (hex): the hash of the *payment_preimage* (always 64 characters)
- **payment\_hash** (hex): the hash of the *payment_preimage* (always 64 characters)
- **signature** (signature): signature of the *payee* on this invoice
- **min_final_cltv_expiry** (u32): the minimum CLTV delay for the final node
- **amount_msat** (msat, optional): Amount the invoice asked for
- **min\_final\_cltv\_expiry** (u32): the minimum CLTV delay for the final node
- **amount\_msat** (msat, optional): Amount the invoice asked for
- **description** (string, optional): the description of the purpose of the purchase
- **description_hash** (hex, optional): the hash of the description, in place of *description* (always 64 characters)
- **payment_secret** (hex, optional): the secret to hand to the payee node (always 64 characters)
- **description\_hash** (hex, optional): the hash of the description, in place of *description* (always 64 characters)
- **payment\_secret** (hex, optional): the secret to hand to the payee node (always 64 characters)
- **features** (hex, optional): the features bitmap for this invoice
- **payment_metadata** (hex, optional): the payment_metadata to put in the payment
- **payment\_metadata** (hex, optional): the payment_metadata to put in the payment
- **fallbacks** (array of objects, optional): onchain addresses:
- **type** (string): the address type (if known) (one of "P2PKH", "P2SH", "P2WPKH", "P2WSH")
- **hex** (hex): Raw encoded address
@ -155,29 +163,31 @@ If **type** is "bolt11 invoice", and **valid** is *true*:
- **routes** (array of arrays, optional): Route hints to the *payee*:
- hops in the route:
- **pubkey** (pubkey): the public key of the node
- **short_channel_id** (short_channel_id): a channel to the next peer
- **fee_base_msat** (msat): the base fee for payments
- **fee_proportional_millionths** (u32): the parts-per-million fee for payments
- **cltv_expiry_delta** (u32): the CLTV delta across this hop
- **short\_channel\_id** (short_channel_id): a channel to the next peer
- **fee\_base\_msat** (msat): the base fee for payments
- **fee\_proportional\_millionths** (u32): the parts-per-million fee for payments
- **cltv\_expiry\_delta** (u32): the CLTV delta across this hop
- **extra** (array of objects, optional): Any extra fields we didn't know how to parse:
- **tag** (string): The bech32 letter which identifies this field (always 1 characters)
- **data** (string): The bech32 data for this field
If **type** is "rune", and **valid** is *true*:
- **valid** (boolean) (always *true*)
- **string** (string): the string encoding of the rune
- **restrictions** (array of objects): restrictions built into the rune: all must pass:
- **alternatives** (array of strings): each way restriction can be met: any can pass:
- the alternative of form fieldname condition fieldname
- **summary** (string): human-readable summary of this restriction
- **unique_id** (string, optional): unique id (always a numeric id on runes we create)
- **unique\_id** (string, optional): unique id (always a numeric id on runes we create)
- **version** (string, optional): rune version, not currently set on runes we create
If **type** is "rune", and **valid** is *false*:
- **valid** (boolean) (always *false*)
- **hex** (hex, optional): the raw rune in hex
- the following warnings are possible:
- **warning_rune_invalid_utf8**: the rune contains invalid UTF-8 strings
- **warning\_rune\_invalid\_utf8**: the rune contains invalid UTF-8 strings
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -201,4 +211,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:3e522a9788bb79302e4c4386c3937b7dcd8359d1b894364ac3e884bd3f695850)
[comment]: # ( SHA256STAMP:7497fbb2f802f2eef2b6c1a8005d31f4778af94c9d0384192a8ba1a4af936549)

View File

@ -17,19 +17,20 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **currency** (string): the BIP173 name for the currency
- **created_at** (u64): the UNIX-style timestamp of the invoice
- **created\_at** (u64): the UNIX-style timestamp of the invoice
- **expiry** (u64): the number of seconds this is valid after *timestamp*
- **payee** (pubkey): the public key of the recipient
- **payment_hash** (hex): the hash of the *payment_preimage* (always 64 characters)
- **payment\_hash** (hex): the hash of the *payment_preimage* (always 64 characters)
- **signature** (signature): signature of the *payee* on this invoice
- **min_final_cltv_expiry** (u32): the minimum CLTV delay for the final node
- **amount_msat** (msat, optional): Amount the invoice asked for
- **min\_final\_cltv\_expiry** (u32): the minimum CLTV delay for the final node
- **amount\_msat** (msat, optional): Amount the invoice asked for
- **description** (string, optional): the description of the purpose of the purchase
- **description_hash** (hex, optional): the hash of the description, in place of *description* (always 64 characters)
- **payment_secret** (hex, optional): the secret to hand to the payee node (always 64 characters)
- **description\_hash** (hex, optional): the hash of the description, in place of *description* (always 64 characters)
- **payment\_secret** (hex, optional): the secret to hand to the payee node (always 64 characters)
- **features** (hex, optional): the features bitmap for this invoice
- **payment_metadata** (hex, optional): the payment_metadata to put in the payment
- **payment\_metadata** (hex, optional): the payment_metadata to put in the payment
- **fallbacks** (array of objects, optional): onchain addresses:
- **type** (string): the address type (if known) (one of "P2PKH", "P2SH", "P2WPKH", "P2WSH")
- **hex** (hex): Raw encoded address
@ -37,10 +38,10 @@ On success, an object is returned, containing:
- **routes** (array of arrays, optional): Route hints to the *payee*:
- hops in the route:
- **pubkey** (pubkey): the public key of the node
- **short_channel_id** (short_channel_id): a channel to the next peer
- **fee_base_msat** (msat): the base fee for payments
- **fee_proportional_millionths** (u32): the parts-per-million fee for payments
- **cltv_expiry_delta** (u32): the CLTV delta across this hop
- **short\_channel\_id** (short_channel_id): a channel to the next peer
- **fee\_base\_msat** (msat): the base fee for payments
- **fee\_proportional\_millionths** (u32): the parts-per-million fee for payments
- **cltv\_expiry\_delta** (u32): the CLTV delta across this hop
- **extra** (array of objects, optional): Any extra fields we didn't know how to parse:
- **tag** (string): The bech32 letter which identifies this field (always 1 characters)
- **data** (string): The bech32 data for this field
@ -70,4 +71,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:e6e27ff57a8e26db5d4bba8be2a5faa6f1c58b20ef625f371e6e66d17932f8a0)
[comment]: # ( SHA256STAMP:b2a483f6fcb07e4bcddb088520049eee1d33447136e2634bf4207d54c21022e9)

View File

@ -20,6 +20,7 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **key** (array of strings):
- Part of the key added to the datastore
- **generation** (u64, optional): The number of times this has been updated
@ -48,4 +49,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:83a7e89ed44c6dbf744d1327337e29393f9095628bd95fffe59ec5014ee0a483)
[comment]: # ( SHA256STAMP:3d70f21bc0945835995b820ab6d65b1ac6e88a9f13240f30acffd32315d41e70)

View File

@ -38,4 +38,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:c71baf4b5863fd6f4d2ba21a97d4106195ba10c5add21087142b1a5ee533da91)
[comment]: # ( SHA256STAMP:c2aef71377094e4c4ab09d3c18b3b8448e5fed1fcc2a6afd47ab218afb011b5e)

View File

@ -26,24 +26,27 @@ Note: The return is the same as an object from lightning-listinvoice(7).
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **label** (string): Unique label given at creation time
- **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **payment\_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **status** (string): State of invoice (one of "paid", "expired", "unpaid")
- **expires_at** (u64): UNIX timestamp when invoice expires (or expired)
- **expires\_at** (u64): UNIX timestamp when invoice expires (or expired)
- **bolt11** (string, optional): BOLT11 string
- **bolt12** (string, optional): BOLT12 string
- **amount_msat** (msat, optional): the amount required to pay this invoice
- **amount\_msat** (msat, optional): the amount required to pay this invoice
- **description** (string, optional): description used in the invoice
If **bolt12** is present:
- **local_offer_id** (hex, optional): offer for which this invoice was created
- **payer_note** (string, optional): the optional *payer_note* from invoice_request which created this invoice
- **local\_offer\_id** (hex, optional): offer for which this invoice was created
- **payer\_note** (string, optional): the optional *payer_note* from invoice_request which created this invoice
If **status** is "paid":
- **pay_index** (u64): unique index for this invoice payment
- **amount_received_msat** (msat): how much was actually received
- **paid_at** (u64): UNIX timestamp of when payment was received
- **payment_preimage** (secret): SHA256 of this is the *payment_hash* offered in the invoice (always 64 characters)
- **pay\_index** (u64): unique index for this invoice payment
- **amount\_received\_msat** (msat): how much was actually received
- **paid\_at** (u64): UNIX timestamp of when payment was received
- **payment\_preimage** (secret): SHA256 of this is the *payment_hash* offered in the invoice (always 64 characters)
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -78,4 +81,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:a24e80716475dea15f9762cf50382f21e3e09b803a669e217923d7019cd526e0)
[comment]: # ( SHA256STAMP:a869dc2b48e763c47f3af1c27143d194db96948f19fbcec82df343bd3b6c4468)

View File

@ -37,16 +37,17 @@ payments will be returned -- one payment object for each partid.
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **payments** is returned. It is an array of objects, where each object contains:
- **id** (u64): unique ID for this payment attempt
- **payment_hash** (hex): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **payment\_hash** (hex): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **status** (string): status of the payment (one of "pending", "failed", "complete")
- **amount_sent_msat** (msat): the amount we actually sent, including fees
- **created_at** (u64): the UNIX timestamp showing when this payment was initiated
- **amount\_sent\_msat** (msat): the amount we actually sent, including fees
- **created\_at** (u64): the UNIX timestamp showing when this payment was initiated
- **partid** (u64, optional): unique ID within this (multi-part) payment
- **destination** (pubkey, optional): the final destination of the payment if known
- **amount_msat** (msat, optional): the amount the destination received, if known
- **amount\_msat** (msat, optional): the amount the destination received, if known
- **groupid** (u64, optional): Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash
- **payment_preimage** (hex, optional): proof of payment (always 64 characters)
- **payment\_preimage** (hex, optional): proof of payment (always 64 characters)
- **label** (string, optional): the label, if given to sendpay
- **bolt11** (string, optional): the bolt11 string (if pay supplied one)
- **bolt12** (string, optional): the bolt12 string (if supplied for pay: **experimental-offers** only).
@ -101,4 +102,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:ecdf9fe432142054328abb6aa3f76b726968dd28db1fc26875a81f291e10135a)
[comment]: # ( SHA256STAMP:f687e5248b633be5e6e3bb515b7b006858a3f2499bb5955240b3e18dd80794a8)

View File

@ -36,11 +36,12 @@ Note: the returned object is the same format as **listoffers**.
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **offer_id** (hex): the merkle hash of the offer (always 64 characters)
- **offer\_id** (hex): the merkle hash of the offer (always 64 characters)
- **active** (boolean): Whether the offer can produce invoices/payments (always *false*)
- **single_use** (boolean): Whether the offer is disabled after first successful use
- **single\_use** (boolean): Whether the offer is disabled after first successful use
- **bolt12** (string): The bolt12 string representing this offer
- **bolt12_unsigned** (string): The bolt12 string representing this offer, without signature
- **bolt12\_unsigned** (string): The bolt12 string representing this offer, without signature
- **used** (boolean): Whether the offer has had an invoice paid / payment made
- **label** (string, optional): The label provided when offer was created
@ -74,4 +75,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:d91f424d5374fd26d4d85df10f9e5eb092e5b0e1bac8dae44b98d844a55b6e22)
[comment]: # ( SHA256STAMP:a2489ae6d986292861555d66a1fb0c8c39efe460db5e324ddbb27b9be1650296)

View File

@ -59,4 +59,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:c801b02463804504c2387387a36a6739351330a2c496aaa10de2b1f49c36ed32)
[comment]: # ( SHA256STAMP:4d9f888d10faca2bf94d1b52510cf21fbeebae4efda0946f03d04b0ef4bc88a2)

View File

@ -46,33 +46,35 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **perkb** (object, optional): If *style* parameter was perkb:
- **min_acceptable** (u32): The smallest feerate that you can use, usually the minimum relayed feerate of the backend
- **max_acceptable** (u32): The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet).
- **min\_acceptable** (u32): The smallest feerate that you can use, usually the minimum relayed feerate of the backend
- **max\_acceptable** (u32): The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet).
- **opening** (u32, optional): Default feerate for lightning-fundchannel(7) and lightning-withdraw(7)
- **mutual_close** (u32, optional): Feerate to aim for in cooperative shutdown. Note that since mutual close is a **negotiation**, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer.
- **unilateral_close** (u32, optional): Feerate for commitment_transaction in a live channel which we originally funded
- **delayed_to_us** (u32, optional): Feerate for returning unilateral close funds to our wallet
- **htlc_resolution** (u32, optional): Feerate for returning unilateral close HTLC outputs to our wallet
- **mutual\_close** (u32, optional): Feerate to aim for in cooperative shutdown. Note that since mutual close is a **negotiation**, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer.
- **unilateral\_close** (u32, optional): Feerate for commitment_transaction in a live channel which we originally funded
- **delayed\_to\_us** (u32, optional): Feerate for returning unilateral close funds to our wallet
- **htlc\_resolution** (u32, optional): Feerate for returning unilateral close HTLC outputs to our wallet
- **penalty** (u32, optional): Feerate to start at when penalizing a cheat attempt
- **perkw** (object, optional): If *style* parameter was perkw:
- **min_acceptable** (u32): The smallest feerate that you can use, usually the minimum relayed feerate of the backend
- **max_acceptable** (u32): The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet).
- **min\_acceptable** (u32): The smallest feerate that you can use, usually the minimum relayed feerate of the backend
- **max\_acceptable** (u32): The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet).
- **opening** (u32, optional): Default feerate for lightning-fundchannel(7) and lightning-withdraw(7)
- **mutual_close** (u32, optional): Feerate to aim for in cooperative shutdown. Note that since mutual close is a **negotiation**, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer.
- **unilateral_close** (u32, optional): Feerate for commitment_transaction in a live channel which we originally funded
- **delayed_to_us** (u32, optional): Feerate for returning unilateral close funds to our wallet
- **htlc_resolution** (u32, optional): Feerate for returning unilateral close HTLC outputs to our wallet
- **mutual\_close** (u32, optional): Feerate to aim for in cooperative shutdown. Note that since mutual close is a **negotiation**, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer.
- **unilateral\_close** (u32, optional): Feerate for commitment_transaction in a live channel which we originally funded
- **delayed\_to\_us** (u32, optional): Feerate for returning unilateral close funds to our wallet
- **htlc\_resolution** (u32, optional): Feerate for returning unilateral close HTLC outputs to our wallet
- **penalty** (u32, optional): Feerate to start at when penalizing a cheat attempt
- **onchain_fee_estimates** (object, optional):
- **opening_channel_satoshis** (u64): Estimated cost of typical channel open
- **mutual_close_satoshis** (u64): Estimated cost of typical channel close
- **unilateral_close_satoshis** (u64): Estimated cost of typical unilateral close (without HTLCs)
- **htlc_timeout_satoshis** (u64): Estimated cost of typical HTLC timeout transaction
- **htlc_success_satoshis** (u64): Estimated cost of typical HTLC fulfillment transaction
- **onchain\_fee\_estimates** (object, optional):
- **opening\_channel\_satoshis** (u64): Estimated cost of typical channel open
- **mutual\_close\_satoshis** (u64): Estimated cost of typical channel close
- **unilateral\_close\_satoshis** (u64): Estimated cost of typical unilateral close (without HTLCs)
- **htlc\_timeout\_satoshis** (u64): Estimated cost of typical HTLC timeout transaction
- **htlc\_success\_satoshis** (u64): Estimated cost of typical HTLC fulfillment transaction
The following warnings may also be returned:
- **warning_missing_feerates**: Some fee estimates are missing
- **warning\_missing\_feerates**: Some fee estimates are missing
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -119,4 +121,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:96fde8cf67c9b0dda5a1866dfadfb1d7da7e593b3080948662070382d4a9537f)
[comment]: # ( SHA256STAMP:8b9053a3047bc47e9cb86d8ae059e9b955194d1761d07b33ed7b78c85f434c34)

View File

@ -50,19 +50,20 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **invoice** (string): The BOLT12 invoice we fetched
- **changes** (object): Summary of changes from offer:
- **description_appended** (string, optional): extra characters appended to the *description* field.
- **description\_appended** (string, optional): extra characters appended to the *description* field.
- **description** (string, optional): a completely replaced *description* field
- **vendor_removed** (string, optional): The *vendor* from the offer, which is missing in the invoice
- **vendor\_removed** (string, optional): The *vendor* from the offer, which is missing in the invoice
- **vendor** (string, optional): a completely replaced *vendor* field
- **amount_msat** (msat, optional): the amount, if different from the offer amount multiplied by any *quantity* (or the offer had no amount, or was not in BTC).
- **next_period** (object, optional): Only for recurring invoices if the next period is under the *recurrence_limit*:
- **amount\_msat** (msat, optional): the amount, if different from the offer amount multiplied by any *quantity* (or the offer had no amount, or was not in BTC).
- **next\_period** (object, optional): Only for recurring invoices if the next period is under the *recurrence_limit*:
- **counter** (u64): the index of the next period to fetchinvoice
- **starttime** (u64): UNIX timestamp that the next period starts
- **endtime** (u64): UNIX timestamp that the next period ends
- **paywindow_start** (u64): UNIX timestamp of the earliest time that the next invoice can be fetched
- **paywindow_end** (u64): UNIX timestamp of the latest time that the next invoice can be fetched
- **paywindow\_start** (u64): UNIX timestamp of the earliest time that the next invoice can be fetched
- **paywindow\_end** (u64): UNIX timestamp of the latest time that the next invoice can be fetched
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -88,4 +89,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:83fcb7141eefc0e5d5bd1d23f6d05f1d32514bad53ed52fc61604ce049c75d54)
[comment]: # ( SHA256STAMP:003592ea0876d08b2109a0daa5e10328e049013f8e44d3eccc5805885a16a375)

View File

@ -84,11 +84,12 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **tx** (hex): The raw transaction which funded the channel
- **txid** (txid): The txid of the transaction which funded the channel
- **outnum** (u32): The 0-based output index showing which output funded the channel
- **channel_id** (hex): The channel_id of the resulting channel (always 64 characters)
- **close_to** (hex, optional): The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script`
- **channel\_id** (hex): The channel_id of the resulting channel (always 64 characters)
- **close\_to** (hex, optional): The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script`
- **mindepth** (u32, optional): Number of confirmations before we consider the channel active.
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -114,4 +115,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:d396512cad4bfd533dda947a12aee0aecda05e39c2a7ad7e6b04a3602fbae85d)
[comment]: # ( SHA256STAMP:f1c2b762c111ecb6d569075377e1a79cd9fceb60863fc56aeddcdbcd51445812)

View File

@ -27,6 +27,7 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **cancelled** (string): A message indicating it was cancelled by RPC
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -59,4 +60,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:a670eb1f4475ad33b3fc20994205adbf12fad8bb93e5e805e0b8a8ea1db15136)
[comment]: # ( SHA256STAMP:6e9501860847adfa98cf725e65297322428986f6345aeb04cd0ece150780ec66)

View File

@ -28,8 +28,9 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **channel_id** (hex): The channel_id of the resulting channel (always 64 characters)
- **commitments_secured** (boolean): Indication that channel is safe to use (always *true*)
- **channel\_id** (hex): The channel_id of the resulting channel (always 64 characters)
- **commitments\_secured** (boolean): Indication that channel is safe to use (always *true*)
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -61,4 +62,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:f7b14faee0218a2eee7c0df17c52b1d4502c898d1767644bd891027116eb8868)
[comment]: # ( SHA256STAMP:b0602c5c3ab5370199776b56656451538712b989e9bfc169934ddabeff56894c)

View File

@ -43,13 +43,15 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **funding_address** (string): The address to send funding to for the channel. DO NOT SEND COINS TO THIS ADDRESS YET.
- **funding\_address** (string): The address to send funding to for the channel. DO NOT SEND COINS TO THIS ADDRESS YET.
- **scriptpubkey** (hex): The raw scriptPubkey for the address
- **close_to** (hex, optional): The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script`
- **close\_to** (hex, optional): The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script`
- **mindepth** (u32, optional): Number of confirmations before we consider the channel active.
The following warnings may also be returned:
- **warning_usage**: A warning not to prematurely broadcast the funding transaction (always present!)
- **warning\_usage**: A warning not to prematurely broadcast the funding transaction (always present!)
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -83,4 +85,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:5062025dc172a552f1a33fd1e3600c0fbfc1405f030ea049da88da30a5035456)
[comment]: # ( SHA256STAMP:d76e01b4e00915ca84e6960c8718028bc220712a4c387711c01977c3ee80ddf4)

View File

@ -106,23 +106,24 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **summary** (string): Summary of the current funding policy e.g. (match 100)
- **policy** (string): Policy funder plugin will use to decide how much captial to commit to a v2 open channel request (one of "match", "available", "fixed")
- **policy_mod** (u32): The *policy_mod* is the number or 'modification' to apply to the policy.
- **leases_only** (boolean): Only contribute funds to `option_will_fund` lease requests.
- **min_their_funding_msat** (msat): The minimum funding sats that we require from peer to activate our funding policy.
- **max_their_funding_msat** (msat): The maximum funding sats that we'll allow from peer to activate our funding policy.
- **per_channel_min_msat** (msat): The minimum amount that we will fund a channel open with.
- **per_channel_max_msat** (msat): The maximum amount that we will fund a channel open with.
- **reserve_tank_msat** (msat): Amount of sats to leave available in the node wallet.
- **fuzz_percent** (u32): Percentage to fuzz our funding amount by.
- **fund_probability** (u32): Percent of opens to consider funding. 100 means we'll consider funding every requested open channel request.
- **lease_fee_base_msat** (msat, optional): Flat fee to charge for a channel lease.
- **lease_fee_basis** (u32, optional): Proportional fee to charge for a channel lease, calculated as 1/10,000th of requested funds.
- **funding_weight** (u32, optional): Transaction weight the channel opener will pay us for a leased funding transaction.
- **channel_fee_max_base_msat** (msat, optional): Maximum channel_fee_base_msat we'll charge for routing funds leased on this channel.
- **channel_fee_max_proportional_thousandths** (u32, optional): Maximum channel_fee_proportional_millitionths we'll charge for routing funds leased on this channel, in thousandths.
- **compact_lease** (hex, optional): Compact description of the channel lease parameters.
- **policy\_mod** (u32): The *policy_mod* is the number or 'modification' to apply to the policy.
- **leases\_only** (boolean): Only contribute funds to `option_will_fund` lease requests.
- **min\_their\_funding\_msat** (msat): The minimum funding sats that we require from peer to activate our funding policy.
- **max\_their\_funding\_msat** (msat): The maximum funding sats that we'll allow from peer to activate our funding policy.
- **per\_channel\_min\_msat** (msat): The minimum amount that we will fund a channel open with.
- **per\_channel\_max\_msat** (msat): The maximum amount that we will fund a channel open with.
- **reserve\_tank\_msat** (msat): Amount of sats to leave available in the node wallet.
- **fuzz\_percent** (u32): Percentage to fuzz our funding amount by.
- **fund\_probability** (u32): Percent of opens to consider funding. 100 means we'll consider funding every requested open channel request.
- **lease\_fee\_base\_msat** (msat, optional): Flat fee to charge for a channel lease.
- **lease\_fee\_basis** (u32, optional): Proportional fee to charge for a channel lease, calculated as 1/10,000th of requested funds.
- **funding\_weight** (u32, optional): Transaction weight the channel opener will pay us for a leased funding transaction.
- **channel\_fee\_max\_base\_msat** (msat, optional): Maximum channel_fee_base_msat we'll charge for routing funds leased on this channel.
- **channel\_fee\_max\_proportional\_thousandths** (u32, optional): Maximum channel_fee_proportional_millitionths we'll charge for routing funds leased on this channel, in thousandths.
- **compact\_lease** (hex, optional): Compact description of the channel lease parameters.
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -146,4 +147,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:7fb486ed4c0ec0e72c51bc5a167a1280a9572c61c9467b5819e6624a54877cfb)
[comment]: # ( SHA256STAMP:c5895e85860542fa6d71d4acf8b1e0d43acaf395331b357064150ee1d52ddcca)

View File

@ -72,17 +72,18 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **psbt** (string): Unsigned PSBT which fulfills the parameters given
- **feerate_per_kw** (u32): The feerate used to create the PSBT, in satoshis-per-kiloweight
- **estimated_final_weight** (u32): The estimated weight of the transaction once fully signed
- **excess_msat** (msat): The amount above *satoshi* which is available. This could be zero, or dust; it will be zero if *change_outnum* is also returned
- **change_outnum** (u32, optional): The 0-based output number where change was placed (only if parameter *excess_as_change* was true and there was sufficient funds)
- **feerate\_per\_kw** (u32): The feerate used to create the PSBT, in satoshis-per-kiloweight
- **estimated\_final\_weight** (u32): The estimated weight of the transaction once fully signed
- **excess\_msat** (msat): The amount above *satoshi* which is available. This could be zero, or dust; it will be zero if *change_outnum* is also returned
- **change\_outnum** (u32, optional): The 0-based output number where change was placed (only if parameter *excess_as_change* was true and there was sufficient funds)
- **reservations** (array of objects, optional): If *reserve* was true or a non-zero number, just as per lightning-reserveinputs(7):
- **txid** (txid): The txid of the transaction
- **vout** (u32): The 0-based output number
- **was_reserved** (boolean): Whether this output was previously reserved (always *false*)
- **was\_reserved** (boolean): Whether this output was previously reserved (always *false*)
- **reserved** (boolean): Whether this output is now reserved (always *true*)
- **reserved_to_block** (u32): The blockheight the reservation will expire
- **reserved\_to\_block** (u32): The blockheight the reservation will expire
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -114,4 +115,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:0cd239969d70c9261f0d7309762e3d2e646ddd0c62dc7dd8b08515c03cc5385b)
[comment]: # ( SHA256STAMP:7503bff4054024adf29a560f8612e2c504fe1252c71c3a3bb08282808fb299a7)

View File

@ -27,19 +27,20 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **id** (pubkey): The public key unique to this node
- **alias** (string): The fun alias this node will advertize (up to 32 characters)
- **color** (hex): The favorite RGB color this node will advertize (always 6 characters)
- **num_peers** (u32): The total count of peers, connected or with channels
- **num_pending_channels** (u32): The total count of channels being opened
- **num_active_channels** (u32): The total count of channels in normal state
- **num_inactive_channels** (u32): The total count of channels waiting for opening or closing transactions to be mined
- **num\_peers** (u32): The total count of peers, connected or with channels
- **num\_pending\_channels** (u32): The total count of channels being opened
- **num\_active\_channels** (u32): The total count of channels in normal state
- **num\_inactive\_channels** (u32): The total count of channels waiting for opening or closing transactions to be mined
- **version** (string): Identifies what bugs you are running into
- **lightning-dir** (string): Identifies where you can find the configuration and other related files
- **blockheight** (u32): The highest block height we've learned
- **network** (string): represents the type of network on the node are working (e.g: `bitcoin`, `testnet`, or `regtest`)
- **fees_collected_msat** (msat): Total routing fees collected by this node
- **our_features** (object, optional): Our BOLT #9 feature bits (as hexstring) for various contexts:
- **fees\_collected\_msat** (msat): Total routing fees collected by this node
- **our\_features** (object, optional): Our BOLT #9 feature bits (as hexstring) for various contexts:
- **init** (hex): features (incl. globalfeatures) in our init message, these also restrict what we offer in open_channel or accept in accept_channel
- **node** (hex): features in our node_announcement message
- **channel** (hex): negotiated channel features we (as channel initiator) publish in the channel_announcement message
@ -49,6 +50,7 @@ On success, an object is returned, containing:
- **port** (u16): port number
If **type** is "dns", "ipv4", "ipv6", "torv2" or "torv3":
- **address** (string): address in expected format for **type**
- **binding** (array of objects, optional): The addresses we are listening on:
- **type** (string): Type of connection (one of "local socket", "ipv4", "ipv6", "torv2", "torv3")
@ -57,8 +59,9 @@ On success, an object is returned, containing:
- **socket** (string, optional): socket filename (only if **type** is "local socket")
The following warnings may also be returned:
- **warning_bitcoind_sync**: Bitcoind is not up-to-date with network.
- **warning_lightningd_sync**: Lightningd is still loading latest blocks from bitcoind.
- **warning\_bitcoind\_sync**: Bitcoind is not up-to-date with network.
- **warning\_lightningd\_sync**: Lightningd is still loading latest blocks from bitcoind.
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -128,4 +131,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:aedad2e6949f96d8d331e39c17effe5786816729562987b058d146b4b94286cb)
[comment]: # ( SHA256STAMP:a517e840e673273a35128e8168d8f58f7795bf0bcfca00f25b859f6e171b08a0)

View File

@ -30,27 +30,31 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **created_at** (string): UNIX timestamp with 9 decimal places, when logging was initialized
- **bytes_used** (u32): The number of bytes used by logging records
- **bytes_max** (u32): The bytes_used values at which records will be trimmed
- **created\_at** (string): UNIX timestamp with 9 decimal places, when logging was initialized
- **bytes\_used** (u32): The number of bytes used by logging records
- **bytes\_max** (u32): The bytes_used values at which records will be trimmed
- **log** (array of objects):
- **type** (string) (one of "SKIPPED", "BROKEN", "UNUSUAL", "INFO", "DEBUG", "IO_IN", "IO_OUT")
If **type** is "SKIPPED":
- **num_skipped** (u32): number of unprinted log entries (deleted or below *level* parameter)
- **num\_skipped** (u32): number of unprinted log entries (deleted or below *level* parameter)
If **type** is "BROKEN", "UNUSUAL", "INFO" or "DEBUG":
- **time** (string): UNIX timestamp with 9 decimal places after **created_at**
- **source** (string): The particular logbook this was found in
- **log** (string): The actual log message
- **node_id** (pubkey, optional): The peer this is associated with
- **node\_id** (pubkey, optional): The peer this is associated with
If **type** is "IO_IN" or "IO_OUT":
- **time** (string): Seconds after **created_at**, with 9 decimal places
- **source** (string): The particular logbook this was found in
- **log** (string): The associated log message
- **data** (hex): The IO which occurred
- **node_id** (pubkey, optional): The peer this is associated with
- **node\_id** (pubkey, optional): The peer this is associated with
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -90,4 +94,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:46482f3cc6b332b284cae1b1e5477b19e227cb6c1cd1086452d28f0887433cb1)
[comment]: # ( SHA256STAMP:95995a847dd9f3c2d51494a396761b42051e44bb6376de2e3c3e72634e7fd079)

View File

@ -279,10 +279,11 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **route** is returned. It is an array of objects, where each object contains:
- **id** (pubkey): The node at the end of this hop
- **channel** (short_channel_id): The channel joining these nodes
- **direction** (u32): 0 if this channel is traversed from lesser to greater **id**, otherwise 1
- **amount_msat** (msat): The amount expected by the node at the end of this hop
- **amount\_msat** (msat): The amount expected by the node at the end of this hop
- **delay** (u32): The total CLTV expected by the node at the end of this hop
- **style** (string): The features understood by the destination node (always "tlv")
@ -309,4 +310,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:db8834d9a318688d2c4801b85f06aa5afb3120e064b3654433469bca09e776a0)
[comment]: # ( SHA256STAMP:7aca069c04bac7139f82387d91e0ea148cc42f375c4cb11232189c874be87dcf)

View File

@ -30,6 +30,7 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **help** (array of objects):
- **command** (string): the command
- **category** (string): the category for this command (useful for grouping)
@ -67,4 +68,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:881f00fb7943bc1655c054488643a4da37742b6705924f0ba33366e8cf3f2b93)
[comment]: # ( SHA256STAMP:a87a95be3154ca98238cea4abdcb0524a831a0f78998b82eed1041da742ffa4c)

View File

@ -19,25 +19,29 @@ as well as derive secrets used in channel commitments.
METHODS
-------
**encrypt** *hsm\_secret* *password*
Encrypt the `hsm_secret` file so that it can only be decrypted at
**encrypt** *hsm\_secret* *password*
Encrypt the `hsm_secret` file so that it can only be decrypted at
**lightningd** startup.
You must give the option **--encrypted-hsm** to **lightningd**.
The password of the `hsm_secret` file will be asked whenever you
start **lightningd**.
**decrypt** *hsm\_secret* *password*
Decrypt the `hsm_secret` file that was encrypted with the **encrypt**
**decrypt** *hsm\_secret* *password*
Decrypt the `hsm_secret` file that was encrypted with the **encrypt**
method.
**dumpcommitments** *node\_id* *channel\_dbid* *depth* *hsm\_secret* \[*password*\]
Show the per-commitment secret and point of up to *depth* commitments,
**dumpcommitments** *node\_id* *channel\_dbid* *depth* *hsm\_secret* \[*password*\]
Show the per-commitment secret and point of up to *depth* commitments,
of the specified channel with the specified peer,
identified by the channel database index.
Specify *password* if the `hsm_secret` is encrypted.
**guesstoremote** *p2wpkh* *node\_id* *max\_channel\_dbid* *hsm\_secret* \[*password*\]
Brute-force the private key to our funds from a remote unilateral close
**guesstoremote** *p2wpkh* *node\_id* *max\_channel\_dbid* *hsm\_secret* \[*password*\]
Brute-force the private key to our funds from a remote unilateral close
of a channel, in a case where we have lost all database data except for
our `hsm_secret`.
The peer must be the one to close the channel (and the funds will remain
@ -49,13 +53,13 @@ ever had.
Specify *password* if the `hsm_secret` is encrypted.
**generatehsm** *hsm\_secret\_path*
Generates a new hsm_secret using BIP39.
Generates a new hsm_secret using BIP39.
**checkhsm** *hsm\_secret\_path*
Checks that hsm_secret matchs a BIP39 pass phrase.
Checks that hsm_secret matchs a BIP39 pass phrase.
**dumponchaindescriptors** *hsm_secret* \[*password*\] \[*network*\]
Dump output descriptors for our onchain wallet.
**dumponchaindescriptors** *hsm_secret* \[*password*\] \[*network*\]
Dump output descriptors for our onchain wallet.
The descriptors can be used by external services to be able to generate
addresses for our onchain wallet. (for example on `bitcoind` using the
`importmulti` or `importdescriptors` RPC calls)

View File

@ -77,17 +77,19 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **bolt11** (string): the bolt11 string
- **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **payment_secret** (secret): the *payment_secret* to place in the onion (always 64 characters)
- **expires_at** (u64): UNIX timestamp of when invoice expires
- **payment\_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **payment\_secret** (secret): the *payment_secret* to place in the onion (always 64 characters)
- **expires\_at** (u64): UNIX timestamp of when invoice expires
The following warnings may also be returned:
- **warning_capacity**: even using all possible channels, there's not enough incoming capacity to pay this invoice.
- **warning_offline**: there would be enough incoming capacity, but some channels are offline, so there isn't.
- **warning_deadends**: there would be enough incoming capacity, but some channels are dead-ends (no other public channels from those peers), so there isn't.
- **warning_private_unused**: there would be enough incoming capacity, but some channels are unannounced and *exposeprivatechannels* is *false*, so there isn't.
- **warning_mpp**: there is sufficient capacity, but not in a single channel, so the payer will have to use multi-part payments.
- **warning\_capacity**: even using all possible channels, there's not enough incoming capacity to pay this invoice.
- **warning\_offline**: there would be enough incoming capacity, but some channels are offline, so there isn't.
- **warning\_deadends**: there would be enough incoming capacity, but some channels are dead-ends (no other public channels from those peers), so there isn't.
- **warning\_private\_unused**: there would be enough incoming capacity, but some channels are unannounced and *exposeprivatechannels* is *false*, so there isn't.
- **warning\_mpp**: there is sufficient capacity, but not in a single channel, so the payer will have to use multi-part payments.
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -117,4 +119,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:ea76df1915a45de45039cbbe8add3fe86416f7cba133d8f0d364d28ef276198c)
[comment]: # ( SHA256STAMP:8e72905b6a11d025e5955b9997213d8219e1290cc26307fe517a3e0f19cc818e)

View File

@ -67,17 +67,19 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **payment_preimage** (secret): the proof of payment: SHA256 of this **payment_hash** (always 64 characters)
- **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **created_at** (number): the UNIX timestamp showing when this payment was initiated
- **payment\_preimage** (secret): the proof of payment: SHA256 of this **payment_hash** (always 64 characters)
- **payment\_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **created\_at** (number): the UNIX timestamp showing when this payment was initiated
- **parts** (u32): how many attempts this took
- **amount_msat** (msat): Amount the recipient received
- **amount_sent_msat** (msat): Total amount we sent (including fees)
- **amount\_msat** (msat): Amount the recipient received
- **amount\_sent\_msat** (msat): Total amount we sent (including fees)
- **status** (string): status of payment (always "complete")
- **destination** (pubkey, optional): the final destination of the payment
The following warnings may also be returned:
- **warning_partial_completion**: Not all parts of a multi-part payment have completed
- **warning\_partial\_completion**: Not all parts of a multi-part payment have completed
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -114,4 +116,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:f8e12220302756c5a95eef2ec428c1d7adaba3025b0716e6b6581f783d92b648)
[comment]: # ( SHA256STAMP:6aca5a797d5e9bca63bbdc478d5ee0ce1dde592d3a4a4247f75d1831c8e6f38a)

View File

@ -32,21 +32,22 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **channels** is returned. It is an array of objects, where each object contains:
- **source** (pubkey): the source node
- **destination** (pubkey): the destination node
- **short_channel_id** (short_channel_id): short channel id of channel
- **short\_channel\_id** (short_channel_id): short channel id of channel
- **public** (boolean): true if this is announced (otherwise it must be our channel)
- **amount_msat** (msat): the total capacity of this channel (always a whole number of satoshis)
- **message_flags** (u8): as defined by BOLT #7
- **channel_flags** (u8): as defined by BOLT #7
- **amount\_msat** (msat): the total capacity of this channel (always a whole number of satoshis)
- **message\_flags** (u8): as defined by BOLT #7
- **channel\_flags** (u8): as defined by BOLT #7
- **active** (boolean): true unless source has disabled it, or it's a local channel and the peer is disconnected or it's still opening or closing
- **last_update** (u32): UNIX timestamp on the last channel_update from *source*
- **base_fee_millisatoshi** (u32): Base fee changed by *source* to use this channel
- **fee_per_millionth** (u32): Proportional fee changed by *source* to use this channel, in parts-per-million
- **last\_update** (u32): UNIX timestamp on the last channel_update from *source*
- **base\_fee\_millisatoshi** (u32): Base fee changed by *source* to use this channel
- **fee\_per\_millionth** (u32): Proportional fee changed by *source* to use this channel, in parts-per-million
- **delay** (u32): The number of blocks delay required by *source* to use this channel
- **htlc_minimum_msat** (msat): The smallest payment *source* will allow via this channel
- **htlc\_minimum\_msat** (msat): The smallest payment *source* will allow via this channel
- **features** (hex): BOLT #9 features bitmap for this channel
- **htlc_maximum_msat** (msat, optional): The largest payment *source* will allow via this channel
- **htlc\_maximum\_msat** (msat, optional): The largest payment *source* will allow via this channel
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -78,4 +79,4 @@ Lightning RFC site
- BOLT \#7:
<https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md>
[comment]: # ( SHA256STAMP:43c6c45c0672482610c1bdd607d5bf6ed26d6c42cfc4fbde4a5d24f2eb1d9a2d)
[comment]: # ( SHA256STAMP:2c4d604d1cec7372129bc863b1e056943abb24d6a354c0e9ae76d8fdecfd4953)

View File

@ -34,6 +34,7 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **# version** (string, optional): Special field indicating the current version
- **plugins** (array of objects, optional):
- **path** (string): Full path of the plugin
@ -214,4 +215,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:999502771ada48f32011ea4df2443a2a3385d27377d8e55ec82cf283f9acd0a6)
[comment]: # ( SHA256STAMP:633de58c810a3d0692e4fe7c58265cf4eec1fe85dffc0139a9af1b23936b61e8)

View File

@ -20,6 +20,7 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **datastore** is returned. It is an array of objects, where each object contains:
- **key** (array of strings):
- Part of the key added to the datastore
- **generation** (u64, optional): The number of times this has been updated
@ -46,4 +47,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:6c6f4c08a88b2a8c8cdc4c36783da86d8e8de0d5ee39261f3304e0eb41f0eb41)
[comment]: # ( SHA256STAMP:45448ccd8947127b2008b4b7d8ab30bb348a45c9ddbced2c690d8b08a102d058)

View File

@ -23,22 +23,26 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **forwards** is returned. It is an array of objects, where each object contains:
- **in_channel** (short_channel_id): the channel that received the HTLC
- **in_msat** (msat): the value of the incoming HTLC
- **in\_channel** (short_channel_id): the channel that received the HTLC
- **in\_msat** (msat): the value of the incoming HTLC
- **status** (string): still ongoing, completed, failed locally, or failed after forwarding (one of "offered", "settled", "local_failed", "failed")
- **received_time** (number): the UNIX timestamp when this was received
- **out_channel** (short_channel_id, optional): the channel that the HTLC (trying to) forward to
- **payment_hash** (hex, optional): payment hash sought by HTLC (always 64 characters)
- **received\_time** (number): the UNIX timestamp when this was received
- **out\_channel** (short_channel_id, optional): the channel that the HTLC (trying to) forward to
- **payment\_hash** (hex, optional): payment hash sought by HTLC (always 64 characters)
- **style** (string, optional): Either a legacy onion format or a modern tlv format (one of "legacy", "tlv")
If **out_msat** is present:
- **fee_msat** (msat): the amount this paid in fees
- **out_msat** (msat): the amount we sent out the *out_channel*
If **out\_msat** is present:
- **fee\_msat** (msat): the amount this paid in fees
- **out\_msat** (msat): the amount we sent out the *out_channel*
If **status** is "settled" or "failed":
- **resolved_time** (number): the UNIX timestamp when this was resolved
- **resolved\_time** (number): the UNIX timestamp when this was resolved
If **status** is "local_failed" or "failed":
- **failcode** (u32, optional): the numeric onion code returned
- **failreason** (string, optional): the name of the onion code returned
@ -59,4 +63,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:de237318dfea0b02d6ca34710432a3b739012beb84f74e41e720cd9889675954)
[comment]: # ( SHA256STAMP:e3c26f73040deb441a572d848eda3d6da924c490e5b9ac55c5d87432f4144646)

View File

@ -21,10 +21,11 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **outputs** (array of objects):
- **txid** (txid): the ID of the spendable transaction
- **output** (u32): the index within *txid*
- **amount_msat** (msat): the amount of the output
- **amount\_msat** (msat): the amount of the output
- **scriptpubkey** (hex): the scriptPubkey of the output
- **status** (string) (one of "unconfirmed", "confirmed", "spent")
- **reserved** (boolean): whether this UTXO is currently reserved for an in-flight tx
@ -32,24 +33,28 @@ On success, an object is returned, containing:
- **redeemscript** (hex, optional): the redeemscript, only if it's p2sh-wrapped
If **status** is "confirmed":
- **blockheight** (u32): Block height where it was confirmed
If **reserved** is "true":
- **reserved_to_block** (u32): Block height where reservation will expire
- **reserved\_to\_block** (u32): Block height where reservation will expire
- **channels** (array of objects):
- **peer_id** (pubkey): the peer with which the channel is opened
- **our_amount_msat** (msat): available satoshis on our node's end of the channel
- **amount_msat** (msat): total channel value
- **funding_txid** (txid): funding transaction id
- **funding_output** (u32): the 0-based index of the output in the funding transaction
- **peer\_id** (pubkey): the peer with which the channel is opened
- **our\_amount\_msat** (msat): available satoshis on our node's end of the channel
- **amount\_msat** (msat): total channel value
- **funding\_txid** (txid): funding transaction id
- **funding\_output** (u32): the 0-based index of the output in the funding transaction
- **connected** (boolean): whether the channel peer is connected
- **state** (string): the channel state, in particular "CHANNELD_NORMAL" means the channel can be used normally (one of "OPENINGD", "CHANNELD_AWAITING_LOCKIN", "CHANNELD_NORMAL", "CHANNELD_SHUTTING_DOWN", "CLOSINGD_SIGEXCHANGE", "CLOSINGD_COMPLETE", "AWAITING_UNILATERAL", "FUNDING_SPEND_SEEN", "ONCHAIN", "DUALOPEND_OPEN_INIT", "DUALOPEND_AWAITING_LOCKIN")
If **state** is "CHANNELD_NORMAL":
- **short_channel_id** (short_channel_id): short channel id of channel
- **short\_channel\_id** (short_channel_id): short channel id of channel
If **state** is "CHANNELD_SHUTTING_DOWN", "CLOSINGD_SIGEXCHANGE", "CLOSINGD_COMPLETE", "AWAITING_UNILATERAL", "FUNDING_SPEND_SEEN" or "ONCHAIN":
- **short_channel_id** (short_channel_id, optional): short channel id of channel (only if funding reached lockin depth before closing)
- **short\_channel\_id** (short_channel_id, optional): short channel id of channel (only if funding reached lockin depth before closing)
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -68,4 +73,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:61be4b00c0485edccb986e1f066cf18a5c9fdb8bca94adc12f0a87a36041a93a)
[comment]: # ( SHA256STAMP:319598cb35f3a9c6f336191363b1e38df74b467c0989942b5f4e0a998d0f6339)

View File

@ -22,22 +22,24 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **invoices** is returned. It is an array of objects, where each object contains:
- **label** (string): unique label supplied at invoice creation
- **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **payment\_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **status** (string): Whether it's paid, unpaid or unpayable (one of "unpaid", "paid", "expired")
- **expires_at** (u64): UNIX timestamp of when it will become / became unpayable
- **expires\_at** (u64): UNIX timestamp of when it will become / became unpayable
- **description** (string, optional): description used in the invoice
- **amount_msat** (msat, optional): the amount required to pay this invoice
- **amount\_msat** (msat, optional): the amount required to pay this invoice
- **bolt11** (string, optional): the BOLT11 string (always present unless *bolt12* is)
- **bolt12** (string, optional): the BOLT12 string (always present unless *bolt11* is)
- **local_offer_id** (hex, optional): the *id* of our offer which created this invoice (**experimental-offers** only). (always 64 characters)
- **payer_note** (string, optional): the optional *payer_note* from invoice_request which created this invoice (**experimental-offers** only).
- **local\_offer\_id** (hex, optional): the *id* of our offer which created this invoice (**experimental-offers** only). (always 64 characters)
- **payer\_note** (string, optional): the optional *payer_note* from invoice_request which created this invoice (**experimental-offers** only).
If **status** is "paid":
- **pay_index** (u64): Unique incrementing index for this payment
- **amount_received_msat** (msat): the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)
- **paid_at** (u64): UNIX timestamp of when it was paid
- **payment_preimage** (secret): proof of payment (always 64 characters)
- **pay\_index** (u64): Unique incrementing index for this payment
- **amount\_received\_msat** (msat): the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)
- **paid\_at** (u64): UNIX timestamp of when it was paid
- **payment\_preimage** (secret): proof of payment (always 64 characters)
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -56,4 +58,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:7e45fcb50a446f35e441df4a6c04626a045d237407231bde044c95aabc689519)
[comment]: # ( SHA256STAMP:bfa699310cf025668febb42385b52e6238dfbbc0b5303a28989433d3645495c2)

View File

@ -28,10 +28,12 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **nodes** is returned. It is an array of objects, where each object contains:
- **nodeid** (pubkey): the public key of the node
- **last_timestamp** (u32, optional): A node_announcement has been received for this node (UNIX timestamp)
If **last_timestamp** is present:
- **nodeid** (pubkey): the public key of the node
- **last\_timestamp** (u32, optional): A node_announcement has been received for this node (UNIX timestamp)
If **last\_timestamp** is present:
- **alias** (string): The fun alias this node advertized (up to 32 characters)
- **color** (hex): The favorite RGB color this node advertized (always 6 characters)
- **features** (hex): BOLT #9 features bitmap this node advertized
@ -40,16 +42,18 @@ If **last_timestamp** is present:
- **port** (u16): port number
If **type** is "dns", "ipv4", "ipv6", "torv2" or "torv3":
- **address** (string): address in expected format for **type**
If **option_will_fund** is present:
- **option_will_fund** (object):
- **lease_fee_base_msat** (msat): the fixed fee for a lease (whole number of satoshis)
- **lease_fee_basis** (u32): the proportional fee in basis points (parts per 10,000) for a lease
- **funding_weight** (u32): the onchain weight you'll have to pay for a lease
- **channel_fee_max_base_msat** (msat): the maximum base routing fee this node will charge during the lease
- **channel_fee_max_proportional_thousandths** (u32): the maximum proportional routing fee this node will charge during the lease (in thousandths, not millionths like channel_update)
- **compact_lease** (hex): the lease as represented in the node_announcement
If **option\_will\_fund** is present:
- **option\_will\_fund** (object):
- **lease\_fee\_base\_msat** (msat): the fixed fee for a lease (whole number of satoshis)
- **lease\_fee\_basis** (u32): the proportional fee in basis points (parts per 10,000) for a lease
- **funding\_weight** (u32): the onchain weight you'll have to pay for a lease
- **channel\_fee\_max\_base\_msat** (msat): the maximum base routing fee this node will charge during the lease
- **channel\_fee\_max\_proportional\_thousandths** (u32): the maximum proportional routing fee this node will charge during the lease (in thousandths, not millionths like channel_update)
- **compact\_lease** (hex): the lease as represented in the node_announcement
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -95,4 +99,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:df4e056ac91672041b38811329eb7555636c7b4d4985456894255a7b8e11bf54)
[comment]: # ( SHA256STAMP:452467d60a45d9d685b054644c94a8b7998d5e9f5dd30474006fe9f4f002eb67)

View File

@ -31,11 +31,12 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **offers** is returned. It is an array of objects, where each object contains:
- **offer_id** (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
- **offer\_id** (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
- **active** (boolean): whether this can still be used
- **single_use** (boolean): whether this expires as soon as it's paid
- **single\_use** (boolean): whether this expires as soon as it's paid
- **bolt12** (string): the bolt12 encoding of the offer
- **bolt12_unsigned** (string): the bolt12 encoding of the offer, without signature
- **bolt12\_unsigned** (string): the bolt12 encoding of the offer, without signature
- **used** (boolean): True if an associated invoice has been paid
- **label** (string, optional): the (optional) user-specified label
@ -80,4 +81,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:aad235e8255da495032f638a7066b05d651e2c99b668f7b3afffb21d908c788a)
[comment]: # ( SHA256STAMP:61677f64d10f6ffad32d19f98273925c5f2a1d9cda47bdb5c44cf5a30a34a62d)

View File

@ -18,9 +18,10 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **pays** is returned. It is an array of objects, where each object contains:
- **payment_hash** (hex): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **payment\_hash** (hex): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **status** (string): status of the payment (one of "pending", "failed", "complete")
- **created_at** (u64): the UNIX timestamp showing when this payment was initiated
- **created\_at** (u64): the UNIX timestamp showing when this payment was initiated
- **destination** (pubkey, optional): the final destination of the payment if known
- **label** (string, optional): the label, if given to sendpay
- **bolt11** (string, optional): the bolt11 string (if pay supplied one)
@ -28,14 +29,17 @@ On success, an object containing **pays** is returned. It is an array of object
- **bolt12** (string, optional): the bolt12 string (if supplied for pay: **experimental-offers** only).
If **status** is "pending" or "complete":
- **amount_sent_msat** (msat): the amount we actually sent, including fees
- **amount_msat** (msat, optional): the amount the destination received, if known
- **amount\_sent\_msat** (msat): the amount we actually sent, including fees
- **amount\_msat** (msat, optional): the amount the destination received, if known
If **status** is "complete":
- **preimage** (hex): proof of payment (always 64 characters)
- **number_of_parts** (u64, optional): the number of parts for a successful payment (only if more than one).
- **number\_of\_parts** (u64, optional): the number of parts for a successful payment (only if more than one).
If **status** is "failed":
- **erroronion** (hex, optional): the error onion returned on failure, if any.
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -57,4 +61,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:ec7234aa1ec9979cdc71a5bfe861296ba90efdf30236922a822b2ecab6fd9635)
[comment]: # ( SHA256STAMP:fd723be0ea9b4d6722adad5d325de6cf9c53e1842281205a82ee74ab702a17bd)

View File

@ -40,6 +40,7 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **peers** is returned. It is an array of objects, where each object contains:
- **id** (pubkey): the public key of the peer
- **connected** (boolean): True if the peer is currently connected
- **channels** (array of objects):
@ -47,126 +48,136 @@ On success, an object containing **peers** is returned. It is an array of objec
- **opener** (string): Who initiated the channel (one of "local", "remote")
- **features** (array of strings):
- BOLT #9 features which apply to this channel (one of "option_static_remotekey", "option_anchor_outputs", "option_zeroconf")
- **scratch_txid** (txid, optional): The txid we would use if we went onchain now
- **scratch\_txid** (txid, optional): The txid we would use if we went onchain now
- **feerate** (object, optional): Feerates for the current tx:
- **perkw** (u32): Feerate per 1000 weight (i.e kSipa)
- **perkb** (u32): Feerate per 1000 virtual bytes
- **owner** (string, optional): The current subdaemon controlling this connection
- **short_channel_id** (short_channel_id, optional): The short_channel_id (once locked in)
- **channel_id** (hash, optional): The full channel_id (always 64 characters)
- **funding_txid** (txid, optional): ID of the funding transaction
- **funding_outnum** (u32, optional): The 0-based output number of the funding transaction which opens the channel
- **initial_feerate** (string, optional): For inflight opens, the first feerate used to initiate the channel open
- **last_feerate** (string, optional): For inflight opens, the most recent feerate used on the channel open
- **next_feerate** (string, optional): For inflight opens, the next feerate we'll use for the channel open
- **next_fee_step** (u32, optional): For inflight opens, the next feerate step we'll use for the channel open
- **short\_channel\_id** (short_channel_id, optional): The short_channel_id (once locked in)
- **channel\_id** (hash, optional): The full channel_id (always 64 characters)
- **funding\_txid** (txid, optional): ID of the funding transaction
- **funding\_outnum** (u32, optional): The 0-based output number of the funding transaction which opens the channel
- **initial\_feerate** (string, optional): For inflight opens, the first feerate used to initiate the channel open
- **last\_feerate** (string, optional): For inflight opens, the most recent feerate used on the channel open
- **next\_feerate** (string, optional): For inflight opens, the next feerate we'll use for the channel open
- **next\_fee\_step** (u32, optional): For inflight opens, the next feerate step we'll use for the channel open
- **inflight** (array of objects, optional): Current candidate funding transactions (only for dual-funding):
- **funding_txid** (txid): ID of the funding transaction
- **funding_outnum** (u32): The 0-based output number of the funding transaction which opens the channel
- **funding\_txid** (txid): ID of the funding transaction
- **funding\_outnum** (u32): The 0-based output number of the funding transaction which opens the channel
- **feerate** (string): The feerate for this funding transaction in per-1000-weight, with "kpw" appended
- **total_funding_msat** (msat): total amount in the channel
- **our_funding_msat** (msat): amount we have in the channel
- **scratch_txid** (txid): The commitment transaction txid we would use if we went onchain now
- **close_to** (hex, optional): scriptPubkey which we have to close to if we mutual close
- **total\_funding\_msat** (msat): total amount in the channel
- **our\_funding\_msat** (msat): amount we have in the channel
- **scratch\_txid** (txid): The commitment transaction txid we would use if we went onchain now
- **close\_to** (hex, optional): scriptPubkey which we have to close to if we mutual close
- **private** (boolean, optional): if False, we will not announce this channel
- **closer** (string, optional): Who initiated the channel close (one of "local", "remote")
- **funding** (object, optional):
- **local_funds_msat** (msat): Amount of channel we funded
- **remote_funds_msat** (msat): Amount of channel they funded
- **local_msat** (msat, optional): Amount of channel we funded (deprecated)
- **remote_msat** (msat, optional): Amount of channel they funded (deprecated)
- **pushed_msat** (msat, optional): Amount pushed from opener to peer
- **fee_paid_msat** (msat, optional): Amount we paid peer at open
- **fee_rcvd_msat** (msat, optional): Amount we were paid by peer at open
- **to_us_msat** (msat, optional): how much of channel is owed to us
- **min_to_us_msat** (msat, optional): least amount owed to us ever
- **max_to_us_msat** (msat, optional): most amount owed to us ever
- **total_msat** (msat, optional): total amount in the channel
- **fee_base_msat** (msat, optional): amount we charge to use the channel
- **fee_proportional_millionths** (u32, optional): amount we charge to use the channel in parts-per-million
- **dust_limit_msat** (msat, optional): minimum amount for an output on the channel transactions
- **max_total_htlc_in_msat** (msat, optional): max amount accept in a single payment
- **their_reserve_msat** (msat, optional): minimum we insist they keep in channel
- **our_reserve_msat** (msat, optional): minimum they insist we keep in channel
- **spendable_msat** (msat, optional): total we could send through channel
- **receivable_msat** (msat, optional): total peer could send through channel
- **minimum_htlc_in_msat** (msat, optional): the minimum amount HTLC we accept
- **minimum_htlc_out_msat** (msat, optional): the minimum amount HTLC we will send
- **maximum_htlc_out_msat** (msat, optional): the maximum amount HTLC we will send
- **their_to_self_delay** (u32, optional): the number of blocks before they can take their funds if they unilateral close
- **our_to_self_delay** (u32, optional): the number of blocks before we can take our funds if we unilateral close
- **max_accepted_htlcs** (u32, optional): Maximum number of incoming HTLC we will accept at once
- **local\_funds\_msat** (msat): Amount of channel we funded
- **remote\_funds\_msat** (msat): Amount of channel they funded
- **local\_msat** (msat, optional): Amount of channel we funded (deprecated)
- **remote\_msat** (msat, optional): Amount of channel they funded (deprecated)
- **pushed\_msat** (msat, optional): Amount pushed from opener to peer
- **fee\_paid\_msat** (msat, optional): Amount we paid peer at open
- **fee\_rcvd\_msat** (msat, optional): Amount we were paid by peer at open
- **to\_us\_msat** (msat, optional): how much of channel is owed to us
- **min\_to\_us\_msat** (msat, optional): least amount owed to us ever
- **max\_to\_us\_msat** (msat, optional): most amount owed to us ever
- **total\_msat** (msat, optional): total amount in the channel
- **fee\_base\_msat** (msat, optional): amount we charge to use the channel
- **fee\_proportional\_millionths** (u32, optional): amount we charge to use the channel in parts-per-million
- **dust\_limit\_msat** (msat, optional): minimum amount for an output on the channel transactions
- **max\_total\_htlc\_in\_msat** (msat, optional): max amount accept in a single payment
- **their\_reserve\_msat** (msat, optional): minimum we insist they keep in channel
- **our\_reserve\_msat** (msat, optional): minimum they insist we keep in channel
- **spendable\_msat** (msat, optional): total we could send through channel
- **receivable\_msat** (msat, optional): total peer could send through channel
- **minimum\_htlc\_in\_msat** (msat, optional): the minimum amount HTLC we accept
- **minimum\_htlc\_out\_msat** (msat, optional): the minimum amount HTLC we will send
- **maximum\_htlc\_out\_msat** (msat, optional): the maximum amount HTLC we will send
- **their\_to\_self\_delay** (u32, optional): the number of blocks before they can take their funds if they unilateral close
- **our\_to\_self\_delay** (u32, optional): the number of blocks before we can take our funds if we unilateral close
- **max\_accepted\_htlcs** (u32, optional): Maximum number of incoming HTLC we will accept at once
- **alias** (object, optional):
- **local** (short_channel_id, optional): An alias assigned by this node to this channel, used for outgoing payments
- **remote** (short_channel_id, optional): An alias assigned by the remote node to this channel, usable in routehints and invoices
- **state_changes** (array of objects, optional): Prior state changes:
- **state\_changes** (array of objects, optional): Prior state changes:
- **timestamp** (string): UTC timestamp of form YYYY-mm-ddTHH:MM:SS.%03dZ
- **old_state** (string): Previous state (one of "OPENINGD", "CHANNELD_AWAITING_LOCKIN", "CHANNELD_NORMAL", "CHANNELD_SHUTTING_DOWN", "CLOSINGD_SIGEXCHANGE", "CLOSINGD_COMPLETE", "AWAITING_UNILATERAL", "FUNDING_SPEND_SEEN", "ONCHAIN", "DUALOPEND_OPEN_INIT", "DUALOPEND_AWAITING_LOCKIN")
- **new_state** (string): New state (one of "OPENINGD", "CHANNELD_AWAITING_LOCKIN", "CHANNELD_NORMAL", "CHANNELD_SHUTTING_DOWN", "CLOSINGD_SIGEXCHANGE", "CLOSINGD_COMPLETE", "AWAITING_UNILATERAL", "FUNDING_SPEND_SEEN", "ONCHAIN", "DUALOPEND_OPEN_INIT", "DUALOPEND_AWAITING_LOCKIN")
- **old\_state** (string): Previous state (one of "OPENINGD", "CHANNELD_AWAITING_LOCKIN", "CHANNELD_NORMAL", "CHANNELD_SHUTTING_DOWN", "CLOSINGD_SIGEXCHANGE", "CLOSINGD_COMPLETE", "AWAITING_UNILATERAL", "FUNDING_SPEND_SEEN", "ONCHAIN", "DUALOPEND_OPEN_INIT", "DUALOPEND_AWAITING_LOCKIN")
- **new\_state** (string): New state (one of "OPENINGD", "CHANNELD_AWAITING_LOCKIN", "CHANNELD_NORMAL", "CHANNELD_SHUTTING_DOWN", "CLOSINGD_SIGEXCHANGE", "CLOSINGD_COMPLETE", "AWAITING_UNILATERAL", "FUNDING_SPEND_SEEN", "ONCHAIN", "DUALOPEND_OPEN_INIT", "DUALOPEND_AWAITING_LOCKIN")
- **cause** (string): What caused the change (one of "unknown", "local", "user", "remote", "protocol", "onchain")
- **message** (string): Human-readable explanation
- **status** (array of strings, optional):
- Billboard log of significant changes
- **in_payments_offered** (u64, optional): Number of incoming payment attempts
- **in_offered_msat** (msat, optional): Total amount of incoming payment attempts
- **in_payments_fulfilled** (u64, optional): Number of successful incoming payment attempts
- **in_fulfilled_msat** (msat, optional): Total amount of successful incoming payment attempts
- **out_payments_offered** (u64, optional): Number of outgoing payment attempts
- **out_offered_msat** (msat, optional): Total amount of outgoing payment attempts
- **out_payments_fulfilled** (u64, optional): Number of successful outgoing payment attempts
- **out_fulfilled_msat** (msat, optional): Total amount of successful outgoing payment attempts
- **in\_payments\_offered** (u64, optional): Number of incoming payment attempts
- **in\_offered\_msat** (msat, optional): Total amount of incoming payment attempts
- **in\_payments\_fulfilled** (u64, optional): Number of successful incoming payment attempts
- **in\_fulfilled\_msat** (msat, optional): Total amount of successful incoming payment attempts
- **out\_payments\_offered** (u64, optional): Number of outgoing payment attempts
- **out\_offered\_msat** (msat, optional): Total amount of outgoing payment attempts
- **out\_payments\_fulfilled** (u64, optional): Number of successful outgoing payment attempts
- **out\_fulfilled\_msat** (msat, optional): Total amount of successful outgoing payment attempts
- **htlcs** (array of objects, optional): current HTLCs in this channel:
- **direction** (string): Whether it came from peer, or is going to peer (one of "in", "out")
- **id** (u64): Unique ID for this htlc on this channel in this direction
- **amount_msat** (msat): Amount send/received for this HTLC
- **amount\_msat** (msat): Amount send/received for this HTLC
- **expiry** (u32): Block this HTLC expires at
- **payment_hash** (hash): the hash of the payment_preimage which will prove payment (always 64 characters)
- **local_trimmed** (boolean, optional): if this is too small to enforce onchain (always *true*)
- **payment\_hash** (hash): the hash of the payment_preimage which will prove payment (always 64 characters)
- **local\_trimmed** (boolean, optional): if this is too small to enforce onchain (always *true*)
- **status** (string, optional): set if this HTLC is currently waiting on a hook (and shows what plugin)
If **direction** is "out":
- **state** (string): Status of the HTLC (one of "SENT_ADD_HTLC", "SENT_ADD_COMMIT", "RCVD_ADD_REVOCATION", "RCVD_ADD_ACK_COMMIT", "SENT_ADD_ACK_REVOCATION", "RCVD_REMOVE_HTLC", "RCVD_REMOVE_COMMIT", "SENT_REMOVE_REVOCATION", "SENT_REMOVE_ACK_COMMIT", "RCVD_REMOVE_ACK_REVOCATION")
If **direction** is "in":
- **state** (string): Status of the HTLC (one of "RCVD_ADD_HTLC", "RCVD_ADD_COMMIT", "SENT_ADD_REVOCATION", "SENT_ADD_ACK_COMMIT", "RCVD_ADD_ACK_REVOCATION", "SENT_REMOVE_HTLC", "SENT_REMOVE_COMMIT", "RCVD_REMOVE_REVOCATION", "RCVD_REMOVE_ACK_COMMIT", "SENT_REMOVE_ACK_REVOCATION")
If **close_to** is present:
- **close_to_addr** (string, optional): The bitcoin address we will close to
If **close\_to** is present:
If **scratch_txid** is present:
- **last_tx_fee_msat** (msat): fee attached to this the current tx
- **close\_to\_addr** (string, optional): The bitcoin address we will close to
If **scratch\_txid** is present:
- **last\_tx\_fee\_msat** (msat): fee attached to this the current tx
If **short\_channel\_id** is present:
If **short_channel_id** is present:
- **direction** (u32): 0 if we're the lesser node_id, 1 if we're the greater
If **inflight** is present:
- **initial_feerate** (string): The feerate for the initial funding transaction in per-1000-weight, with "kpw" appended
- **last_feerate** (string): The feerate for the latest funding transaction in per-1000-weight, with "kpw" appended
- **next_feerate** (string): The minimum feerate for the next funding transaction in per-1000-weight, with "kpw" appended
- **initial\_feerate** (string): The feerate for the initial funding transaction in per-1000-weight, with "kpw" appended
- **last\_feerate** (string): The feerate for the latest funding transaction in per-1000-weight, with "kpw" appended
- **next\_feerate** (string): The minimum feerate for the next funding transaction in per-1000-weight, with "kpw" appended
- **log** (array of objects, optional): if *level* is specified, logs for this peer:
- **type** (string) (one of "SKIPPED", "BROKEN", "UNUSUAL", "INFO", "DEBUG", "IO_IN", "IO_OUT")
If **type** is "SKIPPED":
- **num_skipped** (u32): number of deleted/omitted entries
- **num\_skipped** (u32): number of deleted/omitted entries
If **type** is "BROKEN", "UNUSUAL", "INFO" or "DEBUG":
- **time** (string): UNIX timestamp with 9 decimal places
- **source** (string): The particular logbook this was found in
- **log** (string): The actual log message
- **node_id** (pubkey): The peer this is associated with
- **node\_id** (pubkey): The peer this is associated with
If **type** is "IO_IN" or "IO_OUT":
- **time** (string): UNIX timestamp with 9 decimal places
- **source** (string): The particular logbook this was found in
- **log** (string): The actual log message
- **node_id** (pubkey): The peer this is associated with
- **node\_id** (pubkey): The peer this is associated with
- **data** (hex): The IO which occurred
If **connected** is *true*:
- **netaddr** (array of strings): A single entry array:
- address, e.g. 1.2.3.4:1234
- **features** (hex): bitmap of BOLT #9 features from peer's INIT message
- **remote_addr** (string, optional): The public IPv4/6 address the peer sees us from, e.g. 1.2.3.4:1234
- **remote\_addr** (string, optional): The public IPv4/6 address the peer sees us from, e.g. 1.2.3.4:1234
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -388,4 +399,4 @@ Main web site: <https://github.com/ElementsProject/lightning> Lightning
RFC site (BOLT \#9):
<https://github.com/lightningnetwork/lightning-rfc/blob/master/09-features.md>
[comment]: # ( SHA256STAMP:971c71befa1b6968a66b65e2aab4a2d1707f14c9af5d6ebc2dc00604d1d91294)
[comment]: # ( SHA256STAMP:e80b24123fdeea4eacda71bb7d824b9234bf17c68239ebf7915d2ab747c58fdc)

View File

@ -24,13 +24,14 @@ Note that the returned array is ordered by increasing *id*.
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **payments** is returned. It is an array of objects, where each object contains:
- **id** (u64): unique ID for this payment attempt
- **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **payment\_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **status** (string): status of the payment (one of "pending", "failed", "complete")
- **created_at** (u64): the UNIX timestamp showing when this payment was initiated
- **amount_sent_msat** (msat): The amount sent
- **created\_at** (u64): the UNIX timestamp showing when this payment was initiated
- **amount\_sent\_msat** (msat): The amount sent
- **groupid** (u64, optional): Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash
- **amount_msat** (msat, optional): The amount delivered to destination (if known)
- **amount\_msat** (msat, optional): The amount delivered to destination (if known)
- **destination** (pubkey, optional): the final destination of the payment if known
- **label** (string, optional): the label, if given to sendpay
- **bolt11** (string, optional): the bolt11 string (if pay supplied one)
@ -38,9 +39,11 @@ On success, an object containing **payments** is returned. It is an array of ob
- **bolt12** (string, optional): the bolt12 string (if supplied for pay: **experimental-offers** only).
If **status** is "complete":
- **payment_preimage** (secret): the proof of payment: SHA256 of this **payment_hash** (always 64 characters)
- **payment\_preimage** (secret): the proof of payment: SHA256 of this **payment_hash** (always 64 characters)
If **status** is "failed":
- **erroronion** (hex, optional): the onion message returned
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -61,4 +64,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:fa2e28ae1fdc4df5357ecc12984b2ec478cd591868484613dccf455cbc502fd9)
[comment]: # ( SHA256STAMP:c5d98a40542cb43881bea138bf3da404eba5bc73ed9e0acc8343e0423cc9c602)

View File

@ -26,6 +26,7 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **transactions** is returned. It is an array of objects, where each object contains:
- **hash** (txid): the transaction id
- **rawtx** (hex): the raw transaction
- **blockheight** (u32): the block height of this tx
@ -40,7 +41,7 @@ On success, an object containing **transactions** is returned. It is an array o
- **channel** (short_channel_id, optional): the channel this input is associated with (*EXPERIMENTAL_FEATURES* only)
- **outputs** (array of objects): Each output, in order:
- **index** (u32): the 0-based output number
- **amount_msat** (msat): the amount of the output
- **amount\_msat** (msat): the amount of the output
- **scriptPubKey** (hex): the scriptPubKey
- **type** (string, optional): the purpose of this output (*EXPERIMENTAL_FEATURES* only) (one of "theirs", "deposit", "withdraw", "channel_funding", "channel_mutual_close", "channel_unilateral_close", "channel_sweep", "channel_htlc_success", "channel_htlc_timeout", "channel_penalty", "channel_unilateral_cheat")
- **channel** (short_channel_id, optional): the channel this output is associated with (*EXPERIMENTAL_FEATURES* only)
@ -104,4 +105,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:4d5d2f1cea0668b3e58e73a93fe6d217ac4a8c740bed09fcdce21c9e72daae99)
[comment]: # ( SHA256STAMP:e1f4e86db0fd48d695ad0c30ace5dea6f40e1502847a258ef9580e30b52712f7)

View File

@ -18,6 +18,7 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **secret** (secret): the pseudorandom key derived from HSM_secret (always 64 characters)
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -41,4 +42,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:1bd94ffa8440041efafe93440d9828be6baca199b0f5cb73220e4482582bf01d)
[comment]: # ( SHA256STAMP:47f98983bc74e75b5e9ad55ebc84771a7819717e8e41f2398d0e0227a8670044)

View File

@ -99,13 +99,14 @@ do not have a channel even if **multifundchannel** succeeded.
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **tx** (hex): The raw transaction which funded the channel
- **txid** (txid): The txid of the transaction which funded the channel
- **channel_ids** (array of objects):
- **channel\_ids** (array of objects):
- **id** (pubkey): The peer we opened the channel with
- **outnum** (u32): The 0-based output index showing which output funded the channel
- **channel_id** (hex): The channel_id of the resulting channel (always 64 characters)
- **close_to** (hex, optional): The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script`
- **channel\_id** (hex): The channel_id of the resulting channel (always 64 characters)
- **close\_to** (hex, optional): The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script`
- **failed** (array of objects, optional): any peers we failed to open with (if *minchannels* was specified less than the number of destinations):
- **id** (pubkey): The peer we failed to open the channel with
- **method** (string): What stage we failed at (one of "connect", "openchannel_init", "fundchannel_start", "fundchannel_complete")
@ -158,4 +159,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:49c7f69eb4b532802c465ac5d0421cdad176f6a28c4c8e4c1c3ee0a94faad5bf)
[comment]: # ( SHA256STAMP:d5af7087b3e31d80df0ce5c09c55b51141bfbf158802d7f5cd82caa21110453e)

View File

@ -42,6 +42,7 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **tx** (hex): The raw transaction which was sent
- **txid** (txid): The txid of the **tx**
@ -71,4 +72,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:1fe5147036f714c8f9185dd482a1bfa3e3ac5c4d0b6603fba1bc2b78de591b8f)
[comment]: # ( SHA256STAMP:3c79c00a7115ea353d0eb27b8fb6db0203dbd40226291fc0b5f57bc29bd8acc8)

View File

@ -31,6 +31,7 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **bech32** (string, optional): The bech32 (native segwit) address
- **p2sh-segwit** (string, optional): The p2sh-wrapped address
@ -57,4 +58,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:550089858649865ed4d23384dcc5deeef314f5a1976a9610e611dbe17c1063d6)
[comment]: # ( SHA256STAMP:0d4165582ac09b6f130bd6910873f5073ab7ff852711fa1fb45177726a978899)

View File

@ -102,4 +102,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:c801b02463804504c2387387a36a6739351330a2c496aaa10de2b1f49c36ed32)
[comment]: # ( SHA256STAMP:4d9f888d10faca2bf94d1b52510cf21fbeebae4efda0946f03d04b0ef4bc88a2)

View File

@ -96,11 +96,12 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **offer_id** (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
- **offer\_id** (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
- **active** (boolean): whether this can still be used (always *true*)
- **single_use** (boolean): whether this expires as soon as it's paid (reflects the *single_use* parameter)
- **single\_use** (boolean): whether this expires as soon as it's paid (reflects the *single_use* parameter)
- **bolt12** (string): the bolt12 encoding of the offer
- **bolt12_unsigned** (string): the bolt12 encoding of the offer, without a signature
- **bolt12\_unsigned** (string): the bolt12 encoding of the offer, without a signature
- **used** (boolean): True if an associated invoice has been paid
- **created** (boolean): false if the offer already existed
- **label** (string, optional): the (optional) user-specified label
@ -134,4 +135,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:3b7b337e724de4cd867dbbf65700a20d92db728892394f4d0229af70659fd7e2)
[comment]: # ( SHA256STAMP:62546f8bd62788615d20aa1881fc55328bea3fd3793d4395984972cbf33c7219)

View File

@ -55,11 +55,12 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **offer_id** (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
- **offer\_id** (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
- **active** (boolean): whether this will pay a matching incoming invoice (always *true*)
- **single_use** (boolean): whether this expires as soon as it's paid out (always *true*)
- **single\_use** (boolean): whether this expires as soon as it's paid out (always *true*)
- **bolt12** (string): the bolt12 encoding of the offer
- **bolt12_unsigned** (string): the bolt12 encoding of the offer, without a signature
- **bolt12\_unsigned** (string): the bolt12 encoding of the offer, without a signature
- **used** (boolean): True if an incoming invoice has been paid (always *false*)
- **created** (boolean): false if the offer already existed
- **label** (string, optional): the (optional) user-specified label
@ -99,4 +100,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:4ef2ac36e19f11e81645fb0b94fe7f4d7dad74faf7c77628e29967d9f1192154)
[comment]: # ( SHA256STAMP:e13d4ef2c90ce11239857da6cab6489ddbaae473b31f2f10d8e5d1cd46e952a3)

View File

@ -21,8 +21,9 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **channel_id** (hex): the channel id of the aborted channel (always 64 characters)
- **channel_canceled** (boolean): whether this is completely canceled (there may be remaining in-flight transactions)
- **channel\_id** (hex): the channel id of the aborted channel (always 64 characters)
- **channel\_canceled** (boolean): whether this is completely canceled (there may be remaining in-flight transactions)
- **reason** (string): usually "Abort requested", but if it happened to fail at the same time it could be different
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -54,4 +55,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:014c926a7202b951a2407b1a9996c90d4dd68aadfdbdb04311b280c016d538dc)
[comment]: # ( SHA256STAMP:b02ee781aadf998bf031e8e797622ae9a6307c6c3a0c6d1fdaa3760cbbc6c0c6)

View File

@ -37,10 +37,11 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **channel_id** (hex): the channel id of the channel (always 64 characters)
- **channel\_id** (hex): the channel id of the channel (always 64 characters)
- **psbt** (string): the (incomplete) PSBT of the RBF transaction
- **commitments_secured** (boolean): whether the *psbt* is complete (always *false*)
- **funding_serial** (u64): the serial_id of the funding output in the *psbt*
- **commitments\_secured** (boolean): whether the *psbt* is complete (always *false*)
- **funding\_serial** (u64): the serial_id of the funding output in the *psbt*
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -80,4 +81,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:2846dc5350c8a1ac5d0e33fc52a37f5e535e6db5b4080ae2be9c3df428ccf122)
[comment]: # ( SHA256STAMP:40407dc22bff8d157f1f87683e8b97ab6a0495ec1454e5ef05d4a050eb10dfc8)

View File

@ -52,10 +52,11 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **channel_id** (hex): the channel id of the channel (always 64 characters)
- **channel\_id** (hex): the channel id of the channel (always 64 characters)
- **psbt** (string): the (incomplete) PSBT of the funding transaction
- **commitments_secured** (boolean): whether the *psbt* is complete (always *false*)
- **funding_serial** (u64): the serial_id of the funding output in the *psbt*
- **commitments\_secured** (boolean): whether the *psbt* is complete (always *false*)
- **funding\_serial** (u64): the serial_id of the funding output in the *psbt*
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -102,4 +103,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:70ebfff5ce81962cf574b39cb3d95206b1f1541d24b8a3a0380b6f0b594d0ca4)
[comment]: # ( SHA256STAMP:f78d8a4c015cad1e5065d8ae23375aa33bd9f318cd526ee88f65cccb6cda6ad9)

View File

@ -31,7 +31,8 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **channel_id** (hex): the channel id of the channel (always 64 characters)
- **channel\_id** (hex): the channel id of the channel (always 64 characters)
- **tx** (hex): the funding transaction
- **txid** (txid): The txid of the **tx**
@ -66,4 +67,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:304d819b092e1d9ce7b4cd8ef08ecdd7952b454fed59e908ab1af02b50e9a0b0)
[comment]: # ( SHA256STAMP:7e31569a2b356664ff818c9afc8347aa2dcd1ba128ff9a5f74fda6f441aa5904)

View File

@ -30,11 +30,12 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **channel_id** (hex): the channel id of the channel (always 64 characters)
- **channel\_id** (hex): the channel id of the channel (always 64 characters)
- **psbt** (string): the PSBT of the funding transaction
- **commitments_secured** (boolean): whether the *psbt* is complete (if true, sign *psbt* and call `openchannel_signed` to complete the channel open)
- **funding_outnum** (u32): The index of the funding output in the psbt
- **close_to** (hex, optional): scriptPubkey which we have to close to if we mutual close
- **commitments\_secured** (boolean): whether the *psbt* is complete (if true, sign *psbt* and call `openchannel_signed` to complete the channel open)
- **funding\_outnum** (u32): The index of the funding output in the psbt
- **close\_to** (hex, optional): scriptPubkey which we have to close to if we mutual close
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -71,4 +72,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:1a29b970038901773c6712c5e9267ae2c0ed3e9d4b11543d287c272a031003c1)
[comment]: # ( SHA256STAMP:b1a1c34c05ff7f47d9ff790eb17d8df4ccfcfabf8471958fec8bf97ddebfc45d)

View File

@ -18,6 +18,7 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **perkw** (u32, optional): Value of *feerate_str* in kilosipa
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -43,4 +44,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:f3498aa6f16d5be0a49896ae67144558df1baa223ac396a90ddf2d89a42ff395)
[comment]: # ( SHA256STAMP:cf5309537ecb4aa57a6a74e607d1c0d581df22c43aa5d62a90d4eb43e63237f0)

View File

@ -94,17 +94,19 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **payment_preimage** (secret): the proof of payment: SHA256 of this **payment_hash** (always 64 characters)
- **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **created_at** (number): the UNIX timestamp showing when this payment was initiated
- **payment\_preimage** (secret): the proof of payment: SHA256 of this **payment_hash** (always 64 characters)
- **payment\_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **created\_at** (number): the UNIX timestamp showing when this payment was initiated
- **parts** (u32): how many attempts this took
- **amount_msat** (msat): Amount the recipient received
- **amount_sent_msat** (msat): Total amount we sent (including fees)
- **amount\_msat** (msat): Amount the recipient received
- **amount\_sent\_msat** (msat): Total amount we sent (including fees)
- **status** (string): status of payment (one of "complete", "pending", "failed")
- **destination** (pubkey, optional): the final destination of the payment
The following warnings may also be returned:
- **warning_partial_completion**: Not all parts of a multi-part payment have completed
- **warning\_partial\_completion**: Not all parts of a multi-part payment have completed
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -165,4 +167,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:aa9dad9f5f97e1ad3a1a79c923dd57a685d7fada1545987f8ca8021ed92aa4eb)
[comment]: # ( SHA256STAMP:24e27fab68719a3d6bae0e845cba95223d8c18a4f4c9a045225898cbd6abc2ef)

View File

@ -37,6 +37,7 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **totlen** (u16): the answer length of the reply message (including header: 0 means no reply expected)
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -69,4 +70,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:59da52931ba9cb4c192ab81973efed2246baa9a97aded29e2c4cf280972c9a9a)
[comment]: # ( SHA256STAMP:6c9c92f2387bb0108495d45cf2919203a805bd78db8a2d2a88ada80e881c04e3)

View File

@ -50,15 +50,18 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **command** (string): the subcommand this is responding to (one of "start", "stop", "rescan", "startdir", "list")
If **command** is "start", "startdir", "rescan" or "list":
- **plugins** (array of objects):
- **name** (string): full pathname of the plugin
- **active** (boolean): status; plugin completed init and is operational, plugins are configured asynchronously.
- **dynamic** (boolean): plugin can be stopped or started without restarting lightningd
If **command** is "stop":
- **result** (string): A message saying it successfully stopped
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -81,4 +84,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[writing plugins]: PLUGINS.md
[comment]: # ( SHA256STAMP:4ed30fb62c37111ea06b55d1252727c9c56fabd40e9e1f50083c99de74b8dfa1)
[comment]: # ( SHA256STAMP:17dc5bb65dc652ab4dee5fda0c3c9a909edc931c357773cbc988aede3d9fb49a)

View File

@ -26,11 +26,12 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **reservations** is returned. It is an array of objects, where each object contains:
- **txid** (txid): the transaction id
- **vout** (u32): the output number which was reserved
- **was_reserved** (boolean): whether the input was already reserved
- **was\_reserved** (boolean): whether the input was already reserved
- **reserved** (boolean): whether the input is now reserved (always *true*)
- **reserved_to_block** (u32): what blockheight the reservation will expire
- **reserved\_to\_block** (u32): what blockheight the reservation will expire
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -63,4 +64,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:45c13e920465d313c693db6bfea8ac2f66d1e40226ef78241f82f51df9b715b2)
[comment]: # ( SHA256STAMP:f0aed27b4a1de3f76f62ba9882df18c596e017491ff04614666ce05bc8bb2535)

View File

@ -49,6 +49,7 @@ explicit error message stating the issue.
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **status** (string): Information about where message was queued
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -68,4 +69,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:29749d2978455477670d15627d51a6c1e9493136431539640a81e85ab7104d4e)
[comment]: # ( SHA256STAMP:a4314cf59d13dee507086aa5353a1456238a4e57e4a166bdd0a2fa66a4be3736)

View File

@ -40,19 +40,21 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **label** (string): unique label supplied at invoice creation
- **description** (string): description used in the invoice
- **payment_hash** (hex): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **payment\_hash** (hex): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **status** (string): Whether it's paid, unpaid or unpayable (one of "unpaid", "paid", "expired")
- **expires_at** (u64): UNIX timestamp of when it will become / became unpayable
- **amount_msat** (msat, optional): the amount required to pay this invoice
- **expires\_at** (u64): UNIX timestamp of when it will become / became unpayable
- **amount\_msat** (msat, optional): the amount required to pay this invoice
- **bolt12** (string, optional): the BOLT12 string
If **status** is "paid":
- **pay_index** (u64): Unique incrementing index for this payment
- **amount_received_msat** (msat): the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)
- **paid_at** (u64): UNIX timestamp of when it was paid
- **payment_preimage** (hex): proof of payment (always 64 characters)
- **pay\_index** (u64): Unique incrementing index for this payment
- **amount\_received\_msat** (msat): the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)
- **paid\_at** (u64): UNIX timestamp of when it was paid
- **payment\_preimage** (hex): proof of payment (always 64 characters)
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -78,4 +80,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:d227800f16140429a3352bc28f023df8d03c93a54012efcdfdd1f307511c4356)
[comment]: # ( SHA256STAMP:adff5e5f321dc5245067f4ed6ad9a404f5f4a783ae5ab2715a9064cbd570f7f1)

View File

@ -92,12 +92,13 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **id** (u64): unique ID for this payment attempt
- **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **payment\_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **status** (string): status of the payment (could be complete if already sent previously) (one of "pending", "complete")
- **created_at** (u64): the UNIX timestamp showing when this payment was initiated
- **amount_sent_msat** (msat): The amount sent
- **amount_msat** (msat, optional): The amount delivered to destination (if known)
- **created\_at** (u64): the UNIX timestamp showing when this payment was initiated
- **amount\_sent\_msat** (msat): The amount sent
- **amount\_msat** (msat, optional): The amount delivered to destination (if known)
- **destination** (pubkey, optional): the final destination of the payment if known
- **label** (string, optional): the label, if given to sendpay
- **bolt11** (string, optional): the bolt11 string (if supplied)
@ -105,9 +106,11 @@ On success, an object is returned, containing:
- **partid** (u64, optional): the partid (if supplied) to sendonion/sendpay
If **status** is "complete":
- **payment_preimage** (secret): the proof of payment: SHA256 of this **payment_hash** (always 64 characters)
- **payment\_preimage** (secret): the proof of payment: SHA256 of this **payment_hash** (always 64 characters)
If **status** is "pending":
- **message** (string, optional): Monitor status with listpays or waitsendpay
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -132,4 +135,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[bolt04]: https://github.com/lightningnetwork/lightning-rfc/blob/master/04-onion-routing.md
[comment]: # ( SHA256STAMP:4e329c9768eb9d53d3b1068b18c7eaad46f75fa1a57724be4cbb64dc3c324a04)
[comment]: # ( SHA256STAMP:f98e537a7fe2e1b3f9bc10366317c1f1663e0fc6c6618564c38cc10181161658)

View File

@ -43,4 +43,4 @@ Main web site: <https://github.com/ElementsProject/lightning>
[bolt04]: https://github.com/lightningnetwork/lightning-rfc/blob/master/04-onion-routing.md
[comment]: # ( SHA256STAMP:19732c05461b56bb430b3fe568deba807f29a31324252fe748b859b028e649f3)
[comment]: # ( SHA256STAMP:8e7f2c4372f12ee7f79df114e9ac9539ad6b19821e6c808e47d1ba9f7981e8ea)

View File

@ -67,13 +67,14 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **id** (u64): unique ID for this payment attempt
- **payment_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **payment\_hash** (hash): the hash of the *payment_preimage* which will prove payment (always 64 characters)
- **status** (string): status of the payment (could be complete if already sent previously) (one of "pending", "complete")
- **created_at** (u64): the UNIX timestamp showing when this payment was initiated
- **amount_sent_msat** (msat): The amount sent
- **created\_at** (u64): the UNIX timestamp showing when this payment was initiated
- **amount\_sent\_msat** (msat): The amount sent
- **groupid** (u64, optional): Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash
- **amount_msat** (msat, optional): The amount delivered to destination (if known)
- **amount\_msat** (msat, optional): The amount delivered to destination (if known)
- **destination** (pubkey, optional): the final destination of the payment if known
- **label** (string, optional): the *label*, if given to sendpay
- **partid** (u64, optional): the *partid*, if given to sendpay
@ -81,9 +82,11 @@ On success, an object is returned, containing:
- **bolt12** (string, optional): the bolt12 string (if supplied: **experimental-offers** only).
If **status** is "complete":
- **payment_preimage** (secret): the proof of payment: SHA256 of this **payment_hash** (always 64 characters)
- **payment\_preimage** (secret): the proof of payment: SHA256 of this **payment_hash** (always 64 characters)
If **status** is "pending":
- **message** (string): Monitor status with listpays or waitsendpay
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -139,4 +142,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:9d998118234ab83c68d5add16a10b870edf4530c4a2c9e904b0f581b261611d1)
[comment]: # ( SHA256STAMP:9b56a1eedebe426c6ed6018fa92f963884b8aea2787d602e1e413c2f79884ce0)

View File

@ -32,6 +32,7 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **tx** (hex): The raw transaction which was sent
- **txid** (txid): The txid of the **tx**
@ -65,4 +66,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:1fe5147036f714c8f9185dd482a1bfa3e3ac5c4d0b6603fba1bc2b78de591b8f)
[comment]: # ( SHA256STAMP:3c79c00a7115ea353d0eb27b8fb6db0203dbd40226291fc0b5f57bc29bd8acc8)

View File

@ -67,16 +67,17 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **channels** is returned. It is an array of objects, where each object contains:
- **peer_id** (pubkey): The node_id of the peer
- **channel_id** (hex): The channel_id of the channel (always 64 characters)
- **fee_base_msat** (msat): The resulting feebase (this is the BOLT #7 name)
- **fee_proportional_millionths** (u32): The resulting feeppm (this is the BOLT #7 name)
- **minimum_htlc_out_msat** (msat): The resulting htlcmin we will advertize (the BOLT #7 name is htlc_minimum_msat)
- **maximum_htlc_out_msat** (msat): The resulting htlcmax we will advertize (the BOLT #7 name is htlc_maximum_msat)
- **short_channel_id** (short_channel_id, optional): the short_channel_id (if locked in)
- **peer\_id** (pubkey): The node_id of the peer
- **channel\_id** (hex): The channel_id of the channel (always 64 characters)
- **fee\_base\_msat** (msat): The resulting feebase (this is the BOLT #7 name)
- **fee\_proportional\_millionths** (u32): The resulting feeppm (this is the BOLT #7 name)
- **minimum\_htlc\_out\_msat** (msat): The resulting htlcmin we will advertize (the BOLT #7 name is htlc_minimum_msat)
- **maximum\_htlc\_out\_msat** (msat): The resulting htlcmax we will advertize (the BOLT #7 name is htlc_maximum_msat)
- **short\_channel\_id** (short_channel_id, optional): the short_channel_id (if locked in)
- the following warnings are possible:
- **warning_htlcmin_too_low**: The requested htlcmin was too low for this peer, so we set it to the minimum they will allow
- **warning_htlcmax_too_high**: The requested htlcmax was greater than the channel capacity, so we set it to the channel capacity
- **warning\_htlcmin\_too\_low**: The requested htlcmin was too low for this peer, so we set it to the minimum they will allow
- **warning\_htlcmax\_too\_high**: The requested htlcmax was greater than the channel capacity, so we set it to the channel capacity
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -106,4 +107,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:53cf2c58a961078e501b6034e3eed1c5c2d70ed02fc5b167b26ff43c2e2d196f)
[comment]: # ( SHA256STAMP:28a16d5b1392dd72f9d7a040ce8e37907114fbaf1aed106314fab3f9126afba2)

View File

@ -48,12 +48,13 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **base** (u32): The fee_base_msat value
- **ppm** (u32): The fee_proportional_millionths value
- **channels** (array of objects): channel(s) whose rate is now set:
- **peer_id** (pubkey): The node_id of the peer
- **channel_id** (hex): The channel_id of the channel (always 64 characters)
- **short_channel_id** (short_channel_id, optional): the short_channel_id (if locked in)
- **peer\_id** (pubkey): The node_id of the peer
- **channel\_id** (hex): The channel_id of the channel (always 64 characters)
- **short\_channel\_id** (short_channel_id, optional): the short_channel_id (if locked in)
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -82,4 +83,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:ac1cbc87d916cec68cea18d43dc561b3dd655a7f6e2bdaec1a4ebf47bb32b4ad)
[comment]: # ( SHA256STAMP:bd5af1e2190426012541af0eb582ca22461fb38ec70c7a235f4e7e92f7fc565d)

View File

@ -20,6 +20,7 @@ RETURN VALUE
------------
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **signature** (hex): The signature (always 128 characters)
- **recid** (hex): The recovery id (0, 1, 2 or 3) (always 2 characters)
- **zbase** (string): *signature* and *recid* encoded in a style compatible with **lnd**'s [SignMessageRequest](https://api.lightning.community/#grpc-request-signmessagerequest)
@ -41,4 +42,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:137e80fcb45c2e93058a869cb991c4aac31dace621f5941e91b9039290659648)
[comment]: # ( SHA256STAMP:cf7372c221ee6846fb8e7aca3e841b687e4b4f21262a0cc8a430b375e17e70cb)

View File

@ -40,7 +40,8 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **signed_psbt** (string): The fully signed PSBT
- **signed\_psbt** (string): The fully signed PSBT
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -71,4 +72,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:a64f3742f0c66ddf203afa3f69859d4385c4156fe99c30f0931e41ce95d944b1)
[comment]: # ( SHA256STAMP:79690a411b6db6801192bd462e2cf2c627a0a10e65a326e2801dc0e35e734714)

View File

@ -42,4 +42,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:a83ac745b36e0e3d00ba11f036cec93973773f47e1265eb5c70a3d3298e58e4b)
[comment]: # ( SHA256STAMP:cd6076ec79da278cca6f68be0560d71dc1b46651c3db48d81aafe1d19da0ff96)

View File

@ -17,7 +17,8 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **unsigned_tx** (hex): the unsigned transaction
- **unsigned\_tx** (hex): the unsigned transaction
- **txid** (txid): the transaction id of *unsigned_tx*
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -44,4 +45,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:8a6857f312d202e3328443d6ca25b5318d6b5d8fe5655ff6c70466e54c5cd42d)
[comment]: # ( SHA256STAMP:d763d6dda590b36227f606a404223327147606b495a20926d14a0f8444effdd7)

View File

@ -54,8 +54,9 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **psbt** (string): the PSBT representing the unsigned transaction
- **unsigned_tx** (hex): the unsigned transaction
- **unsigned\_tx** (hex): the unsigned transaction
- **txid** (txid): the transaction id of *unsigned_tx*; you hand this to lightning-txsend(7) or lightning-txdiscard(7), as the inputs of this transaction are reserved.
[comment]: # (GENERATE-FROM-SCHEMA-END)
@ -84,4 +85,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:c32c4fe613e5fa173d26bb144fb173d34d2c9181f4eb5da7ef413d41f44f95d7)
[comment]: # ( SHA256STAMP:d0570b649a356bb7575da21dfe2f6287fe0a0eac388411470fa22897f7175b83)

Some files were not shown because too many files have changed in this diff Show More