-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
I've been thinking about how to make it easy to add in new ipns resolvers to ipfs.
@llopv implemented a namecoin resolver here: ipfs/notes#41 (comment) and i'm thinking we can make it easier than hacking the namesys code.
My proposal is to have a config section for the resolver that could look something like:
"Ipns": {
"Plugins": [
{
"name": "namecoin",
"match": "^*.bit$",
}
]
}This would register a new ipns resolve called 'namecoin', and upon trying to resolve a name that matches the regex in 'match', would look for a binary at $IPFS_PATH/resolvers/ipns-namecoin and execute it with the argument of the name being resolved. The binary could return either just the resolved value, or maybe the value along with some extra information like a ttl
This way, users could write a (for example) namecoin resolver as a simple binary, and ipfs would require no modifications to be able to use it.
A lot of things for this need to be thought through, primarily security, and the implications of having different resolvers all over, people might end up passing ipns paths that others cant actually resolve.