The core LibP2P Interfaces / Protocols and Abstractions backing the swift-libp2p project
LibP2PCore is a repository / dependency that houses the building blocks for swift-libp2p.
- For more information check out the LibP2P Spec
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"),
]),
...
...
)
check out the tests for more examples
import LibP2PCore
// You now have access to thing like PeerID, Multiaddr, Connections, Swift-NIO, etc...
Not Applicable
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! 🤝
MIT © 2022 Breth Inc.