135 lines
3.1 KiB
Protocol Buffer
135 lines
3.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
option go_package = "github.com/lbryio/hub/protobuf/go/pb";
|
|
|
|
package pb;
|
|
|
|
service Hub {
|
|
rpc Search (SearchRequest) returns (SearchReply) {}
|
|
}
|
|
|
|
message RangeQuery {
|
|
enum Op {
|
|
EQ = 0;
|
|
LTE = 1;
|
|
GTE = 2;
|
|
LT = 3;
|
|
GT = 4;
|
|
}
|
|
Op op = 1;
|
|
repeated string value = 2;
|
|
}
|
|
|
|
message SearchRequest {
|
|
string query = 1;
|
|
string name = 2;
|
|
int32 amount_order = 3;
|
|
int32 limit = 4;
|
|
string order_by = 5;
|
|
int32 offset = 6;
|
|
bool is_controlling = 7;
|
|
string last_take_over_height = 20;
|
|
repeated string claim_id = 21;
|
|
repeated string claim_name = 22;
|
|
repeated string normalized = 23;
|
|
RangeQuery tx_position = 24;
|
|
RangeQuery amount = 25;
|
|
RangeQuery timestamp = 26;
|
|
RangeQuery creation_timestamp = 27;
|
|
RangeQuery height = 28;
|
|
RangeQuery creation_height = 29;
|
|
RangeQuery activation_height = 30;
|
|
RangeQuery expiration_height = 31;
|
|
RangeQuery release_time = 32;
|
|
repeated string short_url = 33;
|
|
repeated string canonical_url = 34;
|
|
repeated string title = 35;
|
|
repeated string author = 36;
|
|
repeated string description = 37;
|
|
repeated string claim_type = 38;
|
|
RangeQuery reposted = 39;
|
|
repeated string stream_type = 40;
|
|
repeated string media_type = 41;
|
|
RangeQuery fee_amount = 42;
|
|
repeated string fee_currency = 43;
|
|
RangeQuery duration = 44;
|
|
string reposted_claim_hash = 45;
|
|
RangeQuery censor_type = 46;
|
|
string claims_in_channel = 47;
|
|
RangeQuery channel_join = 48;
|
|
string signature_valid = 49;
|
|
RangeQuery effective_amount = 50;
|
|
RangeQuery support_amount = 51;
|
|
RangeQuery trending_group = 52;
|
|
RangeQuery trending_mixed = 53;
|
|
RangeQuery trending_local = 54;
|
|
RangeQuery trending_global = 55;
|
|
repeated string channel_id = 56;
|
|
repeated string tx_id = 57;
|
|
string tx_nout = 58;
|
|
repeated string signature = 59;
|
|
repeated string signature_digest = 60;
|
|
repeated string public_key_bytes = 61;
|
|
repeated string public_key_hash = 62;
|
|
string public_key_id = 63;
|
|
repeated bytes _id = 64;
|
|
repeated string tags = 65;
|
|
repeated string reposted_claim_id = 66;
|
|
}
|
|
|
|
message SearchReply {
|
|
repeated Output txos = 1;
|
|
repeated Output extra_txos = 2;
|
|
uint32 total = 3;
|
|
uint32 offset = 4;
|
|
repeated Blocked blocked = 5;
|
|
uint32 blocked_total = 6;
|
|
}
|
|
|
|
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;
|
|
Output repost = 2;
|
|
string short_url = 3;
|
|
string canonical_url = 4;
|
|
bool is_controlling = 5;
|
|
uint32 take_over_height = 6;
|
|
uint32 creation_height = 7;
|
|
uint32 activation_height = 8;
|
|
uint32 expiration_height = 9;
|
|
uint32 claims_in_channel = 10;
|
|
uint32 reposted = 11;
|
|
|
|
uint64 effective_amount = 20;
|
|
uint64 support_amount = 21;
|
|
uint32 trending_group = 22;
|
|
float trending_mixed = 23;
|
|
float trending_local = 24;
|
|
float trending_global = 25;
|
|
}
|
|
|
|
message Error {
|
|
enum Code {
|
|
UNKNOWN_CODE = 0;
|
|
NOT_FOUND = 1;
|
|
INVALID = 2;
|
|
BLOCKED = 3;
|
|
}
|
|
Code code = 1;
|
|
string text = 2;
|
|
Blocked blocked = 3;
|
|
}
|
|
|
|
message Blocked {
|
|
uint32 count = 1;
|
|
Output channel = 2;
|
|
}
|