Add delete metadata so delete ops have a fixed seq
If tracking a hypercore that is a hypertrie for changes, it's easy to track all put operations. However, deletes are not clearly identifieable from the log because they are (quoting mafintosh): "puts with a hash distance nearby key. You can’t trivially identity them with the differ".
For kappa-core style usecases things are much easier if each operation has a fixed sequence number by which it can be addressed and indexed. If deletes in Hypertrie were Nodes with the deleted key plus a deleted flag, that would be straightforward (which it is not at the moment).
So the hypercore in hypertrie does not contain operations but just pointers to the current trie. That’s why deletes looks like puts cause it’s all just updated pointers.
To make it easier to identify I’m down to introduce a .deletes number that’s a seq to the entry this node deletes or 0 otherwise.
If anyone wants to volunteer a PR for that it’s appreciated otherwise we’ll get to it at some point
I don't think adding that would be much harder than adding https://github.com/hypercore-protocol/hypertrie/blob/master/lib/put.js#L31 to the node when it's written + some tests