Skip to content

Commit

Permalink
Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ShahanaFarooqui committed Dec 21, 2023
1 parent 0bbf9f3 commit 6e31790
Show file tree
Hide file tree
Showing 46 changed files with 282 additions and 441 deletions.
262 changes: 135 additions & 127 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,140 +4,148 @@
doc-wrongdir:
$(MAKE) -C .. doc-all

MANPAGES := doc/lightning-cli.1 \
doc/lightningd.8 \
doc/lightningd-config.5 \
doc/lightningd-rpc.7 \
doc/lightning-addgossip.7 \
doc/lightning-autoclean-once.7 \
doc/lightning-autoclean-status.7 \
doc/lightning-batching.7 \
doc/lightning-bkpr-channelsapy.7 \
doc/lightning-bkpr-dumpincomecsv.7 \
doc/lightning-bkpr-inspect.7 \
doc/lightning-bkpr-listaccountevents.7 \
doc/lightning-bkpr-listbalances.7 \
doc/lightning-bkpr-listincome.7 \
doc/lightning-blacklistrune.7 \
doc/lightning-check.7 \
doc/lightning-checkmessage.7 \
doc/lightning-checkrune.7 \
doc/lightning-close.7 \
doc/lightning-connect.7 \
doc/lightning-commando.7 \
doc/lightning-commando-blacklist.7 \
doc/lightning-commando-listrunes.7 \
doc/lightning-commando-rune.7 \
doc/lightning-createonion.7 \
doc/lightning-createinvoice.7 \
doc/lightning-createrune.7 \
doc/lightning-datastore.7 \
doc/lightning-datastoreusage.7 \
doc/lightning-decodepay.7 \
doc/lightning-decode.7 \
doc/lightning-deldatastore.7 \
doc/lightning-delexpiredinvoice.7 \
doc/lightning-delforward.7 \
doc/lightning-delinvoice.7 \
doc/lightning-delpay.7 \
doc/lightning-disableinvoicerequest.7 \
doc/lightning-disableoffer.7 \
doc/lightning-disconnect.7 \
doc/lightning-emergencyrecover.7 \
doc/lightning-feerates.7 \
doc/lightning-fetchinvoice.7 \
doc/lightning-fundchannel.7 \
doc/lightning-fundchannel_start.7 \
doc/lightning-fundchannel_complete.7 \
doc/lightning-fundchannel_cancel.7 \
doc/lightning-funderupdate.7 \
doc/lightning-addpsbtoutput.7 \
doc/lightning-fundpsbt.7 \
doc/lightning-getroute.7 \
doc/lightning-hsmtool.8 \
doc/lightning-invoice.7 \
doc/lightning-invoicerequest.7 \
doc/lightning-keysend.7 \
doc/lightning-listchannels.7 \
doc/lightning-listclosedchannels.7 \
doc/lightning-listdatastore.7 \
doc/lightning-listforwards.7 \
doc/lightning-listfunds.7 \
doc/lightning-listhtlcs.7 \
doc/lightning-listinvoices.7 \
doc/lightning-listinvoicerequests.7 \
doc/lightning-listoffers.7 \
doc/lightning-listpays.7 \
doc/lightning-listpeers.7 \
doc/lightning-listpeerchannels.7 \
doc/lightning-showrunes.7 \
# MANPAGES := doc/lightning-cli.1 \
# doc/lightningd.8 \
# doc/lightningd-config.5 \
# doc/lightningd-rpc.7 \
# doc/lightning-addgossip.7 \
# doc/lightning-autoclean-once.7 \
# doc/lightning-autoclean-status.7 \
# doc/lightning-batching.7 \
# doc/lightning-bkpr-channelsapy.7 \
# doc/lightning-bkpr-dumpincomecsv.7 \
# doc/lightning-bkpr-inspect.7 \
# doc/lightning-bkpr-listaccountevents.7 \
# doc/lightning-bkpr-listbalances.7 \
# doc/lightning-bkpr-listincome.7 \
# doc/lightning-blacklistrune.7 \
# doc/lightning-check.7 \
# doc/lightning-checkmessage.7 \
# doc/lightning-checkrune.7 \
# doc/lightning-close.7 \
# doc/lightning-connect.7 \
# doc/lightning-commando.7 \
# doc/lightning-commando-blacklist.7 \
# doc/lightning-commando-listrunes.7 \
# doc/lightning-commando-rune.7 \
# doc/lightning-createonion.7 \
# doc/lightning-createinvoice.7 \
# doc/lightning-createrune.7 \
# doc/lightning-datastore.7 \
# doc/lightning-datastoreusage.7 \
# doc/lightning-decodepay.7 \
# doc/lightning-decode.7 \
# doc/lightning-deldatastore.7 \
# doc/lightning-delexpiredinvoice.7 \
# doc/lightning-delforward.7 \
# doc/lightning-delinvoice.7 \
# doc/lightning-delpay.7 \
# doc/lightning-disableinvoicerequest.7 \
# doc/lightning-disableoffer.7 \
# doc/lightning-disconnect.7 \
# doc/lightning-emergencyrecover.7 \
# doc/lightning-feerates.7 \
# doc/lightning-fetchinvoice.7 \
# doc/lightning-fundchannel.7 \
# doc/lightning-fundchannel_start.7 \
# doc/lightning-fundchannel_complete.7 \
# doc/lightning-fundchannel_cancel.7 \
# doc/lightning-funderupdate.7 \
# doc/lightning-addpsbtoutput.7 \
# doc/lightning-fundpsbt.7 \
# doc/lightning-getroute.7 \
# doc/lightning-hsmtool.8 \
# doc/lightning-invoice.7 \
# doc/lightning-invoicerequest.7 \
# doc/lightning-keysend.7 \
# doc/lightning-listchannels.7 \
# doc/lightning-listclosedchannels.7 \
# doc/lightning-listdatastore.7 \
# doc/lightning-listforwards.7 \
# doc/lightning-listfunds.7 \
# doc/lightning-listhtlcs.7 \
# doc/lightning-listinvoices.7 \
# doc/lightning-listinvoicerequests.7 \
# doc/lightning-listoffers.7 \
# doc/lightning-listpays.7 \
# doc/lightning-listpeers.7 \
# doc/lightning-listpeerchannels.7 \
# doc/lightning-showrunes.7 \
# doc/lightning-listsendpays.7 \
# doc/lightning-makesecret.7 \
# doc/lightning-multifundchannel.7 \
# doc/lightning-multiwithdraw.7 \
# doc/lightning-newaddr.7 \
# doc/lightning-notifications.7 \
# doc/lightning-offer.7 \
# doc/lightning-openchannel_abort.7 \
# doc/lightning-openchannel_bump.7 \
# doc/lightning-openchannel_init.7 \
# doc/lightning-openchannel_signed.7 \
# doc/lightning-openchannel_update.7 \
# doc/lightning-pay.7 \
# doc/lightning-parsefeerate.7 \
# doc/lightning-plugin.7 \
# doc/lightning-preapproveinvoice.7 \
# doc/lightning-preapprovekeysend.7 \
# doc/lightning-recover.7 \
# doc/lightning-recoverchannel.7 \
# doc/lightning-renepay.7 \
# doc/lightning-renepaystatus.7 \
# doc/lightning-reserveinputs.7 \
# doc/lightning-sendinvoice.7 \
# doc/lightning-sendonion.7 \
# doc/lightning-sendonionmessage.7 \
# doc/lightning-sendpay.7 \
# doc/lightning-setchannel.7 \
# doc/lightning-setconfig.7 \
# doc/lightning-setpsbtversion.7 \
# doc/lightning-sendcustommsg.7 \
# doc/lightning-signinvoice.7 \
# doc/lightning-signmessage.7 \
# doc/lightning-splice_init.7 \
# doc/lightning-splice_update.7 \
# doc/lightning-splice_signed.7 \
# doc/lightning-staticbackup.7 \
# doc/lightning-txprepare.7 \
# doc/lightning-txdiscard.7 \
# doc/lightning-txsend.7 \
# doc/lightning-unreserveinputs.7 \
# doc/lightning-utxopsbt.7 \
# doc/lightning-wait.7 \
# doc/lightning-waitinvoice.7 \
# doc/lightning-waitanyinvoice.7 \
# doc/lightning-waitblockheight.7 \
# doc/lightning-waitsendpay.7 \
# doc/lightning-withdraw.7 \
# doc/lightning-ping.7 \
# doc/lightning-stop.7 \
# doc/lightning-signpsbt.7 \
# doc/lightning-sendpsbt.7 \
# doc/lightning-getinfo.7 \
# doc/lightning-listtransactions.7 \
# doc/lightning-listnodes.7 \
# doc/lightning-listconfigs.7 \
# doc/lightning-help.7 \
# doc/lightning-getlog.7 \
# doc/reckless.7

