Lightning Labs Lightning API
The Lightning API from Lightning Labs — 64 operation(s) for lightning.
Operations 71
GET
/v1/aliases/list
lncli: `listaliases` ListAliases returns the set of all aliases that have ever existed with their confirmed SCID (if it exists) and/or the base SCID (in the case of zero conf).
#
GET
/v1/balance/blockchain
lncli: `walletbalance` WalletBalance returns total unspent outputs(confirmed and unconfirmed), all confirmed unspent outputs and all unconfirmed unspent outputs under control of th
#
GET
/v1/balance/channels
lncli: `channelbalance` ChannelBalance returns a report on the total funds across all open channels, categorized in local/remote, pending local/remote and unsettled local/remote ba
#
GET
/v1/channels
lncli: `listchannels` ListChannels returns a description of all the open channels that this node is a participant in.
#
POST
/v1/channels
OpenChannelSync is a synchronous version of the OpenChannel RPC call. This call is meant to be consumed by clients to the REST proxy. As with all other sync calls, all byte slices
#
DELETE
/v1/channels/abandon/{channel_point.funding_txid_str}/{channel_point.output_index}
lncli: `abandonchannel` AbandonChannel removes all channel state from the database except for a close summary. This method can be used to get rid of permanently unusable channels d
#
POST
/v1/channels/acceptor
ChannelAcceptor dispatches a bi-directional streaming RPC in which OpenChannel requests are sent to the client and the client responds with a boolean that tells LND whether or not
#
GET
/v1/channels/backup
ExportAllChannelBackups returns static channel backups for all existing channels known to lnd. A set of regular singular static channel backups for each channel are returned. Addit
#
POST
/v1/channels/backup/restore
lncli: `restorechanbackup` RestoreChannelBackups accepts a set of singular channel backups, or a single encrypted multi-chan backup and attempts to recover any funds remaining with
#
GET
/v1/channels/backup/subscribe
SubscribeChannelBackups allows a client to sub-subscribe to the most up to date information concerning the state of all channel backups. Each time a new channel is added, we return
#
POST
/v1/channels/backup/verify
lncli: `verifychanbackup` VerifyChanBackup allows a caller to verify the integrity of a channel backup snapshot. This method will accept either a packed Single or a packed Multi. S
#
GET
/v1/channels/backup/{chan_point.funding_txid_str}/{chan_point.output_index}
lncli: `exportchanbackup` ExportChannelBackup attempts to return an encrypted static channel backup for the target channel identified by it channel point. The backup is encrypted w
#
POST
/v1/channels/batch
lncli: `batchopenchannel` BatchOpenChannel attempts to open multiple single-funded channels in a single transaction in an atomic way. This means either all channel open requests su
#
GET
/v1/channels/closed
lncli: `closedchannels` ClosedChannels returns a description of all the closed channels that this node was a participant in.
#
GET
/v1/channels/pending
lncli: `pendingchannels` PendingChannels returns a list of all the channels that are currently considered "pending". A channel is pending if it has finished the funding workflow an
#
POST
/v1/channels/stream
lncli: `openchannel` OpenChannel attempts to open a singly funded channel specified in the request to a remote peer. Users are able to specify a target number of blocks that the fu
#
GET
/v1/channels/subscribe
SubscribeChannelEvents creates a uni-directional stream from the server to the client in which any updates relevant to the state of the channels are sent over. Events include new a
#
POST
/v1/channels/transaction-stream
lncli: `sendpayment` Deprecated, use routerrpc.SendPaymentV2. SendPayment dispatches a bi-directional streaming RPC for sending payments through the Lightning Network. A single RPC
#
POST
/v1/channels/transactions
Deprecated, use routerrpc.SendPaymentV2. SendPaymentSync is the synchronous non-streaming version of SendPayment. This RPC is intended to be consumed by clients of the REST proxy.
#
POST
/v1/channels/transactions/route
Deprecated, use routerrpc.SendToRouteV2. SendToRouteSync is a synchronous version of SendToRoute. It Will block until the payment either fails or succeeds.
#
DELETE
/v1/channels/{channel_point.funding_txid_str}/{channel_point.output_index}
lncli: `closechannel` CloseChannel attempts to close an active channel identified by its channel outpoint (ChannelPoint). The actions of this method can additionally be augmented t
#
POST
/v1/chanpolicy
lncli: `updatechanpolicy` UpdateChannelPolicy allows the caller to update the fee schedule and channel policies for all channels globally, or a particular channel.
#
GET
/v1/custommessage/subscribe
lncli: `subscribecustom` SubscribeCustomMessages subscribes to a stream of incoming custom peer messages.
#
POST
/v1/debuglevel
lncli: `debuglevel` DebugLevel allows a caller to programmatically set the logging verbosity of lnd. The logging can be targeted according to a coarse daemon-wide logging level, or
#
GET
/v1/fees
lncli: `feereport` FeeReport allows the caller to obtain a report detailing the current fee schedule enforced by the node globally for each channel.
#
POST
/v1/funding/step
FundingStateStep is an advanced funding related call that allows the caller to either execute some preparatory steps for a funding workflow, or manually progress a funding workflow
#
GET
/v1/getdebuginfo
lncli: 'getdebuginfo' GetDebugInfo returns debug information concerning the state of the daemon and its subsystems. This includes the full configuration and the latest log entries
#
GET
/v1/getinfo
lncli: `getinfo` GetInfo returns general information concerning the lightning node including it's identity pubkey, alias, the chains it is connected to, and information concerning
#
GET
/v1/getrecoveryinfo
* lncli: `getrecoveryinfo` GetRecoveryInfo returns information concerning the recovery mode including whether it's in a recovery mode, whether the recovery is finished, and the pro
#
GET
/v1/graph
lncli: `describegraph` DescribeGraph returns a description of the latest graph state from the point of view of the node. The graph information is partitioned into two components: a
#
GET
/v1/graph/edge/{chan_id}
lncli: `getchaninfo` GetChanInfo returns the latest authenticated network announcement for the given channel identified by its channel ID: an 8-byte integer which uniquely identifi
#
GET
/v1/graph/info
lncli: `getnetworkinfo` GetNetworkInfo returns some basic stats about the known channel graph from the point of view of the node.
#
GET
/v1/graph/node/{pub_key}
lncli: `getnodeinfo` GetNodeInfo returns the latest advertised, aggregated, and authenticated channel information for the specified node identified by its public key.
#
GET
/v1/graph/nodemetrics
lncli: `getnodemetrics` GetNodeMetrics returns node metrics calculated from the graph. Currently the only supported metric is betweenness centrality of individual nodes.
#
GET
/v1/graph/routes/{pub_key}/{amt}
lncli: `queryroutes` QueryRoutes attempts to query the daemon's Channel Router for a possible route to a target destination capable of carrying a specific amount of satoshis. The r
#
POST
/v1/graph/routes/{pub_key}/{amt}
lncli: `queryroutes` QueryRoutes attempts to query the daemon's Channel Router for a possible route to a target destination capable of carrying a specific amount of satoshis. The r
#
GET
/v1/graph/subscribe
SubscribeChannelGraph launches a streaming RPC that allows the caller to receive notifications upon any changes to the channel graph topology from the point of view of the respondi
#
GET
/v1/htlc-resolution/{chan_id}/{htlc_index}
LookupHtlcResolution retrieves a final htlc resolution from the database. If the htlc has no final resolution yet, a NotFound grpc status code is returned.
#
GET
/v1/invoice/{r_hash_str}
lncli: `lookupinvoice` LookupInvoice attempts to look up an invoice according to its payment hash. The passed payment hash *must* be exactly 32 bytes, if not, an error is returned.
#
GET
/v1/invoices
lncli: `listinvoices` ListInvoices returns a list of all the invoices currently stored within the database. Any active debug invoices are ignored. It has full support for paginated
#
DELETE
/v1/invoices
lncli: `deletecanceledinvoice` DeleteCanceledInvoice removes a canceled invoice from the database. If the invoice is not in the canceled state, an error will be returned.
#
POST
/v1/invoices
lncli: `addinvoice` AddInvoice attempts to add a new invoice to the invoice database. Any duplicated invoices are rejected, therefore all invoices *must* have a unique payment prei
#
GET
/v1/invoices/subscribe
SubscribeInvoices returns a uni-directional stream (server -> client) for notifying the client of newly added/settled invoices. The caller can optionally specify the add_index and/
#
POST
/v1/macaroon
lncli: `bakemacaroon` BakeMacaroon allows the creation of a new macaroon with custom read and write permissions. No first-party caveats are added since this can be done offline.
#
POST
/v1/macaroon/checkpermissions
CheckMacaroonPermissions checks whether the provided macaroon contains all the provided permissions. If the macaroon is valid (e.g. all caveats are satisfied), and all permissions
#
GET
/v1/macaroon/ids
lncli: `listmacaroonids` ListMacaroonIDs returns all root key IDs that are in use.
#
GET
/v1/macaroon/permissions
lncli: `listpermissions` ListPermissions lists all RPC method URIs and their required macaroon permissions to access them.
#
DELETE
/v1/macaroon/{root_key_id}
lncli: `deletemacaroonid` DeleteMacaroonID deletes the specified macaroon ID and invalidates all macaroons derived from that ID.
#
POST
/v1/middleware
RegisterRPCMiddleware adds a new gRPC middleware to the interceptor chain. A gRPC middleware is software component external to lnd that aims to add additional business logic to lnd
#
GET
/v1/newaddress
lncli: `newaddress` NewAddress creates a new address under control of the local wallet.
#
GET
/v1/onionmessage/subscribe
lncli: `subscribeonion` SubscribeOnionMessages subscribes to a stream of incoming onion messages.
#
DELETE
/v1/payment
lncli: `deletepayments` DeletePayment deletes an outgoing payment from DB. Note that it will not attempt to delete an In-Flight payment, since that would be unsafe.
#
DELETE
/v1/payments
lncli: `deletepayments --all` DeleteAllPayments deletes all outgoing payments from DB. Note that it will not attempt to delete In-Flight payments, since that would be unsafe.
#
GET
/v1/payreq/{pay_req}
lncli: `decodepayreq` DecodePayReq takes an encoded payment request string and attempts to decode it, returning a full description of the conditions encoded within the payment requ
#
GET
/v1/peers
lncli: `listpeers` ListPeers returns a verbose listing of all currently active peers.
#
POST
/v1/peers
lncli: `connect` ConnectPeer attempts to establish a connection to a remote peer. This is at the networking level, and is used for communication between nodes. This is distinct fro
#
GET
/v1/peers/subscribe
SubscribePeerEvents creates a uni-directional stream from the server to the client in which any events relevant to the state of peers are sent over. Events include peers going onli
#
DELETE
/v1/peers/{pub_key}
lncli: `disconnect` DisconnectPeer attempts to disconnect one peer from another identified by a given pubKey. In the case that we currently have a pending or active channel with th
#
POST
/v1/signmessage
lncli: `signmessage` SignMessage signs a message with this node's private key. The returned signature string is `zbase32` encoded and pubkey recoverable, meaning that only the mess
#
POST
/v1/stop
lncli: `stop` StopDaemon will send a shutdown request to the interrupt handler, triggering a graceful shutdown of the daemon.
#
POST
/v1/switch
lncli: `fwdinghistory` ForwardingHistory allows the caller to query the htlcswitch for a record of all HTLCs forwarded within the target time range, and integer offset within that
#
GET
/v1/transactions
lncli: `listchaintxns` GetTransactions returns a list describing all the known transactions relevant to the wallet.
#
POST
/v1/transactions
lncli: `sendcoins` SendCoins executes a request to send coins to a particular address. Unlike SendMany, this RPC call only allows creating a single output at a time. If neither tar
#
GET
/v1/transactions/fee
lncli: `estimatefee` EstimateFee asks the chain backend to estimate the fee rate and total fees for a transaction that pays to multiple specified outputs.
#
POST
/v1/transactions/many
lncli: `sendmany` SendMany handles a request for a transaction that creates multiple specified outputs in parallel. If neither target_conf, or sat_per_vbyte are set, then the inter
#
GET
/v1/transactions/subscribe
SubscribeTransactions creates a uni-directional stream from the server to the client in which any newly discovered transactions relevant to the wallet are sent over.
#
POST
/v1/verifymessage
lncli: `verifymessage` VerifyMessage verifies a signature over a message and recovers the signer's public key. The signature is only deemed valid if the recovered public key corres
#