libp2p
    Preparing search index...

    Module @libp2p/interface

    Exports a Libp2p type for modules to use as a type argument.

    import type { Libp2p } from '@libp2p/interface'

    function doSomethingWithLibp2p (node: Libp2p) {
    // ...
    }

    @libp2p/interface

    libp2p.io Discuss codecov CI

    The interface implemented by a libp2p node

    About

    Exports a Libp2p type for modules to use as a type argument.

    import type { Libp2p } from '@libp2p/interface'

    function doSomethingWithLibp2p (node: Libp2p) {
    // ...
    }

    Install

    $ npm i @libp2p/interface
    

    API Docs

    License

    Licensed under either of

    Contribution

    Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

    Enumerations

    FaultTolerance
    TopicValidatorResult

    Classes

    AbortError
    AlreadyStartedError
    ConnectionClosedError
    ConnectionClosingError
    ConnectionFailedError
    DialError
    InvalidCIDError
    InvalidCryptoExchangeError
    InvalidMessageError
    InvalidMultiaddrError
    InvalidMultihashError
    InvalidParametersError
    InvalidPeerIdError
    InvalidPrivateKeyError
    InvalidPublicKeyError
    LimitedConnectionError
    ListenError
    MuxerClosedError
    NotFoundError
    NotImplementedError
    NotStartedError
    ProtocolError
    StreamResetError
    StreamStateError
    TimeoutError
    TooManyInboundProtocolStreamsError
    TooManyOutboundProtocolStreamsError
    TypedEventEmitter
    UnexpectedPeerError
    UnsupportedKeyTypeError
    UnsupportedOperationError
    UnsupportedProtocolError

    Interfaces

    AbortOptions
    Address
    AddressSorter
    CalculatedHistogramOptions
    CalculatedMetricOptions
    CalculatedSummaryOptions
    ClearableSignal
    ComponentLogger
    Connection
    ConnectionEncrypter
    ConnectionGater
    ConnectionLimits
    ConnectionProtector
    ConnectionTimeline
    ContentRouting
    ContentRoutingProvider
    Counter
    CounterGroup
    CreateListenerOptions
    DialOptions
    DialProtocolOptions
    DialTransportOptions
    ECDSAPrivateKey
    ECDSAPublicKey
    Ed25519PeerId
    Ed25519PrivateKey
    Ed25519PublicKey
    Envelope
    EventCallback
    EventObject
    Histogram
    HistogramGroup
    HistogramOptions
    IdentifyResult
    IncomingStreamData
    IsDialableOptions
    Libp2p
    Libp2pEvents
    Listener
    ListenerEvents
    Logger
    LoggerOptions
    Metric
    MetricGroup
    MetricOptions
    Metrics
    MultiaddrConnection
    MultiaddrConnectionTimeline
    MultiaddrFilter
    NewStreamOptions
    NodeInfo
    Peer
    PeerData
    PeerDiscovery
    PeerDiscoveryEvents
    PeerDiscoveryProvider
    PeerInfo
    PeerQuery
    PeerQueryFilter
    PeerQueryOrder
    PeerRouting
    PeerRoutingProvider
    PeerStore
    PeerStreamEvents
    PeerStreams
    PeerUpdate
    PendingDial
    PublishResult
    PubSub
    PubSubEvents
    PubSubInit
    PubSubRPC
    PubSubRPCMessage
    PubSubRPCSubscription
    Record
    RoutingOptions
    RSAPeerId
    RSAPrivateKey
    RSAPublicKey
    Secp256k1PeerId
    Secp256k1PrivateKey
    Secp256k1PublicKey
    SecureConnectionOptions
    SecuredConnection
    SignedMessage
    SignedPeerRecord
    Startable
    StopTimer
    Stream
    StreamHandler
    StreamHandlerOptions
    StreamHandlerRecord
    StreamMuxer
    StreamMuxerFactory
    StreamMuxerInit
    StreamTimeline
    Subscription
    SubscriptionChangeData
    Summary
    SummaryGroup
    SummaryOptions
    Tag
    TagOptions
    TLSCertificate
    TopicValidatorFn
    Topology
    TopologyFilter
    TraceFunctionOptions
    TraceGeneratorFunctionOptions
    TraceOptions
    Transport
    TypedEventTarget
    UnsignedMessage
    Upgrader
    UpgraderOptions
    URLPeerId

    Type Aliases

    CalculateMetric
    ConnectionStatus
    Direction
    EventHandler
    InboundConnectionUpgradeEvents
    KeyType
    Libp2pStatus
    Message
    OpenConnectionProgressEvents
    OutboundConnectionUpgradeEvents
    PeerId
    PeerIdType
    PendingDialStatus
    PrivateKey
    PublicKey
    ReadStatus
    ServiceMap
    SignaturePolicy
    StreamStatus
    TraceAttributes
    TransportManagerDialProgressEvents
    WriteStatus
    YieldType

    Variables

    connectionSymbol
    contentRoutingSymbol
    KEEP_ALIVE
    peerDiscoverySymbol
    peerIdSymbol
    peerRoutingSymbol
    pubSubSymbol
    serviceCapabilities
    serviceDependencies
    setMaxListeners
    StrictNoSign
    StrictSign
    transportSymbol

    Functions

    isConnection
    isPeerId
    isPrivateKey
    isPublicKey
    isPubSub
    isStartable
    isTransport
    start
    stop