import Namespace from "./namespace"; import RPCClient from "../rpcclient"; /** * Manage the network related activities of a Node * * @export * @class Net * @extends {Namespace} */ export default class Net extends Namespace { /** * Creates an instance of Net. * * @param {RPCClient} client * @memberof Net */ constructor(client: RPCClient); /** * getActivePeers get all the peers * that are connected to the node * * @returns {Promise} * @memberof Net */ getActivePeers(): Promise; /** * Get all the peers that the peers * that is known to the node. * * @returns {Promise} * @memberof Net */ getPeers(): Promise; /** * Get the peers that the node will * regularly broadcast messages to. * * @returns {Promise} * @memberof Net */ getBroadcasters(): Promise; /** * Get the node's connection stats * * @returns {Promise} * @memberof Net */ getStats(): Promise; /** * Add a peer address to a node. * The node will attempt to connect * to this address when it needs more * connections. * * @param {string} peerAddress * @returns {Promise} * @memberof Net */ addPeer(peerAddress: string): Promise; /** * Delete all peers in memory and on disk * * @param {string} peerAddress * @returns {Promise} * @memberof Net */ dumpPeers(): Promise; /** * Connect to one or more addresses * immediately * * @param {Array} peerAddress array of addresses to be connected to * @returns {Promise} * @memberof Net */ join(peerAddress: Array): Promise; /** * Prevents inbound or outbound connections by * shutting down the client's network function. * @returns {Promise} * @memberof Net */ noNet(): Promise; }