Enhanced features for new rust libraries
This commit is contained in:
@@ -43,6 +43,9 @@ export interface ProtocolHandler {
|
||||
export interface ILibp2pComponent {
|
||||
peerId: PeerId | null;
|
||||
multiaddrs: Multiaddr[];
|
||||
isStarted: boolean;
|
||||
isStarting: boolean;
|
||||
error: string | null;
|
||||
|
||||
start(): Promise<void>;
|
||||
stop(): Promise<void>;
|
||||
@@ -52,6 +55,9 @@ export interface ILibp2pComponent {
|
||||
sendProtocolData(peerId: string, protocolId: string, data: Uint8Array): Promise<void>;
|
||||
refreshDiscovery(): Promise<void>;
|
||||
pingPeer(peerId: string): Promise<{ success: boolean; rtt?: number; peerId: string }>;
|
||||
acceptConnection(peerId: string): Promise<void>;
|
||||
rejectConnection(peerId: string): Promise<void>;
|
||||
cleanup(): void;
|
||||
|
||||
addEventListener<K extends keyof Libp2pEvents>(
|
||||
event: K,
|
||||
|
||||
Reference in New Issue
Block a user