0.0.1 • Published 8 years ago

ipfs-twitter-resolver v0.0.1

Weekly downloads
7
License
-
Repository
github
Last release
8 years ago

ipfs-twitter-resolver

tiny CLI server for resolving /twitter/user/key to an IPFS address

background

IPFS has a name resolution mechanism called IPNS, which will resolve addresses of the form /ipns/Qmfoobarbaz to an IPFS address, where Qmfoobarbaz is the multihash of a public key. These are generally resolved using a DHT. DHTs have many great properties, but long-term survivability is not one of them.

How swell would it be if you could make a tweet on Twitter like

blog = /ipfs/QmeV1kwh3333bsnT6YRfdCRrSgUPngKmAhhTa4RrqYPbKT

then hit a normal HTTP server on the URL http://example.com/twitter/noffle/blog to get redirected to that IPFS address? This is a pretty easy way to update the hash that say, a blog, points to.

example

$ npm install -g ipfs-twitter-resolver

$ ipfs-twitter-resolver &

$ curl -L http://localhost:8000/twitter/noffle/avatar
...
< HTTP/1.1 302 Found
< Location: https://ipfs.io/ipfs/QmdXZsi5GvsnKewXK35DypLxTzseR8tuVGyBLMQcBpEmMc/avatar.png
<

install

With npm installed, run

$ npm install -g ipfs-twitter-resolver

license

ISC