use warg_crypto::hash::AnyHash;
use warg_protocol::registry::{LogId, RecordId};
pub fn fetch_logs() -> &'static str {
"v1/fetch/logs"
}
pub fn fetch_checkpoint() -> &'static str {
"v1/fetch/checkpoint"
}
pub fn fetch_package_names() -> &'static str {
"v1/fetch/names"
}
pub fn ledger_sources() -> &'static str {
"v1/ledger"
}
pub fn publish_package_record(log_id: &LogId) -> String {
format!("v1/package/{log_id}/record")
}
pub fn content_sources(digest: &AnyHash) -> String {
format!("v1/content/{digest}")
}
pub fn package_record(log_id: &LogId, record_id: &RecordId) -> String {
format!("v1/package/{log_id}/record/{record_id}")
}
pub fn prove_consistency() -> &'static str {
"v1/proof/consistency"
}
pub fn prove_inclusion() -> &'static str {
"v1/proof/inclusion"
}
pub fn verify_checkpoint() -> &'static str {
"v1/verify/checkpoint"
}