Documentation ¶
Index ¶
- Variables
- func ContenthashToString(bytes []byte) (string, error)
- func CreateRegistrySession(chainID *big.Int, wallet *accounts.Wallet, account *accounts.Account, ...) *registry.ContractSession
- func DNSWireFormat(domain string) []byte
- func DNSWireFormatDomainHash(domain string) (hash [32]byte)
- func Domain(domain string) string
- func DomainLevel(name string) (level int)
- func DomainPart(domain string, part int) (string, error)
- func LabelHash(label string) (hash [32]byte, err error)
- func NameHash(name string) (hash [32]byte, err error)
- func NormaliseDomain(domain string) (string, error)
- func NormaliseDomainStrict(domain string) (string, error)
- func Normalize(input string) (output string, err error)
- func PublicResolverAddress(backend bind.ContractBackend) (common.Address, error)
- func RegistrarContractAddress(backend bind.ContractBackend, domain string) (common.Address, error)
- func RegistryContractAddress(backend bind.ContractBackend) (common.Address, error)
- func RegistryContractFromRegistrar(backend bind.ContractBackend, registrar *baseregistrar.Contract) (*registry.Contract, error)
- func Resolve(backend bind.ContractBackend, input string) (address common.Address, err error)
- func SetResolver(session *registry.ContractSession, name string, resolverAddr *common.Address) (*types.Transaction, error)
- func SetSubdomainOwner(session *registry.ContractSession, name string, subdomain string, ...) (*types.Transaction, error)
- func StringToContenthash(text string) ([]byte, error)
- func Tld(domain string) string
- func UnqualifiedName(domain string, root string) (string, error)
- type BaseRegistrar
- func (r *BaseRegistrar) Expiry(domain string) (*big.Int, error)
- func (r *BaseRegistrar) Owner(domain string) (common.Address, error)
- func (r *BaseRegistrar) Reclaim(opts *bind.TransactOpts, domain string, newOwner common.Address) (*types.Transaction, error)
- func (r *BaseRegistrar) RegisteredWith(domain string) (string, error)
- func (r *BaseRegistrar) SetOwner(opts *bind.TransactOpts, domain string, newOwner common.Address) (*types.Transaction, error)
- type DNSResolver
- func (r *DNSResolver) ClearRecords(opts *bind.TransactOpts) (*types.Transaction, error)
- func (r *DNSResolver) HasRecords(name string) (bool, error)
- func (r *DNSResolver) Record(name string, rrType uint16) ([]byte, error)
- func (r *DNSResolver) SetRecords(opts *bind.TransactOpts, data []byte) (*types.Transaction, error)
- func (r *DNSResolver) SetZonehash(opts *bind.TransactOpts, zonehash []byte) (*types.Transaction, error)
- func (r *DNSResolver) Zonehash() ([]byte, error)
- type Name
- func (n *Name) Address(coinType uint64) ([]byte, error)
- func (n *Name) Controller() (common.Address, error)
- func (n *Name) CreateSubdomain(label string, controller common.Address, opts *bind.TransactOpts) (*types.Transaction, error)
- func (n *Name) Expires() (time.Time, error)
- func (n *Name) ExtendRegistration(opts *bind.TransactOpts) (*types.Transaction, error)
- func (n *Name) IsRegistered() (bool, error)
- func (n *Name) Reclaim(opts *bind.TransactOpts) (*types.Transaction, error)
- func (n *Name) RegisterStageOne(registrant common.Address, duration *big.Int, opts *bind.TransactOpts) (*types.Transaction, [32]byte, error)
- func (n *Name) RegisterStageTwo(registrant common.Address, duration *big.Int, secret [32]byte, ...) (*types.Transaction, error)
- func (n *Name) Registrant() (common.Address, error)
- func (n *Name) RegistrationInterval() (time.Duration, error)
- func (n *Name) RentCost() (*big.Int, error)
- func (n *Name) ResolverAddress() (common.Address, error)
- func (n *Name) SetController(controller common.Address, opts *bind.TransactOpts) (*types.Transaction, error)
- func (n *Name) SetResolverAddress(address common.Address, opts *bind.TransactOpts) (*types.Transaction, error)
- func (n *Name) Transfer(registrant common.Address, opts *bind.TransactOpts) (*types.Transaction, error)
- type RegistrarController
- func (c *RegistrarController) BaseNode(opts *bind.CallOpts) ([32]byte, error)
- func (c *RegistrarController) Basextension() (string, error)
- func (c *RegistrarController) Commit(opts *bind.TransactOpts, domain string, owner common.Address, ...) (*types.Transaction, error)
- func (c *RegistrarController) CommitmentHash(domain string, owner common.Address, duration *big.Int, secret [32]byte) (common.Hash, error)
- func (c *RegistrarController) CommitmentTime(domain string, owner common.Address, duration *big.Int, secret [32]byte) (*big.Int, error)
- func (c *RegistrarController) Commitments(opts *bind.CallOpts, commitment [32]byte) (*big.Int, error)
- func (c *RegistrarController) IsAvailable(domain string) (bool, error)
- func (c *RegistrarController) IsValid(domain string) (bool, error)
- func (c *RegistrarController) MaxCommitmentInterval() (*big.Int, error)
- func (c *RegistrarController) MinCommitmentInterval() (*big.Int, error)
- func (c *RegistrarController) MinRegistrationDuration() (time.Duration, error)
- func (c *RegistrarController) NameWrapper() (common.Address, error)
- func (c *RegistrarController) Owner() (common.Address, error)
- func (c *RegistrarController) Prices() (common.Address, error)
- func (c *RegistrarController) RecoverFunds(opts *bind.TransactOpts, token common.Address, to common.Address, ...) (*types.Transaction, error)
- func (c *RegistrarController) Register(opts *bind.TransactOpts, name string, owner common.Address, duration *big.Int, ...) (*types.Transaction, error)
- func (c *RegistrarController) Renew(opts *bind.TransactOpts, domain string) (*types.Transaction, error)
- func (c *RegistrarController) RenewWithFuses(opts *bind.TransactOpts, name string, duration *big.Int, fuses uint32, ...) (*types.Transaction, error)
- func (c *RegistrarController) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error)
- func (c *RegistrarController) RentCost(domain string) (*big.Int, error)
- func (c *RegistrarController) RentPrice(opts *bind.CallOpts, name string, duration *big.Int) (registrarcontroller.IPriceOraclePrice, error)
- func (c *RegistrarController) Reveal(opts *bind.TransactOpts, domain string, owner common.Address, ...) (*types.Transaction, error)
- func (c *RegistrarController) ReverseRegistrar() (common.Address, error)
- func (c *RegistrarController) SupportsInterface(opts *bind.CallOpts, interfaceID [4]byte) (bool, error)
- func (c *RegistrarController) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error)
- func (c *RegistrarController) Withdraw(opts *bind.TransactOpts) (*types.Transaction, error)
- type Registry
- func (r *Registry) Owner(name string) (common.Address, error)
- func (r *Registry) Resolver(name string) (*Resolver, error)
- func (r *Registry) ResolverAddress(name string) (common.Address, error)
- func (r *Registry) SetOwner(opts *bind.TransactOpts, name string, address common.Address) (*types.Transaction, error)
- func (r *Registry) SetResolver(opts *bind.TransactOpts, name string, address common.Address) (*types.Transaction, error)
- func (r *Registry) SetSubdomainOwner(opts *bind.TransactOpts, name string, subname string, address common.Address) (*types.Transaction, error)
- type Resolver
- func (r *Resolver) ABI(name string) (string, error)
- func (r *Resolver) Address() (common.Address, error)
- func (r *Resolver) Contenthash() ([]byte, error)
- func (r *Resolver) InterfaceImplementer(interfaceID [4]byte) (common.Address, error)
- func (r *Resolver) MultiAddress(coinType uint64) ([]byte, error)
- func (r *Resolver) PubKey() ([32]byte, [32]byte, error)
- func (r *Resolver) SetABI(opts *bind.TransactOpts, name string, abi string, contentType *big.Int) (*types.Transaction, error)
- func (r *Resolver) SetContenthash(opts *bind.TransactOpts, contenthash []byte) (*types.Transaction, error)
- func (r *Resolver) SetPubKey(opts *bind.TransactOpts, x [32]byte, y [32]byte) (*types.Transaction, error)
- func (r *Resolver) SetText(opts *bind.TransactOpts, name string, value string) (*types.Transaction, error)
- func (r *Resolver) Text(name string) (string, error)
Constants ¶
This section is empty.
Variables ¶
var UnknownAddress = common.HexToAddress("00")
UnknownAddress is the address to which unknown entries resolve
Functions ¶
func ContenthashToString ¶
ContenthashToString turns EIP-1577 binary format in to EIP-1577 text format
func CreateRegistrySession ¶
func CreateRegistrySession(chainID *big.Int, wallet *accounts.Wallet, account *accounts.Account, passphrase string, contract *registry.Contract, gasPrice *big.Int) *registry.ContractSession
CreateRegistrySession creates a session suitable for multiple calls
func DNSWireFormat ¶ added in v0.1.3
DNSWireFormat turns a domain name in to wire format
func DNSWireFormatDomainHash ¶ added in v0.1.3
DNSWireFormatDomainHash hashes a domain name in wire format
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, 'country' will return ”
'foo.country' will return 'country' 'bar.foo.country' will return 'foo.country'
func DomainLevel ¶
DomainLevel calculates the level of the domain presented. A top-level domain (e.g. 'country') will be 0, a domain (e.g. 'foo.country') will be 1, a subdomain (e.g. 'bar.foo.country' 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 NormaliseDomain ¶
NormaliseDomain turns ENS domain in to normal form
func NormaliseDomainStrict ¶
NormaliseDomainStrict turns ENS domain in to normal form, using strict DNS rules (e.g. no underscores)
func PublicResolverAddress ¶
func PublicResolverAddress(backend bind.ContractBackend) (common.Address, error)
PublicResolverAddress obtains the address of the public resolver for a chain
func RegistrarContractAddress ¶
RegistrarContractAddress obtains the registrar contract address for a given domain
func RegistryContractAddress ¶
func RegistryContractAddress(backend bind.ContractBackend) (common.Address, error)
RegistryContractAddress obtains the address of the registry contract for a chain. Get the Registry contract address from config
func RegistryContractFromRegistrar ¶
func RegistryContractFromRegistrar(backend bind.ContractBackend, registrar *baseregistrar.Contract) (*registry.Contract, 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 SetResolver ¶
func SetResolver(session *registry.ContractSession, name string, resolverAddr *common.Address) (*types.Transaction, error)
SetResolver sets the resolver for a name
func SetSubdomainOwner ¶
func SetSubdomainOwner(session *registry.ContractSession, name string, subdomain string, ownerAddr *common.Address) (*types.Transaction, error)
SetSubdomainOwner sets the owner for a subdomain of a name
func StringToContenthash ¶
StringToContenthash turns EIP-1577 text format in to EIP-1577 binary format
Types ¶
type BaseRegistrar ¶
type BaseRegistrar struct { Contract *baseregistrar.Contract ContractAddr common.Address // contains filtered or unexported fields }
BaseRegistrar is the structure for the registrar
func NewBaseRegistrar ¶
func NewBaseRegistrar(backend bind.ContractBackend, domain string) (*BaseRegistrar, error)
NewBaseRegistrar obtains the registrar contract for a given domain
func (*BaseRegistrar) Expiry ¶
func (r *BaseRegistrar) Expiry(domain string) (*big.Int, error)
Expiry obtains the unix timestamp at which the registration expires.
func (*BaseRegistrar) Owner ¶
func (r *BaseRegistrar) Owner(domain string) (common.Address, error)
Owner obtains the owner of the underlying token that represents the name.
func (*BaseRegistrar) Reclaim ¶
func (r *BaseRegistrar) Reclaim(opts *bind.TransactOpts, domain string, newOwner common.Address) (*types.Transaction, error)
Reclaim reclaims a domain by the owner
func (*BaseRegistrar) RegisteredWith ¶
func (r *BaseRegistrar) RegisteredWith(domain string) (string, error)
RegisteredWith returns "permanent" or "none" for the registrar on which this name is registered
func (*BaseRegistrar) SetOwner ¶
func (r *BaseRegistrar) SetOwner(opts *bind.TransactOpts, domain string, newOwner common.Address) (*types.Transaction, error)
SetOwner sets the owner of the token holding the name
type DNSResolver ¶ added in v0.1.3
type DNSResolver struct { Contract *publicresolver.Contract ContractAddr common.Address // contains filtered or unexported fields }
DNSResolver is the structure for the DNS resolver contract
func NewDNSResolver ¶ added in v0.1.3
func NewDNSResolver(backend bind.ContractBackend, domain string) (*DNSResolver, error)
NewDNSResolver creates a new DNS resolver for a given domain
func NewDNSResolverAt ¶ added in v0.1.3
func NewDNSResolverAt(backend bind.ContractBackend, domain string, address common.Address) (*DNSResolver, error)
NewDNSResolverAt creates a new DNS resolver for a given domain at a given address
func (*DNSResolver) ClearRecords ¶ added in v0.1.4
func (r *DNSResolver) ClearRecords(opts *bind.TransactOpts) (*types.Transaction, error)
ClearRecords clears all records for a domain
func (*DNSResolver) HasRecords ¶ added in v0.1.3
func (r *DNSResolver) HasRecords(name string) (bool, error)
HasRecords returns true if the given name has any RRsets
func (*DNSResolver) Record ¶ added in v0.1.3
func (r *DNSResolver) Record(name string, rrType uint16) ([]byte, error)
Record obtains an RRSet for a name
func (*DNSResolver) SetRecords ¶ added in v0.1.3
func (r *DNSResolver) SetRecords(opts *bind.TransactOpts, data []byte) (*types.Transaction, error)
SetRecords sets one or more RRSets
func (*DNSResolver) SetZonehash ¶ added in v0.1.3
func (r *DNSResolver) SetZonehash(opts *bind.TransactOpts, zonehash []byte) (*types.Transaction, error)
SetZonehash sets the zone hash of the domain
func (*DNSResolver) Zonehash ¶ added in v0.1.3
func (r *DNSResolver) Zonehash() ([]byte, error)
Zonehash returns the zone hash of the domain
type Name ¶
type Name struct { // Name is the fully-qualified name of an ENS domain e.g. foo.bar.country Name string // Domain is the domain of an ENS domain e.g. bar.country Domain string // Label is the name part of an ENS domain e.g. foo Label string // contains filtered or unexported fields }
Name represents an ENS name, for example 'foo.bar.country'.
func NewName ¶
func NewName(backend bind.ContractBackend, name string) (*Name, error)
NewName creates an ENS name structure. Note that this does not create the name on-chain.
func (*Name) Address ¶
Address fetches the address of the name for a given coin type. Coin types are defined at https://github.com/satoshilabs/slips/blob/master/slip-0044.md
func (*Name) Controller ¶
Controller obtains the controller for this name. The controller can carry out operations on the name such as setting records, but cannot transfer ultimate ownership of the name.
func (*Name) CreateSubdomain ¶
func (n *Name) CreateSubdomain(label string, controller common.Address, opts *bind.TransactOpts) (*types.Transaction, error)
CreateSubdomain creates a subdomain on the name.
func (*Name) ExtendRegistration ¶
func (n *Name) ExtendRegistration(opts *bind.TransactOpts) (*types.Transaction, error)
ExtendRegistration sends a transaction that extends the registration of the name.
func (*Name) IsRegistered ¶
IsRegistered returns true if the name is registered in the registrar
func (*Name) Reclaim ¶
func (n *Name) Reclaim(opts *bind.TransactOpts) (*types.Transaction, error)
Reclaim reclaims controller rights by the registrant
func (*Name) RegisterStageOne ¶
func (n *Name) RegisterStageOne(registrant common.Address, duration *big.Int, opts *bind.TransactOpts) (*types.Transaction, [32]byte, error)
RegisterStageOne sends a transaction that starts the registration process.
func (*Name) RegisterStageTwo ¶
func (n *Name) RegisterStageTwo(registrant common.Address, duration *big.Int, secret [32]byte, opts *bind.TransactOpts) (*types.Transaction, error)
RegisterStageTwo sends a transaction that completes the registration process. The registrant must be the same as supplied in RegisterStageOne. The secret is that returned by RegisterStageOne. At least RegistrationInterval() time must have passed since the stage one transaction was mined for this to work.
func (*Name) Registrant ¶
Registrant obtains the registrant for this name.
func (*Name) RegistrationInterval ¶
RegistrationInterval obtains the minimum interval between commit and reveal when registering this name.
func (*Name) ResolverAddress ¶
ResolverAddress fetches the address of the resolver contract for the name.
func (*Name) SetController ¶
func (n *Name) SetController(controller common.Address, opts *bind.TransactOpts) (*types.Transaction, error)
SetController sets the controller for this name. The controller can carry out operations on the name such as setting records, but cannot transfer ultimate ownership of the name.
func (*Name) SetResolverAddress ¶
func (n *Name) SetResolverAddress(address common.Address, opts *bind.TransactOpts) (*types.Transaction, error)
SetResolverAddress sets the resolver contract address for the name.
func (*Name) Transfer ¶
func (n *Name) Transfer(registrant common.Address, opts *bind.TransactOpts) (*types.Transaction, error)
Transfer transfers the registration of this name to a new registrant.
type RegistrarController ¶
type RegistrarController struct { Contract *registrarcontroller.Contract ContractAddr common.Address // contains filtered or unexported fields }
RegistrarController is the structure for the registrar controller contract
func NewRegistrarController ¶
func NewRegistrarController(backend bind.ContractBackend, domain string) (*RegistrarController, error)
NewRegistrarController creates a new controller for a given domain
func NewRegistrarControllerAt ¶
func NewRegistrarControllerAt(backend bind.ContractBackend, domain string, address common.Address) (*RegistrarController, error)
NewETHControllerAt creates a .eth controller at a given address
func (*RegistrarController) BaseNode ¶
func (c *RegistrarController) BaseNode(opts *bind.CallOpts) ([32]byte, error)
"function baseNode() view returns (bytes32)", BaseNode retreives the base node
func (*RegistrarController) Basextension ¶
func (c *RegistrarController) Basextension() (string, error)
"function baseExtension() view returns (string)", BaseExtension retrieves the baseExtension
func (*RegistrarController) Commit ¶
func (c *RegistrarController) Commit(opts *bind.TransactOpts, domain string, owner common.Address, duration *big.Int, secret [32]byte) (*types.Transaction, error)
Commit sends a commitment to register a domain. func (_Contract *ContractCaller) MakeCommitment(opts *bind.CallOpts, name string, owner common.Address, duration *big.Int, secret [32]byte, resolver common.Address, data [][]byte, reverseRecord bool, fuses uint32, wrapperExpiry uint64) ([32]byte, error) {
func (*RegistrarController) CommitmentHash ¶
func (c *RegistrarController) CommitmentHash(domain string, owner common.Address, duration *big.Int, secret [32]byte) (common.Hash, error)
"function makeCommitment(string,address,uint256,bytes32,address,bytes[],bool,uint32,uint64) pure returns (bytes32)", CommitmentHash returns the commitment hash for a label/owner/secret tuple
func (*RegistrarController) CommitmentTime ¶
func (c *RegistrarController) CommitmentTime(domain string, owner common.Address, duration *big.Int, secret [32]byte) (*big.Int, error)
CommitmentTime states the time at which a commitment was registered on the blockchain.
func (*RegistrarController) Commitments ¶
func (c *RegistrarController) Commitments(opts *bind.CallOpts, commitment [32]byte) (*big.Int, error)
"function commitments(bytes32) view returns (uint256)" Commitments returns the block timestamp of the commmitment
func (*RegistrarController) IsAvailable ¶
func (c *RegistrarController) IsAvailable(domain string) (bool, error)
"function available(string) view returns (bool)", IsAvailable returns true if the domain is available for registration.
func (*RegistrarController) IsValid ¶
func (c *RegistrarController) IsValid(domain string) (bool, error)
IsValid returns true if the domain is considered valid by the controller.
func (*RegistrarController) MaxCommitmentInterval ¶
func (c *RegistrarController) MaxCommitmentInterval() (*big.Int, error)
"function maxCommitmentAge() view returns (uint256)",
func (*RegistrarController) MinCommitmentInterval ¶
func (c *RegistrarController) MinCommitmentInterval() (*big.Int, error)
"function minCommitmentAge() view returns (uint256)", MinCommitmentInterval returns the minimum time that has to pass between a commit and reveal
func (*RegistrarController) MinRegistrationDuration ¶
func (c *RegistrarController) MinRegistrationDuration() (time.Duration, error)
"function MIN_REGISTRATION_DURATION() view returns (uint256)",
MinRegistrationDuration returns the minimum duration for which a name can be registered
func (*RegistrarController) NameWrapper ¶
func (c *RegistrarController) NameWrapper() (common.Address, error)
"function nameWrapper() view returns (address)",
func (*RegistrarController) Owner ¶
func (c *RegistrarController) Owner() (common.Address, error)
"function owner() view returns (address)",
func (*RegistrarController) Prices ¶
func (c *RegistrarController) Prices() (common.Address, error)
"function prices() view returns (address)",
func (*RegistrarController) RecoverFunds ¶
func (c *RegistrarController) RecoverFunds(opts *bind.TransactOpts, token common.Address, to common.Address, amount *big.Int) (*types.Transaction, error)
"function recoverFunds(address,address,uint256)",
func (*RegistrarController) Register ¶
func (c *RegistrarController) Register(opts *bind.TransactOpts, name string, owner common.Address, duration *big.Int, secret [32]byte, resolver common.Address, data [][]byte, reverseRecord bool, fuses uint32, wrapperExpiry uint64) (*types.Transaction, error)
"function register(string,address,uint256,bytes32,address,bytes[],bool,uint32,uint64) payable",
func (*RegistrarController) Renew ¶
func (c *RegistrarController) Renew(opts *bind.TransactOpts, domain string) (*types.Transaction, error)
Renew renews a registered domain.
func (*RegistrarController) RenewWithFuses ¶
func (c *RegistrarController) RenewWithFuses(opts *bind.TransactOpts, name string, duration *big.Int, fuses uint32, wrapperExpiry uint64) (*types.Transaction, error)
"function renewWithFuses(string,uint256,uint32,uint64) payable",
func (*RegistrarController) RenounceOwnership ¶
func (c *RegistrarController) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error)
"function renounceOwnership()",
func (*RegistrarController) RentCost ¶
func (c *RegistrarController) RentCost(domain string) (*big.Int, error)
RentCost returns the cost of rent in wei-per-second.
func (*RegistrarController) RentPrice ¶
func (c *RegistrarController) RentPrice(opts *bind.CallOpts, name string, duration *big.Int) (registrarcontroller.IPriceOraclePrice, error)
"function rentPrice(string,uint256) view returns (tuple(uint256,uint256))",
func (*RegistrarController) Reveal ¶
func (c *RegistrarController) Reveal(opts *bind.TransactOpts, domain string, owner common.Address, duration *big.Int, secret [32]byte) (*types.Transaction, error)
Reveal reveals a commitment to register a domain.
func (*RegistrarController) ReverseRegistrar ¶
func (c *RegistrarController) ReverseRegistrar() (common.Address, error)
"function reverseRegistrar() view returns (address)",
func (*RegistrarController) SupportsInterface ¶
func (c *RegistrarController) SupportsInterface(opts *bind.CallOpts, interfaceID [4]byte) (bool, error)
"function supportsInterface(bytes4) pure returns (bool)",
func (*RegistrarController) TransferOwnership ¶
func (c *RegistrarController) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error)
"function transferOwnership(address)",
func (*RegistrarController) Withdraw ¶
func (c *RegistrarController) Withdraw(opts *bind.TransactOpts) (*types.Transaction, error)
"function withdraw()"
type Registry ¶
type Registry struct { Contract *registry.Contract ContractAddr common.Address // contains filtered or unexported fields }
Registry is the structure for the registry contract
func NewRegistry ¶
func NewRegistry(backend bind.ContractBackend) (*Registry, error)
NewRegistry obtains the ENS registry
func (*Registry) ResolverAddress ¶
ResolverAddress returns the address of the resolver for a name
func (*Registry) SetOwner ¶
func (r *Registry) SetOwner(opts *bind.TransactOpts, name string, address common.Address) (*types.Transaction, error)
SetOwner sets the ownership of a domain
func (*Registry) SetResolver ¶
func (r *Registry) SetResolver(opts *bind.TransactOpts, name string, address common.Address) (*types.Transaction, error)
SetResolver sets the resolver for a name
func (*Registry) SetSubdomainOwner ¶
func (r *Registry) SetSubdomainOwner(opts *bind.TransactOpts, name string, subname string, address common.Address) (*types.Transaction, error)
SetSubdomainOwner sets the ownership of a subdomain, potentially creating it in the process
type Resolver ¶
type Resolver struct { Contract *publicresolver.Contract ContractAddr common.Address // contains filtered or unexported fields }
Resolver is the structure for the public resolver contract
func NewResolver ¶
func NewResolver(backend bind.ContractBackend, domain string) (*Resolver, error)
NewResolver obtains an Public resolver for a given domain
func NewResolverAt ¶
func NewResolverAt(backend bind.ContractBackend, domain string, address common.Address) (*Resolver, error)
NewResolverAt obtains an ENS resolver at a given address
func (*Resolver) Contenthash ¶
Contenthash returns the content hash of the domain
func (*Resolver) InterfaceImplementer ¶
InterfaceImplementer returns the address of the contract that implements the given interface for the given domain
func (*Resolver) MultiAddress ¶
MultiAddress returns the address of the domain for a given coin type. The coin type is as per https://github.com/satoshilabs/slips/blob/master/slip-0044.md
func (*Resolver) SetABI ¶
func (r *Resolver) SetABI(opts *bind.TransactOpts, name string, abi string, contentType *big.Int) (*types.Transaction, error)
SetABI sets the ABI associated with a name
func (*Resolver) SetContenthash ¶
func (r *Resolver) SetContenthash(opts *bind.TransactOpts, contenthash []byte) (*types.Transaction, error)
SetContenthash sets the content hash of the domain
func (*Resolver) SetPubKey ¶
func (r *Resolver) SetPubKey(opts *bind.TransactOpts, x [32]byte, y [32]byte) (*types.Transaction, error)
SetPubKey sets the public key of the domain
func (*Resolver) SetText ¶
func (r *Resolver) SetText(opts *bind.TransactOpts, name string, value string) (*types.Transaction, error)
SetText sets the text associated with a name