eth

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

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 New

func New(ensConfig *contracts.ENSConfig, logger logging.Logger) (*Client, error)

New returns a new ENS manager Client

func (*Client) GetInfo

func (c *Client) GetInfo(username string) (*ecdsa.PublicKey, string, error)

GetInfo returns the public key of the user

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 (c *Client) GetNameHash(username string) ([32]byte, error)

func (*Client) GetOwner

func (c *Client) GetOwner(username string) (common.Address, error)

GetOwner returns the owner of the username

func (*Client) RegisterSubdomain

func (c *Client) RegisterSubdomain(username string, owner common.Address, key *ecdsa.PrivateKey) error

RegisterSubdomain registers the username

func (*Client) SetAll

func (c *Client) SetAll(username string, owner common.Address, key *ecdsa.PrivateKey) error

SetAll sets all the necessary information of the user

func (*Client) SetResolver

func (c *Client) SetResolver(username string, owner common.Address, key *ecdsa.PrivateKey) (string, error)

SetResolver sets the resolver for the username

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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