Giter Club home page Giter Club logo

dns's Introduction

@web4/dns

Advanced resolving of decentralized web links using different name systems such as DNS Txt entries and .well-known https lookups locations. It implements various naming systems such as dat, bit and cabal but is extensible to support other systems as well.

πŸš€ Basic API

After installing it through [npm][@web4], you can simply run it like this:

const { resolveProtocol, resolve, resolveURL } = require('@web4/dns')
const protocol = 'bit'
const domain = 'social.x'
const key = await resolveProtocol(protocol, domain)

Note: You may need to wrap it in a async function until top level async/await lands.

That's it! πŸŽ‰ - in the key variable you will get the bit key or null, if it can't be found.

πŸ§™β€β™€οΈ What is this magic?

Different decentralized web systems have different means to resolve "names" to a decentralized document.

@web4/dns contains a variety of implementations. Many are using DNS TXT records that contain a key of specified pattern, but other means are possible as well. βˆ’ (more in the Protocol Guide)

The power of @web4/dns in comparison to other, protocol-specific implementations is that it has a shared cache for all protocols, it works in he browser and does a list of things well. βˆ’ (more in the Architecture Overview)

πŸ‘©β€πŸŽ“ Further reading

πŸ“œ License

MIT License

dns's People

Contributors

martinheidegger avatar jwerle avatar neothawreww avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.