import { Discv5 } from '@chainsafe/discv5'; import { HistoryNetwork } from '../networks/history/history.js'; import { BeaconLightClientNetwork, NetworkId, StateNetwork } from '../networks/index.js'; import { PortalNetworkUTP } from '../wire/utp/PortalNetworkUtp/index.js'; import { DBManager } from './dbManager.js'; import { ETH } from './eth.js'; import type { PortalNetworkEventEmitter, PortalNetworkMetrics, PortalNetworkOpts } from './types.js'; import type { BaseNetwork } from '../networks/network.js'; import type { INodeAddress } from '@chainsafe/discv5/lib/session/nodeInfo.js'; import type { ENR } from '@chainsafe/enr'; import type { Debugger } from 'debug'; declare const PortalNetwork_base: new () => PortalNetworkEventEmitter; export declare class PortalNetwork extends PortalNetwork_base { eventLog: boolean; discv5: Discv5; networks: Map; uTP: PortalNetworkUTP; db: DBManager; bootnodes: string[]; metrics: PortalNetworkMetrics | undefined; logger: Debugger; ETH: ETH; private refreshListeners; private peerId; private supportsRendezvous; private unverifiedSessionCache; static create: (opts: Partial) => Promise; /** * * Portal Network constructor * @param opts a dictionary of `PortalNetworkOpts` */ constructor(opts: PortalNetworkOpts); /** * Starts the portal network client */ start: () => Promise; /** * Stops the portal network client and cleans up listeners */ stop: () => Promise; network: () => { [NetworkId.HistoryNetwork]: HistoryNetwork | undefined; [NetworkId.StateNetwork]: StateNetwork | undefined; [NetworkId.BeaconLightClientNetwork]: BeaconLightClientNetwork | undefined; }; /** * * @param namespaces comma separated list of logging namespaces * defaults to "*Portal*,*uTP*" */ enableLog: (namespaces?: string) => void; /** * Store node details in DB for node restart */ storeNodeDetails: () => Promise; private onTalkReq; private onTalkResp; /** * * @param srcId nodeID that uTP packet originates from * @param msgId uTP message ID * @param packetBuffer uTP packet encoded to Buffer */ private handleUTP; /** * * @param dstId `NodeId` of message recipient * @param payload `Buffer` serialized payload of message * @param networkId subnetwork ID of subnetwork message is being sent on * @returns response from `dstId` as `Buffer` or null `Buffer` */ sendPortalNetworkMessage: (enr: ENR | string, payload: Uint8Array, networkId: NetworkId, utpMessage?: boolean) => Promise; sendPortalNetworkResponse: (src: INodeAddress, requestId: bigint, payload: Uint8Array) => Promise; } export {}; //# sourceMappingURL=client.d.ts.map