Versions in this module Expand all Collapse all v1 v1.0.1 Sep 28, 2018 v1.0.0 Jul 9, 2018 Changes in this version + const DefaultHTTPHost + const DefaultHTTPPort + const DefaultWSHost + const DefaultWSPort + var DefaultConfig = Config + var ErrDatadirUsed = errors.New("datadir already used by another process") + var ErrNodeRunning = errors.New("node already running") + var ErrNodeStopped = errors.New("node not started") + var ErrServiceUnknown = errors.New("unknown service") + func DefaultDataDir() string + func DefaultHTTPEndpoint() string + func DefaultIPCEndpoint(clientIdentifier string) string + func DefaultWSEndpoint() string + type Config struct + DataDir string + HTTPCors []string + HTTPHost string + HTTPModules []string + HTTPPort int + HTTPVirtualHosts []string + IPCPath string + KeyStoreDir string + Logger log.Logger + Name string + NoUSB bool + P2P p2p.Config + UseLightweightKDF bool + UserIdent string + Version string + WSExposeAll bool + WSHost string + WSModules []string + WSOrigins []string + WSPort int + func (c *Config) AccountConfig() (int, int, string, error) + func (c *Config) HTTPEndpoint() string + func (c *Config) IPCEndpoint() string + func (c *Config) NodeDB() string + func (c *Config) NodeKey() *ecdsa.PrivateKey + func (c *Config) NodeName() string + func (c *Config) StaticNodes() []*discover.Node + func (c *Config) TrustedNodes() []*discover.Node + func (c *Config) WSEndpoint() string + type DuplicateServiceError struct + Kind reflect.Type + func (e *DuplicateServiceError) Error() string + type Node struct + func New(conf *Config) (*Node, error) + func (n *Node) AccountManager() *accounts.Manager + func (n *Node) Attach() (*rpc.Client, error) + func (n *Node) DataDir() string + func (n *Node) EventMux() *event.TypeMux + func (n *Node) HTTPEndpoint() string + func (n *Node) IPCEndpoint() string + func (n *Node) InstanceDir() string + func (n *Node) OpenDatabase(name string, cache, handles int) (letdb.Database, error) + func (n *Node) RPCHandler() (*rpc.Server, error) + func (n *Node) Register(constructor ServiceConstructor) error + func (n *Node) ResolvePath(x string) string + func (n *Node) Restart() error + func (n *Node) Server() *p2p.Server + func (n *Node) Service(service interface{}) error + func (n *Node) Start() error + func (n *Node) Stop() error + func (n *Node) WSEndpoint() string + func (n *Node) Wait() + type PrivateAdminAPI struct + func NewPrivateAdminAPI(node *Node) *PrivateAdminAPI + func (api *PrivateAdminAPI) AddPeer(url string) (bool, error) + func (api *PrivateAdminAPI) PeerEvents(ctx context.Context) (*rpc.Subscription, error) + func (api *PrivateAdminAPI) RemovePeer(url string) (bool, error) + func (api *PrivateAdminAPI) StartRPC(host *string, port *int, cors *string, apis *string, vhosts *string) (bool, error) + func (api *PrivateAdminAPI) StartWS(host *string, port *int, allowedOrigins *string, apis *string) (bool, error) + func (api *PrivateAdminAPI) StopRPC() (bool, error) + func (api *PrivateAdminAPI) StopWS() (bool, error) + type PublicAdminAPI struct + func NewPublicAdminAPI(node *Node) *PublicAdminAPI + func (api *PublicAdminAPI) Datadir() string + func (api *PublicAdminAPI) NodeInfo() (*p2p.NodeInfo, error) + func (api *PublicAdminAPI) Peers() ([]*p2p.PeerInfo, error) + type PublicDebugAPI struct + func NewPublicDebugAPI(node *Node) *PublicDebugAPI + func (api *PublicDebugAPI) Metrics(raw bool) (map[string]interface{}, error) + type PublicWeb3API struct + func NewPublicWeb3API(stack *Node) *PublicWeb3API + func (s *PublicWeb3API) ClientVersion() string + func (s *PublicWeb3API) Sha3(input hexutil.Bytes) hexutil.Bytes + type Service interface + APIs func() []rpc.API + Protocols func() []p2p.Protocol + Start func(server *p2p.Server) error + Stop func() error + type ServiceConstructor func(ctx *ServiceContext) (Service, error) + type ServiceContext struct + AccountManager *accounts.Manager + EventMux *event.TypeMux + func (ctx *ServiceContext) NodeKey() *ecdsa.PrivateKey + func (ctx *ServiceContext) OpenDatabase(name string, cache int, handles int) (letdb.Database, error) + func (ctx *ServiceContext) ResolvePath(path string) string + func (ctx *ServiceContext) Service(service interface{}) error + type StopError struct + Server error + Services map[reflect.Type]error + func (e *StopError) Error() string