-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathregistry-service.aqua
121 lines (104 loc) · 3.73 KB
/
registry-service.aqua
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
aqua Registry declares *
data ClearExpiredResult:
success: bool
error: string
count_keys: u64
count_records: u64
count_tombstones: u64
data Key:
id: string
label: string
owner_peer_id: string
timestamp_created: u64
challenge: []u8
challenge_type: string
signature: []u8
data RecordMetadata:
key_id: string
issued_by: string
peer_id: string
timestamp_issued: u64
solution: []u8
value: string
relay_id: []string
service_id: []string
issuer_signature: []u8
data Record:
metadata: RecordMetadata
timestamp_created: u64
signature: []u8
data Tombstone:
key_id: string
issued_by: string
peer_id: string
timestamp_issued: u64
solution: []u8
issuer_signature: []u8
data EvictStaleItem:
key: Key
records: []Record
tombstones: []Tombstone
data EvictStaleResult:
success: bool
error: string
results: []EvictStaleItem
data GetKeyMetadataResult:
success: bool
error: string
key: Key
data GetRecordsResult:
success: bool
error: string
result: []Record
data GetTombstonesResult:
success: bool
error: string
result: []Tombstone
data MergeKeysResult:
success: bool
error: string
key: Key
data MergeResult:
success: bool
error: string
result: []Record
data RegisterKeyResult:
success: bool
error: string
key_id: string
data RegistryResult:
success: bool
error: string
data RepublishRecordsResult:
success: bool
error: string
updated: u64
data WeightResult:
success: bool
weight: u32
peer_id: string
error: string
service Registry("registry"):
add_tombstone(key_id: string, issued_by: string, peer_id: string, timestamp_issued: u64, solution: []u8, signature: []u8, current_timestamp_sec: u64) -> RegistryResult
clear_expired(current_timestamp_sec: u64) -> ClearExpiredResult
create_record_metadata(key_id: string, issued_by: string, timestamp_issued: u64, value: string, peer_id: string, relay_id: []string, service_id: []string, solution: []u8, signature: []u8) -> RecordMetadata
evict_stale(current_timestamp_sec: u64) -> EvictStaleResult
get_key_bytes(label: string, owner_peer_id: []string, timestamp_created: u64, challenge: []u8, challenge_type: string) -> []u8
get_key_id(label: string, peer_id: string) -> string
get_key_metadata(key_id: string) -> GetKeyMetadataResult
get_record_bytes(metadata: RecordMetadata, timestamp_created: u64) -> []u8
get_record_metadata_bytes(key_id: string, issued_by: string, timestamp_issued: u64, value: string, peer_id: string, relay_id: []string, service_id: []string, solution: []u8) -> []u8
get_records(key_id: string, current_timestamp_sec: u64) -> GetRecordsResult
get_stale_local_records(current_timestamp_sec: u64) -> GetRecordsResult
get_tombstone_bytes(key_id: string, issued_by: string, peer_id: string, timestamp_issued: u64, solution: []u8) -> []u8
get_tombstones(key_id: string, current_timestamp_sec: u64) -> GetTombstonesResult
merge(records: [][]Record) -> MergeResult
merge_keys(keys: []Key) -> MergeKeysResult
merge_two(a: []Record, b: []Record) -> MergeResult
put_record(metadata: RecordMetadata, timestamp_created: u64, signature: []u8, weight: WeightResult, current_timestamp_sec: u64) -> RegistryResult
register_key(label: string, owner_peer_id: []string, timestamp_created: u64, challenge: []u8, challenge_type: string, signature: []u8, weight: WeightResult, current_timestamp_sec: u64) -> RegisterKeyResult
republish_key(key: Key, weight: WeightResult, current_timestamp_sec: u64) -> RegistryResult
republish_records(records: []Record, weights: []WeightResult, current_timestamp_sec: u64) -> RepublishRecordsResult
republish_tombstones(tombstones: []Tombstone, current_timestamp_sec: u64) -> RegistryResult
set_expired_timeout(timeout_sec: u64)
set_stale_timeout(timeout_sec: u64)