New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ens-ipfs-resolver

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ens-ipfs-resolver

Content resolver for Ethereum name service

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ENS IPFS resolver

This package provides an api and an executable which resolves the content hash of an ENS domain. It uses local Ethereum- and IPFS nodes if available and otherwise defaults to public gateways.

Installation

npm i -g ens-ipfs-resolver

API

To import and create a resolver object:

const ensIpfsResolver = require('ens-ipfs-resolver')
let resolver = new ensIpfsResolver([options])

The default options are:

{
  ethPort: 8545,
  ipfsPort: 8080
}

resolver.ensToUrl(name : string) : Promise

resolver.ensToUrl("raksooo.eth")
  .then(console.log)
// output: http://localhost:8080/ipfs/QmWeSMxMWpsrsJdBU6Zqc6DXZEf4WXHkPzBAdmPjmmHUna

resolver.ensToIpfsHash(name : string) : Promise

resolver.ensToIpfsHash("raksooo.eth")
  .then(console.log)
// output: QmWeSMxMWpsrsJdBU6Zqc6DXZEf4WXHkPzBAdmPjmmHUna

Executable

Usage: ensipfs [options] <domain>

  Options:
    -e, --eth-rpc-port <n>  
    -i, --ipfs-port <n>     
    -h, --help

Example

$ ensipfs raksooo.eth
http://localhost:8080/ipfs/QmWeSMxMWpsrsJdBU6Zqc6DXZEf4WXHkPzBAdmPjmmHUna

Keywords

FAQs

Package last updated on 17 Dec 2017

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