Closed RangerMauve closed 1 year ago
We've got this for hypercore. You can also use GET hyper://localhost?key=KEY_NAME
to get the full URL and POST hyper://localhost?key=KEY_NAME
to create a new key. It will error out if you try to GET a key that hasn't been created.
Still need to figure out for mutable torrents I think.
This is the case now in version 2.0+ :)
At the moment a bunch of Agregore's protocol handlers support "petnames" where you can make up a custom name and place it in the hostname of a p2p protocol to generate a custom keypair with an alias.
e.g.
hyper://example
will generate ahyper://PUBLIC_KEY
url under the hood fromexample
and your master key. This is useful for auto-generating websites just by navigating to a URL, but it will conflict with situations wherehyper://example
might be a valid DNS name for something like Handshake and is somewhat blocking adoption of #77In js-ipfs-fetch we solved this by using
POST ipns://localhost?key=KEY_NAME
which will return aipns://PUBLIC_KEY_HERE
URL. Similarly you can resolve an existing key withGET ipns://localhost/?key=KEY_NAME
.I've started tracking this for hypercore-fetch here: https://github.com/RangerMauve/hypercore-fetch/issues/29
Should also adopt it for mutable torrents in bt-fetch