@libp2p/interface
Version:
The interface implemented by a libp2p node
21 lines • 596 B
JavaScript
/**
* Any object that implements this Symbol as a property should return a
* PeerDiscovery instance as the property value, similar to how
* `Symbol.Iterable` can be used to return an `Iterable` from an `Iterator`.
*
* @example
*
* ```TypeScript
* import { peerDiscovery, PeerDiscovery } from '@libp2p/peer-discovery'
*
* class MyPeerDiscoverer implements PeerDiscovery {
* get [peerDiscovery] () {
* return this
* }
*
* // ...other methods
* }
* ```
*/
export const peerDiscoverySymbol = Symbol.for('@libp2p/peer-discovery');
//# sourceMappingURL=peer-discovery.js.map