NAV Navbar
shell python javascript

LND REST API Reference

Welcome to the REST API reference documentation for LND, the Lightning Network Daemon.

This site features the API documentation for Python and JavaScript, along with barebones examples using curl, for HTTP requests. It is intended for those who already understand how to work with LND. If this is your first time or you need a refresher, you may consider perusing our LND developer site featuring a tutorial, resources and guides at dev.lightning.community.

The examples to the right assume that the there is a local lnd instance running and listening for REST connections on port 8080. LND_DIR will be used as a placeholder to denote the base directory of the lnd instance. By default, this is ~/.lnd on Linux and ~/Library/Application Support/Lnd on macOS.

At the time of writing this documentation, two things are needed in order to make an HTTP request to an lnd instance: a TLS/SSL connection and a macaroon used for RPC authentication. The examples to the right will show how these can be used in order to make a successful, secure, and authenticated HTTP request.

The original rpc.proto file from which the gRPC documentation was generated can be found here.

NOTE: The documentation is currently lacking how to receive streaming responses from streaming endpoints in JavaScript. If you would like to contribute this change, please take a look at https://github.com/lightninglabs/lightning-api.

NOTE: The byte field type must be set as the base64 encoded string representation of a raw byte array.

Alternatively, the gRPC documentation can be found here.

/v1/invoices/subscribe

