ens

package
v0.184.52 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MPL-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const StatusDomain = "stateofus.eth"

Variables

This section is empty.

Functions

func ExtractCoordinates added in v0.179.29

func ExtractCoordinates(pubkey string) ([32]byte, [32]byte)

func NameHash added in v0.179.29

func NameHash(name string) common.Hash

func UsernameToLabel added in v0.179.29

func UsernameToLabel(username string) [32]byte

func ValidateENSUsername added in v0.179.29

func ValidateENSUsername(username string) error

Types

type API

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

func NewAPI

func NewAPI(rpcClient *rpc.Client, accountsManager *account.GethManager, pendingTracker *transactions.PendingTxTracker, config *params.NodeConfig, appDb *sql.DB, timeSource func() time.Time, syncUserDetailFunc *syncUsernameDetail) *API

func (*API) Add added in v0.125.0

func (api *API) Add(ctx context.Context, chainID uint64, username string) error

func (*API) AddressOf

func (api *API) AddressOf(ctx context.Context, chainID uint64, username string) (*common.Address, error)

func (*API) ContentHash

func (api *API) ContentHash(ctx context.Context, chainID uint64, username string) ([]byte, error)

func (*API) ExpireAt

func (api *API) ExpireAt(ctx context.Context, chainID uint64, username string) (string, error)

func (*API) GetEnsUsernames added in v0.125.0

func (api *API) GetEnsUsernames(ctx context.Context) ([]*UsernameDetail, error)

func (*API) GetName added in v0.113.0

func (api *API) GetName(ctx context.Context, chainID uint64, address common.Address) (string, error)

func (*API) GetRegistrarAddress added in v0.98.1

func (api *API) GetRegistrarAddress(ctx context.Context, chainID uint64) (common.Address, error)

func (*API) OwnerOf

func (api *API) OwnerOf(ctx context.Context, chainID uint64, username string) (*common.Address, error)

func (*API) Price

func (api *API) Price(ctx context.Context, chainID uint64) (string, error)

func (*API) PublicKeyOf

func (api *API) PublicKeyOf(ctx context.Context, chainID uint64, username string) (string, error)

func (*API) Register added in v0.93.2

func (api *API) Register(ctx context.Context, chainID uint64, txArgs transactions.SendTxArgs, password string, username string, pubkey string) (string, error)

func (*API) RegisterEstimate added in v0.93.2

func (api *API) RegisterEstimate(ctx context.Context, chainID uint64, txArgs transactions.SendTxArgs, username string, pubkey string) (uint64, error)

func (*API) RegisterPrepareTx added in v0.94.6

func (api *API) RegisterPrepareTx(ctx context.Context, chainID uint64, txArgs transactions.SendTxArgs, username string, pubkey string) (interface{}, error)

func (*API) RegisterPrepareTxCallMsg added in v0.94.6

func (api *API) RegisterPrepareTxCallMsg(ctx context.Context, chainID uint64, txArgs transactions.SendTxArgs, username string, pubkey string) (ethereum.CallMsg, error)

func (*API) Release added in v0.93.2

func (api *API) Release(ctx context.Context, chainID uint64, txArgs transactions.SendTxArgs, password string, username string) (string, error)

func (*API) ReleaseEstimate added in v0.93.2

func (api *API) ReleaseEstimate(ctx context.Context, chainID uint64, txArgs transactions.SendTxArgs, username string) (uint64, error)

func (*API) ReleasePrepareTx added in v0.171.25

func (api *API) ReleasePrepareTx(ctx context.Context, chainID uint64, txArgs transactions.SendTxArgs, username string) (interface{}, error)

func (*API) ReleasePrepareTxCallMsg added in v0.171.25

func (api *API) ReleasePrepareTxCallMsg(ctx context.Context, chainID uint64, txArgs transactions.SendTxArgs, username string) (ethereum.CallMsg, error)

func (*API) Remove added in v0.125.0

func (api *API) Remove(ctx context.Context, chainID uint64, username string) error

func (*API) Resolver

func (api *API) Resolver(ctx context.Context, chainID uint64, username string) (*common.Address, error)

func (*API) ResourceURL

func (api *API) ResourceURL(ctx context.Context, chainID uint64, username string) (*URI, error)

func (*API) SetPubKey added in v0.93.2

func (api *API) SetPubKey(ctx context.Context, chainID uint64, txArgs transactions.SendTxArgs, password string, username string, pubkey string) (string, error)

func (*API) SetPubKeyEstimate added in v0.93.2

func (api *API) SetPubKeyEstimate(ctx context.Context, chainID uint64, txArgs transactions.SendTxArgs, username string, pubkey string) (uint64, error)

func (*API) SetPubKeyPrepareTx added in v0.94.6

func (api *API) SetPubKeyPrepareTx(ctx context.Context, chainID uint64, txArgs transactions.SendTxArgs, username string, pubkey string) (interface{}, error)

func (*API) SetPubKeyPrepareTxCallMsg added in v0.94.6

func (api *API) SetPubKeyPrepareTxCallMsg(ctx context.Context, chainID uint64, txArgs transactions.SendTxArgs, username string, pubkey string) (ethereum.CallMsg, error)

func (*API) Stop added in v0.106.1

func (api *API) Stop()

type Database added in v0.125.0

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

func NewEnsDatabase added in v0.125.0

func NewEnsDatabase(db *sql.DB) *Database

func (*Database) AddEnsUsername added in v0.125.0

func (db *Database) AddEnsUsername(details *UsernameDetail) error

func (*Database) GetEnsUsernames added in v0.125.0

func (db *Database) GetEnsUsernames(removed *bool) (result []*UsernameDetail, err error)

func (*Database) RemoveEnsUsername added in v0.125.0

func (db *Database) RemoveEnsUsername(details *UsernameDetail) (bool, error)

func (*Database) SaveOrUpdateEnsUsername added in v0.148.3

func (db *Database) SaveOrUpdateEnsUsername(details *UsernameDetail) error

type Service

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

Service is a browsers service.

func NewService

func NewService(rpcClient *rpc.Client, accountsManager *account.GethManager, pendingTracker *transactions.PendingTxTracker, config *params.NodeConfig, appDb *sql.DB, timeSource func() time.Time) *Service

NewService initializes service instance.

func (*Service) API added in v0.101.1

func (s *Service) API() *API

func (*Service) APIs

func (s *Service) APIs() []ethRpc.API

APIs returns list of available RPC APIs.

func (*Service) Init added in v0.148.3

func (s *Service) Init(syncUserDetailFunc syncUsernameDetail)

func (*Service) Protocols

func (s *Service) Protocols() []p2p.Protocol

Protocols returns list of p2p protocols.

func (*Service) Start

func (s *Service) Start() error

Start a service.

func (*Service) Stop

func (s *Service) Stop() error

Stop a service.

type URI added in v0.97.4

type URI struct {
	Scheme string
	Host   string
	Path   string
}

type UsernameDetail added in v0.148.3

type UsernameDetail struct {
	Username string `json:"username"`
	ChainID  uint64 `json:"chainId"`
	Clock    uint64 `json:"clock"`
	Removed  bool   `json:"removed"`
}

Jump to

Keyboard shortcuts

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