-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.proto
62 lines (56 loc) · 1 KB
/
types.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
syntax = "proto3";
///////////////
// Map Keys and Values
///////////////
enum MappingKeyType {
DOMAIN = 1
EMAIL = 2;
ALIAS = 3;
URL = 4;
}
message Email {
string address = 1;
string domain = 2;
}
message Alias {
oneof alias {
string domain = 1;
Email email = 2;
}
}
message Url {
string path = 1;
string domain = 2;
}
message MappingKey {
oneof key {
string domain = 1;
Email email = 2;
Alias alias = 3;
string url = 4;
}
}
enum MappingValueType {
PUBLIC_KEY = 1
INFO = 2;
SHA256HASH = 3;
URL_COMMITMENT = 4;
POLICY = 5;
}
message MappingValue {
oneof value {
string public_key = 1;
Info info = 2;
string sha256hash = 3;
UrlCommitment commitment = 4;
string policy = 5;
}
message Info {
string name = 1;
string address = 2;
}
message UrlCommitment {
string commitment_url = 1;
string expiry_time = 2;
}
}