syntax = "proto3"; package ethereum.validator.accounts.v2; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; service Wallet { rpc CreateWallet(CreateWalletRequest) returns (WalletResponse) { option (google.api.http) = { post: "/v2/validator/wallet/create", body: "*" }; } rpc EditConfig(EditWalletConfigRequest) returns (WalletResponse) { option (google.api.http) = { post: "/v2/validator/wallet/config/edit", body: "*" }; } rpc WalletConfig(google.protobuf.Empty) returns (WalletResponse) { option (google.api.http) = { get: "/v2/validator/wallet/config" }; } } service Accounts { rpc CreateAccount(google.protobuf.Empty) returns (CreateAccountResponse) { option (google.api.http) = { post: "/v2/validator/accounts/create", body: "*" }; } rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse) { option (google.api.http) = { get: "/v2/validator/accounts" }; } } service Health { rpc ListBalances(AccountRequest) returns (ListBalancesResponse) { option (google.api.http) = { get: "/v2/validator/balances" }; } rpc ListStatuses(AccountRequest) returns (ListStatusesResponse) { option (google.api.http) = { get: "/v2/validator/statuses" }; } rpc ListPerformance(AccountRequest) returns (ListPerformanceResponse) { option (google.api.http) = { get: "/v2/validator/performances" }; } } service Auth { rpc Login(AuthRequest) returns (AuthResponse) { option (google.api.http) = { post: "/v2/validator/login", body: "*" }; } rpc Signup(AuthRequest) returns (AuthResponse) { option (google.api.http) = { post: "/v2/validator/signup", body: "*" }; } } message CreateWalletRequest { // Path on disk where the wallet will be stored. string wallet_path = 1; // Type of key manager for the wallet, either direct, derived, or remote. enum KeymanagerKind { DERIVED = 0; DIRECT = 1; REMOTE = 2; } KeymanagerKind keymanager = 2; // Password for the wallet. string wallet_password = 3; // Remote address such as host.example.com:4000 for a gRPC remote signer server. string remote_addr = 4; // Path to client.crt for secure TLS connections to a remote signer server. string remote_crt_path = 5; // Path to client.key for secure TLS connections to a remote signer server. string remote_key_path = 6; // Path to ca.crt for secure TLS connections to a remote signer server. string remote_ca_crt_path = 7; } message EditWalletConfigRequest { string remote_addr = 1; string remote_crt_path = 2; string remote_key_path = 3; string remote_ca_crt_path = 4; } message WalletResponse { string wallet_path = 1; // Key manager configs, this is meant to be some what generic. // It'll later be encoded with json to represent in front end UI. message KeymanagerConfig { map configs = 1; } KeymanagerConfig keymanager_config = 2; } message CreateAccountResponse { Account account = 1; } message ListAccountsRequest { // Whether or not to return the raw RLP deposit tx data. bool get_deposit_tx_data = 1; } message ListAccountsResponse { repeated Account accounts = 1; } message Account { // The validating public key. bytes validating_public_key = 1; // The human readable account name. string account_name = 2; // The deposit data transaction RLP bytes. bytes deposit_tx_data = 3; // The derivation path (if using HD wallet). string derivation_path = 4; } message AccountRequest { // A list of validator public keys. repeated bytes public_keys = 1; // A list of validator indices. repeated uint64 indices = 2; } message ListBalancesResponse { // A list of validator public keys. repeated bytes public_keys = 1; // A list of validator indices. repeated uint64 indices = 2; // A list of validator balances that maps to public keys and indices. repeated uint64 balances = 3; } message ListStatusesResponse { // A list of validator public keys. repeated bytes public_keys = 1; // A list of validator indices. repeated uint64 indices = 2; // A list of validator statuses that maps to public keys and indices. enum ValidatorStatus { UNKNOWN_STATUS = 0; DEPOSITED = 1; PENDING = 2; ACTIVE = 3; EXITING = 4; SLASHING = 5; EXITED = 6; INVALID = 7; } repeated ValidatorStatus statuses = 3; } message ListPerformanceResponse { // A list of validator public keys. repeated bytes public_keys = 1; // A list of validator indices. repeated uint64 indices = 2; // A list of block / attestation submission count since last launch. message Submission { uint64 block_count = 1; uint64 attestation_count = 2; } repeated Submission submissions = 3; } message AuthRequest { string password = 1; } message AuthResponse { string token = 1; uint64 token_expiration = 2; }