syntax = "proto3"; package pb; message Claim { oneof type { Stream stream = 1; Channel channel = 2; } } message Channel { bytes public_key = 1; string title = 2; string description = 3; string thumbnail_url = 4; repeated string tags = 5; repeated Language language = 6; repeated Location location = 7; string contact_email = 8; string homepage_url = 9; string cover_url = 10; } message Stream { bytes sd_hash = 1; string title = 2; string description = 3; string thumbnail_url = 4; repeated string tags = 5; repeated Language language = 6; repeated Location location = 7; string author = 8; string license = 9; string license_url = 10; int64 release_time = 11; // seconds since UNIX epoch string media_type = 13; File file = 14; Fee fee = 15; oneof type { Image image = 16; Video video = 17; Audio audio = 18; } } message Fee { enum Currency { LBC = 0; USD = 2; } Currency currency = 1; bytes address = 2; uint64 amount = 3; // deweys for LBC, cents for USD } message File { bytes hash = 3; string name = 1; uint64 size = 2; } message Image { uint32 width = 1; uint32 height = 2; } message Video { uint32 width = 1; uint32 height = 2; uint32 duration = 3; } message Audio { uint32 duration = 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; double latitude = 5; double 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; } }