0.2.8 • Published 5 years ago

dnslink v0.2.8

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

dnslink Build Status npm npm type definitions

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/QmStyTZJJugmdFub1GBBGhtXpwxghT4EGvBCz8jNSLdBcy
Unable to find dnslink record, creating a new one
DNS record updated

JS/TS

import { update } from 'dnslink';

// async/await
await update('commontheory.io', '/ipfs/QmStyTZJJugmdFub1GBBGhtXpwxghT4EGvBCz8jNSLdBcy');

// promises
update('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

import { resolve } from 'dnslink';

// async/await
const cid = await resolve('commontheory.io');

// promises
resolve('commontheory.io')
  .then(cid => /* Your logic */);

Note

This package is not maintained by, or affiliated with IPFS or Protocol Labs.

0.2.8

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago