Files
ark/api-spec/protobuf/coordinator/v1/service.proto
Pietralberto Mazza 26e8db1d6e Update protos (#3)
2023-11-07 12:15:51 +01:00

89 lines
1.9 KiB
Protocol Buffer
Executable File

syntax = "proto3";
package coordinator.v1;
import "google/api/annotations.proto";
service CoordinatorService {
rpc RegisterPayment(RegisterPaymentRequest) returns (RegisterPaymentResponse) {
option (google.api.http) = {
post: "/v1/payment/register"
body: "*"
};
};
rpc ClaimPayment(ClaimPaymentRequest) returns (ClaimPaymentResponse) {
option (google.api.http) = {
post: "/v1/payment/claim"
body: "*"
};
};
rpc FinalizePayment(FinalizePaymentRequest) returns (FinalizePaymentResponse) {
option (google.api.http) = {
post: "/v1/payment/finalize"
body: "*"
};
};
rpc ListRounds(ListRoundsRequest) returns (ListRoundsResponse) {
option (google.api.http) = {
post: "/v1/rounds"
body: "*"
};
};
rpc GetRound(GetRoundRequest) returns (GetRoundResponse) {
option (google.api.http) = {
get: "/v1/round/{txid}"
};
};
}
message RegisterPaymentRequest {
// Unsigned forfeit tx sending all funds back to the ASP.
string vtx = 1;
}
message RegisterPaymentResponse {
// Mocks wabisabi's credentials.
string id = 1;
// Forfeit tx signed by the ASP.
string signed_vtx = 2;
}
message ClaimPaymentRequest {
// Mocks wabisabi's credentials.
string id = 1;
// List of receivers for a registered payment.
repeated Output outputs = 2;
}
message ClaimPaymentResponse {}
message FinalizePaymentRequest {
// Forfeit tx signed also by the user.
string signed_vtx = 1;
}
message FinalizePaymentResponse {}
message ListRoundsRequest {
int64 start = 1;
int64 end = 2;
}
message ListRoundsResponse {
repeated Round rounds = 1;
}
message GetRoundRequest {
string txid = 1;
}
message GetRoundResponse {
Round round = 1;
}
message Round {
int64 start = 1;
int64 end = 2;
string txid = 3;
repeated Output outputs = 4;
}
message Output {
string pubkey = 1;
uint64 amount = 2;
}