The core LibP2P Interfaces / Protocols and Abstractions backing the swift-libp2p project

LibP2PCore

The core LibP2P Interfaces / Protocols and Abstractions backing the swift-libp2p project

Overview

LibP2PCore is a repository / dependency that houses the building blocks for swift-libp2p.

Note:

Install

Include the following dependency in your Package.swift file

let package = Package(
    ...
    dependencies: [
        ...
        .package(name: "LibP2PCore", url: "https://github.com/swift-libp2p/swift-libp2p-core.git", .upToNextMajor(from: "0.0.1"))
    ],
        ...
        .target(
            ...
            dependencies: [
                ...
                .product(name: "LibP2PCore", package: "swift-libp2p-core"),
            ]),
        ...
    ...
)

Usage

Example

check out the tests for more examples

import LibP2PCore

// You now have access to thing like PeerID, Multiaddr, Connections, Swift-NIO, etc...

API

Not Applicable

Contributing

Contributions are welcomed! This code is very much a proof of concept. I can guarantee you there’s a better / safer way to accomplish the same results. Any suggestions, improvements, or even just critques, are welcome!

Let’s make this code better together! ?

Credits

License

MIT © 2022 Breth Inc.

GitHub

View Github