Class: Hodl::Lightning::Server

Inherits:
Object
  • Object
show all
Includes:
Server::Services
Defined in:
lib/hodl/server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Server::Services

#abandon_channel, #add_invoice, #channel_balance, #close_channel, #closed_channels, #connect_peer, #decode_pay_req, #delete_all_payments, #disconnect_peer, #fee_report, #get_chan_info, #get_info, #get_network_info, #get_node_info, #get_transactions, #list_channels, #list_invoices, #list_payments, #list_peers, #list_unspent, #lookup_invoice, #new_address, #open_channel, #pending_channels, #query_routes, #send_coins, #send_many, #send_payment_sync, #stop_daemon, #update_channel_policy, #wallet_balance

Constructor Details

#initialize(tls_cert_path: nil, host: nil, port: nil, macaroon_path: nil) ⇒ Server

Returns a new instance of Server.



18
19
20
21
22
23
24
25
# File 'lib/hodl/server.rb', line 18

def initialize(tls_cert_path: nil, host: nil, port: nil, macaroon_path: nil)
  @tls_cert_path = tls_cert_path || Hodl::Lightning.configuration.tls_cert_path
  @macaroon_path = macaroon_path || Hodl::Lightning.configuration.macaroon_path
  @host          = host          || Hodl::Lightning.configuration.host
  @port          = port          || Hodl::Lightning.configuration.port

  @stub          = stub          || start_server
end

Instance Attribute Details

#hostObject

Returns the value of attribute host.



14
15
16
# File 'lib/hodl/server.rb', line 14

def host
  @host
end

#macaroon_pathObject

Returns the value of attribute macaroon_path.



13
14
15
# File 'lib/hodl/server.rb', line 13

def macaroon_path
  @macaroon_path
end

#portObject

Returns the value of attribute port.



15
16
17
# File 'lib/hodl/server.rb', line 15

def port
  @port
end

#stubObject

Returns the value of attribute stub.



16
17
18
# File 'lib/hodl/server.rb', line 16

def stub
  @stub
end

#tls_cert_pathObject

Returns the value of attribute tls_cert_path.



12
13
14
# File 'lib/hodl/server.rb', line 12

def tls_cert_path
  @tls_cert_path
end