1use warg_crypto::hash::AnyHash;
4use warg_protocol::registry::{LogId, RecordId};
5
6pub fn fetch_logs() -> &'static str {
8 "v1/fetch/logs"
9}
10
11pub fn fetch_checkpoint() -> &'static str {
13 "v1/fetch/checkpoint"
14}
15
16pub fn fetch_package_names() -> &'static str {
18 "v1/fetch/names"
19}
20
21pub fn ledger_sources() -> &'static str {
23 "v1/ledger"
24}
25
26pub fn publish_package_record(log_id: &LogId) -> String {
28 format!("v1/package/{log_id}/record")
29}
30
31pub fn content_sources(digest: &AnyHash) -> String {
33 format!("v1/content/{digest}")
34}
35
36pub fn package_record(log_id: &LogId, record_id: &RecordId) -> String {
38 format!("v1/package/{log_id}/record/{record_id}")
39}
40
41pub fn prove_consistency() -> &'static str {
43 "v1/proof/consistency"
44}
45
46pub fn prove_inclusion() -> &'static str {
48 "v1/proof/inclusion"
49}
50
51pub fn verify_checkpoint() -> &'static str {
53 "v1/verify/checkpoint"
54}