Properties
addLibp2pEventListener
addLibp2pEventListener: (<K>(type, listener, options?) => void)
Type declaration
- <K>(type, listener, options?): void
Type Parameters
K extends keyof Libp2pEvents<ServiceMap>
Parameters
type: K
listener: null | EventHandler<Libp2pEvents<ServiceMap>[K]>
Optional
options: boolean | AddEventListenerOptions
Returns void
allPeers
allPeers: (() => Promise<Peer[]>)
Type declaration
- (): Promise<Peer[]>
Returns Promise<Peer[]>
connectedPeers
connectedPeers: (() => Promise<Peer[]>)
Type declaration
- (): Promise<Peer[]>
Returns Promise<Peer[]>
multicodec
multicodec: string
peerStore
peerStore: PeerStore
queryGenerator
queryGenerator: (<T>(decoders, options?) => AsyncGenerator<Promise<undefined | T>[], any, unknown>)
Type declaration
- <T>(decoders, options?): AsyncGenerator<Promise<undefined | T>[], any, unknown>
Returns AsyncGenerator<Promise<undefined | T>[], any, unknown>
queryWithOrderedCallback
queryWithOrderedCallback: (<T>(decoders, callback, options?) => Promise<void>)
Type declaration
- <T>(decoders, callback, options?): Promise<void>
Parameters
callback: ((message) => boolean | void | Promise<boolean | void>)
- (message): boolean | void | Promise<boolean | void>
Returns boolean | void | Promise<boolean | void>
Returns Promise<void>
queryWithPromiseCallback
queryWithPromiseCallback: (<T>(decoders, callback, options?) => Promise<void>)
Type declaration
- <T>(decoders, callback, options?): Promise<void>
Parameters
callback: ((message) => boolean | void | Promise<boolean | void>)
- (message): boolean | void | Promise<boolean | void>
Parameters
message: Promise<undefined | T>
Returns boolean | void | Promise<boolean | void>
Returns Promise<void>
removeLibp2pEventListener
removeLibp2pEventListener: {
<K>(type, listener?, options?): void;
(type, listener?, options?): void;
}
Type declaration
- <K>(type, listener?, options?): void
Type Parameters
K extends keyof Libp2pEvents<ServiceMap>
Parameters
type: K
Optional
listener: null | EventHandler<Libp2pEvents<ServiceMap>[K]>
Optional
options: boolean | EventListenerOptions
Returns void
- (type, listener?, options?): void
Parameters
type: string
Optional
listener: EventHandler<Event>
Optional
options: boolean | EventListenerOptions
Returns void