Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dnslink

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dnslink

Resolve dnslink TXT records for domains

  • 0.2.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 31 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc