rpc

package
v0.0.0-...-e2b9c72 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2018 License: BSD-2-Clause Imports: 63 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BIP22ValidationResult

func BIP22ValidationResult(err error) (interface{}, error)

func GenCertPair

func GenCertPair(certFile, keyFile string) error

GenCertPair generates a key/cert pair to the paths provided.

func NewTLSCertPair

func NewTLSCertPair(organization string, validUntil time.Time, extraHosts []string) (cert, key []byte, err error)

NewTLSCertPair returns a new PEM-encoded x.509 certificate pair based on a 521-bit ECDSA private key. The machine's local interface addresses and all variants of IPv4 and IPv6 localhost are included as valid IP addresses.

func ScriptToAsmStr

func ScriptToAsmStr(s *script.Script, attemptSighashDecode bool) string

func SetupRPCListeners

func SetupRPCListeners() ([]net.Listener, error)

SetupRPCListeners returns a slice of listeners that are configured for use with the RPC server depending on the configuration settings for listen addresses and TLS.

func TxInErrorToJSON

func TxInErrorToJSON(in *txin.TxIn, errorMessage string) *btcjson.SignRawTransactionError

Types

type Server

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

Server provides a concurrent safe RPC server to a chain server.

func InitRPCServer

func InitRPCServer() (*Server, error)

func NewServer

func NewServer(config *ServerConfig) (*Server, error)

func (*Server) RequestedProcessShutdown

func (s *Server) RequestedProcessShutdown() <-chan struct{}

RequestedProcessShutdown returns a channel that is sent to when an authorized RPC client requests the process to shutdown. If the request can not be read immediately, it is dropped.

func (*Server) Start

func (s *Server) Start()

Start func starts the rpc listener.

func (*Server) Stop

func (s *Server) Stop() error

Stop is used by server.go to stop the rpc listener.

type ServerConfig

type ServerConfig struct {
	Listeners []net.Listener
	// unix timestamp for when the server that is hosting the RPC server started.
	StartupTime int64
}

Directories

Path Synopsis
Package btcjson provides primitives for working with the bitcoin JSON-RPC API.
Package btcjson provides primitives for working with the bitcoin JSON-RPC API.

Jump to

Keyboard shortcuts

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