Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) GetInfo(username string) (*ecdsa.PublicKey, string, error)
- func (c *Client) GetInfoFromNameHash(node [32]byte) (common.Address, *ecdsa.PublicKey, string, error)
- func (c *Client) GetNameHash(username string) ([32]byte, error)
- func (c *Client) GetOwner(username string) (common.Address, error)
- func (c *Client) RegisterSubdomain(username string, owner common.Address, key *ecdsa.PrivateKey) error
- func (c *Client) SetAll(username string, owner common.Address, key *ecdsa.PrivateKey) error
- func (c *Client) SetResolver(username string, owner common.Address, key *ecdsa.PrivateKey) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInsufficientBalance is used to denote user account has low funds for ens registration ErrInsufficientBalance = errors.New("insufficient funds") )
View Source
var ( // ErrWrongChainID denotes the rpc endpoint returned different chainId than the configured one ErrWrongChainID = fmt.Errorf("chainID does not match or not supported") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is used to manage ENS
func (*Client) GetInfoFromNameHash ¶ added in v0.9.3
func (c *Client) GetInfoFromNameHash(node [32]byte) (common.Address, *ecdsa.PublicKey, string, error)
GetInfoFromNameHash returns the public key of the user from nameHash
func (*Client) GetNameHash ¶ added in v0.9.3
func (*Client) RegisterSubdomain ¶
func (c *Client) RegisterSubdomain(username string, owner common.Address, key *ecdsa.PrivateKey) error
RegisterSubdomain registers the username
func (*Client) SetResolver ¶
func (c *Client) SetResolver(username string, owner common.Address, key *ecdsa.PrivateKey) (string, error)
SetResolver sets the resolver for the username
Click to show internal directories.
Click to hide internal directories.