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/balance/channels

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/balance/channels 
{ 
    "pending_open_balance": <string>, 
    "balance": <string>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/balance/channels'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "pending_open_balance": <string>, 
    "balance": <string>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/balance/channels',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "pending_open_balance": <string>, 
    "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
pending_open_balance string Sum of channels pending balances denominated in satoshis
balance string Sum of channels balances denominated in satoshis

/v1/channels/closed

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/channels/closed 
{ 
    "channels": <array ChannelCloseSummary>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/channels/closed'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "channels": <array ChannelCloseSummary>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/channels/closed',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> 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/graph/info

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/graph/info 
{ 
    "max_channel_size": <string>, 
    "num_nodes": <int64>, 
    "graph_diameter": <int64>, 
    "total_network_capacity": <string>, 
    "median_channel_size_sat": <string>, 
    "max_out_degree": <int64>, 
    "min_channel_size": <string>, 
    "num_channels": <int64>, 
    "avg_out_degree": <double>, 
    "num_zombie_chans": <string>, 
    "avg_channel_size": <double>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/graph/info'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "max_channel_size": <string>, 
    "num_nodes": <int64>, 
    "graph_diameter": <int64>, 
    "total_network_capacity": <string>, 
    "median_channel_size_sat": <string>, 
    "max_out_degree": <int64>, 
    "min_channel_size": <string>, 
    "num_channels": <int64>, 
    "avg_out_degree": <double>, 
    "num_zombie_chans": <string>, 
    "avg_channel_size": <double>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/graph/info',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "max_channel_size": <string>, 
    "num_nodes": <int64>, 
    "graph_diameter": <int64>, 
    "total_network_capacity": <string>, 
    "median_channel_size_sat": <string>, 
    "max_out_degree": <int64>, 
    "min_channel_size": <string>, 
    "num_channels": <int64>, 
    "avg_out_degree": <double>, 
    "num_zombie_chans": <string>, 
    "avg_channel_size": <double>, 
}

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
max_channel_size string
num_nodes int64
graph_diameter int64
total_network_capacity string
median_channel_size_sat string
max_out_degree int64
min_channel_size string
num_channels int64
avg_out_degree double
num_zombie_chans string The number of edges marked as zombies.
avg_channel_size double

/v1/channels

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X POST --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/channels  \
    -d '{ "min_confs":<int32>,"sat_per_byte":<string>,"target_conf":<int32>,"min_htlc_msat":<string>,"local_funding_amount":<string>,"node_pubkey_string":<string>,"remote_csv_delay":<int64>,"node_pubkey":<byte>,"spend_unconfirmed":<boolean>,"push_sat":<string>,"private":<boolean>, }' 
{ 
    "output_index": <int64>, 
    "funding_txid_bytes": <byte>, 
    "funding_txid_str": <string>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/channels'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'min_confs': <int32>, 
        'sat_per_byte': <string>, 
        'target_conf': <int32>, 
        'min_htlc_msat': <string>, 
        'local_funding_amount': <string>, 
        'node_pubkey_string': <string>, 
        'remote_csv_delay': <int64>, 
        'node_pubkey': base64.b64encode(<byte>).decode(), 
        'spend_unconfirmed': <boolean>, 
        'push_sat': <string>, 
        'private': <boolean>, 
    }
>>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "output_index": <int64>, 
    "funding_txid_bytes": <byte>, 
    "funding_txid_str": <string>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var requestBody = { 
    min_confs: <int32>,
    sat_per_byte: <string>,
    target_conf: <int32>,
    min_htlc_msat: <string>,
    local_funding_amount: <string>,
    node_pubkey_string: <string>,
    remote_csv_delay: <int64>,
    node_pubkey: <byte>,
    spend_unconfirmed: <boolean>,
    push_sat: <string>,
    private: <boolean>,
  };
> var options = {
    url: 'https://localhost:8080/v1/channels',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
    form: JSON.stringify(requestBody),
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "output_index": <int64>, 
    "funding_txid_bytes": <byte>, 
    "funding_txid_str": <string>, 
}

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
min_confs int32 body The minimum number of confirmations each one of your outputs used for the funding transaction must satisfy.
sat_per_byte string body A manual fee rate set in sat/byte that should be used when crafting the funding transaction.
target_conf int32 body The target number of blocks that the funding transaction should be confirmed by.
min_htlc_msat string body The minimum value in millisatoshi we will require for incoming HTLCs on the channel.
local_funding_amount string body The number of satoshis the wallet should commit to the channel
node_pubkey_string string body The hex encoded pubkey of the node to open a channel with
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.
node_pubkey byte body The pubkey of the node to open a channel with
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
private boolean body Whether this channel should be private, not announced to the greater network.

Response

Field Type Description
output_index int64 The index of the output of the funding transaction
funding_txid_bytes byte Txid of the funding transaction
funding_txid_str string Hex-encoded string representing the funding transaction
$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/channels 
{ 
    "channels": <array Channel>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/channels'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "channels": <array Channel>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/channels',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> 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
$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X DELETE --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/channels/{channel_point.funding_txid_str}/{channel_point.output_index} 
{ 
    "chan_close": <ChannelCloseUpdate>, 
    "close_pending": <PendingUpdate>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/channels/{channel_point.funding_txid_str}/{channel_point.output_index}'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.delete(url, headers=headers, 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 fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/channels/{channel_point.funding_txid_str}/{channel_point.output_index}',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> 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

/v1/invoice

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/invoice/{r_hash_str} 
{ 
    "cltv_expiry": <string>, 
    "add_index": <string>, 
    "creation_date": <string>, 
    "state": <InvoiceInvoiceState>, 
    "private": <boolean>, 
    "value": <string>, 
    "htlcs": <array InvoiceHTLC>, 
    "expiry": <string>, 
    "fallback_addr": <string>, 
    "r_hash": <byte>, 
    "memo": <string>, 
    "receipt": <byte>, 
    "amt_paid_msat": <string>, 
    "payment_request": <string>, 
    "description_hash": <byte>, 
    "settle_index": <string>, 
    "amt_paid": <string>, 
    "settle_date": <string>, 
    "route_hints": <array RouteHint>, 
    "settled": <boolean>, 
    "r_preimage": <byte>, 
    "amt_paid_sat": <string>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/invoice/{r_hash_str}'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "cltv_expiry": <string>, 
    "add_index": <string>, 
    "creation_date": <string>, 
    "state": <InvoiceInvoiceState>, 
    "private": <boolean>, 
    "value": <string>, 
    "htlcs": <array InvoiceHTLC>, 
    "expiry": <string>, 
    "fallback_addr": <string>, 
    "r_hash": <byte>, 
    "memo": <string>, 
    "receipt": <byte>, 
    "amt_paid_msat": <string>, 
    "payment_request": <string>, 
    "description_hash": <byte>, 
    "settle_index": <string>, 
    "amt_paid": <string>, 
    "settle_date": <string>, 
    "route_hints": <array RouteHint>, 
    "settled": <boolean>, 
    "r_preimage": <byte>, 
    "amt_paid_sat": <string>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/invoice/{r_hash_str}',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "cltv_expiry": <string>, 
    "add_index": <string>, 
    "creation_date": <string>, 
    "state": <InvoiceInvoiceState>, 
    "private": <boolean>, 
    "value": <string>, 
    "htlcs": <array InvoiceHTLC>, 
    "expiry": <string>, 
    "fallback_addr": <string>, 
    "r_hash": <byte>, 
    "memo": <string>, 
    "receipt": <byte>, 
    "amt_paid_msat": <string>, 
    "payment_request": <string>, 
    "description_hash": <byte>, 
    "settle_index": <string>, 
    "amt_paid": <string>, 
    "settle_date": <string>, 
    "route_hints": <array RouteHint>, 
    "settled": <boolean>, 
    "r_preimage": <byte>, 
    "amt_paid_sat": <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
cltv_expiry string Delta to use for the time-lock of the CLTV extended to the final hop.
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.
creation_date string When this invoice was created
state InvoiceInvoiceState The state the invoice is in.
private boolean Whether this invoice should include routing hints for private channels.
value string The value of this invoice in satoshis
htlcs array InvoiceHTLC List of HTLCs paying to this invoice [EXPERIMENTAL].
expiry string Payment request expiry time in seconds. Default is 3600 (1 hour).
fallback_addr string Fallback on-chain address.
r_hash byte The hash of the preimage
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.
receipt byte Deprecated. An optional cryptographic receipt of payment which is not implemented.
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.
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.
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.
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.
amt_paid string Deprecated, use amt_paid_sat or amt_paid_msat.
settle_date string When this invoice was settled
route_hints array RouteHint Route hints that can each be individually used to assist in reaching the invoice's destination.
settled boolean Whether this invoice has been fulfilled
r_preimage byte The hex-encoded preimage (32 byte) which will allow settling an incoming HTLC payable to this preimage
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.

/v1/verifymessage

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X POST --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/verifymessage  \
    -d '{ "signature":<string>,"msg":<byte>, }' 
{ 
    "pubkey": <string>, 
    "valid": <boolean>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/verifymessage'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'signature': <string>, 
        'msg': base64.b64encode(<byte>).decode(), 
    }
>>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "pubkey": <string>, 
    "valid": <boolean>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var requestBody = { 
    signature: <string>,
    msg: <byte>,
  };
> var options = {
    url: 'https://localhost:8080/v1/verifymessage',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
    form: JSON.stringify(requestBody),
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "pubkey": <string>, 
    "valid": <boolean>, 
}

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
signature string body The signature to be verified over the given message
msg byte body The message over which the signature is to be verified

Response

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

/v1/initwallet


$ curl -X POST --cacert $LND_DIR/tls.cert https://localhost:8080/v1/initwallet  \
    -d '{ "recovery_window":<int32>,"cipher_seed_mnemonic":<array string>,"aezeed_passphrase":<byte>,"wallet_password":<byte>,"channel_backups":<ChanBackupSnapshot>, }' 
{ 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/initwallet'
>>> cert_path = 'LND_DIR/tls.cert'
>>> data = { 
        'recovery_window': <int32>, 
        'cipher_seed_mnemonic': <array string>, 
        'aezeed_passphrase': base64.b64encode(<byte>).decode(), 
        'wallet_password': base64.b64encode(<byte>).decode(), 
        'channel_backups': <ChanBackupSnapshot>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
}
> var fs = require('fs');
> var request = require('request');
> var requestBody = { 
    recovery_window: <int32>,
    cipher_seed_mnemonic: <array string>,
    aezeed_passphrase: <byte>,
    wallet_password: <byte>,
    channel_backups: <ChanBackupSnapshot>,
  };
> var options = {
    url: 'https://localhost:8080/v1/initwallet',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    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
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.
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.
aezeed_passphrase byte body aezeed_passphrase is an optional user provided passphrase that will be used to encrypt the generated aezeed cipher seed.
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.
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.

Response

This response has no parameters.

/v1/fees

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/fees 
{ 
    "month_fee_sum": <string>, 
    "week_fee_sum": <string>, 
    "day_fee_sum": <string>, 
    "channel_fees": <array ChannelFeeReport>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/fees'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "month_fee_sum": <string>, 
    "week_fee_sum": <string>, 
    "day_fee_sum": <string>, 
    "channel_fees": <array ChannelFeeReport>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/fees',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "month_fee_sum": <string>, 
    "week_fee_sum": <string>, 
    "day_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
month_fee_sum string The total amount of fee revenue (in satoshis) the switch has collected over the past 1 month.
week_fee_sum string The total amount of fee revenue (in satoshis) the switch has collected over the past 1 week.
day_fee_sum string The total amount of fee revenue (in satoshis) the switch has collected over the past 24 hrs.
channel_fees array ChannelFeeReport An array of channel fee reports which describes the current fee schedule for each channel.

/v1/peers

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X DELETE --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/peers/{pub_key} 
{ 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/peers/{pub_key}'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.delete(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/peers/{pub_key}',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> 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.

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X POST --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/peers  \
    -d '{ "perm":<boolean>,"addr":<LightningAddress>, }' 
{ 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/peers'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'perm': <boolean>, 
        'addr': <LightningAddress>, 
    }
>>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var requestBody = { 
    perm: <boolean>,
    addr: <LightningAddress>,
  };
> var options = {
    url: 'https://localhost:8080/v1/peers',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
    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.

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/peers 
{ 
    "peers": <array Peer>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/peers'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "peers": <array Peer>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/peers',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> 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

/v1/graph/routes

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/graph/routes/{pub_key}/{amt} 
{ 
    "routes": <array Route>, 
    "success_prob": <double>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/graph/routes/{pub_key}/{amt}'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "routes": <array Route>, 
    "success_prob": <double>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/graph/routes/{pub_key}/{amt}',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "routes": <array Route>, 
    "success_prob": <double>, 
}

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.
cltv_limit int64 query An optional maximum total time lock for the route. If the source is empty or ourselves, this should not exceed lnd's --max-cltv-expiry setting. If zero, then the value of --max-cltv-expiry is used as the limit.

Response

Field Type Description
routes array Route The route that results from the path finding operation. This is still a repeated field to retain backwards compatibility.
success_prob double The success probability of the returned route based on the current mission control state. [EXPERIMENTAL]

/v1/signmessage

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X POST --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/signmessage  \
    -d '{ "msg":<byte>, }' 
{ 
    "signature": <string>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/signmessage'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'msg': base64.b64encode(<byte>).decode(), 
    }
>>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "signature": <string>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var requestBody = { 
    msg: <byte>,
  };
> var options = {
    url: 'https://localhost:8080/v1/signmessage',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
    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/channels/backup/verify

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X POST --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/channels/backup/verify  \
    -d '{ "single_chan_backups":<ChannelBackups>,"multi_chan_backup":<MultiChanBackup>, }' 
{ 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/channels/backup/verify'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'single_chan_backups': <ChannelBackups>, 
        'multi_chan_backup': <MultiChanBackup>, 
    }
>>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var requestBody = { 
    single_chan_backups: <ChannelBackups>,
    multi_chan_backup: <MultiChanBackup>,
  };
> var options = {
    url: 'https://localhost:8080/v1/channels/backup/verify',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
    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
single_chan_backups ChannelBackups body The set of new channels that have been added since the last channel backup snapshot was requested.
multi_chan_backup MultiChanBackup body A multi-channel backup that covers all open channels currently known to lnd.

Response

This response has no parameters.

/v1/channels/transactions

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X POST --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/channels/transactions  \
    -d '{ "dest_tlv":<object>,"payment_hash_string":<string>,"amt":<string>,"payment_request":<string>,"cltv_limit":<int64>,"dest_string":<string>,"outgoing_chan_id":<string>,"dest":<byte>,"payment_hash":<byte>,"final_cltv_delta":<int32>,"fee_limit":<FeeLimit>, }' 
{ 
    "payment_preimage": <byte>, 
    "payment_hash": <byte>, 
    "payment_error": <string>, 
    "payment_route": <Route>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/channels/transactions'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'dest_tlv': <object>, 
        'payment_hash_string': <string>, 
        'amt': <string>, 
        'payment_request': <string>, 
        'cltv_limit': <int64>, 
        'dest_string': <string>, 
        'outgoing_chan_id': <string>, 
        'dest': base64.b64encode(<byte>).decode(), 
        'payment_hash': base64.b64encode(<byte>).decode(), 
        'final_cltv_delta': <int32>, 
        'fee_limit': <FeeLimit>, 
    }
>>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "payment_preimage": <byte>, 
    "payment_hash": <byte>, 
    "payment_error": <string>, 
    "payment_route": <Route>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var requestBody = { 
    dest_tlv: <object>,
    payment_hash_string: <string>,
    amt: <string>,
    payment_request: <string>,
    cltv_limit: <int64>,
    dest_string: <string>,
    outgoing_chan_id: <string>,
    dest: <byte>,
    payment_hash: <byte>,
    final_cltv_delta: <int32>,
    fee_limit: <FeeLimit>,
  };
> var options = {
    url: 'https://localhost:8080/v1/channels/transactions',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
    form: JSON.stringify(requestBody),
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "payment_preimage": <byte>, 
    "payment_hash": <byte>, 
    "payment_error": <string>, 
    "payment_route": <Route>, 
}

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
dest_tlv object body An optional field that can be used to pass an arbitrary set of TLV records to a peer which understands the new records. This can be used to pass application specific data during the payment attempt.
payment_hash_string string body The hex-encoded hash to use within the payment's HTLC
amt string body Number of satoshis to send.
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. This should not exceed lnd's --max-cltv-expiry setting. If zero, then the value of --max-cltv-expiry is enforced.
dest_string string body The hex-encoded identity pubkey of the payment recipient
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
payment_hash byte body The hash to use within the payment's HTLC
final_cltv_delta int32 body The CLTV delta from the current height that should be used to set the timelock for the final hop.
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.

Response

Field Type Description
payment_preimage byte
payment_hash byte
payment_error string
payment_route Route

/v1/channels/pending

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/channels/pending 
{ 
    "pending_open_channels": <array PendingChannelsResponsePendingOpenChannel>, 
    "pending_closing_channels": <array PendingChannelsResponseClosedChannel>, 
    "waiting_close_channels": <array PendingChannelsResponseWaitingCloseChannel>, 
    "pending_force_closing_channels": <array PendingChannelsResponseForceClosedChannel>, 
    "total_limbo_balance": <string>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/channels/pending'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "pending_open_channels": <array PendingChannelsResponsePendingOpenChannel>, 
    "pending_closing_channels": <array PendingChannelsResponseClosedChannel>, 
    "waiting_close_channels": <array PendingChannelsResponseWaitingCloseChannel>, 
    "pending_force_closing_channels": <array PendingChannelsResponseForceClosedChannel>, 
    "total_limbo_balance": <string>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/channels/pending',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "pending_open_channels": <array PendingChannelsResponsePendingOpenChannel>, 
    "pending_closing_channels": <array PendingChannelsResponseClosedChannel>, 
    "waiting_close_channels": <array PendingChannelsResponseWaitingCloseChannel>, 
    "pending_force_closing_channels": <array PendingChannelsResponseForceClosedChannel>, 
    "total_limbo_balance": <string>, 
}

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_open_channels array PendingChannelsResponsePendingOpenChannel Channels pending opening
pending_closing_channels array PendingChannelsResponseClosedChannel Channels pending closing
waiting_close_channels array PendingChannelsResponseWaitingCloseChannel Channels waiting for closing tx to confirm
pending_force_closing_channels array PendingChannelsResponseForceClosedChannel Channels pending force closing
total_limbo_balance string The balance in satoshis encumbered in pending channels

/v1/newaddress

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/newaddress 
{ 
    "address": <string>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/newaddress'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "address": <string>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/newaddress',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> 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/restore

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X POST --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/channels/backup/restore  \
    -d '{ "chan_backups":<ChannelBackups>,"multi_chan_backup":<byte>, }' 
{ 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/channels/backup/restore'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'chan_backups': <ChannelBackups>, 
        'multi_chan_backup': base64.b64encode(<byte>).decode(), 
    }
>>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var requestBody = { 
    chan_backups: <ChannelBackups>,
    multi_chan_backup: <byte>,
  };
> var options = {
    url: 'https://localhost:8080/v1/channels/backup/restore',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
    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/invoices

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X POST --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/invoices  \
    -d '{ "cltv_expiry":<string>,"add_index":<string>,"creation_date":<string>,"state":<InvoiceInvoiceState>,"private":<boolean>,"value":<string>,"htlcs":<array InvoiceHTLC>,"expiry":<string>,"fallback_addr":<string>,"r_hash":<byte>,"memo":<string>,"receipt":<byte>,"amt_paid_msat":<string>,"payment_request":<string>,"description_hash":<byte>,"settle_index":<string>,"amt_paid":<string>,"settle_date":<string>,"route_hints":<array RouteHint>,"settled":<boolean>,"r_preimage":<byte>,"amt_paid_sat":<string>, }' 
{ 
    "r_hash": <byte>, 
    "payment_request": <string>, 
    "add_index": <string>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/invoices'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'cltv_expiry': <string>, 
        'add_index': <string>, 
        'creation_date': <string>, 
        'state': <InvoiceInvoiceState>, 
        'private': <boolean>, 
        'value': <string>, 
        'htlcs': <array InvoiceHTLC>, 
        'expiry': <string>, 
        'fallback_addr': <string>, 
        'r_hash': base64.b64encode(<byte>).decode(), 
        'memo': <string>, 
        'receipt': base64.b64encode(<byte>).decode(), 
        'amt_paid_msat': <string>, 
        'payment_request': <string>, 
        'description_hash': base64.b64encode(<byte>).decode(), 
        'settle_index': <string>, 
        'amt_paid': <string>, 
        'settle_date': <string>, 
        'route_hints': <array RouteHint>, 
        'settled': <boolean>, 
        'r_preimage': base64.b64encode(<byte>).decode(), 
        'amt_paid_sat': <string>, 
    }
>>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "r_hash": <byte>, 
    "payment_request": <string>, 
    "add_index": <string>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var requestBody = { 
    cltv_expiry: <string>,
    add_index: <string>,
    creation_date: <string>,
    state: <InvoiceInvoiceState>,
    private: <boolean>,
    value: <string>,
    htlcs: <array InvoiceHTLC>,
    expiry: <string>,
    fallback_addr: <string>,
    r_hash: <byte>,
    memo: <string>,
    receipt: <byte>,
    amt_paid_msat: <string>,
    payment_request: <string>,
    description_hash: <byte>,
    settle_index: <string>,
    amt_paid: <string>,
    settle_date: <string>,
    route_hints: <array RouteHint>,
    settled: <boolean>,
    r_preimage: <byte>,
    amt_paid_sat: <string>,
  };
> var options = {
    url: 'https://localhost:8080/v1/invoices',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
    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
cltv_expiry string body Delta to use for the time-lock of the CLTV extended to the final hop.
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.
creation_date string body When this invoice was created
state InvoiceInvoiceState body The state the invoice is in.
private boolean body Whether this invoice should include routing hints for private channels.
value string body The value of this invoice in satoshis
htlcs array InvoiceHTLC body List of HTLCs paying to this invoice [EXPERIMENTAL].
expiry string body Payment request expiry time in seconds. Default is 3600 (1 hour).
fallback_addr string body Fallback on-chain address.
r_hash byte body The hash of the preimage
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.
receipt byte body Deprecated. An optional cryptographic receipt of payment which is not implemented.
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.
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.
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.
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.
amt_paid string body Deprecated, use amt_paid_sat or amt_paid_msat.
settle_date string body When this invoice was settled
route_hints array RouteHint body Route hints that can each be individually used to assist in reaching the invoice's destination.
settled boolean body Whether this invoice has been fulfilled
r_preimage byte body The hex-encoded preimage (32 byte) which will allow settling an incoming HTLC payable to this preimage
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.

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.
$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/invoices 
{ 
    "last_index_offset": <string>, 
    "invoices": <array Invoice>, 
    "first_index_offset": <string>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/invoices'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "last_index_offset": <string>, 
    "invoices": <array Invoice>, 
    "first_index_offset": <string>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/invoices',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "last_index_offset": <string>, 
    "invoices": <array Invoice>, 
    "first_index_offset": <string>, 
}

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.
invoices array Invoice A list of invoices from the time slice of the time series specified in the request.
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.

/v1/macaroon

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X POST --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/macaroon  \
    -d '{ "permissions":<array MacaroonPermission>, }' 
{ 
    "macaroon": <string>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/macaroon'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'permissions': <array MacaroonPermission>, 
    }
>>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "macaroon": <string>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var requestBody = { 
    permissions: <array MacaroonPermission>,
  };
> var options = {
    url: 'https://localhost:8080/v1/macaroon',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
    form: JSON.stringify(requestBody),
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "macaroon": <string>, 
}

POST /v1/macaroon

lncli: bakemacaroon BakeMacaroon allows the creation of a new macaroon with custom read and write permissions. No first-party caveats are added since this can be done offline.

Field Type Placement Description
permissions array MacaroonPermission body The list of permissions the new macaroon should grant.

Response

Field Type Description
macaroon string The hex encoded macaroon, serialized in binary format.

/v1/balance/blockchain

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/balance/blockchain 
{ 
    "confirmed_balance": <string>, 
    "total_balance": <string>, 
    "unconfirmed_balance": <string>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/balance/blockchain'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "confirmed_balance": <string>, 
    "total_balance": <string>, 
    "unconfirmed_balance": <string>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/balance/blockchain',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "confirmed_balance": <string>, 
    "total_balance": <string>, 
    "unconfirmed_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
confirmed_balance string The confirmed balance of a wallet(with >= 1 confirmations)
total_balance string The balance of the wallet
unconfirmed_balance string The unconfirmed balance of a wallet(with 0 confirmations)

/v1/getinfo

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/getinfo 
{ 
    "best_header_timestamp": <string>, 
    "num_peers": <int64>, 
    "version": <string>, 
    "synced_to_chain": <boolean>, 
    "num_inactive_channels": <int64>, 
    "alias": <string>, 
    "block_hash": <string>, 
    "chains": <array Chain>, 
    "num_pending_channels": <int64>, 
    "num_active_channels": <int64>, 
    "testnet": <boolean>, 
    "synced_to_graph": <boolean>, 
    "identity_pubkey": <string>, 
    "uris": <array string>, 
    "block_height": <int64>, 
    "color": <string>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/getinfo'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "best_header_timestamp": <string>, 
    "num_peers": <int64>, 
    "version": <string>, 
    "synced_to_chain": <boolean>, 
    "num_inactive_channels": <int64>, 
    "alias": <string>, 
    "block_hash": <string>, 
    "chains": <array Chain>, 
    "num_pending_channels": <int64>, 
    "num_active_channels": <int64>, 
    "testnet": <boolean>, 
    "synced_to_graph": <boolean>, 
    "identity_pubkey": <string>, 
    "uris": <array string>, 
    "block_height": <int64>, 
    "color": <string>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/getinfo',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "best_header_timestamp": <string>, 
    "num_peers": <int64>, 
    "version": <string>, 
    "synced_to_chain": <boolean>, 
    "num_inactive_channels": <int64>, 
    "alias": <string>, 
    "block_hash": <string>, 
    "chains": <array Chain>, 
    "num_pending_channels": <int64>, 
    "num_active_channels": <int64>, 
    "testnet": <boolean>, 
    "synced_to_graph": <boolean>, 
    "identity_pubkey": <string>, 
    "uris": <array string>, 
    "block_height": <int64>, 
    "color": <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
best_header_timestamp string Timestamp of the block best known to the wallet
num_peers int64 Number of peers
version string The version of the LND software that the node is running.
synced_to_chain boolean Whether the wallet's view is synced to the main chain
num_inactive_channels int64 Number of inactive channels
alias string If applicable, the alias of the current node, e.g. "bob"
block_hash string The node's current view of the hash of the best block
chains array Chain A list of active chains the node is connected to
num_pending_channels int64 Number of pending channels
num_active_channels int64 Number of active channels
testnet boolean Whether the current node is connected to testnet. This field is deprecated and the network field should be used instead
synced_to_graph boolean Whether we consider ourselves synced with the public channel graph.
identity_pubkey string The identity pubkey of the current node.
uris array string The URIs of the current node.
block_height int64 The node's current view of the height of the best block
color string The color of the current node in hex code format

/v1/invoices/subscribe

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/invoices/subscribe 
{ 
    "cltv_expiry": <string>, 
    "add_index": <string>, 
    "creation_date": <string>, 
    "state": <InvoiceInvoiceState>, 
    "private": <boolean>, 
    "value": <string>, 
    "htlcs": <array InvoiceHTLC>, 
    "expiry": <string>, 
    "fallback_addr": <string>, 
    "r_hash": <byte>, 
    "memo": <string>, 
    "receipt": <byte>, 
    "amt_paid_msat": <string>, 
    "payment_request": <string>, 
    "description_hash": <byte>, 
    "settle_index": <string>, 
    "amt_paid": <string>, 
    "settle_date": <string>, 
    "route_hints": <array RouteHint>, 
    "settled": <boolean>, 
    "r_preimage": <byte>, 
    "amt_paid_sat": <string>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/invoices/subscribe'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path, stream=True)
>>> for raw_response in r.iter_lines():
>>>     json_response = json.loads(raw_response)
>>>     print(json_response)
{ 
    "cltv_expiry": <string>, 
    "add_index": <string>, 
    "creation_date": <string>, 
    "state": <InvoiceInvoiceState>, 
    "private": <boolean>, 
    "value": <string>, 
    "htlcs": <array InvoiceHTLC>, 
    "expiry": <string>, 
    "fallback_addr": <string>, 
    "r_hash": <byte>, 
    "memo": <string>, 
    "receipt": <byte>, 
    "amt_paid_msat": <string>, 
    "payment_request": <string>, 
    "description_hash": <byte>, 
    "settle_index": <string>, 
    "amt_paid": <string>, 
    "settle_date": <string>, 
    "route_hints": <array RouteHint>, 
    "settled": <boolean>, 
    "r_preimage": <byte>, 
    "amt_paid_sat": <string>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/invoices/subscribe',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "cltv_expiry": <string>, 
    "add_index": <string>, 
    "creation_date": <string>, 
    "state": <InvoiceInvoiceState>, 
    "private": <boolean>, 
    "value": <string>, 
    "htlcs": <array InvoiceHTLC>, 
    "expiry": <string>, 
    "fallback_addr": <string>, 
    "r_hash": <byte>, 
    "memo": <string>, 
    "receipt": <byte>, 
    "amt_paid_msat": <string>, 
    "payment_request": <string>, 
    "description_hash": <byte>, 
    "settle_index": <string>, 
    "amt_paid": <string>, 
    "settle_date": <string>, 
    "route_hints": <array RouteHint>, 
    "settled": <boolean>, 
    "r_preimage": <byte>, 
    "amt_paid_sat": <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
cltv_expiry string Delta to use for the time-lock of the CLTV extended to the final hop.
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.
creation_date string When this invoice was created
state InvoiceInvoiceState The state the invoice is in.
private boolean Whether this invoice should include routing hints for private channels.
value string The value of this invoice in satoshis
htlcs array InvoiceHTLC List of HTLCs paying to this invoice [EXPERIMENTAL].
expiry string Payment request expiry time in seconds. Default is 3600 (1 hour).
fallback_addr string Fallback on-chain address.
r_hash byte The hash of the preimage
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.
receipt byte Deprecated. An optional cryptographic receipt of payment which is not implemented.
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.
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.
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.
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.
amt_paid string Deprecated, use amt_paid_sat or amt_paid_msat.
settle_date string When this invoice was settled
route_hints array RouteHint Route hints that can each be individually used to assist in reaching the invoice's destination.
settled boolean Whether this invoice has been fulfilled
r_preimage byte The hex-encoded preimage (32 byte) which will allow settling an incoming HTLC payable to this preimage
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.

/v1/graph/edge

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/graph/edge/{chan_id} 
{ 
    "channel_id": <string>, 
    "capacity": <string>, 
    "node2_pub": <string>, 
    "node1_pub": <string>, 
    "node2_policy": <RoutingPolicy>, 
    "last_update": <int64>, 
    "chan_point": <string>, 
    "node1_policy": <RoutingPolicy>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/graph/edge/{chan_id}'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "channel_id": <string>, 
    "capacity": <string>, 
    "node2_pub": <string>, 
    "node1_pub": <string>, 
    "node2_policy": <RoutingPolicy>, 
    "last_update": <int64>, 
    "chan_point": <string>, 
    "node1_policy": <RoutingPolicy>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/graph/edge/{chan_id}',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "channel_id": <string>, 
    "capacity": <string>, 
    "node2_pub": <string>, 
    "node1_pub": <string>, 
    "node2_policy": <RoutingPolicy>, 
    "last_update": <int64>, 
    "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
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.
capacity string
node2_pub string
node1_pub string
node2_policy RoutingPolicy
last_update int64
chan_point string
node1_policy RoutingPolicy

/v1/unlockwallet


$ curl -X POST --cacert $LND_DIR/tls.cert https://localhost:8080/v1/unlockwallet  \
    -d '{ "recovery_window":<int32>,"wallet_password":<byte>,"channel_backups":<ChanBackupSnapshot>, }' 
{ 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/unlockwallet'
>>> cert_path = 'LND_DIR/tls.cert'
>>> data = { 
        'recovery_window': <int32>, 
        'wallet_password': base64.b64encode(<byte>).decode(), 
        'channel_backups': <ChanBackupSnapshot>, 
    }
>>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
}
> var fs = require('fs');
> var request = require('request');
> var requestBody = { 
    recovery_window: <int32>,
    wallet_password: <byte>,
    channel_backups: <ChanBackupSnapshot>,
  };
> var options = {
    url: 'https://localhost:8080/v1/unlockwallet',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    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
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.
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.

Response

This response has no parameters.

/v1/channels/backup

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/channels/backup/{chan_point.funding_txid_str}/{chan_point.output_index} 
{ 
    "chan_backup": <byte>, 
    "chan_point": <ChannelPoint>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/channels/backup/{chan_point.funding_txid_str}/{chan_point.output_index}'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "chan_backup": <byte>, 
    "chan_point": <ChannelPoint>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/channels/backup/{chan_point.funding_txid_str}/{chan_point.output_index}',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "chan_backup": <byte>, 
    "chan_point": <ChannelPoint>, 
}

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_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.
chan_point ChannelPoint Identifies the channel that this backup belongs to.
$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/channels/backup 
{ 
    "single_chan_backups": <ChannelBackups>, 
    "multi_chan_backup": <MultiChanBackup>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/channels/backup'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "single_chan_backups": <ChannelBackups>, 
    "multi_chan_backup": <MultiChanBackup>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/channels/backup',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "single_chan_backups": <ChannelBackups>, 
    "multi_chan_backup": <MultiChanBackup>, 
}

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
single_chan_backups ChannelBackups The set of new channels that have been added since the last channel backup snapshot was requested.
multi_chan_backup MultiChanBackup A multi-channel backup that covers all open channels currently known to lnd.

/v1/payreq

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/payreq/{pay_req} 
{ 
    "num_satoshis": <string>, 
    "description": <string>, 
    "destination": <string>, 
    "expiry": <string>, 
    "cltv_expiry": <string>, 
    "timestamp": <string>, 
    "route_hints": <array RouteHint>, 
    "fallback_addr": <string>, 
    "payment_hash": <string>, 
    "description_hash": <string>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/payreq/{pay_req}'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "num_satoshis": <string>, 
    "description": <string>, 
    "destination": <string>, 
    "expiry": <string>, 
    "cltv_expiry": <string>, 
    "timestamp": <string>, 
    "route_hints": <array RouteHint>, 
    "fallback_addr": <string>, 
    "payment_hash": <string>, 
    "description_hash": <string>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/payreq/{pay_req}',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "num_satoshis": <string>, 
    "description": <string>, 
    "destination": <string>, 
    "expiry": <string>, 
    "cltv_expiry": <string>, 
    "timestamp": <string>, 
    "route_hints": <array RouteHint>, 
    "fallback_addr": <string>, 
    "payment_hash": <string>, 
    "description_hash": <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
description string
destination string
expiry string
cltv_expiry string
timestamp string
route_hints array RouteHint
fallback_addr string
payment_hash string
description_hash string

/v1/changepassword


$ curl -X POST --cacert $LND_DIR/tls.cert https://localhost:8080/v1/changepassword  \
    -d '{ "new_password":<byte>,"current_password":<byte>, }' 
{ 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/changepassword'
>>> cert_path = 'LND_DIR/tls.cert'
>>> 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 fs = require('fs');
> var request = require('request');
> var requestBody = { 
    new_password: <byte>,
    current_password: <byte>,
  };
> var options = {
    url: 'https://localhost:8080/v1/changepassword',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    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/switch

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X POST --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/switch  \
    -d '{ "start_time":<string>,"num_max_events":<int64>,"end_time":<string>,"index_offset":<int64>, }' 
{ 
    "last_offset_index": <int64>, 
    "forwarding_events": <array ForwardingEvent>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/switch'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'start_time': <string>, 
        'num_max_events': <int64>, 
        'end_time': <string>, 
        'index_offset': <int64>, 
    }
>>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "last_offset_index": <int64>, 
    "forwarding_events": <array ForwardingEvent>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var requestBody = { 
    start_time: <string>,
    num_max_events: <int64>,
    end_time: <string>,
    index_offset: <int64>,
  };
> var options = {
    url: 'https://localhost:8080/v1/switch',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
    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.
num_max_events int64 body The max number of events to return in the response to this query.
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.
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.

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/transactions/fee

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/transactions/fee 
{ 
    "fee_sat": <string>, 
    "feerate_sat_per_byte": <string>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/transactions/fee'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "fee_sat": <string>, 
    "feerate_sat_per_byte": <string>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/transactions/fee',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "fee_sat": <string>, 
    "feerate_sat_per_byte": <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
fee_sat string The total fee in satoshis.
feerate_sat_per_byte string The fee rate in satoshi/byte.

/v1/payments

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X DELETE --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/payments 
{ 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/payments'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.delete(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/payments',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> 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.

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/payments 
{ 
    "payments": <array Payment>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/payments'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "payments": <array Payment>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/payments',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> 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

/v1/graph

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/graph 
{ 
    "nodes": <array LightningNode>, 
    "edges": <array ChannelEdge>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/graph'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "nodes": <array LightningNode>, 
    "edges": <array ChannelEdge>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/graph',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> 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/chanpolicy

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X POST --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/chanpolicy  \
    -d '{ "max_htlc_msat":<string>,"fee_rate":<double>,"time_lock_delta":<int64>,"chan_point":<ChannelPoint>,"global":<boolean>,"base_fee_msat":<string>, }' 
{ 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/chanpolicy'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'max_htlc_msat': <string>, 
        'fee_rate': <double>, 
        'time_lock_delta': <int64>, 
        'chan_point': <ChannelPoint>, 
        'global': <boolean>, 
        'base_fee_msat': <string>, 
    }
>>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var requestBody = { 
    max_htlc_msat: <string>,
    fee_rate: <double>,
    time_lock_delta: <int64>,
    chan_point: <ChannelPoint>,
    global: <boolean>,
    base_fee_msat: <string>,
  };
> var options = {
    url: 'https://localhost:8080/v1/chanpolicy',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
    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
max_htlc_msat string body If set, the maximum HTLC size in milli-satoshis. If unset, the maximum HTLC will be unchanged.
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.
time_lock_delta int64 body The required timelock delta for HTLCs forwarded over the channel.
chan_point ChannelPoint body If set, this update will target a specific channel.
global boolean body If set, then this update applies to all currently active channels.
base_fee_msat string body The base fee charged regardless of the number of milli-satoshis sent.

Response

This response has no parameters.

/v1/channels/abandon

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X DELETE --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/channels/abandon/{channel_point.funding_txid_str}/{channel_point.output_index} 
{ 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/channels/abandon/{channel_point.funding_txid_str}/{channel_point.output_index}'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.delete(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/channels/abandon/{channel_point.funding_txid_str}/{channel_point.output_index}',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> 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/utxos

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/utxos 
{ 
    "utxos": <array Utxo>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/utxos'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "utxos": <array Utxo>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/utxos',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> 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/genseed


$ curl -X GET --cacert $LND_DIR/tls.cert https://localhost:8080/v1/genseed 
{ 
    "enciphered_seed": <byte>, 
    "cipher_seed_mnemonic": <array string>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/genseed'
>>> cert_path = 'LND_DIR/tls.cert'
>>> r = requests.get(url, verify=cert_path)
>>> print(r.json())
{ 
    "enciphered_seed": <byte>, 
    "cipher_seed_mnemonic": <array string>, 
}
> var fs = require('fs');
> var request = require('request');
> var options = {
    url: 'https://localhost:8080/v1/genseed',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "enciphered_seed": <byte>, 
    "cipher_seed_mnemonic": <array string>, 
}

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

/v1/transactions

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X POST --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/transactions  \
    -d '{ "addr":<string>,"target_conf":<int32>,"sat_per_byte":<string>,"amount":<string>,"send_all":<boolean>, }' 
{ 
    "txid": <string>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/transactions'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'addr': <string>, 
        'target_conf': <int32>, 
        'sat_per_byte': <string>, 
        'amount': <string>, 
        'send_all': <boolean>, 
    }
>>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "txid": <string>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var requestBody = { 
    addr: <string>,
    target_conf: <int32>,
    sat_per_byte: <string>,
    amount: <string>,
    send_all: <boolean>,
  };
> var options = {
    url: 'https://localhost:8080/v1/transactions',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
    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
addr string body The address to send coins to
target_conf int32 body The target number of blocks that this transaction should be confirmed by.
sat_per_byte string body A manual fee rate set in sat/byte that should be used when crafting the transaction.
amount string body The amount in satoshis to send
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.

Response

Field Type Description
txid string The transaction ID of the transaction
$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/transactions 
{ 
    "transactions": <array Transaction>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/transactions'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "transactions": <array Transaction>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/transactions',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> 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.

/v1/graph/node

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X GET --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/graph/node/{pub_key} 
{ 
    "channels": <array ChannelEdge>, 
    "num_channels": <int64>, 
    "total_capacity": <string>, 
    "node": <LightningNode>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/graph/node/{pub_key}'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> r = requests.get(url, headers=headers, verify=cert_path)
>>> print(r.json())
{ 
    "channels": <array ChannelEdge>, 
    "num_channels": <int64>, 
    "total_capacity": <string>, 
    "node": <LightningNode>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var options = {
    url: 'https://localhost:8080/v1/graph/node/{pub_key}',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
  };
> request.get(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "channels": <array ChannelEdge>, 
    "num_channels": <int64>, 
    "total_capacity": <string>, 
    "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
channels array ChannelEdge A list of all public channels for the node.
num_channels int64 The total number of channels for the node.
total_capacity string The sum of all channels capacity for the node, denominated in satoshis.
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/transactions/route

$ MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $LND_DIR/data/chain/bitcoin/simnet/admin.macaroon)"
$ curl -X POST --cacert $LND_DIR/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/channels/transactions/route  \
    -d '{ "payment_hash_string":<string>,"payment_hash":<byte>,"route":<Route>, }' 
{ 
    "payment_preimage": <byte>, 
    "payment_hash": <byte>, 
    "payment_error": <string>, 
    "payment_route": <Route>, 
}
>>> import base64, codecs, json, requests
>>> url = 'https://localhost:8080/v1/channels/transactions/route'
>>> cert_path = 'LND_DIR/tls.cert'
>>> macaroon = codecs.encode(open('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon', 'rb').read(), 'hex')
>>> headers = {'Grpc-Metadata-macaroon': macaroon}
>>> data = { 
        'payment_hash_string': <string>, 
        'payment_hash': base64.b64encode(<byte>).decode(), 
        'route': <Route>, 
    }
>>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
>>> print(r.json())
{ 
    "payment_preimage": <byte>, 
    "payment_hash": <byte>, 
    "payment_error": <string>, 
    "payment_route": <Route>, 
}
> var fs = require('fs');
> var request = require('request');
> var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
> var requestBody = { 
    payment_hash_string: <string>,
    payment_hash: <byte>,
    route: <Route>,
  };
> var options = {
    url: 'https://localhost:8080/v1/channels/transactions/route',
    // Work-around for self-signed certificates.
    rejectUnauthorized: false,
    json: true, 
    headers: {
      'Grpc-Metadata-macaroon': macaroon,
    },
    form: JSON.stringify(requestBody),
  };
> request.post(options, function(error, response, body) {
    console.log(body);
  });
{ 
    "payment_preimage": <byte>, 
    "payment_hash": <byte>, 
    "payment_error": <string>, 
    "payment_route": <Route>, 
}

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
payment_hash_string string body An optional hex-encoded payment hash to be used for the HTLC.
payment_hash byte body The payment hash to use for the HTLC.
route Route body Route that should be used to attempt to complete the payment.

Response

Field Type Description
payment_preimage byte
payment_hash byte
payment_error string
payment_route Route

Properties

NodeInfo

Field Type Description
channels array ChannelEdge A list of all public channels for the node.
num_channels int64 The total number of channels for the node.
total_capacity string The sum of all channels capacity for the node, denominated in satoshis.
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.

ListUnspentResponse

Field Type Description
utxos array Utxo A list of utxos

ForwardingEvent

Field Type Description
amt_in_msat string The total amount (in milli-satoshis) of the incoming HTLC that created half the circuit.
amt_in string The total amount (in satoshis) of the incoming HTLC that created half the circuit.
amt_out_msat string The total amount (in milli-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.
timestamp string Timestamp is the time (unix epoch offset) that this circuit was completed.
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.
chan_id_out string The outgoing channel ID that carried the preimage that completed the circuit.
amt_out string The total amount (in satoshis) of the outgoing HTLC that created the second half of the circuit.

ChannelBalanceResponse

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

UnlockWalletResponse

This property has no parameters.

ChannelEdge

Field Type Description
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.
capacity string
node2_pub string
node1_pub string
node2_policy RoutingPolicy
last_update int64
chan_point string
node1_policy RoutingPolicy

AbandonChannelResponse

This property has no parameters.

DisconnectPeerResponse

This property has no parameters.

PendingUpdate

Field Type Description
txid byte
output_index int64

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.
invoices array Invoice A list of invoices from the time slice of the time series specified in the request.
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.

ChannelCloseUpdate

Field Type Description
closing_txid byte
success boolean

Channel

Field Type Description
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.
total_satoshis_received string The total number of satoshis we've received within this channel.
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.
private boolean Whether this channel is advertised to the network or not.
active boolean Whether this channel is active or not
uptime string The number of seconds that the remote peer has been observed as being online by the channel scoring system over the lifetime of the channel [EXPERIMENTAL].
unsettled_balance string The unsettled balance in this channel
remote_pubkey string The identity pubkey of the remote node
chan_status_flags string A set of flags showing the current state of 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.
static_remote_key boolean If true, then this channel uses the modern commitment format where the key in the output of the remote party does not change each state. This makes back up and recovery easier as when the channel is closed, the funds go directly to that key.
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.
local_chan_reserve_sat string The minimum satoshis this node is required to reserve in its balance.
total_satoshis_sent string The total number of satoshis we've sent within this channel.
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.
commit_weight string The weight of the commitment transaction
local_balance string This node's current balance in this channel
remote_chan_reserve_sat string The minimum satoshis the other node is required to reserve in its balance.
capacity string The total amount of funds held in this channel
num_updates string The total number of updates conducted within this channel.
remote_balance string The counterparty's current balance in this channel
initiator boolean True if we were the ones that created the channel.
lifetime string The number of seconds that the channel has been monitored by the channel scoring system. Scores are currently not persisted, so this value may be less than the lifetime of the channel [EXPERIMENTAL].
pending_htlcs array HTLC The list of active, uncleared HTLCs currently pending within the channel.

SignMessageResponse

Field Type Description
signature string The signature for the given message

SendToRouteRequest

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

ChannelBackups

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

Route

Field Type Description
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.
hops array Hop Contains details concerning the specific forwarding details at each hop.
total_amt_msat string The total amount in millisatoshis.
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.
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_fees_msat string The total fees in millisatoshis.

QueryRoutesResponse

Field Type Description
routes array Route The route that results from the path finding operation. This is still a repeated field to retain backwards compatibility.
success_prob double The success probability of the returned route based on the current mission control state. [EXPERIMENTAL]

BakeMacaroonRequest

Field Type Description
permissions array MacaroonPermission The list of permissions the new macaroon should grant.

LightningNode

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

PendingChannelsResponse

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

FeeReportResponse

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

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.
num_max_events int64 The max number of events to return in the response to this query.
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.
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.

HopHint

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

BakeMacaroonResponse

Field Type Description
macaroon string The hex encoded macaroon, serialized in binary format.

OpenStatusUpdate

Field Type Description
chan_open ChannelOpenUpdate
chan_pending PendingUpdate

Peer

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

InvoiceHTLC

Field Type Description
resolve_time string Time at which this htlc was settled or canceled.
chan_id string Short channel id over which the htlc was received.
htlc_index string Index identifying the htlc on the channel.
accept_time string Time at which this htlc was accepted.
state InvoiceHTLCState Current state the htlc is in.
accept_height int32 Block height at which this htlc was accepted.
amt_msat string The amount of the htlc in msat.
expiry_height int32 Block height at which this htlc expires.

NodeAddress

Field Type Description
network string
addr string

SendCoinsRequest

Field Type Description
addr string The address to send coins to
target_conf int32 The target number of blocks that this transaction should be confirmed by.
sat_per_byte string A manual fee rate set in sat/byte that should be used when crafting the transaction.
amount string The amount in satoshis to send
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.

WalletBalanceResponse

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

SendManyResponse

Field Type Description
txid string The id of the transaction

Utxo

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

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.

ChanBackupSnapshot

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

LightningAddress

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

VerifyMessageRequest

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

ChannelEventUpdate

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

StopResponse

This property has no parameters.

PolicyUpdateRequest

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

ChannelPoint

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

SendCoinsResponse

Field Type Description
txid string The transaction ID of the transaction

DeleteAllPaymentsResponse

This property has no parameters.

RoutingPolicy

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

GetInfoResponse

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

InitWalletResponse

This property has no parameters.

ClosedChannelsResponse

Field Type Description
channels array ChannelCloseSummary

ListPaymentsResponse

Field Type Description
payments array Payment The list of payments

ChannelOpenUpdate

Field Type Description
channel_point ChannelPoint

DebugLevelResponse

Field Type Description
sub_systems string

PolicyUpdateResponse

This property has no parameters.

PendingChannelsResponsePendingOpenChannel

Field Type Description
channel PendingChannelsResponsePendingChannel The pending channel
confirmation_height int64 The height at which this channel will be confirmed
commit_weight string The weight of the commitment transaction
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.
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.

TransactionDetails

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

ChangePasswordResponse

This property has no parameters.

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

Transaction

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

ChannelAcceptRequest

Field Type Description
dust_limit string The dust limit of the initiator's commitment tx.
min_htlc string The smallest HTLC in millisatoshis that the initiator will accept.
channel_flags int64 A bit-field which the initiator uses to specify proposed channel behavior.
pending_chan_id byte The pending channel id.
csv_delay int64 The number of blocks to use for the relative time lock in the pay-to-self output of both commitment transactions.
push_amt string The push amount of the proposed channel in millisatoshis.
fee_per_kw string The initial fee rate that the initiator suggests for both commitment transactions.
chain_hash byte The hash of the genesis block that the proposed channel resides in.
channel_reserve string The minimum amount of satoshis the initiator requires us to have at all times.
funding_amt string The funding amount in satoshis that initiator wishes to use in the channel.
max_accepted_htlcs int64 The total number of incoming HTLC's that the initiator will accept.
node_pubkey byte The pubkey of the node that wishes to open an inbound channel.
max_value_in_flight string The maximum amount of coins in millisatoshis that can be pending in this channel.

MultiChanBackup

Field Type Description
chan_points array ChannelPoint Is the set of all channels that are included in this multi-channel backup.
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.

ConnectPeerResponse

This property has no parameters.

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.
payment_request string The optional payment request being fulfilled.
fee_msat string The fee paid for this payment in milli-satoshis
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
value string Deprecated, use value_sat or value_msat.
payment_preimage string The payment preimage
payment_hash string The payment hash
creation_date string The date of this payment
status PaymentPaymentStatus The status of the payment.
value_msat string The value of the payment in milli-satoshis

VerifyMessageResponse

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

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.

SendRequest

Field Type Description
dest_tlv object An optional field that can be used to pass an arbitrary set of TLV records to a peer which understands the new records. This can be used to pass application specific data during the payment attempt.
payment_hash_string string The hex-encoded hash to use within the payment's HTLC
amt string Number of satoshis to send.
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. This should not exceed lnd's --max-cltv-expiry setting. If zero, then the value of --max-cltv-expiry is enforced.
dest_string string The hex-encoded identity pubkey of the payment recipient
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
payment_hash byte The hash to use within the payment's HTLC
final_cltv_delta int32 The CLTV delta from the current height that should be used to set the timelock for the final hop.
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.

ListChannelsResponse

Field Type Description
channels array Channel The list of active channels

EstimateFeeResponse

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

PendingChannelsResponseForceClosedChannel

Field Type Description
channel PendingChannelsResponsePendingChannel The pending channel to be force closed
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
maturity_height int64 The height at which funds can be swept into the wallet
closing_txid string The transaction id of the closing transaction
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.
pending_htlcs array PendingHTLC

CloseStatusUpdate

Field Type Description
chan_close ChannelCloseUpdate
close_pending PendingUpdate

ChannelFeeReport

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

ListPeersResponse

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

ChannelEdgeUpdate

Field Type Description
routing_policy RoutingPolicy
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.
advertising_node string
capacity string
chan_point ChannelPoint
connecting_node string

VerifyChanBackupResponse

This property has no parameters.

PendingChannelsResponseWaitingCloseChannel

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

PendingChannelsResponseClosedChannel

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

UnlockWalletRequest

Field Type Description
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.
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.

OpenChannelRequest

Field Type Description
min_confs int32 The minimum number of confirmations each one of your outputs used for the funding transaction must satisfy.
sat_per_byte string A manual fee rate set in sat/byte that should be used when crafting the funding transaction.
target_conf int32 The target number of blocks that the funding transaction should be confirmed by.
min_htlc_msat string The minimum value in millisatoshi we will require for incoming HTLCs on the channel.
local_funding_amount string The number of satoshis the wallet should commit to the channel
node_pubkey_string string The hex encoded pubkey of the node to open a channel with
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.
node_pubkey byte The pubkey of the node to open a channel with
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
private boolean Whether this channel should be private, not announced to the greater network.

ClosedChannelUpdate

Field Type Description
capacity string
closed_height int64
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.

MacaroonPermission

Field Type Description
entity string The entity a permission grants access to.
action string The action that is granted.

Hop

Field Type Description
amt_to_forward string
tlv_payload boolean If set to true, then this hop will be encoded using the new variable length TLV format.
expiry int64
fee_msat string
amt_to_forward_msat string
fee 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.
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.
chan_capacity string

GraphTopologyUpdate

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

RouteHint

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

HTLC

Field Type Description
hash_lock byte
expiration_height int64
amount string
incoming boolean

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.

SendResponse

Field Type Description
payment_preimage byte
payment_hash byte
payment_error string
payment_route Route

NetworkInfo

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

SignMessageRequest

Field Type Description
msg byte The message to be signed

RestoreBackupResponse

This property has no parameters.

ChannelCloseSummary

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

ChannelBackup

Field Type Description
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.
chan_point ChannelPoint Identifies the channel that this backup belongs to.

PendingChannelsResponsePendingChannel

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

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.

InitWalletRequest

Field Type Description
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.
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.
aezeed_passphrase byte aezeed_passphrase is an optional user provided passphrase that will be used to encrypt the generated aezeed cipher seed.
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.
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.

GenSeedResponse

Field Type Description
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.
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.

PendingHTLC

Field Type Description
stage int64 Indicates whether the htlc is in its first or second stage of recovery
outpoint string The final output to be swept back to the user's wallet
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.
amount string The total value of the htlc
incoming boolean The direction within the channel that the htlc was sent

NewAddressResponse

Field Type Description
address string The newly generated wallet address

FeeLimit

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

RestoreChanBackupRequest

Field Type Description
chan_backups ChannelBackups
multi_chan_backup byte

Invoice

Field Type Description
cltv_expiry string Delta to use for the time-lock of the CLTV extended to the final hop.
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.
creation_date string When this invoice was created
state InvoiceInvoiceState The state the invoice is in.
private boolean Whether this invoice should include routing hints for private channels.
value string The value of this invoice in satoshis
htlcs array InvoiceHTLC List of HTLCs paying to this invoice [EXPERIMENTAL].
expiry string Payment request expiry time in seconds. Default is 3600 (1 hour).
fallback_addr string Fallback on-chain address.
r_hash byte The hash of the preimage
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.
receipt byte Deprecated. An optional cryptographic receipt of payment which is not implemented.
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.
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.
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.
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.
amt_paid string Deprecated, use amt_paid_sat or amt_paid_msat.
settle_date string When this invoice was settled
route_hints array RouteHint Route hints that can each be individually used to assist in reaching the invoice's destination.
settled boolean Whether this invoice has been fulfilled
r_preimage byte The hex-encoded preimage (32 byte) which will allow settling an incoming HTLC payable to this preimage
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.

PayReq

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

Chain

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

NodeUpdate

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

Enums

PeerSyncType

Name Value
UNKNOWN_SYNC 0
ACTIVE_SYNC 1
PASSIVE_SYNC 2

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

InvoiceHTLCState

Name Value
ACCEPTED 0
SETTLED 1
CANCELED 2

ChannelCloseSummaryClosureType

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

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