ens

package
v0.0.0-...-34ee9b9 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrFailedToConnect denotes that the resolver failed to connect to the
	// provided endpoint.
	ErrFailedToConnect = errors.New("failed to connect")
	// ErrResolveFailed denotes that a name could not be resolved.
	ErrResolveFailed = errors.New("resolve failed")
	// ErrInvalidContentHash denotes that the value of the contenthash record is
	// not valid.
	ErrInvalidContentHash = errors.New("invalid infinity content hash")
)

Functions

func NewClient

func NewClient(endpoint string, opts ...Option) (client.Interface, error)

NewClient will return a new Client.

Types

type Address

type Address = infinity.Address

Address is the infinity ifi address.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a name resolution client that can connect to ENS via an Ethereum endpoint.

func (*Client) Close

func (c *Client) Close() error

Close closes the RPC connection with the client, terminating all unfinished requests. If the connection is already closed, this call is a noop.

func (*Client) Endpoint

func (c *Client) Endpoint() string

Endpoint returns the endpoint the client was connected to.

func (*Client) IsConnected

func (c *Client) IsConnected() bool

IsConnected returns true if there is an active RPC connection with an Ethereum node at the configured endpoint.

func (*Client) Resolve

func (c *Client) Resolve(name string) (Address, error)

Resolve implements the resolver.Client interface.

type Option

type Option func(*Client)

Option is a function that applies an option to a Client.

func WithContractAddress

func WithContractAddress(addr string) Option

WithContractAddress will set the ENS contract address.

Jump to

Keyboard shortcuts

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