MANPAGES := doc/lightning-showrunes.7 \
doc/lightning-listsendpays.7 \
doc/lightning-makesecret.7 \
doc/lightning-multifundchannel.7 \
doc/lightning-multiwithdraw.7 \
doc/lightning-newaddr.7 \
doc/lightning-notifications.7 \
doc/lightning-offer.7 \
doc/lightning-openchannel_abort.7 \
doc/lightning-openchannel_bump.7 \
doc/lightning-openchannel_init.7 \
doc/lightning-openchannel_signed.7 \
doc/lightning-openchannel_update.7 \
doc/lightning-pay.7 \
doc/lightning-parsefeerate.7 \
doc/lightning-plugin.7 \
doc/lightning-preapproveinvoice.7 \
doc/lightning-preapprovekeysend.7 \
doc/lightning-recover.7 \
doc/lightning-recoverchannel.7 \
doc/lightning-renepay.7 \
doc/lightning-renepaystatus.7 \
doc/lightning-reserveinputs.7 \
doc/lightning-sendinvoice.7 \
doc/lightning-sendonion.7 \
doc/lightning-sendonionmessage.7 \
doc/lightning-sendpay.7 \
doc/lightning-setchannel.7 \
doc/lightning-setconfig.7 \
doc/lightning-setpsbtversion.7 \
doc/lightning-sendcustommsg.7 \
doc/lightning-signinvoice.7 \
doc/lightning-signmessage.7 \
doc/lightning-splice_init.7 \
doc/lightning-splice_update.7 \
doc/lightning-splice_signed.7 \
doc/lightning-staticbackup.7 \
doc/lightning-txprepare.7 \
doc/lightning-txdiscard.7 \
doc/lightning-txsend.7 \
doc/lightning-unreserveinputs.7 \
doc/lightning-utxopsbt.7 \
doc/lightning-wait.7 \
doc/lightning-waitinvoice.7 \
doc/lightning-waitanyinvoice.7 \
doc/lightning-waitblockheight.7 \
doc/lightning-waitsendpay.7 \
doc/lightning-withdraw.7 \
doc/lightning-ping.7 \
doc/lightning-stop.7 \
doc/lightning-signpsbt.7 \
doc/lightning-sendpsbt.7 \
doc/lightning-getinfo.7 \
doc/lightning-listtransactions.7 \
doc/lightning-listnodes.7 \
doc/lightning-listconfigs.7 \
doc/lightning-help.7 \
doc/lightning-getlog.7 \
doc/reckless.7

