Documentation ¶
Index ¶
- Variables
- func Abi(resolver *resolver.ResolverContract, name string) (abi string, err error)
- func AuctionRegistrarContract(client *ethclient.Client, domain string) (registrar *auctionregistrar.AuctionRegistrarContract, err error)
- func AuctionRegistrarContractAddress(client *ethclient.Client, domain string) (address common.Address, err error)
- func CreateDNSResolverSession(chainID *big.Int, wallet *accounts.Wallet, account *accounts.Account, ...) *dnsresolver.DNSResolverContractSession
- func CreateRegistrarSession(chainID *big.Int, wallet *accounts.Wallet, account *accounts.Account, ...) *auctionregistrar.AuctionRegistrarContractSession
- func CreateRegistrySession(chainID *big.Int, wallet *accounts.Wallet, account *accounts.Account, ...) *registry.RegistryContractSession
- func CreateResolverSession(chainID *big.Int, wallet *accounts.Wallet, account *accounts.Account, ...) *resolver.ResolverContractSession
- func CreateReverseRegistrarSession(chainID *big.Int, wallet *accounts.Wallet, account *accounts.Account, ...) *reverseregistrar.ReverseRegistrarContractSession
- func CreateReverseResolverSession(chainID *big.Int, wallet *accounts.Wallet, account *accounts.Account, ...) *reverseresolver.ReverseResolverSession
- func DNSRecord(client *ethclient.Client, domain string, name string, rrType uint16) (data []byte, err error)
- func DNSResolverContract(client *ethclient.Client, domain string) (resolver *dnsresolver.DNSResolverContract, err error)
- func DNSResolverContractByAddress(client *ethclient.Client, resolverAddress common.Address) (resolver *dnsresolver.DNSResolverContract, err error)
- func DeedContract(client *ethclient.Client, address *common.Address) (*deed.DeedContract, error)
- func DeedContractFor(client *ethclient.Client, registrar *auctionregistrar.AuctionRegistrarContract, ...) (*deed.DeedContract, error)
- func Domain(domain string) string
- func DomainLevel(name string) (level int)
- func DomainPart(domain string, part int) (string, error)
- func Entry(contract *auctionregistrar.AuctionRegistrarContract, client *ethclient.Client, ...) (state string, deedAddress common.Address, registrationDate time.Time, ...)
- func FinishAuction(session *auctionregistrar.AuctionRegistrarContractSession, name string) (tx *types.Transaction, err error)
- func Format(client *ethclient.Client, input *common.Address) string
- func InvalidateName(session *auctionregistrar.AuctionRegistrarContractSession, name string) (tx *types.Transaction, err error)
- func LabelHash(label string) (hash [32]byte)
- func NameHash(name string) (hash [32]byte)
- func NameInState(contract *auctionregistrar.AuctionRegistrarContract, client *ethclient.Client, ...) (inState bool, err error)
- func NewBid(session *auctionregistrar.AuctionRegistrarContractSession, name string, ...) (tx *types.Transaction, err error)
- func NormaliseDomain(domain string) string
- func Normalize(input string) (output string)
- func Owner(contract *deed.DeedContract) (common.Address, error)
- func PreviousOwner(contract *deed.DeedContract) (common.Address, error)
- func PublicResolver(client *ethclient.Client) (common.Address, error)
- func RegistryContract(client *ethclient.Client) (*registry.RegistryContract, error)
- func RegistryContractAddress(client *ethclient.Client) (common.Address, error)
- func RegistryContractFromRegistrar(client *ethclient.Client, registrar *auctionregistrar.AuctionRegistrarContract) (*registry.RegistryContract, error)
- func Resolve(client *ethclient.Client, input string) (address common.Address, err error)
- func Resolver(contract *registry.RegistryContract, name string) (common.Address, error)
- func ResolverContract(client *ethclient.Client, name string) (*resolver.ResolverContract, error)
- func ResolverContractByAddress(client *ethclient.Client, resolverAddress common.Address) (*resolver.ResolverContract, error)
- func RevealBid(session *auctionregistrar.AuctionRegistrarContractSession, name string, ...) (tx *types.Transaction, err error)
- func ReverseRegistrarContract(client *ethclient.Client) (registrar *reverseregistrar.ReverseRegistrarContract, err error)
- func ReverseResolve(client *ethclient.Client, input *common.Address) (string, error)
- func ReverseResolver(client *ethclient.Client) (*reverseresolver.ReverseResolver, error)
- func SealBid(name string, owner *common.Address, amount big.Int, salt string) (hash common.Hash, err error)
- func SetAbi(session *resolver.ResolverContractSession, name string, abi string, ...) (tx *types.Transaction, err error)
- func SetDNSRecords(session *dnsresolver.DNSResolverContractSession, domain string, data []byte) (tx *types.Transaction, err error)
- func SetName(session *reverseregistrar.ReverseRegistrarContractSession, name string) (tx *types.Transaction, err error)
- func SetResolution(session *resolver.ResolverContractSession, name string, ...) (tx *types.Transaction, err error)
- func SetResolver(session *registry.RegistryContractSession, name string, ...) (*types.Transaction, error)
- func SetSubdomainOwner(session *registry.RegistryContractSession, name string, subdomain string, ...) (*types.Transaction, error)
- func StartAuction(session *auctionregistrar.AuctionRegistrarContractSession, name string) (tx *types.Transaction, err error)
- func StartAuctionAndBid(session *auctionregistrar.AuctionRegistrarContractSession, name string, ...) (tx *types.Transaction, err error)
- func State(contract *auctionregistrar.AuctionRegistrarContract, client *ethclient.Client, ...) (state string, err error)
- func Tld(domain string) string
- func Transfer(session *auctionregistrar.AuctionRegistrarContractSession, name string, ...) (tx *types.Transaction, err error)
Constants ¶
This section is empty.
Variables ¶
var UnknownAddress = common.HexToAddress("00")
UnknownAddress is the address to which unknown entries resolve
Functions ¶
func Abi ¶
func Abi(resolver *resolver.ResolverContract, name string) (abi string, err error)
Abi returns the ABI associated with a name
func AuctionRegistrarContract ¶
func AuctionRegistrarContract(client *ethclient.Client, domain string) (registrar *auctionregistrar.AuctionRegistrarContract, err error)
AuctionRegistrarContract obtains the registrar contract for a given domain
func AuctionRegistrarContractAddress ¶
func AuctionRegistrarContractAddress(client *ethclient.Client, domain string) (address common.Address, err error)
AuctionRegistrarContractAddress obtains the registrar contract address for a given domain
func CreateDNSResolverSession ¶
func CreateDNSResolverSession(chainID *big.Int, wallet *accounts.Wallet, account *accounts.Account, passphrase string, contract *dnsresolver.DNSResolverContract, gasPrice *big.Int) *dnsresolver.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 *auctionregistrar.AuctionRegistrarContract, gasPrice *big.Int) *auctionregistrar.AuctionRegistrarContractSession
CreateRegistrarSession creates a session suitable for multiple calls
func CreateRegistrySession ¶
func CreateRegistrySession(chainID *big.Int, wallet *accounts.Wallet, account *accounts.Account, passphrase string, contract *registry.RegistryContract, gasPrice *big.Int) *registry.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 *resolver.ResolverContract, gasPrice *big.Int) *resolver.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 *reverseregistrar.ReverseRegistrarContract, gasPrice *big.Int) *reverseregistrar.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 *reverseresolver.ReverseResolver, gasPrice *big.Int) *reverseresolver.ReverseResolverSession
CreateReverseResolverSession creates a session suitable for multiple calls
func DNSRecord ¶
func DNSRecord(client *ethclient.Client, domain string, name string, rrType uint16) (data []byte, err error)
DNSRecord fetches a DNS record
func DNSResolverContract ¶
func DNSResolverContract(client *ethclient.Client, domain string) (resolver *dnsresolver.DNSResolverContract, err error)
DNSResolverContract obtains the resolver contract for a domain
func DNSResolverContractByAddress ¶
func DNSResolverContractByAddress(client *ethclient.Client, resolverAddress common.Address) (resolver *dnsresolver.DNSResolverContract, err error)
DNSResolverContractByAddress instantiates the resolver contract at aspecific address
func DeedContract ¶
DeedContract obtains the deed contract at a particular address
func DeedContractFor ¶
func DeedContractFor(client *ethclient.Client, registrar *auctionregistrar.AuctionRegistrarContract, name string) (*deed.DeedContract, error)
DeedContractFor obtains the deed contract for a particular name
func Domain ¶
Domain obtains the domain of an ENS name, including subdomains. It does this by removing everything up to and including the first period. For example, 'eth' will return ”
'foo.eth' will return 'eth' 'bar.foo.eth' will return 'foo.eth'
func DomainLevel ¶
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 DomainPart ¶
DomainPart obtains a part of a name Positive parts start at the lowest-level of the domain and work towards the top-level domain. Negative parts start at the top-level domain and work towards the lowest-level domain. For example, with a domain bar.foo.com the following parts will be returned: Number | part
1 | bar 2 | foo 3 | com -1 | com -2 | foo -3 | bar
func Entry ¶
func Entry(contract *auctionregistrar.AuctionRegistrarContract, 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 *auctionregistrar.AuctionRegistrarContractSession, name string) (tx *types.Transaction, err error)
FinishAuction reveals an existing bid on an existing auction
func InvalidateName ¶
func InvalidateName(session *auctionregistrar.AuctionRegistrarContractSession, name string) (tx *types.Transaction, err error)
InvalidateName invalidates a non-conformant ENS registration.
func NameInState ¶
func NameInState(contract *auctionregistrar.AuctionRegistrarContract, 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 *auctionregistrar.AuctionRegistrarContractSession, name string, owner *common.Address, amount big.Int, salt string) (tx *types.Transaction, err error)
NewBid bids on an existing auction
func NormaliseDomain ¶
NormaliseDomain turns ENS domain in to normal form
func Owner ¶
func Owner(contract *deed.DeedContract) (common.Address, error)
Owner obtains the owner of a deed
func PreviousOwner ¶
func PreviousOwner(contract *deed.DeedContract) (common.Address, error)
PreviousOwner obtains the previous owner of a deed
func PublicResolver ¶
PublicResolver obtains the public resolver for a chain
func RegistryContract ¶
func RegistryContract(client *ethclient.Client) (*registry.RegistryContract, error)
RegistryContract obtains the registry contract for a chain
func RegistryContractAddress ¶
RegistryContractAddress obtains the address of the registry contract for a chain
func RegistryContractFromRegistrar ¶
func RegistryContractFromRegistrar(client *ethclient.Client, registrar *auctionregistrar.AuctionRegistrarContract) (*registry.RegistryContract, error)
RegistryContractFromRegistrar obtains the registry contract given an existing registrar contract
func Resolve ¶
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 ResolverContract ¶
ResolverContract obtains the resolver contract for a name
func ResolverContractByAddress ¶
func ResolverContractByAddress(client *ethclient.Client, resolverAddress common.Address) (*resolver.ResolverContract, error)
ResolverContractByAddress instantiates the resolver contract at aspecific address
func RevealBid ¶
func RevealBid(session *auctionregistrar.AuctionRegistrarContractSession, 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 *reverseregistrar.ReverseRegistrarContract, err error)
ReverseRegistrarContract obtains the reverse registrar contract for a chain
func ReverseResolve ¶
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) (*reverseresolver.ReverseResolver, 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 *resolver.ResolverContractSession, name string, abi string, contentType *big.Int) (tx *types.Transaction, err error)
SetAbi sets the ABI associated with a name
func SetDNSRecords ¶
func SetDNSRecords(session *dnsresolver.DNSResolverContractSession, domain string, data []byte) (tx *types.Transaction, err error)
SetDNSRecords sets DNS records
func SetName ¶
func SetName(session *reverseregistrar.ReverseRegistrarContractSession, name string) (tx *types.Transaction, err error)
SetName sets the name for the sending address
func SetResolution ¶
func SetResolution(session *resolver.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 *registry.RegistryContractSession, name string, resolverAddr *common.Address) (*types.Transaction, error)
SetResolver sets the resolver for a name
func SetSubdomainOwner ¶
func SetSubdomainOwner(session *registry.RegistryContractSession, name string, subdomain string, ownerAddr *common.Address) (*types.Transaction, error)
SetSubdomainOwner sets the owner for a subdomain of a name
func StartAuction ¶
func StartAuction(session *auctionregistrar.AuctionRegistrarContractSession, name string) (tx *types.Transaction, err error)
StartAuction starts an auction without bidding
func StartAuctionAndBid ¶
func StartAuctionAndBid(session *auctionregistrar.AuctionRegistrarContractSession, 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 *auctionregistrar.AuctionRegistrarContract, client *ethclient.Client, name string) (state string, err error)
State obains the current state of a name
func Transfer ¶
func Transfer(session *auctionregistrar.AuctionRegistrarContractSession, name string, to common.Address) (tx *types.Transaction, err error)
Transfer transfers domain ownership to a new address
Types ¶
This section is empty.