added a new protobuf for paginating txo results #29

Merged
eukreign merged 8 commits from txo into master 2019-05-20 21:07:55 +02:00

42
v2/proto/result.proto Normal file
View file

@ -0,0 +1,42 @@
syntax = "proto3";
package pb;
message Outputs {
repeated Output txos = 1;
uint32 total = 2;
uint32 offset = 3;
}
message Output {
bytes tx_hash = 1;
uint32 nout = 2;
uint32 height = 3;
oneof meta {
ClaimMeta claim = 7;
Error error = 15;
}
}
message ClaimMeta {
Output channel = 1;
bool is_controlling = 2;
uint32 activation_height = 3;
uint64 effective_amount = 4;
uint64 support_amount = 5;
uint32 claims_in_channel = 6;
uint32 trending_group = 7;
float trending_mixed = 8;
float trending_local = 9;
float trending_global = 10;
}
message Error {
enum Code {
UNKNOWN_CODE = 0;
NOT_FOUND = 1;
INVALID = 2;
}
Code code = 1;
string text = 2;
}