Ethereum
$2,349.95 1.57%
ETH · 208w

A command-line ENS tool

An Ethereum Name Service command-line tool

The Ethereum Name Service (ENS) maps easy to remember (and type) domain names such as ‘orinocopay.eth’ to Ethereum addresses such as ‘0x1234567890abcdef1234567890abcdef12345678’. Domains can be registered with ENS through an auction process, and once owned a user can associate the domain with an address.

Something that ENS has been missing is command-line tools to allow access to its features and functions without having to write your own code. As part of Orinoco’s work on payment channels we required a Go library to handle ENS functions, and have added a command-line frontend to it for general purpose use.

Some nice features of the tool are:

written in Go, so compiles to a simple static binarydoes not require a local Ethereum nodeuses the geth-style keystore for ease of integration with existing toolsuses Orinoco’s value parsing library to allow for bids such as “0.05 ether” and gas prices such as “1gwei”accepts ENS domains and resolves addresses to domains wherever useful

To install it:

$ go get github.com/orinocopay/ens

Using the tool is straightforward. To provide general information about a domain:

$ ens info orinocopay.ethOwned since 2017-06-27 18:43:31 +0100 BSTLocked value is 0.01 EtherHighest bid was 0.121 EtherDeed owner is orinocopay.eth (0xa34c6bcae6f46ac6470443ccea67d937f6060c7e)Address owner is orinocopay.eth (0xa34c6bcae6f46ac6470443ccea67d937f6060c7e)Resolver is 0x5ffc014343cd971b7eb70732021e26c35b744cc4Domain resolves to 0xa34c6bcae6f46ac6470443ccea67d937f6060c7eAddress resolves to orinocopay.eth

ens also provides more specific commands where the output can be used easily by other tools. For example, to obtain the address for a domain:

$ ens address orinocopay.eth0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1

Setting the address for a domain is nearly as easy, only requiring the passphrase to unlock the account that owns the domain and the address to which the dom...

Continue on medium.com
Recent news
No posts found