mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 20:24:21 +01:00
* add admin service * go mod tidy * fix linter: grpc.Dial * fix ocean get balance * fix linter * add .vscode to gitignore * rework admin balance API * fix mockedwallet in covenantless pkg * make proto
85 lines
1.7 KiB
Protocol Buffer
85 lines
1.7 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package ark.v1;
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
service AdminService {
|
|
rpc GetBalance(GetBalanceRequest) returns (GetBalanceResponse) {
|
|
option (google.api.http) = {
|
|
get: "/v1/admin/balance"
|
|
};
|
|
}
|
|
rpc GetScheduledSweep(GetScheduledSweepRequest) returns (GetScheduledSweepResponse) {
|
|
option (google.api.http) = {
|
|
get: "/v1/admin/sweeps"
|
|
};
|
|
}
|
|
rpc GetRoundDetails(GetRoundDetailsRequest) returns (GetRoundDetailsResponse) {
|
|
option (google.api.http) = {
|
|
get: "/v1/admin/round/{round_id}"
|
|
};
|
|
}
|
|
rpc GetRounds(GetRoundsRequest) returns (GetRoundsResponse) {
|
|
option (google.api.http) = {
|
|
post: "/v1/admin/rounds"
|
|
body: "*"
|
|
};
|
|
}
|
|
}
|
|
|
|
message GetBalanceRequest {}
|
|
|
|
message Balance {
|
|
string locked = 1;
|
|
string available = 2;
|
|
}
|
|
|
|
message GetBalanceResponse {
|
|
Balance main_account = 1;
|
|
Balance connectors_account = 2;
|
|
}
|
|
|
|
message GetScheduledSweepRequest {}
|
|
|
|
message SweepableOutput {
|
|
string txid = 1;
|
|
uint32 vout = 2;
|
|
string amount = 3;
|
|
int64 scheduled_at = 4;
|
|
}
|
|
|
|
message ScheduledSweep {
|
|
string round_id = 1;
|
|
repeated SweepableOutput outputs = 2;
|
|
}
|
|
|
|
message GetScheduledSweepResponse {
|
|
repeated ScheduledSweep sweeps = 1;
|
|
}
|
|
|
|
message GetRoundDetailsRequest {
|
|
string round_id = 1;
|
|
}
|
|
|
|
message GetRoundDetailsResponse {
|
|
string round_id = 1;
|
|
string txid = 2;
|
|
string forfeited_amount = 3;
|
|
string total_vtxos_amount = 4;
|
|
string total_exit_amount = 5;
|
|
string fees_amount = 6;
|
|
repeated string inputs_vtxos = 7;
|
|
repeated string outputs_vtxos = 8;
|
|
repeated string exit_addresses = 9;
|
|
}
|
|
|
|
message GetRoundsRequest {
|
|
int64 after = 1;
|
|
int64 before = 2;
|
|
}
|
|
|
|
message GetRoundsResponse {
|
|
repeated string rounds = 1;
|
|
}
|