All Projects → unstoppabledomains → resolution

unstoppabledomains / resolution

Licence: MIT license
A library to resolve blockchain domain names.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to resolution

SRGAN-PyTorch
A simple and complete implementation of super-resolution paper.
Stars: ✭ 266 (+40%)
Mutual labels:  resolution
gini
A fast SAT solver
Stars: ✭ 139 (-26.84%)
Mutual labels:  resolution
ADios
ADBlocker - Block ADS on Twitch, Spotify and EVERYWHERE via the HOST File, PI-Hole, Adblocker Add-on, DNSMasq, Response Policy Zone and Adguard Services. - ADios ADS !
Stars: ✭ 73 (-61.58%)
Mutual labels:  domains
typeioc
Dependency injection container for typescript / javascript
Stars: ✭ 32 (-83.16%)
Mutual labels:  resolution
RFB ESRGAN-PyTorch
Simple realization of papers in oppo Research Institute super score competition.
Stars: ✭ 62 (-67.37%)
Mutual labels:  resolution
domainatrex
😈 A library for parsing TLDs from urls in Elixir
Stars: ✭ 29 (-84.74%)
Mutual labels:  domains
BetterDummy
Unlock your displays on your Mac! Smooth scaling, HiDPI unlock, XDR/HDR extra brightness upscale, DDC, brightness and dimming, dummy displays, PIP and lots more!
Stars: ✭ 9,601 (+4953.16%)
Mutual labels:  resolution
resolution-go
Golang library for resolving unstoppable domains
Stars: ✭ 24 (-87.37%)
Mutual labels:  resolution
homoglyphs
Homoglyphs: get similar letters, convert to ASCII, detect possible languages and UTF-8 group.
Stars: ✭ 70 (-63.16%)
Mutual labels:  domains
cie-cns-apache-docker
L'obiettivo di questo progetto è quello di fornire un template pronto all'uso che realizza un sistema di autenticazione tramite la Smart Card TS-CNS (o CNS) e la CIE (Carta d'Identità Elettronica) basato su Apache HTTP. Ognuno può poi modificare o specializzare questo progetto sulla base delle proprie esigenze Si tratta di un progetto docker per…
Stars: ✭ 48 (-74.74%)
Mutual labels:  cns
choco-screen-resolution
Sets the screen resolution on Windows virtual machines (VMs)
Stars: ✭ 24 (-87.37%)
Mutual labels:  resolution
domain-monitor
Self-hosted server to monitor WHOIS records for specified domains.
Stars: ✭ 36 (-81.05%)
Mutual labels:  domains
qt-quick-responsive-helper
A simple toolbar for QtQuick based applications, to let developers test different resolutions and dpi settings easily. It was made to be integrated with minimal effort (only one QML file), and to be configurable for your specific usage.
Stars: ✭ 26 (-86.32%)
Mutual labels:  resolution
ICU
An Extended, Modulair, Host Discovery Framework
Stars: ✭ 40 (-78.95%)
Mutual labels:  domains
ImageDownloader
A program for downloading and filtering images based on their resolution.
Stars: ✭ 60 (-68.42%)
Mutual labels:  resolution
domain exporter
Prometheus WHOIS domain details exporter.
Stars: ✭ 73 (-61.58%)
Mutual labels:  domains
libsrcnn
Super-Resolution imaging with Convolutional Neural Network library for G++, Non-OpenCV model.
Stars: ✭ 14 (-92.63%)
Mutual labels:  resolution
Psychic-CCTV
A video analysis tool built completely in python.
Stars: ✭ 21 (-88.95%)
Mutual labels:  resolution
ESRGAN-tensorflow
Enhanced SRGAN. Champion PIRM Challenge on Perceptual Super-Resolution
Stars: ✭ 33 (-82.63%)
Mutual labels:  resolution
resolutions-2019
A list of data mining and machine learning papers that I implemented in 2019.
Stars: ✭ 19 (-90%)
Mutual labels:  resolution

Resolution

NPM version CI Bundle Size Minified Bundle Size Minified Zipped Unstoppable Domains Documentation Get help on Discord

Resolution is a library for interacting with blockchain domain names. It can be used to retrieve payment addresses, IPFS hashes for decentralized websites, and GunDB usernames for decentralized chat.

Resolution is primarily built and maintained by Unstoppable Domains.

Resolution supports decentralized domains across three main zones:

  • Zilliqa Name Service (ZNS)

    • .zil
  • Unstoppable Name Service (UNS)

    • .crypto
    • .nft
    • .blockchain
    • .bitcoin
    • .coin
    • .wallet
    • .888
    • .dao
    • .x
    • ...

For more information, see our detailed API Referrence.

Installing Resolution

Resolution can be installed with either yarn or npm.

yarn add @unstoppabledomains/resolution
npm install @unstoppabledomains/resolution --save

If you're interested in resolving domains via the command line, see our CLI section.

Updating Resolution

Resolution can be updated with either yarn or npm.

yarn upgrade @unstoppabledomains/resolution --latest
npm update @unstoppabledomains/resolution --save

Using Resolution

Create a new project.

mkdir resolution && cd $_
yarn init -y
yarn add @unstoppabledomains/resolution

Look up a domain's crypto address

Create a new file in your project, address.js.

const {default: Resolution} = require('@unstoppabledomains/resolution');
const resolution = new Resolution();

function resolve(domain, currency) {
  resolution
    .addr(domain, currency)
    .then((address) => console.log(domain, 'resolves to', address))
    .catch(console.error);
}

function resolveMultiChain(domain, currency, chain) {
  resolution
    .multiChainAddr(domain, currency, chain)
    .then((address) => console.log(domain, 'resolves to', address, version))
    .catch(console.error);
}

resolve('brad.crypto', 'ETH');
resolve('brad.zil', 'ZIL');
resolveMultiChain('brad.crypto', 'USDT', 'ERC20');
resolveMultiChain('brad.crypto', 'USDT', 'OMNI');

Execute the script.

$ node address.js
brad.crypto resolves to 0x8aaD44321A86b170879d7A244c1e8d360c99DdA8
brad.zil resolves to zil1yu5u4hegy9v3xgluweg4en54zm8f8auwxu0xxj

Find the IPFS hash for a decentralized website

Create a new file in your project, ipfs_hash.js.

const {default: Resolution} = require('@unstoppabledomains/resolution');
const resolution = new Resolution();

function resolveIpfsHash(domain) {
  resolution
    .ipfsHash(domain)
    .then((hash) =>
      console.log(
        `You can access this website via a public IPFS gateway: https://gateway.ipfs.io/ipfs/${hash}`,
      ),
    )
    .catch(console.error);
}

resolveIpfsHash('homecakes.crypto');

Execute the script.

$ node ipfs_hash.js
You can access this website via a public IPFS gateway: https://gateway.ipfs.io/ipfs/QmVJ26hBrwwNAPVmLavEFXDUunNDXeFSeMPmHuPxKe6dJv

Find a custom record

Create a new file in your project, custom-resolution.js.

const {default: Resolution} = require('@unstoppabledomains/resolution');
const resolution = new Resolution();

function resolveCustomRecord(domain, record) {
  resolution
    .records(domain, [record])
    .then((value) => console.log(`Domain ${domain} ${record} is: ${value}`))
    .catch(console.error);
}

resolveCustomRecord('homecakes.crypto', 'custom.record.value');

Command Line Interface

CLI support was removed from the Resolution library starting from version 6.0. Please use the standalone CLI tool.

Default Ethereum Providers

Resolution provides zero-configuration experience by using built-in production-ready Alchemy endpoint by default.
Default Ethereum provider is free to use without restrictions and rate-limits for UNS resolution.

Custom Ethereum Provider configuration

You may want to specify a custom provider:

  • if you want to use a dedicated blockchain node
  • if you want to monitor app usage
  • if you already have a provider in your app to re-use it for domain resolution

Default provider can be changed by changing constructor options new Resolution(options) or by using one of the factory methods:

  • Resolution.alchemy()
  • Resolution.infura()
  • Resolution.fromWeb3Version1Provider()
  • Resolution.fromEthersProvider()
  • etc.

To see all constructor options and factory methods check Unstoppable API reference.

const {default: Resolution} = require('@unstoppabledomains/resolution');

const ethereumProviderUrl = ALCHEMY_ETHEREUM_API;
const polygonProviderUrl = ALCHEMY_POLYGON_API;

// custom provider config using the `Resolution` constructor options
const resolution = new Resolution({
    sourceConfig: {
      uns: {
        locations: {
          Layer1: {
            url: ethereumProviderUrl,
            network: 'mainnet'
          },
          Layer2: {
            url: polygonProviderUrl,
            network: 'polygon-mainnet',
          },
        },
      },
    },
  });

Autoconfiguration of blockchain network

In some scenarios system might not be flexible enough to easy distinguish between various Ethereum testnets on compile time. For this case Resolution library provide a special async constructor which should be waited for await Resolution.autonetwork(options). This method makes a JSON RPC "net_version" call to the provider to get the network id.

This method configures only Uns. Zns is supported only on Zilliqa mainnet which is going to be used in any cases. You can provide a configured provider or a blockchain url as in the following example:

await Resolution.autonetwork({
  uns: {provider},
});

Error Handling

When resolution encounters an error it returns the error code instead of stopping the process. Keep an eye out for return values like RECORD_NOT_FOUND.

Development

Use these commands to set up a local development environment (macOS Terminal or Linux shell).

  1. Install nvm

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
  2. Install concrete version of node.js

    nvm install 12.12.0
  3. Install yarn

    npm install -g yarn
  4. Clone the repository

    git clone https://github.com/unstoppabledomains/resolution.git
    cd resolution
  5. Install dependencies

    yarn install

Internal config

To update:

  • Network config: $ yarn network-config:pull
  • Resolver keys: $ yarn resolver-keys:pull
  • Both configs: $ yarn config:pull

Free advertising for integrated apps

Once your app has a working Unstoppable Domains integration, register it here. Registered apps appear on the Unstoppable Domains homepage and Applications page — putting your app in front of tens of thousands of potential customers per day.

Also, every week we select a newly-integrated app to feature in the Unstoppable Update newsletter. This newsletter is delivered to straight into the inbox of ~100,000 crypto fanatics — all of whom could be new customers to grow your business.

Get help

Join our discord community and ask questions.

Help us improve

We're always looking for ways to improve how developers use and integrate our products into their applications. We'd love to hear about your experience to help us improve by taking our survey.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].