Versions in this module Expand all Collapse all v0 v0.1.0 May 8, 2018 Changes in this version + const DefaultHTTPApis + const DefaultIPCApis + const JSONRPCVersion + const LatestBlockNumber + const MetadataApi + const PendingBlockNumber + var ErrNotificationNotFound = errors.New("notification not found") + var ErrNotificationsUnsupported = errors.New("notifications not supported") + func CreateIPCListener(endpoint string) (net.Listener, error) + func NewHTTPServer(corsString string, srv *Server) *http.Server + func NewWSServer(allowedOrigins string, handler *Server) *http.Server + func SupportedModules(client Client) (map[string]string, error) + type API struct + Namespace string + Public bool + Service interface{} + Version string + type BlockNumber int64 + func (bn *BlockNumber) Int64() int64 + func (bn *BlockNumber) UnmarshalJSON(data []byte) error + type Client interface + Close func() + Recv func(msg interface{}) error + Send func(req interface{}) error + SupportedModules func() (map[string]string, error) + func NewClient(uri string) (Client, error) + func NewInProcRPCClient(handler *Server) Client + type CodecOption int + const OptionMethodInvocation + const OptionSubscriptions + type HexNumber big.Int + func NewHexNumber(val interface{}) *HexNumber + func (h *HexNumber) BigInt() *big.Int + func (h *HexNumber) Int() int + func (h *HexNumber) Int64() int64 + func (h *HexNumber) MarshalJSON() ([]byte, error) + func (h *HexNumber) Uint() uint + func (h *HexNumber) Uint64() uint64 + func (h *HexNumber) UnmarshalJSON(input []byte) error + type JSONError struct + Code int + Data interface{} + Message string + type JSONRequest struct + Id json.RawMessage + Method string + Payload json.RawMessage + Version string + type JSONResponse struct + Error *JSONError + Id interface{} + Result interface{} + Version string + type Notifier interface + NewSubscription func(UnsubscribeCallback) (Subscription, error) + Unsubscribe func(id string) error + func NotifierFromContext(ctx context.Context) (Notifier, bool) + type RPCError interface + Code func() int + Error func() string + type RPCService struct + func (s *RPCService) Modules() map[string]string + type Server struct + func NewServer() *Server + func (s *Server) RegisterName(name string, rcvr interface{}) error + func (s *Server) ServeCodec(codec ServerCodec, options CodecOption) + func (s *Server) ServeSingleRequest(codec ServerCodec, options CodecOption) + func (s *Server) Stop() + type ServerCodec interface + Close func() + Closed func() <-chan interface{} + CreateErrorResponse func(interface{}, RPCError) interface{} + CreateErrorResponseWithInfo func(id interface{}, err RPCError, info interface{}) interface{} + CreateNotification func(string, interface{}) interface{} + CreateResponse func(interface{}, interface{}) interface{} + ParseRequestArguments func([]reflect.Type, interface{}) ([]reflect.Value, RPCError) + ReadRequestHeaders func() ([]rpcRequest, bool, RPCError) + Write func(interface{}) error + func NewJSONCodec(rwc io.ReadWriteCloser) ServerCodec + type Subscription interface + Cancel func() error + ID func() string + Notify func(data interface{}) error + type UnsubscribeCallback func(id string)