Currently, it looks like there's no way to differentiate between a Hyperdrive, regular Hypertrie, or some sort of MountableHypertrie.
This could make things hard for dynamic logic based on the type of a hypercore in stuff like pinning services.
I propose modifying the setMetadata method in hypertrie and mountable-hypertrie to accept an additional type parameter which we could use to pass the type into.
I think this will also help for when we have additional datastructures built on top of hypertrie in the ecosystem.
Alternately, would it make sense to add a subtype to the header to specify the additional type that's building on top of the hypertrie?
Currently, it looks like there's no way to differentiate between a Hyperdrive, regular Hypertrie, or some sort of MountableHypertrie.
This could make things hard for dynamic logic based on the
type
of a hypercore in stuff like pinning services.I propose modifying the
setMetadata
method inhypertrie
andmountable-hypertrie
to accept an additionaltype
parameter which we could use to pass the type into.I think this will also help for when we have additional datastructures built on top of hypertrie in the ecosystem.
Alternately, would it make sense to add a
subtype
to the header to specify the additionaltype
that's building on top of thehypertrie
?Refs: