UNPKG

@libp2p/interface

Version:
56 lines 1.79 kB
/** * @packageDocumentation * * Exports a `Libp2p` type for modules to use as a type argument. * * @example * * ```typescript * import type { Libp2p } from '@libp2p/interface' * * function doSomethingWithLibp2p (node: Libp2p) { * // ... * } * ``` */ /** * This symbol is used by libp2p services to define the capabilities they can * provide to other libp2p services. * * The service should define a property with this symbol as the key and the * value should be a string array of provided capabilities. */ export const serviceCapabilities = Symbol.for('@libp2p/service-capabilities'); /** * This symbol is used by libp2p services to define the capabilities they * require from other libp2p services. * * The service should define a property with this symbol as the key and the * value should be a string array of required capabilities. */ export const serviceDependencies = Symbol.for('@libp2p/service-dependencies'); export * from './connection.js'; export * from './connection-encrypter.js'; export * from './connection-gater.js'; export * from './connection-protector.js'; export * from './content-routing.js'; export * from './errors.js'; export * from './events.js'; export * from './keys.js'; export * from './message-stream.js'; export * from './metrics.js'; export * from './multiaddr-connection.js'; export * from './peer-discovery.js'; export * from './peer-id.js'; export * from './peer-info.js'; export * from './peer-routing.js'; export * from './peer-store.js'; export * from './record.js'; export * from './startable.js'; export * from './stream-handler.js'; export * from './stream-muxer.js'; export * from './stream.js'; export * from './topology.js'; export * from './transport.js'; export * from 'main-event'; //# sourceMappingURL=index.js.map