NAV Navbar
  • Back to Developer Site
  • 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/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} 
    { 
        "node2_pub": <string>, 
        "node2_policy": <RoutingPolicy>, 
        "chan_point": <string>, 
        "node1_pub": <string>, 
        "channel_id": <string>, 
        "last_update": <int64>, 
        "node1_policy": <RoutingPolicy>, 
        "capacity": <string>, 
    }
    
    >>> 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())
    { 
        "node2_pub": <string>, 
        "node2_policy": <RoutingPolicy>, 
        "chan_point": <string>, 
        "node1_pub": <string>, 
        "channel_id": <string>, 
        "last_update": <int64>, 
        "node1_policy": <RoutingPolicy>, 
        "capacity": <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/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);
      });
    { 
        "node2_pub": <string>, 
        "node2_policy": <RoutingPolicy>, 
        "chan_point": <string>, 
        "node1_pub": <string>, 
        "channel_id": <string>, 
        "last_update": <int64>, 
        "node1_policy": <RoutingPolicy>, 
        "capacity": <string>, 
    }
    

    GET /v1/graph/edge/{chan_id}

    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

    Response

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

    /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

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

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

    Response

    Field Type Description
    channels array ChannelCloseSummary

    /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 
    { 
        "channel_fees": <array ChannelFeeReport>, 
        "month_fee_sum": <string>, 
        "week_fee_sum": <string>, 
        "day_fee_sum": <string>, 
    }
    
    >>> 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())
    { 
        "channel_fees": <array ChannelFeeReport>, 
        "month_fee_sum": <string>, 
        "week_fee_sum": <string>, 
        "day_fee_sum": <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/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);
      });
    { 
        "channel_fees": <array ChannelFeeReport>, 
        "month_fee_sum": <string>, 
        "week_fee_sum": <string>, 
        "day_fee_sum": <string>, 
    }
    

    GET /v1/fees

    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
    channel_fees array ChannelFeeReport / An array of channel fee reports which describes the current fee schedule for each channel.
    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.

    /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}

    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
    channel_point.output_index int64 path

    Response

    This response has no parameters.

    /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

    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/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 
    { 
        "chains": <array string>, 
        "uris": <array string>, 
        "alias": <string>, 
        "num_active_channels": <int64>, 
        "num_inactive_channels": <int64>, 
        "version": <string>, 
        "identity_pubkey": <string>, 
        "num_peers": <int64>, 
        "synced_to_chain": <boolean>, 
        "testnet": <boolean>, 
        "block_hash": <string>, 
        "block_height": <int64>, 
        "num_pending_channels": <int64>, 
        "best_header_timestamp": <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())
    { 
        "chains": <array string>, 
        "uris": <array string>, 
        "alias": <string>, 
        "num_active_channels": <int64>, 
        "num_inactive_channels": <int64>, 
        "version": <string>, 
        "identity_pubkey": <string>, 
        "num_peers": <int64>, 
        "synced_to_chain": <boolean>, 
        "testnet": <boolean>, 
        "block_hash": <string>, 
        "block_height": <int64>, 
        "num_pending_channels": <int64>, 
        "best_header_timestamp": <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);
      });
    { 
        "chains": <array string>, 
        "uris": <array string>, 
        "alias": <string>, 
        "num_active_channels": <int64>, 
        "num_inactive_channels": <int64>, 
        "version": <string>, 
        "identity_pubkey": <string>, 
        "num_peers": <int64>, 
        "synced_to_chain": <boolean>, 
        "testnet": <boolean>, 
        "block_hash": <string>, 
        "block_height": <int64>, 
        "num_pending_channels": <int64>, 
        "best_header_timestamp": <string>, 
    }
    

    GET /v1/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
    chains array string / A list of active chains the node is connected to
    uris array string / The URIs of the current node.
    alias string / If applicable, the alias of the current node, e.g. “bob”
    num_active_channels int64 / Number of active channels
    num_inactive_channels int64 / Number of inactive channels
    version string / The version of the LND software that the node is running.
    identity_pubkey string / The identity pubkey of the current node.
    num_peers int64 / Number of peers
    synced_to_chain boolean / Whether the wallet’s view is synced to the main chain
    testnet boolean / Whether the current node is connected to testnet
    block_hash string / The node’s current view of the hash of the best block
    block_height int64 / The node’s current view of the height of the best block
    num_pending_channels int64 / Number of pending channels
    best_header_timestamp string / Timestamp of the block best known to the wallet

    /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 
    { 
        "edges": <array ChannelEdge>, 
        "nodes": <array LightningNode>, 
    }
    
    >>> 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())
    { 
        "edges": <array ChannelEdge>, 
        "nodes": <array 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',
        // 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);
      });
    { 
        "edges": <array ChannelEdge>, 
        "nodes": <array LightningNode>, 
    }
    

    GET /v1/graph

    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
    edges array ChannelEdge / The list of ChannelEdges in this channel graph
    nodes array LightningNode / The list of LightningNodes in this channel graph

    /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_closing_channels": <array PendingChannelsResponseClosedChannel>, 
        "total_limbo_balance": <string>, 
        "pending_force_closing_channels": <array PendingChannelsResponseForceClosedChannel>, 
        "pending_open_channels": <array PendingChannelsResponsePendingOpenChannel>, 
        "waiting_close_channels": <array PendingChannelsResponseWaitingCloseChannel>, 
    }
    
    >>> 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_closing_channels": <array PendingChannelsResponseClosedChannel>, 
        "total_limbo_balance": <string>, 
        "pending_force_closing_channels": <array PendingChannelsResponseForceClosedChannel>, 
        "pending_open_channels": <array PendingChannelsResponsePendingOpenChannel>, 
        "waiting_close_channels": <array PendingChannelsResponseWaitingCloseChannel>, 
    }
    
    > 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_closing_channels": <array PendingChannelsResponseClosedChannel>, 
        "total_limbo_balance": <string>, 
        "pending_force_closing_channels": <array PendingChannelsResponseForceClosedChannel>, 
        "pending_open_channels": <array PendingChannelsResponsePendingOpenChannel>, 
        "waiting_close_channels": <array PendingChannelsResponseWaitingCloseChannel>, 
    }
    

    GET /v1/channels/pending

    PendingChannels returns a list of all the channels that are currently considered “pending”. A channel is pending if it has finished the funding workflow and is waiting for confirmations for the funding txn, or is in the process of closure, either initiated cooperatively or non-cooperatively.

    This request has no parameters.

    Response

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

    /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 '{ "num_max_events":<int64>,"index_offset":<int64>,"end_time":<string>,"start_time":<string>, }' 
    { 
        "forwarding_events": <array ForwardingEvent>, 
        "last_offset_index": <int64>, 
    }
    
    >>> 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 = { 
            'num_max_events': <int64>, 
            'index_offset': <int64>, 
            'end_time': <string>, 
            'start_time': <string>, 
        }
    >>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
    >>> print(r.json())
    { 
        "forwarding_events": <array ForwardingEvent>, 
        "last_offset_index": <int64>, 
    }
    
    > var fs = require('fs');
    > var request = require('request');
    > var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
    > var requestBody = { 
        num_max_events: <int64>,
        index_offset: <int64>,
        end_time: <string>,
        start_time: <string>,
      };
    > 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);
      });
    { 
        "forwarding_events": <array ForwardingEvent>, 
        "last_offset_index": <int64>, 
    }
    

    POST /v1/switch

    ForwardingHistory allows the caller to query the htlcswitch for a record of all HTLC’s 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
    num_max_events int64 body / The max number of events to return in the response to this query.
    index_offset int64 body / Index offset is the offset in the time series to start at. As each response can only contain 50k records, callers can use this to skip around within a packed time series.
    end_time string body / End time is the end point of the forwarding history request. The response will carry at most 50k records between the start time and the end time. The index offset can be used to implement pagination.
    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.

    Response

    Field Type Description
    forwarding_events array ForwardingEvent / A list of forwarding events from the time slice of the time series specified in the request.
    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.

    /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 '{ "routes":<array Route>,"payment_hash_string":<string>,"payment_hash":<byte>, }' 
    { 
        "payment_error": <string>, 
        "payment_hash": <byte>, 
        "payment_preimage": <byte>, 
        "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 = { 
            'routes': <array Route>, 
            'payment_hash_string': <string>, 
            'payment_hash': base64.b64encode(<byte>).decode(), 
        }
    >>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
    >>> print(r.json())
    { 
        "payment_error": <string>, 
        "payment_hash": <byte>, 
        "payment_preimage": <byte>, 
        "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 = { 
        routes: <array Route>,
        payment_hash_string: <string>,
        payment_hash: <byte>,
      };
    > 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_error": <string>, 
        "payment_hash": <byte>, 
        "payment_preimage": <byte>, 
        "payment_route": <Route>, 
    }
    

    POST /v1/channels/transactions/route

    Field Type Placement Description
    routes array Route body / The set of routes that should be used to attempt to complete the payment.
    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.

    Response

    Field Type Description
    payment_error string
    payment_hash byte
    payment_preimage byte
    payment_route Route

    /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} 
    { 
        "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())
    { 
        "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);
      });
    { 
        "num_channels": <int64>, 
        "total_capacity": <string>, 
        "node": <LightningNode>, 
    }
    

    GET /v1/graph/node/{pub_key}

    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

    Response

    Field Type Description
    num_channels int64
    total_capacity string
    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/changepassword

    $ 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/changepassword  \
        -d '{ "current_password":<byte>,"new_password":<byte>, }' 
    { 
    }
    
    >>> import base64, codecs, json, requests
    >>> url = 'https://localhost:8080/v1/changepassword'
    >>> cert_path = 'LND_DIR/tls.cert'
    >>> data = { 
            'current_password': base64.b64encode(<byte>).decode(), 
            'new_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 = { 
        current_password: <byte>,
        new_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

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

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

    Response

    This response has no parameters.

    /v1/genseed

    $ 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/genseed 
    { 
        "cipher_seed_mnemonic": <array string>, 
        "enciphered_seed": <byte>, 
    }
    
    >>> 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())
    { 
        "cipher_seed_mnemonic": <array string>, 
        "enciphered_seed": <byte>, 
    }
    
    > 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);
      });
    { 
        "cipher_seed_mnemonic": <array string>, 
        "enciphered_seed": <byte>, 
    }
    

    GET /v1/genseed

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

    Response

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

    /v1/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

    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/initwallet

    $ 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/initwallet  \
        -d '{ "wallet_password":<byte>,"cipher_seed_mnemonic":<array string>,"recovery_window":<int32>,"aezeed_passphrase":<byte>, }' 
    { 
    }
    
    >>> import base64, codecs, json, requests
    >>> url = 'https://localhost:8080/v1/initwallet'
    >>> cert_path = 'LND_DIR/tls.cert'
    >>> data = { 
            'wallet_password': base64.b64encode(<byte>).decode(), 
            'cipher_seed_mnemonic': <array string>, 
            'recovery_window': <int32>, 
            'aezeed_passphrase': 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 = { 
        wallet_password: <byte>,
        cipher_seed_mnemonic: <array string>,
        recovery_window: <int32>,
        aezeed_passphrase: <byte>,
      };
    > 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

    Field Type Placement Description
    wallet_password byte body * wallet_password is the passphrase that should be used to encrypt the wallet. This MUST be at least 8 chars in length. After creation, this password is required to unlock the daemon.
    cipher_seed_mnemonic array string body * cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed cipher seed obtained by the user. This may have been generated by the GenSeed method, or be an existing seed.
    recovery_window int32 body * recovery_window is an optional argument specifying the address lookahead when restoring a wallet seed. The recovery window applies to each invdividual 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.
    aezeed_passphrase byte body * aezeed_passphrase is an optional user provided passphrase that will be used to encrypt the generated aezeed cipher seed.

    Response

    This response has no parameters.

    /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 
    { 
        "route_hints": <array RouteHint>, 
        "fallback_addr": <string>, 
        "r_hash": <byte>, 
        "settle_date": <string>, 
        "expiry": <string>, 
        "memo": <string>, 
        "receipt": <byte>, 
        "settle_index": <string>, 
        "add_index": <string>, 
        "payment_request": <string>, 
        "value": <string>, 
        "settled": <boolean>, 
        "amt_paid_msat": <string>, 
        "amt_paid": <string>, 
        "amt_paid_sat": <string>, 
        "private": <boolean>, 
        "creation_date": <string>, 
        "description_hash": <byte>, 
        "r_preimage": <byte>, 
        "cltv_expiry": <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)
    { 
        "route_hints": <array RouteHint>, 
        "fallback_addr": <string>, 
        "r_hash": <byte>, 
        "settle_date": <string>, 
        "expiry": <string>, 
        "memo": <string>, 
        "receipt": <byte>, 
        "settle_index": <string>, 
        "add_index": <string>, 
        "payment_request": <string>, 
        "value": <string>, 
        "settled": <boolean>, 
        "amt_paid_msat": <string>, 
        "amt_paid": <string>, 
        "amt_paid_sat": <string>, 
        "private": <boolean>, 
        "creation_date": <string>, 
        "description_hash": <byte>, 
        "r_preimage": <byte>, 
        "cltv_expiry": <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);
      });
    { 
        "route_hints": <array RouteHint>, 
        "fallback_addr": <string>, 
        "r_hash": <byte>, 
        "settle_date": <string>, 
        "expiry": <string>, 
        "memo": <string>, 
        "receipt": <byte>, 
        "settle_index": <string>, 
        "add_index": <string>, 
        "payment_request": <string>, 
        "value": <string>, 
        "settled": <boolean>, 
        "amt_paid_msat": <string>, 
        "amt_paid": <string>, 
        "amt_paid_sat": <string>, 
        "private": <boolean>, 
        "creation_date": <string>, 
        "description_hash": <byte>, 
        "r_preimage": <byte>, 
        "cltv_expiry": <string>, 
    }
    

    GET /v1/invoices/subscribe

    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
    route_hints array RouteHint * Route hints that can each be individually used to assist in reaching the invoice’s destination.
    fallback_addr string / Fallback on-chain address.
    r_hash byte / The hash of the preimage
    settle_date string / When this invoice was settled
    expiry string / Payment request expiry time in seconds. Default is 3600 (1 hour).
    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 / An optional cryptographic receipt of payment
    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.
    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.
    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.
    value string / The value of this invoice in satoshis
    settled boolean / Whether this invoice has been fulfilled
    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.
    amt_paid string / Deprecated, use amt_paid_sat or amt_paid_msat.
    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.
    private boolean / Whether this invoice should include routing hints for private channels.
    creation_date string / When this invoice was created
    description_hash byte * Hash (SHA-256) of a description of the payment. Used if the description of payment (memo) is too long to naturally fit within the description field of an encoded payment request.
    r_preimage byte * The hex-encoded preimage (32 byte) which will allow settling an incoming HTLC payable to this preimage
    cltv_expiry string / Delta to use for the time-lock of the CLTV extended to the final hop.

    /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

    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/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} 
    { 
        "fallback_addr": <string>, 
        "route_hints": <array RouteHint>, 
        "timestamp": <string>, 
        "expiry": <string>, 
        "num_satoshis": <string>, 
        "description_hash": <string>, 
        "payment_hash": <string>, 
        "description": <string>, 
        "destination": <string>, 
        "cltv_expiry": <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())
    { 
        "fallback_addr": <string>, 
        "route_hints": <array RouteHint>, 
        "timestamp": <string>, 
        "expiry": <string>, 
        "num_satoshis": <string>, 
        "description_hash": <string>, 
        "payment_hash": <string>, 
        "description": <string>, 
        "destination": <string>, 
        "cltv_expiry": <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);
      });
    { 
        "fallback_addr": <string>, 
        "route_hints": <array RouteHint>, 
        "timestamp": <string>, 
        "expiry": <string>, 
        "num_satoshis": <string>, 
        "description_hash": <string>, 
        "payment_hash": <string>, 
        "description": <string>, 
        "destination": <string>, 
        "cltv_expiry": <string>, 
    }
    

    GET /v1/payreq/{pay_req}

    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

    Response

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

    /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

    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

    ListPayments returns a list of all outgoing payments.

    This request has no parameters.

    Response

    Field Type Description
    payments array Payment / The list of payments

    /v1/unlockwallet

    $ 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/unlockwallet  \
        -d '{ "wallet_password":<byte>,"recovery_window":<int32>, }' 
    { 
    }
    
    >>> import base64, codecs, json, requests
    >>> url = 'https://localhost:8080/v1/unlockwallet'
    >>> cert_path = 'LND_DIR/tls.cert'
    >>> data = { 
            'wallet_password': base64.b64encode(<byte>).decode(), 
            'recovery_window': <int32>, 
        }
    >>> r = requests.post(url, verify=cert_path, data=json.dumps(data))
    >>> print(r.json())
    { 
    }
    
    > var fs = require('fs');
    > var request = require('request');
    > var requestBody = { 
        wallet_password: <byte>,
        recovery_window: <int32>,
      };
    > 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

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

    Field Type Placement Description
    wallet_password byte body * wallet_password should be the current valid passphrase for the daemon. This will be required to decrypt on-disk material that the daemon requires to function properly.
    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 invdividual branch of the BIP44 derivation paths. Supplying a recovery window of zero indicates that no addresses should be recovered, such after the first initialization of the wallet.

    Response

    This response has no parameters.

    /v1/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

    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/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}

    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

    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 '{ "addr":<LightningAddress>,"perm":<boolean>, }' 
    { 
    }
    
    >>> 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 = { 
            'addr': <LightningAddress>, 
            'perm': <boolean>, 
        }
    >>> 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 = { 
        addr: <LightningAddress>,
        perm: <boolean>,
      };
    > 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

    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
    addr LightningAddress body / Lightning address of the peer, in the format <pubkey>@host
    perm boolean body * If set, the daemon will attempt to persistently connect to the target peer. Otherwise, the call will be synchronous.

    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

    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/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>, 
        "confirmation": <ConfirmationUpdate>, 
    }
    
    >>> 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>, 
        "confirmation": <ConfirmationUpdate>, 
    }
    
    > 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>, 
        "confirmation": <ConfirmationUpdate>, 
    }
    

    DELETE /v1/channels/{channel_point.funding_txid_str}/{channel_point.output_index}

    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
    channel_point.output_index int64 path

    Response (streaming)

    Field Type Description
    chan_close ChannelCloseUpdate
    close_pending PendingUpdate
    confirmation ConfirmationUpdate
    $ 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 '{ "spend_unconfirmed":<boolean>,"min_htlc_msat":<string>,"node_pubkey_string":<string>,"private":<boolean>,"sat_per_byte":<string>,"min_confs":<int32>,"target_conf":<int32>,"remote_csv_delay":<int64>,"local_funding_amount":<string>,"node_pubkey":<byte>,"push_sat":<string>, }' 
    { 
        "funding_txid_bytes": <byte>, 
        "funding_txid_str": <string>, 
        "output_index": <int64>, 
    }
    
    >>> 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 = { 
            'spend_unconfirmed': <boolean>, 
            'min_htlc_msat': <string>, 
            'node_pubkey_string': <string>, 
            'private': <boolean>, 
            'sat_per_byte': <string>, 
            'min_confs': <int32>, 
            'target_conf': <int32>, 
            'remote_csv_delay': <int64>, 
            'local_funding_amount': <string>, 
            'node_pubkey': base64.b64encode(<byte>).decode(), 
            'push_sat': <string>, 
        }
    >>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
    >>> print(r.json())
    { 
        "funding_txid_bytes": <byte>, 
        "funding_txid_str": <string>, 
        "output_index": <int64>, 
    }
    
    > var fs = require('fs');
    > var request = require('request');
    > var macaroon = fs.readFileSync('LND_DIR/data/chain/bitcoin/simnet/admin.macaroon').toString('hex');
    > var requestBody = { 
        spend_unconfirmed: <boolean>,
        min_htlc_msat: <string>,
        node_pubkey_string: <string>,
        private: <boolean>,
        sat_per_byte: <string>,
        min_confs: <int32>,
        target_conf: <int32>,
        remote_csv_delay: <int64>,
        local_funding_amount: <string>,
        node_pubkey: <byte>,
        push_sat: <string>,
      };
    > 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);
      });
    { 
        "funding_txid_bytes": <byte>, 
        "funding_txid_str": <string>, 
        "output_index": <int64>, 
    }
    

    POST /v1/channels

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

    Response

    Field Type Description
    funding_txid_bytes byte / Txid of the funding transaction
    funding_txid_str string / Hex-encoded string representing the funding transaction
    output_index int64 / The index of the output of 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

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

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

    Response

    Field Type Description
    channels array Channel / The list of active channels

    /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 '{ "route_hints":<array RouteHint>,"fallback_addr":<string>,"r_hash":<byte>,"settle_date":<string>,"expiry":<string>,"memo":<string>,"receipt":<byte>,"settle_index":<string>,"add_index":<string>,"payment_request":<string>,"value":<string>,"settled":<boolean>,"amt_paid_msat":<string>,"amt_paid":<string>,"amt_paid_sat":<string>,"private":<boolean>,"creation_date":<string>,"description_hash":<byte>,"r_preimage":<byte>,"cltv_expiry":<string>, }' 
    { 
        "r_hash": <byte>, 
        "add_index": <string>, 
        "payment_request": <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 = { 
            'route_hints': <array RouteHint>, 
            'fallback_addr': <string>, 
            'r_hash': base64.b64encode(<byte>).decode(), 
            'settle_date': <string>, 
            'expiry': <string>, 
            'memo': <string>, 
            'receipt': base64.b64encode(<byte>).decode(), 
            'settle_index': <string>, 
            'add_index': <string>, 
            'payment_request': <string>, 
            'value': <string>, 
            'settled': <boolean>, 
            'amt_paid_msat': <string>, 
            'amt_paid': <string>, 
            'amt_paid_sat': <string>, 
            'private': <boolean>, 
            'creation_date': <string>, 
            'description_hash': base64.b64encode(<byte>).decode(), 
            'r_preimage': base64.b64encode(<byte>).decode(), 
            'cltv_expiry': <string>, 
        }
    >>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
    >>> print(r.json())
    { 
        "r_hash": <byte>, 
        "add_index": <string>, 
        "payment_request": <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 = { 
        route_hints: <array RouteHint>,
        fallback_addr: <string>,
        r_hash: <byte>,
        settle_date: <string>,
        expiry: <string>,
        memo: <string>,
        receipt: <byte>,
        settle_index: <string>,
        add_index: <string>,
        payment_request: <string>,
        value: <string>,
        settled: <boolean>,
        amt_paid_msat: <string>,
        amt_paid: <string>,
        amt_paid_sat: <string>,
        private: <boolean>,
        creation_date: <string>,
        description_hash: <byte>,
        r_preimage: <byte>,
        cltv_expiry: <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>, 
        "add_index": <string>, 
        "payment_request": <string>, 
    }
    

    POST /v1/invoices

    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
    route_hints array RouteHint body * Route hints that can each be individually used to assist in reaching the invoice’s destination.
    fallback_addr string body / Fallback on-chain address.
    r_hash byte body / The hash of the preimage
    settle_date string body / When this invoice was settled
    expiry string body / Payment request expiry time in seconds. Default is 3600 (1 hour).
    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 / An optional cryptographic receipt of payment
    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.
    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.
    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.
    value string body / The value of this invoice in satoshis
    settled boolean body / Whether this invoice has been fulfilled
    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.
    amt_paid string body / Deprecated, use amt_paid_sat or amt_paid_msat.
    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.
    private boolean body / Whether this invoice should include routing hints for private channels.
    creation_date string body / When this invoice was created
    description_hash byte body * Hash (SHA-256) of a description of the payment. Used if the description of payment (memo) is too long to naturally fit within the description field of an encoded payment request.
    r_preimage byte body * The hex-encoded preimage (32 byte) which will allow settling an incoming HTLC payable to this preimage
    cltv_expiry string body / Delta to use for the time-lock of the CLTV extended to the final hop.

    Response

    Field Type Description
    r_hash byte
    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.
    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.
    $ 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 
    { 
        "invoices": <array Invoice>, 
        "first_index_offset": <string>, 
        "last_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())
    { 
        "invoices": <array Invoice>, 
        "first_index_offset": <string>, 
        "last_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);
      });
    { 
        "invoices": <array Invoice>, 
        "first_index_offset": <string>, 
        "last_index_offset": <string>, 
    }
    

    GET /v1/invoices

    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. The reversed flag is set by default in order to paginate backwards. If you wish to paginate forwards, you must explicitly set the flag to false. If none of the parameters are specified, then the last 100 invoices will be returned.

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

    /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 '{ "target_conf":<int32>,"addr":<string>,"sat_per_byte":<string>,"amount":<string>, }' 
    { 
        "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 = { 
            'target_conf': <int32>, 
            'addr': <string>, 
            'sat_per_byte': <string>, 
            'amount': <string>, 
        }
    >>> 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 = { 
        target_conf: <int32>,
        addr: <string>,
        sat_per_byte: <string>,
        amount: <string>,
      };
    > 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

    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
    target_conf int32 body / The target number of blocks that this transaction should be confirmed by.
    addr string body / The address to send coins to
    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

    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

    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/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} 
    { 
        "route_hints": <array RouteHint>, 
        "fallback_addr": <string>, 
        "r_hash": <byte>, 
        "settle_date": <string>, 
        "expiry": <string>, 
        "memo": <string>, 
        "receipt": <byte>, 
        "settle_index": <string>, 
        "add_index": <string>, 
        "payment_request": <string>, 
        "value": <string>, 
        "settled": <boolean>, 
        "amt_paid_msat": <string>, 
        "amt_paid": <string>, 
        "amt_paid_sat": <string>, 
        "private": <boolean>, 
        "creation_date": <string>, 
        "description_hash": <byte>, 
        "r_preimage": <byte>, 
        "cltv_expiry": <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())
    { 
        "route_hints": <array RouteHint>, 
        "fallback_addr": <string>, 
        "r_hash": <byte>, 
        "settle_date": <string>, 
        "expiry": <string>, 
        "memo": <string>, 
        "receipt": <byte>, 
        "settle_index": <string>, 
        "add_index": <string>, 
        "payment_request": <string>, 
        "value": <string>, 
        "settled": <boolean>, 
        "amt_paid_msat": <string>, 
        "amt_paid": <string>, 
        "amt_paid_sat": <string>, 
        "private": <boolean>, 
        "creation_date": <string>, 
        "description_hash": <byte>, 
        "r_preimage": <byte>, 
        "cltv_expiry": <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);
      });
    { 
        "route_hints": <array RouteHint>, 
        "fallback_addr": <string>, 
        "r_hash": <byte>, 
        "settle_date": <string>, 
        "expiry": <string>, 
        "memo": <string>, 
        "receipt": <byte>, 
        "settle_index": <string>, 
        "add_index": <string>, 
        "payment_request": <string>, 
        "value": <string>, 
        "settled": <boolean>, 
        "amt_paid_msat": <string>, 
        "amt_paid": <string>, 
        "amt_paid_sat": <string>, 
        "private": <boolean>, 
        "creation_date": <string>, 
        "description_hash": <byte>, 
        "r_preimage": <byte>, 
        "cltv_expiry": <string>, 
    }
    

    GET /v1/invoice/{r_hash_str}

    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
    r_hash string query / The payment hash of the invoice to be looked up.

    Response

    Field Type Description
    route_hints array RouteHint * Route hints that can each be individually used to assist in reaching the invoice’s destination.
    fallback_addr string / Fallback on-chain address.
    r_hash byte / The hash of the preimage
    settle_date string / When this invoice was settled
    expiry string / Payment request expiry time in seconds. Default is 3600 (1 hour).
    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 / An optional cryptographic receipt of payment
    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.
    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.
    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.
    value string / The value of this invoice in satoshis
    settled boolean / Whether this invoice has been fulfilled
    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.
    amt_paid string / Deprecated, use amt_paid_sat or amt_paid_msat.
    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.
    private boolean / Whether this invoice should include routing hints for private channels.
    creation_date string / When this invoice was created
    description_hash byte * Hash (SHA-256) of a description of the payment. Used if the description of payment (memo) is too long to naturally fit within the description field of an encoded payment request.
    r_preimage byte * The hex-encoded preimage (32 byte) which will allow settling an incoming HTLC payable to this preimage
    cltv_expiry string / Delta to use for the time-lock of the CLTV extended to the final hop.

    /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

    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/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 
    { 
        "avg_channel_size": <double>, 
        "total_network_capacity": <string>, 
        "max_channel_size": <string>, 
        "max_out_degree": <int64>, 
        "graph_diameter": <int64>, 
        "num_channels": <int64>, 
        "min_channel_size": <string>, 
        "avg_out_degree": <double>, 
        "num_nodes": <int64>, 
    }
    
    >>> 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())
    { 
        "avg_channel_size": <double>, 
        "total_network_capacity": <string>, 
        "max_channel_size": <string>, 
        "max_out_degree": <int64>, 
        "graph_diameter": <int64>, 
        "num_channels": <int64>, 
        "min_channel_size": <string>, 
        "avg_out_degree": <double>, 
        "num_nodes": <int64>, 
    }
    
    > 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);
      });
    { 
        "avg_channel_size": <double>, 
        "total_network_capacity": <string>, 
        "max_channel_size": <string>, 
        "max_out_degree": <int64>, 
        "graph_diameter": <int64>, 
        "num_channels": <int64>, 
        "min_channel_size": <string>, 
        "avg_out_degree": <double>, 
        "num_nodes": <int64>, 
    }
    

    GET /v1/graph/info

    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
    avg_channel_size double
    total_network_capacity string
    max_channel_size string
    max_out_degree int64
    graph_diameter int64
    num_channels int64
    min_channel_size string
    avg_out_degree double
    num_nodes int64

    /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 '{ "global":<boolean>,"base_fee_msat":<string>,"fee_rate":<double>,"chan_point":<ChannelPoint>,"time_lock_delta":<int64>, }' 
    { 
    }
    
    >>> 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 = { 
            'global': <boolean>, 
            'base_fee_msat': <string>, 
            'fee_rate': <double>, 
            'chan_point': <ChannelPoint>, 
            'time_lock_delta': <int64>, 
        }
    >>> 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 = { 
        global: <boolean>,
        base_fee_msat: <string>,
        fee_rate: <double>,
        chan_point: <ChannelPoint>,
        time_lock_delta: <int64>,
      };
    > 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

    UpdateChannelPolicy allows the caller to update the fee schedule and channel policies for all channels globally, or a particular channel.

    Field Type Placement Description
    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.
    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.
    chan_point ChannelPoint body / If set, this update will target a specific channel.
    time_lock_delta int64 body / The required timelock delta for HTLCs forwarded over the channel.

    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":<byte>,"payment_hash_string":<string>,"fee_limit":<FeeLimit>,"final_cltv_delta":<int32>,"amt":<string>,"payment_hash":<byte>,"payment_request":<string>,"dest_string":<string>, }' 
    { 
        "payment_error": <string>, 
        "payment_hash": <byte>, 
        "payment_preimage": <byte>, 
        "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': base64.b64encode(<byte>).decode(), 
            'payment_hash_string': <string>, 
            'fee_limit': <FeeLimit>, 
            'final_cltv_delta': <int32>, 
            'amt': <string>, 
            'payment_hash': base64.b64encode(<byte>).decode(), 
            'payment_request': <string>, 
            'dest_string': <string>, 
        }
    >>> r = requests.post(url, headers=headers, verify=cert_path, data=json.dumps(data))
    >>> print(r.json())
    { 
        "payment_error": <string>, 
        "payment_hash": <byte>, 
        "payment_preimage": <byte>, 
        "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: <byte>,
        payment_hash_string: <string>,
        fee_limit: <FeeLimit>,
        final_cltv_delta: <int32>,
        amt: <string>,
        payment_hash: <byte>,
        payment_request: <string>,
        dest_string: <string>,
      };
    > 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_error": <string>, 
        "payment_hash": <byte>, 
        "payment_preimage": <byte>, 
        "payment_route": <Route>, 
    }
    

    POST /v1/channels/transactions

    Field Type Placement Description
    dest byte body / The identity pubkey of the payment recipient
    payment_hash_string string body / The hex-encoded hash to use within the payment’s HTLC
    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.
    final_cltv_delta int32 body * The CLTV delta from the current height that should be used to set the timelock for the final hop.
    amt string body / Number of satoshis to send.
    payment_hash byte body / The hash to use within the payment’s HTLC
    payment_request string body * A bare-bones invoice for a payment within the Lightning Network. With the details of the invoice, the sender has all the data necessary to send a payment to the recipient.
    dest_string string body / The hex-encoded identity pubkey of the payment recipient

    Response

    Field Type Description
    payment_error string
    payment_hash byte
    payment_preimage byte
    payment_route Route

    /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>, 
    }
    
    >>> 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>, 
    }
    
    > 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>, 
    }
    

    GET /v1/graph/routes/{pub_key}/{amt}

    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 retuned 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
    amt string path
    num_routes int32 query / The max number of routes to return.
    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.

    Response

    Field Type Description
    routes array Route

    Definitions

    ForwardingHistoryRequest

    Field Type Description
    num_max_events int64 / The max number of events to return in the response to this query.
    index_offset int64 / Index offset is the offset in the time series to start at. As each response can only contain 50k records, callers can use this to skip around within a packed time series.
    end_time string / End time is the end point of the forwarding history request. The response will carry at most 50k records between the start time and the end time. The index offset can be used to implement pagination.
    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.

    PendingChannelsResponsePendingChannel

    Field Type Description
    channel_point string
    remote_balance string
    local_balance string
    remote_node_pub string
    capacity string

    ConnectPeerRequest

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

    NewAddressResponse

    Field Type Description
    address string / The newly generated wallet address

    RouteHint

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

    RoutingPolicy

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

    PendingChannelsResponseClosedChannel

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

    VerifyMessageResponse

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

    FeeReportResponse

    Field Type Description
    channel_fees array ChannelFeeReport / An array of channel fee reports which describes the current fee schedule for each channel.
    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.

    PolicyUpdateRequest

    Field Type Description
    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.
    fee_rate double / The effective fee rate in milli-satoshis. The precision of this value goes up to 6 decimal places, so 1e-6.
    chan_point ChannelPoint / If set, this update will target a specific channel.
    time_lock_delta int64 / The required timelock delta for HTLCs forwarded over the channel.

    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

    PendingChannelsResponseForceClosedChannel

    Field Type Description
    maturity_height int64 / The height at which funds can be sweeped into the wallet
    pending_htlcs array PendingHTLC
    closing_txid string / The transaction id of the closing transaction
    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
    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.

    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.
    chan_id string / The unique identifier of the channel.
    fee_base_msat int64 / The base fee of the channel denominated in millisatoshis.
    cltv_expiry_delta int64 / The time-lock delta of the channel.
    node_id string / The public key of the node at the start of the channel.

    PendingChannelsResponseWaitingCloseChannel

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

    DeleteAllPaymentsResponse

    This definition has no parameters.

    ConnectPeerResponse

    This definition has no parameters.

    Transaction

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

    NodeAddress

    Field Type Description
    addr string
    network string

    TransactionDetails

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

    ChannelEdge

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

    ChannelCloseSummaryClosureType

    This definition has no parameters.

    SendResponse

    Field Type Description
    payment_error string
    payment_hash byte
    payment_preimage byte
    payment_route Route

    NodeInfo

    Field Type Description
    num_channels int64
    total_capacity string
    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.

    ChannelGraph

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

    InitWalletResponse

    This definition has no parameters.

    OpenChannelRequest

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

    GraphTopologyUpdate

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

    Payment

    Field Type Description
    value_msat string / The value of the payment in milli-satoshis
    creation_date string / The date of this payment
    path array string / The path this payment took
    payment_preimage string / The payment preimage
    payment_hash string / The payment hash
    value_sat string / The value of the payment in satoshis
    fee string / The fee paid for this payment in satoshis
    value string / Deprecated, use value_sat or value_msat.

    AbandonChannelResponse

    This definition has no parameters.

    SendCoinsRequest

    Field Type Description
    target_conf int32 / The target number of blocks that this transaction should be confirmed by.
    addr string / The address to send coins to
    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

    OpenStatusUpdate

    Field Type Description
    chan_pending PendingUpdate
    chan_open ChannelOpenUpdate
    confirmation ConfirmationUpdate

    Route

    Field Type Description
    total_time_lock int64 * The cumulative (final) time lock across the entire route. This is the CLTV value that should be extended to the first hop in the route. All other hops will decrement the time-lock as advertised, leaving enough time for all hops to wait for or present the payment preimage to complete the payment.
    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_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 it ourself.
    total_fees_msat string * The total fees in millisatoshis.

    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.

    ClosedChannelUpdate

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

    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

    ListChannelsResponse

    Field Type Description
    channels array Channel / The list of active channels

    Channel

    Field Type Description
    commit_weight string / The weight of the commitment transaction
    local_balance string / This node’s current balance in this channel
    commit_fee string * The amount calculated to be paid in fees for the current set of commitment transactions. The fee amount is persisted with the channel in order to allow the fee amount to be removed and recalculated with each channel state update, including updates that happen after a system restart.
    csv_delay int64 * The CSV delay expressed in relative blocks. If the channel is force closed, we’ll need to wait for this many blocks before we can regain our funds.
    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.
    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.
    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.
    total_satoshis_received string * The total number of satoshis we’ve received within this channel.
    pending_htlcs array HTLC * The list of active, uncleared HTLCs currently pending within the channel.
    num_updates string * The total number of updates conducted within this channel.
    active boolean / Whether this channel is active or not
    remote_balance string / The counterparty’s current balance in this channel
    unsettled_balance string / The unsettled balance in this channel
    total_satoshis_sent string * The total number of satoshis we’ve sent within this channel.
    remote_pubkey string / The identity pubkey of the remote node
    capacity string / The total amount of funds held in this channel
    private boolean / Whether this channel is advertised to the network or not

    PayReq

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

    ChannelCloseSummary

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

    ForwardingEvent

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

    ConfirmationUpdate

    Field Type Description
    num_confs_left int64
    block_height int32
    block_sha byte

    DisconnectPeerResponse

    This definition has no parameters.

    SignMessageRequest

    Field Type Description
    msg byte / The message to be signed

    DebugLevelResponse

    Field Type Description
    sub_systems string

    ChannelPoint

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

    HTLC

    Field Type Description
    hash_lock byte
    expiration_height int64
    incoming boolean
    amount string

    Peer

    Field Type Description
    ping_time string / Ping time to this peer
    sat_sent string / Satoshis sent to this peer
    address string / Network address of the peer; eg 127.0.0.1:10011
    bytes_sent string / Bytes of data transmitted to this peer
    sat_recv string / Satoshis received from this peer
    inbound boolean / A channel is inbound if the counterparty initiated the channel
    pub_key string / The identity pubkey of the peer
    bytes_recv string / Bytes of data transmitted from this peer

    ChannelCloseUpdate

    Field Type Description
    closing_txid byte
    success boolean

    SignMessageResponse

    Field Type Description
    signature string / The signature for the given message

    InitWalletRequest

    Field Type Description
    wallet_password byte * wallet_password is the passphrase that should be used to encrypt the wallet. This MUST be at least 8 chars in length. After creation, this password is required to unlock the daemon.
    cipher_seed_mnemonic array string * cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed cipher seed obtained by the user. This may have been generated by the GenSeed method, or be an existing seed.
    recovery_window int32 * recovery_window is an optional argument specifying the address lookahead when restoring a wallet seed. The recovery window applies to each invdividual 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.
    aezeed_passphrase byte * aezeed_passphrase is an optional user provided passphrase that will be used to encrypt the generated aezeed cipher seed.

    Hop

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

    NetworkInfo

    Field Type Description
    avg_channel_size double
    total_network_capacity string
    max_channel_size string
    max_out_degree int64
    graph_diameter int64
    num_channels int64
    min_channel_size string
    avg_out_degree double
    num_nodes int64

    ListPaymentsResponse

    Field Type Description
    payments array Payment / The list of payments

    ChannelFeeReport

    Field Type Description
    base_fee_msat string / The base fee charged regardless of the number of milli-satoshis sent.
    fee_rate double / The effective fee rate in milli-satoshis. Computed by dividing the fee_per_mil value by 1 million.
    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.

    UnlockWalletRequest

    Field Type Description
    wallet_password byte * wallet_password should be the current valid passphrase for the daemon. This will be required to decrypt on-disk material that the daemon requires to function properly.
    recovery_window int32 * recovery_window is an optional argument specifying the address lookahead when restoring a wallet seed. The recovery window applies to each invdividual 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.

    AddInvoiceResponse

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

    NodeUpdate

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

    PendingChannelsResponse

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

    GetInfoResponse

    Field Type Description
    chains array string / A list of active chains the node is connected to
    uris array string / The URIs of the current node.
    alias string / If applicable, the alias of the current node, e.g. “bob”
    num_active_channels int64 / Number of active channels
    num_inactive_channels int64 / Number of inactive channels
    version string / The version of the LND software that the node is running.
    identity_pubkey string / The identity pubkey of the current node.
    num_peers int64 / Number of peers
    synced_to_chain boolean / Whether the wallet’s view is synced to the main chain
    testnet boolean / Whether the current node is connected to testnet
    block_hash string / The node’s current view of the hash of the best block
    block_height int64 / The node’s current view of the height of the best block
    num_pending_channels int64 / Number of pending channels
    best_header_timestamp string / Timestamp of the block best known to the wallet

    PolicyUpdateResponse

    This definition has no parameters.

    ChannelOpenUpdate

    Field Type Description
    channel_point ChannelPoint

    SendToRouteRequest

    Field Type Description
    routes array Route / The set of routes that should be used to attempt to complete the payment.
    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.

    ListPeersResponse

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

    StopResponse

    This definition has no parameters.

    LightningNode

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

    ChangePasswordRequest

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

    GenSeedResponse

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

    ClosedChannelsResponse

    Field Type Description
    channels array ChannelCloseSummary

    Invoice

    Field Type Description
    route_hints array RouteHint * Route hints that can each be individually used to assist in reaching the invoice’s destination.
    fallback_addr string / Fallback on-chain address.
    r_hash byte / The hash of the preimage
    settle_date string / When this invoice was settled
    expiry string / Payment request expiry time in seconds. Default is 3600 (1 hour).
    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 / An optional cryptographic receipt of payment
    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.
    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.
    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.
    value string / The value of this invoice in satoshis
    settled boolean / Whether this invoice has been fulfilled
    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.
    amt_paid string / Deprecated, use amt_paid_sat or amt_paid_msat.
    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.
    private boolean / Whether this invoice should include routing hints for private channels.
    creation_date string / When this invoice was created
    description_hash byte * Hash (SHA-256) of a description of the payment. Used if the description of payment (memo) is too long to naturally fit within the description field of an encoded payment request.
    r_preimage byte * The hex-encoded preimage (32 byte) which will allow settling an incoming HTLC payable to this preimage
    cltv_expiry string / Delta to use for the time-lock of the CLTV extended to the final hop.

    PendingHTLC

    Field Type Description
    maturity_height int64 / The next block height at which we can spend the current stage
    outpoint string / The final output to be swept back to the user’s wallet
    amount string / The total value of the htlc
    incoming boolean / The direction within the channel that the htlc was sent
    stage int64 / Indicates whether the htlc is in its first or second stage of recovery
    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.

    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)

    QueryRoutesResponse

    Field Type Description
    routes array Route

    ChangePasswordResponse

    This definition has no parameters.

    ChannelEdgeUpdate

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

    UnlockWalletResponse

    This definition has no parameters.

    PendingChannelsResponsePendingOpenChannel

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

    CloseStatusUpdate

    Field Type Description
    chan_close ChannelCloseUpdate
    close_pending PendingUpdate
    confirmation ConfirmationUpdate

    SendCoinsResponse

    Field Type Description
    txid string / The transaction ID of the transaction

    ListInvoiceResponse

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

    ForwardingHistoryResponse

    Field Type Description
    forwarding_events array ForwardingEvent / A list of forwarding events from the time slice of the time series specified in the request.
    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.

    PendingUpdate

    Field Type Description
    output_index int64
    txid byte

    SendRequest

    Field Type Description
    dest byte / The identity pubkey of the payment recipient
    payment_hash_string string / The hex-encoded hash to use within the payment’s HTLC
    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.
    final_cltv_delta int32 * The CLTV delta from the current height that should be used to set the timelock for the final hop.
    amt string / Number of satoshis to send.
    payment_hash byte / The hash to use within the payment’s HTLC
    payment_request string * A bare-bones invoice for a payment within the Lightning Network. With the details of the invoice, the sender has all the data necessary to send a payment to the recipient.
    dest_string string / The hex-encoded identity pubkey of the payment recipient

    SendManyResponse

    Field Type Description
    txid string / The id of the transaction