1
- interface hypermap- binding-cacher {
1
+ interface binding-cacher {
2
2
// Metadata associated with a batch of Ethereum logs.
3
- record logs-metadata {
3
+ record binding- logs-metadata {
4
4
chain-id : string ,
5
5
from-block : string ,
6
6
to-block : string ,
@@ -10,47 +10,47 @@ interface hypermap-binding-cacher {
10
10
}
11
11
12
12
// Represents an item in the manifest, detailing a single log cache file.
13
- record manifest-item {
14
- metadata : logs-metadata ,
13
+ record binding- manifest-item {
14
+ metadata : binding- logs-metadata ,
15
15
is-empty : bool ,
16
16
file-hash : string ,
17
17
file-name : string ,
18
18
}
19
19
20
20
// The main manifest structure, listing all available log cache files.
21
21
// WIT does not support direct map types, so a list of key-value tuples is used.
22
- record manifest {
22
+ record binding- manifest {
23
23
// The key is the filename of the log cache.
24
- items : list <tuple <string , manifest-item >>,
24
+ items : list <tuple <string , binding- manifest-item >>,
25
25
manifest-filename : string ,
26
26
chain-id : string ,
27
27
protocol-version : string ,
28
28
}
29
29
30
- record get-logs-by-range-request {
30
+ record binding- get-logs-by-range-request {
31
31
from-block : u64 ,
32
32
to-block : option <u64 >, // If None, signifies to the latest available/relevant cached block.
33
33
}
34
34
35
- variant get-logs-by-range-ok-response {
35
+ variant binding- get-logs-by-range-ok-response {
36
36
logs (tuple <u64 , string >),
37
37
latest (u64 ),
38
38
}
39
39
40
- // Defines the types of requests that can be sent to the Hypermap Binding Cacher process.
41
- variant cacher-request {
40
+ // Defines the types of requests that can be sent to the Hypermap Cacher process.
41
+ variant binding- cacher-request {
42
42
get-manifest ,
43
43
get-log-cache-content (string ),
44
44
get-status ,
45
- get-logs-by-range (get-logs-by-range-request ),
45
+ get-logs-by-range (binding- get-logs-by-range-request ),
46
46
reset (option <list <string >>),
47
47
start-providing ,
48
48
stop-providing ,
49
49
set-nodes (list <string >),
50
50
}
51
51
52
52
// Represents the operational status of the cacher.
53
- record cacher-status {
53
+ record binding- cacher-status {
54
54
last-cached-block : u64 ,
55
55
chain-id : string ,
56
56
protocol-version : string ,
@@ -61,12 +61,12 @@ interface hypermap-binding-cacher {
61
61
is-providing : bool ,
62
62
}
63
63
64
- // Defines the types of responses the Hypermap Binding Cacher process can send.
65
- variant cacher-response {
66
- get-manifest (option <manifest >),
64
+ // Defines the types of responses the Hypermap Cacher process can send.
65
+ variant binding- cacher-response {
66
+ get-manifest (option <binding- manifest >),
67
67
get-log-cache-content (result <option <string >, string >),
68
- get-status (cacher-status ),
69
- get-logs-by-range (result <get-logs-by-range-ok-response , string >),
68
+ get-status (binding- cacher-status ),
69
+ get-logs-by-range (result <binding- get-logs-by-range-ok-response , string >),
70
70
start-providing (result <string , string >),
71
71
stop-providing (result <string , string >),
72
72
set-nodes (result <string , string >),
@@ -156,7 +156,7 @@ interface hypermap-cacher {
156
156
157
157
world hypermap-cacher-sys-v1 {
158
158
import sign ;
159
- import hypermap- binding-cacher ;
159
+ import binding-cacher ;
160
160
import hypermap-cacher ;
161
161
include process-v1 ;
162
162
}
0 commit comments