ifeq ($(HAVE_SQLITE3),1)
MANPAGES += doc/lightning-listsqlschemas.7 \
doc/lightning-sql.7
endif

# ifeq ($(HAVE_SQLITE3),1)
# MANPAGES += doc/lightning-listsqlschemas.7 \
# doc/lightning-sql.7
# endif

doc-all: $(MANPAGES) doc/index.rst

SCHEMAS := $(wildcard doc/schemas/*.new.json)
SCHEMAS := $(wildcard doc/schemas/lightning-*.json)
check-fmt-schemas: $(SCHEMAS:%=check-fmt-schema/%)
fmt-schemas: $(SCHEMAS:%=fmt-schema/%)

Expand All @@ -156,8 +164,8 @@ MARKDOWN_WITH_SCHEMA := $(shell grep -l GENERATE-FROM-SCHEMA $(MANPAGES:=.md))
LBRACKET=(
RBRACKET=)

$(MARKDOWN_WITH_SCHEMA): doc/lightning-%.7.md: doc/schemas/%.new.json tools/fromschema.py
@if $(call SHA256STAMP_CHANGED); then $(call VERBOSE, "fromschema $@", tools/fromschema.py --markdownfile=$@ doc/schemas/$*.new.json > $@.tmp && grep -v SHA256STAMP: $@.tmp > $@ && rm -f $@.tmp && $(call SHA256STAMP,[comment]: # $(LBRACKET),$(RBRACKET))); else touch $@; fi
$(MARKDOWN_WITH_SCHEMA): doc/lightning-%.7.md: doc/schemas/lightning-%.json tools/fromschema.py
@if $(call SHA256STAMP_CHANGED); then $(call VERBOSE, "fromschema $@", tools/fromschema.py --markdownfile=$@ doc/schemas/lightning-$*.json > $@.tmp && grep -v SHA256STAMP: $@.tmp > $@ && rm -f $@.tmp && $(call SHA256STAMP,[comment]: # $(LBRACKET),$(RBRACKET))); 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
Expand Down
2 changes: 2 additions & 0 deletions doc/lightning-datastore.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ On success, an object is returned, containing:

[comment]: # (GENERATE-FROM-SCHEMA-END)

ERRORS
------

The following error codes may occur:

Expand Down
3 changes: 3 additions & 0 deletions doc/lightning-fetchinvoice.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ On success, an object is returned, containing:

[comment]: # (GENERATE-FROM-SCHEMA-END)

ERRORS
------

The following error codes may occur:

- -1: Catchall nonspecific error.
Expand Down
4 changes: 2 additions & 2 deletions doc/lightning-fundchannel.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ On success, an object is returned, containing:
- **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.

ERROR
------
ERRORS
-------

The following error codes may occur:

Expand Down
56 changes: 0 additions & 56 deletions doc/lightning-invoice.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,62 +16,6 @@ lightning daemon can use to pay this invoice. This token includes a
*route hint* description of an incoming channel with capacity to pay the
invoice, if any exists.

The *amount\_msat* parameter can be the string "any", which creates an
invoice that can be paid with any amount. Otherwise it is a positive value in
millisatoshi precision; it can be a whole number, or a whole number
ending in *msat* or *sat*, or a number with three decimal places ending
in *sat*, or a number with 1 to 11 decimal places ending in *btc*.

The *label* must be a unique string or number (which is treated as a
string, so "01" is different from "1"); it is never revealed to other
nodes on the lightning network, but it can be used to query the status
of this invoice.

The *description* is a short description of purpose of payment, e.g. *1
cup of coffee*. This value is encoded into the BOLT11 invoice and is
viewable by any node you send this invoice to (unless *deschashonly* is
true as described below). It must be UTF-8, and cannot use *\\u* JSON
escape codes.

The *expiry* is optionally the time the invoice is valid for, in seconds.
If no value is provided the default of 604800 (1 week) is used.

The *fallbacks* array is one or more fallback addresses to include in
the invoice (in order from most-preferred to least): note that these
arrays are not currently tracked to fulfill the invoice.

The *preimage* is a 64-digit hex string to be used as payment preimage
for the created invoice. By default, if unspecified, lightningd will
generate a secure pseudorandom preimage seeded from an appropriate
entropy source on your system. **IMPORTANT**: if you specify the
*preimage*, you are responsible, to ensure appropriate care for
generating using a secure pseudorandom generator seeded with sufficient
entropy, and keeping the preimage secret. This parameter is an advanced
feature intended for use with cutting-edge cryptographic protocols and
should not be used unless explicitly needed.

If specified, *exposeprivatechannels* overrides the default route hint
logic, which will use unpublished channels only if there are no
published channels. If *true* unpublished channels are always considered
as a route hint candidate; if *false*, never. If it is a short channel id
(e.g. *1x1x3*) or array of short channel ids (or a remote alias), only those specific channels
will be considered candidates, even if they are public or dead-ends.

The route hint is selected from the set of incoming channels of which:
peer's balance minus their reserves is at least *amount\_msat*, state is
normal, the peer is connected and not a dead end (i.e. has at least one
other public channel). The selection uses some randomness to prevent
probing, but favors channels that become more balanced after the
payment.

If specified, *cltv* sets the *min\_final\_cltv\_expiry* for the invoice.
Otherwise, it's set to the parameter **cltv-final**.

If *deschashonly* is true (default false), then the bolt11 returned
contains a hash of the *description*, rather than the *description*
itself: this allows much longer descriptions, but they must be
communicated via some other mechanism.

RETURN VALUE
------------

Expand Down
Loading

0 comments on commit 6e31790

Please sign in to comment.