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.
Currently, the core
Multihash
type and theSum
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:
core
sub package.core
package.Sum
in the root package.That way, packages that depend on these types can directly import the
core
package, reducing binary size.Replaces #78.