rpc

package
v0.0.0-...-3d164b4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package rpc implements the Ethereum 2.0 Prysm remote signer spec.

It implements gRPC server for the following protobuf service definition: https://github.com/prysmaticlabs/prysm/blob/develop/proto/prysm/v1alpha1/validator-client/keymanager.proto

Note: this implementation is meant to be a reference, and not meant to be used as is in production.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string
	Port     string
	CertFlag string
	KeyFlag  string
	KeyVault keyvault.Store
}

Config options for the gRPC server.

type RemoteSigner

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

RemoteSigner capable of signing requests by using BLS secret keys retrieved from a keyvault.

func NewRemoteSigner

func NewRemoteSigner(ctx context.Context, keyVault keyvault.Store) *RemoteSigner

NewRemoteSigner instantiates a new server instance using a keyvault for retrieving.

func (*RemoteSigner) ListValidatingPublicKeys

func (r *RemoteSigner) ListValidatingPublicKeys(
	ctx context.Context, _ *emptypb.Empty,
) (*validatorpb.ListPublicKeysResponse, error)

ListValidatingPublicKeys retrieves the BLS public keys available for signing in the remote signer.

func (*RemoteSigner) Sign

Sign a remote request by retrieving the corresponding secret key for the public key in the request from a keyvault. If we have already signed the data in the request, we return a DENIED signing response.

type Server

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

Server defining a gRPC server for the remote signer API.

func NewServer

func NewServer(ctx context.Context, cfg *Config) *Server

NewServer instantiates a new gRPC server.

func (*Server) Start

func (s *Server) Start()

Start the gRPC server.

func (*Server) Status

func (s *Server) Status() error

Status returns nil or credentialError.

func (*Server) Stop

func (s *Server) Stop() error

Stop the gRPC server.

Jump to

Keyboard shortcuts

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