All Projects → unstoppabledomains → resolution-go

unstoppabledomains / resolution-go

Licence: MIT license
Golang library for resolving unstoppable domains

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to resolution-go

denarius
Denarius [$D] is a PoW/PoS Hybrid Cryptocurrency with Tribus a new PoW Hashing Algo built specifically for D, one of a kind hybrid masternodes called Fortuna Stakes, atomic swaps, staking, mining, IPFS, optional Native Tor and I2P, and much more!
Stars: ✭ 105 (+337.5%)
Mutual labels:  crypto
privatebin-cli
Privatebin CLI in NodeJS.
Stars: ✭ 31 (+29.17%)
Mutual labels:  crypto
sodium-wrapper
C++17 wrappers for libsodium
Stars: ✭ 15 (-37.5%)
Mutual labels:  crypto
haskell-spake2
SPAKE2 key exchange protocol for Haskell
Stars: ✭ 14 (-41.67%)
Mutual labels:  crypto
CryptionTool
一个CTF+渗透测试工具框架,集成常见加解密,密码、编码转换,端口扫描,字符处理等功能
Stars: ✭ 62 (+158.33%)
Mutual labels:  crypto
crypto-convert
Instantly convert cryptocurrency and get price information
Stars: ✭ 26 (+8.33%)
Mutual labels:  crypto
TensorTrade
This repository hosts all my code related to TensorTrade. It consists of the main program, its old versions, and some extras for more insights.
Stars: ✭ 16 (-33.33%)
Mutual labels:  crypto
ESRGAN-tensorflow
Enhanced SRGAN. Champion PIRM Challenge on Perceptual Super-Resolution
Stars: ✭ 33 (+37.5%)
Mutual labels:  resolution
ImageDownloader
A program for downloading and filtering images based on their resolution.
Stars: ✭ 60 (+150%)
Mutual labels:  resolution
ninjabot
A fast trading bot platform for cryptocurrency in Go (Binance)
Stars: ✭ 1,021 (+4154.17%)
Mutual labels:  crypto
lbry.tech
Technical documentation website for the LBRY protocol
Stars: ✭ 46 (+91.67%)
Mutual labels:  crypto
rust-hmac-sha256
A small, self-contained SHA256 and HMAC-SHA256 implementation.
Stars: ✭ 24 (+0%)
Mutual labels:  crypto
i3blocks-crypto
💵 View your favorite coins' ticker prices with i3blocks.
Stars: ✭ 30 (+25%)
Mutual labels:  crypto
zold-java-client
Java wrapper for Zold's RESTful API.
Stars: ✭ 13 (-45.83%)
Mutual labels:  crypto
equihash-zcash-c
Equihash solver port from C++ to C for Zcash
Stars: ✭ 31 (+29.17%)
Mutual labels:  crypto
framework
Aplus Full-Stack Framework
Stars: ✭ 172 (+616.67%)
Mutual labels:  crypto
rust-xoodyak
Xoodyak, a lightweight and versatile cryptographic scheme implemented in Rust.
Stars: ✭ 28 (+16.67%)
Mutual labels:  crypto
dexie-encrypted
Transparent encryption for IndexedDB using Dexie
Stars: ✭ 66 (+175%)
Mutual labels:  crypto
CoinGecko
A C++20 library for CoinGecko--a cryptocurrency data service.
Stars: ✭ 69 (+187.5%)
Mutual labels:  crypto
hashseq
A simple proof of work, mainly designed to mitigate DDoS attacks.
Stars: ✭ 20 (-16.67%)
Mutual labels:  crypto

Test Lint Go Report Card GoDoc Unstoppable Domains Documentation Get help on Discord

resolution-go

resolution-go is a library for interacting with blockchain domain names. It can be used to retrieve payment addresses and IPFS hashes for decentralized websites.

resolution-go is primarily built and maintained by Unstoppable Domains.

Resolution supports different decentralized domains. Please, refer to the Top Level Domains List

Installing resolution-go

go get github.com/unstoppabledomains/resolution-go

Updating resolution-go

go get -u github.com/unstoppabledomains/resolution-go

Usage

package main

import (
  "fmt"
  "github.com/Zilliqa/gozilliqa-sdk/provider"
  "github.com/ethereum/go-ethereum/ethclient"
  "github.com/unstoppabledomains/resolution-go"
  "github.com/unstoppabledomains/resolution-go/namingservice"
)

func main() {
  // Resolve .crypto
  uns, _ := resolution.NewUnsBuilder().Build()
  ethAddress, _ := uns.Addr("brad.crypto", "ETH")
  fmt.Println("ETH address for brad.crypto is", ethAddress)

  // Resolve .zil
  zns, _ := resolution.NewZnsBuilder().Build()
  btcAddress, _ := zns.Addr("brad.zil", "BTC")
  fmt.Println("BTC address for brad.zil is", btcAddress)

  // Get locations of domains
  uns, _ := resolution.NewUnsBuilder().Build()
  locations, _ := uns.Locations([]string{"ryan.crypto", "brad.crypto"})
  fmt.Println("Locations for ryan.crypto and brad.crypto are", locations)

  // Detect domain naming service
  namingServices := map[string]resolution.NamingService{namingservice.UNS: uns, namingservice.ZNS: zns}
  domainToDetect := "ryan.crypto"
  namingServiceName, _ := resolution.DetectNamingService(domainToDetect)
  if namingServices[namingServiceName] != nil {
    resolvedAddress, _ := namingServices[namingServiceName].Addr(domainToDetect, "ETH")
    fmt.Println("ETH address for", domainToDetect, "is", resolvedAddress)
  }

  // Set custom Ethereum endpoint for UNS service
  ethContractBackend, _ := ethclient.Dial("https://eth-mainnet.g.alchemy.com/v2/RAQcwz7hhKhmwgoti6HYM_M_9nRJjEsQ")
  unsWithCustomBackend, _ := resolution.NewUnsBuilder().SetContractBackend(ethContractBackend).Build()
  allUnsRecords, _ := unsWithCustomBackend.AllRecords("beresnev.crypto")
  fmt.Println("Records for beresnev.crypto", allUnsRecords)

  // Set custom Zilliqa endpoint for ZNS service
  zilliqaProvider := provider.NewProvider("https://api.zilliqa.com")
  znsWithCustomProvider, _ := resolution.NewZnsBuilder().SetProvider(zilliqaProvider).Build()
  allZnsRecords, _ := znsWithCustomProvider.AllRecords("brad.zil")
  fmt.Println("Records for brad.zil", allZnsRecords)
}

Custom Ethereum provider configuration

package main

import (
  "github.com/ethereum/go-ethereum/ethclient"
	"github.com/unstoppabledomains/resolution-go/v2"
)

func main() {
  var alchemyApiKey = ALCHEMY_PROJECT_ID
  var ethereumUrl = "https://eth-mainnet.g.alchemy.com/v2/" + alchemyApiKey
  var ethereumL2Url = "https://polygon-mainnet.g.alchemy.com/v2/" + alchemyApiKey

  var unsBuilder := resolution.NewUnsBuilder()
  var backend, _ := ethclient.Dial(ethereumUrl)
  var backendL2, _ := ethclient.Dial(ethereumL2Url)

  unsBuilder.SetContractBackend(backend)
  unsBuilder.SetL2ContractBackend(backendL2)

  var unsResolution, _ = unsBuilder.Build()
  var znsResolution, _ = resolution.NewZnsBuilder().Build()
}

Contributions

Contributions to this library are more than welcome. The easiest way to contribute is through GitHub issues and pull requests.

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].