$ curl -X GET http://localhost:8080/v1/invoices/subscribe
{ 
    "amt_paid_msat": <string>, 
    "settle_date": <string>, 
    "add_index": <string>, 
    "receipt": <byte>, 
    "description_hash": <byte>, 
    "r_preimage": <byte>, 
    "state": <InvoiceInvoiceState>, 
    "cltv_expiry": <string>, 
    "route_hints": <array RouteHint>, 
    "r_hash": <byte>, 
    "creation_date": <string>, 
    "settle_index": <string>, 
    "memo": <string>, 
    "private": <boolean>, 
    "expiry": <string>, 
    "fallback_addr": <string>, 
    "settled": <boolean>, 
    "amt_paid": <string>, 
    "payment_request": <string>, 
    "amt_paid_sat": <string>, 
    "value": <string>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/invoices/subscribe'
>>> r = requests.get(url, verify=cert_path, stream=True)
>>> for raw_response in r.iter_lines():
>>>     json_response = json.loads(raw_response)
>>>     print(json_response)
{ 
    "amt_paid_msat": <string>, 
    "settle_date": <string>, 
    "add_index": <string>, 
    "receipt": <byte>, 
    "description_hash": <byte>, 
    "r_preimage": <byte>, 
    "state": <InvoiceInvoiceState>, 
    "cltv_expiry": <string>, 
    "route_hints": <array RouteHint>, 
    "r_hash": <byte>, 
    "creation_date": <string>, 
    "settle_index": <string>, 
    "memo": <string>, 
    "private": <boolean>, 
    "expiry": <string>, 
    "fallback_addr": <string>, 
    "settled": <boolean>, 
    "amt_paid": <string>, 
    "payment_request": <string>, 
    "amt_paid_sat": <string>, 
    "value": <string>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/invoices/subscribe',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "amt_paid_msat": <string>, 
    "settle_date": <string>, 
    "add_index": <string>, 
    "receipt": <byte>, 
    "description_hash": <byte>, 
    "r_preimage": <byte>, 
    "state": <InvoiceInvoiceState>, 
    "cltv_expiry": <string>, 
    "route_hints": <array RouteHint>, 
    "r_hash": <byte>, 
    "creation_date": <string>, 
    "settle_index": <string>, 
    "memo": <string>, 
    "private": <boolean>, 
    "expiry": <string>, 
    "fallback_addr": <string>, 
    "settled": <boolean>, 
    "amt_paid": <string>, 
    "payment_request": <string>, 
    "amt_paid_sat": <string>, 
    "value": <string>, 
}

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/or the settle_index. If the add_index is specified, then we'll first start by sending add invoice events for all invoices with an add_index greater than the specified value. If the settle_index is specified, the next, we'll send out all settle events for invoices with a settle_index greater than the specified value. One or both of these fields can be set. If no fields are set, then we'll only send out the latest add/settle events.

Field Type Placement Description
add_index string query If specified (non-zero), then we'll first start by sending out notifications for all added indexes with an add_index greater than this value. This allows callers to catch up on any events they missed while they weren't connected to the streaming RPC.
settle_index string query If specified (non-zero), then we'll first start by sending out notifications for all settled indexes with an settle_index greater than this value. This allows callers to catch up on any events they missed while they weren't connected to the streaming RPC.

Response (streaming)

Field Type Description
amt_paid_msat string The amount that was accepted for this invoice, in millisatoshis. This will ONLY be set if this invoice has been settled. We provide this field as if the invoice was created with a zero value, then we need to record what amount was ultimately accepted. Additionally, it's possible that the sender paid MORE that was specified in the original invoice. So we'll record that here as well.
settle_date string When this invoice was settled
add_index string The "add" index of this invoice. Each newly created invoice will increment this index making it monotonically increasing. Callers to the SubscribeInvoices call can use this to instantly get notified of all added invoices with an add_index greater than this one.
receipt byte Deprecated. An optional cryptographic receipt of payment which is not implemented.
description_hash byte Hash (SHA-256) of a description of the payment. Used if the description of payment (memo) is too long to naturally fit within the description field of an encoded payment request.
r_preimage byte The hex-encoded preimage (32 byte) which will allow settling an incoming HTLC payable to this preimage
state InvoiceInvoiceState The state the invoice is in.
cltv_expiry string Delta to use for the time-lock of the CLTV extended to the final hop.
route_hints array RouteHint Route hints that can each be individually used to assist in reaching the invoice's destination.
r_hash byte The hash of the preimage
creation_date string When this invoice was created
settle_index string The "settle" index of this invoice. Each newly settled invoice will increment this index making it monotonically increasing. Callers to the SubscribeInvoices call can use this to instantly get notified of all settled invoices with an settle_index greater than this one.
memo string An optional memo to attach along with the invoice. Used for record keeping purposes for the invoice's creator, and will also be set in the description field of the encoded payment request if the description_hash field is not being used.
private boolean Whether this invoice should include routing hints for private channels.
expiry string Payment request expiry time in seconds. Default is 3600 (1 hour).
fallback_addr string Fallback on-chain address.
settled boolean Whether this invoice has been fulfilled
amt_paid string Deprecated, use amt_paid_sat or amt_paid_msat.
payment_request string A bare-bones invoice for a payment within the Lightning Network. With the details of the invoice, the sender has all the data necessary to send a payment to the recipient.
amt_paid_sat string The amount that was accepted for this invoice, in satoshis. This will ONLY be set if this invoice has been settled. We provide this field as if the invoice was created with a zero value, then we need to record what amount was ultimately accepted. Additionally, it's possible that the sender paid MORE that was specified in the original invoice. So we'll record that here as well.
value string The value of this invoice in satoshis

/v1/channels/transactions

$ curl -X POST http://localhost:8080/v1/channels/transactions -d '{ \
    "outgoing_chan_id":<string>, \
    "dest":<byte>, \
    "fee_limit":<FeeLimit>, \
    "payment_hash_string":<string>, \
    "dest_string":<string>, \
    "final_cltv_delta":<int32>, \
    "payment_hash":<byte>, \
    "payment_request":<string>, \
    "cltv_limit":<int64>, \
    "amt":<string>, \
}'
{ 
    "payment_error": <string>, 
    "payment_route": <Route>, 
    "payment_hash": <byte>, 
    "payment_preimage": <byte>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/channels/transactions'
>>> data = { 
        'outgoing_chan_id': <string>, 
        'dest': base64.b64encode(<byte>).decode(), 
        'fee_limit': <FeeLimit>, 
        'payment_hash_string': <string>, 
        'dest_string': <string>, 
        'final_cltv_delta': <int32>, 
        'payment_hash': base64.b64encode(<byte>).decode(), 
        'payment_request': <string>, 
        'cltv_limit': <int64>, 
        'amt': <string>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "payment_error": <string>, 
    "payment_route": <Route>, 
    "payment_hash": <byte>, 
    "payment_preimage": <byte>, 
}
> var request = require('request');
> var requestBody = { 
    outgoing_chan_id: <string>,
    dest: <byte>,
    fee_limit: <FeeLimit>,
    payment_hash_string: <string>,
    dest_string: <string>,
    final_cltv_delta: <int32>,
    payment_hash: <byte>,
    payment_request: <string>,
    cltv_limit: <int64>,
    amt: <string>,
  };
> var options = {
    url: 'http://localhost:8080/v1/channels/transactions',
    json: true,
    form: JSON.stringify(requestBody)
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "payment_error": <string>, 
    "payment_route": <Route>, 
    "payment_hash": <byte>, 
    "payment_preimage": <byte>, 
}

POST /v1/channels/transactions

SendPaymentSync is the synchronous non-streaming version of SendPayment. This RPC is intended to be consumed by clients of the REST proxy. Additionally, this RPC expects the destination's public key and the payment hash (if any) to be encoded as hex strings.

Field Type Placement Description
outgoing_chan_id string body The channel id of the channel that must be taken to the first hop. If zero, any channel may be used.
dest byte body The identity pubkey of the payment recipient
fee_limit FeeLimit body The maximum number of satoshis that will be paid as a fee of the payment. This value can be represented either as a percentage of the amount being sent, or as a fixed amount of the maximum fee the user is willing the pay to send the payment.
payment_hash_string string body The hex-encoded hash to use within the payment's HTLC
dest_string string body The hex-encoded identity pubkey of the payment recipient
final_cltv_delta int32 body The CLTV delta from the current height that should be used to set the timelock for the final hop.
payment_hash byte body The hash to use within the payment's HTLC
payment_request string body A bare-bones invoice for a payment within the Lightning Network. With the details of the invoice, the sender has all the data necessary to send a payment to the recipient.
cltv_limit int64 body An optional maximum total time lock for the route. If zero, there is no maximum enforced.
amt string body Number of satoshis to send.

Response

Field Type Description
payment_error string
payment_route Route
payment_hash byte
payment_preimage byte

/v1/payments

$ curl -X GET http://localhost:8080/v1/payments
{ 
    "payments": <array Payment>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/payments'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "payments": <array Payment>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/payments',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "payments": <array Payment>, 
}

GET /v1/payments

lncli: listpayments ListPayments returns a list of all outgoing payments.

Field Type Placement Description
include_incomplete boolean query If true, then return payments that have not yet fully completed. This means that pending payments, as well as failed payments will show up if this field is set to True.

Response

Field Type Description
payments array Payment The list of payments
$ curl -X DELETE http://localhost:8080/v1/payments
{ 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/payments'
>>> r = requests.delete(url, verify=cert_path)
>>> print(r.json())
{ 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/payments',
    json: true
  };
> request.delete(options, function(error, response, body) {
    console.log(body);
  });
{ 
}

DELETE /v1/payments

DeleteAllPayments deletes all outgoing payments from DB.

This request has no parameters.

Response

This response has no parameters.

/v1/unlockwallet

$ curl -X POST http://localhost:8080/v1/unlockwallet -d '{ \
    "wallet_password":<byte>, \
    "channel_backups":<ChanBackupSnapshot>, \
    "recovery_window":<int32>, \
}'
{ 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/unlockwallet'
>>> data = { 
        'wallet_password': base64.b64encode(<byte>).decode(), 
        'channel_backups': <ChanBackupSnapshot>, 
        'recovery_window': <int32>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
}
> var request = require('request');
> var requestBody = { 
    wallet_password: <byte>,
    channel_backups: <ChanBackupSnapshot>,
    recovery_window: <int32>,
  };
> var options = {
    url: 'http://localhost:8080/v1/unlockwallet',
    json: true,
    form: JSON.stringify(requestBody)
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
}

POST /v1/unlockwallet

lncli: unlock UnlockWallet is used at startup of lnd to provide a password to unlock the wallet database.

Field Type Placement Description
wallet_password byte body wallet_password should be the current valid passphrase for the daemon. This will be required to decrypt on-disk material that the daemon requires to function properly.
channel_backups ChanBackupSnapshot body channel_backups is an optional argument that allows clients to recover the settled funds within a set of channels. This should be populated if the user was unable to close out all channels and sweep funds before partial or total data loss occurred. If specified, then after on-chain recovery of funds, lnd begin to carry out the data loss recovery protocol in order to recover the funds in each channel from a remote force closed transaction.
recovery_window int32 body recovery_window is an optional argument specifying the address lookahead when restoring a wallet seed. The recovery window applies to each individual branch of the BIP44 derivation paths. Supplying a recovery window of zero indicates that no addresses should be recovered, such after the first initialization of the wallet.

Response

This response has no parameters.

/v1/initwallet

$ curl -X POST http://localhost:8080/v1/initwallet -d '{ \
    "wallet_password":<byte>, \
    "aezeed_passphrase":<byte>, \
    "channel_backups":<ChanBackupSnapshot>, \
    "cipher_seed_mnemonic":<array string>, \
    "recovery_window":<int32>, \
}'
{ 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/initwallet'
>>> data = { 
        'wallet_password': base64.b64encode(<byte>).decode(), 
        'aezeed_passphrase': base64.b64encode(<byte>).decode(), 
        'channel_backups': <ChanBackupSnapshot>, 
        'cipher_seed_mnemonic': <array string>, 
        'recovery_window': <int32>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
}
> var request = require('request');
> var requestBody = { 
    wallet_password: <byte>,
    aezeed_passphrase: <byte>,
    channel_backups: <ChanBackupSnapshot>,
    cipher_seed_mnemonic: <array string>,
    recovery_window: <int32>,
  };
> var options = {
    url: 'http://localhost:8080/v1/initwallet',
    json: true,
    form: JSON.stringify(requestBody)
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
}

POST /v1/initwallet

InitWallet is used when lnd is starting up for the first time to fully initialize the daemon and its internal wallet. At the very least a wallet password must be provided. This will be used to encrypt sensitive material on disk.

Field Type Placement Description
wallet_password byte body wallet_password is the passphrase that should be used to encrypt the wallet. This MUST be at least 8 chars in length. After creation, this password is required to unlock the daemon.
aezeed_passphrase byte body aezeed_passphrase is an optional user provided passphrase that will be used to encrypt the generated aezeed cipher seed.
channel_backups ChanBackupSnapshot body channel_backups is an optional argument that allows clients to recover the settled funds within a set of channels. This should be populated if the user was unable to close out all channels and sweep funds before partial or total data loss occurred. If specified, then after on-chain recovery of funds, lnd begin to carry out the data loss recovery protocol in order to recover the funds in each channel from a remote force closed transaction.
cipher_seed_mnemonic array string body cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed cipher seed obtained by the user. This may have been generated by the GenSeed method, or be an existing seed.
recovery_window int32 body recovery_window is an optional argument specifying the address lookahead when restoring a wallet seed. The recovery window applies to each individual branch of the BIP44 derivation paths. Supplying a recovery window of zero indicates that no addresses should be recovered, such after the first initialization of the wallet.

Response

This response has no parameters.

/v1/channels/closed

$ curl -X GET http://localhost:8080/v1/channels/closed
{ 
    "channels": <array ChannelCloseSummary>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/channels/closed'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "channels": <array ChannelCloseSummary>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/channels/closed',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "channels": <array ChannelCloseSummary>, 
}

GET /v1/channels/closed

lncli: closedchannels ClosedChannels returns a description of all the closed channels that this node was a participant in.

Field Type Placement Description
cooperative boolean query None
local_force boolean query None
remote_force boolean query None
breach boolean query None
funding_canceled boolean query None
abandoned boolean query None

Response

Field Type Description
channels array ChannelCloseSummary

/v1/switch

$ curl -X POST http://localhost:8080/v1/switch -d '{ \
    "start_time":<string>, \
    "index_offset":<int64>, \
    "end_time":<string>, \
    "num_max_events":<int64>, \
}'
{ 
    "last_offset_index": <int64>, 
    "forwarding_events": <array ForwardingEvent>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/switch'
>>> data = { 
        'start_time': <string>, 
        'index_offset': <int64>, 
        'end_time': <string>, 
        'num_max_events': <int64>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "last_offset_index": <int64>, 
    "forwarding_events": <array ForwardingEvent>, 
}
> var request = require('request');
> var requestBody = { 
    start_time: <string>,
    index_offset: <int64>,
    end_time: <string>,
    num_max_events: <int64>,
  };
> var options = {
    url: 'http://localhost:8080/v1/switch',
    json: true,
    form: JSON.stringify(requestBody)
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "last_offset_index": <int64>, 
    "forwarding_events": <array ForwardingEvent>, 
}

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 time range. If no time-range is specified, then the first chunk of the past 24 hrs of forwarding history are returned.

Field Type Placement Description
start_time string body Start time is the starting point of the forwarding history request. All records beyond this point will be included, respecting the end time, and the index offset.
index_offset int64 body Index offset is the offset in the time series to start at. As each response can only contain 50k records, callers can use this to skip around within a packed time series.
end_time string body End time is the end point of the forwarding history request. The response will carry at most 50k records between the start time and the end time. The index offset can be used to implement pagination.
num_max_events int64 body The max number of events to return in the response to this query.

Response

Field Type Description
last_offset_index int64 The index of the last time in the set of returned forwarding events. Can be used to seek further, pagination style.
forwarding_events array ForwardingEvent A list of forwarding events from the time slice of the time series specified in the request.

/v1/channels/backup/restore

$ curl -X POST http://localhost:8080/v1/channels/backup/restore -d '{ \
    "chan_backups":<ChannelBackups>, \
    "multi_chan_backup":<byte>, \
}'
{ 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/channels/backup/restore'
>>> data = { 
        'chan_backups': <ChannelBackups>, 
        'multi_chan_backup': base64.b64encode(<byte>).decode(), 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
}
> var request = require('request');
> var requestBody = { 
    chan_backups: <ChannelBackups>,
    multi_chan_backup: <byte>,
  };
> var options = {
    url: 'http://localhost:8080/v1/channels/backup/restore',
    json: true,
    form: JSON.stringify(requestBody)
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
}

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 within the channel. If we are able to unpack the backup, then the new channel will be shown under listchannels, as well as pending channels.

Field Type Placement Description
chan_backups ChannelBackups body
multi_chan_backup byte body

Response

This response has no parameters.

/v1/channels/pending

$ curl -X GET http://localhost:8080/v1/channels/pending
{ 
    "pending_closing_channels": <array PendingChannelsResponseClosedChannel>, 
    "total_limbo_balance": <string>, 
    "pending_open_channels": <array PendingChannelsResponsePendingOpenChannel>, 
    "waiting_close_channels": <array PendingChannelsResponseWaitingCloseChannel>, 
    "pending_force_closing_channels": <array PendingChannelsResponseForceClosedChannel>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/channels/pending'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "pending_closing_channels": <array PendingChannelsResponseClosedChannel>, 
    "total_limbo_balance": <string>, 
    "pending_open_channels": <array PendingChannelsResponsePendingOpenChannel>, 
    "waiting_close_channels": <array PendingChannelsResponseWaitingCloseChannel>, 
    "pending_force_closing_channels": <array PendingChannelsResponseForceClosedChannel>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/channels/pending',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "pending_closing_channels": <array PendingChannelsResponseClosedChannel>, 
    "total_limbo_balance": <string>, 
    "pending_open_channels": <array PendingChannelsResponsePendingOpenChannel>, 
    "waiting_close_channels": <array PendingChannelsResponseWaitingCloseChannel>, 
    "pending_force_closing_channels": <array PendingChannelsResponseForceClosedChannel>, 
}

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 and is waiting for confirmations for the funding txn, or is in the process of closure, either initiated cooperatively or non-cooperatively.

This request has no parameters.

Response

Field Type Description
pending_closing_channels array PendingChannelsResponseClosedChannel Channels pending closing
total_limbo_balance string The balance in satoshis encumbered in pending channels
pending_open_channels array PendingChannelsResponsePendingOpenChannel Channels pending opening
waiting_close_channels array PendingChannelsResponseWaitingCloseChannel Channels waiting for closing tx to confirm
pending_force_closing_channels array PendingChannelsResponseForceClosedChannel Channels pending force closing

/v1/payreq

$ curl -X GET http://localhost:8080/v1/payreq/{pay_req}
{ 
    "num_satoshis": <string>, 
    "fallback_addr": <string>, 
    "timestamp": <string>, 
    "expiry": <string>, 
    "cltv_expiry": <string>, 
    "description_hash": <string>, 
    "payment_hash": <string>, 
    "destination": <string>, 
    "route_hints": <array RouteHint>, 
    "description": <string>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/payreq/{pay_req}'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "num_satoshis": <string>, 
    "fallback_addr": <string>, 
    "timestamp": <string>, 
    "expiry": <string>, 
    "cltv_expiry": <string>, 
    "description_hash": <string>, 
    "payment_hash": <string>, 
    "destination": <string>, 
    "route_hints": <array RouteHint>, 
    "description": <string>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/payreq/{pay_req}',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "num_satoshis": <string>, 
    "fallback_addr": <string>, 
    "timestamp": <string>, 
    "expiry": <string>, 
    "cltv_expiry": <string>, 
    "description_hash": <string>, 
    "payment_hash": <string>, 
    "destination": <string>, 
    "route_hints": <array RouteHint>, 
    "description": <string>, 
}

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 request.

Field Type Placement Description
pay_req string path None

Response

Field Type Description
num_satoshis string
fallback_addr string
timestamp string
expiry string
cltv_expiry string
description_hash string
payment_hash string
destination string
route_hints array RouteHint
description string

/v1/graph

$ curl -X GET http://localhost:8080/v1/graph
{ 
    "nodes": <array LightningNode>, 
    "edges": <array ChannelEdge>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/graph'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "nodes": <array LightningNode>, 
    "edges": <array ChannelEdge>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/graph',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "nodes": <array LightningNode>, 
    "edges": <array ChannelEdge>, 
}

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: all the nodes/vertexes, and all the edges that connect the vertexes themselves. As this is a directed graph, the edges also contain the node directional specific routing policy which includes: the time lock delta, fee information, etc.

Field Type Placement Description
include_unannounced boolean query Whether unannounced channels are included in the response or not. If set, unannounced channels are included. Unannounced channels are both private channels, and public channels that are not yet announced to the network.

Response

Field Type Description
nodes array LightningNode The list of LightningNodes in this channel graph
edges array ChannelEdge The list of ChannelEdges in this channel graph

/v1/verifymessage

$ curl -X POST http://localhost:8080/v1/verifymessage -d '{ \
    "msg":<byte>, \
    "signature":<string>, \
}'
{ 
    "valid": <boolean>, 
    "pubkey": <string>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/verifymessage'
>>> data = { 
        'msg': base64.b64encode(<byte>).decode(), 
        'signature': <string>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "valid": <boolean>, 
    "pubkey": <string>, 
}
> var request = require('request');
> var requestBody = { 
    msg: <byte>,
    signature: <string>,
  };
> var options = {
    url: 'http://localhost:8080/v1/verifymessage',
    json: true,
    form: JSON.stringify(requestBody)
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "valid": <boolean>, 
    "pubkey": <string>, 
}

POST /v1/verifymessage

lncli: verifymessage VerifyMessage verifies a signature over a msg. The signature must be zbase32 encoded and signed by an active node in the resident node's channel database. In addition to returning the validity of the signature, VerifyMessage also returns the recovered pubkey from the signature.

Field Type Placement Description
msg byte body The message over which the signature is to be verified
signature string body The signature to be verified over the given message

Response

Field Type Description
valid boolean Whether the signature was valid over the given message
pubkey string The pubkey recovered from the signature

/v1/transactions

$ curl -X GET http://localhost:8080/v1/transactions
{ 
    "transactions": <array Transaction>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/transactions'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "transactions": <array Transaction>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/transactions',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "transactions": <array Transaction>, 
}

GET /v1/transactions

lncli: listchaintxns GetTransactions returns a list describing all the known transactions relevant to the wallet.

This request has no parameters.

Response

Field Type Description
transactions array Transaction The list of transactions relevant to the wallet.
$ curl -X POST http://localhost:8080/v1/transactions -d '{ \
    "send_all":<boolean>, \
    "target_conf":<int32>, \
    "amount":<string>, \
    "sat_per_byte":<string>, \
    "addr":<string>, \
}'
{ 
    "txid": <string>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/transactions'
>>> data = { 
        'send_all': <boolean>, 
        'target_conf': <int32>, 
        'amount': <string>, 
        'sat_per_byte': <string>, 
        'addr': <string>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "txid": <string>, 
}
> var request = require('request');
> var requestBody = { 
    send_all: <boolean>,
    target_conf: <int32>,
    amount: <string>,
    sat_per_byte: <string>,
    addr: <string>,
  };
> var options = {
    url: 'http://localhost:8080/v1/transactions',
    json: true,
    form: JSON.stringify(requestBody)
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "txid": <string>, 
}

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 target_conf, or sat_per_byte are set, then the internal wallet will consult its fee model to determine a fee for the default confirmation target.

Field Type Placement Description
send_all boolean body If set, then the amount field will be ignored, and lnd will attempt to send all the coins under control of the internal wallet to the specified address.
target_conf int32 body The target number of blocks that this transaction should be confirmed by.
amount string body The amount in satoshis to send
sat_per_byte string body A manual fee rate set in sat/byte that should be used when crafting the transaction.
addr string body The address to send coins to

Response

Field Type Description
txid string The transaction ID of the transaction

/v1/balance/blockchain

$ curl -X GET http://localhost:8080/v1/balance/blockchain
{ 
    "total_balance": <string>, 
    "unconfirmed_balance": <string>, 
    "confirmed_balance": <string>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/balance/blockchain'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "total_balance": <string>, 
    "unconfirmed_balance": <string>, 
    "confirmed_balance": <string>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/balance/blockchain',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "total_balance": <string>, 
    "unconfirmed_balance": <string>, 
    "confirmed_balance": <string>, 
}

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 the wallet.

This request has no parameters.

Response

Field Type Description
total_balance string The balance of the wallet
unconfirmed_balance string The unconfirmed balance of a wallet(with 0 confirmations)
confirmed_balance string The confirmed balance of a wallet(with >= 1 confirmations)

/v1/invoices

$ curl -X GET http://localhost:8080/v1/invoices
{ 
    "last_index_offset": <string>, 
    "first_index_offset": <string>, 
    "invoices": <array Invoice>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/invoices'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "last_index_offset": <string>, 
    "first_index_offset": <string>, 
    "invoices": <array Invoice>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/invoices',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "last_index_offset": <string>, 
    "first_index_offset": <string>, 
    "invoices": <array Invoice>, 
}

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 responses, allowing users to query for specific invoices through their add_index. This can be done by using either the first_index_offset or last_index_offset fields included in the response as the index_offset of the next request. By default, the first 100 invoices created will be returned. Backwards pagination is also supported through the Reversed flag.

Field Type Placement Description
pending_only boolean query If set, only unsettled invoices will be returned in the response.
index_offset string query The index of an invoice that will be used as either the start or end of a query to determine which invoices should be returned in the response.
num_max_invoices string query The max number of invoices to return in the response to this query.
reversed boolean query If set, the invoices returned will result from seeking backwards from the specified index offset. This can be used to paginate backwards.

Response

Field Type Description
last_index_offset string The index of the last item in the set of returned invoices. This can be used to seek further, pagination style.
first_index_offset string The index of the last item in the set of returned invoices. This can be used to seek backwards, pagination style.
invoices array Invoice A list of invoices from the time slice of the time series specified in the request.
$ curl -X POST http://localhost:8080/v1/invoices -d '{ \
    "amt_paid_msat":<string>, \
    "settle_date":<string>, \
    "add_index":<string>, \
    "receipt":<byte>, \
    "description_hash":<byte>, \
    "r_preimage":<byte>, \
    "state":<InvoiceInvoiceState>, \
    "cltv_expiry":<string>, \
    "route_hints":<array RouteHint>, \
    "r_hash":<byte>, \
    "creation_date":<string>, \
    "settle_index":<string>, \
    "memo":<string>, \
    "private":<boolean>, \
    "expiry":<string>, \
    "fallback_addr":<string>, \
    "settled":<boolean>, \
    "amt_paid":<string>, \
    "payment_request":<string>, \
    "amt_paid_sat":<string>, \
    "value":<string>, \
}'
{ 
    "r_hash": <byte>, 
    "payment_request": <string>, 
    "add_index": <string>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/invoices'
>>> data = { 
        'amt_paid_msat': <string>, 
        'settle_date': <string>, 
        'add_index': <string>, 
        'receipt': base64.b64encode(<byte>).decode(), 
        'description_hash': base64.b64encode(<byte>).decode(), 
        'r_preimage': base64.b64encode(<byte>).decode(), 
        'state': <InvoiceInvoiceState>, 
        'cltv_expiry': <string>, 
        'route_hints': <array RouteHint>, 
        'r_hash': base64.b64encode(<byte>).decode(), 
        'creation_date': <string>, 
        'settle_index': <string>, 
        'memo': <string>, 
        'private': <boolean>, 
        'expiry': <string>, 
        'fallback_addr': <string>, 
        'settled': <boolean>, 
        'amt_paid': <string>, 
        'payment_request': <string>, 
        'amt_paid_sat': <string>, 
        'value': <string>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "r_hash": <byte>, 
    "payment_request": <string>, 
    "add_index": <string>, 
}
> var request = require('request');
> var requestBody = { 
    amt_paid_msat: <string>,
    settle_date: <string>,
    add_index: <string>,
    receipt: <byte>,
    description_hash: <byte>,
    r_preimage: <byte>,
    state: <InvoiceInvoiceState>,
    cltv_expiry: <string>,
    route_hints: <array RouteHint>,
    r_hash: <byte>,
    creation_date: <string>,
    settle_index: <string>,
    memo: <string>,
    private: <boolean>,
    expiry: <string>,
    fallback_addr: <string>,
    settled: <boolean>,
    amt_paid: <string>,
    payment_request: <string>,
    amt_paid_sat: <string>,
    value: <string>,
  };
> var options = {
    url: 'http://localhost:8080/v1/invoices',
    json: true,
    form: JSON.stringify(requestBody)
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "r_hash": <byte>, 
    "payment_request": <string>, 
    "add_index": <string>, 
}

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 preimage.

Field Type Placement Description
amt_paid_msat string body The amount that was accepted for this invoice, in millisatoshis. This will ONLY be set if this invoice has been settled. We provide this field as if the invoice was created with a zero value, then we need to record what amount was ultimately accepted. Additionally, it's possible that the sender paid MORE that was specified in the original invoice. So we'll record that here as well.
settle_date string body When this invoice was settled
add_index string body The "add" index of this invoice. Each newly created invoice will increment this index making it monotonically increasing. Callers to the SubscribeInvoices call can use this to instantly get notified of all added invoices with an add_index greater than this one.
receipt byte body Deprecated. An optional cryptographic receipt of payment which is not implemented.
description_hash byte body Hash (SHA-256) of a description of the payment. Used if the description of payment (memo) is too long to naturally fit within the description field of an encoded payment request.
r_preimage byte body The hex-encoded preimage (32 byte) which will allow settling an incoming HTLC payable to this preimage
state InvoiceInvoiceState body The state the invoice is in.
cltv_expiry string body Delta to use for the time-lock of the CLTV extended to the final hop.
route_hints array RouteHint body Route hints that can each be individually used to assist in reaching the invoice's destination.
r_hash byte body The hash of the preimage
creation_date string body When this invoice was created
settle_index string body The "settle" index of this invoice. Each newly settled invoice will increment this index making it monotonically increasing. Callers to the SubscribeInvoices call can use this to instantly get notified of all settled invoices with an settle_index greater than this one.
memo string body An optional memo to attach along with the invoice. Used for record keeping purposes for the invoice's creator, and will also be set in the description field of the encoded payment request if the description_hash field is not being used.
private boolean body Whether this invoice should include routing hints for private channels.
expiry string body Payment request expiry time in seconds. Default is 3600 (1 hour).
fallback_addr string body Fallback on-chain address.
settled boolean body Whether this invoice has been fulfilled
amt_paid string body Deprecated, use amt_paid_sat or amt_paid_msat.
payment_request string body A bare-bones invoice for a payment within the Lightning Network. With the details of the invoice, the sender has all the data necessary to send a payment to the recipient.
amt_paid_sat string body The amount that was accepted for this invoice, in satoshis. This will ONLY be set if this invoice has been settled. We provide this field as if the invoice was created with a zero value, then we need to record what amount was ultimately accepted. Additionally, it's possible that the sender paid MORE that was specified in the original invoice. So we'll record that here as well.
value string body The value of this invoice in satoshis

Response

Field Type Description
r_hash byte
payment_request string A bare-bones invoice for a payment within the Lightning Network. With the details of the invoice, the sender has all the data necessary to send a payment to the recipient.
add_index string The "add" index of this invoice. Each newly created invoice will increment this index making it monotonically increasing. Callers to the SubscribeInvoices call can use this to instantly get notified of all added invoices with an add_index greater than this one.

/v1/genseed

$ curl -X GET http://localhost:8080/v1/genseed
{ 
    "cipher_seed_mnemonic": <array string>, 
    "enciphered_seed": <byte>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/genseed'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "cipher_seed_mnemonic": <array string>, 
    "enciphered_seed": <byte>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/genseed',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "cipher_seed_mnemonic": <array string>, 
    "enciphered_seed": <byte>, 
}

GET /v1/genseed

GenSeed is the first method that should be used to instantiate a new lnd instance. This method allows a caller to generate a new aezeed cipher seed given an optional passphrase. If provided, the passphrase will be necessary to decrypt the cipherseed to expose the internal wallet seed.

Field Type Placement Description
aezeed_passphrase string query aezeed_passphrase is an optional user provided passphrase that will be used to encrypt the generated aezeed cipher seed.
seed_entropy string query seed_entropy is an optional 16-bytes generated via CSPRNG. If not specified, then a fresh set of randomness will be used to create the seed.

Response

Field Type Description
cipher_seed_mnemonic array string cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed cipher seed obtained by the user. This field is optional, as if not provided, then the daemon will generate a new cipher seed for the user. Otherwise, then the daemon will attempt to recover the wallet state linked to this cipher seed.
enciphered_seed byte enciphered_seed are the raw aezeed cipher seed bytes. This is the raw cipher text before run through our mnemonic encoding scheme.

/v1/utxos

$ curl -X GET http://localhost:8080/v1/utxos
{ 
    "utxos": <array Utxo>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/utxos'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "utxos": <array Utxo>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/utxos',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "utxos": <array Utxo>, 
}

GET /v1/utxos

lncli: listunspent ListUnspent returns a list of all utxos spendable by the wallet with a number of confirmations between the specified minimum and maximum.

Field Type Placement Description
min_confs int32 query The minimum number of confirmations to be included.
max_confs int32 query The maximum number of confirmations to be included.

Response

Field Type Description
utxos array Utxo A list of utxos

/v1/graph/info

$ curl -X GET http://localhost:8080/v1/graph/info
{ 
    "graph_diameter": <int64>, 
    "avg_channel_size": <double>, 
    "num_zombie_chans": <string>, 
    "num_nodes": <int64>, 
    "avg_out_degree": <double>, 
    "median_channel_size_sat": <string>, 
    "max_out_degree": <int64>, 
    "num_channels": <int64>, 
    "min_channel_size": <string>, 
    "max_channel_size": <string>, 
    "total_network_capacity": <string>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/graph/info'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "graph_diameter": <int64>, 
    "avg_channel_size": <double>, 
    "num_zombie_chans": <string>, 
    "num_nodes": <int64>, 
    "avg_out_degree": <double>, 
    "median_channel_size_sat": <string>, 
    "max_out_degree": <int64>, 
    "num_channels": <int64>, 
    "min_channel_size": <string>, 
    "max_channel_size": <string>, 
    "total_network_capacity": <string>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/graph/info',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "graph_diameter": <int64>, 
    "avg_channel_size": <double>, 
    "num_zombie_chans": <string>, 
    "num_nodes": <int64>, 
    "avg_out_degree": <double>, 
    "median_channel_size_sat": <string>, 
    "max_out_degree": <int64>, 
    "num_channels": <int64>, 
    "min_channel_size": <string>, 
    "max_channel_size": <string>, 
    "total_network_capacity": <string>, 
}

GET /v1/graph/info

lncli: getnetworkinfo GetNetworkInfo returns some basic stats about the known channel graph from the point of view of the node.

This request has no parameters.

Response

Field Type Description
graph_diameter int64
avg_channel_size double
num_zombie_chans string The number of edges marked as zombies.
num_nodes int64
avg_out_degree double
median_channel_size_sat string
max_out_degree int64
num_channels int64
min_channel_size string
max_channel_size string
total_network_capacity string

/v1/channels

$ curl -X DELETE http://localhost:8080/v1/channels/{channel_point.funding_txid_str}/{channel_point.output_index}
{ 
    "chan_close": <ChannelCloseUpdate>, 
    "close_pending": <PendingUpdate>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/channels/{channel_point.funding_txid_str}/{channel_point.output_index}'
>>> r = requests.delete(url, verify=cert_path, stream=True)
>>> for raw_response in r.iter_lines():
>>>     json_response = json.loads(raw_response)
>>>     print(json_response)
{ 
    "chan_close": <ChannelCloseUpdate>, 
    "close_pending": <PendingUpdate>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/channels/{channel_point.funding_txid_str}/{channel_point.output_index}',
    json: true
  };
> request.delete(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "chan_close": <ChannelCloseUpdate>, 
    "close_pending": <PendingUpdate>, 
}

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 to attempt a force close after a timeout period in the case of an inactive peer. If a non-force close (cooperative closure) is requested, then the user can specify either a target number of blocks until the closure transaction is confirmed, or a manual fee rate. If neither are specified, then a default lax, block confirmation target is used.

Field Type Placement Description
channel_point.funding_txid_str string path None
channel_point.output_index int64 path None

Response (streaming)

Field Type Description
chan_close ChannelCloseUpdate
close_pending PendingUpdate
$ curl -X GET http://localhost:8080/v1/channels
{ 
    "channels": <array Channel>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/channels'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "channels": <array Channel>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/channels',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "channels": <array Channel>, 
}

GET /v1/channels

lncli: listchannels ListChannels returns a description of all the open channels that this node is a participant in.

Field Type Placement Description
active_only boolean query None
inactive_only boolean query None
public_only boolean query None
private_only boolean query None

Response

Field Type Description
channels array Channel The list of active channels
$ curl -X POST http://localhost:8080/v1/channels -d '{ \
    "spend_unconfirmed":<boolean>, \
    "push_sat":<string>, \
    "remote_csv_delay":<int64>, \
    "private":<boolean>, \
    "node_pubkey":<byte>, \
    "min_confs":<int32>, \
    "node_pubkey_string":<string>, \
    "local_funding_amount":<string>, \
    "sat_per_byte":<string>, \
    "min_htlc_msat":<string>, \
    "target_conf":<int32>, \
}'
{ 
    "output_index": <int64>, 
    "funding_txid_str": <string>, 
    "funding_txid_bytes": <byte>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/channels'
>>> data = { 
        'spend_unconfirmed': <boolean>, 
        'push_sat': <string>, 
        'remote_csv_delay': <int64>, 
        'private': <boolean>, 
        'node_pubkey': base64.b64encode(<byte>).decode(), 
        'min_confs': <int32>, 
        'node_pubkey_string': <string>, 
        'local_funding_amount': <string>, 
        'sat_per_byte': <string>, 
        'min_htlc_msat': <string>, 
        'target_conf': <int32>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "output_index": <int64>, 
    "funding_txid_str": <string>, 
    "funding_txid_bytes": <byte>, 
}
> var request = require('request');
> var requestBody = { 
    spend_unconfirmed: <boolean>,
    push_sat: <string>,
    remote_csv_delay: <int64>,
    private: <boolean>,
    node_pubkey: <byte>,
    min_confs: <int32>,
    node_pubkey_string: <string>,
    local_funding_amount: <string>,
    sat_per_byte: <string>,
    min_htlc_msat: <string>,
    target_conf: <int32>,
  };
> var options = {
    url: 'http://localhost:8080/v1/channels',
    json: true,
    form: JSON.stringify(requestBody)
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "output_index": <int64>, 
    "funding_txid_str": <string>, 
    "funding_txid_bytes": <byte>, 
}

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 are intended to be populated as hex encoded strings.

Field Type Placement Description
spend_unconfirmed boolean body Whether unconfirmed outputs should be used as inputs for the funding transaction.
push_sat string body The number of satoshis to push to the remote side as part of the initial commitment state
remote_csv_delay int64 body The delay we require on the remote's commitment transaction. If this is not set, it will be scaled automatically with the channel size.
private boolean body Whether this channel should be private, not announced to the greater network.
node_pubkey byte body The pubkey of the node to open a channel with
min_confs int32 body The minimum number of confirmations each one of your outputs used for the funding transaction must satisfy.
node_pubkey_string string body The hex encoded pubkey of the node to open a channel with
local_funding_amount string body The number of satoshis the wallet should commit to the channel
sat_per_byte string body A manual fee rate set in sat/byte that should be used when crafting the funding transaction.
min_htlc_msat string body The minimum value in millisatoshi we will require for incoming HTLCs on the channel.
target_conf int32 body The target number of blocks that the funding transaction should be confirmed by.

Response

Field Type Description
output_index int64 The index of the output of the funding transaction
funding_txid_str string Hex-encoded string representing the funding transaction
funding_txid_bytes byte Txid of the funding transaction

/v1/changepassword

$ curl -X POST http://localhost:8080/v1/changepassword -d '{ \
    "new_password":<byte>, \
    "current_password":<byte>, \
}'
{ 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/changepassword'
>>> data = { 
        'new_password': base64.b64encode(<byte>).decode(), 
        'current_password': base64.b64encode(<byte>).decode(), 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
}
> var request = require('request');
> var requestBody = { 
    new_password: <byte>,
    current_password: <byte>,
  };
> var options = {
    url: 'http://localhost:8080/v1/changepassword',
    json: true,
    form: JSON.stringify(requestBody)
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
}

POST /v1/changepassword

lncli: changepassword ChangePassword changes the password of the encrypted wallet. This will automatically unlock the wallet database if successful.

Field Type Placement Description
new_password byte body new_password should be the new passphrase that will be needed to unlock the daemon.
current_password byte body current_password should be the current valid passphrase used to unlock the daemon.

Response

This response has no parameters.

/v1/invoice

$ curl -X GET http://localhost:8080/v1/invoice/{r_hash_str}
{ 
    "amt_paid_msat": <string>, 
    "settle_date": <string>, 
    "add_index": <string>, 
    "receipt": <byte>, 
    "description_hash": <byte>, 
    "r_preimage": <byte>, 
    "state": <InvoiceInvoiceState>, 
    "cltv_expiry": <string>, 
    "route_hints": <array RouteHint>, 
    "r_hash": <byte>, 
    "creation_date": <string>, 
    "settle_index": <string>, 
    "memo": <string>, 
    "private": <boolean>, 
    "expiry": <string>, 
    "fallback_addr": <string>, 
    "settled": <boolean>, 
    "amt_paid": <string>, 
    "payment_request": <string>, 
    "amt_paid_sat": <string>, 
    "value": <string>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/invoice/{r_hash_str}'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "amt_paid_msat": <string>, 
    "settle_date": <string>, 
    "add_index": <string>, 
    "receipt": <byte>, 
    "description_hash": <byte>, 
    "r_preimage": <byte>, 
    "state": <InvoiceInvoiceState>, 
    "cltv_expiry": <string>, 
    "route_hints": <array RouteHint>, 
    "r_hash": <byte>, 
    "creation_date": <string>, 
    "settle_index": <string>, 
    "memo": <string>, 
    "private": <boolean>, 
    "expiry": <string>, 
    "fallback_addr": <string>, 
    "settled": <boolean>, 
    "amt_paid": <string>, 
    "payment_request": <string>, 
    "amt_paid_sat": <string>, 
    "value": <string>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/invoice/{r_hash_str}',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "amt_paid_msat": <string>, 
    "settle_date": <string>, 
    "add_index": <string>, 
    "receipt": <byte>, 
    "description_hash": <byte>, 
    "r_preimage": <byte>, 
    "state": <InvoiceInvoiceState>, 
    "cltv_expiry": <string>, 
    "route_hints": <array RouteHint>, 
    "r_hash": <byte>, 
    "creation_date": <string>, 
    "settle_index": <string>, 
    "memo": <string>, 
    "private": <boolean>, 
    "expiry": <string>, 
    "fallback_addr": <string>, 
    "settled": <boolean>, 
    "amt_paid": <string>, 
    "payment_request": <string>, 
    "amt_paid_sat": <string>, 
    "value": <string>, 
}

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.

Field Type Placement Description
r_hash_str string path None
r_hash string query The payment hash of the invoice to be looked up.

Response

Field Type Description
amt_paid_msat string The amount that was accepted for this invoice, in millisatoshis. This will ONLY be set if this invoice has been settled. We provide this field as if the invoice was created with a zero value, then we need to record what amount was ultimately accepted. Additionally, it's possible that the sender paid MORE that was specified in the original invoice. So we'll record that here as well.
settle_date string When this invoice was settled
add_index string The "add" index of this invoice. Each newly created invoice will increment this index making it monotonically increasing. Callers to the SubscribeInvoices call can use this to instantly get notified of all added invoices with an add_index greater than this one.
receipt byte Deprecated. An optional cryptographic receipt of payment which is not implemented.
description_hash byte Hash (SHA-256) of a description of the payment. Used if the description of payment (memo) is too long to naturally fit within the description field of an encoded payment request.
r_preimage byte The hex-encoded preimage (32 byte) which will allow settling an incoming HTLC payable to this preimage
state InvoiceInvoiceState The state the invoice is in.
cltv_expiry string Delta to use for the time-lock of the CLTV extended to the final hop.
route_hints array RouteHint Route hints that can each be individually used to assist in reaching the invoice's destination.
r_hash byte The hash of the preimage
creation_date string When this invoice was created
settle_index string The "settle" index of this invoice. Each newly settled invoice will increment this index making it monotonically increasing. Callers to the SubscribeInvoices call can use this to instantly get notified of all settled invoices with an settle_index greater than this one.
memo string An optional memo to attach along with the invoice. Used for record keeping purposes for the invoice's creator, and will also be set in the description field of the encoded payment request if the description_hash field is not being used.
private boolean Whether this invoice should include routing hints for private channels.
expiry string Payment request expiry time in seconds. Default is 3600 (1 hour).
fallback_addr string Fallback on-chain address.
settled boolean Whether this invoice has been fulfilled
amt_paid string Deprecated, use amt_paid_sat or amt_paid_msat.
payment_request string A bare-bones invoice for a payment within the Lightning Network. With the details of the invoice, the sender has all the data necessary to send a payment to the recipient.
amt_paid_sat string The amount that was accepted for this invoice, in satoshis. This will ONLY be set if this invoice has been settled. We provide this field as if the invoice was created with a zero value, then we need to record what amount was ultimately accepted. Additionally, it's possible that the sender paid MORE that was specified in the original invoice. So we'll record that here as well.
value string The value of this invoice in satoshis

/v1/fees

$ curl -X GET http://localhost:8080/v1/fees
{ 
    "day_fee_sum": <string>, 
    "week_fee_sum": <string>, 
    "month_fee_sum": <string>, 
    "channel_fees": <array ChannelFeeReport>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/fees'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "day_fee_sum": <string>, 
    "week_fee_sum": <string>, 
    "month_fee_sum": <string>, 
    "channel_fees": <array ChannelFeeReport>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/fees',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "day_fee_sum": <string>, 
    "week_fee_sum": <string>, 
    "month_fee_sum": <string>, 
    "channel_fees": <array ChannelFeeReport>, 
}

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.

This request has no parameters.

Response

Field Type Description
day_fee_sum string The total amount of fee revenue (in satoshis) the switch has collected over the past 24 hrs.
week_fee_sum string The total amount of fee revenue (in satoshis) the switch has collected over the past 1 week.
month_fee_sum string The total amount of fee revenue (in satoshis) the switch has collected over the past 1 month.
channel_fees array ChannelFeeReport An array of channel fee reports which describes the current fee schedule for each channel.

/v1/graph/node

$ curl -X GET http://localhost:8080/v1/graph/node/{pub_key}
{ 
    "total_capacity": <string>, 
    "channels": <array ChannelEdge>, 
    "num_channels": <int64>, 
    "node": <LightningNode>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/graph/node/{pub_key}'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "total_capacity": <string>, 
    "channels": <array ChannelEdge>, 
    "num_channels": <int64>, 
    "node": <LightningNode>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/graph/node/{pub_key}',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "total_capacity": <string>, 
    "channels": <array ChannelEdge>, 
    "num_channels": <int64>, 
    "node": <LightningNode>, 
}

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.

Field Type Placement Description
pub_key string path None
include_channels boolean query If true, will include all known channels associated with the node.

Response

Field Type Description
total_capacity string The sum of all channels capacity for the node, denominated in satoshis.
channels array ChannelEdge A list of all public channels for the node.
num_channels int64 The total number of channels for the node.
node LightningNode An individual vertex/node within the channel graph. A node is connected to other nodes by one or more channel edges emanating from it. As the graph is directed, a node will also have an incoming edge attached to it for each outgoing edge.

/v1/channels/backup/verify

$ curl -X POST http://localhost:8080/v1/channels/backup/verify -d '{ \
    "multi_chan_backup":<MultiChanBackup>, \
    "single_chan_backups":<ChannelBackups>, \
}'
{ 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/channels/backup/verify'
>>> data = { 
        'multi_chan_backup': <MultiChanBackup>, 
        'single_chan_backups': <ChannelBackups>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
}
> var request = require('request');
> var requestBody = { 
    multi_chan_backup: <MultiChanBackup>,
    single_chan_backups: <ChannelBackups>,
  };
> var options = {
    url: 'http://localhost:8080/v1/channels/backup/verify',
    json: true,
    form: JSON.stringify(requestBody)
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
}

POST /v1/channels/backup/verify

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. Specifying both will result in an error.

Field Type Placement Description
multi_chan_backup MultiChanBackup body A multi-channel backup that covers all open channels currently known to lnd.
single_chan_backups ChannelBackups body The set of new channels that have been added since the last channel backup snapshot was requested.

Response

This response has no parameters.

/v1/channels/abandon

$ curl -X DELETE http://localhost:8080/v1/channels/abandon/{channel_point.funding_txid_str}/{channel_point.output_index}
{ 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/channels/abandon/{channel_point.funding_txid_str}/{channel_point.output_index}'
>>> r = requests.delete(url, verify=cert_path)
>>> print(r.json())
{ 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/channels/abandon/{channel_point.funding_txid_str}/{channel_point.output_index}',
    json: true
  };
> request.delete(options, function(error, response, body) {
    console.log(body);
  });
{ 
}

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 due to bugs fixed in newer versions of lnd. Only available when in debug builds of lnd.

Field Type Placement Description
channel_point.funding_txid_str string path None
channel_point.output_index int64 path None

Response

This response has no parameters.

/v1/getinfo

$ curl -X GET http://localhost:8080/v1/getinfo
{ 
    "uris": <array string>, 
    "num_peers": <int64>, 
    "num_pending_channels": <int64>, 
    "chains": <array Chain>, 
    "identity_pubkey": <string>, 
    "testnet": <boolean>, 
    "best_header_timestamp": <string>, 
    "synced_to_chain": <boolean>, 
    "block_hash": <string>, 
    "version": <string>, 
    "block_height": <int64>, 
    "num_active_channels": <int64>, 
    "num_inactive_channels": <int64>, 
    "color": <string>, 
    "alias": <string>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/getinfo'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "uris": <array string>, 
    "num_peers": <int64>, 
    "num_pending_channels": <int64>, 
    "chains": <array Chain>, 
    "identity_pubkey": <string>, 
    "testnet": <boolean>, 
    "best_header_timestamp": <string>, 
    "synced_to_chain": <boolean>, 
    "block_hash": <string>, 
    "version": <string>, 
    "block_height": <int64>, 
    "num_active_channels": <int64>, 
    "num_inactive_channels": <int64>, 
    "color": <string>, 
    "alias": <string>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/getinfo',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "uris": <array string>, 
    "num_peers": <int64>, 
    "num_pending_channels": <int64>, 
    "chains": <array Chain>, 
    "identity_pubkey": <string>, 
    "testnet": <boolean>, 
    "best_header_timestamp": <string>, 
    "synced_to_chain": <boolean>, 
    "block_hash": <string>, 
    "version": <string>, 
    "block_height": <int64>, 
    "num_active_channels": <int64>, 
    "num_inactive_channels": <int64>, 
    "color": <string>, 
    "alias": <string>, 
}

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 the number of open+pending channels.

This request has no parameters.

Response

Field Type Description
uris array string The URIs of the current node.
num_peers int64 Number of peers
num_pending_channels int64 Number of pending channels
chains array Chain A list of active chains the node is connected to
identity_pubkey string The identity pubkey of the current node.
testnet boolean Whether the current node is connected to testnet. This field is deprecated and the network field should be used instead
best_header_timestamp string Timestamp of the block best known to the wallet
synced_to_chain boolean Whether the wallet's view is synced to the main chain
block_hash string The node's current view of the hash of the best block
version string The version of the LND software that the node is running.
block_height int64 The node's current view of the height of the best block
num_active_channels int64 Number of active channels
num_inactive_channels int64 Number of inactive channels
color string The color of the current node in hex code format
alias string If applicable, the alias of the current node, e.g. "bob"

/v1/newaddress

$ curl -X GET http://localhost:8080/v1/newaddress
{ 
    "address": <string>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/newaddress'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "address": <string>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/newaddress',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "address": <string>, 
}

GET /v1/newaddress

lncli: newaddress NewAddress creates a new address under control of the local wallet.

Field Type Placement Description
type string query The address type.

Response

Field Type Description
address string The newly generated wallet address

/v1/channels/backup

$ curl -X GET http://localhost:8080/v1/channels/backup/{chan_point.funding_txid_str}/{chan_point.output_index}
{ 
    "chan_point": <ChannelPoint>, 
    "chan_backup": <byte>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/channels/backup/{chan_point.funding_txid_str}/{chan_point.output_index}'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "chan_point": <ChannelPoint>, 
    "chan_backup": <byte>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/channels/backup/{chan_point.funding_txid_str}/{chan_point.output_index}',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "chan_point": <ChannelPoint>, 
    "chan_backup": <byte>, 
}

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 with a key generated from the aezeed seed of the user. The returned backup can either be restored using the RestoreChannelBackup method once lnd is running, or via the InitWallet and UnlockWallet methods from the WalletUnlocker service.

Field Type Placement Description
chan_point.funding_txid_str string path None
chan_point.output_index int64 path None
chan_point.funding_txid_bytes string query Txid of the funding transaction.

Response

Field Type Description
chan_point ChannelPoint Identifies the channel that this backup belongs to.
chan_backup byte Is an encrypted single-chan backup. this can be passed to RestoreChannelBackups, or the WalletUnlocker Init and Unlock methods in order to trigger the recovery protocol.
$ curl -X GET http://localhost:8080/v1/channels/backup
{ 
    "multi_chan_backup": <MultiChanBackup>, 
    "single_chan_backups": <ChannelBackups>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/channels/backup'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "multi_chan_backup": <MultiChanBackup>, 
    "single_chan_backups": <ChannelBackups>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/channels/backup',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "multi_chan_backup": <MultiChanBackup>, 
    "single_chan_backups": <ChannelBackups>, 
}

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. Additionally, a multi-channel backup is returned as well, which contains a single encrypted blob containing the backups of each channel.

This request has no parameters.

Response

Field Type Description
multi_chan_backup MultiChanBackup A multi-channel backup that covers all open channels currently known to lnd.
single_chan_backups ChannelBackups The set of new channels that have been added since the last channel backup snapshot was requested.

/v1/signmessage

$ curl -X POST http://localhost:8080/v1/signmessage -d '{ \
    "msg":<byte>, \
}'
{ 
    "signature": <string>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/signmessage'
>>> data = { 
        'msg': base64.b64encode(<byte>).decode(), 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "signature": <string>, 
}
> var request = require('request');
> var requestBody = { 
    msg: <byte>,
  };
> var options = {
    url: 'http://localhost:8080/v1/signmessage',
    json: true,
    form: JSON.stringify(requestBody)
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "signature": <string>, 
}

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 message digest and signature are needed for verification.

Field Type Placement Description
msg byte body The message to be signed

Response

Field Type Description
signature string The signature for the given message

/v1/graph/edge

$ curl -X GET http://localhost:8080/v1/graph/edge/{chan_id}
{ 
    "last_update": <int64>, 
    "node1_pub": <string>, 
    "channel_id": <string>, 
    "node2_pub": <string>, 
    "capacity": <string>, 
    "node2_policy": <RoutingPolicy>, 
    "chan_point": <string>, 
    "node1_policy": <RoutingPolicy>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/graph/edge/{chan_id}'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "last_update": <int64>, 
    "node1_pub": <string>, 
    "channel_id": <string>, 
    "node2_pub": <string>, 
    "capacity": <string>, 
    "node2_policy": <RoutingPolicy>, 
    "chan_point": <string>, 
    "node1_policy": <RoutingPolicy>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/graph/edge/{chan_id}',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "last_update": <int64>, 
    "node1_pub": <string>, 
    "channel_id": <string>, 
    "node2_pub": <string>, 
    "capacity": <string>, 
    "node2_policy": <RoutingPolicy>, 
    "chan_point": <string>, 
    "node1_policy": <RoutingPolicy>, 
}

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 identifies the location of transaction's funding output within the blockchain.

Field Type Placement Description
chan_id string path None

Response

Field Type Description
last_update int64
node1_pub string
channel_id string The unique channel ID for the channel. The first 3 bytes are the block height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel.
node2_pub string
capacity string
node2_policy RoutingPolicy
chan_point string
node1_policy RoutingPolicy

/v1/channels/transactions/route

$ curl -X POST http://localhost:8080/v1/channels/transactions/route -d '{ \
    "route":<Route>, \
    "payment_hash":<byte>, \
    "payment_hash_string":<string>, \
}'
{ 
    "payment_error": <string>, 
    "payment_route": <Route>, 
    "payment_hash": <byte>, 
    "payment_preimage": <byte>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/channels/transactions/route'
>>> data = { 
        'route': <Route>, 
        'payment_hash': base64.b64encode(<byte>).decode(), 
        'payment_hash_string': <string>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "payment_error": <string>, 
    "payment_route": <Route>, 
    "payment_hash": <byte>, 
    "payment_preimage": <byte>, 
}
> var request = require('request');
> var requestBody = { 
    route: <Route>,
    payment_hash: <byte>,
    payment_hash_string: <string>,
  };
> var options = {
    url: 'http://localhost:8080/v1/channels/transactions/route',
    json: true,
    form: JSON.stringify(requestBody)
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "payment_error": <string>, 
    "payment_route": <Route>, 
    "payment_hash": <byte>, 
    "payment_preimage": <byte>, 
}

POST /v1/channels/transactions/route

SendToRouteSync is a synchronous version of SendToRoute. It Will block until the payment either fails or succeeds.

Field Type Placement Description
route Route body Route that should be used to attempt to complete the payment.
payment_hash byte body The payment hash to use for the HTLC.
payment_hash_string string body An optional hex-encoded payment hash to be used for the HTLC.

Response

Field Type Description
payment_error string
payment_route Route
payment_hash byte
payment_preimage byte

/v1/peers

$ curl -X DELETE http://localhost:8080/v1/peers/{pub_key}
{ 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/peers/{pub_key}'
>>> r = requests.delete(url, verify=cert_path)
>>> print(r.json())
{ 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/peers/{pub_key}',
    json: true
  };
> request.delete(options, function(error, response, body) {
    console.log(body);
  });
{ 
}

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 the target peer, then this action will be not be allowed.

Field Type Placement Description
pub_key string path None

Response

This response has no parameters.

$ curl -X GET http://localhost:8080/v1/peers
{ 
    "peers": <array Peer>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/peers'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "peers": <array Peer>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/peers',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "peers": <array Peer>, 
}

GET /v1/peers

lncli: listpeers ListPeers returns a verbose listing of all currently active peers.

This request has no parameters.

Response

Field Type Description
peers array Peer The list of currently connected peers
$ curl -X POST http://localhost:8080/v1/peers -d '{ \
    "perm":<boolean>, \
    "addr":<LightningAddress>, \
}'
{ 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/peers'
>>> data = { 
        'perm': <boolean>, 
        'addr': <LightningAddress>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
}
> var request = require('request');
> var requestBody = { 
    perm: <boolean>,
    addr: <LightningAddress>,
  };
> var options = {
    url: 'http://localhost:8080/v1/peers',
    json: true,
    form: JSON.stringify(requestBody)
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
}

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 from establishing a channel with a peer.

Field Type Placement Description
perm boolean body If set, the daemon will attempt to persistently connect to the target peer. Otherwise, the call will be synchronous.
addr LightningAddress body Lightning address of the peer, in the format <pubkey>@host

Response

This response has no parameters.

/v1/chanpolicy

$ curl -X POST http://localhost:8080/v1/chanpolicy -d '{ \
    "chan_point":<ChannelPoint>, \
    "time_lock_delta":<int64>, \
    "base_fee_msat":<string>, \
    "fee_rate":<double>, \
    "global":<boolean>, \
}'
{ 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/chanpolicy'
>>> data = { 
        'chan_point': <ChannelPoint>, 
        'time_lock_delta': <int64>, 
        'base_fee_msat': <string>, 
        'fee_rate': <double>, 
        'global': <boolean>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
}
> var request = require('request');
> var requestBody = { 
    chan_point: <ChannelPoint>,
    time_lock_delta: <int64>,
    base_fee_msat: <string>,
    fee_rate: <double>,
    global: <boolean>,
  };
> var options = {
    url: 'http://localhost:8080/v1/chanpolicy',
    json: true,
    form: JSON.stringify(requestBody)
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
}

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.

Field Type Placement Description
chan_point ChannelPoint body If set, this update will target a specific channel.
time_lock_delta int64 body The required timelock delta for HTLCs forwarded over the channel.
base_fee_msat string body The base fee charged regardless of the number of milli-satoshis sent.
fee_rate double body The effective fee rate in milli-satoshis. The precision of this value goes up to 6 decimal places, so 1e-6.
global boolean body If set, then this update applies to all currently active channels.

Response

This response has no parameters.

/v1/graph/routes

$ curl -X GET http://localhost:8080/v1/graph/routes/{pub_key}/{amt}
{ 
    "routes": <array Route>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/graph/routes/{pub_key}/{amt}'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "routes": <array Route>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/graph/routes/{pub_key}/{amt}',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "routes": <array Route>, 
}

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 returned route contains the full details required to craft and send an HTLC, also including the necessary information that should be present within the Sphinx packet encapsulated within the HTLC.

Field Type Placement Description
pub_key string path None
amt string path None
final_cltv_delta int32 query An optional CLTV delta from the current height that should be used for the timelock of the final hop.
fee_limit.fixed string query The fee limit expressed as a fixed amount of satoshis.
fee_limit.percent string query The fee limit expressed as a percentage of the payment amount.
ignored_nodes array query A list of nodes to ignore during path finding.
source_pub_key string query The source node where the request route should originated from. If empty, self is assumed.
use_mission_control boolean query If set to true, edge probabilities from mission control will be used to get the optimal route.

Response

Field Type Description
routes array Route

/v1/transactions/fee

$ curl -X GET http://localhost:8080/v1/transactions/fee
{ 
    "feerate_sat_per_byte": <string>, 
    "fee_sat": <string>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/transactions/fee'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "feerate_sat_per_byte": <string>, 
    "fee_sat": <string>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/transactions/fee',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "feerate_sat_per_byte": <string>, 
    "fee_sat": <string>, 
}

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.

Field Type Placement Description
target_conf int32 query The target number of blocks that this transaction should be confirmed by.

Response

Field Type Description
feerate_sat_per_byte string The fee rate in satoshi/byte.
fee_sat string The total fee in satoshis.

/v1/balance/channels

$ curl -X GET http://localhost:8080/v1/balance/channels
{ 
    "balance": <string>, 
    "pending_open_balance": <string>, 
}
>>> import base64, json, requests
>>> url = 'http://localhost:8080/v1/balance/channels'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "balance": <string>, 
    "pending_open_balance": <string>, 
}
> var request = require('request');
> var options = {
    url: 'http://localhost:8080/v1/balance/channels',
    json: true
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "balance": <string>, 
    "pending_open_balance": <string>, 
}

GET /v1/balance/channels

lncli: channelbalance ChannelBalance returns the total funds available across all open channels in satoshis.

This request has no parameters.

Response

Field Type Description
balance string Sum of channels balances denominated in satoshis
pending_open_balance string Sum of channels pending balances denominated in satoshis

Properties

OpenStatusUpdate

Field Type Description
chan_pending PendingUpdate
chan_open ChannelOpenUpdate

ChannelPoint

Field Type Description
output_index int64 The index of the output of the funding transaction
funding_txid_str string Hex-encoded string representing the funding transaction
funding_txid_bytes byte Txid of the funding transaction

Route

Field Type Description
total_time_lock int64 The cumulative (final) time lock across the entire route. This is the CLTV value that should be extended to the first hop in the route. All other hops will decrement the time-lock as advertised, leaving enough time for all hops to wait for or present the payment preimage to complete the payment.
hops array Hop Contains details concerning the specific forwarding details at each hop.
total_fees_msat string The total fees in millisatoshis.
total_amt_msat string The total amount in millisatoshis.
total_fees string The sum of the fees paid at each hop within the final route. In the case of a one-hop payment, this value will be zero as we don't need to pay a fee to ourselves.
total_amt string The total amount of funds required to complete a payment over this route. This value includes the cumulative fees at each hop. As a result, the HTLC extended to the first-hop in the route will need to have at least this many satoshis, otherwise the route will fail at an intermediate node due to an insufficient amount of fees.

ChannelOpenUpdate

Field Type Description
channel_point ChannelPoint

ListInvoiceResponse

Field Type Description
last_index_offset string The index of the last item in the set of returned invoices. This can be used to seek further, pagination style.
first_index_offset string The index of the last item in the set of returned invoices. This can be used to seek backwards, pagination style.
invoices array Invoice A list of invoices from the time slice of the time series specified in the request.

VerifyChanBackupResponse

This property has no parameters.

VerifyMessageResponse

Field Type Description
valid boolean Whether the signature was valid over the given message
pubkey string The pubkey recovered from the signature

OutPoint

Field Type Description
txid_str string Reversed, hex-encoded string representing the transaction id.
output_index int64 The index of the output on the transaction.
txid_bytes byte Raw bytes representing the transaction id.

ClosedChannelUpdate

Field Type Description
chan_point ChannelPoint
chan_id string The unique channel ID for the channel. The first 3 bytes are the block height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel.
capacity string
closed_height int64

HopHint

Field Type Description
node_id string The public key of the node at the start of the channel.
fee_proportional_millionths int64 The fee rate of the channel for sending one satoshi across it denominated in millionths of a satoshi.
chan_id string The unique identifier of the channel.
cltv_expiry_delta int64 The time-lock delta of the channel.
fee_base_msat int64 The base fee of the channel denominated in millisatoshis.

UnlockWalletRequest

Field Type Description
wallet_password byte wallet_password should be the current valid passphrase for the daemon. This will be required to decrypt on-disk material that the daemon requires to function properly.
channel_backups ChanBackupSnapshot channel_backups is an optional argument that allows clients to recover the settled funds within a set of channels. This should be populated if the user was unable to close out all channels and sweep funds before partial or total data loss occurred. If specified, then after on-chain recovery of funds, lnd begin to carry out the data loss recovery protocol in order to recover the funds in each channel from a remote force closed transaction.
recovery_window int32 recovery_window is an optional argument specifying the address lookahead when restoring a wallet seed. The recovery window applies to each individual branch of the BIP44 derivation paths. Supplying a recovery window of zero indicates that no addresses should be recovered, such after the first initialization of the wallet.

PendingChannelsResponseForceClosedChannel

Field Type Description
maturity_height int64 The height at which funds can be swept into the wallet
blocks_til_maturity int32 Remaining # of blocks until the commitment output can be swept. Negative values indicate how many blocks have passed since becoming mature.
closing_txid string The transaction id of the closing transaction
recovered_balance string The total value of funds successfully recovered from this channel
limbo_balance string The balance in satoshis encumbered in this pending channel
pending_htlcs array PendingHTLC
channel PendingChannelsResponsePendingChannel The pending channel to be force closed

Hop

Field Type Description
chan_capacity string
pub_key string An optional public key of the hop. If the public key is given, the payment can be executed without relying on a copy of the channel graph.
fee string
expiry int64
fee_msat string
amt_to_forward_msat string
chan_id string The unique channel ID for the channel. The first 3 bytes are the block height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel.
amt_to_forward string

FeeLimit

Field Type Description
fixed string The fee limit expressed as a fixed amount of satoshis.
percent string The fee limit expressed as a percentage of the payment amount.

PendingChannelsResponseClosedChannel

Field Type Description
closing_txid string The transaction id of the closing transaction
channel PendingChannelsResponsePendingChannel The pending channel to be closed

Peer

Field Type Description
bytes_recv string Bytes of data transmitted from this peer
sat_sent string Satoshis sent to this peer
bytes_sent string Bytes of data transmitted to this peer
sat_recv string Satoshis received from this peer
sync_type PeerSyncType The type of sync we are currently performing with this peer.
pub_key string The identity pubkey of the peer
inbound boolean A channel is inbound if the counterparty initiated the channel
address string Network address of the peer; eg 127.0.0.1:10011
ping_time string Ping time to this peer

ChangePasswordResponse

This property has no parameters.

SendCoinsRequest

Field Type Description
send_all boolean If set, then the amount field will be ignored, and lnd will attempt to send all the coins under control of the internal wallet to the specified address.
target_conf int32 The target number of blocks that this transaction should be confirmed by.
amount string The amount in satoshis to send
sat_per_byte string A manual fee rate set in sat/byte that should be used when crafting the transaction.
addr string The address to send coins to

ForwardingEvent

Field Type Description
amt_in string The total amount (in satoshis) of the incoming HTLC that created half the circuit.
timestamp string Timestamp is the time (unix epoch offset) that this circuit was completed.
amt_out string The total amount (in satoshis) of the outgoing HTLC that created the second half of the circuit.
fee_msat string The total fee (in milli-satoshis) that this payment circuit carried.
chan_id_out string The outgoing channel ID that carried the preimage that completed the circuit.
chan_id_in string The incoming channel ID that carried the HTLC that created the circuit.
fee string The total fee (in satoshis) that this payment circuit carried.

ForwardingHistoryResponse

Field Type Description
last_offset_index int64 The index of the last time in the set of returned forwarding events. Can be used to seek further, pagination style.
forwarding_events array ForwardingEvent A list of forwarding events from the time slice of the time series specified in the request.

WalletBalanceResponse

Field Type Description
total_balance string The balance of the wallet
unconfirmed_balance string The unconfirmed balance of a wallet(with 0 confirmations)
confirmed_balance string The confirmed balance of a wallet(with >= 1 confirmations)

ListChannelsResponse

Field Type Description
channels array Channel The list of active channels

Channel

Field Type Description
commit_weight string The weight of the commitment transaction
csv_delay int64 The CSV delay expressed in relative blocks. If the channel is force closed, we will need to wait for this many blocks before we can regain our funds.
remote_balance string The counterparty's current balance in this channel
chan_status_flags string A set of flags showing the current state of the channel.
remote_chan_reserve_sat string The minimum satoshis the other node is required to reserve in its balance.
fee_per_kw string The required number of satoshis per kilo-weight that the requester will pay at all times, for both the funding transaction and commitment transaction. This value can later be updated once the channel is open.
local_chan_reserve_sat string The minimum satoshis this node is required to reserve in its balance.
unsettled_balance string The unsettled balance in this channel
channel_point string The outpoint (txid:index) of the funding transaction. With this value, Bob will be able to generate a signature for Alice's version of the commitment transaction.
private boolean Whether this channel is advertised to the network or not.
num_updates string The total number of updates conducted within this channel.
active boolean Whether this channel is active or not
initiator boolean True if we were the ones that created the channel.
total_satoshis_sent string The total number of satoshis we've sent within this channel.
capacity string The total amount of funds held in this channel
remote_pubkey string The identity pubkey of the remote node
local_balance string This node's current balance in this channel
pending_htlcs array HTLC The list of active, uncleared HTLCs currently pending within the channel.
chan_id string The unique channel ID for the channel. The first 3 bytes are the block height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel.
total_satoshis_received string The total number of satoshis we've received within this channel.
commit_fee string The amount calculated to be paid in fees for the current set of commitment transactions. The fee amount is persisted with the channel in order to allow the fee amount to be removed and recalculated with each channel state update, including updates that happen after a system restart.

DeleteAllPaymentsResponse

This property has no parameters.

NetworkInfo

Field Type Description
graph_diameter int64
avg_channel_size double
num_zombie_chans string The number of edges marked as zombies.
num_nodes int64
avg_out_degree double
median_channel_size_sat string
max_out_degree int64
num_channels int64
min_channel_size string
max_channel_size string
total_network_capacity string

MultiChanBackup

Field Type Description
multi_chan_backup byte A single encrypted blob containing all the static channel backups of the channel listed above. This can be stored as a single file or blob, and safely be replaced with any prior/future versions.
chan_points array ChannelPoint Is the set of all channels that are included in this multi-channel backup.

GetInfoResponse

Field Type Description
uris array string The URIs of the current node.
num_peers int64 Number of peers
num_pending_channels int64 Number of pending channels
chains array Chain A list of active chains the node is connected to
identity_pubkey string The identity pubkey of the current node.
testnet boolean Whether the current node is connected to testnet. This field is deprecated and the network field should be used instead
best_header_timestamp string Timestamp of the block best known to the wallet
synced_to_chain boolean Whether the wallet's view is synced to the main chain
block_hash string The node's current view of the hash of the best block
version string The version of the LND software that the node is running.
block_height int64 The node's current view of the height of the best block
num_active_channels int64 Number of active channels
num_inactive_channels int64 Number of inactive channels
color string The color of the current node in hex code format
alias string If applicable, the alias of the current node, e.g. "bob"

ChannelBackup

Field Type Description
chan_point ChannelPoint Identifies the channel that this backup belongs to.
chan_backup byte Is an encrypted single-chan backup. this can be passed to RestoreChannelBackups, or the WalletUnlocker Init and Unlock methods in order to trigger the recovery protocol.

Invoice

Field Type Description
amt_paid_msat string The amount that was accepted for this invoice, in millisatoshis. This will ONLY be set if this invoice has been settled. We provide this field as if the invoice was created with a zero value, then we need to record what amount was ultimately accepted. Additionally, it's possible that the sender paid MORE that was specified in the original invoice. So we'll record that here as well.
settle_date string When this invoice was settled
add_index string The "add" index of this invoice. Each newly created invoice will increment this index making it monotonically increasing. Callers to the SubscribeInvoices call can use this to instantly get notified of all added invoices with an add_index greater than this one.
receipt byte Deprecated. An optional cryptographic receipt of payment which is not implemented.
description_hash byte Hash (SHA-256) of a description of the payment. Used if the description of payment (memo) is too long to naturally fit within the description field of an encoded payment request.
r_preimage byte The hex-encoded preimage (32 byte) which will allow settling an incoming HTLC payable to this preimage
state InvoiceInvoiceState The state the invoice is in.
cltv_expiry string Delta to use for the time-lock of the CLTV extended to the final hop.
route_hints array RouteHint Route hints that can each be individually used to assist in reaching the invoice's destination.
r_hash byte The hash of the preimage
creation_date string When this invoice was created
settle_index string The "settle" index of this invoice. Each newly settled invoice will increment this index making it monotonically increasing. Callers to the SubscribeInvoices call can use this to instantly get notified of all settled invoices with an settle_index greater than this one.
memo string An optional memo to attach along with the invoice. Used for record keeping purposes for the invoice's creator, and will also be set in the description field of the encoded payment request if the description_hash field is not being used.
private boolean Whether this invoice should include routing hints for private channels.
expiry string Payment request expiry time in seconds. Default is 3600 (1 hour).
fallback_addr string Fallback on-chain address.
settled boolean Whether this invoice has been fulfilled
amt_paid string Deprecated, use amt_paid_sat or amt_paid_msat.
payment_request string A bare-bones invoice for a payment within the Lightning Network. With the details of the invoice, the sender has all the data necessary to send a payment to the recipient.
amt_paid_sat string The amount that was accepted for this invoice, in satoshis. This will ONLY be set if this invoice has been settled. We provide this field as if the invoice was created with a zero value, then we need to record what amount was ultimately accepted. Additionally, it's possible that the sender paid MORE that was specified in the original invoice. So we'll record that here as well.
value string The value of this invoice in satoshis

SendRequest

Field Type Description
outgoing_chan_id string The channel id of the channel that must be taken to the first hop. If zero, any channel may be used.
dest byte The identity pubkey of the payment recipient
fee_limit FeeLimit The maximum number of satoshis that will be paid as a fee of the payment. This value can be represented either as a percentage of the amount being sent, or as a fixed amount of the maximum fee the user is willing the pay to send the payment.
payment_hash_string string The hex-encoded hash to use within the payment's HTLC
dest_string string The hex-encoded identity pubkey of the payment recipient
final_cltv_delta int32 The CLTV delta from the current height that should be used to set the timelock for the final hop.
payment_hash byte The hash to use within the payment's HTLC
payment_request string A bare-bones invoice for a payment within the Lightning Network. With the details of the invoice, the sender has all the data necessary to send a payment to the recipient.
cltv_limit int64 An optional maximum total time lock for the route. If zero, there is no maximum enforced.
amt string Number of satoshis to send.

Chain

Field Type Description
chain string The blockchain the node is on (eg bitcoin, litecoin)
network string The network the node is on (eg regtest, testnet, mainnet)

LightningAddress

Field Type Description
host string The network location of the lightning node, e.g. 69.69.69.69:1337 or localhost:10011
pubkey string The identity pubkey of the Lightning node

HTLC

Field Type Description
incoming boolean
hash_lock byte
expiration_height int64
amount string

PolicyUpdateResponse

This property has no parameters.

DebugLevelResponse

Field Type Description
sub_systems string

SignMessageResponse

Field Type Description
signature string The signature for the given message

AddInvoiceResponse

Field Type Description
r_hash byte
payment_request string A bare-bones invoice for a payment within the Lightning Network. With the details of the invoice, the sender has all the data necessary to send a payment to the recipient.
add_index string The "add" index of this invoice. Each newly created invoice will increment this index making it monotonically increasing. Callers to the SubscribeInvoices call can use this to instantly get notified of all added invoices with an add_index greater than this one.

PendingChannelsResponsePendingChannel

Field Type Description
remote_balance string
capacity string
remote_chan_reserve_sat string The minimum satoshis the other node is required to reserve in its balance.
local_balance string
remote_node_pub string
local_chan_reserve_sat string The minimum satoshis this node is required to reserve in its balance.
channel_point string

InitWalletResponse

This property has no parameters.

PendingChannelsResponseWaitingCloseChannel

Field Type Description
limbo_balance string The balance in satoshis encumbered in this channel
channel PendingChannelsResponsePendingChannel The pending channel waiting for closing tx to confirm

AbandonChannelResponse

This property has no parameters.

DisconnectPeerResponse

This property has no parameters.

ForwardingHistoryRequest

Field Type Description
start_time string Start time is the starting point of the forwarding history request. All records beyond this point will be included, respecting the end time, and the index offset.
index_offset int64 Index offset is the offset in the time series to start at. As each response can only contain 50k records, callers can use this to skip around within a packed time series.
end_time string End time is the end point of the forwarding history request. The response will carry at most 50k records between the start time and the end time. The index offset can be used to implement pagination.
num_max_events int64 The max number of events to return in the response to this query.

ChannelCloseSummary

Field Type Description
settled_balance string Settled balance at the time of channel closure
closing_tx_hash string The txid of the transaction which ultimately closed this channel.
close_type ChannelCloseSummaryClosureType Details on how the channel was closed.
capacity string Total capacity of the channel.
remote_pubkey string Public key of the remote peer that we formerly had a channel with.
close_height int64 Height at which the funding transaction was spent.
channel_point string The outpoint (txid:index) of the funding transaction.
chan_id string The unique channel ID for the channel.
chain_hash string The hash of the genesis block that this channel resides within.
time_locked_balance string The sum of all the time-locked outputs at the time of channel closure

SignMessageRequest

Field Type Description
msg byte The message to be signed

InitWalletRequest

Field Type Description
wallet_password byte wallet_password is the passphrase that should be used to encrypt the wallet. This MUST be at least 8 chars in length. After creation, this password is required to unlock the daemon.
aezeed_passphrase byte aezeed_passphrase is an optional user provided passphrase that will be used to encrypt the generated aezeed cipher seed.
channel_backups ChanBackupSnapshot channel_backups is an optional argument that allows clients to recover the settled funds within a set of channels. This should be populated if the user was unable to close out all channels and sweep funds before partial or total data loss occurred. If specified, then after on-chain recovery of funds, lnd begin to carry out the data loss recovery protocol in order to recover the funds in each channel from a remote force closed transaction.
cipher_seed_mnemonic array string cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed cipher seed obtained by the user. This may have been generated by the GenSeed method, or be an existing seed.
recovery_window int32 recovery_window is an optional argument specifying the address lookahead when restoring a wallet seed. The recovery window applies to each individual branch of the BIP44 derivation paths. Supplying a recovery window of zero indicates that no addresses should be recovered, such after the first initialization of the wallet.

NodeUpdate

Field Type Description
identity_key string
addresses array string
global_features byte
color string
alias string

RestoreChanBackupRequest

Field Type Description
chan_backups ChannelBackups
multi_chan_backup byte

ClosedChannelsResponse

Field Type Description
channels array ChannelCloseSummary

SendManyResponse

Field Type Description
txid string The id of the transaction

ChannelGraph

Field Type Description
nodes array LightningNode The list of LightningNodes in this channel graph
edges array ChannelEdge The list of ChannelEdges in this channel graph

Payment

Field Type Description
fee string Deprecated, use fee_sat or fee_msat.
fee_msat string The fee paid for this payment in milli-satoshis
payment_preimage string The payment preimage
fee_sat string The fee paid for this payment in satoshis
path array string The path this payment took
value_sat string The value of the payment in satoshis
creation_date string The date of this payment
status PaymentPaymentStatus The status of the payment.
payment_request string The optional payment request being fulfilled.
value_msat string The value of the payment in milli-satoshis
payment_hash string The payment hash
value string Deprecated, use value_sat or value_msat.

CloseStatusUpdate

Field Type Description
chan_close ChannelCloseUpdate
close_pending PendingUpdate

SendToRouteRequest

Field Type Description
route Route Route that should be used to attempt to complete the payment.
payment_hash byte The payment hash to use for the HTLC.
payment_hash_string string An optional hex-encoded payment hash to be used for the HTLC.

ChannelFeeReport

Field Type Description
chan_point string The channel that this fee report belongs to.
base_fee_msat string The base fee charged regardless of the number of milli-satoshis sent.
fee_rate double The effective fee rate in milli-satoshis. Computed by dividing the fee_per_mil value by 1 million.
fee_per_mil string The amount charged per milli-satoshis transferred expressed in millionths of a satoshi.

SendResponse

Field Type Description
payment_error string
payment_route Route
payment_hash byte
payment_preimage byte

PendingChannelsResponsePendingOpenChannel

Field Type Description
fee_per_kw string The required number of satoshis per kilo-weight that the requester will pay at all times, for both the funding transaction and commitment transaction. This value can later be updated once the channel is open.
confirmation_height int64 The height at which this channel will be confirmed
commit_fee string The amount calculated to be paid in fees for the current set of commitment transactions. The fee amount is persisted with the channel in order to allow the fee amount to be removed and recalculated with each channel state update, including updates that happen after a system restart.
commit_weight string The weight of the commitment transaction
channel PendingChannelsResponsePendingChannel The pending channel

ListUnspentResponse

Field Type Description
utxos array Utxo A list of utxos

ChannelCloseUpdate

Field Type Description
success boolean
closing_txid byte

Utxo

Field Type Description
type AddressType The type of address
confirmations string The number of confirmations for the Utxo
amount_sat string The value of the unspent coin in satoshis
pk_script string The pkscript in hex
address string The address
outpoint OutPoint The outpoint in format txid:n

PendingHTLC

Field Type Description
incoming boolean The direction within the channel that the htlc was sent
maturity_height int64 The next block height at which we can spend the current stage
blocks_til_maturity int32 The number of blocks remaining until the current stage can be swept. Negative values indicate how many blocks have passed since becoming mature.
stage int64 Indicates whether the htlc is in its first or second stage of recovery
amount string The total value of the htlc
outpoint string The final output to be swept back to the user's wallet

PayReq

Field Type Description
num_satoshis string
fallback_addr string
timestamp string
expiry string
cltv_expiry string
description_hash string
payment_hash string
destination string
route_hints array RouteHint
description string

EstimateFeeResponse

Field Type Description
feerate_sat_per_byte string The fee rate in satoshi/byte.
fee_sat string The total fee in satoshis.

ChannelBackups

Field Type Description
chan_backups array ChannelBackup A set of single-chan static channel backups.

ChannelEdgeUpdate

Field Type Description
connecting_node string
capacity string
advertising_node string
chan_point ChannelPoint
chan_id string The unique channel ID for the channel. The first 3 bytes are the block height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel.
routing_policy RoutingPolicy

ListPaymentsResponse

Field Type Description
payments array Payment The list of payments

OpenChannelRequest

Field Type Description
spend_unconfirmed boolean Whether unconfirmed outputs should be used as inputs for the funding transaction.
push_sat string The number of satoshis to push to the remote side as part of the initial commitment state
remote_csv_delay int64 The delay we require on the remote's commitment transaction. If this is not set, it will be scaled automatically with the channel size.
private boolean Whether this channel should be private, not announced to the greater network.
node_pubkey byte The pubkey of the node to open a channel with
min_confs int32 The minimum number of confirmations each one of your outputs used for the funding transaction must satisfy.
node_pubkey_string string The hex encoded pubkey of the node to open a channel with
local_funding_amount string The number of satoshis the wallet should commit to the channel
sat_per_byte string A manual fee rate set in sat/byte that should be used when crafting the funding transaction.
min_htlc_msat string The minimum value in millisatoshi we will require for incoming HTLCs on the channel.
target_conf int32 The target number of blocks that the funding transaction should be confirmed by.

ChannelEventUpdate

Field Type Description
type ChannelEventUpdateUpdateType
open_channel Channel
closed_channel ChannelCloseSummary
inactive_channel ChannelPoint
active_channel ChannelPoint

ChangePasswordRequest

Field Type Description
new_password byte new_password should be the new passphrase that will be needed to unlock the daemon.
current_password byte current_password should be the current valid passphrase used to unlock the daemon.

ConnectPeerResponse

This property has no parameters.

ListPeersResponse

Field Type Description
peers array Peer The list of currently connected peers

LightningNode

Field Type Description
last_update int64
addresses array NodeAddress
pub_key string
color string
alias string

NewAddressResponse

Field Type Description
address string The newly generated wallet address

ChannelBalanceResponse

Field Type Description
balance string Sum of channels balances denominated in satoshis
pending_open_balance string Sum of channels pending balances denominated in satoshis

ChanBackupSnapshot

Field Type Description
multi_chan_backup MultiChanBackup A multi-channel backup that covers all open channels currently known to lnd.
single_chan_backups ChannelBackups The set of new channels that have been added since the last channel backup snapshot was requested.

TransactionDetails

Field Type Description
transactions array Transaction The list of transactions relevant to the wallet.

PendingChannelsResponse

Field Type Description
pending_closing_channels array PendingChannelsResponseClosedChannel Channels pending closing
total_limbo_balance string The balance in satoshis encumbered in pending channels
pending_open_channels array PendingChannelsResponsePendingOpenChannel Channels pending opening
waiting_close_channels array PendingChannelsResponseWaitingCloseChannel Channels waiting for closing tx to confirm
pending_force_closing_channels array PendingChannelsResponseForceClosedChannel Channels pending force closing

ChannelEdge

Field Type Description
last_update int64
node1_pub string
channel_id string The unique channel ID for the channel. The first 3 bytes are the block height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel.
node2_pub string
capacity string
node2_policy RoutingPolicy
chan_point string
node1_policy RoutingPolicy

ConnectPeerRequest

Field Type Description
perm boolean If set, the daemon will attempt to persistently connect to the target peer. Otherwise, the call will be synchronous.
addr LightningAddress Lightning address of the peer, in the format <pubkey>@host

RestoreBackupResponse

This property has no parameters.

UnlockWalletResponse

This property has no parameters.

RouteHint

Field Type Description
hop_hints array HopHint A list of hop hints that when chained together can assist in reaching a specific destination.

StopResponse

This property has no parameters.

PendingUpdate

Field Type Description
txid byte
output_index int64

SendCoinsResponse

Field Type Description
txid string The transaction ID of the transaction

Transaction

Field Type Description
time_stamp string Timestamp of this transaction
num_confirmations int32 The number of confirmations
block_hash string The hash of the block this transaction was included in
block_height int32 The height of the block this transaction was included in
total_fees string Fees paid for this transaction
tx_hash string The transaction hash
dest_addresses array string Addresses that received funds for this transaction
raw_tx_hex string The raw transaction hex.
amount string The transaction amount, denominated in satoshis

GraphTopologyUpdate

Field Type Description
channel_updates array ChannelEdgeUpdate
closed_chans array ClosedChannelUpdate
node_updates array NodeUpdate

NodeInfo

Field Type Description
total_capacity string The sum of all channels capacity for the node, denominated in satoshis.
channels array ChannelEdge A list of all public channels for the node.
num_channels int64 The total number of channels for the node.
node LightningNode An individual vertex/node within the channel graph. A node is connected to other nodes by one or more channel edges emanating from it. As the graph is directed, a node will also have an incoming edge attached to it for each outgoing edge.

VerifyMessageRequest

Field Type Description
msg byte The message over which the signature is to be verified
signature string The signature to be verified over the given message

QueryRoutesResponse

Field Type Description
routes array Route

PolicyUpdateRequest

Field Type Description
chan_point ChannelPoint If set, this update will target a specific channel.
time_lock_delta int64 The required timelock delta for HTLCs forwarded over the channel.
base_fee_msat string The base fee charged regardless of the number of milli-satoshis sent.
fee_rate double The effective fee rate in milli-satoshis. The precision of this value goes up to 6 decimal places, so 1e-6.
global boolean If set, then this update applies to all currently active channels.

GenSeedResponse

Field Type Description
cipher_seed_mnemonic array string cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed cipher seed obtained by the user. This field is optional, as if not provided, then the daemon will generate a new cipher seed for the user. Otherwise, then the daemon will attempt to recover the wallet state linked to this cipher seed.
enciphered_seed byte enciphered_seed are the raw aezeed cipher seed bytes. This is the raw cipher text before run through our mnemonic encoding scheme.

FeeReportResponse

Field Type Description
day_fee_sum string The total amount of fee revenue (in satoshis) the switch has collected over the past 24 hrs.
week_fee_sum string The total amount of fee revenue (in satoshis) the switch has collected over the past 1 week.
month_fee_sum string The total amount of fee revenue (in satoshis) the switch has collected over the past 1 month.
channel_fees array ChannelFeeReport An array of channel fee reports which describes the current fee schedule for each channel.

NodeAddress

Field Type Description
addr string
network string

RoutingPolicy

Field Type Description
last_update int64
fee_base_msat string
time_lock_delta int64
disabled boolean
min_htlc string
fee_rate_milli_msat string
max_htlc_msat string

Enums

PeerSyncType

Name Value
UNKNOWN_SYNC 0
ACTIVE_SYNC 1
PASSIVE_SYNC 2

PaymentPaymentStatus

Name Value
UNKNOWN 0
IN_FLIGHT 1
SUCCEEDED 2
FAILED 3

ChannelEventUpdateUpdateType

Name Value
OPEN_CHANNEL 0
CLOSED_CHANNEL 1
ACTIVE_CHANNEL 2
INACTIVE_CHANNEL 3

AddressType

Name Value
WITNESS_PUBKEY_HASH 0
NESTED_PUBKEY_HASH 1
UNUSED_WITNESS_PUBKEY_HASH 2
UNUSED_NESTED_PUBKEY_HASH 3

InvoiceInvoiceState

Name Value
OPEN 0
SETTLED 1
CANCELED 2
ACCEPTED 3

ChannelCloseSummaryClosureType

Name Value
COOPERATIVE_CLOSE 0
LOCAL_FORCE_CLOSE 1
REMOTE_FORCE_CLOSE 2
BREACH_CLOSE 3
FUNDING_CANCELED 4
ABANDONED 5