ens

package
v0.0.0-...-139c2bc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2018 License: Apache-2.0 Imports: 28 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UnknownAddress = common.HexToAddress("00")

UnknownAddress is the address to which unknown entries resolve

Functions

func Abi

func Abi(resolver *resolvercontract.ResolverContract, name string) (abi string, err error)

Abi returns the ABI associated with a name

func CreateDnsResolverSession

func CreateDnsResolverSession(chainID *big.Int, wallet *accounts.Wallet, account *accounts.Account, passphrase string, contract *dnsresolvercontract.DnsResolverContract, gasPrice *big.Int) *dnsresolvercontract.DnsResolverContractSession

CreateDnsResolverSession creates a session suitable for multiple calls

func CreateRegistrarSession

func CreateRegistrarSession(chainID *big.Int, wallet *accounts.Wallet, account *accounts.Account, passphrase string, contract *registrarcontract.RegistrarContract, gasPrice *big.Int) *registrarcontract.RegistrarContractSession

CreateRegistrarSession creates a session suitable for multiple calls

func CreateRegistrySession

func CreateRegistrySession(chainID *big.Int, wallet *accounts.Wallet, account *accounts.Account, passphrase string, contract *registrycontract.RegistryContract, gasPrice *big.Int) *registrycontract.RegistryContractSession

CreateRegistrySession creates a session suitable for multiple calls

func CreateResolverSession

func CreateResolverSession(chainID *big.Int, wallet *accounts.Wallet, account *accounts.Account, passphrase string, contract *resolvercontract.ResolverContract, gasPrice *big.Int) *resolvercontract.ResolverContractSession

CreateResolverSession creates a session suitable for multiple calls

func CreateReverseRegistrarSession

func CreateReverseRegistrarSession(chainID *big.Int, wallet *accounts.Wallet, account *accounts.Account, passphrase string, contract *reverseregistrarcontract.ReverseRegistrarContract, gasPrice *big.Int) *reverseregistrarcontract.ReverseRegistrarContractSession

CreateReverseRegistrarSession creates a session suitable for multiple calls

func CreateReverseResolverSession

func CreateReverseResolverSession(chainID *big.Int, wallet *accounts.Wallet, account *accounts.Account, passphrase string, contract *reverseresolvercontract.ReverseResolver, gasPrice *big.Int) *reverseresolvercontract.ReverseResolverSession

CreateReverseResolverSession creates a session suitable for multiple calls

func DeedContract

func DeedContract(client *ethclient.Client, address *common.Address) (deed *deedcontract.DeedContract, err error)

DeedContract obtains the deed contract at a particular address

func DeedContractFor

func DeedContractFor(client *ethclient.Client, registrar *registrarcontract.RegistrarContract, name string) (deedContract *deedcontract.DeedContract, err error)

DeedContract obtains the deed contract for a particular name

func Dns

func Dns(client *ethclient.Client, name string, rrType uint16, key string) (data []byte, err error)

func DnsResolverContract

func DnsResolverContract(client *ethclient.Client, name string) (resolver *dnsresolvercontract.DnsResolverContract, err error)

DnsResolverContract obtains the resolver contract for a name

func DnsResolverContractByAddress

func DnsResolverContractByAddress(client *ethclient.Client, resolverAddress common.Address) (resolver *dnsresolvercontract.DnsResolverContract, err error)

DnsResolverContractByAddress instantiates the resolver contract at aspecific address

func Domain

func Domain(name string) (domain string, err error)

Domain returns the domain directly before the '.eth' in a name

func DomainLevel

func DomainLevel(name string) (level int)

