hypercore-protocol / hypercore-next

Hypercore 10 is an append only log with multi-writer primitives built in.
MIT License
150 stars 15 forks source link

Expose header.userData through getter/setter/constructor #30

Closed andrewosh closed 3 years ago

andrewosh commented 3 years ago

Adds support for getting/setting KV records in the header's userData field through both a constructor option, and the new getUserData and setUserData methods.

Also adds the tmp-promise dependency, as this PR adds a test for persistent behavior (where a Hypercore is reopened).