chainrpc

package
v0.1.1-devnet Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MIT Imports: 41 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, hostnode hostnode.HostNode, wallet wallet.Wallet, ks keystore.Keystore, cm mempool.CoinsMempool) (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