Documentation ¶
Index ¶
- type Config
- type Server
- func (s *Server) CreateAccount(ctx context.Context, _ *ptypes.Empty) (*pb.CreateAccountResponse, error)
- func (s *Server) CreateWallet(ctx context.Context, req *pb.CreateWalletRequest) (*pb.WalletResponse, error)
- func (s *Server) EditConfig(ctx context.Context, req *pb.EditWalletConfigRequest) (*pb.WalletResponse, error)
- func (s *Server) GenerateMnemonic(ctx context.Context, _ *ptypes.Empty) (*pb.GenerateMnemonicResponse, error)
- func (s *Server) GetBeaconNodeConnection(ctx context.Context, _ *ptypes.Empty) (*pb.NodeConnectionResponse, error)
- func (s *Server) JWTInterceptor() grpc.UnaryServerInterceptor
- func (s *Server) ListAccounts(ctx context.Context, req *pb.ListAccountsRequest) (*pb.ListAccountsResponse, error)
- func (s *Server) Login(ctx context.Context, req *pb.AuthRequest) (*pb.AuthResponse, error)
- func (s *Server) Signup(ctx context.Context, req *pb.AuthRequest) (*pb.AuthResponse, error)
- func (s *Server) Start()
- func (s *Server) Status() error
- func (s *Server) Stop() error
- func (s *Server) WalletConfig(ctx context.Context, _ *ptypes.Empty) (*pb.WalletResponse, error)
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 ValDB db.Database ValidatorService *client.ValidatorService SyncChecker client.SyncChecker GenesisFetcher client.GenesisFetcher WalletInitializedFeed *event.Feed NodeGatewayEndpoint string }
Config options for the gRPC server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server defining a gRPC server for the remote signer API.
func (*Server) CreateAccount ¶
func (s *Server) CreateAccount(ctx context.Context, _ *ptypes.Empty) (*pb.CreateAccountResponse, error)
CreateAccount allows creation of a new account in a user's wallet via RPC.
func (*Server) CreateWallet ¶
func (s *Server) CreateWallet(ctx context.Context, req *pb.CreateWalletRequest) (*pb.WalletResponse, error)
CreateWallet via an API request, allowing a user to save a new derived, direct, or remote wallet.
func (*Server) EditConfig ¶
func (s *Server) EditConfig(ctx context.Context, req *pb.EditWalletConfigRequest) (*pb.WalletResponse, error)
EditConfig allows the user to edit their wallet's keymanageropts.
func (*Server) GenerateMnemonic ¶
func (s *Server) GenerateMnemonic(ctx context.Context, _ *ptypes.Empty) (*pb.GenerateMnemonicResponse, error)
GenerateMnemonic creates a new, random bip39 mnemonic phrase.
func (*Server) GetBeaconNodeConnection ¶
func (s *Server) GetBeaconNodeConnection(ctx context.Context, _ *ptypes.Empty) (*pb.NodeConnectionResponse, error)
GetBeaconNodeConnection retrieves the current beacon node connection information, as well as its sync status.
func (*Server) JWTInterceptor ¶
func (s *Server) JWTInterceptor() grpc.UnaryServerInterceptor
JWTInterceptor is a gRPC unary interceptor to authorize incoming requests for methods that are NOT in the noAuthPaths configuration map.
func (*Server) ListAccounts ¶
func (s *Server) ListAccounts(ctx context.Context, req *pb.ListAccountsRequest) (*pb.ListAccountsResponse, error)
ListAccounts allows retrieval of validating keys and their petnames for a user's wallet via RPC.
func (*Server) Login ¶
func (s *Server) Login(ctx context.Context, req *pb.AuthRequest) (*pb.AuthResponse, error)
Login to authenticate with the validator RPC API using a password.
func (*Server) Signup ¶
func (s *Server) Signup(ctx context.Context, req *pb.AuthRequest) (*pb.AuthResponse, error)
Signup to authenticate access to the validator RPC API using bcrypt and a sufficiently strong password check.
func (*Server) WalletConfig ¶
WalletConfig returns the wallet's configuration. If no wallet exists, we return an empty response.