multiformats/go-multihash

Split core types into a core subpackage

Closed this issue · 1 comments

Currently, the core Multihash type and the Sum function are defined in the same package. This means anyone who wants to import the type also needs to import the sum function, pulling in all the hashing libraries at the same time.

Instead, we should:

  • Split the core types/functions into a core sub package.
  • Add type aliases in the root package to the types moved to the core package.
  • Keep Sum in the root package.

That way, packages that depend on these types can directly import the core package, reducing binary size.

Replaces #78.

I believe this is now closed by #136 🎉

(If there's additional specific work this didn't cover yet, it probably could use a fresh issue to enumerate it.)