diff --git a/v2/proto/result.proto b/v2/proto/result.proto new file mode 100644 index 0000000..09f4690 --- /dev/null +++ b/v2/proto/result.proto @@ -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; +}