DomainLevel calculates the level of the domain presented. A top-level domain (e.g. 'eth') will be 0, a domain (e.g. 'foo.eth') will be 1, a subdomain (e.g. 'bar.foo.eth' will be 2, etc.

func Entry

func Entry(contract *registrarcontract.RegistrarContract, client *ethclient.Client, name string) (state string, deedAddress common.Address, registrationDate time.Time, value *big.Int, highestBid *big.Int, err error)

Entry obtains a registrar entry for a name

func FinishAuction

func FinishAuction(session *registrarcontract.RegistrarContractSession, name string) (tx *types.Transaction, err error)

FinishAuction reveals an existing bid on an existing auction

func InvalidateName

func InvalidateName(session *registrarcontract.RegistrarContractSession, name string) (tx *types.Transaction, err error)

InvalidateName invalidates a non-conformant ENS registration.

func LabelHash

func LabelHash(label string) (hash [32]byte)

LabelHash generates a simple hash for a piece of a name.

func NameHash

func NameHash(name string) (hash [32]byte)

NameHash generates a hash from a name that can be used to look up the name in ENS

func NameInState

func NameInState(contract *registrarcontract.RegistrarContract, client *ethclient.Client, name string, desiredState string) (inState bool, err error)

NameInState checks if a name is in a given state, and errors if not.

func NewBid

func NewBid(session *registrarcontract.RegistrarContractSession, name string, owner *common.Address, amount big.Int, salt string) (tx *types.Transaction, err error)

NewBid bids on an existing auction

func Normalize

func Normalize(input string) (output string)

Normalize normalizes a name according to the ENS rules

func Owner

func Owner(contract *deedcontract.DeedContract) (address common.Address, err error)

Owner obtains the owner of a deed

func PreviousOwner

func PreviousOwner(contract *deedcontract.DeedContract) (address common.Address, err error)

PreviousOwner obtains the previous owner of a deed

func PublicResolver

func PublicResolver(client *ethclient.Client) (address common.Address, err error)

PublicResolver obtains the public resolver for a chain

func RegistrarContract

func RegistrarContract(client *ethclient.Client) (registrar *registrarcontract.RegistrarContract, err error)

RegistrarContract obtains the registrar contract for '.eth'

func RegistrarContractAddress

func RegistrarContractAddress(client *ethclient.Client) (address common.Address, err error)

func RegistrarContractAddressFor

func RegistrarContractAddressFor(client *ethclient.Client, root string) (address common.Address, err error)

func RegistrarContractFor

func RegistrarContractFor(client *ethclient.Client, root string) (registrar *registrarcontract.RegistrarContract, err error)

RegistrarContract obtains the registrar contract for a named root

func RegistryContract

func RegistryContract(client *ethclient.Client) (registry *registrycontract.RegistryContract, err error)

RegistryContract obtains the registry contract for a chain

func RegistryContractAddress

func RegistryContractAddress(client *ethclient.Client) (address common.Address, err error)

func RegistryContractFromRegistrar

func RegistryContractFromRegistrar(client *ethclient.Client, registrar *registrarcontract.RegistrarContract) (registry *registrycontract.RegistryContract, err error)

RegistryContractFromRegistrar obtains the registry contract given an existing registrar contract

func Resolve

func Resolve(client *ethclient.Client, input string) (address common.Address, err error)

Resolve resolves an ENS name in to an Etheruem address This will return an error if the name is not found or otherwise 0

func Resolver

func Resolver(contract *registrycontract.RegistryContract, name string) (address common.Address, err error)

Resolver obtains the address of the resolver for a .eth name

func ResolverContract

func ResolverContract(client *ethclient.Client, name string) (resolver *resolvercontract.ResolverContract, err error)

ResolverContract obtains the resolver contract for a name

func ResolverContractByAddress

func ResolverContractByAddress(client *ethclient.Client, resolverAddress common.Address) (resolver *resolvercontract.ResolverContract, err error)

ResolverContractByAddress instantiates the resolver contract at aspecific address

func RevealBid

func RevealBid(session *registrarcontract.RegistrarContractSession, name string, owner *common.Address, amount big.Int, salt string) (tx *types.Transaction, err error)

RevealBid reveals an existing bid on an existing auction

func ReverseRegistrarContract

func ReverseRegistrarContract(client *ethclient.Client) (registrar *reverseregistrarcontract.ReverseRegistrarContract, err error)

ReverseRegistrarContract obtains the reverse registrar contract for a chain

func ReverseResolve

func ReverseResolve(client *ethclient.Client, input *common.Address) (name string, err error)

ReverseResolve resolves an address in to an ENS name This will return an error if the name is not found or otherwise 0

func ReverseResolver

func ReverseResolver(client *ethclient.Client) (resolver *reverseresolvercontract.ReverseResolver, err error)

ReverseResolver obtains the reverse resolver contract

func SealBid

func SealBid(name string, owner *common.Address, amount big.Int, salt string) (hash common.Hash, err error)

SealBid seals the elements of a bid in to a single hash

func SetAbi

func SetAbi(session *resolvercontract.ResolverContractSession, name string, abi string, contentType *big.Int) (tx *types.Transaction, err error)

SetAbi sets the ABI associated with a name

func SetDns

func SetDns(session *dnsresolvercontract.DnsResolverContractSession, name string, rrType uint16, key string, data []byte) (tx *types.Transaction, err error)

SetDns sets a DNS resolution

func SetName

SetName sets the name for the sending address

func SetResolution

func SetResolution(session *resolvercontract.ResolverContractSession, name string, resolutionAddress *common.Address) (tx *types.Transaction, err error)

SetResolution sets the address to which a name resolves

func SetResolver

func SetResolver(session *registrycontract.RegistryContractSession, name string, resolverAddr *common.Address) (tx *types.Transaction, err error)

SetResolver sets the resolver for a name

func SetSubdomainOwner

func SetSubdomainOwner(session *registrycontract.RegistryContractSession, name string, subdomain string, ownerAddr *common.Address) (tx *types.Transaction, err error)

SetSubdomainOwner sets the owner for a subdomain of a name

func StartAuction

func StartAuction(session *registrarcontract.RegistrarContractSession, name string) (tx *types.Transaction, err error)

StartAuction starts an auction without bidding

func StartAuctionAndBid

func StartAuctionAndBid(session *registrarcontract.RegistrarContractSession, name string, owner *common.Address, amount big.Int, salt string, dummies int) (tx *types.Transaction, err error)

StartAuctionAndBid starts an auction and bids in the same transaction.

func State

func State(contract *registrarcontract.RegistrarContract, client *ethclient.Client, name string) (state string, err error)

State obains the current state of a name

func Transfer

func Transfer(session *registrarcontract.RegistrarContractSession, name string, to common.Address) (tx *types.Transaction, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL