class Node::Peers
Public Instance Methods
connect(addr)
click to toggle source
# File lib/node.rb, line 130 def connect(addr) # TODO: Create utility function to separate pub_key and host from full adress r = addr.split("@") pubkey = r[0] host = r[1] address = Lnrpc::LightningAddress.new(pubkey: pubkey, host: host) stub.connect_peer(Lnrpc::ConnectPeerRequest.new(addr: address, perm: false)) end
describe_graph()
click to toggle source
# File lib/node.rb, line 149 def describe_graph stub.describe_graph(Lnrpc::ChannelGraphRequest.new()) end
disconnect(pub_key)
click to toggle source
# File lib/node.rb, line 141 def disconnect(pub_key) stub.disconnect_peer(Lnrpc::DisconnectPeerRequest.new(pub_key: pub_key)) end
get_node_info(pub_key)
click to toggle source
# File lib/node.rb, line 153 def get_node_info(pub_key) stub.get_node_info(Lnrpc::NodeInfoRequest.new(pub_key: pub_key)) end
list_peers()
click to toggle source
# File lib/node.rb, line 145 def list_peers stub.list_peers(Lnrpc::ListPeersRequest.new()) end