ipfs / ipfs/boxo

[ipfs/go-bitswap] Docs On Initializing And Using Bitswap In Readme

Open
#110 1 comment 0 reactions 0 assignees View on GitHub
good first issue help wanted
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.