chainrpc

package
v0.2.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CA      = "ca.pem"
	CaKey   = "ca_key.pem"
	Cert    = "cert.pem"
	CertKey = "cert_key.pem"
)

Functions

func GenerateCerts

func GenerateCerts(dataFolder string) error

GenerateCerts will generate a CA and a certificate for the gRPC tls transport and https.

func LoadCerts

func LoadCerts() (*x509.CertPool, error)

LoadCerts will attempt to load certificates previously generate. If it fails it will generate them and load them again.

Types

type Config

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

Config config for the RPCServer

type RPCServer

type RPCServer interface {
	Stop()
	Start() error
}

RPCServer is an interface for rpcServer

func NewRPCServer

func NewRPCServer(chain chain.Blockchain, h host.Host, wallet wallet.Wallet, ks keystore.Keystore, pool mempool.Pool) (RPCServer, error)

NewRPCServer Returns an RPC server instance

Jump to

Keyboard shortcuts

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