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.
1
fc::variant_object graphene::app::network_node_api:get_info()const
Copied!

get_connected_peers

Get status of all current connections to peers.
1
std::vector<net::peer_status> graphene::app::network_node_api::get_connected_peers()const
Copied!

get_potential_peers

Return list of potential peers.
1
std::vector<net::potential_peer_record> graphene::app::network_node_api::get_potential_peers()const
Copied!

get_advanced_node_parameters

Get advanced node parameters, such as desired and max number of connections.
1
fc::variant_object graphene::app::network_node_api::get_advanced_node_parameters()const
Copied!

Change Network Settings

add_node

Connect to a new peer
1
void graphene::app::network_node_api::add_node(
2
const fc::ip::endpoint &ep)
Copied!
Parameters
  • 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.
1
void graphene::app::network_node_api::set_advanced_node_parameters(
2
const fc::variant_object &params)
Copied!
Parameters
  • params: a JSON object containing the name/value pairs for the parameters to set