Makefile: remove generated files.

By popular merge-hell demand.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: Build: Python is now required to build, as generated files are no longer checked into the repository.
This commit is contained in:
Rusty Russell 2021-09-22 13:46:16 +09:30 committed by Christian Decker
parent 3dbf3b057a
commit 79e09b92ef
129 changed files with 0 additions and 36204 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,244 +0,0 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the _csv file it was generated from. */
/* Original template can be found at tools/gen/header_template */
#ifndef LIGHTNING_CHANNELD_CHANNELD_WIREGEN_H
#define LIGHTNING_CHANNELD_CHANNELD_WIREGEN_H
#include <ccan/tal/tal.h>
#include <wire/tlvstream.h>
#include <wire/wire.h>
#include <bitcoin/psbt.h>
#include <bitcoin/tx.h>
#include <common/blockheight_states.h>
#include <common/cryptomsg.h>
#include <common/channel_config.h>
#include <common/channel_id.h>
#include <common/channel_type.h>
#include <common/derive_basepoints.h>
#include <common/features.h>
#include <common/fee_states.h>
#include <common/per_peer_state.h>
#include <bitcoin/preimage.h>
#include <common/penalty_base.h>
#include <common/htlc_wire.h>
enum channeld_wire {
/* Begin! (passes gossipd-client fd) */
WIRE_CHANNELD_INIT = 1000,
/* master->channeld funding hit new depth(funding locked if >= lock depth) */
WIRE_CHANNELD_FUNDING_DEPTH = 1002,
/* Tell channel to offer this htlc */
WIRE_CHANNELD_OFFER_HTLC = 1004,
/* Reply; synchronous since IDs have to increment. */
WIRE_CHANNELD_OFFER_HTLC_REPLY = 1104,
/* Main daemon found out the preimage for an HTLC */
WIRE_CHANNELD_FULFILL_HTLC = 1005,
/* Main daemon says HTLC failed */
WIRE_CHANNELD_FAIL_HTLC = 1006,
/* When we receive funding_locked. */
WIRE_CHANNELD_GOT_FUNDING_LOCKED = 1019,
/* When we send a commitment_signed message */
WIRE_CHANNELD_SENDING_COMMITSIG = 1020,
/* Wait for reply */
WIRE_CHANNELD_SENDING_COMMITSIG_REPLY = 1120,
/* When we have a commitment_signed message */
WIRE_CHANNELD_GOT_COMMITSIG = 1021,
/* Wait for reply */
WIRE_CHANNELD_GOT_COMMITSIG_REPLY = 1121,
WIRE_CHANNELD_GOT_REVOKE = 1022,
/* Wait for reply */
/* (eg. if we sent another commitment_signed */
WIRE_CHANNELD_GOT_REVOKE_REPLY = 1122,
/* Tell peer to shut down channel. */
WIRE_CHANNELD_SEND_SHUTDOWN = 1023,
/* Peer told us that channel is shutting down */
WIRE_CHANNELD_GOT_SHUTDOWN = 1024,
/* Shutdown is complete */
WIRE_CHANNELD_SHUTDOWN_COMPLETE = 1025,
/* Re-enable commit timer. */
WIRE_CHANNELD_DEV_REENABLE_COMMIT = 1026,
WIRE_CHANNELD_DEV_REENABLE_COMMIT_REPLY = 1126,
WIRE_CHANNELD_FEERATES = 1027,
/* master -> channeld: do you have a memleak? */
WIRE_CHANNELD_DEV_MEMLEAK = 1033,
WIRE_CHANNELD_DEV_MEMLEAK_REPLY = 1133,
/* Peer presented proof it was from the future. */
WIRE_CHANNELD_FAIL_FALLEN_BEHIND = 1028,
/* Handle a channel specific feerate base ppm configuration */
WIRE_CHANNELD_SPECIFIC_FEERATES = 1029,
/* When we receive announcement_signatures for channel announce */
WIRE_CHANNELD_GOT_ANNOUNCEMENT = 1017,
/* Ask channeld to send a error message. Used in forgetting channel case. */
WIRE_CHANNELD_SEND_ERROR = 1008,
/* Tell master channeld has sent the error message. */
WIRE_CHANNELD_SEND_ERROR_REPLY = 1108,
/* Ask channeld to quiesce. */
WIRE_CHANNELD_DEV_QUIESCE = 1009,
WIRE_CHANNELD_DEV_QUIESCE_REPLY = 1109,
/* Tell master we're upgrading the commitment tx. */
WIRE_CHANNELD_UPGRADED = 1011,
/* Tell peer about our latest and greatest blockheight. */
WIRE_CHANNELD_BLOCKHEIGHT = 1012,
};
const char *channeld_wire_name(int e);
/**
* Determine whether a given message type is defined as a message.
*
* Returns true if the message type is part of the message definitions we have
* generated parsers for, false if it is a custom message that cannot be
* handled internally.
*/
bool channeld_wire_is_defined(u16 type);
/* WIRE: CHANNELD_INIT */
/* Begin! (passes gossipd-client fd) */
u8 *towire_channeld_init(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_features, const struct channel_id *channel_id, const struct bitcoin_txid *funding_txid, u16 funding_txout, struct amount_sat funding_satoshi, u32 minimum_depth, u32 our_blockheight, const struct height_states *blockheight_states, u32 lease_expiry, const struct channel_config *our_config, const struct channel_config *their_config, const struct fee_states *fee_states, u32 feerate_min, u32 feerate_max, u32 feerate_penalty, const struct bitcoin_signature *first_commit_sig, const struct per_peer_state *per_peer_state, const struct pubkey *remote_fundingkey, const struct basepoints *remote_basepoints, const struct pubkey *remote_per_commit, const struct pubkey *old_remote_per_commit, enum side opener, u32 fee_base, u32 fee_proportional, struct amount_msat local_msatoshi, const struct basepoints *our_basepoints, const struct pubkey *our_funding_pubkey, const struct node_id *local_node_id, const struct node_id *remote_node_id, u32 commit_msec, u16 cltv_delta, bool last_was_revoke, const struct changed_htlc *last_sent_commit, u64 next_index_local, u64 next_index_remote, u64 revocations_received, u64 next_htlc_id, const struct existing_htlc **htlcs, bool local_funding_locked, bool remote_funding_locked, const struct short_channel_id *funding_short_id, bool reestablish, bool send_shutdown, bool remote_shutdown_received, const u8 *final_scriptpubkey, u8 flags, const u8 *init_peer_pkt, bool reached_announce_depth, const struct secret *last_remote_secret, const u8 *their_features, const u8 *upfront_shutdown_script, const secp256k1_ecdsa_signature *remote_ann_node_sig, const secp256k1_ecdsa_signature *remote_ann_bitcoin_sig, const struct channel_type *desired_type, bool dev_fast_gossip, bool dev_fail_process_onionpacket, const struct penalty_base *pbases, const u8 *reestablish_only);
bool fromwire_channeld_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_features, struct channel_id *channel_id, struct bitcoin_txid *funding_txid, u16 *funding_txout, struct amount_sat *funding_satoshi, u32 *minimum_depth, u32 *our_blockheight, struct height_states **blockheight_states, u32 *lease_expiry, struct channel_config *our_config, struct channel_config *their_config, struct fee_states **fee_states, u32 *feerate_min, u32 *feerate_max, u32 *feerate_penalty, struct bitcoin_signature *first_commit_sig, struct per_peer_state **per_peer_state, struct pubkey *remote_fundingkey, struct basepoints *remote_basepoints, struct pubkey *remote_per_commit, struct pubkey *old_remote_per_commit, enum side *opener, u32 *fee_base, u32 *fee_proportional, struct amount_msat *local_msatoshi, struct basepoints *our_basepoints, struct pubkey *our_funding_pubkey, struct node_id *local_node_id, struct node_id *remote_node_id, u32 *commit_msec, u16 *cltv_delta, bool *last_was_revoke, struct changed_htlc **last_sent_commit, u64 *next_index_local, u64 *next_index_remote, u64 *revocations_received, u64 *next_htlc_id, struct existing_htlc ***htlcs, bool *local_funding_locked, bool *remote_funding_locked, struct short_channel_id *funding_short_id, bool *reestablish, bool *send_shutdown, bool *remote_shutdown_received, u8 **final_scriptpubkey, u8 *flags, u8 **init_peer_pkt, bool *reached_announce_depth, struct secret *last_remote_secret, u8 **their_features, u8 **upfront_shutdown_script, secp256k1_ecdsa_signature **remote_ann_node_sig, secp256k1_ecdsa_signature **remote_ann_bitcoin_sig, struct channel_type **desired_type, bool *dev_fast_gossip, bool *dev_fail_process_onionpacket, struct penalty_base **pbases, u8 **reestablish_only);
/* WIRE: CHANNELD_FUNDING_DEPTH */
/* master->channeld funding hit new depth(funding locked if >= lock depth) */
u8 *towire_channeld_funding_depth(const tal_t *ctx, const struct short_channel_id *short_channel_id, u32 depth);
bool fromwire_channeld_funding_depth(const tal_t *ctx, const void *p, struct short_channel_id **short_channel_id, u32 *depth);
/* WIRE: CHANNELD_OFFER_HTLC */
/* Tell channel to offer this htlc */
u8 *towire_channeld_offer_htlc(const tal_t *ctx, struct amount_msat amount_msat, u32 cltv_expiry, const struct sha256 *payment_hash, const u8 onion_routing_packet[1366], const struct pubkey *blinding);
bool fromwire_channeld_offer_htlc(const tal_t *ctx, const void *p, struct amount_msat *amount_msat, u32 *cltv_expiry, struct sha256 *payment_hash, u8 onion_routing_packet[1366], struct pubkey **blinding);
/* WIRE: CHANNELD_OFFER_HTLC_REPLY */
/* Reply; synchronous since IDs have to increment. */
u8 *towire_channeld_offer_htlc_reply(const tal_t *ctx, u64 id, const u8 *failuremsg, const wirestring *failurestr);
bool fromwire_channeld_offer_htlc_reply(const tal_t *ctx, const void *p, u64 *id, u8 **failuremsg, wirestring **failurestr);
/* WIRE: CHANNELD_FULFILL_HTLC */
/* Main daemon found out the preimage for an HTLC */
u8 *towire_channeld_fulfill_htlc(const tal_t *ctx, const struct fulfilled_htlc *fulfilled_htlc);
bool fromwire_channeld_fulfill_htlc(const void *p, struct fulfilled_htlc *fulfilled_htlc);
/* WIRE: CHANNELD_FAIL_HTLC */
/* Main daemon says HTLC failed */
u8 *towire_channeld_fail_htlc(const tal_t *ctx, const struct failed_htlc *failed_htlc);
bool fromwire_channeld_fail_htlc(const tal_t *ctx, const void *p, struct failed_htlc **failed_htlc);
/* WIRE: CHANNELD_GOT_FUNDING_LOCKED */
/* When we receive funding_locked. */
u8 *towire_channeld_got_funding_locked(const tal_t *ctx, const struct pubkey *next_per_commit_point);
bool fromwire_channeld_got_funding_locked(const void *p, struct pubkey *next_per_commit_point);
/* WIRE: CHANNELD_SENDING_COMMITSIG */
/* When we send a commitment_signed message */
u8 *towire_channeld_sending_commitsig(const tal_t *ctx, u64 commitnum, const struct penalty_base *pbase, const struct fee_states *fee_states, const struct height_states *blockheight_states, const struct changed_htlc *changed, const struct bitcoin_signature *commit_sig, const struct bitcoin_signature *htlc_sigs);
bool fromwire_channeld_sending_commitsig(const tal_t *ctx, const void *p, u64 *commitnum, struct penalty_base **pbase, struct fee_states **fee_states, struct height_states **blockheight_states, struct changed_htlc **changed, struct bitcoin_signature *commit_sig, struct bitcoin_signature **htlc_sigs);
/* WIRE: CHANNELD_SENDING_COMMITSIG_REPLY */
/* Wait for reply */
u8 *towire_channeld_sending_commitsig_reply(const tal_t *ctx);
bool fromwire_channeld_sending_commitsig_reply(const void *p);
/* WIRE: CHANNELD_GOT_COMMITSIG */
/* When we have a commitment_signed message */
u8 *towire_channeld_got_commitsig(const tal_t *ctx, u64 commitnum, const struct fee_states *fee_states, const struct height_states *blockheight_states, const struct bitcoin_signature *signature, const struct bitcoin_signature *htlc_signature, const struct added_htlc *added, const struct fulfilled_htlc *fulfilled, const struct failed_htlc **failed, const struct changed_htlc *changed, const struct bitcoin_tx *tx);
bool fromwire_channeld_got_commitsig(const tal_t *ctx, const void *p, u64 *commitnum, struct fee_states **fee_states, struct height_states **blockheight_states, struct bitcoin_signature *signature, struct bitcoin_signature **htlc_signature, struct added_htlc **added, struct fulfilled_htlc **fulfilled, struct failed_htlc ***failed, struct changed_htlc **changed, struct bitcoin_tx **tx);
/* WIRE: CHANNELD_GOT_COMMITSIG_REPLY */
/* Wait for reply */
u8 *towire_channeld_got_commitsig_reply(const tal_t *ctx);
bool fromwire_channeld_got_commitsig_reply(const void *p);
/* WIRE: CHANNELD_GOT_REVOKE */
u8 *towire_channeld_got_revoke(const tal_t *ctx, u64 revokenum, const struct secret *per_commitment_secret, const struct pubkey *next_per_commit_point, const struct fee_states *fee_states, const struct height_states *blockheight_states, const struct changed_htlc *changed, const struct penalty_base *pbase, const struct bitcoin_tx *penalty_tx);
bool fromwire_channeld_got_revoke(const tal_t *ctx, const void *p, u64 *revokenum, struct secret *per_commitment_secret, struct pubkey *next_per_commit_point, struct fee_states **fee_states, struct height_states **blockheight_states, struct changed_htlc **changed, struct penalty_base **pbase, struct bitcoin_tx **penalty_tx);
/* WIRE: CHANNELD_GOT_REVOKE_REPLY */
/* Wait for reply */
/* (eg. if we sent another commitment_signed */
u8 *towire_channeld_got_revoke_reply(const tal_t *ctx);
bool fromwire_channeld_got_revoke_reply(const void *p);
/* WIRE: CHANNELD_SEND_SHUTDOWN */
/* Tell peer to shut down channel. */
u8 *towire_channeld_send_shutdown(const tal_t *ctx, const u8 *shutdown_scriptpubkey, const struct bitcoin_outpoint *wrong_funding);
bool fromwire_channeld_send_shutdown(const tal_t *ctx, const void *p, u8 **shutdown_scriptpubkey, struct bitcoin_outpoint **wrong_funding);
/* WIRE: CHANNELD_GOT_SHUTDOWN */
/* Peer told us that channel is shutting down */
u8 *towire_channeld_got_shutdown(const tal_t *ctx, const u8 *scriptpubkey, const struct bitcoin_outpoint *wrong_funding);
bool fromwire_channeld_got_shutdown(const tal_t *ctx, const void *p, u8 **scriptpubkey, struct bitcoin_outpoint **wrong_funding);
/* WIRE: CHANNELD_SHUTDOWN_COMPLETE */
/* Shutdown is complete */
u8 *towire_channeld_shutdown_complete(const tal_t *ctx, const struct per_peer_state *per_peer_state);
bool fromwire_channeld_shutdown_complete(const tal_t *ctx, const void *p, struct per_peer_state **per_peer_state);
/* WIRE: CHANNELD_DEV_REENABLE_COMMIT */
/* Re-enable commit timer. */
u8 *towire_channeld_dev_reenable_commit(const tal_t *ctx);
bool fromwire_channeld_dev_reenable_commit(const void *p);
/* WIRE: CHANNELD_DEV_REENABLE_COMMIT_REPLY */
u8 *towire_channeld_dev_reenable_commit_reply(const tal_t *ctx);
bool fromwire_channeld_dev_reenable_commit_reply(const void *p);
/* WIRE: CHANNELD_FEERATES */
u8 *towire_channeld_feerates(const tal_t *ctx, u32 feerate, u32 min_feerate, u32 max_feerate, u32 penalty_feerate);
bool fromwire_channeld_feerates(const void *p, u32 *feerate, u32 *min_feerate, u32 *max_feerate, u32 *penalty_feerate);
/* WIRE: CHANNELD_DEV_MEMLEAK */
/* master -> channeld: do you have a memleak? */
u8 *towire_channeld_dev_memleak(const tal_t *ctx);
bool fromwire_channeld_dev_memleak(const void *p);
/* WIRE: CHANNELD_DEV_MEMLEAK_REPLY */
u8 *towire_channeld_dev_memleak_reply(const tal_t *ctx, bool leak);
bool fromwire_channeld_dev_memleak_reply(const void *p, bool *leak);
/* WIRE: CHANNELD_FAIL_FALLEN_BEHIND */
/* Peer presented proof it was from the future. */
u8 *towire_channeld_fail_fallen_behind(const tal_t *ctx, const struct pubkey *remote_per_commitment_point);
bool fromwire_channeld_fail_fallen_behind(const tal_t *ctx, const void *p, struct pubkey **remote_per_commitment_point);
/* WIRE: CHANNELD_SPECIFIC_FEERATES */
/* Handle a channel specific feerate base ppm configuration */
u8 *towire_channeld_specific_feerates(const tal_t *ctx, u32 feerate_base, u32 feerate_ppm);
bool fromwire_channeld_specific_feerates(const void *p, u32 *feerate_base, u32 *feerate_ppm);
/* WIRE: CHANNELD_GOT_ANNOUNCEMENT */
/* When we receive announcement_signatures for channel announce */
u8 *towire_channeld_got_announcement(const tal_t *ctx, const secp256k1_ecdsa_signature *remote_ann_node_sig, const secp256k1_ecdsa_signature *remote_ann_bitcoin_sig);
bool fromwire_channeld_got_announcement(const void *p, secp256k1_ecdsa_signature *remote_ann_node_sig, secp256k1_ecdsa_signature *remote_ann_bitcoin_sig);
/* WIRE: CHANNELD_SEND_ERROR */
/* Ask channeld to send a error message. Used in forgetting channel case. */
u8 *towire_channeld_send_error(const tal_t *ctx, const wirestring *reason);
bool fromwire_channeld_send_error(const tal_t *ctx, const void *p, wirestring **reason);
/* WIRE: CHANNELD_SEND_ERROR_REPLY */
/* Tell master channeld has sent the error message. */
u8 *towire_channeld_send_error_reply(const tal_t *ctx);
bool fromwire_channeld_send_error_reply(const void *p);
/* WIRE: CHANNELD_DEV_QUIESCE */
/* Ask channeld to quiesce. */
u8 *towire_channeld_dev_quiesce(const tal_t *ctx);
bool fromwire_channeld_dev_quiesce(const void *p);
/* WIRE: CHANNELD_DEV_QUIESCE_REPLY */
u8 *towire_channeld_dev_quiesce_reply(const tal_t *ctx);
bool fromwire_channeld_dev_quiesce_reply(const void *p);
/* WIRE: CHANNELD_UPGRADED */
/* Tell master we're upgrading the commitment tx. */
u8 *towire_channeld_upgraded(const tal_t *ctx, const struct channel_type *new_type);
bool fromwire_channeld_upgraded(const tal_t *ctx, const void *p, struct channel_type **new_type);
/* WIRE: CHANNELD_BLOCKHEIGHT */
/* Tell peer about our latest and greatest blockheight. */
u8 *towire_channeld_blockheight(const tal_t *ctx, u32 blockheight);
bool fromwire_channeld_blockheight(const void *p, u32 *blockheight);
#endif /* LIGHTNING_CHANNELD_CHANNELD_WIREGEN_H */
// SHA256STAMP:f02f2fc72a5382fd545bdcd1789d873d1619baefea7f26d0bde92b5091b5b880

View File

@ -1,238 +0,0 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the .csv file it was generated from. */
/* Original template can be found at tools/gen/impl_template */
#include <closingd/closingd_wiregen.h>
#include <assert.h>
#include <ccan/array_size/array_size.h>
#include <ccan/mem/mem.h>
#include <ccan/tal/str/str.h>
#include <common/utils.h>
#include <stdio.h>
#ifndef SUPERVERBOSE
#define SUPERVERBOSE(...)
#endif
const char *closingd_wire_name(int e)
{
static char invalidbuf[sizeof("INVALID ") + STR_MAX_CHARS(e)];
switch ((enum closingd_wire)e) {
case WIRE_CLOSINGD_INIT: return "WIRE_CLOSINGD_INIT";
case WIRE_CLOSINGD_NOTIFICATION: return "WIRE_CLOSINGD_NOTIFICATION";
case WIRE_CLOSINGD_RECEIVED_SIGNATURE: return "WIRE_CLOSINGD_RECEIVED_SIGNATURE";
case WIRE_CLOSINGD_RECEIVED_SIGNATURE_REPLY: return "WIRE_CLOSINGD_RECEIVED_SIGNATURE_REPLY";
case WIRE_CLOSINGD_COMPLETE: return "WIRE_CLOSINGD_COMPLETE";
}
snprintf(invalidbuf, sizeof(invalidbuf), "INVALID %i", e);
return invalidbuf;
}
bool closingd_wire_is_defined(u16 type)
{
switch ((enum closingd_wire)type) {
case WIRE_CLOSINGD_INIT:;
case WIRE_CLOSINGD_NOTIFICATION:;
case WIRE_CLOSINGD_RECEIVED_SIGNATURE:;
case WIRE_CLOSINGD_RECEIVED_SIGNATURE_REPLY:;
case WIRE_CLOSINGD_COMPLETE:;
return true;
}
return false;
}
/* WIRE: CLOSINGD_INIT */
/* Begin! (passes peer fd */
u8 *towire_closingd_init(const tal_t *ctx, const struct chainparams *chainparams, const struct per_peer_state *pps, const struct channel_id *channel_id, const struct bitcoin_txid *funding_txid, u16 funding_txout, struct amount_sat funding_satoshi, const struct pubkey *local_fundingkey, const struct pubkey *remote_fundingkey, enum side opener, struct amount_sat local_sat, struct amount_sat remote_sat, struct amount_sat our_dust_limit, u32 min_feerate_perksipa, u32 preferred_feerate_perksipa, u32 *max_feerate_perksipa, struct amount_sat fee_limit_satoshi, const u8 *local_scriptpubkey, const u8 *remote_scriptpubkey, u64 fee_negotiation_step, u8 fee_negotiation_step_unit, bool use_quickclose, bool dev_fast_gossip, const struct bitcoin_outpoint *shutdown_wrong_funding)
{
u16 local_scriptpubkey_len = tal_count(local_scriptpubkey);
u16 remote_scriptpubkey_len = tal_count(remote_scriptpubkey);
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CLOSINGD_INIT);
towire_chainparams(&p, chainparams);
towire_per_peer_state(&p, pps);
towire_channel_id(&p, channel_id);
towire_bitcoin_txid(&p, funding_txid);
towire_u16(&p, funding_txout);
towire_amount_sat(&p, funding_satoshi);
towire_pubkey(&p, local_fundingkey);
towire_pubkey(&p, remote_fundingkey);
towire_side(&p, opener);
towire_amount_sat(&p, local_sat);
towire_amount_sat(&p, remote_sat);
towire_amount_sat(&p, our_dust_limit);
towire_u32(&p, min_feerate_perksipa);
towire_u32(&p, preferred_feerate_perksipa);
if (!max_feerate_perksipa)
towire_bool(&p, false);
else {
towire_bool(&p, true);
towire_u32(&p, *max_feerate_perksipa);
}
towire_amount_sat(&p, fee_limit_satoshi);
towire_u16(&p, local_scriptpubkey_len);
towire_u8_array(&p, local_scriptpubkey, local_scriptpubkey_len);
towire_u16(&p, remote_scriptpubkey_len);
towire_u8_array(&p, remote_scriptpubkey, remote_scriptpubkey_len);
towire_u64(&p, fee_negotiation_step);
towire_u8(&p, fee_negotiation_step_unit);
towire_bool(&p, use_quickclose);
towire_bool(&p, dev_fast_gossip);
if (!shutdown_wrong_funding)
towire_bool(&p, false);
else {
towire_bool(&p, true);
towire_bitcoin_outpoint(&p, shutdown_wrong_funding);
}
return memcheck(p, tal_count(p));
}
bool fromwire_closingd_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct per_peer_state **pps, struct channel_id *channel_id, struct bitcoin_txid *funding_txid, u16 *funding_txout, struct amount_sat *funding_satoshi, struct pubkey *local_fundingkey, struct pubkey *remote_fundingkey, enum side *opener, struct amount_sat *local_sat, struct amount_sat *remote_sat, struct amount_sat *our_dust_limit, u32 *min_feerate_perksipa, u32 *preferred_feerate_perksipa, u32 **max_feerate_perksipa, struct amount_sat *fee_limit_satoshi, u8 **local_scriptpubkey, u8 **remote_scriptpubkey, u64 *fee_negotiation_step, u8 *fee_negotiation_step_unit, bool *use_quickclose, bool *dev_fast_gossip, struct bitcoin_outpoint **shutdown_wrong_funding)
{
u16 local_scriptpubkey_len;
u16 remote_scriptpubkey_len;
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CLOSINGD_INIT)
return false;
fromwire_chainparams(&cursor, &plen, chainparams);
*pps = fromwire_per_peer_state(ctx, &cursor, &plen);
fromwire_channel_id(&cursor, &plen, channel_id);
fromwire_bitcoin_txid(&cursor, &plen, funding_txid);
*funding_txout = fromwire_u16(&cursor, &plen);
*funding_satoshi = fromwire_amount_sat(&cursor, &plen);
fromwire_pubkey(&cursor, &plen, local_fundingkey);
fromwire_pubkey(&cursor, &plen, remote_fundingkey);
*opener = fromwire_side(&cursor, &plen);
*local_sat = fromwire_amount_sat(&cursor, &plen);
*remote_sat = fromwire_amount_sat(&cursor, &plen);
*our_dust_limit = fromwire_amount_sat(&cursor, &plen);
*min_feerate_perksipa = fromwire_u32(&cursor, &plen);
*preferred_feerate_perksipa = fromwire_u32(&cursor, &plen);
if (!fromwire_bool(&cursor, &plen))
*max_feerate_perksipa = NULL;
else {
*max_feerate_perksipa = tal(ctx, u32);
**max_feerate_perksipa = fromwire_u32(&cursor, &plen);
}
*fee_limit_satoshi = fromwire_amount_sat(&cursor, &plen);
local_scriptpubkey_len = fromwire_u16(&cursor, &plen);
// 2nd case local_scriptpubkey
*local_scriptpubkey = local_scriptpubkey_len ? tal_arr(ctx, u8, local_scriptpubkey_len) : NULL;
fromwire_u8_array(&cursor, &plen, *local_scriptpubkey, local_scriptpubkey_len);
remote_scriptpubkey_len = fromwire_u16(&cursor, &plen);
// 2nd case remote_scriptpubkey
*remote_scriptpubkey = remote_scriptpubkey_len ? tal_arr(ctx, u8, remote_scriptpubkey_len) : NULL;
fromwire_u8_array(&cursor, &plen, *remote_scriptpubkey, remote_scriptpubkey_len);
*fee_negotiation_step = fromwire_u64(&cursor, &plen);
*fee_negotiation_step_unit = fromwire_u8(&cursor, &plen);
*use_quickclose = fromwire_bool(&cursor, &plen);
*dev_fast_gossip = fromwire_bool(&cursor, &plen);
if (!fromwire_bool(&cursor, &plen))
*shutdown_wrong_funding = NULL;
else {
*shutdown_wrong_funding = tal(ctx, struct bitcoin_outpoint);
fromwire_bitcoin_outpoint(&cursor, &plen, *shutdown_wrong_funding);
}
return cursor != NULL;
}
/* WIRE: CLOSINGD_NOTIFICATION */
/* Message for any commands waiting. */
u8 *towire_closingd_notification(const tal_t *ctx, enum log_level level, const wirestring *message)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CLOSINGD_NOTIFICATION);
towire_log_level(&p, level);
towire_wirestring(&p, message);
return memcheck(p, tal_count(p));
}
bool fromwire_closingd_notification(const tal_t *ctx, const void *p, enum log_level *level, wirestring **message)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CLOSINGD_NOTIFICATION)
return false;
*level = fromwire_log_level(&cursor, &plen);
*message = fromwire_wirestring(ctx, &cursor, &plen);
return cursor != NULL;
}
/* WIRE: CLOSINGD_RECEIVED_SIGNATURE */
/* We received an offer */
u8 *towire_closingd_received_signature(const tal_t *ctx, const struct bitcoin_signature *signature, const struct bitcoin_tx *tx)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CLOSINGD_RECEIVED_SIGNATURE);
towire_bitcoin_signature(&p, signature);
towire_bitcoin_tx(&p, tx);
return memcheck(p, tal_count(p));
}
bool fromwire_closingd_received_signature(const tal_t *ctx, const void *p, struct bitcoin_signature *signature, struct bitcoin_tx **tx)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CLOSINGD_RECEIVED_SIGNATURE)
return false;
fromwire_bitcoin_signature(&cursor, &plen, signature);
*tx = fromwire_bitcoin_tx(ctx, &cursor, &plen);
return cursor != NULL;
}
/* WIRE: CLOSINGD_RECEIVED_SIGNATURE_REPLY */
u8 *towire_closingd_received_signature_reply(const tal_t *ctx, const struct bitcoin_txid *closing_txid)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CLOSINGD_RECEIVED_SIGNATURE_REPLY);
towire_bitcoin_txid(&p, closing_txid);
return memcheck(p, tal_count(p));
}
bool fromwire_closingd_received_signature_reply(const void *p, struct bitcoin_txid *closing_txid)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CLOSINGD_RECEIVED_SIGNATURE_REPLY)
return false;
fromwire_bitcoin_txid(&cursor, &plen, closing_txid);
return cursor != NULL;
}
/* WIRE: CLOSINGD_COMPLETE */
/* Negotiations complete */
u8 *towire_closingd_complete(const tal_t *ctx)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CLOSINGD_COMPLETE);
return memcheck(p, tal_count(p));
}
bool fromwire_closingd_complete(const void *p)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CLOSINGD_COMPLETE)
return false;
return cursor != NULL;
}
// SHA256STAMP:8b3f45f8221281390e4e8883d07c55f9723f4bf08356dcd63f537dc30ca7b75f

View File

@ -1,67 +0,0 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the _csv file it was generated from. */
/* Original template can be found at tools/gen/header_template */
#ifndef LIGHTNING_CLOSINGD_CLOSINGD_WIREGEN_H
#define LIGHTNING_CLOSINGD_CLOSINGD_WIREGEN_H
#include <ccan/tal/tal.h>
#include <wire/tlvstream.h>
#include <wire/wire.h>
#include <bitcoin/tx.h>
#include <common/channel_id.h>
#include <common/cryptomsg.h>
#include <common/htlc_wire.h>
#include <common/per_peer_state.h>
#include <common/status_wire.h>
enum closingd_wire {
/* Begin! (passes peer fd */
WIRE_CLOSINGD_INIT = 2001,
/* Message for any commands waiting. */
WIRE_CLOSINGD_NOTIFICATION = 2003,
/* We received an offer */
WIRE_CLOSINGD_RECEIVED_SIGNATURE = 2002,
WIRE_CLOSINGD_RECEIVED_SIGNATURE_REPLY = 2102,
/* Negotiations complete */
WIRE_CLOSINGD_COMPLETE = 2004,
};
const char *closingd_wire_name(int e);
/**
* Determine whether a given message type is defined as a message.
*
* Returns true if the message type is part of the message definitions we have
* generated parsers for, false if it is a custom message that cannot be
* handled internally.
*/
bool closingd_wire_is_defined(u16 type);
/* WIRE: CLOSINGD_INIT */
/* Begin! (passes peer fd */
u8 *towire_closingd_init(const tal_t *ctx, const struct chainparams *chainparams, const struct per_peer_state *pps, const struct channel_id *channel_id, const struct bitcoin_txid *funding_txid, u16 funding_txout, struct amount_sat funding_satoshi, const struct pubkey *local_fundingkey, const struct pubkey *remote_fundingkey, enum side opener, struct amount_sat local_sat, struct amount_sat remote_sat, struct amount_sat our_dust_limit, u32 min_feerate_perksipa, u32 preferred_feerate_perksipa, u32 *max_feerate_perksipa, struct amount_sat fee_limit_satoshi, const u8 *local_scriptpubkey, const u8 *remote_scriptpubkey, u64 fee_negotiation_step, u8 fee_negotiation_step_unit, bool use_quickclose, bool dev_fast_gossip, const struct bitcoin_outpoint *shutdown_wrong_funding);
bool fromwire_closingd_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct per_peer_state **pps, struct channel_id *channel_id, struct bitcoin_txid *funding_txid, u16 *funding_txout, struct amount_sat *funding_satoshi, struct pubkey *local_fundingkey, struct pubkey *remote_fundingkey, enum side *opener, struct amount_sat *local_sat, struct amount_sat *remote_sat, struct amount_sat *our_dust_limit, u32 *min_feerate_perksipa, u32 *preferred_feerate_perksipa, u32 **max_feerate_perksipa, struct amount_sat *fee_limit_satoshi, u8 **local_scriptpubkey, u8 **remote_scriptpubkey, u64 *fee_negotiation_step, u8 *fee_negotiation_step_unit, bool *use_quickclose, bool *dev_fast_gossip, struct bitcoin_outpoint **shutdown_wrong_funding);
/* WIRE: CLOSINGD_NOTIFICATION */
/* Message for any commands waiting. */
u8 *towire_closingd_notification(const tal_t *ctx, enum log_level level, const wirestring *message);
bool fromwire_closingd_notification(const tal_t *ctx, const void *p, enum log_level *level, wirestring **message);
/* WIRE: CLOSINGD_RECEIVED_SIGNATURE */
/* We received an offer */
u8 *towire_closingd_received_signature(const tal_t *ctx, const struct bitcoin_signature *signature, const struct bitcoin_tx *tx);
bool fromwire_closingd_received_signature(const tal_t *ctx, const void *p, struct bitcoin_signature *signature, struct bitcoin_tx **tx);
/* WIRE: CLOSINGD_RECEIVED_SIGNATURE_REPLY */
u8 *towire_closingd_received_signature_reply(const tal_t *ctx, const struct bitcoin_txid *closing_txid);
bool fromwire_closingd_received_signature_reply(const void *p, struct bitcoin_txid *closing_txid);
/* WIRE: CLOSINGD_COMPLETE */
/* Negotiations complete */
u8 *towire_closingd_complete(const tal_t *ctx);
bool fromwire_closingd_complete(const void *p);
#endif /* LIGHTNING_CLOSINGD_CLOSINGD_WIREGEN_H */
// SHA256STAMP:8b3f45f8221281390e4e8883d07c55f9723f4bf08356dcd63f537dc30ca7b75f

View File

@ -1,83 +0,0 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the .csv file it was generated from. */
/* Original template can be found at tools/gen/impl_template */
#include <common/peer_status_wiregen.h>
#include <assert.h>
#include <ccan/array_size/array_size.h>
#include <ccan/mem/mem.h>
#include <ccan/tal/str/str.h>
#include <common/utils.h>
#include <stdio.h>
#ifndef SUPERVERBOSE
#define SUPERVERBOSE(...)
#endif
const char *peer_status_wire_name(int e)
{
static char invalidbuf[sizeof("INVALID ") + STR_MAX_CHARS(e)];
switch ((enum peer_status_wire)e) {
case WIRE_STATUS_PEER_ERROR: return "WIRE_STATUS_PEER_ERROR";
}
snprintf(invalidbuf, sizeof(invalidbuf), "INVALID %i", e);
return invalidbuf;
}
bool peer_status_wire_is_defined(u16 type)
{
switch ((enum peer_status_wire)type) {
case WIRE_STATUS_PEER_ERROR:;
return true;
}
return false;
}
/* WIRE: STATUS_PEER_ERROR */
/* An error occurred: if error_for_them */
u8 *towire_status_peer_error(const tal_t *ctx, const struct channel_id *channel, const wirestring *desc, bool warning, const struct per_peer_state *pps, const u8 *error_for_them)
{
u16 len = tal_count(error_for_them);
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_STATUS_PEER_ERROR);
/* This is implied if error_for_them */
towire_channel_id(&p, channel);
towire_wirestring(&p, desc);
/* Take a deep breath */
towire_bool(&p, warning);
towire_per_peer_state(&p, pps);
towire_u16(&p, len);
towire_u8_array(&p, error_for_them, len);
return memcheck(p, tal_count(p));
}
bool fromwire_status_peer_error(const tal_t *ctx, const void *p, struct channel_id *channel, wirestring **desc, bool *warning, struct per_peer_state **pps, u8 **error_for_them)
{
u16 len;
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_STATUS_PEER_ERROR)
return false;
/* This is implied if error_for_them */
fromwire_channel_id(&cursor, &plen, channel);
*desc = fromwire_wirestring(ctx, &cursor, &plen);
/* Take a deep breath */
*warning = fromwire_bool(&cursor, &plen);
*pps = fromwire_per_peer_state(ctx, &cursor, &plen);
len = fromwire_u16(&cursor, &plen);
// 2nd case error_for_them
*error_for_them = len ? tal_arr(ctx, u8, len) : NULL;
fromwire_u8_array(&cursor, &plen, *error_for_them, len);
return cursor != NULL;
}
// SHA256STAMP:3e1d1ae6327232326b2a08f788c59485e0c4abd37bdb55604f111e087f605520

View File

@ -1,37 +0,0 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the _csv file it was generated from. */
/* Original template can be found at tools/gen/header_template */
#ifndef LIGHTNING_COMMON_PEER_STATUS_WIREGEN_H
#define LIGHTNING_COMMON_PEER_STATUS_WIREGEN_H
#include <ccan/tal/tal.h>
#include <wire/tlvstream.h>
#include <wire/wire.h>
#include <common/channel_id.h>
#include <common/per_peer_state.h>
enum peer_status_wire {
/* An error occurred: if error_for_them */
WIRE_STATUS_PEER_ERROR = 0xFFF4,
};
const char *peer_status_wire_name(int e);
/**
* Determine whether a given message type is defined as a message.
*
* Returns true if the message type is part of the message definitions we have
* generated parsers for, false if it is a custom message that cannot be
* handled internally.
*/
bool peer_status_wire_is_defined(u16 type);
/* WIRE: STATUS_PEER_ERROR */
/* An error occurred: if error_for_them */
u8 *towire_status_peer_error(const tal_t *ctx, const struct channel_id *channel, const wirestring *desc, bool warning, const struct per_peer_state *pps, const u8 *error_for_them);
bool fromwire_status_peer_error(const tal_t *ctx, const void *p, struct channel_id *channel, wirestring **desc, bool *warning, struct per_peer_state **pps, u8 **error_for_them);
#endif /* LIGHTNING_COMMON_PEER_STATUS_WIREGEN_H */
// SHA256STAMP:3e1d1ae6327232326b2a08f788c59485e0c4abd37bdb55604f111e087f605520

217
common/status_wiregen.c generated
View File

@ -1,217 +0,0 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the .csv file it was generated from. */
/* Original template can be found at tools/gen/impl_template */
#include <common/status_wiregen.h>
#include <assert.h>
#include <ccan/array_size/array_size.h>
#include <ccan/mem/mem.h>
#include <ccan/tal/str/str.h>
#include <common/utils.h>
#include <stdio.h>
#ifndef SUPERVERBOSE
#define SUPERVERBOSE(...)
#endif
const char *status_wire_name(int e)
{
static char invalidbuf[sizeof("INVALID ") + STR_MAX_CHARS(e)];
switch ((enum status_wire)e) {
case WIRE_STATUS_LOG: return "WIRE_STATUS_LOG";
case WIRE_STATUS_IO: return "WIRE_STATUS_IO";
case WIRE_STATUS_FAIL: return "WIRE_STATUS_FAIL";
case WIRE_STATUS_PEER_CONNECTION_LOST: return "WIRE_STATUS_PEER_CONNECTION_LOST";
case WIRE_STATUS_PEER_BILLBOARD: return "WIRE_STATUS_PEER_BILLBOARD";
case WIRE_STATUS_VERSION: return "WIRE_STATUS_VERSION";
}
snprintf(invalidbuf, sizeof(invalidbuf), "INVALID %i", e);
return invalidbuf;
}
bool status_wire_is_defined(u16 type)
{
switch ((enum status_wire)type) {
case WIRE_STATUS_LOG:;
case WIRE_STATUS_IO:;
case WIRE_STATUS_FAIL:;
case WIRE_STATUS_PEER_CONNECTION_LOST:;
case WIRE_STATUS_PEER_BILLBOARD:;
case WIRE_STATUS_VERSION:;
return true;
}
return false;
}
/* WIRE: STATUS_LOG */
u8 *towire_status_log(const tal_t *ctx, enum log_level level, const struct node_id *peer, const wirestring *entry)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_STATUS_LOG);
towire_log_level(&p, level);
if (!peer)
towire_bool(&p, false);
else {
towire_bool(&p, true);
towire_node_id(&p, peer);
}
towire_wirestring(&p, entry);
return memcheck(p, tal_count(p));
}
bool fromwire_status_log(const tal_t *ctx, const void *p, enum log_level *level, struct node_id **peer, wirestring **entry)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_STATUS_LOG)
return false;
*level = fromwire_log_level(&cursor, &plen);
if (!fromwire_bool(&cursor, &plen))
*peer = NULL;
else {
*peer = tal(ctx, struct node_id);
fromwire_node_id(&cursor, &plen, *peer);
}
*entry = fromwire_wirestring(ctx, &cursor, &plen);
return cursor != NULL;
}
/* WIRE: STATUS_IO */
u8 *towire_status_io(const tal_t *ctx, enum log_level iodir, const struct node_id *peer, const wirestring *who, const u8 *data)
{
u16 len = tal_count(data);
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_STATUS_IO);
towire_log_level(&p, iodir);
if (!peer)
towire_bool(&p, false);
else {
towire_bool(&p, true);
towire_node_id(&p, peer);
}
towire_wirestring(&p, who);
towire_u16(&p, len);
towire_u8_array(&p, data, len);
return memcheck(p, tal_count(p));
}
bool fromwire_status_io(const tal_t *ctx, const void *p, enum log_level *iodir, struct node_id **peer, wirestring **who, u8 **data)
{
u16 len;
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_STATUS_IO)
return false;
*iodir = fromwire_log_level(&cursor, &plen);
if (!fromwire_bool(&cursor, &plen))
*peer = NULL;
else {
*peer = tal(ctx, struct node_id);
fromwire_node_id(&cursor, &plen, *peer);
}
*who = fromwire_wirestring(ctx, &cursor, &plen);
len = fromwire_u16(&cursor, &plen);
// 2nd case data
*data = len ? tal_arr(ctx, u8, len) : NULL;
fromwire_u8_array(&cursor, &plen, *data, len);
return cursor != NULL;
}
/* WIRE: STATUS_FAIL */
u8 *towire_status_fail(const tal_t *ctx, enum status_failreason failreason, const wirestring *desc)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_STATUS_FAIL);
towire_status_failreason(&p, failreason);
towire_wirestring(&p, desc);
return memcheck(p, tal_count(p));
}
bool fromwire_status_fail(const tal_t *ctx, const void *p, enum status_failreason *failreason, wirestring **desc)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_STATUS_FAIL)
return false;
*failreason = fromwire_status_failreason(&cursor, &plen);
*desc = fromwire_wirestring(ctx, &cursor, &plen);
return cursor != NULL;
}
/* WIRE: STATUS_PEER_CONNECTION_LOST */
u8 *towire_status_peer_connection_lost(const tal_t *ctx)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_STATUS_PEER_CONNECTION_LOST);
return memcheck(p, tal_count(p));
}
bool fromwire_status_peer_connection_lost(const void *p)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_STATUS_PEER_CONNECTION_LOST)
return false;
return cursor != NULL;
}
/* WIRE: STATUS_PEER_BILLBOARD */
u8 *towire_status_peer_billboard(const tal_t *ctx, bool perm, const wirestring *happenings)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_STATUS_PEER_BILLBOARD);
towire_bool(&p, perm);
towire_wirestring(&p, happenings);
return memcheck(p, tal_count(p));
}
bool fromwire_status_peer_billboard(const tal_t *ctx, const void *p, bool *perm, wirestring **happenings)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_STATUS_PEER_BILLBOARD)
return false;
*perm = fromwire_bool(&cursor, &plen);
*happenings = fromwire_wirestring(ctx, &cursor, &plen);
return cursor != NULL;
}
/* WIRE: STATUS_VERSION */
u8 *towire_status_version(const tal_t *ctx, const wirestring *version)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_STATUS_VERSION);
towire_wirestring(&p, version);
return memcheck(p, tal_count(p));
}
bool fromwire_status_version(const tal_t *ctx, const void *p, wirestring **version)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_STATUS_VERSION)
return false;
*version = fromwire_wirestring(ctx, &cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:6910f83360952ba00ee6a56e96a7402d9b973eb125a6c98bec4d52fa97740457

View File

@ -1,62 +0,0 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the _csv file it was generated from. */
/* Original template can be found at tools/gen/header_template */
#ifndef LIGHTNING_COMMON_STATUS_WIREGEN_H
#define LIGHTNING_COMMON_STATUS_WIREGEN_H
#include <ccan/tal/tal.h>
#include <wire/tlvstream.h>
#include <wire/wire.h>
#include <common/per_peer_state.h>
#include <common/node_id.h>
#include <common/status_wire.h>
#include <common/status_levels.h>
enum status_wire {
WIRE_STATUS_LOG = 0xFFF0,
WIRE_STATUS_IO = 0xFFF1,
WIRE_STATUS_FAIL = 0xFFF2,
WIRE_STATUS_PEER_CONNECTION_LOST = 0xFFF3,
WIRE_STATUS_PEER_BILLBOARD = 0xFFF5,
WIRE_STATUS_VERSION = 0xFFF6,
};
const char *status_wire_name(int e);
/**
* Determine whether a given message type is defined as a message.
*
* Returns true if the message type is part of the message definitions we have
* generated parsers for, false if it is a custom message that cannot be
* handled internally.
*/
bool status_wire_is_defined(u16 type);
/* WIRE: STATUS_LOG */
u8 *towire_status_log(const tal_t *ctx, enum log_level level, const struct node_id *peer, const wirestring *entry);
bool fromwire_status_log(const tal_t *ctx, const void *p, enum log_level *level, struct node_id **peer, wirestring **entry);
/* WIRE: STATUS_IO */
u8 *towire_status_io(const tal_t *ctx, enum log_level iodir, const struct node_id *peer, const wirestring *who, const u8 *data);
bool fromwire_status_io(const tal_t *ctx, const void *p, enum log_level *iodir, struct node_id **peer, wirestring **who, u8 **data);
/* WIRE: STATUS_FAIL */
u8 *towire_status_fail(const tal_t *ctx, enum status_failreason failreason, const wirestring *desc);
bool fromwire_status_fail(const tal_t *ctx, const void *p, enum status_failreason *failreason, wirestring **desc);
/* WIRE: STATUS_PEER_CONNECTION_LOST */
u8 *towire_status_peer_connection_lost(const tal_t *ctx);
bool fromwire_status_peer_connection_lost(const void *p);
/* WIRE: STATUS_PEER_BILLBOARD */
u8 *towire_status_peer_billboard(const tal_t *ctx, bool perm, const wirestring *happenings);
bool fromwire_status_peer_billboard(const tal_t *ctx, const void *p, bool *perm, wirestring **happenings);
/* WIRE: STATUS_VERSION */
u8 *towire_status_version(const tal_t *ctx, const wirestring *version);
bool fromwire_status_version(const tal_t *ctx, const void *p, wirestring **version);
#endif /* LIGHTNING_COMMON_STATUS_WIREGEN_H */
// SHA256STAMP:6910f83360952ba00ee6a56e96a7402d9b973eb125a6c98bec4d52fa97740457

View File

@ -1,164 +0,0 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the .csv file it was generated from. */
/* Original template can be found at tools/gen/impl_template */
#include <connectd/connectd_gossipd_wiregen.h>
#include <assert.h>
#include <ccan/array_size/array_size.h>
#include <ccan/mem/mem.h>
#include <ccan/tal/str/str.h>
#include <common/utils.h>
#include <stdio.h>
#ifndef SUPERVERBOSE
#define SUPERVERBOSE(...)
#endif
const char *connectd_gossipd_wire_name(int e)
{
static char invalidbuf[sizeof("INVALID ") + STR_MAX_CHARS(e)];
switch ((enum connectd_gossipd_wire)e) {
case WIRE_GOSSIPD_NEW_PEER: return "WIRE_GOSSIPD_NEW_PEER";
case WIRE_GOSSIPD_NEW_PEER_REPLY: return "WIRE_GOSSIPD_NEW_PEER_REPLY";
case WIRE_GOSSIPD_GET_ADDRS: return "WIRE_GOSSIPD_GET_ADDRS";
case WIRE_GOSSIPD_GET_ADDRS_REPLY: return "WIRE_GOSSIPD_GET_ADDRS_REPLY";
}
snprintf(invalidbuf, sizeof(invalidbuf), "INVALID %i", e);
return invalidbuf;
}
bool connectd_gossipd_wire_is_defined(u16 type)
{
switch ((enum connectd_gossipd_wire)type) {
case WIRE_GOSSIPD_NEW_PEER:;
case WIRE_GOSSIPD_NEW_PEER_REPLY:;
case WIRE_GOSSIPD_GET_ADDRS:;
case WIRE_GOSSIPD_GET_ADDRS_REPLY:;
return true;
}
return false;
}
/* WIRE: GOSSIPD_NEW_PEER */
/* Communication between gossipd and connectd. */
u8 *towire_gossipd_new_peer(const tal_t *ctx, const struct node_id *id, bool gossip_queries_feature, bool initial_routing_sync)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_GOSSIPD_NEW_PEER);
towire_node_id(&p, id);
/* Did we negotiate LOCAL_GOSSIP_QUERIES? */
towire_bool(&p, gossip_queries_feature);
/* Did they offer LOCAL_INITIAL_ROUTING_SYNC? */
towire_bool(&p, initial_routing_sync);
return memcheck(p, tal_count(p));
}
bool fromwire_gossipd_new_peer(const void *p, struct node_id *id, bool *gossip_queries_feature, bool *initial_routing_sync)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIPD_NEW_PEER)
return false;
fromwire_node_id(&cursor, &plen, id);
/* Did we negotiate LOCAL_GOSSIP_QUERIES? */
*gossip_queries_feature = fromwire_bool(&cursor, &plen);
/* Did they offer LOCAL_INITIAL_ROUTING_SYNC? */
*initial_routing_sync = fromwire_bool(&cursor, &plen);
return cursor != NULL;
}
/* WIRE: GOSSIPD_NEW_PEER_REPLY */
/* if success: + gossip fd and gossip_store fd */
u8 *towire_gossipd_new_peer_reply(const tal_t *ctx, bool success, const struct gossip_state *gs)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_GOSSIPD_NEW_PEER_REPLY);
towire_bool(&p, success);
if (!gs)
towire_bool(&p, false);
else {
towire_bool(&p, true);
towire_gossip_state(&p, gs);
}
return memcheck(p, tal_count(p));
}
bool fromwire_gossipd_new_peer_reply(const tal_t *ctx, const void *p, bool *success, struct gossip_state **gs)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIPD_NEW_PEER_REPLY)
return false;
*success = fromwire_bool(&cursor, &plen);
if (!fromwire_bool(&cursor, &plen))
*gs = NULL;
else {
*gs = tal(ctx, struct gossip_state);
fromwire_gossip_state(&cursor, &plen, *gs);
}
return cursor != NULL;
}
/* WIRE: GOSSIPD_GET_ADDRS */
/* Connectd asks gossipd for any known addresses for that node. */
u8 *towire_gossipd_get_addrs(const tal_t *ctx, const struct node_id *id)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_GOSSIPD_GET_ADDRS);
towire_node_id(&p, id);
return memcheck(p, tal_count(p));
}
bool fromwire_gossipd_get_addrs(const void *p, struct node_id *id)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIPD_GET_ADDRS)
return false;
fromwire_node_id(&cursor, &plen, id);
return cursor != NULL;
}
/* WIRE: GOSSIPD_GET_ADDRS_REPLY */
u8 *towire_gossipd_get_addrs_reply(const tal_t *ctx, const struct wireaddr *addrs)
{
u16 num = tal_count(addrs);
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_GOSSIPD_GET_ADDRS_REPLY);
towire_u16(&p, num);
for (size_t i = 0; i < num; i++)
towire_wireaddr(&p, addrs + i);
return memcheck(p, tal_count(p));
}
bool fromwire_gossipd_get_addrs_reply(const tal_t *ctx, const void *p, struct wireaddr **addrs)
{
u16 num;
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIPD_GET_ADDRS_REPLY)
return false;
num = fromwire_u16(&cursor, &plen);
// 2nd case addrs
*addrs = num ? tal_arr(ctx, struct wireaddr, num) : NULL;
for (size_t i = 0; i < num; i++)
fromwire_wireaddr(&cursor, &plen, *addrs + i);
return cursor != NULL;
}
// SHA256STAMP:a03f3546c6a3dc0ee7055ba912fffd6acf9dc86bb9dc4472ecfc240582709481

View File

@ -1,57 +0,0 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the _csv file it was generated from. */
/* Original template can be found at tools/gen/header_template */
#ifndef LIGHTNING_CONNECTD_CONNECTD_GOSSIPD_WIREGEN_H
#define LIGHTNING_CONNECTD_CONNECTD_GOSSIPD_WIREGEN_H
#include <ccan/tal/tal.h>
#include <wire/tlvstream.h>
#include <wire/wire.h>
#include <common/node_id.h>
#include <common/per_peer_state.h>
#include <common/wireaddr.h>
enum connectd_gossipd_wire {
/* Communication between gossipd and connectd. */
WIRE_GOSSIPD_NEW_PEER = 4000,
/* if success: + gossip fd and gossip_store fd */
WIRE_GOSSIPD_NEW_PEER_REPLY = 4100,
/* Connectd asks gossipd for any known addresses for that node. */
WIRE_GOSSIPD_GET_ADDRS = 4001,
WIRE_GOSSIPD_GET_ADDRS_REPLY = 4101,
};
const char *connectd_gossipd_wire_name(int e);
/**
* Determine whether a given message type is defined as a message.
*
* Returns true if the message type is part of the message definitions we have
* generated parsers for, false if it is a custom message that cannot be
* handled internally.
*/
bool connectd_gossipd_wire_is_defined(u16 type);
/* WIRE: GOSSIPD_NEW_PEER */
/* Communication between gossipd and connectd. */
u8 *towire_gossipd_new_peer(const tal_t *ctx, const struct node_id *id, bool gossip_queries_feature, bool initial_routing_sync);
bool fromwire_gossipd_new_peer(const void *p, struct node_id *id, bool *gossip_queries_feature, bool *initial_routing_sync);
/* WIRE: GOSSIPD_NEW_PEER_REPLY */
/* if success: + gossip fd and gossip_store fd */
u8 *towire_gossipd_new_peer_reply(const tal_t *ctx, bool success, const struct gossip_state *gs);
bool fromwire_gossipd_new_peer_reply(const tal_t *ctx, const void *p, bool *success, struct gossip_state **gs);
/* WIRE: GOSSIPD_GET_ADDRS */
/* Connectd asks gossipd for any known addresses for that node. */
u8 *towire_gossipd_get_addrs(const tal_t *ctx, const struct node_id *id);
bool fromwire_gossipd_get_addrs(const void *p, struct node_id *id);
/* WIRE: GOSSIPD_GET_ADDRS_REPLY */
u8 *towire_gossipd_get_addrs_reply(const tal_t *ctx, const struct wireaddr *addrs);
bool fromwire_gossipd_get_addrs_reply(const tal_t *ctx, const void *p, struct wireaddr **addrs);
#endif /* LIGHTNING_CONNECTD_CONNECTD_GOSSIPD_WIREGEN_H */
// SHA256STAMP:a03f3546c6a3dc0ee7055ba912fffd6acf9dc86bb9dc4472ecfc240582709481

View File

@ -1,446 +0,0 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the .csv file it was generated from. */
/* Original template can be found at tools/gen/impl_template */
#include <connectd/connectd_wiregen.h>
#include <assert.h>
#include <ccan/array_size/array_size.h>
#include <ccan/mem/mem.h>
#include <ccan/tal/str/str.h>
#include <common/utils.h>
#include <stdio.h>
#ifndef SUPERVERBOSE
#define SUPERVERBOSE(...)
#endif
const char *connectd_wire_name(int e)
{
static char invalidbuf[sizeof("INVALID ") + STR_MAX_CHARS(e)];
switch ((enum connectd_wire)e) {
case WIRE_CONNECTD_INIT: return "WIRE_CONNECTD_INIT";
case WIRE_CONNECTD_INIT_REPLY: return "WIRE_CONNECTD_INIT_REPLY";
case WIRE_CONNECTD_ACTIVATE: return "WIRE_CONNECTD_ACTIVATE";
case WIRE_CONNECTD_ACTIVATE_REPLY: return "WIRE_CONNECTD_ACTIVATE_REPLY";
case WIRE_CONNECTD_RECONNECTED: return "WIRE_CONNECTD_RECONNECTED";
case WIRE_CONNECTD_CONNECT_TO_PEER: return "WIRE_CONNECTD_CONNECT_TO_PEER";
case WIRE_CONNECTD_CONNECT_FAILED: return "WIRE_CONNECTD_CONNECT_FAILED";
case WIRE_CONNECTD_PEER_CONNECTED: return "WIRE_CONNECTD_PEER_CONNECTED";
case WIRE_CONNECTD_PEER_DISCONNECTED: return "WIRE_CONNECTD_PEER_DISCONNECTED";
case WIRE_CONNECTD_PEER_FINAL_MSG: return "WIRE_CONNECTD_PEER_FINAL_MSG";
case WIRE_CONNECTD_DEV_MEMLEAK: return "WIRE_CONNECTD_DEV_MEMLEAK";
case WIRE_CONNECTD_DEV_MEMLEAK_REPLY: return "WIRE_CONNECTD_DEV_MEMLEAK_REPLY";
}
snprintf(invalidbuf, sizeof(invalidbuf), "INVALID %i", e);
return invalidbuf;
}
bool connectd_wire_is_defined(u16 type)
{
switch ((enum connectd_wire)type) {
case WIRE_CONNECTD_INIT:;
case WIRE_CONNECTD_INIT_REPLY:;
case WIRE_CONNECTD_ACTIVATE:;
case WIRE_CONNECTD_ACTIVATE_REPLY:;
case WIRE_CONNECTD_RECONNECTED:;
case WIRE_CONNECTD_CONNECT_TO_PEER:;
case WIRE_CONNECTD_CONNECT_FAILED:;
case WIRE_CONNECTD_PEER_CONNECTED:;
case WIRE_CONNECTD_PEER_DISCONNECTED:;
case WIRE_CONNECTD_PEER_FINAL_MSG:;
case WIRE_CONNECTD_DEV_MEMLEAK:;
case WIRE_CONNECTD_DEV_MEMLEAK_REPLY:;
return true;
}
return false;
}
/* WIRE: CONNECTD_INIT */
u8 *towire_connectd_init(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_features, const struct node_id *id, const struct wireaddr_internal *wireaddrs, const enum addr_listen_announce *listen_announce, const struct wireaddr *tor_proxyaddr, bool use_tor_proxy_always, bool dev_allow_localhost, bool use_dns, const wirestring *tor_password, bool use_v3_autotor, u32 timeout_secs)
{
u16 num_wireaddrs = tal_count(listen_announce);
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CONNECTD_INIT);
towire_chainparams(&p, chainparams);
towire_feature_set(&p, our_features);
towire_node_id(&p, id);
towire_u16(&p, num_wireaddrs);
for (size_t i = 0; i < num_wireaddrs; i++)
towire_wireaddr_internal(&p, wireaddrs + i);
for (size_t i = 0; i < num_wireaddrs; i++)
towire_addr_listen_announce(&p, listen_announce[i]);
if (!tor_proxyaddr)
towire_bool(&p, false);
else {
towire_bool(&p, true);
towire_wireaddr(&p, tor_proxyaddr);
}
towire_bool(&p, use_tor_proxy_always);
towire_bool(&p, dev_allow_localhost);
towire_bool(&p, use_dns);
towire_wirestring(&p, tor_password);
towire_bool(&p, use_v3_autotor);
towire_u32(&p, timeout_secs);
return memcheck(p, tal_count(p));
}
bool fromwire_connectd_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_features, struct node_id *id, struct wireaddr_internal **wireaddrs, enum addr_listen_announce **listen_announce, struct wireaddr **tor_proxyaddr, bool *use_tor_proxy_always, bool *dev_allow_localhost, bool *use_dns, wirestring **tor_password, bool *use_v3_autotor, u32 *timeout_secs)
{
u16 num_wireaddrs;
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CONNECTD_INIT)
return false;
fromwire_chainparams(&cursor, &plen, chainparams);
*our_features = fromwire_feature_set(ctx, &cursor, &plen);
fromwire_node_id(&cursor, &plen, id);
num_wireaddrs = fromwire_u16(&cursor, &plen);
// 2nd case wireaddrs
*wireaddrs = num_wireaddrs ? tal_arr(ctx, struct wireaddr_internal, num_wireaddrs) : NULL;
for (size_t i = 0; i < num_wireaddrs; i++)
fromwire_wireaddr_internal(&cursor, &plen, *wireaddrs + i);
// 2nd case listen_announce
*listen_announce = num_wireaddrs ? tal_arr(ctx, enum addr_listen_announce, num_wireaddrs) : NULL;
for (size_t i = 0; i < num_wireaddrs; i++)
(*listen_announce)[i] = fromwire_addr_listen_announce(&cursor, &plen);
if (!fromwire_bool(&cursor, &plen))
*tor_proxyaddr = NULL;
else {
*tor_proxyaddr = tal(ctx, struct wireaddr);
fromwire_wireaddr(&cursor, &plen, *tor_proxyaddr);
}
*use_tor_proxy_always = fromwire_bool(&cursor, &plen);
*dev_allow_localhost = fromwire_bool(&cursor, &plen);
*use_dns = fromwire_bool(&cursor, &plen);
*tor_password = fromwire_wirestring(ctx, &cursor, &plen);
*use_v3_autotor = fromwire_bool(&cursor, &plen);
*timeout_secs = fromwire_u32(&cursor, &plen);
return cursor != NULL;
}
/* WIRE: CONNECTD_INIT_REPLY */
/* Connectd->master */
u8 *towire_connectd_init_reply(const tal_t *ctx, const struct wireaddr_internal *bindings, const struct wireaddr *announcable)
{
u16 num_bindings = tal_count(bindings);
u16 num_announcable = tal_count(announcable);
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CONNECTD_INIT_REPLY);
towire_u16(&p, num_bindings);
for (size_t i = 0; i < num_bindings; i++)
towire_wireaddr_internal(&p, bindings + i);
towire_u16(&p, num_announcable);
for (size_t i = 0; i < num_announcable; i++)
towire_wireaddr(&p, announcable + i);
return memcheck(p, tal_count(p));
}
bool fromwire_connectd_init_reply(const tal_t *ctx, const void *p, struct wireaddr_internal **bindings, struct wireaddr **announcable)
{
u16 num_bindings;
u16 num_announcable;
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CONNECTD_INIT_REPLY)
return false;
num_bindings = fromwire_u16(&cursor, &plen);
// 2nd case bindings
*bindings = num_bindings ? tal_arr(ctx, struct wireaddr_internal, num_bindings) : NULL;
for (size_t i = 0; i < num_bindings; i++)
fromwire_wireaddr_internal(&cursor, &plen, *bindings + i);
num_announcable = fromwire_u16(&cursor, &plen);
// 2nd case announcable
*announcable = num_announcable ? tal_arr(ctx, struct wireaddr, num_announcable) : NULL;
for (size_t i = 0; i < num_announcable; i++)
fromwire_wireaddr(&cursor, &plen, *announcable + i);
return cursor != NULL;
}
/* WIRE: CONNECTD_ACTIVATE */
/* Activate the connect daemon */
u8 *towire_connectd_activate(const tal_t *ctx, bool listen)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CONNECTD_ACTIVATE);
/* Do we listen? */
towire_bool(&p, listen);
return memcheck(p, tal_count(p));
}
bool fromwire_connectd_activate(const void *p, bool *listen)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CONNECTD_ACTIVATE)
return false;
/* Do we listen? */
*listen = fromwire_bool(&cursor, &plen);
return cursor != NULL;
}
/* WIRE: CONNECTD_ACTIVATE_REPLY */
/* Connectd->master */
u8 *towire_connectd_activate_reply(const tal_t *ctx)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CONNECTD_ACTIVATE_REPLY);
return memcheck(p, tal_count(p));
}
bool fromwire_connectd_activate_reply(const void *p)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CONNECTD_ACTIVATE_REPLY)
return false;
return cursor != NULL;
}
/* WIRE: CONNECTD_RECONNECTED */
/* connectd->master: disconnect this peer please (due to reconnect). */
u8 *towire_connectd_reconnected(const tal_t *ctx, const struct node_id *id)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CONNECTD_RECONNECTED);
towire_node_id(&p, id);
return memcheck(p, tal_count(p));
}
bool fromwire_connectd_reconnected(const void *p, struct node_id *id)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CONNECTD_RECONNECTED)
return false;
fromwire_node_id(&cursor, &plen, id);
return cursor != NULL;
}
/* WIRE: CONNECTD_CONNECT_TO_PEER */
/* Master -> connectd: connect to a peer. */
u8 *towire_connectd_connect_to_peer(const tal_t *ctx, const struct node_id *id, u32 seconds_waited, const struct wireaddr_internal *addrhint)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CONNECTD_CONNECT_TO_PEER);
towire_node_id(&p, id);
towire_u32(&p, seconds_waited);
if (!addrhint)
towire_bool(&p, false);
else {
towire_bool(&p, true);
towire_wireaddr_internal(&p, addrhint);
}
return memcheck(p, tal_count(p));
}
bool fromwire_connectd_connect_to_peer(const tal_t *ctx, const void *p, struct node_id *id, u32 *seconds_waited, struct wireaddr_internal **addrhint)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CONNECTD_CONNECT_TO_PEER)
return false;
fromwire_node_id(&cursor, &plen, id);
*seconds_waited = fromwire_u32(&cursor, &plen);
if (!fromwire_bool(&cursor, &plen))
*addrhint = NULL;
else {
*addrhint = tal(ctx, struct wireaddr_internal);
fromwire_wireaddr_internal(&cursor, &plen, *addrhint);
}
return cursor != NULL;
}
/* WIRE: CONNECTD_CONNECT_FAILED */
/* Connectd->master: connect failed. */
u8 *towire_connectd_connect_failed(const tal_t *ctx, const struct node_id *id, errcode_t failcode, const wirestring *failreason, u32 seconds_to_delay, const struct wireaddr_internal *addrhint)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CONNECTD_CONNECT_FAILED);
towire_node_id(&p, id);
towire_errcode_t(&p, failcode);
towire_wirestring(&p, failreason);
towire_u32(&p, seconds_to_delay);
if (!addrhint)
towire_bool(&p, false);
else {
towire_bool(&p, true);
towire_wireaddr_internal(&p, addrhint);
}
return memcheck(p, tal_count(p));
}
bool fromwire_connectd_connect_failed(const tal_t *ctx, const void *p, struct node_id *id, errcode_t *failcode, wirestring **failreason, u32 *seconds_to_delay, struct wireaddr_internal **addrhint)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CONNECTD_CONNECT_FAILED)
return false;
fromwire_node_id(&cursor, &plen, id);
*failcode = fromwire_errcode_t(&cursor, &plen);
*failreason = fromwire_wirestring(ctx, &cursor, &plen);
*seconds_to_delay = fromwire_u32(&cursor, &plen);
if (!fromwire_bool(&cursor, &plen))
*addrhint = NULL;
else {
*addrhint = tal(ctx, struct wireaddr_internal);
fromwire_wireaddr_internal(&cursor, &plen, *addrhint);
}
return cursor != NULL;
}
/* WIRE: CONNECTD_PEER_CONNECTED */
/* Connectd -> master: we got a peer. Three fds: peer */
u8 *towire_connectd_peer_connected(const tal_t *ctx, const struct node_id *id, const struct wireaddr_internal *addr, bool incoming, const struct per_peer_state *pps, const u8 *features)
{
u16 flen = tal_count(features);
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CONNECTD_PEER_CONNECTED);
towire_node_id(&p, id);
towire_wireaddr_internal(&p, addr);
towire_bool(&p, incoming);
towire_per_peer_state(&p, pps);
towire_u16(&p, flen);
towire_u8_array(&p, features, flen);
return memcheck(p, tal_count(p));
}
bool fromwire_connectd_peer_connected(const tal_t *ctx, const void *p, struct node_id *id, struct wireaddr_internal *addr, bool *incoming, struct per_peer_state **pps, u8 **features)
{
u16 flen;
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CONNECTD_PEER_CONNECTED)
return false;
fromwire_node_id(&cursor, &plen, id);
fromwire_wireaddr_internal(&cursor, &plen, addr);
*incoming = fromwire_bool(&cursor, &plen);
*pps = fromwire_per_peer_state(ctx, &cursor, &plen);
flen = fromwire_u16(&cursor, &plen);
// 2nd case features
*features = flen ? tal_arr(ctx, u8, flen) : NULL;
fromwire_u8_array(&cursor, &plen, *features, flen);
return cursor != NULL;
}
/* WIRE: CONNECTD_PEER_DISCONNECTED */
/* master -> connectd: peer has disconnected. */
u8 *towire_connectd_peer_disconnected(const tal_t *ctx, const struct node_id *id)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CONNECTD_PEER_DISCONNECTED);
towire_node_id(&p, id);
return memcheck(p, tal_count(p));
}
bool fromwire_connectd_peer_disconnected(const void *p, struct node_id *id)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CONNECTD_PEER_DISCONNECTED)
return false;
fromwire_node_id(&cursor, &plen, id);
return cursor != NULL;
}
/* WIRE: CONNECTD_PEER_FINAL_MSG */
/* master -> connectd: give message to peer and disconnect. Three fds: peer */
u8 *towire_connectd_peer_final_msg(const tal_t *ctx, const struct node_id *id, const struct per_peer_state *pps, const u8 *msg)
{
u16 len = tal_count(msg);
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CONNECTD_PEER_FINAL_MSG);
towire_node_id(&p, id);
towire_per_peer_state(&p, pps);
towire_u16(&p, len);
towire_u8_array(&p, msg, len);
return memcheck(p, tal_count(p));
}
bool fromwire_connectd_peer_final_msg(const tal_t *ctx, const void *p, struct node_id *id, struct per_peer_state **pps, u8 **msg)
{
u16 len;
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CONNECTD_PEER_FINAL_MSG)
return false;
fromwire_node_id(&cursor, &plen, id);
*pps = fromwire_per_peer_state(ctx, &cursor, &plen);
len = fromwire_u16(&cursor, &plen);
// 2nd case msg
*msg = len ? tal_arr(ctx, u8, len) : NULL;
fromwire_u8_array(&cursor, &plen, *msg, len);
return cursor != NULL;
}
/* WIRE: CONNECTD_DEV_MEMLEAK */
/* master -> connectd: do you have a memleak? */
u8 *towire_connectd_dev_memleak(const tal_t *ctx)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CONNECTD_DEV_MEMLEAK);
return memcheck(p, tal_count(p));
}
bool fromwire_connectd_dev_memleak(const void *p)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CONNECTD_DEV_MEMLEAK)
return false;
return cursor != NULL;
}
/* WIRE: CONNECTD_DEV_MEMLEAK_REPLY */
u8 *towire_connectd_dev_memleak_reply(const tal_t *ctx, bool leak)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_CONNECTD_DEV_MEMLEAK_REPLY);
towire_bool(&p, leak);
return memcheck(p, tal_count(p));
}
bool fromwire_connectd_dev_memleak_reply(const void *p, bool *leak)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_CONNECTD_DEV_MEMLEAK_REPLY)
return false;
*leak = fromwire_bool(&cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:f10d8c579846bdad3caee38596f5b3a89af7f0be89ab569175045e9375ada5d0

View File

@ -1,113 +0,0 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the _csv file it was generated from. */
/* Original template can be found at tools/gen/header_template */
#ifndef LIGHTNING_CONNECTD_CONNECTD_WIREGEN_H
#define LIGHTNING_CONNECTD_CONNECTD_WIREGEN_H
#include <ccan/tal/tal.h>
#include <wire/tlvstream.h>
#include <wire/wire.h>
#include <common/cryptomsg.h>
#include <common/features.h>
#include <common/per_peer_state.h>
#include <common/wireaddr.h>
#include <lightningd/gossip_msg.h>
enum connectd_wire {
WIRE_CONNECTD_INIT = 2000,
/* Connectd->master */
WIRE_CONNECTD_INIT_REPLY = 2100,
/* Activate the connect daemon */
WIRE_CONNECTD_ACTIVATE = 2025,
/* Connectd->master */
WIRE_CONNECTD_ACTIVATE_REPLY = 2125,
/* connectd->master: disconnect this peer please (due to reconnect). */
WIRE_CONNECTD_RECONNECTED = 2112,
/* Master -> connectd: connect to a peer. */
WIRE_CONNECTD_CONNECT_TO_PEER = 2001,
/* Connectd->master: connect failed. */
WIRE_CONNECTD_CONNECT_FAILED = 2020,
/* Connectd -> master: we got a peer. Three fds: peer */
WIRE_CONNECTD_PEER_CONNECTED = 2002,
/* master -> connectd: peer has disconnected. */
WIRE_CONNECTD_PEER_DISCONNECTED = 2015,
/* master -> connectd: give message to peer and disconnect. Three fds: peer */
WIRE_CONNECTD_PEER_FINAL_MSG = 2003,
/* master -> connectd: do you have a memleak? */
WIRE_CONNECTD_DEV_MEMLEAK = 2033,
WIRE_CONNECTD_DEV_MEMLEAK_REPLY = 2133,
};
const char *connectd_wire_name(int e);
/**
* Determine whether a given message type is defined as a message.
*
* Returns true if the message type is part of the message definitions we have
* generated parsers for, false if it is a custom message that cannot be
* handled internally.
*/
bool connectd_wire_is_defined(u16 type);
/* WIRE: CONNECTD_INIT */
u8 *towire_connectd_init(const tal_t *ctx, const struct chainparams *chainparams, const struct feature_set *our_features, const struct node_id *id, const struct wireaddr_internal *wireaddrs, const enum addr_listen_announce *listen_announce, const struct wireaddr *tor_proxyaddr, bool use_tor_proxy_always, bool dev_allow_localhost, bool use_dns, const wirestring *tor_password, bool use_v3_autotor, u32 timeout_secs);
bool fromwire_connectd_init(const tal_t *ctx, const void *p, const struct chainparams **chainparams, struct feature_set **our_features, struct node_id *id, struct wireaddr_internal **wireaddrs, enum addr_listen_announce **listen_announce, struct wireaddr **tor_proxyaddr, bool *use_tor_proxy_always, bool *dev_allow_localhost, bool *use_dns, wirestring **tor_password, bool *use_v3_autotor, u32 *timeout_secs);
/* WIRE: CONNECTD_INIT_REPLY */
/* Connectd->master */
u8 *towire_connectd_init_reply(const tal_t *ctx, const struct wireaddr_internal *bindings, const struct wireaddr *announcable);
bool fromwire_connectd_init_reply(const tal_t *ctx, const void *p, struct wireaddr_internal **bindings, struct wireaddr **announcable);
/* WIRE: CONNECTD_ACTIVATE */
/* Activate the connect daemon */
u8 *towire_connectd_activate(const tal_t *ctx, bool listen);
bool fromwire_connectd_activate(const void *p, bool *listen);
/* WIRE: CONNECTD_ACTIVATE_REPLY */
/* Connectd->master */
u8 *towire_connectd_activate_reply(const tal_t *ctx);
bool fromwire_connectd_activate_reply(const void *p);
/* WIRE: CONNECTD_RECONNECTED */
/* connectd->master: disconnect this peer please (due to reconnect). */
u8 *towire_connectd_reconnected(const tal_t *ctx, const struct node_id *id);
bool fromwire_connectd_reconnected(const void *p, struct node_id *id);
/* WIRE: CONNECTD_CONNECT_TO_PEER */
/* Master -> connectd: connect to a peer. */
u8 *towire_connectd_connect_to_peer(const tal_t *ctx, const struct node_id *id, u32 seconds_waited, const struct wireaddr_internal *addrhint);
bool fromwire_connectd_connect_to_peer(const tal_t *ctx, const void *p, struct node_id *id, u32 *seconds_waited, struct wireaddr_internal **addrhint);
/* WIRE: CONNECTD_CONNECT_FAILED */
/* Connectd->master: connect failed. */
u8 *towire_connectd_connect_failed(const tal_t *ctx, const struct node_id *id, errcode_t failcode, const wirestring *failreason, u32 seconds_to_delay, const struct wireaddr_internal *addrhint);
bool fromwire_connectd_connect_failed(const tal_t *ctx, const void *p, struct node_id *id, errcode_t *failcode, wirestring **failreason, u32 *seconds_to_delay, struct wireaddr_internal **addrhint);
/* WIRE: CONNECTD_PEER_CONNECTED */
/* Connectd -> master: we got a peer. Three fds: peer */
u8 *towire_connectd_peer_connected(const tal_t *ctx, const struct node_id *id, const struct wireaddr_internal *addr, bool incoming, const struct per_peer_state *pps, const u8 *features);
bool fromwire_connectd_peer_connected(const tal_t *ctx, const void *p, struct node_id *id, struct wireaddr_internal *addr, bool *incoming, struct per_peer_state **pps, u8 **features);
/* WIRE: CONNECTD_PEER_DISCONNECTED */
/* master -> connectd: peer has disconnected. */
u8 *towire_connectd_peer_disconnected(const tal_t *ctx, const struct node_id *id);
bool fromwire_connectd_peer_disconnected(const void *p, struct node_id *id);
/* WIRE: CONNECTD_PEER_FINAL_MSG */
/* master -> connectd: give message to peer and disconnect. Three fds: peer */
u8 *towire_connectd_peer_final_msg(const tal_t *ctx, const struct node_id *id, const struct per_peer_state *pps, const u8 *msg);
bool fromwire_connectd_peer_final_msg(const tal_t *ctx, const void *p, struct node_id *id, struct per_peer_state **pps, u8 **msg);
/* WIRE: CONNECTD_DEV_MEMLEAK */
/* master -> connectd: do you have a memleak? */
u8 *towire_connectd_dev_memleak(const tal_t *ctx);
bool fromwire_connectd_dev_memleak(const void *p);
/* WIRE: CONNECTD_DEV_MEMLEAK_REPLY */
u8 *towire_connectd_dev_memleak_reply(const tal_t *ctx, bool leak);
bool fromwire_connectd_dev_memleak_reply(const void *p, bool *leak);
#endif /* LIGHTNING_CONNECTD_CONNECTD_WIREGEN_H */
// SHA256STAMP:f10d8c579846bdad3caee38596f5b3a89af7f0be89ab569175045e9375ada5d0

View File

@ -1,38 +0,0 @@
.TH "LIGHTNING-ADDGOSSIP" "7" "" "" "lightning-addgossip"
.SH NAME
lightning-addgossip - Command for injecting a gossip message (low-level)
.SH SYNOPSIS
\fBaddgossip\fR \fImessage\fR
.SH DESCRIPTION
The \fBaddgossip\fR RPC command injects a hex-encoded gossip message into
the gossip daemon\. It may return an error if it is malformed, or may
update its internal state using the gossip message\.
Note that currently some paths will still silently reject the gossip: it
is best effort\.
This is particularly used by plugins which may receive channel_update
messages within error replies\.
.SH RETURN VALUE
On success, an empty object is returned\.
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-pay\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:abe4b88f82d3e6894742133522bbc025409c8bca287f47dbe41e63f78fa76ef9

View File

@ -1,57 +0,0 @@
.TH "LIGHTNING-AUTOCLEANINVOICE" "7" "" "" "lightning-autocleaninvoice"
.SH NAME
lightning-autocleaninvoice - Set up auto-delete of expired invoice
.SH SYNOPSIS
\fBautocleaninvoice\fR [\fIcycle_seconds\fR] [\fIexpired_by\fR]
.SH DESCRIPTION
The \fBautocleaninvoice\fR RPC command sets up automatic cleaning of
expired invoices\.
Autoclean will be done every \fIcycle_seconds\fR seconds\. Setting
\fIcycle_seconds\fR to 0 disables autoclean\. If not specified, this
defaults to 3600 (one hour)\.
Every autoclean cycle, expired invoices, which have already been expired
for at least \fIexpired_by\fR seconds, will be deleted\. If \fIexpired_by\fR is
not specified, this defaults to 86400 (one day)\.
On startup of the daemon, no autoclean is set up\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBenabled\fR (boolean): whether invoice autocleaning is active
.RE
If \fBenabled\fR is \fItrue\fR:
.RS
.IP \[bu]
\fBexpired_by\fR (u64): how long an invoice must be expired (seconds) before we delete it
.IP \[bu]
\fBcycle_seconds\fR (u64): how long an invoice must be expired (seconds) before we delete it
.RE
.SH AUTHOR
ZmnSCPxj \fI<ZmnSCPxj@protonmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-delexpiredinvoice\fR(7), \fBlightning-delinvoice\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:ec375ac1566528596d5e382cc9d82718266c8ccb32469ff1fc6df52c92ea4dab

42
doc/lightning-check.7 generated
View File

@ -1,42 +0,0 @@
.TH "LIGHTNING-CHECK" "7" "" "" "lightning-check"
.SH NAME
lightning-check - Command for verifying parameters
.SH SYNOPSIS
\fBcheck\fR \fIcommand_to_check\fR [\fIparameters\fR]
.SH DESCRIPTION
The \fBcheck\fR RPC command verifies another commands parameters without
running it\.
The \fIcommand_to_check\fR is the name of the relevant command\.
\fIparameters\fR is the commands parameters\.
This does not guarantee successful execution of the command in all
cases\. For example, a call to \fBlightning-getroute\fR(7) may still fail to
find a route even if checking the parameters succeeds\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBcommand_to_check\fR (string): the \fIcommand_to_check\fR argument
.RE
.SH AUTHOR
Mark Beckwith \fI<wythe@intrig.com\fR> and Rusty Russell
\fI<rusty@rustcorp.com.au\fR> are mainly responsible\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:3a0e3635cb3ec89d67ec13485220e16e362ed8588213382c8ae5cf4f6f1e0523

View File

@ -1,59 +0,0 @@
.TH "LIGHTNING-CHECKMESSAGE" "7" "" "" "lightning-checkmessage"
.SH NAME
lightning-checkmessage - Command to check if a signature is from a node
.SH SYNOPSIS
\fBcheckmessage\fR \fImessage\fR \fIzbase\fR [\fIpubkey\fR]
.SH DESCRIPTION
The \fBcheckmessage\fR RPC command is the counterpart to
\fBsignmessage\fR: given a node id (\fIpubkey\fR), signature (\fIzbase\fR) and a
\fImessage\fR, it verifies that the signature was generated by that node
for that message (more technically: by someone who knows that node's
secret)\.
As a special case, if \fIpubkey\fR is not specified, we will try every
known node key (as per \fIlistnodes\fR), and verification succeeds if it
matches for any one of them\. Note: this is implemented far more
efficiently than trying each one, so performance is not a concern\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBverified\fR (boolean): Whether the signature was valid
.RE
If \fBverified\fR is \fItrue\fR:
.RS
.IP \[bu]
\fBpubkey\fR (pubkey): the \fIpubkey\fR parameter, or the pubkey found by looking for known nodes
.RE
If \fBverified\fR is \fIfalse\fR:
.RS
.IP \[bu]
\fBpubkey\fR (pubkey): the \fIpubkey\fR (if any) which could have signed this; this is usually not useful!
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-signmessage\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:48a79a23d402a4f88eadf7db3515c1887534e01931f842380642460bb62f9691

View File

@ -1,141 +0,0 @@
.TH "LIGHTNING-CLI" "1" "" "" "lightning-cli"
.SH NAME
lightning-cli - Control lightning daemon
.SH SYNOPSIS
\fBlightning-cli\fR [\fIOPTIONS\fR] \fIcommand\fR
.SH DESCRIPTION
\fBlightning-cli\fR sends commands to the lightning daemon\.
.SH OPTIONS
\fB--lightning-dir\fR=\fIDIR\fR
Set the directory for the lightning daemon were talking to; defaults to
\fI$HOME/\.lightning\fR\.
\fB--conf\fR=\fIPATH\fR
Sets configuration file (default: \fBlightning-dir\fR/\fIconfig\fR )\.
\fB--network\fR=\fInetwork\fR
\fB--mainnet\fR
\fB--testnet\fR
\fB--signet\fR
Sets network explicitly\.
\fB--rpc-file\fR=\fIFILE\fR
Named pipe to use to talk to lightning daemon: default is
\fIlightning-rpc\fR in the lightning directory\.
\fB--keywords\fR/\fB-k\fR
Use format \fIkey\fR=\fIvalue\fR for parameters in any order
\fB--order\fR/\fB-o\fR
Follow strictly the order of parameters for the command
\fB--json\fR/\fB-J\fR
Return result in JSON format (default unless \fIhelp\fR command,
or result contains a \fBformat-hint\fR field)\.
\fB--raw\fR/\fB-R\fR
Return raw JSON directly as lightningd replies; this can be faster for
large requests\.
\fB--human-readable\fR/\fB-H\fR
Return result in human-readable output\.
\fB--flat\fR/\fB-F\fR
Return JSON result in flattened one-per-line output, e\.g\. \fB{ "help":
[ { "command": "check" } ] }\fR would become \fBhelp[0].command=check\fR\.
This is useful for simple scripts which want to find a specific output
field without parsing JSON\.
\fB--notifications\fR/\fB-N\fR=\fILEVEL\fR
If \fILEVEL\fR is 'none', then never print out notifications\. Otherwise,
print out notifications of \fILEVEL\fR or above (one of \fBio\fR, \fBdebug\fR,
\fBinfo\fR (the default), \fBunusual\fR or \fBbroken\fR: they are prefixed with \fB#\fR\.
\fB--help\fR/\fB-h\fR
Pretty-print summary of options to standard output and exit\. The format can
be changed using -F, -R, -J, -H etc\.
\fB--version\fR/\fB-V\fR
Print version number to standard output and exit\.
\fBallow-deprecated-apis\fR=\fIBOOL\fR
Enable deprecated options\. It defaults to \fItrue\fR, but you should set
it to \fIfalse\fR when testing to ensure that an upgrade wont break your
configuration\.
.SH COMMANDS
\fIlightning-cli\fR simply uses the JSON RPC interface to talk to
\fIlightningd\fR, and prints the results\. Thus the commands available depend
entirely on the lightning daemon itself\.
.SH ARGUMENTS
Arguments may be provided positionally or using \fIkey\fR=\fIvalue\fR after the
command name, based on either \fB-o\fR or \fB-k\fR option\. When using \fB-k\fR
consider prefixing all arguments of the command with their respective keyword,
this is to avoid having lightningd intrepret the position of an arguement\.
Arguments may be integer numbers (composed entirely of digits), floating-point
numbers (has a radix point but otherwise composed of digits), \fItrue\fR, \fIfalse\fR,
or \fInull\fR\. Other arguments are treated as strings\.
Some commands have optional arguments\. You may use \fInull\fR to skip
optional arguments to provide later arguments, although this is not encouraged\.
.SH EXAMPLES
.RS
.IP 1\.
List commands
.RE
lightning-cli help
.RS
.IP 1\.
Fund a 10k sat channel using uncomfirmed outputs
.RE
lightning-cli --keywords fundchannel id=028f\.\.\.ae7d amount=10000sat minconf=0
.SH BUGS
This manpage documents how it should work, not how it does work\. The
pretty printing of results isnt pretty\.
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly to blame\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
.SH COPYING
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\.
\" SHA256STAMP:95f9c48c35817ea601ba35006c8400c52da372ffbe725ff1fa6feec9ced3229f

157
doc/lightning-close.7 generated
View File

@ -1,157 +0,0 @@
.TH "LIGHTNING-CLOSE" "7" "" "" "lightning-close"
.SH NAME
lightning-close - Command for closing channels with direct peers
.SH SYNOPSIS
\fBclose\fR \fIid\fR [\fIunilateraltimeout\fR] [\fIdestination\fR] [\fIfee_negotiation_step\fR] [\fIwrong_funding\fR] [\fIforce_lease_closed\fR] [*feerange*]
.SH DESCRIPTION
The \fBclose\fR RPC command attempts to close the channel cooperatively
with the peer, or unilaterally after \fIunilateraltimeout\fR, and the
to-local output will be sent to the address specified in \fIdestination\fR\.
If the given \fIid\fR is a peer ID (66 hex digits as a string), then it
applies to the active channel of the direct peer corresponding to the
given peer ID\. If the given \fIid\fR is a channel ID (64 hex digits as a
string, or the short channel ID \fIblockheight:txindex:outindex\fR form),
then it applies to that channel\.
If \fIunilateraltimeout\fR is not zero, the \fBclose\fR command will
unilaterally close the channel when that number of seconds is reached\.
If \fIunilateraltimeout\fR is zero, then the \fBclose\fR command will wait
indefinitely until the peer is online and can negotiate a mutual close\.
The default is 2 days (172800 seconds)\.
The \fIdestination\fR can be of any Bitcoin accepted type, including bech32\.
If it isn't specified, the default is a c-lightning wallet address\. If
the peer hasn't offered the \fBoption_shutdown_anysegwit\fR feature, then
taproot addresses (or other v1+ segwit) are not allowed\. Tell your
friends to upgrade!
The \fIfee_negotiation_step\fR parameter controls how closing fee
negotiation is performed assuming the peer proposes a fee that is
different than our estimate\. (Note that modern peers use the quick-close protocol which does not allow negotiation: see \fIfeerange\fR instead)\.
On every negotiation step we must give up
some amount from our proposal towards the peer's proposal\. This parameter
can be an integer in which case it is interpreted as number of satoshis
to step at a time\. Or it can be an integer followed by "%" to designate
a percentage of the interval to give up\. A few examples, assuming the peer
proposes a closing fee of 3000 satoshi and our estimate shows it must be 4000:
.RS
.IP \[bu]
"10": our next proposal will be 4000-10=3990\.
.IP \[bu]
"10%": our next proposal will be 4000-(10% of (4000-3000))=3900\.
.IP \[bu]
"1": our next proposal will be 3999\. This is the most extreme case when we
insist on our fee as much as possible\.
.IP \[bu]
"100%": our next proposal will be 3000\. This is the most relaxed case when
we quickly accept the peer's proposal\.
.RE
The default is "50%"\.
\fIwrong_funding_txid\fR can only be specified if both sides have offered
the "shutdown_wrong_funding" feature (enabled by the
\fBexperimental-shutdown-wrong-funding\fR option): it must be a
transaction id followed by a colon then the output number\. Instead of
negotiating a shutdown to spend the expected funding transaction, the
shutdown transaction will spend this output instead\. This is only
allowed if this peer opened the channel and the channel is unused: it
can rescue openings which have been manually miscreated\.
\fIforce_lease_closed\fR if the channel has funds leased to the peer
(option_will_fund), we prevent initiation of a mutual close
unless this flag is passed in\. Defaults to false\.
\fIfeerange\fR is an optional array [ \fImin\fR, \fImax\fR ], indicating the
minimum and maximum feerates to offer: the peer will obey these if it
supports the quick-close protocol\. \fIslow\fR and \fIunilateral_close\fR are
the defaults\.
Rates are one of the strings \fIurgent\fR (aim for next block), \fInormal\fR
(next 4 blocks or so) or \fIslow\fR (next 100 blocks or so) to use
lightningds internal estimates, or one of the names from
\fBlightning-feerates\fR(7)\. Otherwise, they can be numbers with
an optional suffix: \fIperkw\fR means the number is interpreted as
satoshi-per-kilosipa (weight), and \fIperkb\fR means it is interpreted
bitcoind-style as satoshi-per-kilobyte\. Omitting the suffix is
equivalent to \fIperkb\fR\.
Note that the maximum fee will be capped at the final commitment
transaction fee (unless the experimental anchor-outputs option is
negotiated)\.
The peer needs to be live and connected in order to negotiate a mutual
close\. The default of unilaterally closing after 48 hours is usually a
reasonable indication that you can no longer contact the peer\.
.SH NOTES
Prior to 0\.7\.2, \fBclose\fR took two parameters: \fIforce\fR and \fItimeout\fR\.
\fItimeout\fR was the number of seconds before \fIforce\fR took effect (default,
30), and \fIforce\fR determined whether the result was a unilateral close or
an RPC error (default)\. Even after the timeout, the channel would be
closed if the peer reconnected\.
.SH NOTIFICATIONS
Notifications may be returned indicating what is going on, especially
if the peer is offline and we are waiting\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBtype\fR (string): Whether we successfully negotiated a mutual close, closed without them, or discarded not-yet-opened channel (one of "mutual", "unilateral", "unopened")
.RE
If \fBtype\fR is "mutual" or "unilateral":
.RS
.IP \[bu]
\fBtx\fR (hex): the raw bitcoin transaction used to close the channel (if it was open)
.IP \[bu]
\fBtxid\fR (txid): the transaction id of the \fItx\fR field
.RE
A unilateral close may still occur at any time if the peer did not
behave correctly during the close negotiation\.
Unilateral closes will return your funds after a delay\. The delay will
vary based on the peer \fIto_self_delay\fR setting, not your own setting\.
.SH AUTHOR
ZmnSCPxj \fI<ZmnSCPxj@protonmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-disconnect\fR(7), \fBlightning-fundchannel\fR(7), \fBlightningd-config\fR(5)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:1182e596ddf208f37d269e37b06e30199b8d6b6bc1373d92096557c20ad437ac

133
doc/lightning-connect.7 generated
View File

@ -1,133 +0,0 @@
.TH "LIGHTNING-CONNECT" "7" "" "" "lightning-connect"
.SH NAME
lightning-connect - Command for connecting to another lightning node
.SH SYNOPSIS
\fBconnect\fR \fIid\fR [\fIhost\fR \fIport\fR]
.SH DESCRIPTION
The \fBconnect\fR RPC command establishes a new connection with another
node in the Lightning Network\.
\fIid\fR represents the target nodes public key\. As a convenience, \fIid\fR may
be of the form \fIid@host\fR or \fIid@host:port\fR\. In this case, the \fIhost\fR and
\fIport\fR parameters must be omitted\.
\fIhost\fR is the peers hostname or IP address\.
If not specified, the \fIport\fR defaults to 9735\.
If \fIhost\fR is not specified (or doesn't work), the connection will be attempted to an IP
belonging to \fIid\fR obtained through gossip with other already connected
peers\.
This can fail if your C-lightning node is a fresh install that has not
connected to any peers yet (your node has no gossip yet),
or if the target \fIid\fR is a fresh install that has no channels yet
(nobody will gossip about a node until it has one published channel)\.
If \fIhost\fR begins with a \fI/\fR it is interpreted as a local path, and the
connection will be made to that local socket (see \fBbind-addr\fR in
\fBlightningd-config\fR(5))\.
Connecting to a node is just the first step in opening a channel with
another node\. Once the peer is connected a channel can be opened with
\fBlightning-fundchannel\fR(7)\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBid\fR (pubkey): the peer we connected to
.IP \[bu]
\fBfeatures\fR (hex): BOLT 9 features bitmap offered by peer
.IP \[bu]
\fBdirection\fR (string): Whether they initiated connection or we did (one of "in", "out")
.IP \[bu]
\fBaddress\fR (object): Address information (mainly useful if \fBdirection\fR is \fIout\fR):
.RS
.IP \[bu]
\fBtype\fR (string): Type of connection (\fItorv2\fR/\fItorv3\fR only if \fBdirection\fR is \fIout\fR) (one of "local socket", "ipv4", "ipv6", "torv2", "torv3")
.RE
If \fBtype\fR is "local socket":
.RS
.IP \[bu]
\fBsocket\fR (string): socket filename
.RE
If \fBtype\fR is "ipv4", "ipv6", "torv2" or "torv3":
.RS
.IP \[bu]
\fBaddress\fR (string): address in expected format for \fBtype\fR
.IP \[bu]
\fBport\fR (u16): port number
.RE
.RE
.SH ERRORS
On failure, one of the following errors will be returned:
.nf
.RS
{ "code" : 400, "message" : "Unable to connect, no address known for peer" }
.RE
.fi
If some addresses are known but connecting to all of them failed, the message
will contain details about the failures:
.nf
.RS
{ "code" : 401, "message" : "..." }
.RE
.fi
If the given parameters are wrong:
.nf
.RS
{ "code" : -32602, "message" : "..." }
.RE
.fi
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
Felix \fI<fixone@gmail.com\fR> is the original author of this manpage\.
.SH SEE ALSO
\fBlightning-fundchannel\fR(7), \fBlightning-listpeers\fR(7),
\fBlightning-listchannels\fR(7), \fBlightning-disconnect\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:87969bceedc028fb46f2bcbf437dab468ed34df73cb1010d6e7073ce2aa6cc33

View File

@ -1,96 +0,0 @@
.TH "LIGHTNING-CREATEINVOICE" "7" "" "" "lightning-createinvoice"
.SH NAME
lightning-createinvoice - Low-level invoice creation
.SH SYNOPSIS
\fBcreateinvoice\fR \fIinvstring\fR \fIlabel\fR \fIpreimage\fR
.SH DESCRIPTION
The \fBcreateinvoice\fR RPC command signs and saves an invoice into the
database\.
The \fIinvstring\fR parameter is of bolt11 form, but without the final
signature appended\. Minimal sanity checks are done\. (Note: if
\fBexperimental-offers\fR is enabled, \fIinvstring\fR can actually be an
unsigned bolt12 invoice)\.
The \fIlabel\fR 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 \fIpreimage\fR is the preimage to supply upon successful payment of
the invoice\.
.SH RETURN VALUE
(Note: the return format is the same as \fBlightning-listinvoices\fR(7))\.
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBlabel\fR (string): the label for the invoice
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
.IP \[bu]
\fBstatus\fR (string): Whether it has been paid, or can no longer be paid (one of "paid", "expired", "unpaid")
.IP \[bu]
\fBdescription\fR (string): Description extracted from \fBbolt11\fR or \fBbolt12\fR
.IP \[bu]
\fBexpires_at\fR (u64): UNIX timestamp of when invoice expires (or expired)
.IP \[bu]
\fBbolt11\fR (string, optional): the bolt11 string (always present unless \fBbolt12\fR is)
.IP \[bu]
\fBbolt12\fR (string, optional): the bolt12 string instead of \fBbolt11\fR (\fBexperimental-offers\fR only)
.IP \[bu]
\fBamount_msat\fR (msat, optional): The amount of the invoice (if it has one)
.IP \[bu]
\fBpay_index\fR (u64, optional): Incrementing id for when this was paid (\fBstatus\fR \fIpaid\fR only)
.IP \[bu]
\fBamount_received_msat\fR (msat, optional): Amount actually received (\fBstatus\fR \fIpaid\fR only)
.IP \[bu]
\fBpaid_at\fR (u64, optional): UNIX timestamp of when invoice was paid (\fBstatus\fR \fIpaid\fR only)
.IP \[bu]
\fBpayment_preimage\fR (hex, optional): the proof of payment: SHA256 of this \fBpayment_hash\fR (always 64 characters)
.IP \[bu]
\fBlocal_offer_id\fR (hex, optional): the \fIid\fR of our offer which created this invoice (\fBexperimental-offers\fR only)\. (always 64 characters)
.IP \[bu]
\fBpayer_note\fR (string, optional): the optional \fIpayer_note\fR from invoice_request which created this invoice (\fBexperimental-offers\fR only)\.
.RE
On failure, an error is returned and no invoice is created\. If the
lightning process fails before responding, the caller should use
\fBlightning-listinvoices\fR(7) to query whether this invoice was created or
not\.
The following error codes may occur:
.RS
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
900: An invoice with the given \fIlabel\fR already exists\.
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-invoice\fR(7), \fBlightning-listinvoices\fR(7), \fBlightning-delinvoice\fR(7),
\fBlightning-getroute\fR(7), \fBlightning-sendpay\fR(7), \fBlightning-offer\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:60b18d0cd15a2133f653b4623d5172df2ffa101b38e36add17fd9d2836b0845b

View File

@ -1,156 +0,0 @@
.TH "LIGHTNING-CREATEONION" "7" "" "" "lightning-createonion"
.SH NAME
lightning-createonion - Low-level command to create a custom onion
.SH SYNOPSIS
\fBcreateonion\fR \fIhops\fR \fIassocdata\fR [\fIsession_key\fR] [\fIonion_size\fR]
.SH DESCRIPTION
The \fBcreateonion\fR RPC command allows the caller to create a custom onion
with custom payloads at each hop in the route\. A custom onion can be used to
implement protocol extensions that are not supported by c-lightning directly\.
The \fIhops\fR parameter is a JSON list of dicts, each specifying a node and the
payload destined for that node\. The following is an example of a 3 hop onion:
.nf
.RS
[
{
"pubkey": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59",
"payload": "00000067000001000100000000000003e90000007b000000000000000000000000000000000000000000000000"
}, {
"pubkey": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d",
"payload": "00000067000003000100000000000003e800000075000000000000000000000000000000000000000000000000"
}, {
"style": "legacy",
"pubkey": "0382ce59ebf18be7d84677c2e35f23294b9992ceca95491fcf8a56c6cb2d9de199",
"payload": "00000067000003000100000000000003e800000075000000000000000000000000000000000000000000000000"
}
]
.RE
.fi
The \fIhops\fR parameter is very similar to the result from \fBgetroute\fR however it
needs to be modified slightly\. The following is the \fBgetroute\fR response from
which the above \fIhops\fR parameter was generated:
.nf
.RS
[
{
"id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59",
"channel": "103x2x1",
"direction": 1,
"msatoshi": 1002,
"amount_msat": "1002msat",
"delay": 21,
"style": "legacy"
}, {
"id": "035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d",
"channel": "103x1x1",
"direction": 0,
"msatoshi": 1001,
"amount_msat": "1001msat",
"delay": 15,
"style": "legacy"
}, {
"id": "0382ce59ebf18be7d84677c2e35f23294b9992ceca95491fcf8a56c6cb2d9de199",
"channel": "103x3x1",
"direction": 0,
"msatoshi": 1000,
"amount_msat": "1000msat",
"delay": 9,
"style": "legacy"
}
]
.RE
.fi
.RS
.IP \[bu]
Notice that the payload in the \fIhops\fR parameter is the hex-encoded version
of the parameters in the \fBgetroute\fR response\.
.IP \[bu]
Except for the pubkey, the values are shifted left by one, i\.e\., the 1st
payload in \fBcreateonion\fR corresponds to the 2nd set of values from \fBgetroute\fR\.
.IP \[bu]
The final payload is a copy of the last payload sans \fBchannel\fR
.RE
These rules are directly derived from the onion construction\. Please refer
\fBBOLT 04\fR (\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/04-onion-routing.md\fR) for details and rationale\.
The \fIassocdata\fR parameter specifies the associated data that the onion should
commit to\. If the onion is to be used to send a payment later it MUST match
the \fBpayment_hash\fR of the payment in order to be valid\.
The optional \fIsession_key\fR parameter can be used to specify a secret that is
used to generate the shared secrets used to encrypt the onion for each hop\. It
should only be used for testing or if a specific shared secret is
important\. If not specified it will be securely generated internally, and the
shared secrets will be returned\.
The optional \fIonion_size\fR parameter specifies a size different from the default
payment onion (1300 bytes)\. May be used for custom protocols like trampoline
routing\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBonion\fR (hex): the onion packet (\fIonion_size\fR bytes)
.IP \[bu]
\fBshared_secrets\fR (array of hexs): one shared secret for each node in the \fIhops\fR parameter:
.RS
.IP \[bu]
the shared secret with this hop (always 64 characters)
.RE
.RE
.SH EXAMPLE
The following example is the result of calling \fIcreateonion\fR with the
above hops parameter:
.nf
.RS
{
"onion": "0003f3f80d2142b953319336d2fe4097[...✂...]6af33fcf4fb113bce01f56dd62248a9e5fcbbfba35c",
"shared_secrets": [
"88ce98c73e4d9293ab1797b0a913fe9bca0213a566252047d01b8af6da871f3e",
"4474d296810e57bd460ef8b83d2e7d288321f8a99ff7686f87384699747bcfc4",
"2a862e4123e01799a732be487fbce297f7dc7cc1467e410f18369cfee476adc2"
]
}
.RE
.fi
The \fBonion\fR corresponds to 1366 hex-encoded bytes\. Each shared secret consists
of 32 hex-encoded bytes\. Both arguments can be passed on to \fBsendonion\fR\.
.SH AUTHOR
Christian Decker \fI<decker.christian@gmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-sendonion\fR(7), \fBlightning-getroute\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:969d90ddb478aaff5ca1416aac1a588af9f2324b775b430169e1a317981811cb

View File

@ -1,84 +0,0 @@
.TH "LIGHTNING-DATASTORE" "7" "" "" "lightning-datastore"
.SH NAME
lightning-datastore - Command for storing (plugin) data
.SH SYNOPSIS
\fBdatastore\fR \fIkey\fR [\fIstring\fR] [\fIhex\fR] [\fImode\fR] [\fIgeneration\fR]
.SH DESCRIPTION
The \fBdatastore\fR RPC command allows plugins to store data in the
c-lightning database, for later retrieval\.
\fIkey\fR is an array of values (though a single value is treated as a
one-element array), to form a heirarchy\. Using the first element of
the key as the plugin name (e\.g\. \fB[ "summary" ]\fR) is recommended\.
A key can either have children or a value, never both: parents are
created and removed automatically\.
\fImode\fR is one of "must-create" (default, fails it it already exists),
"must-replace" (fails it it doesn't already exist),
"create-or-replace" (never fails), "must-append" (must already exist,
append this to what's already there) or "create-or-append" (append if
anything is there, otherwise create)\.
\fIgeneration\fR, if specified, means that the update will fail if the
previously-existing data is not exactly that generation\. This allows
for simple atomicity\. This is only legal with \fImode\fR "must-replace"
or "must-append"\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBkey\fR (array of strings):
.RS
.IP \[bu]
Part of the key added to the datastore
.RE
.IP \[bu]
\fBgeneration\fR (u64, optional): The number of times this has been updated
.IP \[bu]
\fBhex\fR (hex, optional): The hex data which has been added to the datastore
.IP \[bu]
\fBstring\fR (string, optional): The data as a string, if it's valid utf-8
.RE
The following error codes may occur:
.RS
.IP \[bu]
1202: The key already exists (and mode said it must not)
.IP \[bu]
1203: The key does not exist (and mode said it must)
.IP \[bu]
1204: The generation was wrong (and generation was specified)
.IP \[bu]
1205: The key has children already\.
.IP \[bu]
1206: One of the parents already exists with a value\.
.IP \[bu]
-32602: invalid parameters
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-listdatastore\fR(7), \fBlightning-deldatastore\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:f7c58a75435979f3bc6a3f0019298bebf33c1c199a6c98655778705fc7e86e0e

414
doc/lightning-decode.7 generated
View File

@ -1,414 +0,0 @@
.TH "LIGHTNING-DECODE" "7" "" "" "lightning-decode"
.SH NAME
lightning-decode - Command for decoding an invoice string (low-level)
.SH SYNOPSIS
\fBdecode\fR \fIstring\fR
.SH DESCRIPTION
The \fBdecode\fR RPC command checks and parses a \fIbolt11\fR or \fIbolt12\fR
string (optionally prefixed by \fBlightning:\fR or \fBLIGHTNING:\fR) as
specified by the BOLT 11 and BOLT 12 specifications\. It may decode
other formats in future\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBtype\fR (string): what kind of object it decoded to (one of "bolt12 offer", "bolt12 invoice", "bolt12 invoice_request", "bolt11 invoice")
.IP \[bu]
\fBvalid\fR (boolean): if this is false, you \fIMUST\fR not use the result except for diagnostics!
.RE
If \fBtype\fR is "bolt12 offer", and \fBvalid\fR is \fItrue\fR:
.RS
.IP \[bu]
\fBoffer_id\fR (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
.IP \[bu]
\fBnode_id\fR (pubkey32): x-only public key of the offering node
.IP \[bu]
\fBdescription\fR (string): the description of the purpose of the offer
.IP \[bu]
\fBsignature\fR (bip340sig, optional): BIP-340 signature of the \fInode_id\fR on this offer
.IP \[bu]
\fBchains\fR (array of hexs, optional): which blockchains this offer is for (missing implies bitcoin mainnet only):
.RS
.IP \[bu]
the genesis blockhash (always 64 characters)
.RE
.IP \[bu]
\fBcurrency\fR (string, optional): ISO 4217 code of the currency (missing implies Bitcoin) (always 3 characters)
.IP \[bu]
\fBminor_unit\fR (u32, optional): the number of decimal places to apply to amount (if currency known)
.IP \[bu]
\fBamount\fR (u64, optional): the amount in the \fIcurrency\fR adjusted by \fIminor_unit\fR, if any
.IP \[bu]
\fBamount_msat\fR (msat, optional): the amount in bitcoin (if specified, and no \fIcurrency\fR)
.IP \[bu]
\fBsend_invoice\fR (boolean, optional): present if this is a send_invoice offer (always \fItrue\fR)
.IP \[bu]
\fBrefund_for\fR (hex, optional): the \fIpayment_preimage\fR of invoice this is a refund for (always 64 characters)
.IP \[bu]
\fBvendor\fR (string, optional): the name of the vendor for this offer
.IP \[bu]
\fBfeatures\fR (hex, optional): the array of feature bits for this offer
.IP \[bu]
\fBabsolute_expiry\fR (u64, optional): UNIX timestamp of when this offer expires
.IP \[bu]
\fBpaths\fR (array of objects, optional): Paths to the destination:
.RS
.IP \[bu]
\fBblinding\fR (pubkey): blinding factor for this path
.IP \[bu]
\fBpath\fR (array of objects): an individual path:
.RS
.IP \[bu]
\fBnode_id\fR (pubkey): node_id of the hop
.IP \[bu]
\fBenctlv\fR (hex): encrypted TLV entry for this hop
.RE
.RE
.IP \[bu]
\fBquantity_min\fR (u64, optional): the minimum quantity
.IP \[bu]
\fBquantity_max\fR (u64, optional): the maximum quantity
.IP \[bu]
\fBrecurrence\fR (object, optional): how often to this offer should be used:
.RS
.IP \[bu]
\fBtime_unit\fR (u32): the BOLT12 time unit
.IP \[bu]
\fBperiod\fR (u32): how many \fItime_unit\fR per payment period
.IP \[bu]
\fBtime_unit_name\fR (string, optional): the name of \fItime_unit\fR (if valid)
.IP \[bu]
\fBbasetime\fR (u64, optional): period starts at this UNIX timestamp
.IP \[bu]
\fBstart_any_period\fR (u64, optional): you can start at any period (only if \fBbasetime\fR present)
.IP \[bu]
\fBlimit\fR (u32, optional): maximum period number for recurrence
.IP \[bu]
\fBpaywindow\fR (object, optional): when within a period will payment be accepted (default is prior and during the period):
.RS
.IP \[bu]
\fBseconds_before\fR (u32): seconds prior to period start
.IP \[bu]
\fBseconds_after\fR (u32): seconds after to period start
.IP \[bu]
\fBproportional_amount\fR (boolean, optional): amount should be scaled if payed after period start (always \fItrue\fR)
.RE
.RE
.IP \[bu]
the following warnings are possible:
.RS
.IP \[bu]
\fBwarning_offer_unknown_currency\fR: The currency code is unknown (so no \fBminor_unit\fR)
.RE
.RE
If \fBtype\fR is "bolt12 offer", and \fBvalid\fR is \fIfalse\fR:
.RS
.IP \[bu]
the following warnings are possible:
.RS
.IP \[bu]
\fBwarning_offer_missing_description\fR: No \fBdescription\fR
.RE
.RE
If \fBtype\fR is "bolt12 invoice", and \fBvalid\fR is \fItrue\fR:
.RS
.IP \[bu]
\fBnode_id\fR (pubkey32): x-only public key of the offering node
.IP \[bu]
\fBsignature\fR (bip340sig): BIP-340 signature of the \fInode_id\fR on this offer
.IP \[bu]
\fBamount_msat\fR (msat): the amount in bitcoin
.IP \[bu]
\fBdescription\fR (string): the description of the purpose of the offer
.IP \[bu]
\fBcreated_at\fR (u64): the UNIX timestamp of invoice creation
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR (always 64 characters)
.IP \[bu]
\fBrelative_expiry\fR (u32): the number of seconds after \fIcreated_at\fR when this expires
.IP \[bu]
\fBmin_final_cltv_expiry\fR (u32): the number of blocks required by destination
.IP \[bu]
\fBoffer_id\fR (hex, optional): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
.IP \[bu]
\fBchains\fR (array of hexs, optional): which blockchains this offer is for (missing implies bitcoin mainnet only):
.RS
.IP \[bu]
the genesis blockhash (always 64 characters)
.RE
.IP \[bu]
\fBsend_invoice\fR (boolean, optional): present if this offer was a send_invoice offer (always \fItrue\fR)
.IP \[bu]
\fBrefund_for\fR (hex, optional): the \fIpayment_preimage\fR of invoice this is a refund for (always 64 characters)
.IP \[bu]
\fBvendor\fR (string, optional): the name of the vendor for this offer
.IP \[bu]
\fBfeatures\fR (hex, optional): the array of feature bits for this offer
.IP \[bu]
\fBpaths\fR (array of objects, optional): Paths to the destination:
.RS
.IP \[bu]
\fBblinding\fR (pubkey): blinding factor for this path
.IP \[bu]
\fBpath\fR (array of objects): an individual path:
.RS
.IP \[bu]
\fBnode_id\fR (pubkey): node_id of the hop
.IP \[bu]
\fBenctlv\fR (hex): encrypted TLV entry for this hop
.RE
.RE
.IP \[bu]
\fBquantity\fR (u64, optional): the quantity ordered
.IP \[bu]
\fBrecurrence_counter\fR (u32, optional): the 0-based counter for a recurring payment
.IP \[bu]
\fBrecurrence_start\fR (u32, optional): the optional start period for a recurring payment
.IP \[bu]
\fBrecurrence_basetime\fR (u32, optional): the UNIX timestamp of the first recurrence period start
.IP \[bu]
\fBpayer_key\fR (pubkey32, optional): the transient key which identifies the payer
.IP \[bu]
\fBpayer_info\fR (hex, optional): the payer-provided blob to derive payer_key
.IP \[bu]
\fBfallbacks\fR (array of objects, optional): onchain addresses:
.RS
.IP \[bu]
\fBversion\fR (u8): Segwit address version
.IP \[bu]
\fBhex\fR (hex): Raw encoded segwit address
.IP \[bu]
\fBaddress\fR (string, optional): bech32 segwit address
.RE
.IP \[bu]
\fBrefund_signature\fR (bip340sig, optional): the payer key signature to get a refund
.RE
If \fBtype\fR is "bolt12 invoice", and \fBvalid\fR is \fIfalse\fR:
.RS
.IP \[bu]
\fBfallbacks\fR (array of objects, optional):
.RS
.IP \[bu]
the following warnings are possible:
.RS
.IP \[bu]
\fBwarning_invoice_fallbacks_version_invalid\fR: \fBversion\fR is > 16
.RE
.RE
.IP \[bu]
the following warnings are possible:
.RS
.IP \[bu]
\fBwarning_invoice_missing_amount\fR: *\fIamount_msat\fR missing
.IP \[bu]
\fBwarning_invoice_missing_description\fR: No \fBdescription\fR
.IP \[bu]
\fBwarning_invoice_missing_blinded_payinfo\fR: Has \fBpaths\fR without payinfo
.IP \[bu]
\fBwarning_invoice_invalid_blinded_payinfo\fR: Does not have exactly one payinfo for each of \fBpaths\fR
.IP \[bu]
\fBwarning_invoice_missing_recurrence_basetime\fR: Has \fBrecurrence_counter\fR without \fBrecurrence_basetime\fR
.IP \[bu]
\fBwarning_invoice_missing_created_at\fR: Missing \fBcreated_at\fR
.IP \[bu]
\fBwarning_invoice_missing_payment_hash\fR: Missing \fBpayment_hash\fR
.IP \[bu]
\fBwarning_invoice_refund_signature_missing_payer_key\fR: Missing \fBpayer_key\fR for refund_signature
.IP \[bu]
\fBwarning_invoice_refund_signature_invalid\fR: \fBrefund_signature\fR incorrect
.IP \[bu]
\fBwarning_invoice_refund_missing_signature\fR: No \fBrefund_signature\fR
.RE
.RE
If \fBtype\fR is "bolt12 invoice_request", and \fBvalid\fR is \fItrue\fR:
.RS
.IP \[bu]
\fBoffer_id\fR (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
.IP \[bu]
\fBpayer_key\fR (pubkey32): the transient key which identifies the payer
.IP \[bu]
\fBchains\fR (array of hexs, optional): which blockchains this offer is for (missing implies bitcoin mainnet only):
.RS
.IP \[bu]
the genesis blockhash (always 64 characters)
.RE
.IP \[bu]
\fBamount_msat\fR (msat, optional): the amount in bitcoin
.IP \[bu]
\fBfeatures\fR (hex, optional): the array of feature bits for this offer
.IP \[bu]
\fBquantity\fR (u64, optional): the quantity ordered
.IP \[bu]
\fBrecurrence_counter\fR (u32, optional): the 0-based counter for a recurring payment
.IP \[bu]
\fBrecurrence_start\fR (u32, optional): the optional start period for a recurring payment
.IP \[bu]
\fBpayer_info\fR (hex, optional): the payer-provided blob to derive payer_key
.IP \[bu]
\fBrecurrence_signature\fR (bip340sig, optional): the payer key signature
.RE
If \fBtype\fR is "bolt12 invoice_request", and \fBvalid\fR is \fIfalse\fR:
.RS
.IP \[bu]
the following warnings are possible:
.RS
.IP \[bu]
\fBwarning_invoice_request_missing_offer_id\fR: No \fBoffer_id\fR
.IP \[bu]
\fBwarning_invoice_request_missing_payer_key\fR: No \fBpayer_key\fR
.IP \[bu]
\fBwarning_invoice_request_missing_recurrence_signature\fR: No \fBrecurrence_signature\fR
.IP \[bu]
\fBwarning_invoice_request_invalid_recurrence_signature\fR: \fBrecurrence_signature\fR incorrect
.RE
.RE
If \fBtype\fR is "bolt11 invoice", and \fBvalid\fR is \fItrue\fR:
.RS
.IP \[bu]
\fBcurrency\fR (string): the BIP173 name for the currency
.IP \[bu]
\fBcreated_at\fR (u64): the UNIX-style timestamp of the invoice
.IP \[bu]
\fBexpiry\fR (u64): the number of seconds this is valid after \fItimestamp\fR
.IP \[bu]
\fBpayee\fR (pubkey): the public key of the recipient
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR (always 64 characters)
.IP \[bu]
\fBsignature\fR (signature): signature of the \fIpayee\fR on this invoice
.IP \[bu]
\fBmin_final_cltv_expiry\fR (u32): the minimum CLTV delay for the final node
.IP \[bu]
\fBamount_msat\fR (msat, optional): Amount the invoice asked for
.IP \[bu]
\fBdescription\fR (string, optional): the description of the purpose of the purchase
.IP \[bu]
\fBdescription_hash\fR (hex, optional): the hash of the description, in place of \fIdescription\fR (always 64 characters)
.IP \[bu]
\fBpayment_secret\fR (hex, optional): the secret to hand to the payee node (always 64 characters)
.IP \[bu]
\fBfeatures\fR (hex, optional): the features bitmap for this invoice
.IP \[bu]
\fBfallbacks\fR (array of objects, optional): onchain addresses:
.RS
.IP \[bu]
\fBtype\fR (string): the address type (if known) (one of "P2PKH", "P2SH", "P2WPKH", "P2WSH")
.IP \[bu]
\fBhex\fR (hex): Raw encoded address
.IP \[bu]
\fBaddr\fR (string, optional): the address in appropriate format for \fItype\fR
.RE
.IP \[bu]
\fBroutes\fR (array of arrays, optional): Route hints to the \fIpayee\fR:
.RS
.IP \[bu]
hops in the route:
.RS
.IP \[bu]
\fBpubkey\fR (pubkey): the public key of the node
.IP \[bu]
\fBshort_channel_id\fR (short_channel_id): a channel to the next peer
.IP \[bu]
\fBfee_base_msat\fR (u32): the base fee for payments
.IP \[bu]
\fBfee_proportional_millionths\fR (u32): the parts-per-million fee for payments
.IP \[bu]
\fBcltv_expiry_delta\fR (u32): the CLTV delta across this hop
.RE
.RE
.IP \[bu]
\fBextra\fR (array of objects, optional): Any extra fields we didn't know how to parse:
.RS
.IP \[bu]
\fBtag\fR (string): The bech32 letter which identifies this field (always 1 characters)
.IP \[bu]
\fBdata\fR (string): The bech32 data for this field
.RE
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-pay\fR(7), \fBlightning-offer\fR(7), \fBlightning-offerout\fR(7), \fBlightning-fetchinvoice\fR(7), \fBlightning-sendinvoice\fR(7)
\fBBOLT #11\fR (\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/11-payment-encoding.md\fR)\.
\fBBOLT #12\fR (\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/12-offer-encoding.md\fR)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:f07ab7fbb0d031aa5b56560954cf071c481acf0880bf60ec15ff733f8d9e3c01

View File

@ -1,110 +0,0 @@
.TH "LIGHTNING-DECODEPAY" "7" "" "" "lightning-decodepay"
.SH NAME
lightning-decodepay - Command for decoding a bolt11 string (low-level)
.SH SYNOPSIS
\fBdecodepay\fR \fIbolt11\fR [\fIdescription\fR]
.SH DESCRIPTION
The \fBdecodepay\fR RPC command checks and parses a \fIbolt11\fR string as
specified by the BOLT 11 specification\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBcurrency\fR (string): the BIP173 name for the currency
.IP \[bu]
\fBcreated_at\fR (u64): the UNIX-style timestamp of the invoice
.IP \[bu]
\fBexpiry\fR (u64): the number of seconds this is valid after \fItimestamp\fR
.IP \[bu]
\fBpayee\fR (pubkey): the public key of the recipient
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR (always 64 characters)
.IP \[bu]
\fBsignature\fR (signature): signature of the \fIpayee\fR on this invoice
.IP \[bu]
\fBmin_final_cltv_expiry\fR (u32): the minimum CLTV delay for the final node
.IP \[bu]
\fBamount_msat\fR (msat, optional): Amount the invoice asked for
.IP \[bu]
\fBdescription\fR (string, optional): the description of the purpose of the purchase
.IP \[bu]
\fBdescription_hash\fR (hex, optional): the hash of the description, in place of \fIdescription\fR (always 64 characters)
.IP \[bu]
\fBpayment_secret\fR (hex, optional): the secret to hand to the payee node (always 64 characters)
.IP \[bu]
\fBfeatures\fR (hex, optional): the features bitmap for this invoice
.IP \[bu]
\fBfallbacks\fR (array of objects, optional): onchain addresses:
.RS
.IP \[bu]
\fBtype\fR (string): the address type (if known) (one of "P2PKH", "P2SH", "P2WPKH", "P2WSH")
.IP \[bu]
\fBhex\fR (hex): Raw encoded address
.IP \[bu]
\fBaddr\fR (string, optional): the address in appropriate format for \fItype\fR
.RE
.IP \[bu]
\fBroutes\fR (array of arrays, optional): Route hints to the \fIpayee\fR:
.RS
.IP \[bu]
hops in the route:
.RS
.IP \[bu]
\fBpubkey\fR (pubkey): the public key of the node
.IP \[bu]
\fBshort_channel_id\fR (short_channel_id): a channel to the next peer
.IP \[bu]
\fBfee_base_msat\fR (u32): the base fee for payments
.IP \[bu]
\fBfee_proportional_millionths\fR (u32): the parts-per-million fee for payments
.IP \[bu]
\fBcltv_expiry_delta\fR (u32): the CLTV delta across this hop
.RE
.RE
.IP \[bu]
\fBextra\fR (array of objects, optional): Any extra fields we didn't know how to parse:
.RS
.IP \[bu]
\fBtag\fR (string): The bech32 letter which identifies this field (always 1 characters)
.IP \[bu]
\fBdata\fR (string): The bech32 data for this field
.RE
.RE
Technically, the \fIdescription\fR field is optional if a
\fIdescription_hash\fR field is given, but in this case \fBdecodepay\fR will
only succeed if the optional \fIdescription\fR field is passed and matches
the \fIdescription_hash\fR\. In practice, these are currently unused\.
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-pay\fR(7), \fBlightning-getroute\fR(7), \fBlightning-sendpay\fR(7)\.
\fBBOLT
#11\fR (\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/11-payment-encoding.md\fR)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:2bd0b4c9b0e358ae5dbfde5d6a460fc6d24c397614c120a29c43a5cce4ebf721

View File

@ -1,62 +0,0 @@
.TH "LIGHTNING-DELDATASTORE" "7" "" "" "lightning-deldatastore"
.SH NAME
lightning-deldatastore - Command for removing (plugin) data
.SH SYNOPSIS
\fBdeldatastore\fR \fIkey\fR [\fIgeneration\fR]
.SH DESCRIPTION
The \fBdeldatastore\fR RPC command allows plugins to delete data it has
stored in the c-lightning database\.
The command fails if the \fIkey\fR isn't present, or if \fIgeneration\fR
is specified and the generation of the data does not exactly match\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBkey\fR (array of strings):
.RS
.IP \[bu]
Part of the key added to the datastore
.RE
.IP \[bu]
\fBgeneration\fR (u64, optional): The number of times this has been updated
.IP \[bu]
\fBhex\fR (hex, optional): The hex data which has removed from the datastore
.IP \[bu]
\fBstring\fR (string, optional): The data as a string, if it's valid utf-8
.RE
The following error codes may occur:
.RS
.IP \[bu]
1200: the key does not exist
.IP \[bu]
1201: the key does exist, but the generation is wrong
.IP \[bu]
-32602: invalid parameters
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-listdatastore\fR(7), \fBlightning-datastore\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:4329b32593f9d6d70bcd3de3fffa047b09d32fb82e59b923834eb2a11b5e8670

View File

@ -1,33 +0,0 @@
.TH "LIGHTNING-DELEXPIREDINVOICE" "7" "" "" "lightning-delexpiredinvoice"
.SH NAME
lightning-delexpiredinvoice - Command for removing expired invoices
.SH SYNOPSIS
\fBdelexpiredinvoice\fR [\fImaxexpirytime\fR]
.SH DESCRIPTION
The \fBdelexpiredinvoice\fR RPC command removes all invoices that have
expired on or before the given \fImaxexpirytime\fR\.
If \fImaxexpirytime\fR is not specified then all expired invoices are
deleted\.
.SH RETURN VALUE
On success, an empty object is returned\.
.SH AUTHOR
ZmnSCPxj \fI<ZmnSCPxj@protonmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-delinvoice\fR(7), \fBlightning-autocleaninvoice\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:1692e45b90818d4d55ad816c13c47abf4aeaee53d8b5de17fe43b8be27fa8e61

View File

@ -1,98 +0,0 @@
.TH "LIGHTNING-DELINVOICE" "7" "" "" "lightning-delinvoice"
.SH NAME
lightning-delinvoice - Command for removing an invoice
.SH SYNOPSIS
\fBdelinvoice\fR \fIlabel\fR \fIstatus\fR
.SH DESCRIPTION
The \fBdelinvoice\fR RPC command removes an invoice with \fIstatus\fR as given
in \fBlistinvoices\fR\.
The caller should be particularly aware of the error case caused by the
\fIstatus\fR changing just before this command is invoked!
.SH RETURN VALUE
Note: The return is the same as an object from \fBlightning-listinvoice\fR(7)\.
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBlabel\fR (string): Unique label given at creation time
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
.IP \[bu]
\fBstatus\fR (string): State of invoice (one of "paid", "expired", "unpaid")
.IP \[bu]
\fBexpires_at\fR (u64): UNIX timestamp when invoice expires (or expired)
.IP \[bu]
\fBbolt11\fR (string, optional): BOLT11 string
.IP \[bu]
\fBbolt12\fR (string, optional): BOLT12 string
.IP \[bu]
\fBamount_msat\fR (msat, optional): the amount required to pay this invoice
.IP \[bu]
\fBdescription\fR (string, optional): description used in the invoice
.RE
If \fBbolt12\fR is present:
.RS
.IP \[bu]
\fBlocal_offer_id\fR (hex, optional): offer for which this invoice was created
.IP \[bu]
\fBpayer_note\fR (string, optional): the optional \fIpayer_note\fR from invoice_request which created this invoice
.RE
If \fBstatus\fR is "paid":
.RS
.IP \[bu]
\fBpay_index\fR (u64): unique index for this invoice payment
.IP \[bu]
\fBamount_received_msat\fR (msat): how much was actually received
.IP \[bu]
\fBpaid_at\fR (u64): UNIX timestamp of when payment was received
.IP \[bu]
\fBpayment_preimage\fR (hex): SHA256 of this is the \fIpayment_hash\fR offered in the invoice (always 64 characters)
.RE
.SH ERRORS
The following errors may be reported:
.RS
.IP \[bu]
-1: Database error\.
.IP \[bu]
905: An invoice with that label does not exist\.
.IP \[bu]
906: The invoice \fIstatus\fR does not match the parameter\.
An error object will be returned as error \fIdata\fR, containing
\fIcurrent_status\fR and \fIexpected_status\fR fields\.
This is most likely due to the \fIstatus\fR of the invoice
changing just before this command is invoked\.
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-listinvoice\fR(7), \fBlightning-waitinvoice\fR(7),
\fBlightning-invoice\fR(7), \fBlightning-delexpiredinvoice\fR(7),
\fBlightning-autocleaninvoice\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:5b2e2104fde0b6ff907a46f1993e484089825568edd06b5b87d7bdddc331132e

123
doc/lightning-delpay.7 generated
View File

@ -1,123 +0,0 @@
.TH "LIGHTNING-DELPAY" "7" "" "" "lightning-delpay"
.SH NAME
lightning-delpay - Command for removing a completed or failed payment
.SH SYNOPSIS
\fBdelpay\fR \fIpayment_hash\fR \fIstatus\fR
.SH DESCRIPTION
The \fBdelpay\fR RPC command deletes a payment with the given \fBpayment_hash\fR if its status is either \fBcomplete\fR or \fBfailed\fR\. Deleting a \fBpending\fR payment is an error\.
.RS
.IP \[bu]
\fIpayment_hash\fR: The unique identifier of a payment\.
.IP \[bu]
\fIstatus\fR: Expected status of the payment\.
Only deletes if the payment status matches\.
.RE
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "delpay",
"params": {
"payment_hash": "4fa2f1b001067ec06d7f95b8695b8acd9ef04c1b4d1110e3b94e1fa0687bb1e0",
"status": "complete"
}
}
.RE
.fi
.SH RETURN VALUE
The returned format is the same as \fBlightning-listsendpays\fR(7)\. If the
payment is a multi-part payment (MPP) the command return a list of
payments will be returned -- one payment object for each partid\.
On success, an object containing \fBpayments\fR is returned\. It is an array of objects, where each object contains:
.RS
.IP \[bu]
\fBid\fR (u64): unique ID for this payment attempt
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
.IP \[bu]
\fBstatus\fR (string): status of the payment (one of "pending", "failed", "complete")
.IP \[bu]
\fBamount_sent_msat\fR (msat): the amount we actually sent, including fees
.IP \[bu]
\fBcreated_at\fR (u64): the UNIX timestamp showing when this payment was initiated
.IP \[bu]
\fBpartid\fR (u64, optional): unique ID within this (multi-part) payment
.IP \[bu]
\fBdestination\fR (pubkey, optional): the final destination of the payment if known
.IP \[bu]
\fBamount_msat\fR (msat, optional): the amount the destination received, if known
.IP \[bu]
\fBpayment_preimage\fR (hex, optional): proof of payment (always 64 characters)
.IP \[bu]
\fBlabel\fR (string, optional): the label, if given to sendpay
.IP \[bu]
\fBbolt11\fR (string, optional): the bolt11 string (if pay supplied one)
.IP \[bu]
\fBbolt12\fR (string, optional): the bolt12 string (if supplied for pay: \fBexperimental-offers\fR only)\.
.IP \[bu]
\fBerroronion\fR (hex, optional): the error onion returned on failure, if any\.
.RE
On failure, an error is returned\. If the lightning process fails before responding, the
caller should use \fBlightning-listsentpays\fR(7) or \fBlightning-listpays\fR(7) to query whether this payment was deleted or not\.
The following error codes may occur:
.RS
.IP \[bu]
-32602: Parameter missed or malformed;
.IP \[bu]
211: Payment status mismatch\. Check the correct status via \fBpaystatus\fR;
.IP \[bu]
208: Payment with payment_hash not found\.
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"payments": [
{
"id": 2,
"payment_hash": "8dfd6538eeb33811c9114a75f792a143728d7f05643f38c3d574d3097e8910c0",
"destination": "0219f8900ee78a89f050c24d8b69492954f9fdbabed753710845eb75d3a75a5880",
"msatoshi": 1000,
"amount_msat": "1000msat",
"msatoshi_sent": 1000,
"amount_sent_msat": "1000msat",
"created_at": 1596224858,
"status": "complete",
"payment_preimage": "35bd4e2b481a1a84a22215b5372672cf81460a671816960ddb206464359e1822",
"bolt11": "lntb10n1p0jga20pp53h7k2w8wkvuprjg3ff6l0y4pgdeg6lc9vsln3s74wnfsjl5fzrqqdqdw3jhxazldahx2xqyjw5qcqp2sp5wut5jnhr6n7jd5747ky2g5flmw7hgx9yjnqzu60ps2jf6f7tc0us9qy9qsqu2a0k37nckl62005p69xavlkydkvhnypk4dphffy4x09zltwh9437ad7xkl83tefdarzhu5t30ju5s56wlrg97qkx404pq3srfc425cq3ke9af"
}
]
}
.RE
.fi
.SH AUTHOR
Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-listpays\fR(7), \fBlightning-listsendpays\fR(7), \fBlightning-paystatus\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:0e7079fcdb644918b1dbea73392b5d367a8cb2ee404a9fb4083b5d86053ba469

View File

@ -1,83 +0,0 @@
.TH "LIGHTNING-DISABLEOFFER" "7" "" "" "lightning-disableoffer"
.SH NAME
lightning-disableoffer - Command for removing an offer
.SH SYNOPSIS
\fB(WARNING: experimental-offers only)\fR
\fBdisableoffer\fR \fIoffer_id\fR
.SH DESCRIPTION
The \fBdisableoffer\fR RPC command disables an offer, so that no further
invoices will be given out (if made with \fBlightning-offer\fR(7)) or
invoices accepted (if made with \fBlightning-offerout\fR(7))\.
We currently don't support deletion of offers, so offers are not
forgotten entirely (there may be invoices which refer to this offer)\.
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "disableoffer",
"params": {
"offer_id": "713a16ccd4eb10438bdcfbc2c8276be301020dd9d489c530773ba64f3b33307d ",
}
}
.RE
.fi
.SH RETURN VALUE
Note: the returned object is the same format as \fBlistoffers\fR\.
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBoffer_id\fR (hex): the merkle hash of the offer (always 64 characters)
.IP \[bu]
\fBactive\fR (boolean): Whether the offer can produce invoices/payments (always \fIfalse\fR)
.IP \[bu]
\fBsingle_use\fR (boolean): Whether the offer is disabled after first successful use
.IP \[bu]
\fBbolt12\fR (string): The bolt12 string representing this offer
.IP \[bu]
\fBbolt12_unsigned\fR (string): The bolt12 string representing this offer, without signature
.IP \[bu]
\fBused\fR (boolean): Whether the offer has had an invoice paid / payment made
.IP \[bu]
\fBlabel\fR (string, optional): The label provided when offer was created
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"offer_id": "053a5c566fbea2681a5ff9c05a913da23e45b95d09ef5bd25d7d408f23da7084",
"active": false,
"single_use": false,
"bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqvqcdgq2z9pk7enxv4jjqen0wgs8yatnw3ujz83qkc6rvp4j28rt3dtrn32zkvdy7efhnlrpr5rp5geqxs783wtlj550qs8czzku4nk3pqp6m593qxgunzuqcwkmgqkmp6ty0wyvjcqdguv3pnpukedwn6cr87m89t74h3auyaeg89xkvgzpac70z3m9rn5xzu28c",
"used": false
}
.RE
.fi
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-offer\fR(7), \fBlightning-offerout\fR(7), \fBlightning-listoffers\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:4566fb3a77342f32ca7ce150c47fa169749dd0cd8eb8e1a512c3004f15084f2a

View File

@ -1,66 +0,0 @@
.TH "LIGHTNING-DISCONNECT" "7" "" "" "lightning-disconnect"
.SH NAME
lightning-disconnect - Command for disconnecting from another lightning node
.SH SYNOPSIS
\fBdisconnect\fR \fIid\fR [\fIforce\fR]
.SH DESCRIPTION
The disconnect RPC command closes an existing connection to a peer,
identified by \fIid\fR, in the Lightning Network, as long as it doesnt have
an active channel\. If \fIforce\fR is set then it will disconnect even with
an active channel\.
The \fIid\fR can be discovered in the output of the listpeers command, which
returns a set of peers:
.nf
.RS
{
"peers": [
{
"id": "0563aea81...",
"connected": true,
...
}
]
}
.RE
.fi
Passing the \fIid\fR attribute of a peer to \fIdisconnect\fR will terminate the
connection\.
.SH RETURN VALUE
On success, an empty object is returned\.
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
with \fBcode\fR being one of the following:
.RS
.IP \[bu]
-32602: If the given parameters are wrong\.
.IP \[bu]
-1: Catchall nonspecific error\.
.RE
.SH AUTHOR
Michael Hawkins \fI<michael.hawkins@protonmail.com\fR>\.
.SH SEE ALSO
\fBlightning-connect\fR(1), \fBlightning-listpeers\fR(1)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:f967b94a7ef6c5f3cd9b135338bcfd8711d7efe05791fa12f5dde43fa547878c

172
doc/lightning-feerates.7 generated
View File

@ -1,172 +0,0 @@
.TH "LIGHTNING-FEERATES" "7" "" "" "lightning-feerates"
.SH NAME
lightning-feerates - Command for querying recommended onchain feerates
.SH SYNOPSIS
\fBfeerates\fR \fIstyle\fR
.SH DESCRIPTION
The \fBfeerates\fR command returns the feerates that C-lightning will use\.
The feerates will be based on the recommended feerates from the backend\.
The backend may fail to provide estimates, but if it was able to provide
estimates in the past, C-lightning will continue to use those for a while\.
C-lightning will also smoothen feerate estimations from the backend\.
\fIstyle\fR is either of the two strings:
.RS
.IP \[bu]
\fIperkw\fR - provide feerate in units of satoshis per 1000 weight\.
.IP \[bu]
\fIperkb\fR - provide feerate in units of satoshis per 1000 virtual bytes\.
.RE
Bitcoin transactions have non-witness and witness bytes:
.RS
.IP \[bu]
Non-witness bytes count as 4 weight, 1 virtual byte\.
All bytes other than SegWit witness count as non-witness bytes\.
.IP \[bu]
Witness bytes count as 1 weight, 0\.25 virtual bytes\.
.RE
Thus, all \fIperkb\fR feerates will be exactly 4 times \fIperkw\fR feerates\.
To compute the fee for a transaction, multiply its weight or virtual bytes
by the appropriate \fIperkw\fR or \fIperkw\fR feerate
returned by this command,
then divide by 1000\.
There is currently no way to change these feerates from the RPC\.
If you need custom control over onchain feerates,
you will need to provide your own plugin
that replaces the \fBbcli\fR plugin backend\.
For commands like \fBlightning-withdraw\fR(7) or \fBlightning-fundchannel\fR(7) you
can provide a preferred feerate directly as a parameter,
which will override the recommended feerates returned by \fBfeerates\fR\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBperkb\fR (object, optional): If \fIstyle\fR parameter was perkb:
.RS
.IP \[bu]
\fBmin_acceptable\fR (u32): The smallest feerate that you can use, usually the minimum relayed feerate of the backend
.IP \[bu]
\fBmax_acceptable\fR (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)\.
.IP \[bu]
\fBopening\fR (u32, optional): Default feerate for \fBlightning-fundchannel\fR(7) and \fBlightning-withdraw\fR(7)
.IP \[bu]
\fBmutual_close\fR (u32, optional): Feerate to aim for in cooperative shutdown\. Note that since mutual close is a \fBnegotiation\fR, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer\.
.IP \[bu]
\fBunilateral_close\fR (u32, optional): Feerate for commitment_transaction in a live channel which we originally funded
.IP \[bu]
\fBdelayed_to_us\fR (u32, optional): Feerate for returning unilateral close funds to our wallet
.IP \[bu]
\fBhtlc_resolution\fR (u32, optional): Feerate for returning unilateral close HTLC outputs to our wallet
.IP \[bu]
\fBpenalty\fR (u32, optional): Feerate to start at when penalizing a cheat attempt
.RE
.IP \[bu]
\fBperkw\fR (object, optional): If \fIstyle\fR parameter was perkw:
.RS
.IP \[bu]
\fBmin_acceptable\fR (u32): The smallest feerate that you can use, usually the minimum relayed feerate of the backend
.IP \[bu]
\fBmax_acceptable\fR (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)\.
.IP \[bu]
\fBopening\fR (u32, optional): Default feerate for \fBlightning-fundchannel\fR(7) and \fBlightning-withdraw\fR(7)
.IP \[bu]
\fBmutual_close\fR (u32, optional): Feerate to aim for in cooperative shutdown\. Note that since mutual close is a \fBnegotiation\fR, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer\.
.IP \[bu]
\fBunilateral_close\fR (u32, optional): Feerate for commitment_transaction in a live channel which we originally funded
.IP \[bu]
\fBdelayed_to_us\fR (u32, optional): Feerate for returning unilateral close funds to our wallet
.IP \[bu]
\fBhtlc_resolution\fR (u32, optional): Feerate for returning unilateral close HTLC outputs to our wallet
.IP \[bu]
\fBpenalty\fR (u32, optional): Feerate to start at when penalizing a cheat attempt
.RE
.IP \[bu]
\fBonchain_fee_estimates\fR (object, optional):
.RS
.IP \[bu]
\fBopening_channel_satoshis\fR (u64): Estimated cost of typical channel open
.IP \[bu]
\fBmutual_close_satoshis\fR (u64): Estimated cost of typical channel close
.IP \[bu]
\fBunilateral_close_satoshis\fR (u64): Estimated cost of typical unilateral close (without HTLCs)
.IP \[bu]
\fBhtlc_timeout_satoshis\fR (u64): Estimated cost of typical HTLC timeout transaction
.IP \[bu]
\fBhtlc_success_satoshis\fR (u64): Estimated cost of typical HTLC fulfillment transaction
.RE
.RE
The following warnings may also be returned:
.RS
.IP \[bu]
\fBwarning_missing_feerates\fR: Some fee estimates are missing
.RE
.SH ERRORS
The \fBfeerates\fR command will never error,
however some fields may be missing in the result
if feerate estimates for that kind of transaction are unavailable\.
.SH NOTES
Many other commands have a \fIfeerate\fR parameter, which can be the strings
\fIurgent\fR, \fInormal\fR, or \fIslow\fR\.
These are mapped to the \fBfeerates\fR outputs as:
.RS
.IP \[bu]
\fIurgent\fR - equal to \fIunilateral_close\fR
.IP \[bu]
\fInormal\fR - equal to \fIopening\fR
.IP \[bu]
\fIslow\fR - equal to \fImin_acceptable\fR\.
.RE
.SH TRIVIA
In C-lightning we like to call the weight unit "sipa"
in honor of Pieter Wuille,
who uses the name "sipa" on IRC and elsewhere\.
Internally we call the \fIperkw\fR style as "feerate per kilosipa"\.
.SH AUTHOR
ZmnSCPxj \fI<ZmnSCPxj@protonmail.com\fR> wrote the initial version of this
manpage\.
.SH SEE ALSO
\fBlightning-parsefeerate\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-withdraw\fR(7),
\fBlightning-txprepare\fR(7), \fBlightning-fundchannel_start\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:b60c81ed07764db66f4b8d4486dec8a4a6a83337aec8ab5871adbefce10356b2

View File

@ -1,125 +0,0 @@
.TH "LIGHTNING-FETCHINVOICE" "7" "" "" "lightning-fetchinvoice"
.SH NAME
lightning-fetchinvoice - Command for fetch an invoice for an offer
.SH SYNOPSIS
\fB(WARNING: experimental-offers only)\fR
\fBfetchinvoice\fR \fIoffer\fR [\fImsatoshi\fR] [\fIquantity\fR] [\fIrecurrence_counter\fR] [\fIrecurrence_start\fR] [\fIrecurrence_label\fR] [\fItimeout\fR] [\fIpayer_note\fR]
.SH DESCRIPTION
The \fBfetchinvoice\fR RPC command contacts the issuer of an \fIoffer\fR to get
an actual invoice that can be paid\. It highlights any changes between the
offer and the returned invoice\.
If \fBfetchinvoice-noconnect\fR is not specified in the configuation, it
will connect to the destination in the (currently common!) case where it
cannot find a route which supports \fBoption_onion_messages\fR\.
The offer must not contain \fIsend_invoice\fR; see \fBlightning-sendinvoice\fR(7)\.
\fImsatoshi\fR is required if the \fIoffer\fR does not specify
an amount at all, otherwise it is not allowed\.
\fIquantity\fR is is required if the \fIoffer\fR specifies
\fIquantity_min\fR or \fIquantity_max\fR, otherwise it is not allowed\.
\fIrecurrence_counter\fR is required if the \fIoffer\fR
specifies \fIrecurrence\fR, otherwise it is not allowed\.
\fIrecurrence_counter\fR should first be set to 0, and incremented for
each successive invoice in a given series\.
\fIrecurrence_start\fR is required if the \fIoffer\fR
specifies \fIrecurrence_base\fR with \fIstart_any_period\fR set, otherwise it
is not allowed\. It indicates what period number to start at\.
\fIrecurrence_label\fR is required if \fIrecurrence_counter\fR is set, and
otherwise is not allowed\. It must be the same as prior fetchinvoice
calls for the same recurrence, as it is used to link them together\.
\fItimeout\fR is an optional timeout; if we don't get a reply before this
we fail (default, 60 seconds)\.
\fIpayer_note\fR is an optional payer note to include in the fetched invoice\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBinvoice\fR (string): The BOLT12 invoice we fetched
.IP \[bu]
\fBchanges\fR (object): Summary of changes from offer:
.RS
.IP \[bu]
\fBdescription_appended\fR (string, optional): extra characters appended to the \fIdescription\fR field\.
.IP \[bu]
\fBdescription\fR (string, optional): a completely replaced \fIdescription\fR field
.IP \[bu]
\fBvendor_removed\fR (string, optional): The \fIvendor\fR from the offer, which is missing in the invoice
.IP \[bu]
\fBvendor\fR (string, optional): a completely replaced \fIvendor\fR field
.IP \[bu]
\fBmsat\fR (msat, optional): the amount, if different from the offer amount multiplied by any \fIquantity\fR (or the offer had no amount, or was not in BTC)\.
.RE
.IP \[bu]
\fBnext_period\fR (object, optional): Only for recurring invoices if the next period is under the \fIrecurrence_limit\fR:
.RS
.IP \[bu]
\fBcounter\fR (u64): the index of the next period to fetchinvoice
.IP \[bu]
\fBstarttime\fR (u64): UNIX timestamp that the next period starts
.IP \[bu]
\fBendtime\fR (u64): UNIX timestamp that the next period ends
.IP \[bu]
\fBpaywindow_start\fR (u64): UNIX timestamp of the earliest time that the next invoice can be fetched
.IP \[bu]
\fBpaywindow_end\fR (u64): UNIX timestamp of the latest time that the next invoice can be fetched
.RE
.RE
The following error codes may occur:
.RS
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
1002: Offer has expired\.
.IP \[bu]
1003: Cannot find a route to the node making the offer\.
.IP \[bu]
1004: The node making the offer returned an error message\.
.IP \[bu]
1005: We timed out trying to fetch an invoice\.
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-sendinvoice\fR(7), \fBlightning-pay\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:73bfed34c90b4689100c54e8521a5b23eca520acb0cbc0509a853d7f996920cc

View File

@ -1,142 +0,0 @@
.TH "LIGHTNING-FUNDCHANNEL" "7" "" "" "lightning-fundchannel"
.SH NAME
lightning-fundchannel - Command for establishing a lightning channel
.SH SYNOPSIS
\fBfundchannel\fR \fIid\fR \fIamount\fR [\fIfeerate\fR] [\fIannounce\fR] [\fIminconf\fR]
[\fIutxos\fR] [\fIpush_msat\fR] [\fIclose_to\fR] [\fIrequest_amt\fR] [\fIcompact_lease\fR]
.SH DESCRIPTION
The \fBfundchannel\fR RPC command opens a payment channel with a peer by
committing a funding transaction to the blockchain as defined in BOLT
#2\.
If not already connected, \fBfundchannel\fR will automatically attempt
to connect if C-lightning knows a way to contact the node (either from
normal gossip, or from a previous \fBconnect\fR call)\.
This auto-connection can fail if C-lightning does not know how to contact
the target node; see \fBlightning-connect\fR(7)\.
Once the
transaction is confirmed, normal channel operations may begin\. Readiness
is indicated by \fBlistpeers\fR reporting a \fIstate\fR of \fBCHANNELD_NORMAL\fR
for the channel\.
\fIid\fR is the peer id obtained from \fBconnect\fR\.
\fIamount\fR is the amount in satoshis taken from the internal wallet to
fund the channel\. The string \fIall\fR can be used to specify all available
funds (or 16777215 satoshi if more is available and large channels were not negotiated with the peer)\. Otherwise, it is in
satoshi precision; it can be a whole number, a whole number ending in
\fIsat\fR, a whole number ending in \fI000msat\fR, or a number with 1 to 8
decimal places ending in \fIbtc\fR\. The value cannot be less than the dust
limit, currently set to 546, nor more than 16777215 satoshi (unless large
channels were negotiated with the peer)\.
\fIfeerate\fR is an optional feerate used for the opening transaction and as
initial feerate for commitment and HTLC transactions\. It can be one of
the strings \fIurgent\fR (aim for next block), \fInormal\fR (next 4 blocks or
so) or \fIslow\fR (next 100 blocks or so) to use lightningds internal
estimates: \fInormal\fR is the default\.
Otherwise, \fIfeerate\fR is a number, with an optional suffix: \fIperkw\fR means
the number is interpreted as satoshi-per-kilosipa (weight), and \fIperkb\fR
means it is interpreted bitcoind-style as satoshi-per-kilobyte\. Omitting
the suffix is equivalent to \fIperkb\fR\.
\fIannounce\fR is an optional flag that triggers whether to announce this
channel or not\. Defaults to \fBtrue\fR\. An unannounced channel is considered
private\.
\fIminconf\fR specifies the minimum number of confirmations that used
outputs should have\. Default is 1\.
\fIutxos\fR specifies the utxos to be used to fund the channel, as an array
of "txid:vout"\.
\fIpush_msat\fR is the amount of millisatoshis to push to the channel peer at
open\. Note that this is a gift to the peer -- these satoshis are
added to the initial balance of the peer at channel start and are largely
unrecoverable once pushed\.
\fIclose_to\fR is a Bitcoin address to which the channel funds should be sent to
on close\. Only valid if both peers have negotiated \fBoption_upfront_shutdown_script\fR\.
Returns \fBclose_to\fR set to closing script iff is negotiated\.
\fIrequest_amt\fR is an amount of liquidity you'd like to lease from the peer\.
If peer supports \fBoption_will_fund\fR, indicates to them to include this
much liquidity into the channel\. Must also pass in \fIcompact_lease\fR\.
\fIcompact_lease\fR is a compact represenation of the peer's expected
channel lease terms\. If the peer's terms don't match this set, we will
fail to open the channel\.
This example shows how to use lightning-cli to open new channel with peer 03f\.\.\.fc1 from one whole utxo bcc1\.\.\.39c:0
(you can use \fBlistfunds\fR command to get txid and vout):
.nf
.RS
lightning-cli -k fundchannel id=03f...fc1 amount=all feerate=normal utxos='["bcc1...39c:0"]'
.RE
.fi
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBtx\fR (hex): The raw transaction which funded the channel
.IP \[bu]
\fBtxid\fR (txid): The txid of the transaction which funded the channel
.IP \[bu]
\fBoutnum\fR (u32): The 0-based output index showing which output funded the channel
.IP \[bu]
\fBchannel_id\fR (hex): The channel_id of the resulting channel (always 64 characters)
.IP \[bu]
\fBclose_to\fR (hex, optional): The raw scriptPubkey which mutual close will go to; only present if \fIclose_to\fR parameter was specified and peer supports \fBoption_upfront_shutdown_script\fR
.RE
The following error codes may occur:
.RS
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
300: The maximum allowed funding amount is exceeded\.
.IP \[bu]
301: There are not enough funds in the internal wallet (including fees) to create the transaction\.
.IP \[bu]
302: The output amount is too small, and would be considered dust\.
.IP \[bu]
303: Broadcasting of the funding transaction failed, the internal call to bitcoin-cli returned with an error\.
.RE
Failure may also occur if \fBlightningd\fR and the peer cannot agree on
channel parameters (funding limits, channel reserves, fees, etc\.)\.
.SH SEE ALSO
\fBlightning-connect\fR(7), lightning-listfunds(), \fBlightning-listpeers\fR(7),
\fBlightning-feerates\fR(7), \fBlightning-multifundchannel\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:b45c037781f1b61f191734434c380fb0c3d52ade3c439992a6bc6e8143a4305e

View File

@ -1,67 +0,0 @@
.TH "LIGHTNING-FUNDCHANNEL_CANCEL" "7" "" "" "lightning-fundchannel_cancel"
.SH NAME
lightning-fundchannel_cancel - Command for completing channel establishment
.SH SYNOPSIS
\fBfundchannel_cancel\fR \fIid\fR
.SH DESCRIPTION
\fBfundchannel_cancel\fR is a lower level RPC command\. It allows channel opener
to cancel a channel before funding broadcast with a connected peer\.
\fIid\fR is the node id of the remote peer with which to cancel\.
Note that the funding transaction MUST NOT be broadcast before
\fBfundchannel_cancel\fR\. Broadcasting transaction before \fBfundchannel_cancel\fR
WILL lead to unrecoverable loss of funds\.
If \fBfundchannel_cancel\fR is called after \fBfundchannel_complete\fR, the remote
peer may disconnect when command succeeds\. In this case, user need to connect
to remote peer again before opening channel\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBcancelled\fR (string): A message indicating it was cancelled by RPC
.RE
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
with \fBcode\fR being one of the following:
.RS
.IP \[bu]
-32602: If the given parameters are wrong\.
.IP \[bu]
306: Unknown peer id\.
.IP \[bu]
307: No channel currently being funded that can be cancelled\.
.IP \[bu]
308: It is unsafe to cancel the channel: the funding transaction
has been broadcast, or there are HTLCs already in the channel, or
the peer was the initiator and not us\.
.RE
.SH AUTHOR
Lisa Neigut \fI<niftynei@gmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-connect\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-multifundchannel\fR(7),
lightning-fundchannel_\fBstart\fR(7), lightning-fundchannel_\fBcomplete\fR(7)
lightning-openchannel_\fBinit\fR(7), lightning-openchannel_\fBupdate\fR(7),
lightning-openchannel_\fBsigned\fR(7), lightning-openchannel_\fBabort\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:f53625b0a2131e1227431a22fda7081f2acfa87f31acb5a5ebceefa6093ecf45

View File

@ -1,71 +0,0 @@
.TH "LIGHTNING-FUNDCHANNEL_COMPLETE" "7" "" "" "lightning-fundchannel_complete"
.SH NAME
lightning-fundchannel_complete - Command for completing channel establishment
.SH SYNOPSIS
\fBfundchannel_complete\fR \fIid\fR \fIpsbt\fR
.SH DESCRIPTION
\fBfundchannel_complete\fR is a lower level RPC command\. It allows a user to
complete an initiated channel establishment with a connected peer\.
\fIid\fR is the node id of the remote peer\.
\fIpsbt\fR is the transaction to use for funding (does not need to be
signed but must be otherwise complete)\.
Note that the funding transaction MUST NOT be broadcast until after
channel establishment has been successfully completed, as the commitment
transactions for this channel are not secured until this command
successfully completes\. Broadcasting transaction before can lead to
unrecoverable loss of funds\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBchannel_id\fR (hex): The channel_id of the resulting channel (always 64 characters)
.IP \[bu]
\fBcommitments_secured\fR (boolean): Indication that channel is safe to use (always \fItrue\fR)
.RE
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
with \fBcode\fR being one of the following:
.RS
.IP \[bu]
-32602: If the given parameters are wrong\.
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
305: Peer is not connected\.
.IP \[bu]
306: Unknown peer id\.
.IP \[bu]
309: PSBT does not have a unique, correct output to fund the channel\.
.RE
.SH AUTHOR
Lisa Neigut \fI<niftynei@gmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-connect\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-multifundchannel\fR(7),
lightning-fundchannel_\fBstart\fR(7), lightning-fundchannel_\fBcancel\fR(7),
lightning-openchannel_\fBinit\fR(7), lightning-openchannel_\fBupdate\fR(7),
lightning-openchannel_\fBsigned\fR(7), lightning-openchannel_\fBbump\fR(7),
lightning-openchannel_\fBabort\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:dcef11ad5a6327df2cf5794620c8e6f13baa025846caa2e4c7f36eea2d6da143

View File

@ -1,96 +0,0 @@
.TH "LIGHTNING-FUNDCHANNEL_START" "7" "" "" "lightning-fundchannel_start"
.SH NAME
lightning-fundchannel_start - Command for initiating channel establishment for a lightning channel
.SH SYNOPSIS
\fBfundchannel_start\fR \fIid\fR \fIamount\fR [\fIfeerate\fR \fIannounce\fR \fIclose_to\fR \fIpush_msat\fR]
.SH DESCRIPTION
\fBfundchannel_start\fR is a lower level RPC command\. It allows a user to
initiate channel establishment with a connected peer\.
\fIid\fR is the node id of the remote peer\.
\fIamount\fR is the satoshi value that the channel will be funded at\. This
value MUST be accurate, otherwise the negotiated commitment transactions
will not encompass the correct channel value\.
\fIfeerate\fR is an optional field\. Sets the feerate for subsequent
commitment transactions: see \fBfundchannel\fR\.
\fIannounce\fR whether or not to announce this channel\.
\fIclose_to\fR is a Bitcoin address to which the channel funds should be sent to
on close\. Only valid if both peers have negotiated \fBoption_upfront_shutdown_script\fR\.
Returns \fBclose_to\fR set to closing script iff is negotiated\.
\fIpush_msat\fR is the amount of millisatoshis to push to the channel peer at
open\. Note that this is a gift to the peer -- these satoshis are
added to the initial balance of the peer at channel start and are largely
unrecoverable once pushed\.
Note that the funding transaction MUST NOT be broadcast until after
channel establishment has been successfully completed by running
\fBfundchannel_complete\fR, as the commitment transactions for this channel
are not secured until the complete command succeeds\. Broadcasting
transaction before that can lead to unrecoverable loss of funds\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBfunding_address\fR (string): The address to send funding to for the channel
.IP \[bu]
\fBscriptpubkey\fR (hex): The raw scriptPubkey for the address
.IP \[bu]
\fBclose_to\fR (hex, optional): The raw scriptPubkey which mutual close will go to; only present if \fIclose_to\fR parameter was specified and peer supports \fBoption_upfront_shutdown_script\fR
.RE
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
with \fBcode\fR being one of the following:
.RS
.IP \[bu]
-32602: If the given parameters are wrong\.
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
300: The amount exceeded the maximum configured funding amount\.
.IP \[bu]
301: The provided \fBpush_msat\fR is greater than the provided \fBamount\fR\.
.IP \[bu]
304: Still syncing with bitcoin network
.IP \[bu]
305: Peer is not connected\.
.IP \[bu]
306: Unknown peer id\.
.RE
.SH AUTHOR
Lisa Neigut \fI<niftynei@gmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-connect\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-multifundchannel\fR(7),
lightning-fundchannel_\fBcomplete\fR(7), lightning-fundchannel_\fBcancel\fR(7)
lightning-openchannel_\fBinit\fR(7), lightning-openchannel_\fBupdate\fR(7),
lightning-openchannel_\fBsigned\fR(7), lightning-openchannel_\fBbump\fR(7),
lightning-openchannel_\fBabort\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:131bcdb525df95f5c2da4fc74cfa0948e1d3bb618c341509cd5ad354aad5edcb

View File

@ -1,185 +0,0 @@
.TH "LIGHTNING-FUNDERUPDATE" "7" "" "" "lightning-funderupdate"
.SH NAME
lightning-funderupdate - Command for adjusting node funding v2 channels
.SH SYNOPSIS
\fBfunderupdate\fR [\fIpolicy\fR] [\fIpolicy_mod\fR] [\fIleases_only\fR] [\fImin_their_funding_msat\fR] [\fImax_their_funding_msat\fR] [\fIper_channel_min_msat\fR] [\fIper_channel_max_msat\fR] [\fIreserve_tank_msat\fR] [\fIfuzz_percent\fR] [\fIfund_probability\fR] [\fIlease_fee_base_msat\fR] [\fIlease_fee_basis\fR] [\fIfunding_weight\fR] [\fIchannel_fee_max_base_msat\fR] [\fIchannel_fee_max_proportional_thousandths\fR] [\fIcompact_lease\fR]
NOTE: Must have --experimental-dual-fund enabled for these settings to take effect\.
.SH DESCRIPTION
For channel open requests using
\fIpolicy\fR, \fIpolicy_mod\fR is the policy the funder plugin will use to decide
how much capital to commit to a v2 open channel request\. There are three
policy options, detailed below: \fBmatch\fR, \fBavailable\fR, and \fBfixed\fR\.
The \fIpolicy_mod\fR is the number or 'modification' to apply to the policy\.
Default is (fixed, 0sats)\.
.RS
.IP \[bu]
\fBmatch\fR -- Contribute \fIpolicy_mod\fR percent of their requested funds\.
Valid \fIpolicy_mod\fR values are 0 to 200\. If this is a channel lease
request, we match based on their requested funds\. If it is not a
channel lease request (and \fIlease_only\fR is false), then we match
their funding amount\. Note: any lease match less than 100 will
likely fail, as clients will not accept a lease less than their request\.
.IP \[bu]
\fBavailable\fR -- Contribute \fIpolicy_mod\fR percent of our available
node wallet funds\. Valid \fIpolicy_mod\fR values are 0 to 100\.
.IP \[bu]
\fBfixed\fR -- Contributes a fixed \fIpolicy_mod\fR sats to v2 channel open requests\.
.RE
Note: to maximize channel leases, best policy setting is (match, 100)\.
\fIleases_only\fR will only contribute funds to \fBoption_will_fund\fR requests
which pay to lease funds\. Defaults to false, will fund any v2 open request
using \fIpolicy\fR even if it's they're not seeking to lease funds\. Note that
\fBoption_will_fund\fR commits funds for 4032 blocks (~1mo)\. Must also set
\fIlease_fee_base_msat\fR, \fIlease_fee_basis\fR, \fIfunding_weight\fR,
\fIchannel_fee_max_base_msat\fR, and \fIchannel_fee_max_proportional_thousandths\fR
to advertise available channel leases\.
\fImin_their_funding_msat\fR is the minimum funding sats that we require in order
to activate our contribution policy to the v2 open\. Defaults to 10k sats\.
\fImax_their_funding_msat\fR is the maximum funding sats that we will consider
to activate our contribution policy to the v2 open\. Any channel open above this
will not be funded\. Defaults to no max (\fBUINT_MAX\fR)\.
\fIper_channel_min_msat\fR is the minimum amount that we will contribute to a
channel open\. Defaults to 10k sats\.
\fIper_channel_max_msat\fR is the maximum amount that we will contribute to a
channel open\. Defaults to no max (\fBUINT_MAX\fR)\.
\fIreserve_tank_msat\fR is the amount of sats to leave available in the node wallet\.
Defaults to zero sats\.
\fIfuzz_percent\fR is a percentage to fuzz the resulting contribution amount by\.
Valid values are 0 to 100\. Note that turning this on with (match, 100) policy
will randomly fail \fBoption_will_fund\fR leases, as most clients
expect an exact or greater match of their \fBrequested_funds\fR\.
Defaults to 0% (no fuzz)\.
\fIfund_probability\fR is the percent of v2 channel open requests to apply our
policy to\. Valid values are integers from 0 (fund 0% of all open requests)
to 100 (fund every request)\. Useful for randomizing opens that receive funds\.
Defaults to 100\.
Setting any of the next 5 options will activate channel leases for this node,
and advertise these values via the lightning gossip network\. If any one is set,
the other values will be the default\.
\fIlease_fee_base_msat\fR is the flat fee for a channel lease\. Node will
receive this much extra added to their channel balance, paid by the opening
node\. Defaults to 2k sats\. Note that the minimum is 1sat\.
\fIlease_fee_basis\fR is a basis fee that's calculated as 1/10k of the total
requested funds the peer is asking for\. Node will receive the total of
\fIlease_fee_basis\fR times requested funds / 10k satoshis added to their channel
balance, paid by the opening node\. Default is 0\.65% (65 basis points)
\fIfunding_weight\fR is used to calculate the fee the peer will compensate your
node for its contributing inputs to the funding transaction\. The total fee
is calculated as the \fBopen_channel2\fR\.\fBfunding_feerate_perkw\fR times this
\fIfunding_weight\fR divided by 1000\. Node will have this funding fee added
to their channel balance, paid by the opening node\. Default is
2 inputs + 1 P2WPKH output\.
\fIchannel_fee_max_base_msat\fR is a commitment to a maximum
\fBchannel_fee_base_msat\fR that your node will charge for routing payments
over this leased channel during the lease duration\. Default is 5k sats\.
\fIchannel_fee_max_proportional_thousandths\fR is a commitment to a maximum
\fBchannel_fee_proportional_millionths\fR that your node will charge for
routing payments over this leased channel during the lease duration\.
Note that it's denominated in 'thousandths'\. A setting of \fB1\fR is equal
to 1k ppm; \fB5\fR is 5k ppm, etc\. Default is 100 (100k ppm)\.
\fIcompact_lease\fR is a compact description of the channel lease params\. When
opening a channel, passed in to \fBfundchannel\fR to indicate the terms we
expect from the peer\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBsummary\fR (string): Summary of the current funding policy e\.g\. (match 100)
.IP \[bu]
\fBpolicy\fR (string): Policy funder plugin will use to decide how much captial to commit to a v2 open channel request (one of "match", "available", "fixed")
.IP \[bu]
\fBpolicy_mod\fR (u32): The \fIpolicy_mod\fR is the number or 'modification' to apply to the policy\.
.IP \[bu]
\fBleases_only\fR (boolean): Only contribute funds to \fBoption_will_fund\fR lease requests\.
.IP \[bu]
\fBmin_their_funding_msat\fR (msat): The minimum funding sats that we require from peer to activate our funding policy\.
.IP \[bu]
\fBmax_their_funding_msat\fR (msat): The maximum funding sats that we'll allow from peer to activate our funding policy\.
.IP \[bu]
\fBper_channel_min_msat\fR (msat): The minimum amount that we will fund a channel open with\.
.IP \[bu]
\fBper_channel_max_msat\fR (msat): The maximum amount that we will fund a channel open with\.
.IP \[bu]
\fBreserve_tank_msat\fR (msat): Amount of sats to leave available in the node wallet\.
.IP \[bu]
\fBfuzz_percent\fR (u32): Percentage to fuzz our funding amount by\.
.IP \[bu]
\fBfund_probability\fR (u32): Percent of opens to consider funding\. 100 means we'll consider funding every requested open channel request\.
.IP \[bu]
\fBlease_fee_base_msat\fR (msat, optional): Flat fee to charge for a channel lease\.
.IP \[bu]
\fBlease_fee_basis\fR (u32, optional): Proportional fee to charge for a channel lease, calculated as 1/10,000th of requested funds\.
.IP \[bu]
\fBfunding_weight\fR (u32, optional): Transaction weight the channel opener will pay us for a leased funding transaction\.
.IP \[bu]
\fBchannel_fee_max_base_msat\fR (msat, optional): Maximum channel_fee_base_msat we'll charge for routing funds leased on this channel\.
.IP \[bu]
\fBchannel_fee_max_proportional_thousandths\fR (u32, optional): Maximum channel_fee_proportional_millitionths we'll charge for routing funds leased on this channel, in thousandths\.
.IP \[bu]
\fBcompact_lease\fR (hex, optional): Compact description of the channel lease parameters\.
.RE
The following error code may occur:
.RS
.IP \[bu]
-32602: If the given parameters are invalid\.
.RE
.SH AUTHOR
@niftynei \fI<niftynei@gmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-fundchannel\fR(7), \fBlightning-listfunds\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:4c09e1f691bae4f465e9010823079231dc549808b2c65d96c777a39d07bd9bff

144
doc/lightning-fundpsbt.7 generated
View File

@ -1,144 +0,0 @@
.TH "LIGHTNING-FUNDPSBT" "7" "" "" "lightning-fundpsbt"
.SH NAME
lightning-fundpsbt - Command to populate PSBT inputs from the wallet
.SH SYNOPSIS
\fBfundpsbt\fR \fIsatoshi\fR \fIfeerate\fR \fIstartweight\fR [\fIminconf\fR] [\fIreserve\fR] [\fIlocktime\fR] [\fImin_witness_weight\fR] [\fIexcess_as_change\fR]
.SH DESCRIPTION
\fBfundpsbt\fR is a low-level RPC command which creates a PSBT using unreserved
inputs in the wallet, optionally reserving them as well\.
\fIsatoshi\fR is the minimum satoshi value of the output(s) needed (or the
string "all" meaning use all unreserved inputs)\. If a value, it can
be a whole number, a whole number ending in \fIsat\fR, a whole number
ending in \fI000msat\fR, or a number with 1 to 8 decimal places ending in
\fIbtc\fR\.
\fIfeerate\fR can be one of the feerates listed in \fBlightning-feerates\fR(7),
or one of the strings \fIurgent\fR (aim for next block), \fInormal\fR (next 4
blocks or so) or \fIslow\fR (next 100 blocks or so) to use lightningds
internal estimates\. It can also be a \fIfeerate\fR is a number, with an
optional suffix: \fIperkw\fR means the number is interpreted as
satoshi-per-kilosipa (weight), and \fIperkb\fR means it is interpreted
bitcoind-style as satoshi-per-kilobyte\. Omitting the suffix is
equivalent to \fIperkb\fR\.
\fIstartweight\fR is the weight of the transaction before \fIfundpsbt\fR has
added any inputs\.
\fIminconf\fR specifies the minimum number of confirmations that used
outputs should have\. Default is 1\.
\fIreserve\fR is either boolean or a number: if \fItrue\fR or a non-zero
number then \fIreserveinputs\fR is called (successfully, with
\fIexclusive\fR true) on the returned PSBT for this number of blocks (or
72 blocks if \fIreserve\fR is simply \fItrue\fR)\.
\fIlocktime\fR is an optional locktime: if not set, it is set to a recent
block height\.
\fImin_witness_weight\fR is an optional minimum weight to use for a UTXO's
witness\. If the actual witness weight is greater than the provided minimum,
the actual witness weight will be used\.
\fIexcess_as_change\fR is an optional boolean to flag to add a change output
for the excess sats\.
.SH EXAMPLE USAGE
Let's assume the caller is trying to produce a 100,000 satoshi output\.
First, the caller estimates the weight of the core (typically 42) and
known outputs of the transaction (typically (9 + scriptlen) * 4)\. For
a simple P2WPKH it's a 22 byte scriptpubkey, so that's 124 weight\.
It calls "\fIfundpsbt\fR 100000sat slow 166", which succeeds, and returns
the \fIpsbt\fR and \fIfeerate_per_kw\fR it used, the \fIestimated_final_weight\fR
and any \fIexcess_msat\fR\.
If \fIexcess_msat\fR is greater than the cost of adding a change output,
the caller adds a change output randomly to position 0 or 1 in the
PSBT\. Say \fIfeerate_per_kw\fR is 253, and the change output is a P2WPKH
(weight 124), the cost is around 31 sats\. With the dust limit disallowing
payments below 546 satoshis, we would only create a change output
if \fIexcess_msat\fR was greater or equal to 31 + 546\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBpsbt\fR (string): Unsigned PSBT which fulfills the parameters given
.IP \[bu]
\fBfeerate_per_kw\fR (u32): The feerate used to create the PSBT, in satoshis-per-kiloweight
.IP \[bu]
\fBestimated_final_weight\fR (u32): The estimated weight of the transaction once fully signed
.IP \[bu]
\fBexcess_msat\fR (msat): The amount above \fIsatoshi\fR which is available\. This could be zero, or dust; it will be zero if \fIchange_outnum\fR is also returned
.IP \[bu]
\fBchange_outnum\fR (u32, optional): The 0-based output number where change was placed (only if parameter \fIexcess_as_change\fR was true and there was sufficient funds)
.IP \[bu]
\fBreservations\fR (array of objects, optional): If \fIreserve\fR was true or a non-zero number, just as per \fBlightning-reserveinputs\fR(7):
.RS
.IP \[bu]
\fBtxid\fR (txid): The txid of the transaction
.IP \[bu]
\fBvout\fR (u32): The 0-based output number
.IP \[bu]
\fBwas_reserved\fR (boolean): Whether this output was previously reserved (always \fIfalse\fR)
.IP \[bu]
\fBreserved\fR (boolean): Whether this output is now reserved (always \fItrue\fR)
.IP \[bu]
\fBreserved_to_block\fR (u32): The blockheight the reservation will expire
.RE
.RE
If \fIexcess_as_change\fR is true and the excess is enough to cover
an additional output above the \fBdust_limit\fR, then an output is
added to the PSBT for the excess amount\. The \fIexcess_msat\fR will
be zero\. A \fIchange_outnum\fR will be returned with the index of
the change output\.
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
with \fBcode\fR being one of the following:
.RS
.IP \[bu]
-32602: If the given parameters are wrong\.
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
301: Insufficient UTXOs to meet \fIsatoshi\fR value\.
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-utxopsbt\fR(7), \fBlightning-reserveinputs\fR(7), \fBlightning-unreserveinputs\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:874514015517f7761a848942160729b820443de359046c378ad904c24b5027f2

150
doc/lightning-getinfo.7 generated
View File

@ -1,150 +0,0 @@
.TH "LIGHTNING-GETINFO" "7" "" "" "lightning-getinfo"
.SH NAME
lightning-getinfo - Command to receive all information about the c-lightning node\.
.SH SYNOPSIS
\fBgetinfo\fR
.SH DESCRIPTION
The \fBgetinfo\fR gives a summary of the current running node\.
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "getinfo",
"params": {}
}
.RE
.fi
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBid\fR (pubkey): The public key unique to this node
.IP \[bu]
\fBalias\fR (string): The fun alias this node will advertize (up to 32 characters)
.IP \[bu]
\fBcolor\fR (hex): The favorite RGB color this node will advertize (always 6 characters)
.IP \[bu]
\fBnum_peers\fR (u32): The total count of peers, connected or with channels
.IP \[bu]
\fBnum_pending_channels\fR (u32): The total count of channels being opened
.IP \[bu]
\fBnum_active_channels\fR (u32): The total count of channels in normal state
.IP \[bu]
\fBnum_inactive_channels\fR (u32): The total count of channels waiting for opening or closing transactions to be mined
.IP \[bu]
\fBversion\fR (string): Identifies what bugs you are running into
.IP \[bu]
\fBlightning-dir\fR (string): Identifies where you can find the configuration and other related files
.IP \[bu]
\fBblockheight\fR (u32): The highest block height we've learned
.IP \[bu]
\fBnetwork\fR (string): represents the type of network on the node are working (e\.g: \fBbitcoin\fR, \fBtestnet\fR, or \fBregtest\fR)
.IP \[bu]
\fBfees_collected_msat\fR (msat): Total routing fees collected by this node
.IP \[bu]
\fBaddress\fR (array of objects, optional): The addresses we announce to the world:
.RS
.IP \[bu]
\fBtype\fR (string): Type of connection (one of "ipv4", "ipv6", "torv2", "torv3")
.IP \[bu]
\fBaddress\fR (string): address in expected format for \fBtype\fR
.IP \[bu]
\fBport\fR (u16): port number
.RE
.IP \[bu]
\fBbinding\fR (array of objects, optional): The addresses we are listening on:
.RS
.IP \[bu]
\fBtype\fR (string): Type of connection (one of "local socket", "ipv4", "ipv6", "torv2", "torv3")
.IP \[bu]
\fBaddress\fR (string, optional): address in expected format for \fBtype\fR
.IP \[bu]
\fBport\fR (u16, optional): port number
.IP \[bu]
\fBsocket\fR (string, optional): socket filename (only if \fBtype\fR is "local socket")
.RE
.RE
The following warnings may also be returned:
.RS
.IP \[bu]
\fBwarning_bitcoind_sync\fR: Bitcoind is not up-to-date with network\.
.IP \[bu]
\fBwarning_lightningd_sync\fR: Lightningd is still loading latest blocks from bitcoind\.
.RE
On failure, one of the following error codes may be returned:
.RS
.IP \[bu]
-32602: Error in given parameters or some error happened during the command process\.
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"id": "02bf811f7571754f0b51e6d41a8885f5561041a7b14fac093e4cffb95749de1a8d",
"alias": "SLICKERGOPHER",
"color": "02bf81",
"num_peers": 0,
"num_pending_channels": 0,
"num_active_channels": 0,
"num_inactive_channels": 0,
"address": [
{
"type": "torv3",
"address": "fp463inc4w3lamhhduytrwdwq6q6uzugtaeapylqfc43agrdnnqsheyd.onion",
"port": 9736
},
{
"type": "torv3",
"address": "ifnntp5ak4homxrti2fp6ckyllaqcike447ilqfrgdw64ayrmkyashid.onion",
"port": 9736
}
],
"binding": [
{
"type": "ipv4",
"address": "127.0.0.1",
"port": 9736
}
],
"version": "0.9.0",
"blockheight": 644297,
"network": "bitcoin",
"msatoshi_fees_collected": 0,
"fees_collected_msat": "0msat",
"lightning-dir": "/media/vincent/Maxtor/C-lightning/node/bitcoin"
}
.RE
.fi
.SH AUTHOR
Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\.
.SH SEE ALSO
\fBlightning-connect\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-listconfigs\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:a086a07b8f98712ce397aae77532b5110bdc8746c65f603966c9f0619990c94d

130
doc/lightning-getlog.7 generated
View File

@ -1,130 +0,0 @@
.TH "LIGHTNING-GETLOG" "7" "" "" "lightning-getlog"
.SH NAME
lightning-getlog - Command to show logs\.
.SH SYNOPSIS
\fBgetlog\fR [\fIlevel\fR]
.SH DESCRIPTION
The \fBgetlog\fR the RPC command to show logs, with optional log \fIlevel\fR\.
.RS
.IP \[bu]
\fIlevel\fR: A string that represents the log level (\fIbroken\fR, \fIunusual\fR, \fIinfo\fR, \fIdebug\fR, or \fIio\fR)\. The default is \fIinfo\fR\.
.RE
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "getlog",
"params": {
"level": "debug"
}
}
.RE
.fi
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBcreated_at\fR (string): UNIX timestamp with 9 decimal places, when logging was initialized
.IP \[bu]
\fBbytes_used\fR (u32): The number of bytes used by logging records
.IP \[bu]
\fBbytes_max\fR (u32): The bytes_used values at which records will be trimmed
.IP \[bu]
\fBlog\fR (array of objects):
.RS
.IP \[bu]
\fBtype\fR (string) (one of "SKIPPED", "BROKEN", "UNUSUAL", "INFO", "DEBUG", "IO_IN", "IO_OUT")
.RE
If \fBtype\fR is "SKIPPED":
.RS
.IP \[bu]
\fBnum_skipped\fR (u32): number of unprinted log entries (deleted or below \fIlevel\fR parameter)
.RE
If \fBtype\fR is "BROKEN", "UNUSUAL", "INFO" or "DEBUG":
.RS
.IP \[bu]
\fBtime\fR (string): UNIX timestamp with 9 decimal places after \fBcreated_at\fR
.IP \[bu]
\fBsource\fR (string): The particular logbook this was found in
.IP \[bu]
\fBlog\fR (string): The actual log message
.IP \[bu]
\fBnode_id\fR (pubkey, optional): The peer this is associated with
.RE
If \fBtype\fR is "IO_IN" or "IO_OUT":
.RS
.IP \[bu]
\fBtime\fR (string): Seconds after \fBcreated_at\fR, with 9 decimal places
.IP \[bu]
\fBsource\fR (string): The particular logbook this was found in
.IP \[bu]
\fBlog\fR (string): The associated log message
.IP \[bu]
\fBdata\fR (hex): The IO which occurred
.IP \[bu]
\fBnode_id\fR (pubkey, optional): The peer this is associated with
.RE
.RE
On failure, one of the following error codes may be returned:
.RS
.IP \[bu]
-32602: Error in given parameters\.
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"created_at": "1598192543.820753463",
"bytes_used": 89285843,
"bytes_max": 104857600,
"log": [
{
"type": "SKIPPED",
"num_skipped": 45
},
{
"type": "INFO",
"time": "0.453627568",
"source": "plugin-autopilot.py",
"log": "RPC method 'autopilot-run-once' does not have a docstring."
}
]
}
.RE
.fi
.SH AUTHOR
Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:d32e85e5edbf39507b876a3e44c81e2e097d6926df6c45e0ec9c75d998e80818

150
doc/lightning-getroute.7 generated
View File

@ -1,150 +0,0 @@
.TH "LIGHTNING-GETROUTE" "7" "" "" "lightning-getroute"
.SH NAME
lightning-getroute - Command for routing a payment (low-level)
.SH SYNOPSIS
\fBgetroute\fR \fIid\fR \fImsatoshi\fR \fIriskfactor\fR [\fIcltv\fR] [\fIfromid\fR]
[\fIfuzzpercent\fR] [\fIexclude\fR] [\fImaxhops\fR]
.SH DESCRIPTION
The \fBgetroute\fR RPC command attempts to find the best route for the
payment of \fImsatoshi\fR to lightning node \fIid\fR, such that the payment will
arrive at \fIid\fR with \fIcltv\fR-blocks to spare (default 9)\.
\fImsatoshi\fR is in millisatoshi precision; it can be a whole number, or a
whole number ending in \fImsat\fR or \fIsat\fR, or a number with three decimal
places ending in \fIsat\fR, or a number with 1 to 11 decimal places ending
in \fIbtc\fR\.
There are two considerations for how good a route is: how low the fees
are, and how long your payment will get stuck in a delayed output if a
node goes down during the process\. The \fIriskfactor\fR non-negative
floating-point field controls this tradeoff; it is the annual cost of
your funds being stuck (as a percentage)\.
For example, if you thought the convenience of keeping your funds liquid
(not stuck) was worth 20% per annum interest, \fIriskfactor\fR would be 20\.
If you didnt care about risk, \fIriskfactor\fR would be zero\.
\fIfromid\fR is the node to start the route from: default is this node\.
The \fIfuzzpercent\fR is a non-negative floating-point number, representing a
percentage of the actual fee\. The \fIfuzzpercent\fR is used to distort
computed fees along each channel, to provide some randomization to the
route generated\. 0\.0 means the exact fee of that channel is used, while
100\.0 means the fee used might be from 0 to twice the actual fee\. The
default is 5\.0, or up to 5% fee distortion\.
\fIexclude\fR is a JSON array of short-channel-id/direction (e\.g\. [
"564334x877x1/0", "564195x1292x0/1" ]) or node-id which should be excluded
from consideration for routing\. The default is not to exclude any channels
or nodes\. Note if the source or destination is excluded, the command result
is undefined\.
\fImaxhops\fR is the maximum number of channels to return; default is 20\.
.SH RISKFACTOR EFFECT ON ROUTING
The risk factor is treated as if it were an additional fee on the route,
for the purposes of comparing routes\.
The formula used is the following approximation:
.nf
.RS
risk-fee = amount x blocks-timeout x per-block-cost
.RE
.fi
We are given a \fIriskfactor\fR expressed as a percentage\. There are 52596
blocks per year, thus \fIper-block-cost\fR is \fIriskfactor\fR divided by
5,259,600\.
The final result is:
.nf
.RS
risk-fee = amount x blocks-timeout x riskfactor / 5259600
.RE
.fi
Here are the risk fees in millisatoshis, using various parameters\. I
assume a channel charges the default of 1000 millisatoshis plus 1
part-per-million\. Common to_self_delay values on the network at 14 and
144 blocks\.
.SH RECOMMENDED RISKFACTOR VALUES
The default \fIfuzz\fR factor is 5%, so as you can see from the table above,
that tends to overwhelm the effect of \fIriskfactor\fR less than about 5\.
1 is a conservative value for a stable lightning network with very few
failures\.
1000 is an aggressive value for trying to minimize timeouts at all
costs\.
The default for \fBlightning-pay\fR(7) is 10, which starts to become a major
factor for larger amounts, and is basically ignored for tiny ones\.
.SH RETURN VALUE
On success, an object containing \fBroute\fR is returned\. It is an array of objects, where each object contains:
.RS
.IP \[bu]
\fBid\fR (pubkey): The node at the end of this hop
.IP \[bu]
\fBchannel\fR (short_channel_id): The channel joining these nodes
.IP \[bu]
\fBdirection\fR (u32): 0 if this channel is traversed from lesser to greater \fBid\fR, otherwise 1
.IP \[bu]
\fBamount_msat\fR (msat): The amount expected by the node at the end of this hop
.IP \[bu]
\fBdelay\fR (u32): The total CLTV expected by the node at the end of this hop
.IP \[bu]
\fBstyle\fR (string): The features understood by the destination node (one of "legacy", "tlv")
.RE
The final \fIid\fR will be the destination \fIid\fR given in the input\. The
difference between the first \fImsatoshi\fR minus the \fImsatoshi\fR given in
the input is the fee (assuming the first hop is free)\. The first
\fIdelay\fR is the very worst case timeout for the payment failure, in
blocks\.
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-pay\fR(7), \fBlightning-sendpay\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:fc6982d81943e6d235a9cfd1584573e3dd4e4da369ffc9da8e3c5fc2e3726370

View File

@ -1,97 +0,0 @@
.TH "LIGHTNING-GETSHAREDSECRET" "7" "" "" "lightning-getsharedsecret"
.SH NAME
lightning-getsharedsecret - Command for computing an ECDH
.SH SYNOPSIS
\fBgetsharedsecret\fR \fIpoint\fR
.SH DESCRIPTION
The \fBgetsharedsecret\fR RPC command computes a shared secret from a
given public \fIpoint\fR, and the secret key of this node\.
The \fIpoint\fR is a hexadecimal string of the compressed public
key DER-encoding of the SECP256K1 point\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBshared_secret\fR (hex): the SHA-2 of the compressed encoding of the shared secp256k1 point (always 64 characters)
.RE
This command may fail if communications with the HSM has a
problem;
by default lightningd uses a software "HSM" which should
never fail in this way\.
(As of the time of this writing there is no true hardware
HSM that lightningd can use, but we are leaving this
possibilty open in the future\.)
In that case, it will return with an error code of 800\.
.SH CRYPTOGRAPHIC STANDARDS
This serves as a key agreement scheme in elliptic-curve based
cryptographic standards\.
However, note that most key agreement schemes based on
Elliptic-Curve Diffie-Hellman do not hash the DER-compressed
point\.
Standards like SECG SEC-1 ECIES specify using the X coordinate
of the point instead\.
The Lightning BOLT standard (which \fBlightningd\fR uses), unlike
most other cryptographic standards, specifies the SHA-256 hash
of the DER-compressed encoding of the point\.
It is not possible to extract the X coordinate of the ECDH point
via this API, since there is no known way to reverse the 256-bit
SHA-2 hash function\.
Thus there is no way to implement ECIES and similar standards using
this API\.
If you know the secret key behind \fIpoint\fR, you do not need to
even call \fBgetsharedsecret\fR, you can just multiply the secret key
with the node public key\.
Typically, a sender will generate an ephemeral secret key
and multiply it with the node public key,
then use the result to derive an encryption key
for a symmetric encryption scheme
to encrypt a message that can be read only by that node\.
Then the ephemeral secret key is multiplied
by the standard generator point,
and the ephemeral public key and the encrypted message is
sent to the node,
which then uses \fBgetsharedsecret\fR to derive the same key\.
The above sketch elides important details like
key derivation function, stream encryption scheme,
message authentication code, and so on\.
You should follow an established standard and avoid
rolling your own crypto\.
.SH AUTHOR
ZmnSCPxj \fI<ZmnSCPxj@protonmail.com\fR> is mainly responsible\.
.SH SEE ALSO
.SH RESOURCES
.RS
.IP \[bu]
BOLT 4: \fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/04-onion-routing.md#shared-secret\fR
.IP \[bu]
BOLT 8: \fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/08-transport.md#handshake-state\fR
.IP \[bu]
SECG SEC-1 ECIES: \fIhttps://secg.org/sec1-v2.pdf\fR
.IP \[bu]
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
.RE
\" SHA256STAMP:cff207f06144d00f76e494f84357e8d25609437376403656d6f61e64d49d9da1

81
doc/lightning-help.7 generated
View File

@ -1,81 +0,0 @@
.TH "LIGHTNING-HELP" "7" "" "" "lightning-help"
.SH NAME
lightning-help - Command to return all information about RPC commands\.
.SH SYNOPSIS
\fBhelp\fR [\fIcommand\\\fR]
.SH DESCRIPTION
The \fBhelp\fR is a RPC command which is possible consult all information about the RPC commands, or a specific command if \fIcommand\fR is given\.
Note that the \fBlightning-cli\fR(1) tool will prefer to list a man page when a
specific \fIcommand\fR is specified, and will only return the JSON if the man
page is not found\.
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "help",
"params": {}
}
.RE
.fi
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBhelp\fR (array of objects):
.RS
.IP \[bu]
\fBcommand\fR (string): the command
.IP \[bu]
\fBcategory\fR (string): the category for this command (useful for grouping)
.IP \[bu]
\fBdescription\fR (string): a one-line description of the purpose of this command
.IP \[bu]
\fBverbose\fR (string): a full description of this command (including whether it's deprecated)
.RE
.RE
On failure, one of the following error codes may be returned:
.RS
.IP \[bu]
-32602: Error in given parameters\.
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"help": [
{
"command": "autocleaninvoice [cycle_seconds] [expired_by]",
"category": "plugin",
"description": "Set up autoclean of expired invoices. ",
"verbose": "Perform cleanup every {cycle_seconds} (default 3600), or disable autoclean if 0. Clean up expired invoices that have expired for {expired_by} seconds (default 86400). "
}
]
}
.RE
.fi
.SH AUTHOR
Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:66482cf0107b1ccf2a8b673653c01421fde72933c05c2c095a26d8491d251c9a

View File

@ -1,94 +0,0 @@
.TH "LIGHTNING-HSMTOOL" "8" "" "" "lightning-hsmtool"
.SH NAME
lightning-hsmtool - Tool for working with software HSM secrets of lightningd
.SH SYNOPSIS
.nf
.RS
lightning-hsmtool method [ARGUMENTS]...
.RE
.fi
.SH DESCRIPTION
\fBlightning-hsmtool\fR performs various operations on the \fBhsm_secret\fR
file used by the software HSM component of \fBlightningd\fR\.
This can be used to encrypt and decrypt the \fBhsm_secret\fR file,
as well as derive secrets used in channel commitments\.
.SH METHODS
\fBencrypt\fR \fIhsm_secret\fR \fIpassword\fR
Encrypt the \fBhsm_secret\fR file so that it can only be decrypted at
\fBlightningd\fR startup\.
You must give the option \fB--encrypted-hsm\fR to \fBlightningd\fR\.
The password of the \fBhsm_secret\fR file will be asked whenever you
start \fBlightningd\fR\.
\fBdecrypt\fR \fIhsm_secret\fR \fIpassword\fR
Decrypt the \fBhsm_secret\fR file that was encrypted with the \fBencrypt\fR
method\.
\fBdumpcommitments\fR \fInode_id\fR \fIchannel_dbid\fR \fIdepth\fR \fIhsm_secret\fR [\fIpassword\fR]
Show the per-commitment secret and point of up to \fIdepth\fR commitments,
of the specified channel with the specified peer,
identified by the channel database index\.
Specify \fIpassword\fR if the \fBhsm_secret\fR is encrypted\.
\fBguesstoremote\fR \fIp2wpkh\fR \fInode_id\fR \fImax_channel_dbid\fR \fIhsm_secret\fR [\fIpassword\fR]
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 \fBhsm_secret\fR\.
The peer must be the one to close the channel (and the funds will remain
unrecoverable until the channel is closed)\.
\fImax_channel_dbid\fR is your own guess on what the \fIchannel_dbid\fR was,
or at least the maximum possible value,
and is usually no greater than the number of channels that the node has
ever had\.
Specify \fIpassword\fR if the \fBhsm_secret\fR is encrypted\.
\fBgeneratehsm\fR \fIhsm_secret_path\fR
Generates a new hsm_secret using BIP39\.
\fBdumponchaindescriptors\fR \fIhsm_secret\fR [\fIpassword\fR] [\fInetwork\fR]
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 \fBbitcoind\fR using the
\fBimportmulti\fR or \fBimportdescriptors\fR RPC calls)
We need the path to the hsm_secret containing the wallet seed, and an optional
(skip using \fB""\fR) password if it was encrypted\.
To generate descriptors using testnet master keys, you may specify \fItestnet\fR as
the last parameter\. By default, mainnet-encoded keys are generated\.
.SH BUGS
You should report bugs on our github issues page, and maybe submit a fix
to gain our eternal gratitude!
.SH AUTHOR
ZmnSCPxj \fI<ZmnSCPxj@protonmail.com\fR> wrote the initial version of
this man page, but many others did the hard work of actually implementing
\fBlightning-hsmtool\fR\.
.SH SEE ALSO
\fBlightningd\fR(8), \fBlightningd-config\fR(5)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
.SH COPYING
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\.
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:9ad3f88c51e3f16d60f936ee5e3be847769767ad0da5244094bd089b9f9bfdd7

141
doc/lightning-invoice.7 generated
View File

@ -1,141 +0,0 @@
.TH "LIGHTNING-INVOICE" "7" "" "" "lightning-invoice"
.SH NAME
lightning-invoice - Command for accepting payments
.SH SYNOPSIS
\fBinvoice\fR \fImsatoshi\fR \fIlabel\fR \fIdescription\fR [\fIexpiry\fR]
[\fIfallbacks\fR] [\fIpreimage\fR] [\fIexposeprivatechannels\fR] [\fIcltv\fR]
.SH DESCRIPTION
The \fBinvoice\fR RPC command creates the expectation of a payment of a
given amount of milli-satoshi: it returns a unique token which another
lightning daemon can use to pay this invoice\. This token includes a
\fIroute hint\fR description of an incoming channel with capacity to pay the
invoice, if any exists\.
The \fImsatoshi\fR 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 \fImsat\fR or \fIsat\fR, or a number with three decimal places ending
in \fIsat\fR, or a number with 1 to 11 decimal places ending in \fIbtc\fR\.
The \fIlabel\fR 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 \fIdescription\fR is a short description of purpose of payment, e\.g\. \fI1
cup of coffee\fR\. This value is encoded into the BOLT11 invoice and is
viewable by any node you send this invoice to\. It must be UTF-8, and
cannot use \fI\u\fR JSON escape codes\.
The \fIexpiry\fR is optionally the time the invoice is valid for; without a
suffix it is interpreted as seconds, otherwise suffixes \fIs\fR, \fIm\fR, \fIh\fR,
\fId\fR, \fIw\fR indicate seconds, minutes, hours, days and weeks respectively\.
If no value is provided the default of 604800 (1w) is used\.
The \fIfallbacks\fR 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 \fIpreimage\fR 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\. \fBIMPORTANT\fR: if you specify the
\fIpreimage\fR, 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, \fIexposeprivatechannels\fR overrides the default route hint
logic, which will use unpublished channels only if there are no
published channels\. If \fItrue\fR unpublished channels are always considered
as a route hint candidate; if \fIfalse\fR, never\. If it is a short channel id
(e\.g\. \fI1x1x3\fR) or array of short channel ids, 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:
peers balance minus their reserves is at least \fImsatoshi\fR, 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, \fIcltv\fR sets the \fImin_final_cltv_expiry\fR for the invoice\.
Otherwise, it's set to the parameter \fBcltv-final\fR\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBbolt11\fR (string): the bolt11 string
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
.IP \[bu]
\fBpayment_secret\fR (hex): the \fIpayment_secret\fR to place in the onion (always 64 characters)
.IP \[bu]
\fBexpires_at\fR (u64): UNIX timestamp of when invoice expires
.RE
The following warnings may also be returned:
.RS
.IP \[bu]
\fBwarning_capacity\fR: even using all possible channels, there's not enough incoming capacity to pay this invoice\.
.IP \[bu]
\fBwarning_offline\fR: there would be enough incoming capacity, but some channels are offline, so there isn't\.
.IP \[bu]
\fBwarning_deadends\fR: there would be enough incoming capacity, but some channels are dead-ends (no other public channels from those peers), so there isn't\.
.IP \[bu]
\fBwarning_private_unused\fR: there would be enough incoming capacity, but some channels are unannounced and \fIexposeprivatechannels\fR is \fIfalse\fR, so there isn't\.
.IP \[bu]
\fBwarning_mpp\fR: there is sufficient capacity, but not in a single channel, so the payer will have to use multi-part payments\.
.RE
On failure, an error is returned and no invoice is created\. If the
lightning process fails before responding, the caller should use
\fBlightning-listinvoices\fR(7) to query whether this invoice was created or
not\.
The following error codes may occur:
.RS
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
900: An invoice with the given \fIlabel\fR already exists\.
.IP \[bu]
901: An invoice with the given \fIpreimage\fR already exists\.
.IP \[bu]
902: None of the specified \fIexposeprivatechannels\fR were usable\.
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-listinvoices\fR(7), \fBlightning-delinvoice\fR(7), \fBlightning-pay\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:d88271f45513d2811f76d476cc94b3354f3d307448913762eee3069120444793

152
doc/lightning-keysend.7 generated
View File

@ -1,152 +0,0 @@
.TH "LIGHTNING-KEYSEND" "7" "" "" "lightning-keysend"
.SH NAME
lightning-keysend - Send funds to a node without an invoice
.SH SYNOPSIS
\fBkeysend\fR \fIdestination\fR \fImsatoshi\fR [\fIlabel\fR] [\fImaxfeepercent\fR] [\fIretry_for\fR] [\fImaxdelay\fR] [\fIexemptfee\fR]
.SH DESCRIPTION
The \fBkeysend\fR RPC command attempts to find a route to the given destination,
and send the specified amount to it\. Unlike the \fBpay\fR RPC command the
\fBkeysend\fR command does not require an invoice, instead it uses the
\fBdestination\fR node ID, and \fBamount\fR to find a route to the specified node\.
In order for the destination to be able to claim the payment, the
\fBpayment_key\fR is randomly generated by the sender and included in the
encrypted payload for the destination\. As a consequence there is not
proof-of-payment, like there is with an invoice where the \fBpayment_key\fR is
generated on the destination, and the only way sender could have it is by
sending a payment\. Please ensure that this matches your use-case when using
\fBkeysend\fR\.
\fBdestination\fR is the 33 byte, hex-encoded, node ID of the node that the payment should go to\.
\fBmsatoshi\fR is in millisatoshi precision; it can be a whole number, or a whole number with suffix \fBmsat\fR or \fBsat\fR, or a three decimal point number with suffix \fBsat\fR, or an 1 to 11 decimal point number suffixed by \fBbtc\fR\.
The \fBlabel\fR field is used to attach a label to payments, and is returned in \fBlightning-listpays\fR(7) and \fBlightning-listsendpays\fR(7)\.
The \fBmaxfeepercent\fR limits the money paid in fees as percentage of the total amount that is to be transferred, and defaults to \fI0\.5\fR\.
The \fBexemptfee\fR option can be used for tiny payments which would be dominated by the fee leveraged by forwarding nodes\.
Setting \fBexemptfee\fR allows the \fBmaxfeepercent\fR check to be skipped on fees that are smaller than \fIexemptfee\fR (default: 5000 millisatoshi)\.
The response will occur when the payment fails or succeeds\.
Unlike \fBlightning-pay\fR(7), issuing the same \fBkeysend\fR commands multiple times will result in multiple payments being sent\.
Until \fIretry_for\fR seconds passes (default: 60), the command will keep finding routes and retrying the payment\.
However, a payment may be delayed for up to \fBmaxdelay\fR blocks by another node; clients should be prepared for this worst case\.
When using \fIlightning-cli\fR, you may skip optional parameters by using
\fInull\fR\. Alternatively, use \fB-k\fR option to provide parameters by name\.
.SH RANDOMIZATION
To protect user privacy, the payment algorithm performs some randomization\.
1: Route Randomization
Route randomization means the payment algorithm does not always use the
lowest-fee or shortest route\. This prevents some highly-connected node
from learning all of the user payments by reducing their fees below the
network average\.
2: Shadow Route
Shadow route means the payment algorithm will virtually extend the route
by adding delays and fees along it, making it appear to intermediate nodes
that the route is longer than it actually is\. This prevents intermediate
nodes from reliably guessing their distance from the payee\.
Route randomization will never exceed \fImaxfeepercent\fR of the payment\.
Route randomization and shadow routing will not take routes that would
exceed \fImaxdelay\fR\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBpayment_preimage\fR (hex): the proof of payment: SHA256 of this \fBpayment_hash\fR (always 64 characters)
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
.IP \[bu]
\fBcreated_at\fR (number): the UNIX timestamp showing when this payment was initiated
.IP \[bu]
\fBparts\fR (u32): how many attempts this took
.IP \[bu]
\fBamount_msat\fR (msat): Amount the recipient received
.IP \[bu]
\fBamount_sent_msat\fR (msat): Total amount we sent (including fees)
.IP \[bu]
\fBstatus\fR (string): status of payment (always "complete")
.IP \[bu]
\fBdestination\fR (pubkey, optional): the final destination of the payment
.RE
The following warnings may also be returned:
.RS
.IP \[bu]
\fBwarning_partial_completion\fR: Not all parts of a multi-part payment have completed
.RE
You can monitor the progress and retries of a payment using the \fBlightning-paystatus\fR(7) command\.
The following error codes may occur:
.RS
.IP \[bu]
\fB-1\fR: Catchall nonspecific error\.
.IP \[bu]
\fB203\fR: Permanent failure at destination\. The \fIdata\fR field of the error will be routing failure object\.
.IP \[bu]
\fB205\fR: Unable to find a route\.
.IP \[bu]
\fB206\fR: Route too expensive\. Either the fee or the needed total locktime for the route exceeds your \fImaxfeepercent\fR or \fImaxdelay\fR settings, respectively\. The \fIdata\fR field of the error will indicate the actual \fIfee\fR as well as the \fIfeepercent\fR percentage that the fee has of the destination payment amount\. It will also indicate the actual \fIdelay\fR along the route\.
.IP \[bu]
\fB210\fR: Payment timed out without a payment in progress\.
.RE
A routing failure object has the fields below:
.RS
.IP \[bu]
\fBerring_index\fR: The index of the node along the route that reported the error\. 0 for the local node, 1 for the first hop, and so on\.
.IP \[bu]
\fBerring_node\fR: The hex string of the pubkey id of the node that reported the error\.
.IP \[bu]
\fBerring_channel\fR: The short channel ID of the channel that has the error, or \fI0:0:0\fR if the destination node raised the error\.
.IP \[bu]
\fBfailcode\fR: The failure code, as per BOLT #4\.
.IP \[bu]
\fBchannel_update\fR\. The hex string of the \fIchannel_update\fR message received from the remote node\. Only present if error is from the remote node and the \fIfailcode\fR has the \fBUPDATE\fR bit set, as per BOLT #4\.
.RE
.SH AUTHOR
Christian Decker \fI<decker@blockstream.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-listpays\fR(7), \fBlightning-decodepay\fR(7), \fBlightning-listinvoice\fR(7),
\fBlightning-delinvoice\fR(7), \fBlightning-getroute\fR(7), \fBlightning-invoice\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:04c660a720d5ee16a0385a351eb1a8f8d6c7a5540e00e2e204c07573b7fff7bc

View File

@ -1,101 +0,0 @@
.TH "LIGHTNING-LISTCHANNELS" "7" "" "" "lightning-listchannels"
.SH NAME
lightning-listchannels - Command to query active lightning channels in the entire network
.SH SYNOPSIS
\fBlistchannels\fR [\fIshort_channel_id\fR] [\fIsource\fR] [\fIdestination\fR]
.SH DESCRIPTION
The \fBlistchannels\fR RPC command returns data on channels that are known
to the node\. Because channels may be bidirectional, up to 2 objects will
be returned for each channel (one for each direction)\.
If \fIshort_channel_id\fR is a short channel id, then only known channels with a
matching \fIshort_channel_id\fR are returned\. Otherwise, it must be null\.
If \fIsource\fR is a node id, then only channels leading from that node id
are returned\.
If \fIdestination\fR is a node id, then only channels leading to that node id
are returned\.
Only one of \fIshort_channgel_id\fR, \fIsource\fR or \fIdestination\fR can be supplied\.
If nothing is supplied, data on all lightning channels known to this
node, are returned\. These can be local channels or public channels
broadcast on the gossip network\.
.SH RETURN VALUE
On success, an object containing \fBchannels\fR is returned\. It is an array of objects, where each object contains:
.RS
.IP \[bu]
\fBsource\fR (pubkey): the source node
.IP \[bu]
\fBdestination\fR (pubkey): the destination node
.IP \[bu]
\fBpublic\fR (boolean): true if this is announced (otherwise it must be our channel)
.IP \[bu]
\fBamount_msat\fR (msat): the total capacity of this channel (always a whole number of satoshis)
.IP \[bu]
\fBmessage_flags\fR (u8): as defined by BOLT #7
.IP \[bu]
\fBchannel_flags\fR (u8): as defined by BOLT #7
.IP \[bu]
\fBactive\fR (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
.IP \[bu]
\fBlast_update\fR (u32): UNIX timestamp on the last channel_update from \fIsource\fR
.IP \[bu]
\fBbase_fee_millisatoshi\fR (u32): Base fee changed by \fIsource\fR to use this channel
.IP \[bu]
\fBfee_per_millionth\fR (u32): Proportional fee changed by \fIsource\fR to use this channel, in parts-per-million
.IP \[bu]
\fBdelay\fR (u32): The number of blocks delay required by \fIsource\fR to use this channel
.IP \[bu]
\fBhtlc_minimum_msat\fR (msat): The smallest payment \fIsource\fR will allow via this channel
.IP \[bu]
\fBfeatures\fR (hex): BOLT #9 features bitmap for this channel
.IP \[bu]
\fBhtlc_maximum_msat\fR (msat, optional): The largest payment \fIsource\fR will allow via this channel
.RE
If one of \fIshort_channel_id\fR, \fIsource\fR or \fIdestination\fR is supplied and no
matching channels are found, a "channels" object with an empty list is returned\.
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
with \fBcode\fR being one of the following:
.RS
.IP \[bu]
-32602: If the given parameters are wrong\.
.RE
.SH AUTHOR
Michael Hawkins \fI<michael.hawkins@protonmail.com\fR>\.
.SH SEE ALSO
\fBlightning-fundchannel\fR(7), \fBlightning-listnodes\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
Lightning RFC site
.RS
.IP \[bu]
BOLT #7:
\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md\fR
.RE
\" SHA256STAMP:bf737cfe3773d3482b4d8fb9b3a5fef2b7f43e9218fb8881aed87b6deeb14888

View File

@ -1,273 +0,0 @@
.TH "LIGHTNING-LISTCONFIGS" "7" "" "" "lightning-listconfigs"
.SH NAME
lightning-listconfigs - Command to list all configuration options\.
.SH SYNOPSIS
\fBlistconfigs\fR [config]
.SH DESCRIPTION
The \fBlistconfigs\fR RPC command to list all configuration options, or with \fIconfig\fR, just that one\.
The returned values reflect the current configuration, including
showing default values (\fBdev-\fR options are not shown)\.
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "listconfigs",
"params": {
"config": "network"
}
}
.RE
.fi
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fB# version\fR (string, optional): Special field indicating the current version
.IP \[bu]
\fBplugins\fR (array of objects, optional):
.RS
.IP \[bu]
\fBpath\fR (string): Full path of the plugin
.IP \[bu]
\fBname\fR (string): short name of the plugin
.IP \[bu]
\fBoptions\fR (object, optional): Specific options set for this plugin:
.RE
.IP \[bu]
\fBimportant-plugins\fR (array of objects, optional):
.RS
.IP \[bu]
\fBpath\fR (string): Full path of the plugin
.IP \[bu]
\fBname\fR (string): short name of the plugin
.IP \[bu]
\fBoptions\fR (object, optional): Specific options set for this plugin:
.RE
.IP \[bu]
\fBconf\fR (string, optional): \fBconf\fR field from cmdline, or default
.IP \[bu]
\fBlightning-dir\fR (string, optional): \fBlightning-dir\fR field from config or cmdline, or default
.IP \[bu]
\fBnetwork\fR (string, optional): \fBnetwork\fR field from config or cmdline, or default
.IP \[bu]
\fBallow-deprecated-apis\fR (boolean, optional): \fBallow-deprecated-apis\fR field from config or cmdline, or default
.IP \[bu]
\fBrpc-file\fR (string, optional): \fBrpc-file\fR field from config or cmdline, or default
.IP \[bu]
\fBdisable-plugin\fR (array of strings, optional):
.RS
.IP \[bu]
\fBdisable-plugin\fR field from config or cmdline
.RE
.IP \[bu]
\fBalways-use-proxy\fR (boolean, optional): \fBalways-use-proxy\fR field from config or cmdline, or default
.IP \[bu]
\fBdaemon\fR (boolean, optional): \fBdaemon\fR field from config or cmdline, or default
.IP \[bu]
\fBwallet\fR (string, optional): \fBwallet\fR field from config or cmdline, or default
.IP \[bu]
\fBlarge-channels\fR (boolean, optional): \fBlarge-channels\fR field from config or cmdline, or default
.IP \[bu]
\fBexperimental-dual-fund\fR (boolean, optional): \fBexperimental-dual-fund\fR field from config or cmdline, or default
.IP \[bu]
\fBexperimental-onion-messages\fR (boolean, optional): \fBexperimental-onion-messages\fR field from config or cmdline, or default
.IP \[bu]
\fBexperimental-offers\fR (boolean, optional): \fBexperimental-offers\fR field from config or cmdline, or default
.IP \[bu]
\fBexperimental-shutdown-wrong-funding\fR (boolean, optional): \fBexperimental-shutdown-wrong-funding\fR field from config or cmdline, or default
.IP \[bu]
\fBrgb\fR (hex, optional): \fBrgb\fR field from config or cmdline, or default (always 6 characters)
.IP \[bu]
\fBalias\fR (string, optional): \fBalias\fR field from config or cmdline, or default
.IP \[bu]
\fBpid-file\fR (string, optional): \fBpid-file\fR field from config or cmdline, or default
.IP \[bu]
\fBignore-fee-limits\fR (boolean, optional): \fBignore-fee-limits\fR field from config or cmdline, or default
.IP \[bu]
\fBwatchtime-blocks\fR (u32, optional): \fBwatchtime-blocks\fR field from config or cmdline, or default
.IP \[bu]
\fBmax-locktime-blocks\fR (u32, optional): \fBmax-locktime-blocks\fR field from config or cmdline, or default
.IP \[bu]
\fBfunding-confirms\fR (u32, optional): \fBfunding-confirms\fR field from config or cmdline, or default
.IP \[bu]
\fBcltv-delta\fR (u32, optional): \fBcltv-delta\fR field from config or cmdline, or default
.IP \[bu]
\fBcltv-final\fR (u32, optional): \fBcltv-final\fR field from config or cmdline, or default
.IP \[bu]
\fBcommit-time\fR (u32, optional): \fBcommit-time\fR field from config or cmdline, or default
.IP \[bu]
\fBfee-base\fR (u32, optional): \fBfee-base\fR field from config or cmdline, or default
.IP \[bu]
\fBrescan\fR (integer, optional): \fBrescan\fR field from config or cmdline, or default
.IP \[bu]
\fBfee-per-satoshi\fR (u32, optional): \fBfee-per-satoshi\fR field from config or cmdline, or default
.IP \[bu]
\fBmax-concurrent-htlcs\fR (u32, optional): \fBmax-concurrent-htlcs\fR field from config or cmdline, or default
.IP \[bu]
\fBmin-capacity-sat\fR (u64, optional): \fBmin-capacity-sat\fR field from config or cmdline, or default
.IP \[bu]
\fBaddr\fR (string, optional): \fBaddr\fR field from config or cmdline (can be more than one)
.IP \[bu]
\fBannounce-addr\fR (string, optional): \fBannounce-addr\fR field from config or cmdline (can be more than one)
.IP \[bu]
\fBbind-addr\fR (string, optional): \fBbind-addr\fR field from config or cmdline (can be more than one)
.IP \[bu]
\fBoffline\fR (boolean, optional): \fBtrue\fR if \fBoffline\fR was set in config or cmdline
.IP \[bu]
\fBautolisten\fR (boolean, optional): \fBautolisten\fR field from config or cmdline, or default
.IP \[bu]
\fBproxy\fR (string, optional): \fBproxy\fR field from config or cmdline, or default
.IP \[bu]
\fBdisable-dns\fR (boolean, optional): \fBtrue\fR if \fBdisable-dns\fR was set in config or cmdline
.IP \[bu]
\fBencrypted-hsm\fR (boolean, optional): \fBtrue\fR if \fBencrypted-hsm\fR was set in config or cmdline
.IP \[bu]
\fBrpc-file-mode\fR (string, optional): \fBrpc-file-mode\fR field from config or cmdline, or default
.IP \[bu]
\fBlog-level\fR (string, optional): \fBlog-level\fR field from config or cmdline, or default
.IP \[bu]
\fBlog-prefix\fR (string, optional): \fBlog-prefix\fR field from config or cmdline, or default
.IP \[bu]
\fBlog-file\fR (string, optional): \fBlog-file\fR field from config or cmdline, or default
.IP \[bu]
\fBlog-timestamps\fR (boolean, optional): \fBlog-timestamps\fR field from config or cmdline, or default
.IP \[bu]
\fBforce-feerates\fR (string, optional): force-feerate configuration setting, if any
.IP \[bu]
\fBsubdaemon\fR (string, optional): \fBsubdaemon\fR fields from config or cmdline if any (can be more than one)
.IP \[bu]
\fBtor-service-password\fR (string, optional): \fBtor-service-password\fR field from config or cmdline, if any
.RE
On failure, one of the following error codes may be returned:
.RS
.IP \[bu]
-32602: Error in given parameters or field with \fIconfig\fR name doesn't exist\.
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"# version": "v0.9.0-1",
"lightning-dir": "/media/vincent/Maxtor/sanboxTestWrapperRPC/lightning_dir_dev",
"network": "testnet",
"allow-deprecated-apis": true,
"rpc-file": "lightning-rpc",
"plugins": [
{
"path": "/home/vincent/Github/plugins/sauron/sauron.py",
"name": "sauron.py",
"options": {
"sauron-api-endpoint": "http://blockstream.info/testnet/api/",
"sauron-tor-proxy": ""
}
},
{
"path": "/home/vincent/Github/reckless/reckless.py",
"name": "reckless.py"
}
],
"important-plugins": [
{
"path": "/home/vincent/Github/lightning/lightningd/../plugins/autoclean",
"name": "autoclean",
"options": {
"autocleaninvoice-cycle": null,
"autocleaninvoice-expired-by": null
}
},
{
"path": "/home/vincent/Github/lightning/lightningd/../plugins/fundchannel",
"name": "fundchannel"
},
{
"path": "/home/vincent/Github/lightning/lightningd/../plugins/keysend",
"name": "keysend"
},
{
"path": "/home/vincent/Github/lightning/lightningd/../plugins/pay",
"name": "pay",
"options": {
"disable-mpp": false
}
}
],
"important-plugin": "/home/vincent/Github/lightning/lightningd/../plugins/autoclean",
"important-plugin": "/home/vincent/Github/lightning/lightningd/../plugins/fundchannel",
"important-plugin": "/home/vincent/Github/lightning/lightningd/../plugins/keysend",
"important-plugin": "/home/vincent/Github/lightning/lightningd/../plugins/pay",
"plugin": "/home/vincent/Github/plugins/sauron/sauron.py",
"plugin": "/home/vincent/Github/reckless/reckless.py",
"disable-plugin": [
"bcli"
],
"always-use-proxy": false,
"daemon": "false",
"wallet": "sqlite3:///media/vincent/Maxtor/sanboxTestWrapperRPC/lightning_dir_dev/testnet/lightningd.sqlite3",
"wumbo": false,
"wumbo": false,
"rgb": "03ad98",
"alias": "BRUCEWAYN-TES-DEV",
"pid-file": "/media/vincent/Maxtor/sanboxTestWrapperRPC/lightning_dir_dev/lightningd-testne...",
"ignore-fee-limits": true,
"watchtime-blocks": 6,
"max-locktime-blocks": 2016,
"funding-confirms": 1,
"commit-fee-min": 0,
"commit-fee-max": 0,
"cltv-delta": 6,
"cltv-final": 10,
"commit-time": 10,
"fee-base": 1,
"rescan": 30,
"fee-per-satoshi": 10,
"max-concurrent-htlcs": 483,
"min-capacity-sat": 10000,
"addr": "autotor:127.0.0.1:9051",
"bind-addr": "127.0.0.1:9735",
"announce-addr": "fp463inc4w3lamhhduytrwdwq6q6uzugtaeapylqfc43agrdnnqsheyd.onion:9735",
"offline": "false",
"autolisten": true,
"proxy": "127.0.0.1:9050",
"disable-dns": "false",
"enable-autotor-v2-mode": "false",
"encrypted-hsm": false,
"rpc-file-mode": "0600",
"log-level": "DEBUG",
"log-prefix": "lightningd",
}
.RE
.fi
.SH AUTHOR
Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\.
.SH SEE ALSO
\fBlightning-getinfo\fR(7), \fBlightningd-config\fR(5)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:b6e48314de5642ec61a3e2c989ac0197630c2a3c0e8e6d86020b597679049400

View File

@ -1,58 +0,0 @@
.TH "LIGHTNING-LISTDATASTORE" "7" "" "" "lightning-listdatastore"
.SH NAME
lightning-listdatastore - Command for listing (plugin) data
.SH SYNOPSIS
\fBlistdatastore\fR [\fIkey\fR]
.SH DESCRIPTION
The \fBlistdatastore\fR RPC command allows plugins to fetch data which was
stored in the c-lightning database\.
All immediate children of the \fIkey\fR (or root children) are returned:
a \fIkey\fR with children won't have a \fIhex\fR or \fIgeneration\fR entry\.
.SH RETURN VALUE
On success, an object containing \fBdatastore\fR is returned\. It is an array of objects, where each object contains:
.RS
.IP \[bu]
\fBkey\fR (array of strings):
.RS
.IP \[bu]
Part of the key added to the datastore
.RE
.IP \[bu]
\fBgeneration\fR (u64, optional): The number of times this has been updated
.IP \[bu]
\fBhex\fR (hex, optional): The hex data from the datastore
.IP \[bu]
\fBstring\fR (string, optional): The data as a string, if it's valid utf-8
.RE
The following error codes may occur:
.RS
.IP \[bu]
-32602: invalid parameters\.
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-datastore\fR(7), \fBlightning-deldatastore\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:7e165fb1ff5774c381d2a05d85b51b58dc195ddfa7142928a86cb1e2b6d8f040

View File

@ -1,80 +0,0 @@
.TH "LIGHTNING-LISTFORWARDS" "7" "" "" "lightning-listforwards"
.SH NAME
lightning-listforwards - Command showing all htlcs and their information
.SH SYNOPSIS
\fBlistforwards\fR [\fIstatus\fR] [\fIin_channel\fR] [\fIout_channel\fR]
.SH DESCRIPTION
The \fBlistforwards\fR RPC command displays all htlcs that have been
attempted to be forwarded by the c-lightning node\.
If \fIstatus\fR is specified, then only the forwards with the given status are returned\.
\fIstatus\fR can be either \fIoffered\fR or \fIsettled\fR or \fIfailed\fR or \fIlocal_failed\fR
If \fIin_channel\fR or \fIout_channel\fR is specified, then only the matching forwards
on the given in/out channel are returned\.
.SH RETURN VALUE
On success, an object containing \fBforwards\fR is returned\. It is an array of objects, where each object contains:
.RS
.IP \[bu]
\fBin_channel\fR (short_channel_id): the channel that received the HTLC
.IP \[bu]
\fBin_msat\fR (msat): the value of the incoming HTLC
.IP \[bu]
\fBstatus\fR (string): still ongoing, completed, failed locally, or failed after forwarding (one of "offered", "settled", "local_failed", "failed")
.IP \[bu]
\fBreceived_time\fR (number): the UNIX timestamp when this was received
.IP \[bu]
\fBout_channel\fR (short_channel_id, optional): the channel that the HTLC was forwarded to
.IP \[bu]
\fBpayment_hash\fR (hex, optional): payment hash sought by HTLC (always 64 characters)
.RE
If \fBout_channel\fR is present:
.RS
.IP \[bu]
\fBfee_msat\fR (msat): the amount this paid in fees
.IP \[bu]
\fBout_msat\fR (msat): the amount we sent out the \fIout_channel\fR
.RE
If \fBstatus\fR is "settled" or "failed":
.RS
.IP \[bu]
\fBresolved_time\fR (number): the UNIX timestamp when this was resolved
.RE
If \fBstatus\fR is "local_failed" or "failed":
.RS
.IP \[bu]
\fBfailcode\fR (u32, optional): the numeric onion code returned
.IP \[bu]
\fBfailreason\fR (string, optional): the name of the onion code returned
.RE
.SH AUTHOR
Rene Pickhardt \fI<r.pickhardt@gmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-getinfo\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:66506c6c5ebb9628f20bb6e20d696ac8e4b650d20e48ef8626e877f8447a1544

View File

@ -1,113 +0,0 @@
.TH "LIGHTNING-LISTFUNDS" "7" "" "" "lightning-listfunds"
.SH NAME
lightning-listfunds - Command showing all funds currently managed by the c-lightning node
.SH SYNOPSIS
\fBlistfunds\fR [\fIspent\fR]
.SH DESCRIPTION
The \fBlistfunds\fR RPC command displays all funds available, either in
unspent outputs (UTXOs) in the internal wallet or funds locked in
currently open channels\.
\fIspent\fR is a boolean: if true, then the \fIoutputs\fR will include spent outputs
in addition to the unspent ones\. Default is false\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBoutputs\fR (array of objects):
.RS
.IP \[bu]
\fBtxid\fR (txid): the ID of the spendable transaction
.IP \[bu]
\fBoutput\fR (u32): the index within \fItxid\fR
.IP \[bu]
\fBamount_msat\fR (msat): the amount of the output
.IP \[bu]
\fBscriptpubkey\fR (hex): the scriptPubkey of the output
.IP \[bu]
\fBstatus\fR (string) (one of "unconfirmed", "confirmed", "spent")
.IP \[bu]
\fBaddress\fR (string, optional): the bitcoin address of the output
.IP \[bu]
\fBredeemscript\fR (hex, optional): the redeemscript, only if it's p2sh-wrapped
.RE
If \fBstatus\fR is "confirmed":
.RS
.IP \[bu]
\fBblockheight\fR (u32): Block height where it was confirmed
.RE
If \fBreserved\fR is "true":
.RS
.IP \[bu]
\fBreserved_to_block\fR (u32): Block height where reservation will expire
.RE
.IP \[bu]
\fBchannels\fR (array of objects):
.RS
.IP \[bu]
\fBpeer_id\fR (pubkey): the peer with which the channel is opened
.IP \[bu]
\fBour_amount_msat\fR (msat): available satoshis on our nodes end of the channel
.IP \[bu]
\fBamount_msat\fR (msat): total channel value
.IP \[bu]
\fBfunding_txid\fR (txid): funding transaction id
.IP \[bu]
\fBfunding_output\fR (u32): the 0-based index of the output in the funding transaction
.IP \[bu]
\fBconnected\fR (boolean): whether the channel peer is connected
.IP \[bu]
\fBstate\fR (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")
.RE
If \fBstate\fR is "CHANNELD_NORMAL":
.RS
.IP \[bu]
\fBshort_channel_id\fR (short_channel_id): short channel id of channel
.RE
If \fBstate\fR is "CHANNELD_SHUTTING_DOWN", "CLOSINGD_SIGEXCHANGE", "CLOSINGD_COMPLETE", "AWAITING_UNILATERAL", "FUNDING_SPEND_SEEN" or "ONCHAIN":
.RS
.IP \[bu]
\fBshort_channel_id\fR (short_channel_id, optional): short channel id of channel (only if funding reached lockin depth before closing)
.RE
.RE
.SH AUTHOR
Felix \fI<fixone@gmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-newaddr\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-withdraw\fR(7), \fBlightning-listtransactions\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:1f231ccc1bb70f63b8af8c80b059f5a90fec51cc5aebac69da5241ca952f3a7f

View File

@ -1,72 +0,0 @@
.TH "LIGHTNING-LISTINVOICES" "7" "" "" "lightning-listinvoices"
.SH NAME
lightning-listinvoices - Command for querying invoice status
.SH SYNOPSIS
\fBlistinvoices\fR [\fIlabel\fR] [\fIinvstring\fR] [\fIpayment_hash\fR] [\fIoffer_id\fR]
.SH DESCRIPTION
The \fBlistinvoices\fR RPC command gets the status of a specific invoice,
if it exists, or the status of all invoices if given no argument\.
A specific invoice can be queried by providing either the \fBlabel\fR
provided when creating the invoice, the \fBinvstring\fR string representing
the invoice, the \fBpayment_hash\fR of the invoice, or the local \fBoffer_id\fR
this invoice was issued for\. Only one of the query parameters can be used at once\.
.SH RETURN VALUE
On success, an object containing \fBinvoices\fR is returned\. It is an array of objects, where each object contains:
.RS
.IP \[bu]
\fBlabel\fR (string): unique label supplied at invoice creation
.IP \[bu]
\fBdescription\fR (string): description used in the invoice
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
.IP \[bu]
\fBstatus\fR (string): Whether it's paid, unpaid or unpayable (one of "unpaid", "paid", "expired")
.IP \[bu]
\fBexpires_at\fR (u64): UNIX timestamp of when it will become / became unpayable
.IP \[bu]
\fBamount_msat\fR (msat, optional): the amount required to pay this invoice
.IP \[bu]
\fBbolt11\fR (string, optional): the BOLT11 string (always present unless \fIbolt12\fR is)
.IP \[bu]
\fBbolt12\fR (string, optional): the BOLT12 string (always present unless \fIbolt11\fR is)
.IP \[bu]
\fBlocal_offer_id\fR (hex, optional): the \fIid\fR of our offer which created this invoice (\fBexperimental-offers\fR only)\. (always 64 characters)
.IP \[bu]
\fBpayer_note\fR (string, optional): the optional \fIpayer_note\fR from invoice_request which created this invoice (\fBexperimental-offers\fR only)\.
.RE
If \fBstatus\fR is "paid":
.RS
.IP \[bu]
\fBpay_index\fR (u64): Unique incrementing index for this payment
.IP \[bu]
\fBamount_received_msat\fR (msat): the amount actually received (could be slightly greater than \fIamount_msat\fR, since clients may overpay)
.IP \[bu]
\fBpaid_at\fR (u64): UNIX timestamp of when it was paid
.IP \[bu]
\fBpayment_preimage\fR (hex): proof of payment (always 64 characters)
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-waitinvoice\fR(7), \fBlightning-delinvoice\fR(7), \fBlightning-invoice\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:debce16ac6b7bebecb1309884709c5b85fcc952d2fdae462e6f97448cb6c7e51

View File

@ -1,128 +0,0 @@
.TH "LIGHTNING-LISTNODES" "7" "" "" "lightning-listnodes"
.SH NAME
lightning-listnodes - Command to get the list of nodes in the known network\.
.SH SYNOPSIS
\fBlistnodes\fR [id]
.SH DESCRIPTION
The \fBlistnodes\fR command returns nodes the node has learned about via gossip messages, or a single one if the node \fIid\fR was specified\.
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "listnodes",
"params": {
"id": "02e29856dab8ddd9044c18486e4cab79ec717b490447af2d4831e290e48d57638a"
}
}
.RE
.fi
.SH RETURN VALUE
On success, an object containing \fBnodes\fR is returned\. It is an array of objects, where each object contains:
.RS
.IP \[bu]
\fBnodeid\fR (pubkey): the public key of the node
.IP \[bu]
\fBlast_timestamp\fR (u32, optional): A node_announcement has been received for this node (UNIX timestamp)
.RE
If \fBlast_timestamp\fR is present:
.RS
.IP \[bu]
\fBalias\fR (string): The fun alias this node advertized (up to 32 characters)
.IP \[bu]
\fBcolor\fR (hex): The favorite RGB color this node advertized (always 6 characters)
.IP \[bu]
\fBfeatures\fR (hex): BOLT #9 features bitmap this node advertized
.IP \[bu]
\fBaddresses\fR (array of objects): The addresses this node advertized:
.RS
.IP \[bu]
\fBtype\fR (string): Type of connection (one of "ipv4", "ipv6", "torv2", "torv3")
.IP \[bu]
\fBaddress\fR (string): address in expected format for \fItype\fR
.IP \[bu]
\fBport\fR (u16): port number
.RE
.RE
If \fBoption_will_fund\fR is present:
.RS
.IP \[bu]
\fBoption_will_fund\fR (object):
.RS
.IP \[bu]
\fBlease_fee_base_msat\fR (msat): the fixed fee for a lease (whole number of satoshis)
.IP \[bu]
\fBlease_fee_basis\fR (u32): the proportional fee in basis points (parts per 10,000) for a lease
.IP \[bu]
\fBfunding_weight\fR (u32): the onchain weight you'll have to pay for a lease
.IP \[bu]
\fBchannel_fee_max_base_msat\fR (msat): the maximum base routing fee this node will charge during the lease
.IP \[bu]
\fBchannel_fee_max_proportional_thousandths\fR (u32): the maximum proportional routing fee this node will charge during the lease (in thousandths, not millionths like channel_update)
.IP \[bu]
\fBcompact_lease\fR (hex): the lease as represented in the node_announcement
.RE
.RE
On failure, one of the following error codes may be returned:
.RS
.IP \[bu]
-32602: Error in given parameters\.
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"nodes": [
{
"nodeid": "02e29856dab8ddd9044c14586e4cab79ec717b490447af2d4831e290e48d58638a",
"alias": "some_alias",
"color": "68f442",
"last_timestamp": 1597213741,
"features": "02a2a1",
"addresses": [
{
"type": "ipv4",
"address": "zzz.yy.xx.xx",
"port": 9735
}
]
}
]
}
.RE
.fi
.SH AUTHOR
Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\.
.SH SEE ALSO
FIXME:
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:f391e720e6ebead19c2ad2ad6a75f4aa8646dba6cfa920a52ef433ec6d4f347c

View File

@ -1,87 +0,0 @@
.TH "LIGHTNING-LISTOFFERS" "7" "" "" "lightning-listoffers"
.SH NAME
lightning-listoffers - Command for listing offers
.SH SYNOPSIS
\fB(WARNING: experimental-offers only)\fR
\fBlistoffers\fR [\fIoffer_id\fR] [\fIactive_only\fR]
.SH DESCRIPTION
The \fBlistoffers\fR RPC command list all offers, or with \fBoffer_id\fR,
only the offer with that offer_id (if it exists)\. If \fBactive_only\fR is
set and is true, only offers with \fBactive\fR true are returned\.
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "listoffers",
"params": {
"active_only": false
}
}
.RE
.fi
.SH RETURN VALUE
On success, an object containing \fBoffers\fR is returned\. It is an array of objects, where each object contains:
.RS
.IP \[bu]
\fBoffer_id\fR (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
.IP \[bu]
\fBactive\fR (boolean): whether this can still be used
.IP \[bu]
\fBsingle_use\fR (boolean): whether this expires as soon as it's paid
.IP \[bu]
\fBbolt12\fR (string): the bolt12 encoding of the offer
.IP \[bu]
\fBbolt12_unsigned\fR (string): the bolt12 encoding of the offer, without signature
.IP \[bu]
\fBused\fR (boolean): True if an associated invoice has been paid
.IP \[bu]
\fBlabel\fR (string, optional): the (optional) user-specified label
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"offers": [
{
"offer_id": "053a5c566fbea2681a5ff9c05a913da23e45b95d09ef5bd25d7d408f23da7084",
"active": true,
"single_use": false,
"bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqvqcdgq2z9pk7enxv4jjqen0wgs8yatnw3ujz83qkc6rvp4j28rt3dtrn32zkvdy7efhnlrpr5rp5geqxs783wtlj550qs8czzku4nk3pqp6m593qxgunzuqcwkmgqkmp6ty0wyvjcqdguv3pnpukedwn6cr87m89t74h3auyaeg89xkvgzpac70z3m9rn5xzu28c",
"used": false
},
{
"offer_id": "3247d3597fec19e362ca683416a48a0f76a44c1600725a7ee1936548feadacca",
"active": true,
"single_use": false,
"bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcxqd24x3qgqgqlgzs3gdhkven9v5sxvmmjype82um50ys3ug9kxsmqdvj3c6ut2cuu2s4nrf8k2dulccgaqcdzxgp583utjlu49rcyqt8hc3s797umxn3r9367rdqc577rma7key58fywkajxnuzyapge86hj2pg80rjrma40xdqrxnsnva5l3ce7hz4ua8wf755dees4y9vnq",
"used": true
}
]
}
.RE
.fi
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-offer\fR(7), \fBlightning-offerout\fR(7), \fBlightning-listoffers\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:3a0d50b8da9f8f11a4e86cf20017fb35dd79dba9cbb8f740e094b430fd30bd01

View File

@ -1,78 +0,0 @@
.TH "LIGHTNING-LISTPAYS" "7" "" "" "lightning-listpays"
.SH NAME
lightning-listpays - Command for querying payment status
.SH SYNOPSIS
\fBlistpays\fR [bolt11] [payment_hash] [status]
.SH DESCRIPTION
The \fBlistpay\fR RPC command gets the status of all \fIpay\fR commands, or a
single one if either \fIbolt11\fR or \fIpayment_hash\fR was specified\.
It is possible filter the payments also by \fIstatus\fR\.
.SH RETURN VALUE
On success, an object containing \fBpays\fR is returned\. It is an array of objects, where each object contains:
.RS
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
.IP \[bu]
\fBstatus\fR (string): status of the payment (one of "pending", "failed", "complete")
.IP \[bu]
\fBcreated_at\fR (u64): the UNIX timestamp showing when this payment was initiated
.IP \[bu]
\fBdestination\fR (pubkey, optional): the final destination of the payment if known
.IP \[bu]
\fBlabel\fR (string, optional): the label, if given to sendpay
.IP \[bu]
\fBbolt11\fR (string, optional): the bolt11 string (if pay supplied one)
.IP \[bu]
\fBbolt12\fR (string, optional): the bolt12 string (if supplied for pay: \fBexperimental-offers\fR only)\.
.RE
If \fBstatus\fR is "pending" or "complete":
.RS
.IP \[bu]
\fBamount_sent_msat\fR (msat): the amount we actually sent, including fees
.IP \[bu]
\fBamount_msat\fR (msat, optional): the amount the destination received, if known
.RE
If \fBstatus\fR is "complete":
.RS
.IP \[bu]
\fBpreimage\fR (hex): proof of payment (always 64 characters)
.IP \[bu]
\fBnumber_of_parts\fR (u64, optional): the number of parts for a successful payment (only if more than one)\.
.RE
If \fBstatus\fR is "failed":
.RS
.IP \[bu]
\fBerroronion\fR (hex, optional): the error onion returned on failure, if any\.
.RE
The returned array is ordered by increasing \fBcreated_at\fR fields\.
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-pay\fR(7), \fBlightning-paystatus\fR(7), \fBlightning-listsendpays\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:692ceb55d59f5fdf5a3787841a169e2e5b5181d1270bb56277bf40951230553f

View File

@ -1,647 +0,0 @@
.TH "LIGHTNING-LISTPEERS" "7" "" "" "lightning-listpeers"
.SH NAME
lightning-listpeers - Command returning data on connected lightning nodes
.SH SYNOPSIS
\fBlistpeers\fR [\fIid\fR] [\fIlevel\fR]
.SH DESCRIPTION
The \fBlistpeers\fR RPC command returns data on nodes that are connected
or are not connected but have open channels with this node\.
Once a connection to another lightning node has been established, using
the \fBconnect\fR command, data on the node can be returned using
\fBlistpeers\fR and the \fIid\fR that was used with the \fBconnect\fR command\.
If no \fIid\fR is supplied, then data on all lightning nodes that are
connected, or not connected but have open channels with this node, are
returned\.
Supplying \fIid\fR will filter the results to only return data on a node
with a matching \fIid\fR, if one exists\.
Supplying \fIlevel\fR will show log entries related to that peer at the
given log level\. Valid log levels are "io", "debug", "info", and
"unusual"\.
If a channel is open with a node and the connection has been lost, then
the node will still appear in the output of the command and the value of
the \fIconnected\fR attribute of the node will be "false"\.
The channel will remain open for a set blocktime, after which if the
connection has not been re-established, the channel will close and the
node will no longer appear in the command output\.
.SH RETURN VALUE
On success, an object containing \fBpeers\fR is returned\. It is an array of objects, where each object contains:
.RS
.IP \[bu]
\fBid\fR (pubkey): the public key of the peer
.IP \[bu]
\fBconnected\fR (boolean): True if the peer is currently connected
.IP \[bu]
\fBchannels\fR (array of objects):
.RS
.IP \[bu]
\fBstate\fR (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")
.IP \[bu]
\fBopener\fR (string): Who initiated the channel (one of "local", "remote")
.IP \[bu]
\fBfeatures\fR (array of strings):
.RS
.IP \[bu]
BOLT #9 features which apply to this channel (one of "option_static_remotekey", "option_anchor_outputs")
.RE
.IP \[bu]
\fBscratch_txid\fR (txid, optional): The txid we would use if we went onchain now
.IP \[bu]
\fBfeerate\fR (object, optional): Feerates for the current tx:
.RS
.IP \[bu]
\fBperkw\fR (u32): Feerate per 1000 weight (i\.e kSipa)
.IP \[bu]
\fBperkb\fR (u32): Feerate per 1000 virtual bytes
.RE
.IP \[bu]
\fBowner\fR (string, optional): The current subdaemon controlling this connection
.IP \[bu]
\fBshort_channel_id\fR (short_channel_id, optional): The short_channel_id (once locked in)
.IP \[bu]
\fBchannel_id\fR (hex, optional): The full channel_id (always 64 characters)
.IP \[bu]
\fBfunding_txid\fR (txid, optional): ID of the funding transaction
.IP \[bu]
\fBinitial_feerate\fR (string, optional): For inflight opens, the first feerate used to initiate the channel open
.IP \[bu]
\fBlast_feerate\fR (string, optional): For inflight opens, the most recent feerate used on the channel open
.IP \[bu]
\fBnext_feerate\fR (string, optional): For inflight opens, the next feerate we'll use for the channel open
.IP \[bu]
\fBnext_fee_step\fR (u32, optional): For inflight opens, the next feerate step we'll use for the channel open
.IP \[bu]
\fBinflight\fR (array of objects, optional): Current candidate funding transactions (only for dual-funding):
.RS
.IP \[bu]
\fBfunding_txid\fR (txid): ID of the funding transaction
.IP \[bu]
\fBfunding_outnum\fR (u32): The 0-based output number of the funding transaction which opens the channel
.IP \[bu]
\fBfeerate\fR (string): The feerate for this funding transaction in per-1000-weight, with "kpw" appended
.IP \[bu]
\fBtotal_funding_msat\fR (msat): total amount in the channel
.IP \[bu]
\fBour_funding_msat\fR (msat): amount we have in the channel
.IP \[bu]
\fBscratch_txid\fR (txid): The commitment transaction txid we would use if we went onchain now
.RE
.IP \[bu]
\fBclose_to\fR (hex, optional): scriptPubkey which we have to close to if we mutual close
.IP \[bu]
\fBprivate\fR (boolean, optional): if False, we will not announce this channel
.IP \[bu]
\fBcloser\fR (string, optional): Who initiated the channel close (\fBnull\fR is deprecated!) (one of "local", "remote", \fInull\fR)
.IP \[bu]
\fBfunding\fR (object, optional):
.RS
.IP \[bu]
\fBlocal_msat\fR (msat): Amount of channel we funded
.IP \[bu]
\fBremote_msat\fR (msat): Amount of channel they funded
.RE
.IP \[bu]
\fBto_us_msat\fR (msat, optional): how much of channel is owed to us
.IP \[bu]
\fBmin_to_us_msat\fR (msat, optional): least amount owed to us ever
.IP \[bu]
\fBmax_to_us_msat\fR (msat, optional): most amount owed to us ever
.IP \[bu]
\fBtotal_msat\fR (msat, optional): total amount in the channel
.IP \[bu]
\fBfee_base_msat\fR (msat, optional): amount we charge to use the channel
.IP \[bu]
\fBfee_proportional_millionths\fR (u32, optional): amount we charge to use the channel in parts-per-million
.IP \[bu]
\fBdust_limit_msat\fR (msat, optional): minimum amount for an output on the channel transactions
.IP \[bu]
\fBmax_total_htlc_in_msat\fR (msat, optional): max amount accept in a single payment
.IP \[bu]
\fBtheir_reserve_msat\fR (msat, optional): minimum we insist they keep in channel
.IP \[bu]
\fBour_reserve_msat\fR (msat, optional): minimum they insist we keep in channel
.IP \[bu]
\fBspendable_msat\fR (msat, optional): total we could send through channel
.IP \[bu]
\fBreceivable_msat\fR (msat, optional): total peer could send through channel
.IP \[bu]
\fBminimum_htlc_in_msat\fR (msat, optional): the minimum amount HTLC we accept
.IP \[bu]
\fBtheir_to_self_delay\fR (u32, optional): the number of blocks before they can take their funds if they unilateral close
.IP \[bu]
\fBour_to_self_delay\fR (u32, optional): the number of blocks before we can take our funds if we unilateral close
.IP \[bu]
\fBmax_accepted_htlcs\fR (u32, optional): Maximum number of incoming HTLC we will accept at once
.IP \[bu]
\fBstate_changes\fR (array of objects, optional): Prior state changes:
.RS
.IP \[bu]
\fBtimestamp\fR (string): UTC timestamp of form YYYY-mm-ddTHH:MM:SS\.%03dZ
.IP \[bu]
\fBold_state\fR (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")
.IP \[bu]
\fBnew_state\fR (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")
.IP \[bu]
\fBcause\fR (string): What caused the change (one of "unknown", "local", "user", "remote", "protocol", "onchain")
.IP \[bu]
\fBmessage\fR (string): Human-readable explanation
.RE
.IP \[bu]
\fBstatus\fR (array of strings, optional):
.RS
.IP \[bu]
Billboard log of significant changes
.RE
.IP \[bu]
\fBin_payments_offered\fR (u64, optional): Number of incoming payment attempts
.IP \[bu]
\fBin_offered_msat\fR (msat, optional): Total amount of incoming payment attempts
.IP \[bu]
\fBin_payments_fulfilled\fR (u64, optional): Number of successful incoming payment attempts
.IP \[bu]
\fBin_fulfilled_msat\fR (msat, optional): Total amount of successful incoming payment attempts
.IP \[bu]
\fBout_payments_offered\fR (u64, optional): Number of outgoing payment attempts
.IP \[bu]
\fBout_offered_msat\fR (msat, optional): Total amount of outgoing payment attempts
.IP \[bu]
\fBout_payments_fulfilled\fR (u64, optional): Number of successful outgoing payment attempts
.IP \[bu]
\fBout_fulfilled_msat\fR (msat, optional): Total amount of successful outgoing payment attempts
.IP \[bu]
\fBhtlcs\fR (array of objects, optional): current HTLCs in this channel:
.RS
.IP \[bu]
\fBdirection\fR (string): Whether it came from peer, or is going to peer (one of "in", "out")
.IP \[bu]
\fBid\fR (u64): Unique ID for this htlc on this channel in this direction
.IP \[bu]
\fBamount_msat\fR (msat): Amount send/received for this HTLC
.IP \[bu]
\fBexpiry\fR (u32): Block this HTLC expires at
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the payment_preimage which will prove payment (always 64 characters)
.IP \[bu]
\fBlocal_trimmed\fR (boolean, optional): if this is too small to enforce onchain (always \fItrue\fR)
.IP \[bu]
\fBstatus\fR (string, optional): set if this HTLC is currently waiting on a hook (and shows what plugin)
.RE
If \fBdirection\fR is "out":
.RS
.IP \[bu]
\fBstate\fR (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")
.RE
If \fBdirection\fR is "in":
.RS
.IP \[bu]
\fBstate\fR (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")
.RE
.RE
If \fBclose_to\fR is present:
.RS
.IP \[bu]
\fBclose_to_addr\fR (string, optional): The bitcoin address we will close to
.RE
If \fBscratch_txid\fR is present:
.RS
.IP \[bu]
\fBlast_tx_fee_msat\fR (msat): fee attached to this the current tx
.RE
If \fBshort_channel_id\fR is present:
.RS
.IP \[bu]
\fBdirection\fR (u32): 0 if we're the lesser node_id, 1 if we're the greater
.RE
If \fBinflight\fR is present:
.RS
.IP \[bu]
\fBinitial_feerate\fR (string): The feerate for the initial funding transaction in per-1000-weight, with "kpw" appended
.IP \[bu]
\fBlast_feerate\fR (string): The feerate for the latest funding transaction in per-1000-weight, with "kpw" appended
.IP \[bu]
\fBnext_feerate\fR (string): The minimum feerate for the next funding transaction in per-1000-weight, with "kpw" appended
.RE
.IP \[bu]
\fBlog\fR (array of objects, optional): if \fIlevel\fR is specified, logs for this peer:
.RS
.IP \[bu]
\fBtype\fR (string) (one of "SKIPPED", "BROKEN", "UNUSUAL", "INFO", "DEBUG", "IO_IN", "IO_OUT")
.RE
If \fBtype\fR is "SKIPPED":
.RS
.IP \[bu]
\fBnum_skipped\fR (u32): number of deleted/omitted entries
.RE
If \fBtype\fR is "BROKEN", "UNUSUAL", "INFO" or "DEBUG":
.RS
.IP \[bu]
\fBtime\fR (string): UNIX timestamp with 9 decimal places
.IP \[bu]
\fBsource\fR (string): The particular logbook this was found in
.IP \[bu]
\fBlog\fR (string): The actual log message
.IP \[bu]
\fBnode_id\fR (pubkey): The peer this is associated with
.RE
If \fBtype\fR is "IO_IN" or "IO_OUT":
.RS
.IP \[bu]
\fBtime\fR (string): UNIX timestamp with 9 decimal places
.IP \[bu]
\fBsource\fR (string): The particular logbook this was found in
.IP \[bu]
\fBlog\fR (string): The actual log message
.IP \[bu]
\fBnode_id\fR (pubkey): The peer this is associated with
.IP \[bu]
\fBdata\fR (hex): The IO which occurred
.RE
.RE
If \fBconnected\fR is \fItrue\fR:
.RS
.IP \[bu]
\fBnetaddr\fR (array of strings): A single entry array:
.RS
.IP \[bu]
address, e\.g\. 1\.2\.3\.4:1234
.RE
.IP \[bu]
\fBfeatures\fR (hex): bitmap of BOLT #9 features from peer's INIT message
.RE
On success, an object with a "peers" key is returned containing a list
of 0 or more objects\.
Each object in the list contains the following data:
.RS
.IP \[bu]
\fIid\fR : The unique id of the peer
.IP \[bu]
\fIconnected\fR : A boolean value showing the connection status
.IP \[bu]
\fInetaddr\fR : A list of network addresses the node is listening on
.IP \[bu]
\fIfeatures\fR : Bit flags showing supported features (BOLT #9)
.IP \[bu]
\fIchannels\fR : An array of objects describing channels with the peer\.
.IP \[bu]
\fIlog\fR : Only present if \fIlevel\fR is set\. List logs related to the
peer at the specified \fIlevel\fR
.RE
If \fIid\fR is supplied and no matching nodes are found, a "peers" object
with an empty list is returned\.
The objects in the \fIchannels\fR array will have at least these fields:
.RS
.IP \[bu]
\fIstate\fR: Any of these strings:
.RS
.IP \[bu]
\fB"OPENINGD"\fR: The channel funding protocol with the peer is ongoing
and both sides are negotiating parameters\.
.IP \[bu]
\fB"CHANNELD_AWAITING_LOCKIN"\fR: The peer and you have agreed on channel
parameters and are just waiting for the channel funding transaction to
be confirmed deeply\.
Both you and the peer must acknowledge the channel funding transaction
to be confirmed deeply before entering the next state\.
.IP \[bu]
\fB"CHANNELD_NORMAL"\fR: The channel can be used for normal payments\.
.IP \[bu]
\fB"CHANNELD_SHUTTING_DOWN"\fR: A mutual close was requested (by you or
peer) and both of you are waiting for HTLCs in-flight to be either
failed or succeeded\.
The channel can no longer be used for normal payments and forwarding\.
Mutual close will proceed only once all HTLCs in the channel have
either been fulfilled or failed\.
.IP \[bu]
\fB"CLOSINGD_SIGEXCHANGE"\fR: You and the peer are negotiating the mutual
close onchain fee\.
.IP \[bu]
\fB"CLOSINGD_COMPLETE"\fR: You and the peer have agreed on the mutual close
onchain fee and are awaiting the mutual close getting confirmed deeply\.
.IP \[bu]
\fB"AWAITING_UNILATERAL"\fR: You initiated a unilateral close, and are now
waiting for the peer-selected unilateral close timeout to complete\.
.IP \[bu]
\fB"FUNDING_SPEND_SEEN"\fR: You saw the funding transaction getting
spent (usually the peer initiated a unilateral close) and will now
determine what exactly happened (i\.e\. if it was a theft attempt)\.
.IP \[bu]
\fB"ONCHAIN"\fR: You saw the funding transaction getting spent and now
know what happened (i\.e\. if it was a proper unilateral close by the
peer, or a theft attempt)\.
.IP \[bu]
\fB"CLOSED"\fR: The channel closure has been confirmed deeply\.
The channel will eventually be removed from this array\.
.RE
.IP \[bu]
\fIstate_changes\fR: An array of objects describing prior state change events\.
.IP \[bu]
\fIopener\fR: A string \fB"local"\fR or \fB"remote\fR" describing which side opened this
channel\.
.IP \[bu]
\fIcloser\fR: A string \fB"local"\fR or \fB"remote\fR" describing which side
closed this channel or \fBnull\fR if the channel is not (being) closed yet\.
.IP \[bu]
\fIstatus\fR: An array of strings containing the most important log messages
relevant to this channel\.
Also known as the "billboard"\.
.IP \[bu]
\fIowner\fR: A string describing which particular sub-daemon of \fBlightningd\fR
currently is responsible for this channel\.
One of: \fB"lightning_openingd"\fR, \fB"lightning_channeld"\fR,
\fB"lightning_closingd"\fR, \fB"lightning_onchaind"\fR\.
.IP \[bu]
\fIto_us_msat\fR: A string describing how much of the funds is owned by us;
a number followed by a string unit\.
.IP \[bu]
\fItotal_msat\fR: A string describing the total capacity of the channel;
a number followed by a string unit\.
.IP \[bu]
\fIfee_base_msat\fR: The fixed routing fee we charge for forwards going out over
this channel, regardless of payment size\.
.IP \[bu]
\fIfee_proportional_millionths\fR: The proportional routing fees in ppm (parts-
per-millionths) we charge for forwards going out over this channel\.
.IP \[bu]
\fIfeatures\fR: An array of feature names supported by this channel\.
.RE
These fields may exist if the channel has gotten beyond the \fB"OPENINGD"\fR
state, or in various circumstances:
.RS
.IP \[bu]
\fIshort_channel_id\fR: A string of the short channel ID for the channel;
Format is \fB"BBBBxTTTxOOO"\fR, where \fB"BBBB"\fR is the numeric block height
at which the funding transaction was confirmed, \fB"TTT"\fR is the numeric
funding transaction index within that block, and \fB"OOO"\fR is the
numeric output index of the transaction output that actually anchors
this channel\.
.IP \[bu]
\fIdirection\fR: The channel-direction we own, as per BOLT #7\.
We own channel-direction 0 if our node ID is "less than" the peer node ID
in a lexicographical ordering of our node IDs, otherwise we own
channel-direction 1\.
Our \fBchannel_update\fR will use this \fIdirection\fR\.
.IP \[bu]
\fIchannel_id\fR: The full channel ID of the channel;
the funding transaction ID XORed with the output number\.
.IP \[bu]
\fIfunding_txid\fR: The funding transaction ID of the channel\.
.IP \[bu]
\fIclose_to\fR: The raw \fBscriptPubKey\fR that was indicated in the starting
\fBfundchannel_start\fR command and accepted by the peer\.
If the \fBscriptPubKey\fR encodes a standardized address, an additional
\fIclose_to_addr\fR field will be present with the standardized address\.
.IP \[bu]
\fIprivate\fR: A boolean, true if the channel is unpublished, false if the
channel is published\.
.IP \[bu]
\fIfunding_msat\fR: An object, whose field names are the node
IDs involved in the channel, and whose values are strings (numbers with
a unit suffix) indicating how much that node originally contributed in
opening the channel\.
.IP \[bu]
\fImin_to_us_msat\fR: A string describing the historic point at which
we owned the least amount of funds in this channel;
a number followed by a string unit\.
If the peer were to succesfully steal from us, this is the amount we
would still retain\.
.IP \[bu]
\fImax_to_us_msat\fR: A string describing the historic point at which
we owned the most amount of funds in this channel;
a number followed by a string unit\.
If we were to successfully steal from the peer, this is the amount we
could potentially get\.
.IP \[bu]
\fIdust_limit_msat\fR: A string describing an amount;
if an HTLC or the amount wholly-owned by one node is at or below this
amount, it will be considered "dusty" and will not appear in a close
transaction, and will be donated to miners as fee;
a number followed by a string unit\.
.IP \[bu]
\fImax_total_htlc_in_msat\fR: A string describing an amount;
the sum of all HTLCs in the channel cannot exceed this amount;
a number followed by a string unit\.
.IP \[bu]
\fItheir_reserve_msat\fR: A string describing the minimum amount that
the peer must keep in the channel when it attempts to send out;
if it has less than this in the channel, it cannot send to us on
that channel;
a number followed by a string unit\.
We impose this on them, default is 1% of the total channel capacity\.
.IP \[bu]
\fIour_reserve_msat\fR: A string describing the minimum amount that
you must keep in the channel when you attempt to send out;
if you have less than this in the channel, you cannot send out
via this channel;
a number followed by a string unit\.
The peer imposes this on us, default is 1% of the total channel capacity\.
.IP \[bu]
\fIspendable_msat\fR and \fIreceivable_msat\fR: A string describing an
\fB\fIestimate\fR\fR of how much we can send or receive over this channel in a
single payment (or payment-part for multi-part payments);
a number followed by a string unit\.
This is an \fB\fIestimate\fR\fR, which can be wrong because adding HTLCs requires
an increase in fees paid to onchain miners, and onchain fees change
dynamically according to onchain activity\.
For a sufficiently-large channel, this can be limited by the rules imposed
under certain blockchains;
for example, individual Bitcoin mainnet payment-parts cannot exceed
42\.94967295 mBTC\.
.IP \[bu]
\fIminimum_htlc_in_msat\fR: A string describing the minimum amount that
an HTLC must have before we accept it\.
.IP \[bu]
\fItheir_to_self_delay\fR: The number of blocks that the peer must wait
to claim their funds, if they close unilaterally\.
.IP \[bu]
\fIour_to_self_delay\fR: The number of blocks that you must wait to claim
your funds, if you close unilaterally\.
.IP \[bu]
\fImax_accepted_htlcs\fR: The maximum number of HTLCs you will accept on
this channel\.
.IP \[bu]
\fIin_payments_offered\fR: The number of incoming HTLCs offered over this
channel\.
.IP \[bu]
\fIin_offered_msat\fR: A string describing the total amount of all incoming
HTLCs offered over this channel;
a number followed by a string unit\.
.IP \[bu]
\fIin_payments_fulfilled\fR: The number of incoming HTLCs offered \fIand
successfully claimed\fR over this channel\.
.IP \[bu]
\fIin_fulfilled_msat\fR: A string describing the total amount of all
incoming HTLCs offered \fIand successfully claimed\fR over this channel;
a number followed by a string unit\.
.IP \[bu]
\fIout_payments_offered\fR: The number of outgoing HTLCs offered over
this channel\.
.IP \[bu]
\fIout_offered_msat\fR: A string describing the total amount of all
outgoing HTLCs offered over this channel;
a number followed by a string unit\.
.IP \[bu]
\fIout_payments_fulfilled\fR: The number of outgoing HTLCs offered \fIand
successfully claimed\fR over this channel\.
.IP \[bu]
\fIout_fulfilled_msat\fR: A string describing the total amount of all
outgoing HTLCs offered \fIand successfully claimed\fR over this channel;
a number followed by a string unit\.
.IP \[bu]
\fIscratch_txid\fR: The txid of the latest transaction (what we would sign and
send to chain if the channel were to fail now)\.
.IP \[bu]
\fIlast_tx_fee\fR: The fee on that latest transaction\.
.IP \[bu]
\fIfeerate\fR: An object containing the latest feerate as both \fIperkw\fR and \fIperkb\fR\.
.IP \[bu]
\fIhtlcs\fR: An array of objects describing the HTLCs currently in-flight
in the channel\.
.RE
Objects in the \fIhtlcs\fR array will contain these fields:
.RS
.IP \[bu]
\fIdirection\fR: Either the string \fB"out"\fR or \fB"in"\fR, whether it is an
outgoing or incoming HTLC\.
.IP \[bu]
\fIid\fR: A numeric ID uniquely identifying this HTLC\.
.IP \[bu]
\fIamount_msat\fR: The value of the HTLC\.
.IP \[bu]
\fIexpiry\fR: The blockheight at which the HTLC will be forced to return
to its offerer: an \fB"in"\fR HTLC will be returned to the peer, an
\fB"out"\fR HTLC will be returned to you\.
\fBNOTE\fR If the \fIexpiry\fR of any outgoing HTLC will arrive in the next
block, \fBlightningd\fR(8) will automatically unilaterally close the
channel in order to enforce the timeout onchain\.
.IP \[bu]
\fIpayment_hash\fR: The payment hash, whose preimage must be revealed to
successfully claim this HTLC\.
.IP \[bu]
\fIstate\fR: A string describing whether the HTLC has been communicated to
or from the peer, whether it has been signed in a new commitment, whether
the previous commitment (that does not contain it) has been revoked, as
well as when the HTLC is fulfilled or failed offchain\.
.IP \[bu]
\fIlocal_trimmed\fR: A boolean, existing and \fBtrue\fR if the HTLC is not
actually instantiated as an output (i\.e\. "trimmed") on the commitment
transaction (and will not be instantiated on a unilateral close)\.
Generally true if the HTLC is below the \fIdust_limit_msat\fR for the
channel\.
.RE
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
with \fBcode\fR being one of the following:
.RS
.IP \[bu]
-32602: If the given parameters are wrong\.
.RE
.SH AUTHOR
Michael Hawkins \fI<michael.hawkins@protonmail.com\fR>\.
.SH SEE ALSO
\fBlightning-connect\fR(7), lightning-fundchannel_\fBstart\fR(7),
\fBlightning-setchannelfee\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Lightning
RFC site (BOLT #9):
\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/09-features.md\fR
\" SHA256STAMP:494bfc944d687593469fd420566a08dceeb84765e771e8e2d67cce4392d9b154

View File

@ -1,78 +0,0 @@
.TH "LIGHTNING-LISTSENDPAYS" "7" "" "" "lightning-listsendpays"
.SH NAME
lightning-listsendpays - Low-level command for querying sendpay status
.SH SYNOPSIS
\fBlistsendpays\fR [\fIbolt11\fR] [\fIpayment_hash\fR] [\fIstatus\fR]
.SH DESCRIPTION
The \fBlistsendpays\fR RPC command gets the status of all \fIsendpay\fR
commands (which is also used by the \fIpay\fR command), or with \fIbolt11\fR or
\fIpayment_hash\fR limits results to that specific payment\. You cannot
specify both\. It is possible filter the payments also by \fIstatus\fR\.
Note that in future there may be more than one concurrent \fIsendpay\fR
command per \fIpay\fR, so this command should be used with caution\.
.SH RETURN VALUE
Note that the returned array is ordered by increasing \fIid\fR\.
On success, an object containing \fBpayments\fR is returned\. It is an array of objects, where each object contains:
.RS
.IP \[bu]
\fBid\fR (u64): unique ID for this payment attempt
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
.IP \[bu]
\fBstatus\fR (string): status of the payment (one of "pending", "failed", "complete")
.IP \[bu]
\fBcreated_at\fR (u64): the UNIX timestamp showing when this payment was initiated
.IP \[bu]
\fBamount_sent_msat\fR (msat): The amount sent
.IP \[bu]
\fBamount_msat\fR (msat, optional): The amount delivered to destination (if known)
.IP \[bu]
\fBdestination\fR (pubkey, optional): the final destination of the payment if known
.IP \[bu]
\fBlabel\fR (string, optional): the label, if given to sendpay
.IP \[bu]
\fBbolt11\fR (string, optional): the bolt11 string (if pay supplied one)
.IP \[bu]
\fBbolt12\fR (string, optional): the bolt12 string (if supplied for pay: \fBexperimental-offers\fR only)\.
.RE
If \fBstatus\fR is "complete":
.RS
.IP \[bu]
\fBpayment_preimage\fR (hex): the proof of payment: SHA256 of this \fBpayment_hash\fR (always 64 characters)
.RE
If \fBstatus\fR is "failed":
.RS
.IP \[bu]
\fBerroronion\fR (hex, optional): the onion message returned
.RE
.SH AUTHOR
Christian Decker \fI<decker.christian@gmail.com\fR> is mainly
responsible\.
.SH SEE ALSO
\fBlightning-listpays\fR(7), \fBlightning-sendpay\fR(7), \fBlightning-listinvoice\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:434378df97caee4272db4a11fc43a5e082af8c492f5fbc953add49c418c6872e

View File

@ -1,141 +0,0 @@
.TH "LIGHTNING-LISTTRANSACTIONS" "7" "" "" "lightning-listtransactions"
.SH NAME
lightning-listtransactions - Command to get the list of transactions that was stored in the wallet\.
.SH SYNOPSIS
\fBlisttransactions\fR
.SH DESCRIPTION
The \fBlisttransactions\fR command returns transactions tracked in the wallet\. This includes deposits, withdrawals and transactions related to channels\. A transaction may have multiple types, e\.g\., a transaction may both be a close and a deposit if it closes the channel and returns funds to the wallet\.
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "listtransactions",
"params": {}
}
.RE
.fi
.SH RETURN VALUE
On success, an object containing \fBtransactions\fR is returned\. It is an array of objects, where each object contains:
.RS
.IP \[bu]
\fBhash\fR (txid): the transaction id
.IP \[bu]
\fBrawtx\fR (hex): the raw transaction
.IP \[bu]
\fBblockheight\fR (u32): the block height of this tx
.IP \[bu]
\fBtxindex\fR (u32): the transaction number within the block
.IP \[bu]
\fBlocktime\fR (u32): The nLocktime for this tx
.IP \[bu]
\fBversion\fR (u32): The nVersion for this tx
.IP \[bu]
\fBinputs\fR (array of objects): Each input, in order:
.RS
.IP \[bu]
\fBtxid\fR (txid): the transaction id spent
.IP \[bu]
\fBindex\fR (u32): the output spent
.IP \[bu]
\fBsequence\fR (u32): the nSequence value
.IP \[bu]
\fBtype\fR (string, optional): the purpose of this input (\fIEXPERIMENTAL_FEATURES\fR 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")
.IP \[bu]
\fBchannel\fR (short_channel_id, optional): the channel this input is associated with (\fIEXPERIMENTAL_FEATURES\fR only)
.RE
.IP \[bu]
\fBoutputs\fR (array of objects): Each output, in order:
.RS
.IP \[bu]
\fBindex\fR (u32): the 0-based output number
.IP \[bu]
\fBmsat\fR (msat): the amount of the output
.IP \[bu]
\fBscriptPubKey\fR (hex): the scriptPubKey
.IP \[bu]
\fBtype\fR (string, optional): the purpose of this output (\fIEXPERIMENTAL_FEATURES\fR 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")
.IP \[bu]
\fBchannel\fR (short_channel_id, optional): the channel this output is associated with (\fIEXPERIMENTAL_FEATURES\fR only)
.RE
.IP \[bu]
\fBtype\fR (array of strings, optional):
.RS
.IP \[bu]
Reason we care about this transaction (\fIEXPERIMENTAL_FEATURES\fR 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")
.RE
.IP \[bu]
\fBchannel\fR (short_channel_id, optional): the channel this transaction is associated with (\fIEXPERIMENTAL_FEATURES\fR only)
.RE
On failure, one of the following error codes may be returned:
.RS
.IP \[bu]
-32602: Error in given parameters\.
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"transactions": [
{
"hash": "05985072bbe20747325e69a159fe08176cc1bbc96d25e8848edad2dddc1165d0",
"rawtx": "02000000027032912651fc25a3e0893acd5f9640598707e2dfef92143bb5a4020e335442800100000017160014a5f48b9aa3cb8ca6cc1040c11e386745bb4dc932ffffffffd229a4b4f78638ebcac10a68b0561585a5d6e4d3b769ad0a909e9b9afaeae24e00000000171600145c83da9b685f9142016c6f5eb5f98a45cfa6f686ffffffff01915a01000000000017a9143a4dfd59e781f9c3018e7d0a9b7a26d58f8d22bf8700000000",
"blockheight": 0,
"txindex": 0,
"locktime": 0,
"version": 2,
"inputs": [
{
"txid": "804254330e02a4b53b1492efdfe207875940965fcd3a89e0a325fc5126913270",
"index": 1,
"sequence": 4294967295
},
{
"txid": "4ee2eafa9a9b9e900aad69b7d3e4d6a5851556b0680ac1caeb3886f7b4a429d2",
"index": 0,
"sequence": 4294967295
}
],
"outputs": [
{
"index": 0,
"satoshis": "88721000msat",
"scriptPubKey": "a9143a4dfd59e781f9c3018e7d0a9b7a26d58f8d22bf87"
}
]
}
]
}
.RE
.fi
.SH AUTHOR
Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\.
.SH SEE ALSO
\fBlightning-newaddr\fR(7), \fBlightning-listfunds\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:ce171bdb7bccae8ec12ceb172e4939c4b903462d3744ff56e6939388de92ef91

View File

@ -1,215 +0,0 @@
.TH "LIGHTNING-MULTIFUNDCHANNEL" "7" "" "" "lightning-multifundchannel"
.SH NAME
lightning-multifundchannel - Command for establishing many lightning channels
.SH SYNOPSIS
\fBmultifundchannel\fR \fIdestinations\fR [\fIfeerate\fR] [\fIminconf\fR] [\fIutxos\fR] [\fIminchannels\fR] [\fIcommitment_feerate\fR]
.SH DESCRIPTION
The \fBmultifundchannel\fR RPC command opens multiple payment channels
with nodes by committing a single funding transaction to the blockchain
that is shared by all channels\.
If not already connected, \fBmultifundchannel\fR will automatically attempt
to connect; you may provide a \fI@host:port\fR hint appended to the node ID
so that c-lightning can learn how to connect to the node;
see \fBlightning-connect\fR(7)\.
Once the transaction is confirmed, normal channel operations may begin\.
Readiness is indicated by \fBlistpeers\fR reporting a \fIstate\fR of
\fBCHANNELD_NORMAL\fR for the channel\.
\fIdestinations\fR is an array of objects, with the fields:
.RS
.IP \[bu]
\fIid\fR is the node ID, with an optional \fI@host:port\fR appended to it
in a manner understood by \fBconnect\fR; see \fBlightning-connect\fR(7)\.
Each entry in the \fIdestinations\fR array must have a unique node \fIid\fR\.
.IP \[bu]
\fIamount\fR is the amount in satoshis taken from the internal wallet
to fund the channel\.
The string \fIall\fR can be used to specify all available funds
(or 16,777,215 satoshi if more is available and large channels were
not negotiated with the peer)\.
Otherwise it is in satoshi precision; it can be
a whole number,
a whole number ending in \fIsat\fR,
a whole number ending in \fI000msat\fR, or
a number with 1 to 8 decimal places ending in \fIbtc\fR\.
The value cannot be less than the dust limit, currently 546 satoshi
as of this writing, nor more than 16,777,215 satoshi
(unless large channels were negotiated with the peer)\.
.IP \[bu]
\fIannounce\fR is an optional flag that indicates whether to announce
the channel with this, default \fBtrue\fR\.
If set to \fBfalse\fR, the channel is unpublished\.
.IP \[bu]
\fIpush_msat\fR is the amount of millisatoshis to outright give to the
node\.
This is a gift to the peer, and you do not get a proof-of-payment
out of this\.
.IP \[bu]
\fIclose_to\fR is a Bitcoin address to which the channel funds should be sent to
on close\. Only valid if both peers have negotiated
\fBoption_upfront_shutdown_script\fR\. Returns \fBclose_to\fR set to
closing script iff is negotiated\.
.IP \[bu]
\fIrequest_amt\fR is the amount of liquidity you'd like to lease from peer\.
If peer supports \fBoption_will_fund\fR, indicates to them to include this
much liquidity into the channel\. Must also pass in \fIcompact_lease\fR\.
.IP \[bu]
\fIcompact_lease\fR is a compact represenation of the peer's expected
channel lease terms\. If the peer's terms don't match this set, we will
fail to open the channel to this destination\.
.RE
There must be at least one entry in \fIdestinations\fR;
it cannot be an empty array\.
\fIfeerate\fR is an optional feerate used for the opening transaction and, if
\fIcommitment_feerate\fR is not set, as the initial feerate for
commitment and HTLC transactions\. It can be one of
the strings \fIurgent\fR (aim for next block), \fInormal\fR (next 4 blocks or
so) or \fIslow\fR (next 100 blocks or so) to use lightningds internal
estimates: \fInormal\fR is the default\.
Otherwise, \fIfeerate\fR is a number, with an optional suffix: \fIperkw\fR means
the number is interpreted as satoshi-per-kilosipa (weight), and \fIperkb\fR
means it is interpreted bitcoind-style as satoshi-per-kilobyte\. Omitting
the suffix is equivalent to \fIperkb\fR\.
\fIminconf\fR specifies the minimum number of confirmations that used
outputs should have\. Default is 1\.
\fIutxos\fR specifies the utxos to be used to fund the channel, as an array
of "txid:vout"\.
\fIminchannels\fR, if specified, will re-attempt funding as long as at least
this many peers remain (must not be zero)\.
The \fBmultifundchannel\fR command will only fail if too many peers fail
the funding process\.
\fIcommitment_feerate\fR is the initial feerate for commitment and HTLC
transactions\. See \fIfeerate\fR for valid values\.
.SH RETURN VALUE
This command opens multiple channels with a single large transaction,
thus only one transaction is returned\.
If \fIminchannels\fR was specified and is less than the number of destinations,
then it is possible that one or more of the destinations
do not have a channel even if \fBmultifundchannel\fR succeeded\.
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBtx\fR (hex): The raw transaction which funded the channel
.IP \[bu]
\fBtxid\fR (txid): The txid of the transaction which funded the channel
.IP \[bu]
\fBchannel_ids\fR (array of objects):
.RS
.IP \[bu]
\fBid\fR (pubkey): The peer we opened the channel with
.IP \[bu]
\fBoutnum\fR (u32): The 0-based output index showing which output funded the channel
.IP \[bu]
\fBchannel_id\fR (hex): The channel_id of the resulting channel (always 64 characters)
.IP \[bu]
\fBclose_to\fR (hex, optional): The raw scriptPubkey which mutual close will go to; only present if \fIclose_to\fR parameter was specified and peer supports \fBoption_upfront_shutdown_script\fR
.RE
.IP \[bu]
\fBfailed\fR (array of objects, optional): any peers we failed to open with (if \fIminchannels\fR was specified less than the number of destinations):
.RS
.IP \[bu]
\fBid\fR (pubkey): The peer we failed to open the channel with
.IP \[bu]
\fBmethod\fR (string): What stage we failed at (one of "connect", "openchannel_init", "fundchannel_start", "fundchannel_complete")
.IP \[bu]
\fBerror\fR (object):
.RS
.IP \[bu]
\fBcode\fR (integer): JSON error code from failing stage
.IP \[bu]
\fBmessage\fR (string): Message from stage
.IP \[bu]
\fBdata\fR: Additional error data
.RE
.RE
.RE
On failure, none of the channels are created\.
The following error codes may occur:
.RS
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
300: The maximum allowed funding amount is exceeded\.
.IP \[bu]
301: There are not enough funds in the internal wallet (including fees) to create the transaction\.
.IP \[bu]
302: The output amount is too small, and would be considered dust\.
.IP \[bu]
303: Broadcasting of the funding transaction failed, the internal call to bitcoin-cli returned with an error\.
.RE
Failure may also occur if \fBlightningd\fR and the peer cannot agree on
channel parameters (funding limits, channel reserves, fees, etc\.)\.
See lightning-fundchannel_\fBstart\fR(7) and lightning-fundchannel_\fBcomplete\fR(7)\.
There may be rare edge cases where a communications failure later in
the channel funding process will cancel the funding locally, but
the peer thinks the channel is already waiting for funding lockin\.
In that case, the next time we connect to the peer, our node will
tell the peer to forget the channel, but some nodes (in particular,
c-lightning nodes) will disconnect when our node tells them to
forget the channel\.
If you immediately \fBmultifundchannel\fR with that peer, it could
trigger this connect-forget-disconnect behavior, causing the
second \fBmultifundchannel\fR to fail as well due to disconnection\.
Doing a \fBconnect\fR with the peers separately, and waiting for a
few seconds, should help clear this hurdle;
running \fBmultifundchannel\fR a third time would also clear this\.
.SH AUTHOR
ZmnSCPxj \fI<ZmnSCPxj@protonmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-connect\fR(7), lightning-listfunds(), \fBlightning-listpeers\fR(7),
\fBlightning-fundchannel\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:dfbc1c3daffa0e935343c05f35e99e517ef828bd4e887a3306af52294e0e938d

View File

@ -1,83 +0,0 @@
.TH "LIGHTNING-MULTIWITHDRAW" "7" "" "" "lightning-multiwithdraw"
.SH NAME
lightning-multiwithdraw - Command for withdrawing to multiple addresses
.SH SYNOPSIS
\fBmultiwithdraw\fR \fIoutputs\fR [\fIfeerate\fR] [\fIminconf\fR] [\fIutxos\fR]
.SH DESCRIPTION
The \fBmultiwithdraw\fR RPC command sends funds from c-lightnings internal
wallet to the addresses specified in \fIoutputs\fR,
which is an array containing objects of the form \fB{address: amount}\fR\.
The \fBamount\fR may be the string \fI"all"\fR, indicating that all onchain funds
be sent to the specified address\.
Otherwise, it is in satoshi precision;
it can be
a whole number,
a whole number ending in \fIsat\fR,
a whole number ending in \fI000msat\fR,
or a number with 1 to 8 decimal places ending in \fIbtc\fR\.
\fIfeerate\fR is an optional feerate to use\. It can be one of the strings
\fIurgent\fR (aim for next block), \fInormal\fR (next 4 blocks or so) or \fIslow\fR
(next 100 blocks or so) to use lightningds internal estimates: \fInormal\fR
is the default\.
Otherwise, \fIfeerate\fR is a number, with an optional suffix: \fIperkw\fR means
the number is interpreted as satoshi-per-kilosipa (weight), and \fIperkb\fR
means it is interpreted bitcoind-style as satoshi-per-kilobyte\. Omitting
the suffix is equivalent to \fIperkb\fR\.
\fIminconf\fR specifies the minimum number of confirmations that used
outputs should have\. Default is 1\.
\fIutxos\fR specifies the utxos to be used to be withdrawn from, as an array
of "txid:vout"\. These must be drawn from the node's available UTXO set\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBtx\fR (hex): The raw transaction which was sent
.IP \[bu]
\fBtxid\fR (txid): The txid of the \fBtx\fR
.RE
On failure, an error is reported and the withdrawal transaction is not
created\.
The following error codes may occur:
.RS
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
301: There are not enough funds in the internal wallet (including
fees) to create the transaction\.
.IP \[bu]
302: The dust limit is not met\.
.RE
.SH AUTHOR
ZmnSCPxj \fI<ZmnSCPxj@protonmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-listfunds\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-newaddr\fR(7),
\fBlightning-txprepare\fR(7), \fBlightning-withdraw\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:0d0e1d364c4e436e33d3c15d4af7198591437cc2257ec646f3ebec0b90f54046

View File

@ -1,56 +0,0 @@
.TH "LIGHTNING-NEWADDR" "7" "" "" "lightning-newaddr"
.SH NAME
lightning-newaddr - Command for generating a new address to be used by c-lightning
.SH SYNOPSIS
\fBnewaddr\fR [ \fIaddresstype\fR ]
.SH DESCRIPTION
The \fBnewaddr\fR RPC command generates a new address which can
subsequently be used to fund channels managed by the c-lightning node\.
The funding transaction needs to be confirmed before funds can be used\.
\fIaddresstype\fR specifies the type of address wanted; i\.e\. \fIp2sh-segwit\fR
(e\.g\. \fB2MxaozoqWwiUcuD9KKgUSrLFDafLqimT9Ta\fR on bitcoin testnet or
\fB3MZxzq3jBSKNQ2e7dzneo9hy4FvNzmMmt3\fR on bitcoin mainnet) or \fIbech32\fR
(e\.g\. \fBtb1qu9j4lg5f9rgjyfhvfd905vw46eg39czmktxqgg\fR on bitcoin testnet
or \fBbc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej\fR on
bitcoin mainnet)\. The special value \fIall\fR generates both address types
for the same underlying key\.
If no \fIaddresstype\fR is specified the address generated is a \fIbech32\fR address\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBbech32\fR (string, optional): The bech32 (native segwit) address
.IP \[bu]
\fBp2sh-segwit\fR (string, optional): The p2sh-wrapped address
.RE
.SH ERRORS
If an unrecognized address type is requested an error message will be
returned\.
.SH AUTHOR
Felix \fI<fixone@gmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-listfunds\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-withdraw\fR(7), \fBlightning-listtransactions\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:f18774bcca3a39c5608f6623280e902b0e0316626e49c0e0ac759c619167bc7e

View File

@ -1,115 +0,0 @@
.TH "LIGHTNING-NOTIFICATIONS" "7" "" "" "lightning-notifications"
.SH NAME
lightning-notifications - Command to set up notifications\.
.SH SYNOPSIS
\fBnotifications\fR \fIenable\fR
.SH DESCRIPTION
The \fBnotifications\fR the RPC command enabled notifications for this JSON-RPC
connection\. By default (and for backwards-compatibility) notifications are
disabled\.
Various commands, especially complex and slow ones, offer
notifications which indicate their progress\.
.RS
.IP \[bu]
\fIenable\fR: \fItrue\fR to enable notifications, \fIfalse\fR to disable them\.
.RE
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "notifications",
"params": {
"enable": true
}
}
.RE
.fi
.SH NOTIFICATIONS
Notifications are JSON-RPC objects without an \fIid\fR field\. \fIlightningd\fR sends
notifications (once enabled with this \fInotifications\fR command) with a \fIparams\fR
\fIid\fR field indicating which command the notification refers to\.
Implementations should ignore notifications without an \fIid\fR parameter, or
unknown \fImethod\fR\.
Common \fImethod\fRs include:
.RS
.IP \[bu]
\fImessage\fR: param \fImessage\fR: a descriptional string indicating something
which occurred relating to the command\. Param \fIlevel\fR indicates the level,
as per \fBlightning-getlog\fR(7): \fIinfo\fR and \fIdebug\fR are typical\.
.IP \[bu]
\fIprogress\fR: param \fInum\fR and \fItotal\fR, where \fInum\fR starts at 0 and is always
less than \fItotal\fR\. Optional param \fIstage\fR with fields \fInum\fR and \fItotal\fR,
indicating what stage we are progressing through\.
.RE
.SH RETURN VALUE
On success, an empty object is returned\.
On success, if \fIenable\fR was \fItrue\fR, notifications will be forwarded
from then on\.
On failure, one of the following error codes may be returned:
.RS
.IP \[bu]
-32602: Error in given parameters\.
.RE
.SH EXAMPLE NOTIFICATIONS
.nf
.RS
{
"method": "message",
"params": {
"id": 83,
"message": "This is a test message",
"level": "DEBUG"
}
}
.RE
.fi
.nf
.RS
{
"method": "progress",
"params": {
"id": 83,
"num": 0,
"total": 30
"stage": {
"num": 0,
"total": 2
}
}
}
.RE
.fi
.SH AUTHOR
Rusty Russell \fI<rusty@blockstream.com\fR> wrote the initial version of this man page\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:651537a5b1e0c017bf362443ea346a762be510d94dffb5da761bdfc56047242a

162
doc/lightning-offer.7 generated
View File

@ -1,162 +0,0 @@
.TH "LIGHTNING-OFFER" "7" "" "" "lightning-offer"
.SH NAME
lightning-offer - Command for accepting payments
.SH SYNOPSIS
\fB(WARNING: experimental-offers only)\fR
\fBoffer\fR \fIamount\fR \fIdescription\fR [\fIvendor\fR] [\fIlabel\fR] [\fIquantity_min\fR] [\fIquantity_max\fR] [\fIabsolute_expiry\fR] [\fIrecurrence\fR] [\fIrecurrence_base\fR] [\fIrecurrence_paywindow\fR] [\fIrecurrence_limit\fR] [\fIsingle_use\fR]
.SH DESCRIPTION
The \fBoffer\fR RPC command creates an offer (or returns an existing
one), which is a precursor to creating one or more invoices\. It
automatically enables the processing of an incoming invoice_request,
and issuing of invoices\.
Note that it creates two variants of the offer: a signed and an
unsigned one (which is smaller)\. Wallets should accept both: the
current specification allows either\.
The \fIamount\fR parameter can be the string "any", which creates an offer
that can be paid with any amount (e\.g\. a donation)\. Otherwise it can
be a positive value in millisatoshi precision; it can be a whole
number, or a whole number ending in \fImsat\fR or \fIsat\fR, or a number with
three decimal places ending in \fIsat\fR, or a number with 1 to 11 decimal
places ending in \fIbtc\fR\.
\fIamount\fR can also have an ISO 4217 postfix (i\.e\. USD), in which case
currency conversion will need to be done for the invoice itself\. A
plugin is needed which provides the "currencyconvert" API for this
currency, otherwise the offer creation will fail\.
The \fIdescription\fR is a short description of purpose of the offer,
e\.g\. \fIcoffee\fR\. This value is encoded into the resulting offer and is
viewable by anyone you expose this offer to\. It must be UTF-8, and
cannot use \fI\u\fR JSON escape codes\.
The \fIvendor\fR is another (optional) field exposed in the offer, and
reflects who is issuing this offer (i\.e\. you) if appropriate\.
The \fIlabel\fR field is an internal-use name for the offer, which can
be any UTF-8 string\.
The present of \fIquantity_min\fR or \fIquantity_max\fR indicates that the
invoice can specify more than one of the items within this (inclusive)
range\. The \fIamount\fR for the invoice will need to be multiplied
accordingly\. These are encoded in the offer\.
The \fIabsolute_expiry\fR is optionally the time the offer is valid until,
in seconds since the first day of 1970 UTC\. If not set, the offer
remains valid (though it can be deactivated by the issuer of course)\.
This is encoded in the offer\.
\fIrecurrence\fR means that an invoice is expected at regular intervals\.
The argument is a positive number followed by one of "seconds",
"minutes", "hours", "days", "weeks", "months" or "years" (variants
without the trailing "s" are also permitted)\. This is encoded in the
offer\. The semantics of recurrence is fairly predictable, but fully
documented in BOLT 12\. e\.g\. "4weeks"\.
\fIrecurrence_base\fR is an optional time in seconds since the first day
of 1970 UTC, optionally with a "@" prefix\. This indicates when the
first period begins; without this, the recurrence periods start from
the first invoice\. The "@" prefix means that the invoice must start
by paying the first period; otherwise it is permitted to start at any
period\. This is encoded in the offer\. e\.g\. "@1609459200" indicates
you must start paying on the 1st January 2021\.
\fIrecurrence_paywindow\fR is an optional argument of form
'-time+time[%]'\. The first time is the number of seconds before the
start of a period in which an invoice and payment is valid, the second
time is the number of seconds after the start of the period\. For
example \fI-604800+86400\fR means you can fetch an pay the invoice 4 weeks
before the given period starts, and up to 1 day afterwards\. The
optional \fI%\fR indicates that the amount of the invoice will be scaled
by the time remaining in the period\. If this is not specified, the
default is that payment is allowed during the current and previous
periods\. This is encoded in the offer\.
\fIrecurrence_limit\fR is an optional argument to indicate the maximum
period which exists\. eg\. "12" means there are 13 periods, from 0 to
12 inclusive\. This is encoded in the offer\.
\fIrefund_for\fR is the payment_preimage of a previous (paid) invoice\.
This implies \fIsend_invoice\fR and \fIsingle_use\fR\. This is encoded in the
offer\.
\fIsingle_use\fR (default false) indicates that the offer is only valid
once; we may issue multiple invoices, but as soon as one is paid all other
invoices will be expired (i\.e\. only one person can pay this offer)\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBoffer_id\fR (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
.IP \[bu]
\fBactive\fR (boolean): whether this can still be used (always \fItrue\fR)
.IP \[bu]
\fBsingle_use\fR (boolean): whether this expires as soon as it's paid (reflects the \fIsingle_use\fR parameter)
.IP \[bu]
\fBbolt12\fR (string): the bolt12 encoding of the offer
.IP \[bu]
\fBbolt12_unsigned\fR (string): the bolt12 encoding of the offer, without a signature
.IP \[bu]
\fBused\fR (boolean): True if an associated invoice has been paid
.IP \[bu]
\fBcreated\fR (boolean): false if the offer already existed
.IP \[bu]
\fBlabel\fR (string, optional): the (optional) user-specified label
.RE
On failure, an error is returned and no offer is created\. If the
lightning process fails before responding, the caller should use
\fBlightning-listoffers\fR(7) to query whether this offer was created or
not\.
If the offer already existed, and is still active, that is returned;
if it's not active then this call fails\.
The following error codes may occur:
.RS
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
1000: Offer with this offer_id already exists (but is not active)\.
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-offerout\fR(7), \fBlightning-listoffers\fR(7), \fBlightning-disableoffer\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:caa067d4f2b43e99445f165545fe98593402fbb6f10d939067ed2bc963e3fdc3

118
doc/lightning-offerout.7 generated
View File

@ -1,118 +0,0 @@
.TH "LIGHTNING-OFFEROUT" "7" "" "" "lightning-offerout"
.SH NAME
lightning-offerout - Command for offering payments
.SH SYNOPSIS
\fB(WARNING: experimental-offers only)\fR
\fBofferout\fR \fIamount\fR \fIdescription\fR [\fIvendor\fR] [\fIlabel\fR] [\fIabsolute_expiry\fR] [\fIrefund_for\fR]
.SH DESCRIPTION
The \fBofferout\fR RPC command creates an offer, which is a request to
send an invoice for us to pay (technically, this is referred to as a
\fBsend_invoice\fR offer to distinguish a normal \fBlightningd-offer\fR(7)
offer)\. It automatically enables the accepting and payment of
corresponding invoice message (we will only pay once, however!)\.
Note that it creates two variants of the offer: a signed and an
unsigned one (which is smaller)\. Wallets should accept both: the
current specification allows either\.
The \fIamount\fR parameter can be the string "any", which creates an offer
that can be paid with any amount (e\.g\. a donation)\. Otherwise it can
be a positive value in millisatoshi precision; it can be a whole
number, or a whole number ending in \fImsat\fR or \fIsat\fR, or a number with
three decimal places ending in \fIsat\fR, or a number with 1 to 11 decimal
places ending in \fIbtc\fR\.
The \fIdescription\fR is a short description of purpose of the offer,
e\.g\. \fIwithdrawl from ATM\fR\. This value is encoded into the resulting offer and is
viewable by anyone you expose this offer to\. It must be UTF-8, and
cannot use \fI\u\fR JSON escape codes\.
The \fIvendor\fR is another (optional) field exposed in the offer, and
reflects who is issuing this offer (i\.e\. you) if appropriate\.
The \fIlabel\fR field is an internal-use name for the offer, which can
be any UTF-8 string\.
The \fIabsolute_expiry\fR is optionally the time the offer is valid until,
in seconds since the first day of 1970 UTC\. If not set, the offer
remains valid (though it can be deactivated by the issuer of course)\.
This is encoded in the offer\.
\fIrefund_for\fR is a previous (paid) invoice of ours\. The
payment_preimage of this is encoded in the offer, and redemption
requires that the invoice we receive contains a valid signature using
that previous \fBpayer_key\fR\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBoffer_id\fR (hex): the id of this offer (merkle hash of non-signature fields) (always 64 characters)
.IP \[bu]
\fBactive\fR (boolean): whether this will pay a matching incoming invoice (always \fItrue\fR)
.IP \[bu]
\fBsingle_use\fR (boolean): whether this expires as soon as it's paid out (always \fItrue\fR)
.IP \[bu]
\fBbolt12\fR (string): the bolt12 encoding of the offer
.IP \[bu]
\fBbolt12_unsigned\fR (string): the bolt12 encoding of the offer, without a signature
.IP \[bu]
\fBused\fR (boolean): True if an incoming invoice has been paid (always \fIfalse\fR)
.IP \[bu]
\fBcreated\fR (boolean): false if the offer already existed
.IP \[bu]
\fBlabel\fR (string, optional): the (optional) user-specified label
.RE
On failure, an error is returned and no offer is created\. If the
lightning process fails before responding, the caller should use
\fBlightning-listoffers\fR(7) to query whether this offer was created or
not\.
The following error codes may occur:
.RS
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
1000: Offer with this offer_id already exists\.
.RE
.SH NOTES
The specification allows quantity, recurrence and alternate currencies on
offers which contain \fBsend_invoice\fR, but these are not implemented here\.
We could also allow multi-use offers, but usually you're only offering to
send money once\.
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-sendinvoice\fR(7), \fBlightning-offer\fR(7), \fBlightning-listoffers\fR(7), \fBlightning-disableoffer\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:375120b2e154a5421745b2e0ab0e4f869f375e68cdd78e42d4a6ff0343064b41

View File

@ -1,63 +0,0 @@
.TH "LIGHTNING-OPENCHANNEL_ABORT" "7" "" "" "lightning-openchannel_abort"
.SH NAME
lightning-openchannel_abort - Command to abort a channel to a peer
.SH SYNOPSIS
\fBopenchannel_abort\fR \fIchannel_id\fR
.SH DESCRIPTION
\fBopenchannel_init\fR is a low level RPC command which initiates a channel
open with a specified peer\. It uses the openchannel protocol
which allows for interactive transaction construction\.
\fIchannel_id\fR is id of this channel\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBchannel_id\fR (hex): the channel id of the aborted channel (always 64 characters)
.IP \[bu]
\fBchannel_canceled\fR (boolean): whether this is completely canceled (there may be remaining in-flight transactions)
.IP \[bu]
\fBreason\fR (string): usually "Abort requested", but if it happened to fail at the same time it could be different
.RE
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
with \fBcode\fR being one of the following:
.RS
.IP \[bu]
-32602: If the given parameters are wrong\.
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
305: Peer is not connected\.
.IP \[bu]
311: Unknown channel id\.
.IP \[bu]
312: Channel in an invalid state
.RE
.SH SEE ALSO
lightning-openchannel_\fBinit\fR(7), lightning-openchannel_\fBupdate\fR(7),
lightning-openchannel_\fBsigned\fR(7), lightning-openchannel_\fBbump\fR(7),
lightning-fundchannel_\fBstart\fR(7), lightning-fundchannel_\fBcomplete\fR(7),
\fBlightning-fundchannel\fR(7), \fBlightning-fundpsbt\fR(7), \fBlightning-utxopsbt\fR(7),
\fBlightning-multifundchannel\fR(7)
.SH AUTHOR
@niftynei \fI<niftynei@gmail.com\fR> is mainly responsible\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:cb9f65567c0517ba63deb4afe1f6d625f83b13cfdfa422820ae36024d3a5a83f

View File

@ -1,100 +0,0 @@
.TH "LIGHTNING-OPENCHANNEL_BUMP" "7" "" "" "lightning-openchannel_bump"
.SH NAME
lightning-openchannel_bump - Command to initiate a channel RBF
.SH SYNOPSIS
\fBopenchannel_bump\fR \fIchannel_id\fR \fIamount\fR \fIinitalpsbt\fR [\fIfunding_feerate\fR]
.SH DESCRIPTION
\fBopenchannel_bump\fR is a RPC command which initiates a channel
RBF (Replace-By-Fee) for the specified channel\. It uses the openchannel protocol
which allows for interactive transaction construction\.
\fIid\fR is the id of the channel to RBF\.
\fIamount\fR is the satoshi value that we will contribute to the channel\.
This value will be \fIadded\fR to the provided PSBT in the output which is
encumbered by the 2-of-2 script for this channel\.
\fIinitialpsbt\fR is the funded, incomplete PSBT that specifies the UTXOs and
change output for our channel contribution\. It can be updated,
see \fBopenchannel_update\fR; \fIinitialpsbt\fR must have at least one input\.
Must have the Non-Witness UTXO (PSBT_IN_NON_WITNESS_UTXO) set for
every input\. An error (code 309) will be returned if this requirement
is not met\.
\fIfunding_feerate\fR is an optional field\. Sets the feerate for the
funding transaction\. Defaults to 1/64th greater than the last
feerate used for this channel\.
Warning: bumping a leased channel will lose the lease\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBchannel_id\fR (hex): the channel id of the channel (always 64 characters)
.IP \[bu]
\fBpsbt\fR (string): the (incomplete) PSBT of the RBF transaction
.IP \[bu]
\fBcommitments_secured\fR (boolean): whether the \fIpsbt\fR is complete (always \fIfalse\fR)
.IP \[bu]
\fBfunding_serial\fR (u64): the serial_id of the funding output in the \fIpsbt\fR
.RE
If the peer does not support \fBoption_dual_fund\fR, this command
will return an error\.
If the channel is not in a state that is eligible for RBF, this command
will return an error\.
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
with \fBcode\fR being one of the following:
.RS
.IP \[bu]
-32602: If the given parameters are wrong\.
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
300: The amount exceeded the maximum configured funding amount\.
.IP \[bu]
301: The provided PSBT cannot afford the funding amount\.
.IP \[bu]
305: Peer is not connected\.
.IP \[bu]
309: PSBT missing required fields
.IP \[bu]
311: Unknown channel id\.
.IP \[bu]
312: Channel in an invalid state
.RE
.SH SEE ALSO
lightning-openchannel_\fBinit\fR(7), lightning-openchannel_\fBupdate\fR(7),
lightning-openchannel_\fBsigned\fR(7), lightning-openchannel_\fBabort\fR(7),
lightning-fundchannel_\fBstart\fR(7), lightning-fundchannel_\fBcomplete\fR(7),
\fBlightning-fundchannel\fR(7), \fBlightning-fundpsbt\fR(7), \fBlightning-utxopsbt\fR(7),
\fBlightning-multifundchannel\fR(7)
.SH AUTHOR
@niftynei \fI<niftynei@gmail.com\fR> is mainly responsible\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:eb53ca6e98a83063ac523123871b8bc32b0c9e60d0601d036883e7e7ee07177d

View File

@ -1,127 +0,0 @@
.TH "LIGHTNING-OPENCHANNEL_INIT" "7" "" "" "lightning-openchannel_init"
.SH NAME
lightning-openchannel_init - Command to initiate a channel to a peer
.SH SYNOPSIS
\fBopenchannel_init\fR \fIid\fR \fIamount\fR \fIinitalpsbt\fR [\fIcommitment_feerate\fR] [\fIfunding_feerate\fR] [\fIannounce\fR] [\fIclose_to\fR] [\fIrequest_amt\fR] [\fIcompact_lease\fR]
.SH DESCRIPTION
\fBopenchannel_init\fR is a low level RPC command which initiates a channel
open with a specified peer\. It uses the openchannel protocol
which allows for interactive transaction construction\.
\fIid\fR is the node id of the remote peer\.
\fIamount\fR is the satoshi value that we will contribute to the channel\.
This value will be \fIadded\fR to the provided PSBT in the output which is
encumbered by the 2-of-2 script for this channel\.
\fIinitialpsbt\fR is the funded, incomplete PSBT that specifies the UTXOs and
change output for our channel contribution\. It can be updated,
see \fBopenchannel_update\fR; \fIinitialpsbt\fR must have at least one input\.
Must have the Non-Witness UTXO (PSBT_IN_NON_WITNESS_UTXO) set for
every input\. An error (code 309) will be returned if this requirement
is not met\.
\fIcommitment_feerate\fR is an optional field\. Sets the feerate for
commitment transactions: see \fBfundchannel\fR\.
\fIfunding_feerate\fR is an optional field\. Sets the feerate for the
funding transaction\. Defaults to 'opening' feerate\.
\fIannounce\fR is an optional field\. Whether or not to announce this channel\.
\fIclose_to\fR is a Bitcoin address to which the channel funds should be
sent on close\. Only valid if both peers have negotiated
\fBoption_upfront_shutdown_script\fR\.
\fIrequest_amt\fR is an amount of liquidity you'd like to lease from the peer\.
If peer supports \fBoption_will_fund\fR, indicates to them to include this
much liquidity into the channel\. Must also pass in \fIcompact_lease\fR\.
\fIcompact_lease\fR is a compact represenation of the peer's expected
channel lease terms\. If the peer's terms don't match this set, we will
fail to open the channel\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBchannel_id\fR (hex): the channel id of the channel (always 64 characters)
.IP \[bu]
\fBpsbt\fR (string): the (incomplete) PSBT of the funding transaction
.IP \[bu]
\fBcommitments_secured\fR (boolean): whether the \fIpsbt\fR is complete (always \fIfalse\fR)
.IP \[bu]
\fBfunding_serial\fR (u64): the serial_id of the funding output in the \fIpsbt\fR
.RE
If the peer does not support \fBoption_dual_fund\fR, this command
will return an error\.
If you sent a \fIrequest_amt\fR and the peer supports \fBoption_will_fund\fR and is
interested in leasing you liquidity in this channel, returns their updated
channel fee max (\fIchannel_fee_proportional_basis\fR, \fIchannel_fee_base_msat\fR),
updated rate card for the lease fee (\fIlease_fee_proportional_basis\fR,
\fIlease_fee_base_sat\fR) and their on-chain weight \fIweight_charge\fR, which will
be added to the lease fee at a rate of \fIfunding_feerate\fR \fI \fRweight_charge*
/ 1000\.
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
with \fBcode\fR being one of the following:
.RS
.IP \[bu]
-32602: If the given parameters are wrong\.
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
300: The amount exceeded the maximum configured funding amount\.
.IP \[bu]
301: The provided PSBT cannot afford the funding amount\.
.IP \[bu]
304: Still syncing with bitcoin network
.IP \[bu]
305: Peer is not connected\.
.IP \[bu]
306: Unknown peer id\.
.IP \[bu]
309: PSBT missing required fields
.IP \[bu]
310: v2 channel open protocol not supported by peer
.IP \[bu]
312: Channel in an invalid state
.RE
.SH SEE ALSO
lightning-openchannel_\fBupdate\fR(7), lightning-openchannel_\fBsigned\fR(7),
lightning-openchannel_\fBabort\fR(7), lightning-openchannel_\fBbump\fR(7),
lightning-fundchannel_\fBstart\fR(7),
lightning-fundchannel_\fBcomplete\fR(7), \fBlightning-fundchannel\fR(7),
\fBlightning-fundpsbt\fR(7), \fBlightning-utxopsbt\fR(7), \fBlightning-multifundchannel\fR(7)
.SH AUTHOR
@niftynei \fI<niftynei@gmail.com\fR> is mainly responsible\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:5aa606f1cfdd1de3c346bb010a5c8b8477908f4d70901db4f3b3e307ac387ffa

View File

@ -1,81 +0,0 @@
.TH "LIGHTNING-OPENCHANNEL_SIGNED" "7" "" "" "lightning-openchannel_signed"
.SH NAME
lightning-openchannel_signed - Command to conclude a channel open
.SH SYNOPSIS
\fBopenchannel_signed\fR \fIchannel_id\fR \fIsigned_psbt\fR
.SH DESCRIPTION
\fBopenchannel_signed\fR is a low level RPC command which concludes a channel
open with the specified peer\. It uses the v2 openchannel protocol, which
allows for interactive transaction construction\.
This command should be called after \fBopenchannel_update\fR returns
\fIcommitments_secured\fR \fBtrue\fR\.
This command will broadcast the finalized funding transaction,
if we receive valid signatures from the peer\.
\fIchannel_id\fR is the id of the channel\.
\fIsigned_psbt\fR is the PSBT returned from \fBopenchannel_update\fR (where
\fIcommitments_secured\fR was true) with partial signatures or finalized
witness stacks included for every input that we contributed to the
PSBT\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBchannel_id\fR (hex): the channel id of the channel (always 64 characters)
.IP \[bu]
\fBtx\fR (hex): the funding transaction
.IP \[bu]
\fBtxid\fR (txid): The txid of the \fBtx\fR
.RE
On error, the returned object will contain \fBcode\fR and \fBmessage\fR properties,
with \fBcode\fR being one of the following:
.RS
.IP \[bu]
-32602: If the given parameters are wrong\.
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
303: Funding transaction broadcast failed\.
.IP \[bu]
305: Peer is not connected\.
.IP \[bu]
309: PSBT missing required fields\.
.IP \[bu]
311: Unknown channel id\.
.IP \[bu]
312: Channel in an invalid state
.RE
.SH SEE ALSO
lightning-openchannel_\fBinit\fR(7), lightning-openchannel_\fBupdate\fR(7),
lightning-openchannel_\fBabort\fR(7), lightning-openchannel_\fBbump\fR(7),
lightning-fundchannel_\fBstart\fR(7), lightning-fundchannel_\fBcomplete\fR(7),
\fBlightning-fundchannel\fR(7), \fBlightning-fundpsbt\fR(7),
\fBlightning-utxopsbt\fR(7), \fBlightning-multifundchannel\fR(7)
.SH AUTHOR
@niftynei \fI<niftynei@gmail.com\fR> is mainly responsible\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:b41890ddae64449f218338b0d211358a3b6fb006cd11f2dc10adc7b7e660ee07

View File

@ -1,92 +0,0 @@
.TH "LIGHTNING-OPENCHANNEL_UPDATE" "7" "" "" "lightning-openchannel_update"
.SH NAME
lightning-openchannel_update - Command to update a collab channel open
.SH SYNOPSIS
\fBopenchannel_update\fR \fIchannel_id\fR \fIpsbt\fR
.SH DESCRIPTION
\fBopenchannel_update\fR is a low level RPC command which continues an open
channel, as specified by \fIchannel_id\fR\. An updated \fIpsbt\fR is passed in; any
changes from the PSBT last returned (either from \fBopenchannel_init\fR or
a previous call to \fBopenchannel_update\fR) will be communicated to the peer\.
Must be called after \fBopenchannel_init\fR and before \fBopenchannel_signed\fR\.
Must be called until \fIcommitments_secured\fR is returned as true, at which point
\fBopenchannel_signed\fR should be called with a signed version of the PSBT
returned by the last call to \fBopenchannel_update\fR\.
\fIchannel_id\fR is the id of the channel\.
\fIpsbt\fR is the updated PSBT to be sent to the peer\. May be identical to
the PSBT last returned by either \fBopenchannel_init\fR or \fBopenchannel_update\fR\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBchannel_id\fR (hex): the channel id of the channel (always 64 characters)
.IP \[bu]
\fBpsbt\fR (string): the PSBT of the funding transaction
.IP \[bu]
\fBcommitments_secured\fR (boolean): whether the \fIpsbt\fR is complete (if true, sign \fIpsbt\fR and call \fBopenchannel_signed\fR to complete the channel open)
.IP \[bu]
\fBfunding_outnum\fR (u32): The index of the funding output in the psbt
.IP \[bu]
\fBclose_to\fR (hex, optional): scriptPubkey which we have to close to if we mutual close
.RE
If \fIcommitments_secured\fR is true, will also return:
.RS
.IP \[bu]
The derived \fIchannel_id\fR\.
.IP \[bu]
A \fIclose_to\fR script, iff a \fBclose_to\fR address was provided to
\fBopenchannel_init\fR and the peer supports \fBoption_upfront_shutdownscript\fR\.
.IP \[bu]
The \fIfunding_outnum\fR, the index of the funding output for this channel
in the funding transaction\.
.RE
.RS
.IP \[bu]
-32602: If the given parameters are wrong\.
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
305: Peer is not connected\.
.IP \[bu]
309: PSBT missing required fields
.IP \[bu]
311: Unknown channel id\.
.IP \[bu]
312: Channel in an invalid state
.RE
.SH SEE ALSO
lightning-openchannel_\fBinit\fR(7), lightning-openchannel_\fBsigned\fR(7),
lightning-openchannel_\fBbump\fR(7), lightning-openchannel_\fBabort\fR(7),
lightning-fundchannel_\fBstart\fR(7), lightning-fundchannel_\fBcomplete\fR(7),
\fBlightning-fundchannel\fR(7), \fBlightning-fundpsbt\fR(7), \fBlightning-utxopsbt\fR(7),
\fBlightning-multifundchannel\fR(7)
.SH AUTHOR
@niftynei \fI<niftynei@gmail.com\fR> is mainly responsible\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:1fefdbe12a003eb46b52eeb0947ebb23f1c92e450b2452fd29c8e0e6a4386f4b

View File

@ -1,44 +0,0 @@
.TH "LIGHTNING-PARSEFEERATE" "7" "" "" "lightning-parsefeerate"
.SH NAME
lightning-parsefeerate - Command for parsing a feerate string to a feerate
.SH SYNOPSIS
\fBparsefeerate\fR \fIfeerate_str\fR
.SH DESCRIPTION
The \fBparsefeerate\fR command returns the current feerate for any valid
\fIfeerate_str\fR\. This is useful for finding the current feerate that a
\fBfundpsbt\fR or \fButxopsbt\fR command might use\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBperkw\fR (u32, optional): Value of \fIfeerate_str\fR in kilosipa
.RE
.SH ERRORS
The \fBparsefeerate\fR command will error if the \fIfeerate_str\fR format is
not recognized\.
.RS
.IP \[bu]
-32602: If the given parameters are wrong\.
.RE
.SH TRIVIA
In C-lightning we like to call the weight unit "sipa"
in honor of Pieter Wuille,
who uses the name "sipa" on IRC and elsewhere\.
Internally we call the \fIperkw\fR style as "feerate per kilosipa"\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:f2ab6dcbc7dcb19dde468e243a1d236d96d48e3f175282b7a92c9fff6cbbaa14

185
doc/lightning-pay.7 generated
View File

@ -1,185 +0,0 @@
.TH "LIGHTNING-PAY" "7" "" "" "lightning-pay"
.SH NAME
lightning-pay - Command for sending a payment to a BOLT11 invoice
.SH SYNOPSIS
\fBpay\fR \fIbolt11\fR [\fImsatoshi\fR] [\fIlabel\fR] [\fIriskfactor\fR]
[\fImaxfeepercent\fR] [\fIretry_for\fR] [\fImaxdelay\fR] [\fIexemptfee\fR]
.SH DESCRIPTION
The \fBpay\fR RPC command attempts to find a route to the given
destination, and send the funds it asks for\. If the \fIbolt11\fR does not
contain an amount, \fImsatoshi\fR is required, otherwise if it is specified
it must be \fInull\fR\. \fImsatoshi\fR is in millisatoshi precision; it can be a
whole number, or a whole number with suffix \fImsat\fR or \fIsat\fR, or a three
decimal point number with suffix \fIsat\fR, or an 1 to 11 decimal point
number suffixed by \fIbtc\fR\.
(Note: if \fBexperimental-offers\fR is enabled, \fIbolt11\fR can actually be
a bolt12 invoice, such as one received from \fBlightningd-fetchinvoice\fR(7))\.
The \fIlabel\fR field is used to attach a label to payments, and is returned
in \fBlightning-listpays\fR(7) and \fBlightning-listsendpays\fR(7)\. The \fIriskfactor\fR
is described in detail in \fBlightning-getroute\fR(7), and defaults to 10\. The
\fImaxfeepercent\fR limits the money paid in fees, and defaults to 0\.5\. The
\fBmaxfeepercent\fR is a percentage of the amount that is to be paid\. The \fBexemptfee\fR
option can be used for tiny payments which would be dominated by the fee
leveraged by forwarding nodes\. Setting \fBexemptfee\fR allows the
\fBmaxfeepercent\fR check to be skipped on fees that are smaller than
\fBexemptfee\fR (default: 5000 millisatoshi)\.
The response will occur when the payment fails or succeeds\. Once a
payment has succeeded, calls to \fBpay\fR with the same \fIbolt11\fR will
succeed immediately\.
Until \fIretry_for\fR seconds passes (default: 60), the command will keep
finding routes and retrying the payment\. However, a payment may be
delayed for up to \fBmaxdelay\fR blocks by another node; clients should be
prepared for this worst case\.
When using \fIlightning-cli\fR, you may skip optional parameters by using
\fInull\fR\. Alternatively, use \fB-k\fR option to provide parameters by name\.
.SH RANDOMIZATION
To protect user privacy, the payment algorithm performs some
randomization\.
1: Route Randomization
Route randomization means the payment algorithm does not always use the
lowest-fee or shortest route\. This prevents some highly-connected node
from learning all of the user payments by reducing their fees below the
network average\.
2: Shadow Route
Shadow route means the payment algorithm will virtually extend the route
by adding delays and fees along it, making it appear to intermediate nodes
that the route is longer than it actually is\. This prevents intermediate
nodes from reliably guessing their distance from the payee\.
Route randomization will never exceed \fImaxfeepercent\fR of the payment\.
Route randomization and shadow routing will not take routes that would
exceed \fImaxdelay\fR\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBpayment_preimage\fR (hex): the proof of payment: SHA256 of this \fBpayment_hash\fR (always 64 characters)
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
.IP \[bu]
\fBcreated_at\fR (number): the UNIX timestamp showing when this payment was initiated
.IP \[bu]
\fBparts\fR (u32): how many attempts this took
.IP \[bu]
\fBamount_msat\fR (msat): Amount the recipient received
.IP \[bu]
\fBamount_sent_msat\fR (msat): Total amount we sent (including fees)
.IP \[bu]
\fBstatus\fR (string): status of payment (always "complete")
.IP \[bu]
\fBdestination\fR (pubkey, optional): the final destination of the payment
.RE
The following warnings may also be returned:
.RS
.IP \[bu]
\fBwarning_partial_completion\fR: Not all parts of a multi-part payment have completed
.RE
You can monitor the progress and retries of a payment using the
\fBlightning-paystatus\fR(7) command\.
The following error codes may occur:
.RS
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
201: Already paid with this \fIhash\fR using different amount or
destination\.
.IP \[bu]
203: Permanent failure at destination\. The \fIdata\fR field of the error
will be routing failure object\.
.IP \[bu]
205: Unable to find a route\.
.IP \[bu]
206: Route too expensive\. Either the fee or the needed total
locktime for the route exceeds your \fImaxfeepercent\fR or \fImaxdelay\fR
settings, respectively\. The \fIdata\fR field of the error will indicate
the actual \fIfee\fR as well as the \fIfeepercent\fR percentage that the fee
has of the destination payment amount\. It will also indicate the
actual \fIdelay\fR along the route\.
.IP \[bu]
207: Invoice expired\. Payment took too long before expiration, or
already expired at the time you initiated payment\. The \fIdata\fR field
of the error indicates \fInow\fR (the current time) and \fIexpiry\fR (the
invoice expiration) as UNIX epoch time in seconds\.
.IP \[bu]
210: Payment timed out without a payment in progress\.
.RE
Error codes 202 and 204 will only get reported at \fBsendpay\fR; in
\fBpay\fR we will keep retrying if we would have gotten those errors\.
A routing failure object has the fields below:
.RS
.IP \[bu]
\fIerring_index\fR: The index of the node along the route that reported
the error\. 0 for the local node, 1 for the first hop, and so on\.
.IP \[bu]
\fIerring_node\fR: The hex string of the pubkey id of the node that
reported the error\.
.IP \[bu]
\fIerring_channel\fR: The short channel ID of the channel that has the
error, or \fI0:0:0\fR if the destination node raised the error\.
.IP \[bu]
\fIfailcode\fR: The failure code, as per BOLT #4\.
.IP \[bu]
\fIchannel_update\fR\. The hex string of the \fIchannel_update\fR message
received from the remote node\. Only present if error is from the
remote node and the \fIfailcode\fR has the UPDATE bit set, as per BOLT #4\.
.RE
The \fIdata\fR field of errors will include statistics \fIgetroute_tries\fR and
\fIsendpay_tries\fR\. It will also contain a \fIfailures\fR field with detailed
data about routing errors\.
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-listpays\fR(7), \fBlightning-decodepay\fR(7), \fBlightning-listinvoice\fR(7),
\fBlightning-delinvoice\fR(7), \fBlightning-getroute\fR(7), \fBlightning-invoice\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:be8510fe40dfd6ed80effab84c777b43879dfccdef6c7aef8a29697f385a07ed

73
doc/lightning-ping.7 generated
View File

@ -1,73 +0,0 @@
.TH "LIGHTNING-PING" "7" "" "" "lightning-ping"
.SH NAME
lightning-ping - Command to check if a node is up\.
.SH SYNOPSIS
\fBping\fR \fIid\fR [len] [pongbytes]
.SH DESCRIPTION
The \fBping\fR command checks if the node with \fIid\fR is ready to talk\. It accepts the following parameters:
.RS
.IP \[bu]
\fIid\fR: A string that represents the node id;
.IP \[bu]
\fIlen\fR: A integer that represents the length of the ping (default 128);
.IP \[bu]
\fIpongbytes\fR: An integer that represents the length of the reply (default 128)\.
.RE
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "ping",
"params": {
"len": 128,
"pongbytes": 128
}
}
.RE
.fi
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBtotlen\fR (u16): the answer length of the reply message (including header: 0 means no reply expected)
.RE
On failure, one of the following error codes may be returned:
.RS
.IP \[bu]
-32602: Error in given parameters or unknown peer\.
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"totlen": 132
}
.RE
.fi
.SH AUTHOR
Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\.
.SH SEE ALSO
\fBlightning-connect\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:8d8c540f082ae2c5444b246ede1b32c6b29861c1d84dc1850ae7e64b2466f4b6

83
doc/lightning-plugin.7 generated
View File

@ -1,83 +0,0 @@
.TH "LIGHTNING-PLUGIN" "7" "" "" "lightning-plugin"
.SH NAME
lightning-plugin - Manage plugins with RPC
.SH SYNOPSIS
\fBplugin\fR command [parameter] [second_parameter]
.SH DESCRIPTION
The \fBplugin\fR RPC command allows to manage plugins without having to
restart lightningd\. It takes 1 to 3 parameters: a command
(start/stop/startdir/rescan/list) which describes the action to take and
optionally one or two parameters which describes the plugin on which the
action has to be taken\.
The \fIstart\fR command takes a path as the first parameter and will load
the plugin available from this path\. Any additional parameters are
passed to the plugin\. It will wait for the plugin to complete the
handshake with \fBlightningd\fR for 20 seconds at the most\.
The \fIstop\fR command takes a plugin name as parameter\. It will kill and
unload the specified plugin\.
The \fIstartdir\fR command takes a directory path as first parameter and will
load all plugins this directory contains\. It will wait for each plugin to
complete the handshake with \fBlightningd\fR for 20 seconds at the most\.
The \fIrescan\fR command starts all not-already-loaded plugins from the
default plugins directory (by default \fI~/\.lightning/plugins\fR)\.
The \fIlist\fR command will return all the active plugins\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBcommand\fR (string): the subcommand this is responding to (one of "start", "stop", "rescan", "startdir", "list")
.RE
If \fBcommand\fR is "start", "startdir", "rescan" or "list":
.RS
.IP \[bu]
\fBplugins\fR (array of objects):
.RS
.IP \[bu]
\fBname\fR (string): full pathname of the plugin
.IP \[bu]
\fBactive\fR (boolean): status; since plugins are configured asynchronously, a freshly started plugin may not appear immediately\.
.RE
.RE
If \fBcommand\fR is "stop":
.RS
.IP \[bu]
\fBresult\fR (string): A message saying it successfully stopped
.RE
On error, the reason why the action could not be taken upon the
plugin is returned\.
.SH AUTHOR
Antoine Poinsot \fI<darosior@protonmail.com\fR> is mainly responsible\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:27dda2bc4ba10a2965bd0b96f5e90d96303c34fb87f40c35ab3dbdd6eddacfa7

View File

@ -1,81 +0,0 @@
.TH "LIGHTNING-RESERVEINPUTS" "7" "" "" "lightning-reserveinputs"
.SH NAME
lightning-reserveinputs - Construct a transaction and reserve the UTXOs it spends
.SH SYNOPSIS
\fBreserveinputs\fR \fIpsbt\fR [\fIexclusive\fR] [\fIreserve\fR]
.SH DESCRIPTION
The \fBreserveinputs\fR RPC command places (or increases) reservations on any
inputs specified in \fIpsbt\fR which are known to lightningd\. It will fail
with an error if any of the inputs are known to be spent, and ignore inputs
which are unknown\.
Normally the command will fail (with no reservations made) if an input
is already reserved\. If \fIexclusive\fR is set to \fIFalse\fR, then existing
reservations are simply extended, rather than causing failure\.
By default, reservations are for the next 72 blocks (approximately 6
hours), but this can be changed by setting \fIreserve\fR\.
.SH RETURN VALUE
On success, an object containing \fBreservations\fR is returned\. It is an array of objects, where each object contains:
.RS
.IP \[bu]
\fBtxid\fR (txid): the transaction id
.IP \[bu]
\fBvout\fR (u32): the output number which was reserved
.IP \[bu]
\fBwas_reserved\fR (boolean): whether the input was already reserved
.IP \[bu]
\fBreserved\fR (boolean): whether the input is now reserved (always \fItrue\fR)
.IP \[bu]
\fBreserved_to_block\fR (u32): what blockheight the reservation will expire
.RE
On success, a \fIreservations\fR array is returned, with an entry for each input
which was reserved:
.RS
.IP \[bu]
\fItxid\fR is the input transaction id\.
.IP \[bu]
\fIvout\fR is the input index\.
.IP \[bu]
\fIwas_reserved\fR indicates whether the input was already reserved\.
.IP \[bu]
\fIreserved\fR indicates that the input is now reserved (i\.e\. true)\.
.IP \[bu]
\fIreserved_to_block\fR indicates what blockheight the reservation will expire\.
.RE
On failure, an error is reported and no UTXOs are reserved\.
The following error codes may occur:
.RS
.IP \[bu]
-32602: Invalid parameter, such as specifying a spent/reserved input in \fIpsbt\fR\.
.RE
.SH AUTHOR
niftynei \fI<niftynei@gmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-unreserveinputs\fR(7), \fBlightning-signpsbt\fR(7), \fBlightning-sendpsbt\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:2bfe105517873caed097f1ec009dfda2ecfb561d57b2f31208a7e12a4645ee5e

View File

@ -1,71 +0,0 @@
.TH "LIGHTNING-SENDCUSTOMMSG" "7" "" "" "lightning-sendcustommsg"
.SH NAME
lightning-sendcustommsg - Low-level interface to send protocol messages to peers
.SH SYNOPSIS
\fBsendcustommsg\fR \fInode_id\fR \fImsg\fR
.SH DESCRIPTION
The \fBsendcustommsg\fR RPC method allows the user to inject a custom message
into the communication with the peer with the given \fBnode_id\fR\. This is
intended as a low-level interface to implement custom protocol extensions on
top, not for direct use by end-users\.
The message must be a hex encoded well-formed message, including the 2-byte
type prefix, but excluding the length prefix which will be added by the RPC
method\. The messages must not use even-numbered types, since these may require
synchronous handling on the receiving side, and can cause the connection to be
dropped\. The message types may also not use one of the internally handled
types, since that may cause issues with the internal state tracking of
c-lightning\.
The node specified by \fBnode_id\fR must be a peer, i\.e\., it must have a direct
connection with the node receiving the RPC call, and the connection must be
established\. For a method to send arbitrary messages over multiple hops,
including hops that do not understand the custom message, see the
\fBcreateonion\fR and \fBsendonion\fR RPC methods\. Messages can only be injected if
the connection is handled by \fBopeningd\fR or \fBchanneld\fR\. Messages cannot be
injected when the peer is handled by \fBonchaind\fR or \fBclosingd\fR since these do
not have a connection, or are synchronous daemons that do not handle
spontaneous messages\.
On the reveiving end a plugin may implement the \fBcustommsg\fR plugin hook and
get notified about incoming messages\.
.SH RETURN VALUE
The method will validate the arguments and queue the message for delivery
through the daemon that is currently handling the connection\. Queuing provides
best effort guarantees and the message may not be delivered if the connection
is terminated while the message is queued\. The RPC method will return as soon
as the message is queued\.
If any of the above limitations is not respected the method returns an
explicit error message stating the issue\.
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBstatus\fR (string): Information about where message was queued
.RE
.SH AUTHOR
Christian Decker \fI<decker.christian@gmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-createonion\fR(7), \fBlightning-sendonion\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:d23b71ad2b8eaa6fc99d4871054a9ebdc1e9592d4d9538e1d2bc5705d64b83fd

View File

@ -1,106 +0,0 @@
.TH "LIGHTNING-SENDINVOICE" "7" "" "" "lightning-sendinvoice"
.SH NAME
lightning-sendinvoice - Command for send an invoice for an offer
.SH SYNOPSIS
\fB(WARNING: experimental-offers only)\fR
\fBsendinvoice\fR \fIoffer\fR \fIlabel\fR [\fImsatoshi\fR] [\fItimeout\fR] [\fIquantity\fR]
.SH DESCRIPTION
The \fBsendinvoice\fR RPC command creates and sends an invoice to the
issuer of an \fIoffer\fR for it to pay: the offer must contain
\fIsend_invoice\fR; see \fBlightning-fetchinvoice\fR(7)\.
If \fBfetchinvoice-noconnect\fR is not specified in the configuation, it
will connect to the destination in the (currently common!) case where it
cannot find a route which supports \fBoption_onion_messages\fR\.
\fIoffer\fR is the bolt12 offer string beginning with "lno1"\.
\fIlabel\fR is the unique label to use for this invoice\.
\fImsatoshi\fR is optional: it is required if the \fIoffer\fR does not specify
an amount at all, or specifies it in a different currency\. Otherwise
you may set it (e\.g\. to provide a tip), and if not it defaults to the
amount contained in the offer (multiplied by \fIquantity\fR if any)\.
\fItimeout\fR is how many seconds to wait for the offering node to pay the
invoice or return an error, default 90 seconds\. This will also be the
timeout on the invoice that is sent\.
\fIquantity\fR is optional: it is required if the \fIoffer\fR specifies
\fIquantity_min\fR or \fIquantity_max\fR, otherwise it is not allowed\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBlabel\fR (string): unique label supplied at invoice creation
.IP \[bu]
\fBdescription\fR (string): description used in the invoice
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
.IP \[bu]
\fBstatus\fR (string): Whether it's paid, unpaid or unpayable (one of "unpaid", "paid", "expired")
.IP \[bu]
\fBexpires_at\fR (u64): UNIX timestamp of when it will become / became unpayable
.IP \[bu]
\fBamount_msat\fR (msat, optional): the amount required to pay this invoice
.IP \[bu]
\fBbolt12\fR (string, optional): the BOLT12 string
.RE
If \fBstatus\fR is "paid":
.RS
.IP \[bu]
\fBpay_index\fR (u64): Unique incrementing index for this payment
.IP \[bu]
\fBamount_received_msat\fR (msat): the amount actually received (could be slightly greater than \fIamount_msat\fR, since clients may overpay)
.IP \[bu]
\fBpaid_at\fR (u64): UNIX timestamp of when it was paid
.IP \[bu]
\fBpayment_preimage\fR (hex): proof of payment (always 64 characters)
.RE
The following error codes may occur:
.RS
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
1002: Offer has expired\.
.IP \[bu]
1003: Cannot find a route to the node making the offer\.
.IP \[bu]
1004: The node making the offer returned an error message\.
.IP \[bu]
1005: We timed out waiting for the invoice to be paid
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-fetchinvoice\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:c51a5986fea210df9fa9fc3a15ea5ed5384124a82efc7c5d2a46f2fb2303ce91

View File

@ -1,159 +0,0 @@
.TH "LIGHTNING-SENDONION" "7" "" "" "lightning-sendonion"
.SH NAME
lightning-sendonion - Send a payment with a custom onion packet
.SH SYNOPSIS
\fBsendonion\fR \fIonion\fR \fIfirst_hop\fR \fIpayment_hash\fR [\fIlabel\fR] [\fIshared_secrets\fR] [\fIpartid\fR] [\fIbolt11\fR]
[\fImsatoshi\fR] [\fIdestination\fR]
.SH DESCRIPTION
The \fBsendonion\fR RPC command can be used to initiate a payment attempt with a
custom onion packet\. The onion packet is used to deliver instructions for hops
along the route on how to behave\. Normally these instructions are indications
on where to forward a payment and what parameters to use, or contain details
of the payment for the final hop\. However, it is possible to add arbitrary
information for hops in the custom onion, allowing for custom extensions that
are not directly supported by c-lightning\.
The onion is specific to the route that is being used and the \fIpayment_hash\fR
used to construct, and therefore cannot be reused for other payments or to
attempt a separate route\. The custom onion can generally be created using the
\fBdevtools/onion\fR CLI tool, or the \fBcreateonion\fR RPC command\.
The \fIonion\fR parameter is a hex-encoded 1366 bytes long blob that was returned
by either of the tools that can generate onions\. It contains the payloads
destined for each hop and some metadata\. Please refer to \fBBOLT 04\fR (\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/04-onion-routing.md\fR) for
further details\.
The \fIfirst_hop\fR parameter instructs c-lightning which peer to send the onion
to\. It is a JSON dictionary that corresponds to the first element of the route
array returned by \fIgetroute\fR\. The following is a minimal example telling
c-lightning to use any available channel to \fB022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59\fR
to add an HTLC for 1002 millisatoshis and a delay of 21 blocks on top of the current blockheight:
.nf
.RS
{
"id": "022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59",
"amount_msat": "1002msat",
"delay": 21,
}
.RE
.fi
The \fIpayment_hash\fR parameter specifies the 32 byte hex-encoded hash to use as
a challenge to the HTLC that we are sending\. It is specific to the onion and
has to match the one the onion was created with\.
The \fIlabel\fR parameter can be used to provide a human readable reference to
retrieve the payment at a later time\.
The \fIshared_secrets\fR parameter is a JSON list of 32 byte hex-encoded secrets
that were used when creating the onion\. c-lightning can send a payment with a
custom onion without the knowledge of these secrets, however it will not be
able to parse an eventual error message since that is encrypted with the
shared secrets used in the onion\. If \fIshared_secrets\fR is provided c-lightning
will decrypt the error, act accordingly, e\.g\., add a \fBchannel_update\fR included
in the error to its network view, and set the details in \fIlistsendpays\fR
correctly\. If it is not provided c-lightning will store the encrypted onion,
and expose it in \fIlistsendpays\fR allowing the caller to decrypt it
externally\. The following is an example of a 3 hop onion:
.nf
.RS
[
"298606954e9de3e9d938d18a74fed794c440e8eda82e52dc08600953c8acf9c4",
"2dc094de72adb03b90894192edf9f67919cb2691b37b1f7d4a2f4f31c108b087",
"a7b82b240dbd77a4ac8ea07709b1395d8c510c73c17b4b392bb1f0605d989c85"
]
.RE
.fi
If \fIshared_secrets\fR is not provided the c-lightning node does not know how
long the route is, which channels or nodes are involved, and what an eventual
error could have been\. It can therefore be used for oblivious payments\.
The \fIpartid\fR value, if provided and non-zero, allows for multiple parallel
partial payments with the same \fIpayment_hash\fR\.
The \fIbolt11\fR parameter, if provided, will be returned in
\fIwaitsendpay\fR and \fIlistsendpays\fR results\.
The \fIdestination\fR parameter, if provided, will be returned in \fBlistpays\fR result\.
The \fImsatoshi\fR parameter is used to annotate the payment, and is returned by
\fIwaitsendpay\fR and \fIlistsendpays\fR\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBid\fR (u64): unique ID for this payment attempt
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
.IP \[bu]
\fBstatus\fR (string): status of the payment (could be complete if already sent previously) (one of "pending", "complete")
.IP \[bu]
\fBcreated_at\fR (u64): the UNIX timestamp showing when this payment was initiated
.IP \[bu]
\fBamount_sent_msat\fR (msat): The amount sent
.IP \[bu]
\fBamount_msat\fR (msat, optional): The amount delivered to destination (if known)
.IP \[bu]
\fBdestination\fR (pubkey, optional): the final destination of the payment if known
.IP \[bu]
\fBlabel\fR (string, optional): the label, if given to sendpay
.IP \[bu]
\fBbolt11\fR (string, optional): the bolt11 string (if supplied)
.IP \[bu]
\fBbolt12\fR (string, optional): the bolt12 string (if supplied: \fBexperimental-offers\fR only)\.
.RE
If \fBstatus\fR is "complete":
.RS
.IP \[bu]
\fBpayment_preimage\fR (hex): the proof of payment: SHA256 of this \fBpayment_hash\fR (always 64 characters)
.RE
If \fBstatus\fR is "pending":
.RS
.IP \[bu]
\fBmessage\fR (string, optional): Monitor status with listpays or waitsendpay
.RE
If \fIshared_secrets\fR was provided and an error was returned by one of the
intermediate nodes the error details are decrypted and presented
here\. Otherwise the error code is 202 for an unparseable onion\.
.SH AUTHOR
Christian Decker \fI<decker.christian@gmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-createonion\fR(7), \fBlightning-sendpay\fR(7), \fBlightning-listsendpays\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:873193b166cc6bf6fc4981af7d8e30e91216293c59d7d31417c61f5cc12cd4f7

View File

@ -1,45 +0,0 @@
.TH "LIGHTNING-SENDONIONMESSAGE" "7" "" "" "lightning-sendonionmessage"
.SH NAME
lightning-sendonionmessage - low-level command to send an onion message
.SH SYNOPSIS
\fB(WARNING: experimental-onion-messages only)\fR
\fBsendonionmessage\fR \fIhops\fR [\fIreply_path\fR]
.SH DESCRIPTION
The \fBsendonionmessage\fR RPC command can be used to send a message via
the lightning network\. These are currently used by \fIoffers\fR to request
and receive invoices\.
\fIhops\fR is an array of json objects: \fIid\fR as a public key of the node,
and either \fIrawtlv\fR containing a hexidecimal TLV to include, or any of
the fields \fIshort_channel_id\fR, \fIblinding\fR, \fIenctlv\fR, \fIinvoice\fR,
\fIinvoice_request\fR and \fIinvoice_error\fR to construct the onionmessage
TLV with\.
\fIreply_path\fR is a json object, containing a pubkey \fIblinding\fR, and an
array \fIpath\fR of objects containing \fIid\fR (a pubkey) and \fIenctlv\fR (a hex
value, optional for final element)\.
.SH RETURN VALUE
On success, an empty object is returned\.
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-fetchinvoice\fR(7), \fBlightning-offer\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:171791a064eee48ee5e4a3c233071e3cbfb458ac20a860bea30523e1fd3712ac

170
doc/lightning-sendpay.7 generated
View File

@ -1,170 +0,0 @@
.TH "LIGHTNING-SENDPAY" "7" "" "" "lightning-sendpay"
.SH NAME
lightning-sendpay - Low-level command for sending a payment via a route
.SH SYNOPSIS
\fBsendpay\fR \fIroute\fR \fIpayment_hash\fR [\fIlabel\fR] [\fImsatoshi\fR]
[\fIbolt11\fR] [\fIpayment_secret\fR] [\fIpartid\fR]
.SH DESCRIPTION
The \fBsendpay\fR RPC command attempts to send funds associated with the
given \fIpayment_hash\fR, along a route to the final destination in the
route\.
Generally, a client would call \fBlightning-getroute\fR(7) to resolve a route,
then use \fBsendpay\fR to send it\. If it fails, it would call
\fBlightning-getroute\fR(7) again to retry\.
The response will occur when the payment is on its way to the
destination\. The \fBsendpay\fR RPC command does not wait for definite
success or definite failure of the payment\. Instead, use the
\fBwaitsendpay\fR RPC command to poll or wait for definite success or
definite failure\.
The \fIlabel\fR and \fIbolt11\fR parameters, if provided, will be returned in
\fIwaitsendpay\fR and \fIlistsendpays\fR results\.
The \fImsatoshi\fR amount must be provided if \fIpartid\fR is non-zero, otherwise
it must be equal to the final
amount to the destination\. By default it is in millisatoshi precision; it can be a whole number, or a whole number
ending in \fImsat\fR or \fIsat\fR, or a number with three decimal places ending
in \fIsat\fR, or a number with 1 to 11 decimal places ending in \fIbtc\fR\.
The \fIpayment_secret\fR is the value that the final recipient requires to
accept the payment, as defined by the \fBpayment_data\fR field in BOLT 4
and the \fBs\fR field in the BOLT 11 invoice format\. It is required if
\fIpartid\fR is non-zero\.
The \fIpartid\fR value, if provided and non-zero, allows for multiple parallel
partial payments with the same \fIpayment_hash\fR\. The \fImsatoshi\fR amount
(which must be provided) for each \fBsendpay\fR with matching
\fIpayment_hash\fR must be equal, and \fBsendpay\fR will fail if there are
already \fImsatoshi\fR worth of payments pending\.
Once a payment has succeeded, calls to \fBsendpay\fR with the same
\fIpayment_hash\fR but a different \fImsatoshi\fR or destination will fail;
this prevents accidental multiple payments\. Calls to \fBsendpay\fR with
the same \fIpayment_hash\fR, \fImsatoshi\fR, and destination as a previous
successful payment (even if a different route or \fIpartid\fR) will return immediately
with success\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBid\fR (u64): unique ID for this payment attempt
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
.IP \[bu]
\fBstatus\fR (string): status of the payment (could be complete if already sent previously) (one of "pending", "complete")
.IP \[bu]
\fBcreated_at\fR (u64): the UNIX timestamp showing when this payment was initiated
.IP \[bu]
\fBamount_sent_msat\fR (msat): The amount sent
.IP \[bu]
\fBamount_msat\fR (msat, optional): The amount delivered to destination (if known)
.IP \[bu]
\fBdestination\fR (pubkey, optional): the final destination of the payment if known
.IP \[bu]
\fBlabel\fR (string, optional): the \fIlabel\fR, if given to sendpay
.IP \[bu]
\fBpartid\fR (u64, optional): the \fIpartid\fR, if given to sendpay
.IP \[bu]
\fBbolt11\fR (string, optional): the bolt11 string (if supplied)
.IP \[bu]
\fBbolt12\fR (string, optional): the bolt12 string (if supplied: \fBexperimental-offers\fR only)\.
.RE
If \fBstatus\fR is "complete":
.RS
.IP \[bu]
\fBpayment_preimage\fR (hex): the proof of payment: SHA256 of this \fBpayment_hash\fR (always 64 characters)
.RE
If \fBstatus\fR is "pending":
.RS
.IP \[bu]
\fBmessage\fR (string): Monitor status with listpays or waitsendpay
.RE
On error, if the error occurred from a node other than the final
destination, the route table will be updated so that
\fBlightning-getroute\fR(7) should return an alternate route (if any)\. An
error from the final destination implies the payment should not be
retried\.
The following error codes may occur:
.RS
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
201: Already paid with this \fIhash\fR using different amount or
destination\.
.IP \[bu]
202: Unparseable onion reply\. The \fIdata\fR field of the error will
have an \fIonionreply\fR field, a hex string representation of the raw
onion reply\.
.IP \[bu]
203: Permanent failure at destination\. The \fIdata\fR field of the error
will be routing failure object\.
.IP \[bu]
204: Failure along route; retry a different route\. The \fIdata\fR field
of the error will be routing failure object\.
.RE
A routing failure object has the fields below:
.RS
.IP \[bu]
\fIerring_index\fR\. The index of the node along the route that reported
the error\. 0 for the local node, 1 for the first hop, and so on\.
.IP \[bu]
\fIerring_node\fR\. The hex string of the pubkey id of the node that
reported the error\.
.IP \[bu]
\fIerring_channel\fR\. The short channel ID of the channel that has
the error, or \fI0:0:0\fR if the destination node raised the error\. In
addition \fIerring_direction\fR will indicate which direction of the
channel caused the failure\.
.IP \[bu]
\fIfailcode\fR\. The failure code, as per BOLT #4\.
.IP \[bu]
\fIchannel_update\fR\. The hex string of the \fIchannel_update\fR message
received from the remote node\. Only present if error is from the
remote node and the \fIfailcode\fR has the UPDATE bit set, as per BOLT
#4\.
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-listinvoice\fR(7), \fBlightning-delinvoice\fR(7),
\fBlightning-getroute\fR(7), \fBlightning-invoice\fR(7), \fBlightning-pay\fR(7),
\fBlightning-waitsendpay\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:5abab6ab51d61c0a4222f73abc40951b67ca466fca7c05f59507ca1246bfc525

View File

@ -1,73 +0,0 @@
.TH "LIGHTNING-SENDPSBT" "7" "" "" "lightning-sendpsbt"
.SH NAME
lightning-sendpsbt - Command to finalize, extract and send a partially signed bitcoin transaction (PSBT)\.
.SH SYNOPSIS
\fBsendpsbt\fR \fIpsbt\fR [\fIreserve\fR]
.SH DESCRIPTION
The \fBsendpsbt\fR is a low-level RPC command which sends a fully-signed PSBT\.
.RS
.IP \[bu]
\fIpsbt\fR: A string that represents psbt value\.
.IP \[bu]
\fIreserve\fR: an optional number of blocks to increase reservation of any of our inputs by; default is 72\.
.RE
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "sendpsbt",
"params": {
"psbt": "some_psbt"
}
}
.RE
.fi
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBtx\fR (hex): The raw transaction which was sent
.IP \[bu]
\fBtxid\fR (txid): The txid of the \fBtx\fR
.RE
On failure, one of the following error codes may be returned:
.RS
.IP \[bu]
-32602: Error in given parameters or some error happened during the command process\.
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"txid": "05985072bbe20747325e69a159fe08176cc1bbc96d25e8848edad2dddc1165d0",
"tx": "02000000027032912651fc25a3e0893acd5f9640598707e2dfef92143bb5a4020e335442800100000017160014a5f48b9aa3cb8ca6cc1040c11e386745bb4dc932ffffffffd229a4b4f78638ebcac10a68b0561585a5d6e4d3b769ad0a909e9b9afaeae24e00000000171600145c83da9b685f9142016c6f5eb5f98a45cfa6f686ffffffff01915a01000000000017a9143a4dfd59e781f9c3018e7d0a9b7a26d58f8d22bf8700000000",
}
.RE
.fi
.SH AUTHOR
Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\.
.SH SEE ALSO
\fBlightning-fundpsbt\fR(7), \fBlightning-signpsbt\fR(7), \fBlightning-listtransactions\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:3f2cda2e8b3a13f457bcccd2480a3bd79f64f6b70221bd7eb4c28d04c51d0e2b

View File

@ -1,86 +0,0 @@
.TH "LIGHTNING-SETCHANNELFEE" "7" "" "" "lightning-setchannelfee"
.SH NAME
lightning-setchannelfee - Command for setting specific routing fees on a lightning channel
.SH SYNOPSIS
\fBsetchannelfee\fR \fIid\fR [\fIbase\fR] [\fIppm\fR]
.SH DESCRIPTION
The \fBsetchannelfee\fR RPC command sets channel specific routing fees as
defined in BOLT #7\. The channel has to be in normal or awaiting state\.
This can be checked by \fBlistpeers\fR reporting a \fIstate\fR of
CHANNELD_NORMAL or CHANNELD_AWAITING_LOCKIN for the channel\.
\fIid\fR is required and should contain a scid (short channel ID), channel
id or peerid (pubkey) of the channel to be modified\. If \fIid\fR is set to
"all", the fees for all channels are updated that are in state
CHANNELD_NORMAL or CHANNELD_AWAITING_LOCKIN\.
\fIbase\fR is an optional value in millisatoshi that is added as base fee to
any routed payment\. If the parameter is left out, the global config
value fee-base will be used again\. It can be a whole number, or a whole
number ending in \fImsat\fR or \fIsat\fR, or a number with three decimal places
ending in \fIsat\fR, or a number with 1 to 11 decimal places ending in
\fIbtc\fR\.
\fIppm\fR is an optional value that is added proportionally per-millionths
to any routed payment volume in satoshi\. For example, if ppm is 1,000
and 1,000,000 satoshi is being routed through the channel, an
proportional fee of 1,000 satoshi is added, resulting in a 0\.1% fee\. If
the parameter is left out, the global config value will be used again\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBbase\fR (u32): The fee_base_msat value
.IP \[bu]
\fBppm\fR (u32): The fee_proportional_millionths value
.IP \[bu]
\fBchannels\fR (array of objects): channel(s) whose rate is now set:
.RS
.IP \[bu]
\fBpeer_id\fR (pubkey): The node_id of the peer
.IP \[bu]
\fBchannel_id\fR (hex): The channel_id of the channel (always 64 characters)
.IP \[bu]
\fBshort_channel_id\fR (short_channel_id, optional): the short_channel_id (if locked in)
.RE
.RE
.SH ERRORS
The following error codes may occur:
.RS
.IP \[bu]
-1: Channel is in incorrect state, i\.e\. Catchall nonspecific error\.
.IP \[bu]
-32602: JSONRPC2_INVALID_PARAMS, i\.e\. Given id is not a channel ID
or short channel ID\.
.RE
.SH AUTHOR
Michael Schmoock \fI<michael@schmoock.net\fR> is the author of this
feature\. Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly
responsible for the c-lightning project\.
.SH SEE ALSO
\fBlightningd-config\fR(5), \fBlightning-fundchannel\fR(7),
\fBlightning-listchannels\fR(7), \fBlightning-listpeers\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:adc53b579ff0592bc35a6ccdbbf19f78241def679f48ae4eceeee39acc277857

View File

@ -1,43 +0,0 @@
.TH "LIGHTNING-SIGNMESSAGE" "7" "" "" "lightning-signmessage"
.SH NAME
lightning-signmessage - Command to create a signature from this node
.SH SYNOPSIS
\fBsignmessage\fR \fImessage\fR
.SH DESCRIPTION
The \fBsignmessage\fR RPC command creates a digital signature of
\fImessage\fR using this node's secret key\. A receiver who knows your
node's \fIid\fR and the \fImessage\fR can be sure that the resulting signature could
only be created by something with access to this node's secret key\.
\fImessage\fR must be less that 65536 characters\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBsignature\fR (hex): The signature (always 128 characters)
.IP \[bu]
\fBrecid\fR (hex): The recovery id (0, 1, 2 or 3) (always 2 characters)
.IP \[bu]
\fBzbase\fR (string): \fIsignature\fR and \fIrecid\fR encoded in a style compatible with \fBlnd\fR's \fBSignMessageRequest\fR (\fIhttps://api.lightning.community/#grpc-request-signmessagerequest\fR)
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-checkmessage\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:7ef4acf3cc994edafd0d97908a00fb14096de46fba13f2af87869a016c1fad1f

View File

@ -1,80 +0,0 @@
.TH "LIGHTNING-SIGNPSBT" "7" "" "" "lightning-signpsbt"
.SH NAME
lightning-signpsbt - Command to sign a wallet's inputs on a provided bitcoin transaction (PSBT)\.
.SH SYNOPSIS
\fBsignpsbt\fR \fIpsbt\fR [\fIsignonly\fR]
.SH DESCRIPTION
\fBsignpsbt\fR is a low-level RPC command which signs a PSBT as defined by
BIP-174\.
.RS
.IP \[bu]
\fIpsbt\fR: A string that represents the PSBT value\.
.IP \[bu]
\fIsignonly\fR: An optional array of input numbers to sign\.
.RE
By default, all known inputs are signed, and others ignored: with
\fIsignonly\fR, only those inputs are signed, and an error is returned if
one of them cannot be signed\.
Note that the command will fail if there are no inputs to sign, or
if the inputs to be signed were not previously reserved\.
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "signpsbt",
"params": {
"psbt": "some_psbt"
}
}
.RE
.fi
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBsigned_psbt\fR (string): The fully signed PSBT
.RE
On failure, one of the following error codes may be returned:
.RS
.IP \[bu]
-32602: Error in given parameters, or there aren't wallet's inputs to sign, or we couldn't sign all of \fIsignonly\fR, or inputs are not reserved\.
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"psbt": "some_psbt"
}
.RE
.fi
.SH AUTHOR
Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\.
.SH SEE ALSO
\fBlightning-fundpsbt\fR(7), \fBlightning-sendpsbt\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:9da0e98fa79790764f4557c141eb5c0d359eaeda15e6c2b79662d63447f6f53e

39
doc/lightning-stop.7 generated
View File

@ -1,39 +0,0 @@
.TH "LIGHTNING-STOP" "7" "" "" "lightning-stop"
.SH NAME
lightning-stop - Command to shutdown the c-lightning node\.
.SH SYNOPSIS
\fBstop\fR
.SH DESCRIPTION
The \fBstop\fR is a RPC command to shut off the c-lightning node\.
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "stop",
"params": {}
}
.RE
.fi
.SH RETURN VALUE
On success, returns a single element (string) (always "Shutdown complete")
Once it has returned, the daemon has cleaned up completely, and if
desired may be restarted immediately\.
.SH AUTHOR
Vincenzo Palazzo \fI<vincenzo.palazzo@protonmail.com\fR> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:44b434290aefb260701a37230256ca295ddcede54ea8d83a6a1b5f32fa0df9f8

View File

@ -1,49 +0,0 @@
.TH "LIGHTNING-TXDISCARD" "7" "" "" "lightning-txdiscard"
.SH NAME
lightning-txdiscard - Abandon a transaction from txprepare, release inputs
.SH SYNOPSIS
\fBtxdiscard\fR \fItxid\fR
.SH DESCRIPTION
The \fBtxdiscard\fR RPC command releases inputs which were reserved for
use of the \fItxid\fR from \fBlightning-txprepare\fR(7)\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBunsigned_tx\fR (hex): the unsigned transaction
.IP \[bu]
\fBtxid\fR (txid): the transaction id of \fIunsigned_tx\fR
.RE
If there is no matching \fItxid\fR, an error is reported\. Note that this may
happen due to incorrect usage, such as \fBtxdiscard\fR or \fBtxsend\fR
already being called for \fItxid\fR\.
The following error codes may occur:
.RS
.IP \[bu]
-1: An unknown \fItxid\fR\.
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-txprepare\fR(7), \fBlightning-txsend\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:7257c3119d49b4252aad8e03949c41a777ba5e94eb82db7c4a3ce576a157dc59

View File

@ -1,100 +0,0 @@
.TH "LIGHTNING-TXPREPARE" "7" "" "" "lightning-txprepare"
.SH NAME
lightning-txprepare - Command to prepare to withdraw funds from the internal wallet
.SH SYNOPSIS
\fBtxprepare\fR \fIoutputs\fR [\fIfeerate\fR] [\fIminconf\fR] [\fIutxos\fR]
.SH DESCRIPTION
The \fBtxprepare\fR RPC command creates an unsigned transaction which
spends funds from c-lightnings internal wallet to the outputs specified
in \fIoutputs\fR\.
The \fIoutputs\fR is the array of output that include \fIdestination\fR
and \fIamount\fR({\fIdestination\fR: \fIamount\fR})\. Its format is like:
[{address1: amount1}, {address2: amount2}]
or
[{address: \fIall\fR}]\.
It supports any number of \fBconfirmed\fR outputs\.
The \fIdestination\fR of output is the address which can be of any Bitcoin accepted
type, including bech32\.
The \fIamount\fR of output is the amount to be sent from the internal wallet
(expressed, as name suggests, in amount)\. The string \fIall\fR can be used to specify
all available funds\. Otherwise, it is in amount precision; it can be a whole
number, a whole number ending in \fIsat\fR, a whole number ending in \fI000msat\fR,
or a number with 1 to 8 decimal places ending in \fIbtc\fR\.
\fIfeerate\fR is an optional feerate to use\. It can be one of the strings
\fIurgent\fR (aim for next block), \fInormal\fR (next 4 blocks or so) or \fIslow\fR
(next 100 blocks or so) to use lightningds internal estimates: \fInormal\fR
is the default\.
Otherwise, \fIfeerate\fR is a number, with an optional suffix: \fIperkw\fR means
the number is interpreted as satoshi-per-kilosipa (weight), and \fIperkb\fR
means it is interpreted bitcoind-style as satoshi-per-kilobyte\. Omitting
the suffix is equivalent to \fIperkb\fR\.
\fIminconf\fR specifies the minimum number of confirmations that used
outputs should have\. Default is 1\.
\fIutxos\fR specifies the utxos to be used to fund the transaction, as an array
of "txid:vout"\. These must be drawn from the node's available UTXO set\.
\fBtxprepare\fR is similar to the first part of a \fBwithdraw\fR command, but
supports multiple outputs and uses \fIoutputs\fR as parameter\. The second part
is provided by \fBtxsend\fR\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBpsbt\fR (string): the PSBT representing the unsigned transaction
.IP \[bu]
\fBunsigned_tx\fR (hex): the unsigned transaction
.IP \[bu]
\fBtxid\fR (txid): the transaction id of \fIunsigned_tx\fR; you hand this to \fBlightning-txsend\fR(7) or \fBlightning-txdiscard\fR(7), as the inputs of this transaction are reserved\.
.RE
On failure, an error is reported and the transaction is not created\.
The following error codes may occur:
.RS
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
301: There are not enough funds in the internal wallet (including
fees) to create the transaction\.
.IP \[bu]
302: The dust limit is not met\.
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-withdraw\fR(7), \fBlightning-txsend\fR(7), \fBlightning-txdiscard\fR(7),
\fBlightning-feerates\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:86aeba7e85c19d1ea314c61e692debd5a6f2607a12f84a10e7880db1f1539f40

50
doc/lightning-txsend.7 generated
View File

@ -1,50 +0,0 @@
.TH "LIGHTNING-TXSEND" "7" "" "" "lightning-txsend"
.SH NAME
lightning-txsend - Command to sign and send transaction from txprepare
.SH SYNOPSIS
\fBtxsend\fR \fItxid\fR
.SH DESCRIPTION
The \fBtxsend\fR RPC command signs and broadcasts a transaction created by
\fBtxprepare\fR\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBpsbt\fR (string): the completed PSBT representing the signed transaction
.IP \[bu]
\fBtx\fR (hex): the fully signed transaction
.IP \[bu]
\fBtxid\fR (txid): the transaction id of \fItx\fR
.RE
On failure, an error is reported (from bitcoind), and the inputs from
the transaction are unreserved\.
The following error codes may occur:
.RS
.IP \[bu]
-1: Catchall nonspecific error\.
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-txprepare\fR(7), \fBlightning-txdiscard\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:e198424cea08555234c4e8d6626bf03c88b3d878b2a20186ac3b612ab9ea9079

View File

@ -1,67 +0,0 @@
.TH "LIGHTNING-UNRESERVEINPUTS" "7" "" "" "lightning-unreserveinputs"
.SH NAME
lightning-unreserveinputs - Release reserved UTXOs
.SH SYNOPSIS
\fBunreserveinputs\fR \fIpsbt\fR [\fIreserve\fR]
.SH DESCRIPTION
The \fBunreserveinputs\fR RPC command releases (or reduces reservation)
on UTXOs which were previously marked as reserved, generally by
\fBlightning-reserveinputs\fR(7)\.
The inputs to unreserve are the inputs specified in the passed-in \fIpsbt\fR\.
If \fIreserve\fR is specified, it is the number of blocks to decrease
reservation by; default is 72\.
.SH RETURN VALUE
On success, an object containing \fBreservations\fR is returned\. It is an array of objects, where each object contains:
.RS
.IP \[bu]
\fBtxid\fR (txid): the transaction id
.IP \[bu]
\fBvout\fR (u32): the output number which was reserved
.IP \[bu]
\fBwas_reserved\fR (boolean): whether the input was already reserved (usually \fBtrue\fR)
.IP \[bu]
\fBreserved\fR (boolean): whether the input is now reserved (may still be \fBtrue\fR if it was reserved for a long time)
.RE
If \fBreserved\fR is \fItrue\fR:
.RS
.IP \[bu]
\fBreserved_to_block\fR (u32): what blockheight the reservation will expire
.RE
On failure, an error is reported and no UTXOs are unreserved\.
The following error codes may occur:
.RS
.IP \[bu]
-32602: Invalid parameter, i\.e\. an unparseable PSBT\.
.RE
.SH AUTHOR
niftynei \fI<niftynei@gmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-unreserveinputs\fR(7), \fBlightning-signpsbt\fR(7), \fBlightning-sendpsbt\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:ff7207d1205cf34ae8f1487f8cec719ea15d9d27ed2d805a8c095eb0d22935c8

127
doc/lightning-utxopsbt.7 generated
View File

@ -1,127 +0,0 @@
.TH "LIGHTNING-UTXOPSBT" "7" "" "" "lightning-utxopsbt"
.SH NAME
lightning-utxopsbt - Command to populate PSBT inputs from given UTXOs
.SH SYNOPSIS
\fButxopsbt\fR \fIsatoshi\fR \fIfeerate\fR \fIstartweight\fR \fIutxos\fR [\fIreserve\fR] [\fIreservedok\fR] [\fIlocktime\fR] [\fImin_witness_weight\fR] [\fIexcess_as_change\fR]
.SH DESCRIPTION
\fIutxopsbt\fR is a low-level RPC command which creates a PSBT using unreserved
inputs in the wallet, optionally reserving them as well\.
It deliberately mirrors the parameters and output of
\fBlightning-fundpsbt\fR(7) except instead of an optional \fIminconf\fR
parameter to select unreserved outputs from the wallet, it takes a
compulsory list of outputs to use\.
\fIutxos\fR must be an array of "txid:vout", each of which must be
reserved or available: the total amount must be sufficient to pay for
the resulting transaction plus \fIstartweight\fR at the given \fIfeerate\fR,
with at least \fIsatoshi\fR left over (unless \fIsatoshi\fR is \fBall\fR, which
is equivalent to setting it to zero)\.
\fIreserve\fR is either boolean or a number: if \fItrue\fR or a non-zero
number then \fIreserveinputs\fR is called (successfully, with
\fIexclusive\fR true) on the returned PSBT for this number of blocks (or
72 blocks if \fIreserve\fR is simply \fItrue\fR)\.
Unless \fIreservedok\fR is set to true (default is false) it will also fail
if any of the \fIutxos\fR are already reserved\.
\fIlocktime\fR is an optional locktime: if not set, it is set to a recent
block height\.
\fImin_witness_weight\fR is an optional minimum weight to use for a UTXO's
witness\. If the actual witness weight is greater than the provided minimum,
the actual witness weight will be used\.
\fIexcess_as_change\fR is an optional boolean to flag to add a change output
for the excess sats\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBpsbt\fR (string): Unsigned PSBT which fulfills the parameters given
.IP \[bu]
\fBfeerate_per_kw\fR (u32): The feerate used to create the PSBT, in satoshis-per-kiloweight
.IP \[bu]
\fBestimated_final_weight\fR (u32): The estimated weight of the transaction once fully signed
.IP \[bu]
\fBexcess_msat\fR (msat): The amount above \fIsatoshi\fR which is available\. This could be zero, or dust; it will be zero if \fIchange_outnum\fR is also returned
.IP \[bu]
\fBchange_outnum\fR (u32, optional): The 0-based output number where change was placed (only if parameter \fIexcess_as_change\fR was true and there was sufficient funds)
.IP \[bu]
\fBreservations\fR (array of objects, optional): If \fIreserve\fR was true or a non-zero number, just as per \fBlightning-reserveinputs\fR(7):
.RS
.IP \[bu]
\fBtxid\fR (txid): The txid of the transaction
.IP \[bu]
\fBvout\fR (u32): The 0-based output number
.IP \[bu]
\fBwas_reserved\fR (boolean): Whether this output was previously reserved
.IP \[bu]
\fBreserved\fR (boolean): Whether this output is now reserved (always \fItrue\fR)
.IP \[bu]
\fBreserved_to_block\fR (u32): The blockheight the reservation will expire
.RE
.RE
On success, returns the \fIpsbt\fR it created, containing the inputs,
\fIfeerate_per_kw\fR showing the exact numeric feerate it used,
\fIestimated_final_weight\fR for the estimated weight of the transaction
once fully signed, and \fIexcess_msat\fR containing the amount above \fIsatoshi\fR
which is available\. This could be zero, or dust\. If \fIsatoshi\fR was "all",
then \fIexcess_msat\fR is the entire amount once fees are subtracted
for the weights of the inputs and \fIstartweight\fR\.
If \fIreserve\fR was \fItrue\fR or a non-zero number, then a \fIreservations\fR
array is returned, exactly like \fIreserveinputs\fR\.
If \fIexcess_as_change\fR is true and the excess is enough to cover
an additional output above the \fBdust_limit\fR, then an output is
added to the PSBT for the excess amount\. The \fIexcess_msat\fR will
be zero\. A \fIchange_outnum\fR will be returned with the index of
the change output\.
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
with \fBcode\fR being one of the following:
.RS
.IP \[bu]
-32602: If the given parameters are wrong\.
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
301: Insufficient UTXOs to meet \fIsatoshi\fR value\.
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-fundpsbt\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:fb99401ea9c242b5369822685c02acd4137629e62f80fd4451ae76013d3a6b17

View File

@ -1,93 +0,0 @@
.TH "LIGHTNING-WAITANYINVOICE" "7" "" "" "lightning-waitanyinvoice"
.SH NAME
lightning-waitanyinvoice - Command for waiting for payments
.SH SYNOPSIS
\fBwaitanyinvoice\fR [\fIlastpay_index\fR] [\fItimeout\fR]
.SH DESCRIPTION
The \fBwaitanyinvoice\fR RPC command waits until an invoice is paid, then
returns a single entry as per \fBlistinvoice\fR\. It will not return for
any invoices paid prior to or including the \fIlastpay_index\fR\.
This is usually called iteratively: once with no arguments, then
repeatedly with the returned \fIpay_index\fR entry\. This ensures that no
paid invoice is missed\.
The \fIpay_index\fR is a monotonically-increasing number assigned to an
invoice when it gets paid\. The first valid \fIpay_index\fR is 1; specifying
\fIlastpay_index\fR of 0 equivalent to not specifying a \fIlastpay_index\fR\.
Negative \fIlastpay_index\fR is invalid\.
If \fItimeout\fR is specified, wait at most that number of seconds, which
must be an integer\.
If the specified \fItimeout\fR is reached, this command will return with an
error\.
You can specify this to 0 so that \fBwaitanyinvoice\fR will return
immediately with an error if no pending invoice is available yet\.
If unspecified, this command will wait indefinitely\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBlabel\fR (string): unique label supplied at invoice creation
.IP \[bu]
\fBdescription\fR (string): description used in the invoice
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
.IP \[bu]
\fBstatus\fR (string): Whether it's paid or expired (one of "paid", "expired")
.IP \[bu]
\fBexpires_at\fR (u64): UNIX timestamp of when it will become / became unpayable
.IP \[bu]
\fBamount_msat\fR (msat, optional): the amount required to pay this invoice
.IP \[bu]
\fBbolt11\fR (string, optional): the BOLT11 string (always present unless \fIbolt12\fR is)
.IP \[bu]
\fBbolt12\fR (string, optional): the BOLT12 string (always present unless \fIbolt11\fR is)
.RE
If \fBstatus\fR is "paid":
.RS
.IP \[bu]
\fBpay_index\fR (u64): Unique incrementing index for this payment
.IP \[bu]
\fBamount_received_msat\fR (msat): the amount actually received (could be slightly greater than \fIamount_msat\fR, since clients may overpay)
.IP \[bu]
\fBpaid_at\fR (u64): UNIX timestamp of when it was paid
.IP \[bu]
\fBpayment_preimage\fR (hex): proof of payment (always 64 characters)
.RE
Possible errors are:
.RS
.IP \[bu]
904\.
The \fItimeout\fR was reached without an invoice being paid\.
.RE
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-waitinvoice\fR(7), \fBlightning-listinvoice\fR(7),
\fBlightning-delinvoice\fR(7), \fBlightning-invoice\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:df915f7735c2d5d229f2609bcf3d19fafc568ede0144d4137836d6e6af541a3b

View File

@ -1,39 +0,0 @@
.TH "LIGHTNING-WAITBLOCKHEIGHT" "7" "" "" "lightning-waitblockheight"
.SH NAME
lightning-waitblockheight - Command for waiting for blocks on the blockchain
.SH SYNOPSIS
\fBwaitblockheight\fR \fIblockheight\fR [\fItimeout\fR]
.SH DESCRIPTION
The \fBwaitblockheight\fR RPC command waits until the blockchain
has reached the specified \fIblockheight\fR\.
It will only wait up to \fItimeout\fR seconds (default 60)\.
If the \fIblockheight\fR is a present or past block height, then this
command returns immediately\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBblockheight\fR (u32): The current block height (>= \fIblockheight\fR parameter)
.RE
If \fItimeout\fR seconds is reached without the specified blockheight
being reached, this command will fail with a code of \fB2000\fR\.
.SH AUTHOR
ZmnSCPxj \fI<ZmnSCPxj@protonmail.com\fR> is mainly responsible\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:7613b15d691e7f0b7125f091ff34ade2c1eea42a8147e21581ae455cca32e551

View File

@ -1,77 +0,0 @@
.TH "LIGHTNING-WAITINVOICE" "7" "" "" "lightning-waitinvoice"
.SH NAME
lightning-waitinvoice - Command for waiting for specific payment
.SH SYNOPSIS
\fBwaitinvoice\fR \fIlabel\fR
.SH DESCRIPTION
The \fBwaitinvoice\fR RPC command waits until a specific invoice is paid,
then returns that single entry as per \fBlistinvoice\fR\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBlabel\fR (string): unique label supplied at invoice creation
.IP \[bu]
\fBdescription\fR (string): description used in the invoice
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
.IP \[bu]
\fBstatus\fR (string): Whether it's paid or expired (one of "paid", "expired")
.IP \[bu]
\fBexpires_at\fR (u64): UNIX timestamp of when it will become / became unpayable
.IP \[bu]
\fBamount_msat\fR (msat, optional): the amount required to pay this invoice
.IP \[bu]
\fBbolt11\fR (string, optional): the BOLT11 string (always present unless \fIbolt12\fR is)
.IP \[bu]
\fBbolt12\fR (string, optional): the BOLT12 string (always present unless \fIbolt11\fR is)
.RE
If \fBstatus\fR is "paid":
.RS
.IP \[bu]
\fBpay_index\fR (u64): Unique incrementing index for this payment
.IP \[bu]
\fBamount_received_msat\fR (msat): the amount actually received (could be slightly greater than \fIamount_msat\fR, since clients may overpay)
.IP \[bu]
\fBpaid_at\fR (u64): UNIX timestamp of when it was paid
.IP \[bu]
\fBpayment_preimage\fR (hex): proof of payment (always 64 characters)
.RE
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
with \fBcode\fR being one of the following:
.RS
.IP \[bu]
-32602: If the given parameters are wrong\.
.IP \[bu]
-1: If the invoice is deleted while unpaid, or the invoice does not exist\.
.IP \[bu]
903: If the invoice expires before being paid, or is already expired\.
.RE
.SH AUTHOR
Christian Decker \fI<decker.christian@gmail.com\fR> is mainly
responsible\.
.SH SEE ALSO
\fBlightning-waitanyinvoice\fR(7), \fBlightning-listinvoice\fR(7),
\fBlightning-delinvoice\fR(7), \fBlightning-invoice\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:e4d1ceb94138d92fc0166e336f47150f3aa25880b0fb9330f72fc95635b04473

View File

@ -1,139 +0,0 @@
.TH "LIGHTNING-WAITSENDPAY" "7" "" "" "lightning-waitsendpay"
.SH NAME
lightning-waitsendpay - Command for sending a payment via a route
.SH SYNOPSIS
\fBwaitsendpay\fR \fIpayment_hash\fR [\fItimeout\fR] [\fIpartid\fR]
.SH DESCRIPTION
The \fBwaitsendpay\fR RPC command polls or waits for the status of an
outgoing payment that was initiated by a previous \fBsendpay\fR
invocation\.
The \fIpartid\fR argument must match that of the \fBsendpay\fR command\.
Optionally the client may provide a \fItimeout\fR, an integer in seconds,
for this RPC command to return\. If the \fItimeout\fR is provided and the
given amount of time passes without the payment definitely succeeding or
definitely failing, this command returns with a 200 error code (payment
still in progress)\. If \fItimeout\fR is not provided this call will wait
indefinitely\.
Indicating a \fItimeout\fR of 0 effectively makes this call a pollable query
of the status of the payment\.
If the payment completed with success, this command returns with
success\. Otherwise, if the payment completed with failure, this command
returns an error\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBid\fR (u64): unique ID for this payment attempt
.IP \[bu]
\fBpayment_hash\fR (hex): the hash of the \fIpayment_preimage\fR which will prove payment (always 64 characters)
.IP \[bu]
\fBstatus\fR (string): status of the payment (always "complete")
.IP \[bu]
\fBcreated_at\fR (u64): the UNIX timestamp showing when this payment was initiated
.IP \[bu]
\fBamount_sent_msat\fR (msat): The amount sent
.IP \[bu]
\fBamount_msat\fR (msat, optional): The amount delivered to destination (if known)
.IP \[bu]
\fBdestination\fR (pubkey, optional): the final destination of the payment if known
.IP \[bu]
\fBlabel\fR (string, optional): the label, if given to sendpay
.IP \[bu]
\fBpartid\fR (u64, optional): the \fIpartid\fR, if given to sendpay
.IP \[bu]
\fBbolt11\fR (string, optional): the bolt11 string (if pay supplied one)
.IP \[bu]
\fBbolt12\fR (string, optional): the bolt12 string (if supplied for pay: \fBexperimental-offers\fR only)\.
.RE
If \fBstatus\fR is "complete":
.RS
.IP \[bu]
\fBpayment_preimage\fR (hex): the proof of payment: SHA256 of this \fBpayment_hash\fR (always 64 characters)
.RE
On error, and even if the error occurred from a node other than the
final destination, the route table will no longer be updated\. Use the
\fIexclude\fR parameter of the \fBgetroute\fR command to ignore the failing
route\.
The following error codes may occur:
.RS
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
200: Timed out before the payment could complete\.
.IP \[bu]
202: Unparseable onion reply\. The \fIdata\fR field of the error will
have an \fIonionreply\fR field, a hex string representation of the raw
onion reply\.
.IP \[bu]
203: Permanent failure at destination\. The \fIdata\fR field of the error
will be routing failure object\.
.IP \[bu]
204: Failure along route; retry a different route\. The \fIdata\fR field
of the error will be routing failure object\.
.IP \[bu]
208: A payment for \fIpayment_hash\fR was never made and there is
nothing to wait for\.
.IP \[bu]
209: The payment already failed, but the reason for failure was not
stored\. This should only occur when querying failed payments on very
old databases\.
.RE
A routing failure object has the fields below:
.RS
.IP \[bu]
\fIerring_index\fR: The index of the node along the route that reported
the error\. 0 for the local node, 1 for the first hop, and so on\.
.IP \[bu]
\fIerring_node\fR: The hex string of the pubkey id of the node that
reported the error\.
.IP \[bu]
\fIerring_channel\fR: The short channel ID of the channel that has the
error (or the final channel if the destination raised the error)\.
.IP \[bu]
\fIerring_direction\fR: The direction of traversing the
\fIerring_channel\fR:
.IP \[bu]
\fIfailcode\fR: The failure code, as per BOLT #4\.
.IP \[bu]
\fIfailcodename\fR: The human-readable name corresponding to \fIfailcode\fR,
if known\.
.RE
.SH AUTHOR
ZmnSCPxj \fI<ZmnSCPxj@protonmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-sendpay\fR(7), \fBlightning-pay\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:5d15f597c042e235dc48781da7c34774e142e872ba0008e49d47cc45f8af75b0

View File

@ -1,87 +0,0 @@
.TH "LIGHTNING-WITHDRAW" "7" "" "" "lightning-withdraw"
.SH NAME
lightning-withdraw - Command for withdrawing funds from the internal wallet
.SH SYNOPSIS
\fBwithdraw\fR \fIdestination\fR \fIsatoshi\fR [\fIfeerate\fR] [\fIminconf\fR] [\fIutxos\fR]
.SH DESCRIPTION
The \fBwithdraw\fR RPC command sends funds from c-lightnings internal
wallet to the address specified in \fIdestination\fR\.
The address can be of any Bitcoin accepted type, including bech32\.
\fIsatoshi\fR is the amount to be withdrawn from the internal wallet
(expressed, as name suggests, in satoshi)\. The string \fIall\fR can be used
to specify withdrawal of all available funds\. Otherwise, it is in
satoshi precision; it can be a whole number, a whole number ending in
\fIsat\fR, a whole number ending in \fI000msat\fR, or a number with 1 to 8
decimal places ending in \fIbtc\fR\.
\fIfeerate\fR is an optional feerate to use\. It can be one of the strings
\fIurgent\fR (aim for next block), \fInormal\fR (next 4 blocks or so) or \fIslow\fR
(next 100 blocks or so) to use lightningds internal estimates: \fInormal\fR
is the default\.
Otherwise, \fIfeerate\fR is a number, with an optional suffix: \fIperkw\fR means
the number is interpreted as satoshi-per-kilosipa (weight), and \fIperkb\fR
means it is interpreted bitcoind-style as satoshi-per-kilobyte\. Omitting
the suffix is equivalent to \fIperkb\fR\.
\fIminconf\fR specifies the minimum number of confirmations that used
outputs should have\. Default is 1\.
\fIutxos\fR specifies the utxos to be used to be withdrawn from, as an array
of "txid:vout"\. These must be drawn from the node's available UTXO set\.
.SH RETURN VALUE
On success, an object is returned, containing:
.RS
.IP \[bu]
\fBtx\fR (hex): the fully signed bitcoin transaction
.IP \[bu]
\fBtxid\fR (txid): the transaction id of \fItx\fR
.IP \[bu]
\fBpsbt\fR (string): the PSBT representing the unsigned transaction
.RE
On failure, an error is reported and the withdrawal transaction is not
created\.
The following error codes may occur:
.RS
.IP \[bu]
-1: Catchall nonspecific error\.
.IP \[bu]
301: There are not enough funds in the internal wallet (including
fees) to create the transaction\.
.IP \[bu]
302: The dust limit is not met\.
.RE
.SH AUTHOR
Felix \fI<fixone@gmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-listfunds\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-newaddr\fR(7),
\fBlightning-txprepare\fR(7), \fBlightning-feerates\fR(7)\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:37feb16fb06f011ebcdadb1962e890c8d331e5e8a204b7274f29f83439ff5360

View File

@ -1,653 +0,0 @@
.TH "LIGHTNINGD-CONFIG" "5" "" "" "lightningd-config"
.SH NAME
lightningd-config - Lightning daemon configuration file
.SH SYNOPSIS
\fB~/\.lightning/config\fR
.SH DESCRIPTION
When \fBlightningd\fR(8) starts up it usually reads a general configuration
file (default: \fB$HOME/\.lightning/config\fR) then a network-specific
configuration file (default: \fB$HOME/\.lightning/testnet/config\fR)\. This can
be changed: see \fI--conf\fR and \fI--lightning-dir\fR\.
General configuration files are processed first, then network-specific
ones, then command line options: later options override earlier ones
except \fIaddr\fR options and \fIlog-level\fR with subsystems, which
accumulate\.
\fIinclude \fR followed by a filename includes another configuration file at that
point, relative to the current configuration file\.
All these options are mirrored as commandline arguments to
\fBlightningd\fR(8), so \fI--foo\fR becomes simply \fIfoo\fR in the configuration
file, and \fI--foo=bar\fR becomes \fIfoo=bar\fR in the configuration file\.
Blank lines and lines beginning with \fI#\fR are ignored\.
.SH DEBUGGING
\fI--help\fR will show you the defaults for many options; they vary with
network settings so you can specify \fI--network\fR before \fI--help\fR to see
the defaults for that network\.
The \fBlightning-listconfigs\fR(7) command will output a valid configuration
file using the current settings\.
.SH OPTIONS
.SH General options
\fBallow-deprecated-apis\fR=\fIBOOL\fR
Enable deprecated options, JSONRPC commands, fields, etc\. It defaults to
\fItrue\fR, but you should set it to \fIfalse\fR when testing to ensure that an
upgrade wont break your configuration\.
\fBhelp\fR
Print help and exit\. Not very useful inside a configuration file, but
fun to put in others config files while their computer is unattended\.
\fBversion\fR
Print version and exit\. Also useless inside a configuration file, but
putting this in someones config file may convince them to read this man
page\.
Bitcoin control options:
\fBnetwork\fR=\fINETWORK\fR
Select the network parameters (\fIbitcoin\fR, \fItestnet\fR, \fIsignet\fR, or \fIregtest\fR)\.
This is not valid within the per-network configuration file\.
\fBmainnet\fR
Alias for \fInetwork=bitcoin\fR\.
\fBtestnet\fR
Alias for \fInetwork=testnet\fR\.
\fBsignet\fR
Alias for \fInetwork=signet\fR\.
\fBbitcoin-cli\fR=\fIPATH\fR [plugin \fBbcli\fR]
The name of \fIbitcoin-cli\fR executable to run\.
\fBbitcoin-datadir\fR=\fIDIR\fR [plugin \fBbcli\fR]
\fI-datadir\fR argument to supply to \fBbitcoin-cli\fR(1)\.
\fBbitcoin-rpcuser\fR=\fIUSER\fR [plugin \fBbcli\fR]
The RPC username for talking to \fBbitcoind\fR(1)\.
\fBbitcoin-rpcpassword\fR=\fIPASSWORD\fR [plugin \fBbcli\fR]
The RPC password for talking to \fBbitcoind\fR(1)\.
\fBbitcoin-rpcconnect\fR=\fIHOST\fR [plugin \fBbcli\fR]
The \fBbitcoind\fR(1) RPC host to connect to\.
\fBbitcoin-rpcport\fR=\fIPORT\fR [plugin \fBbcli\fR]
The \fBbitcoind\fR(1) RPC port to connect to\.
\fBbitcoin-retry-timeout\fR=\fISECONDS\fR [plugin \fBbcli\fR]
Number of seconds to keep trying a \fBbitcoin-cli\fR(1) command\. If the
command keeps failing after this time, exit with a fatal error\.
\fBrescan\fR=\fIBLOCKS\fR
Number of blocks to rescan from the current head, or absolute
blockheight if negative\. This is only needed if something goes badly
wrong\.
.SH Lightning daemon options
\fBlightning-dir\fR=\fIDIR\fR
Sets the working directory\. All files (except \fI--conf\fR and
\fI--lightning-dir\fR on the command line) are relative to this\. This
is only valid on the command-line, or in a configuration file specified
by \fI--conf\fR\.
\fBsubdaemon\fR=\fISUBDAEMON\fR:\fIPATH\fR
Specifies an alternate subdaemon binary\.
Current subdaemons are \fIchanneld\fR, \fIclosingd\fR,
\fIconnectd\fR, \fIgossipd\fR, \fIhsmd\fR, \fIonchaind\fR, and \fIopeningd\fR\.
If the supplied path is relative the subdaemon binary is found in the
working directory\. This option may be specified multiple times\.
So, \fBsubdaemon=hsmd:remote_signer\fR would use a
hypothetical remote signing proxy instead of the standard \fIlightning_hsmd\fR
binary\.
\fBpid-file\fR=\fIPATH\fR
Specify pid file to write to\.
\fBlog-level\fR=\fILEVEL\fR[:\fISUBSYSTEM\fR]
What log level to print out: options are io, debug, info, unusual,
broken\. If \fISUBSYSTEM\fR is supplied, this sets the logging level
for any subsystem containing that string\. Subsystems include:
.RS
.IP \[bu]
\fIlightningd\fR: The main lightning daemon
.IP \[bu]
\fIdatabase\fR: The database subsystem
.IP \[bu]
\fIwallet\fR: The wallet subsystem
.IP \[bu]
\fIgossipd\fR: The gossip daemon
.IP \[bu]
\fIplugin-manager\fR: The plugin subsystem
.IP \[bu]
\fIplugin-P\fR: Each plugin, P = plugin path without directory
.IP \[bu]
\fIhsmd\fR: The secret-holding daemon
.IP \[bu]
\fIconnectd\fR: The network connection daemon
.IP \[bu]
\fIjsonrpc#FD\fR: Each JSONRPC connection, FD = file descriptor number
.RE
The following subsystems exist for each channel, where N is an incrementing
internal integer id assigned for the lifetime of the channel:
.RS
.IP \[bu]
\fIopeningd-chan#N\fR: Each opening / idling daemon
.IP \[bu]
\fIchanneld-chan#N\fR: Each channel management daemon
.IP \[bu]
\fIclosingd-chan#N\fR: Each closing negotiation daemon
.IP \[bu]
\fIonchaind-chan#N\fR: Each onchain close handling daemon
.RE
So, \fBlog-level=debug:plugin\fR would set debug level logging on all
plugins and the plugin manager\. \fBlog-level=io:chan#55\fR would set
IO logging on channel number 55 (or 550, for that matter)\.
\fBlog-prefix\fR=\fIPREFIX\fR
Prefix for log lines: this can be customized if you want to merge logs
with multiple daemons\.
\fBlog-file\fR=\fIPATH\fR
Log to this file instead of stdout\. Sending \fBlightningd\fR(8) SIGHUP will
cause it to reopen this file (useful for log rotation)\.
\fBlog-timestamps\fR=\fIBOOL\fR
Set this to false to turn off timestamp prefixes (they will still appear
in crash log files)\.
\fBrpc-file\fR=\fIPATH\fR
Set JSON-RPC socket (or /dev/tty), such as for \fBlightning-cli\fR(1)\.
\fBrpc-file-mode\fR=\fIMODE\fR
Set JSON-RPC socket file mode, as a 4-digit octal number\.
Default is 0600, meaning only the user that launched lightningd
can command it\.
Set to 0660 to allow users with the same group to access the RPC
as well\.
\fBdaemon\fR
Run in the background, suppress stdout and stderr\. Note that you need
to specify \fBlog-file\fR for this case\.
\fBconf\fR=\fIPATH\fR
Sets configuration file, and disable reading the normal general and network
ones\. If this is a relative path, it is relative to the starting directory, not
\fBlightning-dir\fR (unlike other paths)\. \fIPATH\fR must exist and be
readable (we allow missing files in the default case)\. Using this inside
a configuration file is invalid\.
\fBwallet\fR=\fIDSN\fR
Identify the location of the wallet\. This is a fully qualified data source
name, including a scheme such as \fBsqlite3\fR or \fBpostgres\fR followed by the
connection parameters\.
The default wallet corresponds to the following DSN:
.nf
.RS
--wallet=sqlite3://$HOME/.lightning/bitcoin/lightningd.sqlite3
.RE
.fi
The following is an example of a postgresql wallet DSN:
.nf
.RS
--wallet=postgres://user:pass@localhost:5432/db_name
.RE
.fi
This will connect to a DB server running on \fBlocalhost\fR port \fB5432\fR,
authenticate with username \fBuser\fR and password \fBpass\fR, and then use the
database \fBdb_name\fR\. The database must exist, but the schema will be managed
automatically by \fBlightningd\fR\.
\fBencrypted-hsm\fR
If set, you will be prompted to enter a password used to encrypt the \fBhsm_secret\fR\.
Note that once you encrypt the \fBhsm_secret\fR this option will be mandatory for
\fBlightningd\fR to start\.
If there is no \fBhsm_secret\fR yet, \fBlightningd\fR will create a new encrypted secret\.
If you have an unencrypted \fBhsm_secret\fR you want to encrypt on-disk, or vice versa,
see \fBlightning-hsmtool\fR(8)\.
.SH Lightning node customization options
\fBalias\fR=\fINAME\fR
Up to 32 bytes of UTF-8 characters to tag your node\. Completely silly, since
anyone can call their node anything they want\. The default is an
NSA-style codename derived from your public key, but "Peter Todd" and
"VAULTERO" are good options, too\.
\fBrgb\fR=\fIRRGGBB\fR
Your favorite color as a hex code\.
\fBfee-base\fR=\fIMILLISATOSHI\fR
Default: 1000\. The base fee to charge for every payment which passes
through\. Note that millisatoshis are a very, very small unit! Changing
this value will only affect new channels and not existing ones\. If you
want to change fees for existing channels, use the RPC call
\fBlightning-setchannelfee\fR(7)\.
\fBfee-per-satoshi\fR=\fIMILLIONTHS\fR
Default: 10 (0\.001%)\. This is the proportional fee to charge for every
payment which passes through\. As percentages are too coarse, its in
millionths, so 10000 is 1%, 1000 is 0\.1%\. Changing this value will only
affect new channels and not existing ones\. If you want to change fees
for existing channels, use the RPC call \fBlightning-setchannelfee\fR(7)\.
\fBmin-capacity-sat\fR=\fISATOSHI\fR
Default: 10000\. This value defines the minimal effective channel
capacity in satoshi to accept for channel opening requests\. This will
reject any opening of a channel which can't pass an HTLC of least this
value\. Usually this prevents a peer opening a tiny channel, but it
can also prevent a channel you open with a reasonable amount and the peer
requesting such a large reserve that the capacity of the channel
falls below this\.
\fBignore-fee-limits\fR=\fIBOOL\fR
Allow nodes which establish channels to us to set any fee they want\.
This may result in a channel which cannot be closed, should fees
increase, but make channels far more reliable since we never close it
due to unreasonable fees\.
\fBcommit-time\fR=\fIMILLISECONDS\fR
How long to wait before sending commitment messages to the peer: in
theory increasing this would reduce load, but your node would have to be
extremely busy node for you to even notice\.
\fBforce-feerates\fR==\fIVALUES\fR
Networks like regtest and testnet have unreliable fee estimates: we
usually treat them as the minimum (253 sats/kw) if we can't get them\.
This allows override of one or more of our standard feerates (see
\fBlightning-feerates\fR(7))\. Up to 5 values, separated by '/' can be
provided: if fewer are provided, then the final value is used for the
remainder\. The values are in per-kw (roughly 1/4 of bitcoind's per-kb
values), and the order is "opening", "mutual_close", "unilateral_close",
"delayed_to_us", "htlc_resolution", and "penalty"\.
You would usually put this option in the per-chain config file, to avoid
setting it on Bitcoin mainnet! e\.g\. \fB~rusty/.lightning/regtest/config\fR\.
.SH Lightning channel and HTLC options
\fBlarge-channels\fR
Removes capacity limits for channel creation\. Version 1\.0 of the specification
limited channel sizes to 16777215 satoshi\. With this option (which your
node will advertize to peers), your node will accept larger incoming channels
and if the peer supports it, will open larger channels\. Note: this option
is spelled \fBlarge-channels\fR but it's pronounced \fBwumbo\fR\.
\fBwatchtime-blocks\fR=\fIBLOCKS\fR
How long we need to spot an outdated close attempt: on opening a channel
we tell our peer that this is how long theyll have to wait if they
perform a unilateral close\.
\fBmax-locktime-blocks\fR=\fIBLOCKS\fR
The longest our funds can be delayed (ie\. the longest
\fBwatchtime-blocks\fR our peer can ask for, and also the longest HTLC
timeout we will accept)\. If our peer asks for longer, well refuse to
create a channel, and if an HTLC asks for longer, well refuse it\.
\fBfunding-confirms\fR=\fIBLOCKS\fR
Confirmations required for the funding transaction when the other side
opens a channel before the channel is usable\.
\fBcommit-fee\fR=\fIPERCENT\fR [plugin \fBbcli\fR]
The percentage of \fIestimatesmartfee 2/CONSERVATIVE\fR to use for the commitment
transactions: default is 100\.
\fBmax-concurrent-htlcs\fR=\fIINTEGER\fR
Number of HTLCs one channel can handle concurrently in each direction\.
Should be between 1 and 483 (default 30)\.
\fBcltv-delta\fR=\fIBLOCKS\fR
The number of blocks between incoming payments and outgoing payments:
this needs to be enough to make sure that if we have to, we can close
the outgoing payment before the incoming, or redeem the incoming once
the outgoing is redeemed\.
\fBcltv-final\fR=\fIBLOCKS\fR
The number of blocks to allow for payments we receive: if we have to, we
might need to redeem this on-chain, so this is the number of blocks we
have to do that\.
Invoice control options:
\fBautocleaninvoice-cycle\fR=\fISECONDS\fR [plugin \fBautoclean\fR]
Perform cleanup of expired invoices every \fISECONDS\fR seconds, or disable
if 0\. Usually unpaid expired invoices are uninteresting, and just take
up space in the database\.
\fBautocleaninvoice-expired-by\fR=\fISECONDS\fR [plugin \fBautoclean\fR]
Control how long invoices must have been expired before they are cleaned
(if \fIautocleaninvoice-cycle\fR is non-zero)\.
Payment control options:
\fBdisable-mpp\fR [plugin \fBpay\fR]
Disable the multi-part payment sending support in the \fBpay\fR plugin\. By default
the MPP support is enabled, but it can be desirable to disable in situations
in which each payment should result in a single HTLC being forwarded in the
network\.
.SH Networking options
Note that for simple setups, the implicit \fIautolisten\fR option does the
right thing: it will try to bind to port 9735 on IPv4 and IPv6, and will
announce it to peers if it seems like a public address\.
You can instead use \fIaddr\fR to override this (eg\. to change the port), or
precisely control where to bind and what to announce with the
\fIbind-addr\fR and \fIannounce-addr\fR options\. These will \fBdisable\fR the
\fIautolisten\fR logic, so you must specifiy exactly what you want!
\fBaddr\fR=\fI[IPADDRESS[:PORT]]|autotor:TORIPADDRESS[:SERVICEPORT][/torport=TORPORT]|statictor:TORIPADDRESS[:SERVICEPORT][/torport=TORPORT][/torblob=[blob]]\fR
Set an IP address (v4 or v6) or automatic Tor address to listen on and
(maybe) announce as our node address\.
An empty 'IPADDRESS' is a special value meaning bind to IPv4 and/or
IPv6 on all interfaces, '0\.0\.0\.0' means bind to all IPv4
interfaces, '::' means 'bind to all IPv6 interfaces'\. If 'PORT' is
not specified, 9735 is used\. If we can determine a public IP
address from the resulting binding, the address is announced\.
If the argument begins with 'autotor:' then it is followed by the
IPv4 or IPv6 address of the Tor control port (default port 9051),
and this will be used to configure a Tor hidden service for port 9735\.
The Tor hidden service will be configured to point to the
first IPv4 or IPv6 address we bind to\.
If the argument begins with 'statictor:' then it is followed by the
IPv4 or IPv6 address of the Tor control port (default port 9051),
and this will be used to configure a static Tor hidden service for port 9735\.
The Tor hidden service will be configured to point to the
first IPv4 or IPv6 address we bind to and is by default unique to
your nodes id\. You can add the text '/torblob=BLOB' followed by up to
64 Bytes of text to generate from this text a v3 onion service
address text unique to the first 32 Byte of this text\.
You can also use an postfix '/torport=TORPORT' to select the external
tor binding\. The result is that over tor your node is accessible by a port
defined by you and possible different from your local node port assignment
This option can be used multiple times to add more addresses, and
its use disables autolisten\. If necessary, and 'always-use-proxy'
is not specified, a DNS lookup may be done to resolve 'IPADDRESS'
or 'TORIPADDRESS'\.
\fBbind-addr\fR=\fI[IPADDRESS[:PORT]]|SOCKETPATH\fR
Set an IP address or UNIX domain socket to listen to, but do not
announce\. A UNIX domain socket is distinguished from an IP address by
beginning with a \fI/\fR\.
An empty 'IPADDRESS' is a special value meaning bind to IPv4 and/or
IPv6 on all interfaces, '0\.0\.0\.0' means bind to all IPv4
interfaces, '::' means 'bind to all IPv6 interfaces'\. 'PORT' is
not specified, 9735 is used\.
This option can be used multiple times to add more addresses, and
its use disables autolisten\. If necessary, and 'always-use-proxy'
is not specified, a DNS lookup may be done to resolve 'IPADDRESS'\.
\fBannounce-addr\fR=\fIIPADDRESS[:PORT]|TORADDRESS\.onion[:PORT]\fR
Set an IP (v4 or v6) address or Tor address to announce; a Tor address
is distinguished by ending in \fI\.onion\fR\. \fIPORT\fR defaults to 9735\.
Empty or wildcard IPv4 and IPv6 addresses don't make sense here\.
Also, unlike the 'addr' option, there is no checking that your
announced addresses are public (e\.g\. not localhost)\.
This option can be used multiple times to add more addresses, and
its use disables autolisten\.
If necessary, and 'always-use-proxy' is not specified, a DNS
lookup may be done to resolve 'IPADDRESS'\.
\fBoffline\fR
Do not bind to any ports, and do not try to reconnect to any peers\. This
can be useful for maintenance and forensics, so is usually specified on
the command line\. Overrides all \fIaddr\fR and \fIbind-addr\fR options\.
\fBautolisten\fR=\fIBOOL\fR
By default, we bind (and maybe announce) on IPv4 and IPv6 interfaces if
no \fIaddr\fR, \fIbind-addr\fR or \fIannounce-addr\fR options are specified\. Setting
this to \fIfalse\fR disables that\.
\fBproxy\fR=\fIIPADDRESS[:PORT]\fR
Set a socks proxy to use to connect to Tor nodes (or for all connections
if \fBalways-use-proxy\fR is set)\. The port defaults to 9050 if not specified\.
\fBalways-use-proxy\fR=\fIBOOL\fR
Always use the \fBproxy\fR, even to connect to normal IP addresses (you
can still connect to Unix domain sockets manually)\. This also disables
all DNS lookups, to avoid leaking information\.
\fBdisable-dns\fR
Disable the DNS bootstrapping mechanism to find a node by its node ID\.
\fBtor-service-password\fR=\fIPASSWORD\fR
Set a Tor control password, which may be needed for \fIautotor:\fR to
authenticate to the Tor control port\.
.SH Lightning Plugins
\fBlightningd\fR(8) supports plugins, which offer additional configuration
options and JSON-RPC methods, depending on the plugin\. Some are supplied
by default (usually located in \fBlibexec/c-lightning/plugins/\fR)\. If a
\fBplugins\fR directory exists under \fIlightning-dir\fR that is searched for
plugins along with any immediate subdirectories)\. You can specify
additional paths too:
\fBplugin\fR=\fIPATH\fR
Specify a plugin to run as part of c-lightning\. This can be specified
multiple times to add multiple plugins\. Note that unless plugins themselves
specify ordering requirements for being called on various hooks, plugins will
be ordered by commandline, then config file\.
\fBplugin-dir\fR=\fIDIRECTORY\fR
Specify a directory to look for plugins; all executable files not
containing punctuation (other than \fI\.\fR, \fI-\fR or \fI_) in 'DIRECTORY\fR are
loaded\. \fIDIRECTORY\fR must exist; this can be specified multiple times to
add multiple directories\. The ordering of plugins within a directory
is currently unspecified\.
\fBclear-plugins\fR
This option clears all \fIplugin\fR, \fIimportant-plugin\fR, and \fIplugin-dir\fR options
preceeding it,
including the default built-in plugin directory\. You can still add
\fIplugin-dir\fR, \fIplugin\fR, and \fIimportant-plugin\fR options following this
and they will have the normal effect\.
\fBdisable-plugin\fR=\fIPLUGIN\fR
If \fIPLUGIN\fR contains a /, plugins with the same path as \fIPLUGIN\fR will
not be loaded at startup\. Otherwise, no plugin with that base name will
be loaded at startup, whatever directory it is in\. This option is useful for
disabling a single plugin inside a directory\. You can still explicitly
load plugins which have been disabled, using \fBlightning-plugin\fR(7) \fBstart\fR\.
\fBimportant-plugin\fR=\fIPLUGIN\fR
Speciy a plugin to run as part of C-lightning\.
This can be specified multiple times to add multiple plugins\.
Plugins specified via this option are considered so important, that if the
plugin stops for any reason (including via \fBlightning-plugin\fR(7) \fBstop\fR),
C-lightning will also stop running\.
This way, you can monitor crashes of important plugins by simply monitoring
if C-lightning terminates\.
Built-in plugins, which are installed with \fBlightningd\fR(8), are automatically
considered important\.
.SH Experimental Options
Experimental options are subject to breakage between releases: they
are made available for advanced users who want to test proposed
features\. If lightningd is built configured with
\fB--enable-experimental-features\fR these are on by default\.
\fBexperimental-onion-messages\fR
Specifying this enables sending, forwarding and receiving onion messages,
which are in draft status in the BOLT specifications\.
\fBexperimental-offers\fR
Specifying this enables the \fBoffers\fR and \fBfetchinvoice\fR plugins and
corresponding functionality, which are in draft status as BOLT12\.
This usually requires \fBexperimental-onion-messages\fR as well\. See
\fBlightning-offer\fR(7) and \fBlightning-fetchinvoice\fR(7)\.
\fBfetchinvoice-noconnect\fR
Specifying this prevents \fBfetchinvoice\fR and \fBsendinvoice\fR from
trying to connect directly to the offering node as a last resort\.
\fBexperimental-shutdown-wrong-funding\fR
Specifying this allows the \fBwrong_funding\fR field in shutdown: if a
remote node has opened a channel but claims it used the incorrect txid
(and the channel hasn't been used yet at all) this allows them to
negotiate a clean shutdown with the txid they offer\.
\fBexperimental-dual-fund\fR
Specifying this enables support for the dual funding protocol,
allowing both parties to contribute funds to a channel\. The decision
about whether to add funds or not to a proposed channel is handled
automatically by a plugin that implements the appropriate logic for
your needs\. The default behavior is to not contribute funds\.
.SH BUGS
You should report bugs on our github issues page, and maybe submit a fix
to gain our eternal gratitude!
.SH AUTHOR
Rusty Russell \fI<rusty@rustcorp.com.au\fR> wrote this man page, and
much of the configuration language, but many others did the hard work of
actually implementing these options\.
.SH SEE ALSO
\fBlightning-listconfigs\fR(7) \fBlightning-setchannelfee\fR(7) \fBlightningd\fR(8)
\fBlightning-hsmtool\fR(8)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
.SH COPYING
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\.
\" SHA256STAMP:1c392f3fee66dc6c1fc2c34200204a9be1d79e53fd5fb1720ad169fc671f71c0

View File

@ -1,260 +0,0 @@
.TH "LIGHTNINGD" "8" "" "" "lightningd"
.SH NAME
lightningd - Daemon for running a Lightning Network node
.SH SYNOPSIS
.nf
.RS
lightningd [--conf=<config-file>] [OPTIONS]…
.RE
.fi
.SH DESCRIPTION
\fBlightningd\fR starts the C-Lightning daemon, which implements a
standards-compliant Lightning Network node\.
.SH CONFIGURATION OPTIONS
\fB--conf\fR=\fIFILE\fR
Specify configuration file\. If not an absolute path, will be relative
from the lightning-dir location\. Defaults to \fIconfig\fR\.
\fB--lightning-dir\fR=\fIDIR\fR
Set the directory for the C-Lightning daemon\. Defaults to
\fI$HOME/\.lightning\fR\.
.SH MORE OPTIONS
Command line options are mirrored as configuration options in the
configuration file, so \fIfoo\fR in the configuration file simply becomes
\fB--foo\fR on the command line, and \fBfoo=bar\fR becomes \fB--foo=bar\fR\.
See \fBlightningd-config\fR(5) for a comprehensive list of all available
options\.
.SH LOGGING AND COMMANDING C-LIGHTNING
By default, C-Lightning will log to the standard output\.
To log to a specific file, use \fB--log-file\fR=\fIPATH\fR\.
Sending SIGHUP will cause C-Lightning to reopen this file,
for example to do log rotation\.
C-Lightning will set up a Unix domain socket for receiving
commands\.
By default this will be the file \fBlightning-rpc\fR in your
specified \fBlightning-dir\fR\.
You can use \fBlightning-cli\fR(1) to send commands to C-Lightning
once \fBlightningd\fR has started; you need to match the
\fB--lightning-dir\fR and \fB--rpc-file\fR options between them\.
Commands for C-Lightning are described in various manpages
in section 7, with the common prefix \fBlightning-\fR\.
.SH QUICK START
First, decide on and create a directory for \fIlightning-dir\fR, or just use
the default \fI$HOME/\.lightning\fR\. Then create a \fIconfig\fR file in this
directory containing your configuration\.
Your other main preparation would be to set up a mainnet Bitcoin
fullnode, i\.e\. run a \fBbitcoind\fR(1) instance\. The rest of this quick start
guide will assume you are reckless and want to spend real funds on
Lightning\. Indicate \fInetwork=bitcoin\fR in your \fIconfig\fR file explicitly\.
C-Lightning needs to communicate with the Bitcoin Core RPC\. You can set
this up using \fIbitcoin-datadir\fR, \fIbitcoin-rpcconnect\fR,
\fIbitcoin-rpcport\fR, \fIbitcoin-rpcuser\fR, and \fIbitcoin-rpcpassword\fR options
in your \fIconfig\fR file\.
Finally, just to keep yourself sane, decide on a log file name and
indicate it using \fIlog-file=lightningd\.log\fR in your \fIconfig\fR file\. You
might be interested in viewing it periodically as you follow along on
this guide\.
Once the \fBbitcoind\fR instance is running, start \fBlightningd\fR(8):
.nf
.RS
$ lightningd --lightning-dir=$HOME/.lightning --daemon
.RE
.fi
This starts \fBlightningd\fR in the background due to the \fI--daemon\fR
option\.
Check if things are working:
.nf
.RS
$ lightning-cli --lightning-dir=%HOME/.lightning help
$ lightning-cli --lightning-dir=%HOME/.lightning getinfo
.RE
.fi
The \fBgetinfo\fR command in particular will return a \fIblockheight\fR field,
which indicates the block height to which \fBlightningd\fR has been
synchronized to (this is separate from the block height that your
\fBbitcoind\fR has been synchronized to, and will always lag behind
\fBbitcoind\fR)\. You will have to wait until the \fIblockheight\fR has reached
the actual blockheight of the Bitcoin network\.
Before you can get funds offchain, you need to have some funds onchain
owned by \fBlightningd\fR (which has a separate wallet from the
\fBbitcoind\fR it connects to)\. Get an address for \fBlightningd\fR via
\fBlightning-newaddr\fR(7) command as below (\fI--lightning-dir\fR option has been
elided, specify it if you selected your own \fIlightning-dir\fR):
.nf
.RS
$ lightning-cli newaddr
.RE
.fi
This will provide a native SegWit bech32 address\. In case all your money
is in services that do not support native SegWit and have to use
P2SH-wrapped addresses, instead use:
.nf
.RS
$ lightning-cli newaddr p2sh-segwit
.RE
.fi
Transfer a small amount of onchain funds to the given address\. Check the
status of all your funds (onchain and on-Lightning) via
\fBlightning-listfunds\fR(7):
.nf
.RS
$ lightning-cli listfunds
.RE
.fi
Now you need to look for an arbitrary Lightning node to connect to,
which you can do by using \fBdig\fR(1) and querying \fIlseed\.bitcoinstats\.com\fR:
.nf
.RS
$ dig lseed.bitcoinstats.com A
.RE
.fi
This will give 25 IPv4 addresses, you can select any one of those\. You
will also need to learn the corresponding public key, which you can
determine by searching the IP addrss on \fIhttps://1ml.com/\fR \. The public
key is a long hex string, like so:
\fI024772ee4fa461febcef09d5869e1238f932861f57be7a6633048514e3f56644a1\fR\.
(this example public key is not used as of this writing)
After determining a public key, use \fBlightning-connect\fR(7) to connect to
that public key at that IP:
.nf
.RS
$ lightning-cli connect $PUBLICKEY $IP
.RE
.fi
Then open a channel to that node using \fBlightning-fundchannel\fR(7):
.nf
.RS
$ lightning-cli fundchannel $PUBLICKEY $SATOSHI
.RE
.fi
This will require that the funding transaction be confirmed before you
can send funds over Lightning\. To track this, use \fBlightning-listpeers\fR(7)
and look at the \fIstate\fR of the channel:
.nf
.RS
$ lightning-cli listpeers $PUBLICKEY
.RE
.fi
The channel will initially start with a \fIstate\fR of
\fICHANNELD_AWAITING_LOCKIN\fR\. You need to wait for the channel \fIstate\fR
to become \fICHANNELD_NORMAL\fR, meaning the funding transaction has been
confirmed deeply\.
Once the channel \fIstate\fR is \fICHANNELD_NORMAL\fR, you can start paying
merchants over Lightning\. Acquire a Lightning invoice from your favorite
merchant, and use \fBlightning-pay\fR(7) to pay it:
.nf
.RS
$ lightning-cli pay $INVOICE
.RE
.fi
.SH BUGS
You should report bugs on our github issues page, and maybe submit a fix
to gain our eternal gratitude!
.SH AUTHOR
ZmnSCPxj \fI<ZmnSCPxj@protonmail.com\fR> wrote the initial version of
this man page, but many others did the hard work of actually
implementing a standards-compliant Lightning Network node
implementation\.
.SH SEE ALSO
\fBlightning-listconfigs\fR(7), \fBlightningd-config\fR(5), \fBlightning-cli\fR(1),
\fBlightning-newaddr\fR(7), \fBlightning-listfunds\fR(7), \fBlightning-connect\fR(7),
\fBlightning-fundchannel\fR(7), \fBlightning-listpeers\fR(7), \fBlightning-pay\fR(7),
\fBlightning-hsmtool\fR(8)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
.SH COPYING
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\.
\" SHA256STAMP:a49556f0889c48480cd4160d57b0f5f939346d47fa893f7095135450fcc1d33c

View File

@ -1,213 +0,0 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the .csv file it was generated from. */
/* Original template can be found at tools/gen/impl_template */
#include <gossipd/gossip_store_wiregen.h>
#include <assert.h>
#include <ccan/array_size/array_size.h>
#include <ccan/mem/mem.h>
#include <ccan/tal/str/str.h>
#include <common/utils.h>
#include <stdio.h>
#ifndef SUPERVERBOSE
#define SUPERVERBOSE(...)
#endif
/* gossip_store messages: messages persisted in the gossip_store */
/* We store raw messages here */
/* 256/257/258. */
const char *gossip_store_wire_name(int e)
{
static char invalidbuf[sizeof("INVALID ") + STR_MAX_CHARS(e)];
switch ((enum gossip_store_wire)e) {
case WIRE_GOSSIP_STORE_CHANNEL_AMOUNT: return "WIRE_GOSSIP_STORE_CHANNEL_AMOUNT";
case WIRE_GOSSIP_STORE_PRIVATE_CHANNEL: return "WIRE_GOSSIP_STORE_PRIVATE_CHANNEL";
case WIRE_GOSSIP_STORE_PRIVATE_UPDATE: return "WIRE_GOSSIP_STORE_PRIVATE_UPDATE";
case WIRE_GOSSIP_STORE_DELETE_CHAN: return "WIRE_GOSSIP_STORE_DELETE_CHAN";
case WIRE_GOSSIP_STORE_ENDED: return "WIRE_GOSSIP_STORE_ENDED";
case WIRE_GOSSIPD_LOCAL_ADD_CHANNEL_OBS: return "WIRE_GOSSIPD_LOCAL_ADD_CHANNEL_OBS";
}
snprintf(invalidbuf, sizeof(invalidbuf), "INVALID %i", e);
return invalidbuf;
}
bool gossip_store_wire_is_defined(u16 type)
{
switch ((enum gossip_store_wire)type) {
case WIRE_GOSSIP_STORE_CHANNEL_AMOUNT:;
case WIRE_GOSSIP_STORE_PRIVATE_CHANNEL:;
case WIRE_GOSSIP_STORE_PRIVATE_UPDATE:;
case WIRE_GOSSIP_STORE_DELETE_CHAN:;
case WIRE_GOSSIP_STORE_ENDED:;
case WIRE_GOSSIPD_LOCAL_ADD_CHANNEL_OBS:;
return true;
}
return false;
}
/* WIRE: GOSSIP_STORE_CHANNEL_AMOUNT */
/* This always follows the channel_announce / private_announce */
u8 *towire_gossip_store_channel_amount(const tal_t *ctx, struct amount_sat satoshis)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_GOSSIP_STORE_CHANNEL_AMOUNT);
towire_amount_sat(&p, satoshis);
return memcheck(p, tal_count(p));
}
bool fromwire_gossip_store_channel_amount(const void *p, struct amount_sat *satoshis)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIP_STORE_CHANNEL_AMOUNT)
return false;
*satoshis = fromwire_amount_sat(&cursor, &plen);
return cursor != NULL;
}
/* WIRE: GOSSIP_STORE_PRIVATE_CHANNEL */
/* Mimics a channel_announce */
u8 *towire_gossip_store_private_channel(const tal_t *ctx, struct amount_sat satoshis, const u8 *announcement)
{
u16 len = tal_count(announcement);
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_GOSSIP_STORE_PRIVATE_CHANNEL);
towire_amount_sat(&p, satoshis);
towire_u16(&p, len);
towire_u8_array(&p, announcement, len);
return memcheck(p, tal_count(p));
}
bool fromwire_gossip_store_private_channel(const tal_t *ctx, const void *p, struct amount_sat *satoshis, u8 **announcement)
{
u16 len;
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIP_STORE_PRIVATE_CHANNEL)
return false;
*satoshis = fromwire_amount_sat(&cursor, &plen);
len = fromwire_u16(&cursor, &plen);
// 2nd case announcement
*announcement = len ? tal_arr(ctx, u8, len) : NULL;
fromwire_u8_array(&cursor, &plen, *announcement, len);
return cursor != NULL;
}
/* WIRE: GOSSIP_STORE_PRIVATE_UPDATE */
u8 *towire_gossip_store_private_update(const tal_t *ctx, const u8 *update)
{
u16 len = tal_count(update);
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_GOSSIP_STORE_PRIVATE_UPDATE);
towire_u16(&p, len);
towire_u8_array(&p, update, len);
return memcheck(p, tal_count(p));
}
bool fromwire_gossip_store_private_update(const tal_t *ctx, const void *p, u8 **update)
{
u16 len;
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIP_STORE_PRIVATE_UPDATE)
return false;
len = fromwire_u16(&cursor, &plen);
// 2nd case update
*update = len ? tal_arr(ctx, u8, len) : NULL;
fromwire_u8_array(&cursor, &plen, *update, len);
return cursor != NULL;
}
/* WIRE: GOSSIP_STORE_DELETE_CHAN */
u8 *towire_gossip_store_delete_chan(const tal_t *ctx, const struct short_channel_id *scid)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_GOSSIP_STORE_DELETE_CHAN);
towire_short_channel_id(&p, scid);
return memcheck(p, tal_count(p));
}
bool fromwire_gossip_store_delete_chan(const void *p, struct short_channel_id *scid)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIP_STORE_DELETE_CHAN)
return false;
fromwire_short_channel_id(&cursor, &plen, scid);
return cursor != NULL;
}
/* WIRE: GOSSIP_STORE_ENDED */
u8 *towire_gossip_store_ended(const tal_t *ctx, u64 equivalent_offset)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_GOSSIP_STORE_ENDED);
towire_u64(&p, equivalent_offset);
return memcheck(p, tal_count(p));
}
bool fromwire_gossip_store_ended(const void *p, u64 *equivalent_offset)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIP_STORE_ENDED)
return false;
*equivalent_offset = fromwire_u64(&cursor, &plen);
return cursor != NULL;
}
/* WIRE: GOSSIPD_LOCAL_ADD_CHANNEL_OBS */
/* FIXME: Here for COMPAT with v0.9.0 and before only. */
u8 *towire_gossipd_local_add_channel_obs(const tal_t *ctx, const struct short_channel_id *short_channel_id, const struct node_id *remote_node_id, struct amount_sat satoshis, const u8 *features)
{
u16 flen = tal_count(features);
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_GOSSIPD_LOCAL_ADD_CHANNEL_OBS);
towire_short_channel_id(&p, short_channel_id);
towire_node_id(&p, remote_node_id);
towire_amount_sat(&p, satoshis);
towire_u16(&p, flen);
towire_u8_array(&p, features, flen);
return memcheck(p, tal_count(p));
}
bool fromwire_gossipd_local_add_channel_obs(const tal_t *ctx, const void *p, struct short_channel_id *short_channel_id, struct node_id *remote_node_id, struct amount_sat *satoshis, u8 **features)
{
u16 flen;
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIPD_LOCAL_ADD_CHANNEL_OBS)
return false;
fromwire_short_channel_id(&cursor, &plen, short_channel_id);
fromwire_node_id(&cursor, &plen, remote_node_id);
*satoshis = fromwire_amount_sat(&cursor, &plen);
flen = fromwire_u16(&cursor, &plen);
// 2nd case features
*features = flen ? tal_arr(ctx, u8, flen) : NULL;
fromwire_u8_array(&cursor, &plen, *features, flen);
return cursor != NULL;
}
// SHA256STAMP:15e0760c876736aaf08229c33e7615b20e6a35790fb8d72d09ecc31a472bf783

View File

@ -1,66 +0,0 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the _csv file it was generated from. */
/* Original template can be found at tools/gen/header_template */
#ifndef LIGHTNING_GOSSIPD_GOSSIP_STORE_WIREGEN_H
#define LIGHTNING_GOSSIPD_GOSSIP_STORE_WIREGEN_H
#include <ccan/tal/tal.h>
#include <wire/tlvstream.h>
#include <wire/wire.h>
#include <common/amount.h>
#include <common/node_id.h>
enum gossip_store_wire {
/* This always follows the channel_announce / private_announce */
WIRE_GOSSIP_STORE_CHANNEL_AMOUNT = 4101,
/* Mimics a channel_announce */
WIRE_GOSSIP_STORE_PRIVATE_CHANNEL = 4104,
WIRE_GOSSIP_STORE_PRIVATE_UPDATE = 4102,
WIRE_GOSSIP_STORE_DELETE_CHAN = 4103,
WIRE_GOSSIP_STORE_ENDED = 4105,
/* FIXME: Here for COMPAT with v0.9.0 and before only. */
WIRE_GOSSIPD_LOCAL_ADD_CHANNEL_OBS = 3503,
};
const char *gossip_store_wire_name(int e);
/**
* Determine whether a given message type is defined as a message.
*
* Returns true if the message type is part of the message definitions we have
* generated parsers for, false if it is a custom message that cannot be
* handled internally.
*/
bool gossip_store_wire_is_defined(u16 type);
/* WIRE: GOSSIP_STORE_CHANNEL_AMOUNT */
/* This always follows the channel_announce / private_announce */
u8 *towire_gossip_store_channel_amount(const tal_t *ctx, struct amount_sat satoshis);
bool fromwire_gossip_store_channel_amount(const void *p, struct amount_sat *satoshis);
/* WIRE: GOSSIP_STORE_PRIVATE_CHANNEL */
/* Mimics a channel_announce */
u8 *towire_gossip_store_private_channel(const tal_t *ctx, struct amount_sat satoshis, const u8 *announcement);
bool fromwire_gossip_store_private_channel(const tal_t *ctx, const void *p, struct amount_sat *satoshis, u8 **announcement);
/* WIRE: GOSSIP_STORE_PRIVATE_UPDATE */
u8 *towire_gossip_store_private_update(const tal_t *ctx, const u8 *update);
bool fromwire_gossip_store_private_update(const tal_t *ctx, const void *p, u8 **update);
/* WIRE: GOSSIP_STORE_DELETE_CHAN */
u8 *towire_gossip_store_delete_chan(const tal_t *ctx, const struct short_channel_id *scid);
bool fromwire_gossip_store_delete_chan(const void *p, struct short_channel_id *scid);
/* WIRE: GOSSIP_STORE_ENDED */
u8 *towire_gossip_store_ended(const tal_t *ctx, u64 equivalent_offset);
bool fromwire_gossip_store_ended(const void *p, u64 *equivalent_offset);
/* WIRE: GOSSIPD_LOCAL_ADD_CHANNEL_OBS */
/* FIXME: Here for COMPAT with v0.9.0 and before only. */
u8 *towire_gossipd_local_add_channel_obs(const tal_t *ctx, const struct short_channel_id *short_channel_id, const struct node_id *remote_node_id, struct amount_sat satoshis, const u8 *features);
bool fromwire_gossipd_local_add_channel_obs(const tal_t *ctx, const void *p, struct short_channel_id *short_channel_id, struct node_id *remote_node_id, struct amount_sat *satoshis, u8 **features);
#endif /* LIGHTNING_GOSSIPD_GOSSIP_STORE_WIREGEN_H */
// SHA256STAMP:15e0760c876736aaf08229c33e7615b20e6a35790fb8d72d09ecc31a472bf783

View File

@ -1,164 +0,0 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the .csv file it was generated from. */
/* Original template can be found at tools/gen/impl_template */
#include <gossipd/gossipd_peerd_wiregen.h>
#include <assert.h>
#include <ccan/array_size/array_size.h>
#include <ccan/mem/mem.h>
#include <ccan/tal/str/str.h>
#include <common/utils.h>
#include <stdio.h>
#ifndef SUPERVERBOSE
#define SUPERVERBOSE(...)
#endif
/* These must be distinct from WIRE_CHANNEL_ANNOUNCEMENT etc. gossip msgs! */
const char *gossipd_peerd_wire_name(int e)
{
static char invalidbuf[sizeof("INVALID ") + STR_MAX_CHARS(e)];
switch ((enum gossipd_peerd_wire)e) {
case WIRE_GOSSIPD_GET_UPDATE: return "WIRE_GOSSIPD_GET_UPDATE";
case WIRE_GOSSIPD_GET_UPDATE_REPLY: return "WIRE_GOSSIPD_GET_UPDATE_REPLY";
case WIRE_GOSSIPD_LOCAL_CHANNEL_UPDATE: return "WIRE_GOSSIPD_LOCAL_CHANNEL_UPDATE";
case WIRE_GOSSIPD_LOCAL_CHANNEL_ANNOUNCEMENT: return "WIRE_GOSSIPD_LOCAL_CHANNEL_ANNOUNCEMENT";
}
snprintf(invalidbuf, sizeof(invalidbuf), "INVALID %i", e);
return invalidbuf;
}
bool gossipd_peerd_wire_is_defined(u16 type)
{
switch ((enum gossipd_peerd_wire)type) {
case WIRE_GOSSIPD_GET_UPDATE:;
case WIRE_GOSSIPD_GET_UPDATE_REPLY:;
case WIRE_GOSSIPD_LOCAL_CHANNEL_UPDATE:;
case WIRE_GOSSIPD_LOCAL_CHANNEL_ANNOUNCEMENT:;
return true;
}
return false;
}
/* WIRE: GOSSIPD_GET_UPDATE */
/* Channel daemon can ask for updates for a specific channel */
/* errors. */
u8 *towire_gossipd_get_update(const tal_t *ctx, const struct short_channel_id *short_channel_id)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_GOSSIPD_GET_UPDATE);
towire_short_channel_id(&p, short_channel_id);
return memcheck(p, tal_count(p));
}
bool fromwire_gossipd_get_update(const void *p, struct short_channel_id *short_channel_id)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIPD_GET_UPDATE)
return false;
fromwire_short_channel_id(&cursor, &plen, short_channel_id);
return cursor != NULL;
}
/* WIRE: GOSSIPD_GET_UPDATE_REPLY */
/* If channel isn't known */
u8 *towire_gossipd_get_update_reply(const tal_t *ctx, const u8 *update)
{
u16 len = tal_count(update);
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_GOSSIPD_GET_UPDATE_REPLY);
towire_u16(&p, len);
towire_u8_array(&p, update, len);
return memcheck(p, tal_count(p));
}
bool fromwire_gossipd_get_update_reply(const tal_t *ctx, const void *p, u8 **update)
{
u16 len;
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIPD_GET_UPDATE_REPLY)
return false;
len = fromwire_u16(&cursor, &plen);
// 2nd case update
*update = len ? tal_arr(ctx, u8, len) : NULL;
fromwire_u8_array(&cursor, &plen, *update, len);
return cursor != NULL;
}
/* WIRE: GOSSIPD_LOCAL_CHANNEL_UPDATE */
/* Send this channel_update. */
u8 *towire_gossipd_local_channel_update(const tal_t *ctx, const struct short_channel_id *short_channel_id, bool disable, u16 cltv_expiry_delta, struct amount_msat htlc_minimum_msat, u32 fee_base_msat, u32 fee_proportional_millionths, struct amount_msat htlc_maximum_msat)
{
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_GOSSIPD_LOCAL_CHANNEL_UPDATE);
towire_short_channel_id(&p, short_channel_id);
towire_bool(&p, disable);
towire_u16(&p, cltv_expiry_delta);
towire_amount_msat(&p, htlc_minimum_msat);
towire_u32(&p, fee_base_msat);
towire_u32(&p, fee_proportional_millionths);
towire_amount_msat(&p, htlc_maximum_msat);
return memcheck(p, tal_count(p));
}
bool fromwire_gossipd_local_channel_update(const void *p, struct short_channel_id *short_channel_id, bool *disable, u16 *cltv_expiry_delta, struct amount_msat *htlc_minimum_msat, u32 *fee_base_msat, u32 *fee_proportional_millionths, struct amount_msat *htlc_maximum_msat)
{
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIPD_LOCAL_CHANNEL_UPDATE)
return false;
fromwire_short_channel_id(&cursor, &plen, short_channel_id);
*disable = fromwire_bool(&cursor, &plen);
*cltv_expiry_delta = fromwire_u16(&cursor, &plen);
*htlc_minimum_msat = fromwire_amount_msat(&cursor, &plen);
*fee_base_msat = fromwire_u32(&cursor, &plen);
*fee_proportional_millionths = fromwire_u32(&cursor, &plen);
*htlc_maximum_msat = fromwire_amount_msat(&cursor, &plen);
return cursor != NULL;
}
/* WIRE: GOSSIPD_LOCAL_CHANNEL_ANNOUNCEMENT */
/* Send this channel_announcement */
u8 *towire_gossipd_local_channel_announcement(const tal_t *ctx, const u8 *cannount)
{
u16 len = tal_count(cannount);
u8 *p = tal_arr(ctx, u8, 0);
towire_u16(&p, WIRE_GOSSIPD_LOCAL_CHANNEL_ANNOUNCEMENT);
towire_u16(&p, len);
towire_u8_array(&p, cannount, len);
return memcheck(p, tal_count(p));
}
bool fromwire_gossipd_local_channel_announcement(const tal_t *ctx, const void *p, u8 **cannount)
{
u16 len;
const u8 *cursor = p;
size_t plen = tal_count(p);
if (fromwire_u16(&cursor, &plen) != WIRE_GOSSIPD_LOCAL_CHANNEL_ANNOUNCEMENT)
return false;
len = fromwire_u16(&cursor, &plen);
// 2nd case cannount
*cannount = len ? tal_arr(ctx, u8, len) : NULL;
fromwire_u8_array(&cursor, &plen, *cannount, len);
return cursor != NULL;
}
// SHA256STAMP:01c31e7629455bd51aa1e3b5180ac28a195700762dd1854f17785894ad330c17

View File

@ -1,60 +0,0 @@
/* This file was generated by generate-wire.py */
/* Do not modify this file! Modify the _csv file it was generated from. */
/* Original template can be found at tools/gen/header_template */
#ifndef LIGHTNING_GOSSIPD_GOSSIPD_PEERD_WIREGEN_H
#define LIGHTNING_GOSSIPD_GOSSIPD_PEERD_WIREGEN_H
#include <ccan/tal/tal.h>
#include <wire/tlvstream.h>
#include <wire/wire.h>
#include <bitcoin/short_channel_id.h>
#include <common/amount.h>
enum gossipd_peerd_wire {
/* Channel daemon can ask for updates for a specific channel */
/* errors. */
WIRE_GOSSIPD_GET_UPDATE = 3501,
/* If channel isn't known */
WIRE_GOSSIPD_GET_UPDATE_REPLY = 3601,
/* Send this channel_update. */
WIRE_GOSSIPD_LOCAL_CHANNEL_UPDATE = 3504,
/* Send this channel_announcement */
WIRE_GOSSIPD_LOCAL_CHANNEL_ANNOUNCEMENT = 3506,
};
const char *gossipd_peerd_wire_name(int e);
/**
* Determine whether a given message type is defined as a message.
*
* Returns true if the message type is part of the message definitions we have
* generated parsers for, false if it is a custom message that cannot be
* handled internally.
*/
bool gossipd_peerd_wire_is_defined(u16 type);
/* WIRE: GOSSIPD_GET_UPDATE */
/* Channel daemon can ask for updates for a specific channel */
/* errors. */
u8 *towire_gossipd_get_update(const tal_t *ctx, const struct short_channel_id *short_channel_id);
bool fromwire_gossipd_get_update(const void *p, struct short_channel_id *short_channel_id);
/* WIRE: GOSSIPD_GET_UPDATE_REPLY */
/* If channel isn't known */
u8 *towire_gossipd_get_update_reply(const tal_t *ctx, const u8 *update);
bool fromwire_gossipd_get_update_reply(const tal_t *ctx, const void *p, u8 **update);
/* WIRE: GOSSIPD_LOCAL_CHANNEL_UPDATE */
/* Send this channel_update. */
u8 *towire_gossipd_local_channel_update(const tal_t *ctx, const struct short_channel_id *short_channel_id, bool disable, u16 cltv_expiry_delta, struct amount_msat htlc_minimum_msat, u32 fee_base_msat, u32 fee_proportional_millionths, struct amount_msat htlc_maximum_msat);
bool fromwire_gossipd_local_channel_update(const void *p, struct short_channel_id *short_channel_id, bool *disable, u16 *cltv_expiry_delta, struct amount_msat *htlc_minimum_msat, u32 *fee_base_msat, u32 *fee_proportional_millionths, struct amount_msat *htlc_maximum_msat);
/* WIRE: GOSSIPD_LOCAL_CHANNEL_ANNOUNCEMENT */
/* Send this channel_announcement */
u8 *towire_gossipd_local_channel_announcement(const tal_t *ctx, const u8 *cannount);
bool fromwire_gossipd_local_channel_announcement(const tal_t *ctx, const void *p, u8 **cannount);
#endif /* LIGHTNING_GOSSIPD_GOSSIPD_PEERD_WIREGEN_H */
// SHA256STAMP:01c31e7629455bd51aa1e3b5180ac28a195700762dd1854f17785894ad330c17

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