Documentation ¶
Index ¶
- Constants
- func BIP22ValidationResult(err error) (interface{}, error)
- func GenCertPair(certFile, keyFile string) error
- func GetNetworkHashPS(lookup int32, height int32) float64
- func GetTransaction(hash *util.Hash, allowSlow bool) (*tx.Tx, *util.Hash, bool)
- func GetTxnOutputType(sType int) string
- func HelpExampleCli(methodname string, args ...string) string
- func HelpExampleRPC(methodname string, args ...string) string
- func NewTLSCertPair(organization string, validUntil time.Time, extraHosts []string) (cert, key []byte, err error)
- func ScriptPubKeyToJSON(script *script.Script, includeHex bool) *btcjson.ScriptPubKeyResult
- func ScriptToAsmStr(s *script.Script, attemptSighashDecode bool) string
- func SetupRPCListeners() ([]net.Listener, error)
- func TxInErrorToJSON(in *txin.TxIn, errorMessage string) *btcjson.SignRawTransactionError
- type Server
- type ServerConfig
Constants ¶
const ( DebugCmd = "" BlockChainCmd = "BlockChain" ControlCmd = "Control" GeneratingCmd = "Generating" MiningCmd = "Mining" NetworkCmd = "Network" RawTransactionsCmd = "RawTransactions" UtilCmd = "Util" WalletCmd = "Wallet" )
Variables ¶
This section is empty.
Functions ¶
func BIP22ValidationResult ¶
func GenCertPair ¶
GenCertPair generates a key/cert pair to the paths provided.
func GetNetworkHashPS ¶ added in v0.0.3
func GetTransaction ¶
func GetTxnOutputType ¶
func HelpExampleCli ¶ added in v0.0.5
func HelpExampleRPC ¶ added in v0.0.5
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 ScriptPubKeyToJSON ¶
func ScriptPubKeyToJSON(script *script.Script, includeHex bool) *btcjson.ScriptPubKeyResult
func SetupRPCListeners ¶
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(timeSource *util.MedianTime) (*Server, error)
func NewServer ¶
func NewServer(config *ServerConfig, ts *util.MedianTime) (*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.
type ServerConfig ¶
type ServerConfig struct { Listeners []net.Listener // unix timestamp for when the server that is hosting the RPC server started. StartupTime int64 ConnMgr server.RPCConnManager }