MCPcopy Index your code
hub / github.com/Peergos/ipfs-nucleus

github.com/Peergos/ipfs-nucleus @v0.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.0 ↗ · + Follow
132 symbols 379 edges 14 files 48 documented · 36%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

IPFS-Nucleus

IPFS-Nucleus is a minimal block daemon for IPLD based services. You could call it an IPLDaemon. It includes optional auth for retrieving blocks over bitswap.

It implements the following http api calls from IPFS: * id * block.get * block.put * block.has * block.stat * block.rm (only needed by GC) * refs.local (only needed by GC)

As well as implementing the p2p http proxy (incoming and outgoing).

New config options

  • Addresses.ProxyTarget - The incoming http proxy target
  • Addresses.AllowTarget - The api for allow calls when blocks are requested over bitswap - allow(cid, block data, source peer id, auth string) => boolean

It is designed as a drop in replacment for IPFS with the minimal functionality that Peergos needs to operate, including running an external GC. It includes support for leveldb datastore and flatfs and S3 based blockstores including bloomfilter based wrapping.

It will read its config from a prior existing ipfs config file if present, or create one with the relevant parameters. It uses a v0 blockstore (cids) rather than a v1 (multihashes).

The CLI supports the following sub-commands similar to ipfs: * init * config

Building

go build daemon/ipfs-nucleus.go

License

AGPL

Extension points exported contracts — how you extend this code

BlockGetter (Interface)
BlockGetter is the common interface shared between blockservice sessions and the blockservice. [1 implementers]
blockservice/blockservice.go
Listener (Interface)
Listener listens for connections and proxies them to a target [1 implementers]
p2p/listener.go
TypeLimitedBlockstore (Interface)
(no doc) [1 implementers]
blockstore/blockstore.go
BlockService (Interface)
BlockService is a hybrid block datastore. It stores data in a local datastore and may retrieve data from a remote Exchan [1 …
blockservice/blockservice.go

Core symbols most depended-on inside this repo

handleError
called by 8
api/api.go
isPost
called by 7
api/api.go
Close
called by 6
p2p/listener.go
BlockStore
called by 5
ipfs.go
GetBlock
called by 5
blockservice/blockservice.go
Register
called by 5
p2p/listener.go
HasBlock
called by 4
ipfs.go
key
called by 4
p2p/listener.go

Shape

Method 74
Function 38
Struct 16
Interface 4

Languages

Go100%

Modules by API surface

blockservice/blockservice.go23 symbols
blockstore/blockstore.go19 symbols
ipfs.go15 symbols
config/config.go15 symbols
p2p/listener.go11 symbols
api/api.go10 symbols
p2p/stream.go9 symbols
p2p/remote.go8 symbols
p2phttp/p2p_proxy.go5 symbols
p2p/p2p.go4 symbols
ipfs_test.go4 symbols
daemon/ipfs-nucleus.go4 symbols

For agents

$ claude mcp add ipfs-nucleus \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page