mirror of
https://github.com/LBRYFoundation/herald.go.git
synced 2025-10-01 07:30:33 +00:00
103 lines
No EOL
2.8 KiB
Protocol Buffer
103 lines
No EOL
2.8 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
option go_package = "github.com/lbryio/hub/protobuf/go/pb";
|
|
|
|
package pb;
|
|
|
|
message Outputs {
|
|
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;
|
|
}
|
|
|
|
message BlockOutput {
|
|
string hash = 1;
|
|
int32 confirmations = 2;
|
|
}
|
|
/*
|
|
{ (json object)
|
|
"hash" : "hex", (string) the block hash (same as provided)
|
|
"confirmations" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain
|
|
"height" : n, (numeric) The block height or index
|
|
"version" : n, (numeric) The block version
|
|
"versionHex" : "hex", (string) The block version formatted in hexadecimal
|
|
"merkleroot" : "hex", (string) The merkle root
|
|
"time" : xxx, (numeric) The block time expressed in UNIX epoch time
|
|
"mediantime" : xxx, (numeric) The median block time expressed in UNIX epoch time
|
|
"nonce" : n, (numeric) The nonce
|
|
"bits" : "hex", (string) The bits
|
|
"difficulty" : n, (numeric) The difficulty
|
|
"chainwork" : "hex", (string) Expected number of hashes required to produce the current chain
|
|
"nTx" : n, (numeric) The number of transactions in the block
|
|
"previousblockhash" : "hex", (string) The hash of the previous block
|
|
"nextblockhash" : "hex" (string) The hash of the next block
|
|
}
|
|
*/
|
|
message BlockHeaderOutput {
|
|
string hash = 1;
|
|
int64 confirmations = 2;
|
|
int64 height = 3;
|
|
int64 version = 4;
|
|
string versionHex = 5;
|
|
string merkleroot = 6;
|
|
int64 time = 7;
|
|
int64 mediantime = 8;
|
|
int64 nonce = 9;
|
|
string bits = 10;
|
|
double difficulty = 11;
|
|
string chainwork = 12;
|
|
int64 nTx = 13;
|
|
string previousblockhash = 14;
|
|
string nextblockhash = 15;
|
|
} |