Network Nodes API

The network node API is available from the full node via web-sockets.

Obtain Network Information

get_info

Return general network information, such as p2p port.

fc::variant_object graphene::app::network_node_api:get_info()const

get_connected_peers

Get status of all current connections to peers.

std::vector<net::peer_status> graphene::app::network_node_api::get_connected_peers()const

get_potential_peers

Return list of potential peers.

std::vector<net::potential_peer_record> graphene::app::network_node_api::get_potential_peers()const

get_advanced_node_parameters

Get advanced node parameters, such as desired and max number of connections.

fc::variant_object graphene::app::network_node_api::get_advanced_node_parameters()const

Change Network Settings

add_node

Connect to a new peer

void graphene::app::network_node_api::add_node(
    const fc::ip::endpoint &ep)
  • ep: The IP/Port of the peer to connect to

set_advanced_node_parameters

Set advanced node parameters, such as desired and max number of connections.

void graphene::app::network_node_api::set_advanced_node_parameters(
    const fc::variant_object &params)
  • params: a JSON object containing the name/value pairs for the parameters to set

Last updated