Lightning Network Methods

Lightning Network Initialization Tasks

Lightning Network Nodes Methods

Lightning Network Channels Methods

Lightning Network Payments Methods

Lightning Network Flowchart

Once you:

You can get an invoice for a coffee from https://starblocks.acinq.co!

Then you can:

Follow the flowchart below to visualize the process:

Lighning Network Flowchart

Lightning Network Coins File Configuration

Lightning Coin Config Parameters

ParameterTypeDescription
coinobjectThe ticker of the coin you will use lightning network with, suffixed with -lightning
mm2integerDefaults to 0. A value of 1, indicates the coin is atomic swap compatible.
decimalsintegerThe decimal precision of the coin you will use the lightning network with.
protocolobjectA standard CoinProtocol object.
accept_inbound_channelsbooleanOptional, defaults to true. If this is set to false, we do not accept inbound requests to open a new channel.
accept_forwards_to_priv_channelsbooleanOptional, defaults to false. When set to false, any HTLCs which were to be forwarded over private channels will be rejected. This prevents us from taking on HTLC-forwarding risk when we intend to run as a node which is not online reliably (e.g. GUI wallet apps). Generally, private channels are used for non-routing purposes only.
counterparty_channel_config_limitsobjectOptional. A standard CounterpartyChannelConfig object.
channel_optionsobjectOptional. A standard LightningChannelOptions object.
our_channels_configobjectOptional. A standard LightningChannelConfig object.
Show Example Config
  {
    "coin": "BTC-lightning",
    "mm2": 1,
    "decimals": 11,
    "our_channels_config": {
        "inbound_channels_confirmations": 3,
        "max_inbound_in_flight_htlc_percent": 90
    },
    "counterparty_channel_config_limits": {
        "outbound_channels_confirmations": 3,
        "force_announced_channel_preference": false
    },
    "protocol": {
        "type": "LIGHTNING",
        "protocol_data":{
            "platform": "BTC-segwit",
            "network": "mainnet",
            "confirmation_targets": {
                "background": 12,
                "normal": 6,
                "high_priority": 1
            }
        }
    }
  },
  {
    "coin": "tBTC-lightning",
    "mm2": 1,
    "decimals": 11,
    "our_channels_configs": {
        "inbound_channels_confirmations": 3,
        "max_inbound_in_flight_htlc_percent": 90,
        "their_channel_reserve_sats": 10000
    },
    "counterparty_channel_config_limits": { 
        "outbound_channels_confirmations": 3
    },
    "protocol": {
        "type": "LIGHTNING",
        "protocol_data":{
            "platform": "tBTC-segwit",
            "network": "testnet",
            "confirmation_targets": {
                "background": 12,
                "normal": 6,
                "high_priority": 1
            }
        }
    }
  },