
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
github.com/aarshkshah1992/go-ipld-prime
Advanced tools
go-ipld-prime is an implementation of the IPLD spec interfaces,
a batteries-included codec implementations of IPLD for CBOR and JSON,
and tooling for basic operations on IPLD objects (traversals, etc).
The API is split into several packages based on responsibly of the code. The most central interfaces are the base package, but you'll certainly need to import additional packages to get concrete implementations into action.
Roughly speaking, the core package interfaces are all about the IPLD Data Model;
the codec/* packages contain functions for parsing serial data into the IPLD Data Model,
and converting Data Model content back into serial formats;
the traversal package is an example of higher-order functions on the Data Model;
concrete ipld.Node implementations ready to use can be found in packages in the node/* directory;
and several additional packages contain advanced features such as IPLD Schemas.
(Because the codecs, as well as higher-order features like traversals, are implemented in a separate package from the core interfaces or any of the Node implementations, you can be sure they're not doing any funky "magic" -- all this stuff will work the same if you want to write your own extensions, whether for new Node implementations or new codecs, or new higher-order order functions!)
github.com/ipld/go-ipld-prime -- imported as just ipld -- contains the core interfaces for IPLD. The most important interfaces are Node, NodeBuilder, Path, and Link.github.com/ipld/go-ipld-prime/node/basic -- imported as basicnode -- provides concrete implementations of Node and NodeBuilder which work for any kind of data.github.com/ipld/go-ipld-prime/traversal -- contains higher-order functions for traversing graphs of data easily.github.com/ipld/go-ipld-prime/traversal/selector -- contains selectors, which are sort of like regexps, but for trees and graphs of IPLD data!github.com/ipld/go-ipld-prime/codec/dagcbor -- implementations of marshalling and unmarshalling as CBOR (a fast, binary serialization format).github.com/ipld/go-ipld-prime/codec/dagjson -- implementations of marshalling and unmarshalling as JSON (a popular human readable format).github.com/ipld/go-ipld-prime/linking/cid -- imported as cidlink -- provides concrete implementations of Link as a CID. Also, the multicodec registry.github.com/ipld/go-ipld-prime/schema -- contains the schema.Type and schema.TypedNode interface declarations, which represent IPLD Schema type information.github.com/ipld/go-ipld-prime/node/typed -- provides concrete implementations of schema.TypedNode which decorate a basic Node at runtime to have additional features described by IPLD Schemas.The IPLD specifications are designed to be language-agnostic. Many implementations exist in a variety of languages.
For overall behaviors and specifications, refer to the specs repo: https://github.com/ipld/specs/
This library ("go ipld prime") is the current head of development for golang IPLD, but several other libraries exist which are widely deployed.
This library is a clean take on the IPLD interfaces and addresses several design decisions very differently than existing libraries:
Many of these changes had been discussed for the other IPLD codebases as well, but we chose clean break v2 as a more viable project-management path. Both the existing IPLD libraries and go-ipld-prime can co-exist on the same import path, and refer to the same kinds of serial data. Projects wishing to migrate can do so smoothly and at their leisure.
There is no explicit deprecation timeline for the earlier golang IPLD libraries, but you should expect new features here, rather than in those libraries.
Be advised that faculties for dealing with unixfsv1 data are still limited. You can find some tools in the go-ipld-prime-proto repo, but be sure to read the caveats and limitations in that project's readme. We're happy to accept major PRs on this topic, though, if you who is reading this wants to fix this faster than wait for us :)
The go-ipld-prime library is already usable. We are also still in development, and may still change things.
A changelog can be found at CHANGELOG.md.
Using a commit hash when depending on this library is advisable (as it is with any other).
We may sometimes tag releases, but it's just as acceptable to track commits on master without the indirection.
The following are all norms you can expect of changes to this codebase:
master branch will not be force-pushed.
master branch.
None of this is to say we'll go breaking things willy-nilly for fun; but it is to say:
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.