Versions in this module Expand all Collapse all v1 v1.9.2 Aug 23, 2019 v1.9.0 Jul 31, 2019 Changes in this version + const DefaultGraphQLHost + const DefaultGraphQLPort + 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 + ExternalSigner string + GraphQLCors []string + GraphQLHost string + GraphQLPort int + GraphQLVirtualHosts []string + HTTPCors []string + HTTPHost string + HTTPModules []string + HTTPPort int + HTTPTimeouts rpc.HTTPTimeouts + HTTPVirtualHosts []string + IPCPath string + InsecureUnlockAllowed bool + KeyStoreDir string + Logger log.Logger + Name string + NoUSB bool + P2P p2p.Config + SmartCardDaemonPath string + SportEnableNodePermissionFlag bool + 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) ExtRPCEnabled() bool + func (c *Config) GraphQLEndpoint() string + 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) ResolvePath(path string) string + func (c *Config) StaticNodes() []*enode.Node + func (c *Config) TrustedNodes() []*enode.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) Close() error + func (n *Node) Config() *Config + 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, namespace string) (ethdb.Database, error) + func (n *Node) OpenDatabaseWithFreezer(name string, cache, handles int, freezer, namespace string) (ethdb.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) AddTrustedPeer(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) RemoveTrustedPeer(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 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) ExtRPCEnabled() bool + func (ctx *ServiceContext) NodeKey() *ecdsa.PrivateKey + func (ctx *ServiceContext) OpenDatabase(name string, cache int, handles int, namespace string) (ethdb.Database, error) + func (ctx *ServiceContext) OpenDatabaseWithFreezer(name string, cache int, handles int, freezer string, namespace string) (ethdb.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