class BtcPay::Client::Api::LightningNode

Constants

PATH

Public Instance Methods

address(crypto_code, payload, **opts)
Alias for: deposit_address
channels(crypto_code, **opts) click to toggle source

@see docs.btcpayserver.org/API/Greenfield/v1/#operation/InternalLightningNodeApi_GetChannels

# File lib/btcpay/client/api/lightning_node.rb, line 20
def channels(crypto_code, **opts)
  client.get(path(crypto_code, 'channels'), options: opts)
end
Also aliased as: get_channels
connect(crypto_code, payload, **opts) click to toggle source

@see docs.btcpayserver.org/API/Greenfield/v1/#operation/InternalLightningNodeApi_ConnectToNode

# File lib/btcpay/client/api/lightning_node.rb, line 15
def connect(crypto_code, payload, **opts)
  client.post(path(crypto_code, 'connect'), payload: payload, options: opts)
end
create_invoice(crypto_code, payload, **opts) click to toggle source

@see docs.btcpayserver.org/API/Greenfield/v1/#operation/InternalLightningNodeApi_CreateInvoice

# File lib/btcpay/client/api/lightning_node.rb, line 55
def create_invoice(crypto_code, payload, **opts)
  client.post(path(crypto_code, 'invoices'), payload: payload, options: opts)
end
deposit_address(crypto_code, payload, **opts) click to toggle source

@see docs.btcpayserver.org/API/Greenfield/v1/#operation/InternalLightningNodeApi_GetDepositAddress

# File lib/btcpay/client/api/lightning_node.rb, line 34
def deposit_address(crypto_code, payload, **opts)
  client.post(path(crypto_code, 'address'), payload: payload, options: opts)
end
Also aliased as: address
get_channels(crypto_code, **opts)
Alias for: channels
get_invoice(crypto_code, invoice_id, **opts)
Alias for: invoice
info(crypto_code, **opts) click to toggle source

@see docs.btcpayserver.org/API/Greenfield/v1/#tag/Lightning-(Internal-Node)

# File lib/btcpay/client/api/lightning_node.rb, line 10
def info(crypto_code, **opts)
  client.get(path(crypto_code, 'info'), options: opts)
end
invoice(crypto_code, invoice_id, **opts) click to toggle source

@see docs.btcpayserver.org/API/Greenfield/v1/#operation/InternalLightningNodeApi_GetInvoice

# File lib/btcpay/client/api/lightning_node.rb, line 41
def invoice(crypto_code, invoice_id, **opts)
  client.get(path(crypto_code, 'invoices', invoice_id), options: opts)
end
Also aliased as: get_invoice
open(crypto_code, payload, **opts) click to toggle source

@see docs.btcpayserver.org/API/Greenfield/v1/#operation/InternalLightningNodeApi_OpenChannel

# File lib/btcpay/client/api/lightning_node.rb, line 27
def open(crypto_code, payload, **opts)
  client.post(path(crypto_code, 'channels'), payload: payload, options: opts)
end
Also aliased as: open_channels
open_channels(crypto_code, payload, **opts)
Alias for: open
pay(crypto_code, payload, **opts) click to toggle source

@see docs.btcpayserver.org/API/Greenfield/v1/#operation/InternalLightningNodeApi_PayInvoice

# File lib/btcpay/client/api/lightning_node.rb, line 48
def pay(crypto_code, payload, **opts)
  client.post(path(crypto_code, 'invoices', 'pay'), payload: payload, options: opts)
end
Also aliased as: pay_invoice
pay_invoice(crypto_code, payload, **opts)
Alias for: pay

Protected Instance Methods

set_base_path() click to toggle source
# File lib/btcpay/client/api/lightning_node.rb, line 61
def set_base_path
  @base_path = PATH
end