[ipfs/go-bitswap] Docs On Initializing And Using Bitswap In Readme
- Dominant language
- Go
- Stars
- 316
- Forks
- 163
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 8
Description
It would be great to demonstrate how to setup and use bitswap in the Readme.
This would include initialization:
- creating a libp2p host (can use mocknet for example purposes)
- setting up a bitswap network interface (from Libp2p host -- see network/ipfs_impl.go)
- initializing a blockstore
- creating an instance of bitswap from context, blockstore, and network interface
(may want to look at GraphSync README for model for this part) (github.com/ipfs/go-graphsync)
Use Bitswap, Including:
- Request a block with GetBlock
- Request multiple blocks with GetBlocks
- Indicate you have a block with HasBlock
- Get information with WantlistForPeer / LedgerForPeer
- Create a Session (w/ NewSession)
- GetBlocks from a session
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.