server

package
v0.0.0-...-2926831 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConsensusPort = "5052"
)

Variables

This section is empty.

Functions

func ListenAndServeConsensusServer

func ListenAndServeConsensusServer(config *config.Config, db *db.DB) error

func ListenAndServeValidatorServer

func ListenAndServeValidatorServer(config *config.Config, db *db.DB) error

func ListenAndServeWrapperServer

func ListenAndServeWrapperServer(config *config.Config, db *db.DB) error

Types

type ConsensusPubNonce

type ConsensusPubNonce struct {
	IP          string
	PubKeyNonce []byte
}

type ConsensusServer

type ConsensusServer struct {
	DB     *db.DB
	Config *config.Config
}

func (*ConsensusServer) PublicKeyForNonce

func (*ConsensusServer) SchnorrPartialSign

type ValidatorServer

type ValidatorServer struct {
	DB     *db.DB
	Config *config.Config
}

func (*ValidatorServer) ConsensusSign

func (vs *ValidatorServer) ConsensusSign(cardID string, nonce []byte, cardData *models.CardData) (*threshold.Signature, error)

func (*ValidatorServer) DasId

func (vs *ValidatorServer) DasId() string

func (*ValidatorServer) DischargeMacaroon

func (vs *ValidatorServer) DischargeMacaroon(consensusSignature *threshold.Signature) ([]byte, error)

func (*ValidatorServer) GetHost

func (vs *ValidatorServer) GetHost() string

func (*ValidatorServer) GetPort

func (vs *ValidatorServer) GetPort() string

func (*ValidatorServer) Sign

type WrapperServer

type WrapperServer struct {
	DB     *db.DB
	Config *config.Config
}

func (*WrapperServer) Add

func (*WrapperServer) GetCardId

func (s *WrapperServer) GetCardId(ctx context.Context, request *proto.CardIdRequest) (*proto.CardIdResponse, error)

Jump to

Keyboard shortcuts

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