757 lines
13 KiB
Protocol Buffer
757 lines
13 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package pb;
|
|
|
|
message Claim {
|
|
string title = 1;
|
|
string description = 2;
|
|
string thumbnail_url = 3;
|
|
repeated string tags = 4;
|
|
repeated Language languages = 5;
|
|
repeated Location locations = 6;
|
|
|
|
oneof type {
|
|
Stream stream = 10;
|
|
Channel channel = 11;
|
|
ClaimList claim_list = 12;
|
|
}
|
|
}
|
|
|
|
message Channel {
|
|
bytes public_key = 1;
|
|
string contact_email = 2;
|
|
string homepage_url = 3;
|
|
string cover_url = 4;
|
|
}
|
|
|
|
message Stream {
|
|
bytes sd_hash = 1;
|
|
|
|
string author = 2;
|
|
string license = 3;
|
|
string license_url = 4;
|
|
int64 release_time = 5; // seconds since UNIX epoch
|
|
|
|
string media_type = 6;
|
|
File file = 7;
|
|
Fee fee = 8;
|
|
|
|
oneof type {
|
|
Image image = 16;
|
|
Video video = 17;
|
|
Audio audio = 18;
|
|
Software software = 19;
|
|
}
|
|
}
|
|
|
|
message ClaimList {
|
|
repeated bytes claims = 1;
|
|
}
|
|
|
|
message Fee {
|
|
enum Currency {
|
|
UNKNOWN_CURRENCY = 0;
|
|
LBC = 1;
|
|
BTC = 2;
|
|
USD = 3;
|
|
}
|
|
Currency currency = 1;
|
|
bytes address = 2;
|
|
uint64 amount = 3; // deweys for LBC/BTC, cents for USD
|
|
}
|
|
|
|
message File {
|
|
bytes hash = 1;
|
|
string name = 2;
|
|
uint64 size = 3;
|
|
}
|
|
|
|
message Image {
|
|
uint32 width = 1;
|
|
uint32 height = 2;
|
|
}
|
|
|
|
message Video {
|
|
uint32 width = 1;
|
|
uint32 height = 2;
|
|
Audio audio = 3;
|
|
}
|
|
|
|
message Audio {
|
|
uint32 duration = 1;
|
|
}
|
|
|
|
message Software {
|
|
enum OS {
|
|
UNKNOWN_OS = 0;
|
|
ANY = 1;
|
|
LINUX = 2;
|
|
WINDOWS = 3;
|
|
MAC = 4;
|
|
ANDROID = 5;
|
|
IOS = 6;
|
|
}
|
|
string os = 1;
|
|
}
|
|
|
|
// RFC 5646
|
|
message Language {
|
|
Language language = 1;
|
|
Script script = 2;
|
|
Location.Country region = 3;
|
|
|
|
// ISO 639-1
|
|
enum Language {
|
|
UNKNOWN_LANGUAGE = 0;
|
|
en = 1;
|
|
aa = 2;
|
|
ab = 3;
|
|
ae = 4;
|
|
af = 5;
|
|
ak = 6;
|
|
am = 7;
|
|
an = 8;
|
|
ar = 9;
|
|
as = 10;
|
|
av = 11;
|
|
ay = 12;
|
|
az = 13;
|
|
ba = 14;
|
|
be = 15;
|
|
bg = 16;
|
|
bh = 17;
|
|
bi = 18;
|
|
bm = 19;
|
|
bn = 20;
|
|
bo = 21;
|
|
br = 22;
|
|
bs = 23;
|
|
ca = 24;
|
|
ce = 25;
|
|
ch = 26;
|
|
co = 27;
|
|
cr = 28;
|
|
cs = 29;
|
|
cu = 30;
|
|
cv = 31;
|
|
cy = 32;
|
|
da = 33;
|
|
de = 34;
|
|
dv = 35;
|
|
dz = 36;
|
|
ee = 37;
|
|
el = 38;
|
|
eo = 39;
|
|
es = 40;
|
|
et = 41;
|
|
eu = 42;
|
|
fa = 43;
|
|
ff = 44;
|
|
fi = 45;
|
|
fj = 46;
|
|
fo = 47;
|
|
fr = 48;
|
|
fy = 49;
|
|
ga = 50;
|
|
gd = 51;
|
|
gl = 52;
|
|
gn = 53;
|
|
gu = 54;
|
|
gv = 55;
|
|
ha = 56;
|
|
he = 57;
|
|
hi = 58;
|
|
ho = 59;
|
|
hr = 60;
|
|
ht = 61;
|
|
hu = 62;
|
|
hy = 63;
|
|
hz = 64;
|
|
ia = 65;
|
|
id = 66;
|
|
ie = 67;
|
|
ig = 68;
|
|
ii = 69;
|
|
ik = 70;
|
|
io = 71;
|
|
is = 72;
|
|
it = 73;
|
|
iu = 74;
|
|
ja = 75;
|
|
jv = 76;
|
|
ka = 77;
|
|
kg = 78;
|
|
ki = 79;
|
|
kj = 80;
|
|
kk = 81;
|
|
kl = 82;
|
|
km = 83;
|
|
kn = 84;
|
|
ko = 85;
|
|
kr = 86;
|
|
ks = 87;
|
|
ku = 88;
|
|
kv = 89;
|
|
kw = 90;
|
|
ky = 91;
|
|
la = 92;
|
|
lb = 93;
|
|
lg = 94;
|
|
li = 95;
|
|
ln = 96;
|
|
lo = 97;
|
|
lt = 98;
|
|
lu = 99;
|
|
lv = 100;
|
|
mg = 101;
|
|
mh = 102;
|
|
mi = 103;
|
|
mk = 104;
|
|
ml = 105;
|
|
mn = 106;
|
|
mr = 107;
|
|
ms = 108;
|
|
mt = 109;
|
|
my = 110;
|
|
na = 111;
|
|
nb = 112;
|
|
nd = 113;
|
|
ne = 114;
|
|
ng = 115;
|
|
nl = 116;
|
|
nn = 117;
|
|
no = 118;
|
|
nr = 119;
|
|
nv = 120;
|
|
ny = 121;
|
|
oc = 122;
|
|
oj = 123;
|
|
om = 124;
|
|
or = 125;
|
|
os = 126;
|
|
pa = 127;
|
|
pi = 128;
|
|
pl = 129;
|
|
ps = 130;
|
|
pt = 131;
|
|
qu = 132;
|
|
rm = 133;
|
|
rn = 134;
|
|
ro = 135;
|
|
ru = 136;
|
|
rw = 137;
|
|
sa = 138;
|
|
sc = 139;
|
|
sd = 140;
|
|
se = 141;
|
|
sg = 142;
|
|
si = 143;
|
|
sk = 144;
|
|
sl = 145;
|
|
sm = 146;
|
|
sn = 147;
|
|
so = 148;
|
|
sq = 149;
|
|
sr = 150;
|
|
ss = 151;
|
|
st = 152;
|
|
su = 153;
|
|
sv = 154;
|
|
sw = 155;
|
|
ta = 156;
|
|
te = 157;
|
|
tg = 158;
|
|
th = 159;
|
|
ti = 160;
|
|
tk = 161;
|
|
tl = 162;
|
|
tn = 163;
|
|
to = 164;
|
|
tr = 165;
|
|
ts = 166;
|
|
tt = 167;
|
|
tw = 168;
|
|
ty = 169;
|
|
ug = 170;
|
|
uk = 171;
|
|
ur = 172;
|
|
uz = 173;
|
|
ve = 174;
|
|
vi = 175;
|
|
vo = 176;
|
|
wa = 177;
|
|
wo = 178;
|
|
xh = 179;
|
|
yi = 180;
|
|
yo = 181;
|
|
za = 182;
|
|
zh = 183;
|
|
zu = 184;
|
|
}
|
|
|
|
// ISO 15924
|
|
enum Script {
|
|
UNKNOWN_SCRIPT = 0;
|
|
Adlm = 1;
|
|
Afak = 2;
|
|
Aghb = 3;
|
|
Ahom = 4;
|
|
Arab = 5;
|
|
Aran = 6;
|
|
Armi = 7;
|
|
Armn = 8;
|
|
Avst = 9;
|
|
Bali = 10;
|
|
Bamu = 11;
|
|
Bass = 12;
|
|
Batk = 13;
|
|
Beng = 14;
|
|
Bhks = 15;
|
|
Blis = 16;
|
|
Bopo = 17;
|
|
Brah = 18;
|
|
Brai = 19;
|
|
Bugi = 20;
|
|
Buhd = 21;
|
|
Cakm = 22;
|
|
Cans = 23;
|
|
Cari = 24;
|
|
Cham = 25;
|
|
Cher = 26;
|
|
Cirt = 27;
|
|
Copt = 28;
|
|
Cpmn = 29;
|
|
Cprt = 30;
|
|
Cyrl = 31;
|
|
Cyrs = 32;
|
|
Deva = 33;
|
|
Dogr = 34;
|
|
Dsrt = 35;
|
|
Dupl = 36;
|
|
Egyd = 37;
|
|
Egyh = 38;
|
|
Egyp = 39;
|
|
Elba = 40;
|
|
Elym = 41;
|
|
Ethi = 42;
|
|
Geok = 43;
|
|
Geor = 44;
|
|
Glag = 45;
|
|
Gong = 46;
|
|
Gonm = 47;
|
|
Goth = 48;
|
|
Gran = 49;
|
|
Grek = 50;
|
|
Gujr = 51;
|
|
Guru = 52;
|
|
Hanb = 53;
|
|
Hang = 54;
|
|
Hani = 55;
|
|
Hano = 56;
|
|
Hans = 57;
|
|
Hant = 58;
|
|
Hatr = 59;
|
|
Hebr = 60;
|
|
Hira = 61;
|
|
Hluw = 62;
|
|
Hmng = 63;
|
|
Hmnp = 64;
|
|
Hrkt = 65;
|
|
Hung = 66;
|
|
Inds = 67;
|
|
Ital = 68;
|
|
Jamo = 69;
|
|
Java = 70;
|
|
Jpan = 71;
|
|
Jurc = 72;
|
|
Kali = 73;
|
|
Kana = 74;
|
|
Khar = 75;
|
|
Khmr = 76;
|
|
Khoj = 77;
|
|
Kitl = 78;
|
|
Kits = 79;
|
|
Knda = 80;
|
|
Kore = 81;
|
|
Kpel = 82;
|
|
Kthi = 83;
|
|
Lana = 84;
|
|
Laoo = 85;
|
|
Latf = 86;
|
|
Latg = 87;
|
|
Latn = 88;
|
|
Leke = 89;
|
|
Lepc = 90;
|
|
Limb = 91;
|
|
Lina = 92;
|
|
Linb = 93;
|
|
Lisu = 94;
|
|
Loma = 95;
|
|
Lyci = 96;
|
|
Lydi = 97;
|
|
Mahj = 98;
|
|
Maka = 99;
|
|
Mand = 100;
|
|
Mani = 101;
|
|
Marc = 102;
|
|
Maya = 103;
|
|
Medf = 104;
|
|
Mend = 105;
|
|
Merc = 106;
|
|
Mero = 107;
|
|
Mlym = 108;
|
|
Modi = 109;
|
|
Mong = 110;
|
|
Moon = 111;
|
|
Mroo = 112;
|
|
Mtei = 113;
|
|
Mult = 114;
|
|
Mymr = 115;
|
|
Nand = 116;
|
|
Narb = 117;
|
|
Nbat = 118;
|
|
Newa = 119;
|
|
Nkdb = 120;
|
|
Nkgb = 121;
|
|
Nkoo = 122;
|
|
Nshu = 123;
|
|
Ogam = 124;
|
|
Olck = 125;
|
|
Orkh = 126;
|
|
Orya = 127;
|
|
Osge = 128;
|
|
Osma = 129;
|
|
Palm = 130;
|
|
Pauc = 131;
|
|
Perm = 132;
|
|
Phag = 133;
|
|
Phli = 134;
|
|
Phlp = 135;
|
|
Phlv = 136;
|
|
Phnx = 137;
|
|
Plrd = 138;
|
|
Piqd = 139;
|
|
Prti = 140;
|
|
Qaaa = 141;
|
|
Qabx = 142;
|
|
Rjng = 143;
|
|
Rohg = 144;
|
|
Roro = 145;
|
|
Runr = 146;
|
|
Samr = 147;
|
|
Sara = 148;
|
|
Sarb = 149;
|
|
Saur = 150;
|
|
Sgnw = 151;
|
|
Shaw = 152;
|
|
Shrd = 153;
|
|
Shui = 154;
|
|
Sidd = 155;
|
|
Sind = 156;
|
|
Sinh = 157;
|
|
Sogd = 158;
|
|
Sogo = 159;
|
|
Sora = 160;
|
|
Soyo = 161;
|
|
Sund = 162;
|
|
Sylo = 163;
|
|
Syrc = 164;
|
|
Syre = 165;
|
|
Syrj = 166;
|
|
Syrn = 167;
|
|
Tagb = 168;
|
|
Takr = 169;
|
|
Tale = 170;
|
|
Talu = 171;
|
|
Taml = 172;
|
|
Tang = 173;
|
|
Tavt = 174;
|
|
Telu = 175;
|
|
Teng = 176;
|
|
Tfng = 177;
|
|
Tglg = 178;
|
|
Thaa = 179;
|
|
Thai = 180;
|
|
Tibt = 181;
|
|
Tirh = 182;
|
|
Ugar = 183;
|
|
Vaii = 184;
|
|
Visp = 185;
|
|
Wara = 186;
|
|
Wcho = 187;
|
|
Wole = 188;
|
|
Xpeo = 189;
|
|
Xsux = 190;
|
|
Yiii = 191;
|
|
Zanb = 192;
|
|
Zinh = 193;
|
|
Zmth = 194;
|
|
Zsye = 195;
|
|
Zsym = 196;
|
|
Zxxx = 197;
|
|
Zyyy = 198;
|
|
Zzzz = 199;
|
|
}
|
|
}
|
|
|
|
message Location {
|
|
Country country = 1;
|
|
string state = 2;
|
|
string city = 3;
|
|
string code = 4;
|
|
sint32 latitude = 5;
|
|
sint32 longitude = 6;
|
|
|
|
enum Country {
|
|
UNKNOWN_COUNTRY = 0;
|
|
AF = 1;
|
|
AX = 2;
|
|
AL = 3;
|
|
DZ = 4;
|
|
AS = 5;
|
|
AD = 6;
|
|
AO = 7;
|
|
AI = 8;
|
|
AQ = 9;
|
|
AG = 10;
|
|
AR = 11;
|
|
AM = 12;
|
|
AW = 13;
|
|
AU = 14;
|
|
AT = 15;
|
|
AZ = 16;
|
|
BS = 17;
|
|
BH = 18;
|
|
BD = 19;
|
|
BB = 20;
|
|
BY = 21;
|
|
BE = 22;
|
|
BZ = 23;
|
|
BJ = 24;
|
|
BM = 25;
|
|
BT = 26;
|
|
BO = 27;
|
|
BQ = 28;
|
|
BA = 29;
|
|
BW = 30;
|
|
BV = 31;
|
|
BR = 32;
|
|
IO = 33;
|
|
BN = 34;
|
|
BG = 35;
|
|
BF = 36;
|
|
BI = 37;
|
|
KH = 38;
|
|
CM = 39;
|
|
CA = 40;
|
|
CV = 41;
|
|
KY = 42;
|
|
CF = 43;
|
|
TD = 44;
|
|
CL = 45;
|
|
CN = 46;
|
|
CX = 47;
|
|
CC = 48;
|
|
CO = 49;
|
|
KM = 50;
|
|
CG = 51;
|
|
CD = 52;
|
|
CK = 53;
|
|
CR = 54;
|
|
CI = 55;
|
|
HR = 56;
|
|
CU = 57;
|
|
CW = 58;
|
|
CY = 59;
|
|
CZ = 60;
|
|
DK = 61;
|
|
DJ = 62;
|
|
DM = 63;
|
|
DO = 64;
|
|
EC = 65;
|
|
EG = 66;
|
|
SV = 67;
|
|
GQ = 68;
|
|
ER = 69;
|
|
EE = 70;
|
|
ET = 71;
|
|
FK = 72;
|
|
FO = 73;
|
|
FJ = 74;
|
|
FI = 75;
|
|
FR = 76;
|
|
GF = 77;
|
|
PF = 78;
|
|
TF = 79;
|
|
GA = 80;
|
|
GM = 81;
|
|
GE = 82;
|
|
DE = 83;
|
|
GH = 84;
|
|
GI = 85;
|
|
GR = 86;
|
|
GL = 87;
|
|
GD = 88;
|
|
GP = 89;
|
|
GU = 90;
|
|
GT = 91;
|
|
GG = 92;
|
|
GN = 93;
|
|
GW = 94;
|
|
GY = 95;
|
|
HT = 96;
|
|
HM = 97;
|
|
VA = 98;
|
|
HN = 99;
|
|
HK = 100;
|
|
HU = 101;
|
|
IS = 102;
|
|
IN = 103;
|
|
ID = 104;
|
|
IR = 105;
|
|
IQ = 106;
|
|
IE = 107;
|
|
IM = 108;
|
|
IL = 109;
|
|
IT = 110;
|
|
JM = 111;
|
|
JP = 112;
|
|
JE = 113;
|
|
JO = 114;
|
|
KZ = 115;
|
|
KE = 116;
|
|
KI = 117;
|
|
KP = 118;
|
|
KR = 119;
|
|
KW = 120;
|
|
KG = 121;
|
|
LA = 122;
|
|
LV = 123;
|
|
LB = 124;
|
|
LS = 125;
|
|
LR = 126;
|
|
LY = 127;
|
|
LI = 128;
|
|
LT = 129;
|
|
LU = 130;
|
|
MO = 131;
|
|
MK = 132;
|
|
MG = 133;
|
|
MW = 134;
|
|
MY = 135;
|
|
MV = 136;
|
|
ML = 137;
|
|
MT = 138;
|
|
MH = 139;
|
|
MQ = 140;
|
|
MR = 141;
|
|
MU = 142;
|
|
YT = 143;
|
|
MX = 144;
|
|
FM = 145;
|
|
MD = 146;
|
|
MC = 147;
|
|
MN = 148;
|
|
ME = 149;
|
|
MS = 150;
|
|
MA = 151;
|
|
MZ = 152;
|
|
MM = 153;
|
|
NA = 154;
|
|
NR = 155;
|
|
NP = 156;
|
|
NL = 157;
|
|
NC = 158;
|
|
NZ = 159;
|
|
NI = 160;
|
|
NE = 161;
|
|
NG = 162;
|
|
NU = 163;
|
|
NF = 164;
|
|
MP = 165;
|
|
NO = 166;
|
|
OM = 167;
|
|
PK = 168;
|
|
PW = 169;
|
|
PS = 170;
|
|
PA = 171;
|
|
PG = 172;
|
|
PY = 173;
|
|
PE = 174;
|
|
PH = 175;
|
|
PN = 176;
|
|
PL = 177;
|
|
PT = 178;
|
|
PR = 179;
|
|
QA = 180;
|
|
RE = 181;
|
|
RO = 182;
|
|
RU = 183;
|
|
RW = 184;
|
|
BL = 185;
|
|
SH = 186;
|
|
KN = 187;
|
|
LC = 188;
|
|
MF = 189;
|
|
PM = 190;
|
|
VC = 191;
|
|
WS = 192;
|
|
SM = 193;
|
|
ST = 194;
|
|
SA = 195;
|
|
SN = 196;
|
|
RS = 197;
|
|
SC = 198;
|
|
SL = 199;
|
|
SG = 200;
|
|
SX = 201;
|
|
SK = 202;
|
|
SI = 203;
|
|
SB = 204;
|
|
SO = 205;
|
|
ZA = 206;
|
|
GS = 207;
|
|
SS = 208;
|
|
ES = 209;
|
|
LK = 210;
|
|
SD = 211;
|
|
SR = 212;
|
|
SJ = 213;
|
|
SZ = 214;
|
|
SE = 215;
|
|
CH = 216;
|
|
SY = 217;
|
|
TW = 218;
|
|
TJ = 219;
|
|
TZ = 220;
|
|
TH = 221;
|
|
TL = 222;
|
|
TG = 223;
|
|
TK = 224;
|
|
TO = 225;
|
|
TT = 226;
|
|
TN = 227;
|
|
TR = 228;
|
|
TM = 229;
|
|
TC = 230;
|
|
TV = 231;
|
|
UG = 232;
|
|
UA = 233;
|
|
AE = 234;
|
|
GB = 235;
|
|
US = 236;
|
|
UM = 237;
|
|
UY = 238;
|
|
UZ = 239;
|
|
VU = 240;
|
|
VE = 241;
|
|
VN = 242;
|
|
VG = 243;
|
|
VI = 244;
|
|
WF = 245;
|
|
EH = 246;
|
|
YE = 247;
|
|
ZM = 248;
|
|
ZW = 249;
|
|
}
|
|
}
|