interface LocalPeersEvents {
    discovery-key: ((discoveryKey: Buffer, protomux: Protomux<NoiseSecretStream<Duplex<any, any, any, any, true, true, DuplexEvents<any, any>>>>) => void);
    failed-to-handle-message: ((messageType: string, errorMessage?: string) => void);
    got-project-details: ((peerId: string, details: ProjectJoinDetails) => void);
    invite: ((peerId: string, invite: Invite) => void);
    invite-cancel: ((peerId: string, invite: InviteCancel) => void);
    invite-response: ((peerId: string, inviteResponse: InviteResponse) => void);
    peer-add: ((peer: PeerInfoConnected) => void);
    peers: ((peers: PeerInfo[]) => void);
}

Properties

discovery-key: ((discoveryKey: Buffer, protomux: Protomux<NoiseSecretStream<Duplex<any, any, any, any, true, true, DuplexEvents<any, any>>>>) => void)

Emitted when a new hypercore is replicated (by a peer) to a peer protomux instance (passed as the second parameter)

failed-to-handle-message: ((messageType: string, errorMessage?: string) => void)

Emitted when we received a message we couldn't handle for some reason. Primarily useful for testing

got-project-details: ((peerId: string, details: ProjectJoinDetails) => void)

Emitted when project details are received

invite: ((peerId: string, invite: Invite) => void)

Emitted when an invite is received

invite-cancel: ((peerId: string, invite: InviteCancel) => void)

Emitted when we receive a cancelation for an invite

invite-response: ((peerId: string, inviteResponse: InviteResponse) => void)

Emitted when an invite response is received

peer-add: ((peer: PeerInfoConnected) => void)

Emitted when a new peer is connected

peers: ((peers: PeerInfo[]) => void)

Emitted whenever the connection status of peers changes. An array of peerInfo objects with a peer id and the peer connection status