feat: initial schema
This commit is contained in:
23
protobufs/arbiter.proto
Normal file
23
protobufs/arbiter.proto
Normal file
@@ -0,0 +1,23 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package arbiter;
|
||||
|
||||
import "auth.proto";
|
||||
|
||||
message ClientMessage {
|
||||
oneof payload {
|
||||
arbiter.auth.AuthChallengeRequest auth_challenge_request = 1;
|
||||
arbiter.auth.AuthChallengeSolution auth_challenge_solution = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message ServerMessage {
|
||||
oneof payload {
|
||||
arbiter.auth.AuthChallenge auth_challenge = 1;
|
||||
arbiter.auth.AuthResponse auth_response = 2;
|
||||
}
|
||||
}
|
||||
|
||||
service Server {
|
||||
rpc Communicate(stream ClientMessage) returns (stream ServerMessage);
|
||||
}
|
||||
@@ -11,22 +11,17 @@ message AuthChallengeRequest {
|
||||
message AuthChallenge {
|
||||
bytes pubkey = 1;
|
||||
bytes nonce = 2;
|
||||
google.protobuf.Timestamp minted = 3;
|
||||
google.protobuf.Timestamp minted = 3 ;
|
||||
}
|
||||
|
||||
message AuthChallengeSolution {
|
||||
AuthChallenge challenge = 1;
|
||||
AuthChallenge challenge = 1 ;
|
||||
bytes signature = 2;
|
||||
}
|
||||
|
||||
message AuthResponse {
|
||||
string token = 1;
|
||||
string refresh_token = 2;
|
||||
google.protobuf.Timestamp expires_at = 3;
|
||||
google.protobuf.Timestamp refresh_expires_at = 4;
|
||||
}
|
||||
|
||||
service AuthService {
|
||||
rpc GetChallenge(AuthChallengeRequest) returns (AuthChallenge);
|
||||
rpc SubmitSolution(AuthChallengeSolution) returns (AuthResponse);
|
||||
}
|
||||
google.protobuf.Timestamp expires_at = 3 ;
|
||||
google.protobuf.Timestamp refresh_expires_at = 4 ;
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package arbiter.evm;
|
||||
Reference in New Issue
Block a user