Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoAuth = er.GenericErrorType.CodeWithDetail("legacyrpc.ErrNoAuth",
"no auth")
ErrNoAuth represents an error where authentication could not succeed due to a missing Authorization HTTP header.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { Username string Password string MaxPOSTClients int64 MaxWebsocketClients int64 }
Options contains the required options for running the legacy RPC server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds the items the RPC server may need to access (auth, config, shutdown, etc.)
func NewServer ¶
NewServer creates a new server for serving legacy RPC client connections, both HTTP POST and websocket.
func (*Server) RegisterWallet ¶
RegisterWallet associates the legacy RPC server with the wallet. This function must be called before any wallet RPCs can be called by clients.
func (*Server) RequestProcessShutdown ¶
func (s *Server) RequestProcessShutdown() <-chan struct{}
RequestProcessShutdown returns a channel that is sent to when an authorized client requests remote shutdown.
func (*Server) SetChainServer ¶
SetChainServer sets the chain server client component needed to run a fully functional bitcoin wallet RPC server. This can be called to enable RPC passthrough even before a loaded wallet is set, but the wallet's RPC client is preferred.