dnslink
A javascript dnslink resolution implementation. See ipfs/go-dnslink for more information.
Usage
update
Command Line
Create a dnslink binding via digitalocean.
An environment variable called DIGITAL_OCEAN_TOKEN
should be set.
$ jsdnslink update commontheory.io /ipfs/QmStyTZJJugmdFub1GBBGhtXpwxghT4EGvBCz8jNSLdBcyUnable to find dnslink record, creating a new oneDNS record updated
JS/TS
; // async/awaitawait update'commontheory.io', '/ipfs/QmStyTZJJugmdFub1GBBGhtXpwxghT4EGvBCz8jNSLdBcy'; // promisesupdate'commontheory.io', '/ipfs/QmStyTZJJugmdFub1GBBGhtXpwxghT4EGvBCz8jNSLdBcy' .then/* Your logic */;
resolve
Get the CID associated with a domain. This evaluates via the DNS, not IPFS.
Command Line
$ jsdnslink resolve commontheory.io/ipfs/QmStyTZJJugmdFub1GBBGhtXpwxghT4EGvBCz8jNSLdBcy
JS/TS
; // async/await; // promisesresolve'commontheory.io' .then/* Your logic */;
Note
This package is not maintained by, or affiliated with IPFS or Protocol Labs.