In Corestore, we store a core's name/namespace (used for key generation) in Hypercore's new userData header field.
If you first create a core by name (i.e. corestore.get({ name: 'main' })), then you close/reopen the store, and then get it by public key (i.e. corestore.get(key)), the core will not be writable, since the name is the write capability.
With this change, Corestore can attempt to load a name/namespace and do key generation during Hypercore.open, so the name is no longer the write capability.
In Corestore, we store a core's name/namespace (used for key generation) in Hypercore's new
userData
header field.If you first create a core by name (i.e.
corestore.get({ name: 'main' })
), then you close/reopen the store, and then get it by public key (i.e.corestore.get(key)
), the core will not be writable, since thename
is the write capability.With this change, Corestore can attempt to load a name/namespace and do key generation during
Hypercore.open
, so thename
is no longer the write capability.