diff --git a/src/middleware/custom.rs b/src/middleware/custom.rs index 306e464..642284b 100644 --- a/src/middleware/custom.rs +++ b/src/middleware/custom.rs @@ -404,6 +404,14 @@ impl CustomPredicateBatch { Arc::new(cpb) } + pub fn new_opaque(name: String, id: Hash) -> Arc { + Arc::new(Self { + id, + name, + predicates: vec![], + }) + } + /// Cryptographic identifier for the batch. fn calculate_id(&self, params: &Params) -> Hash { // NOTE: This implementation just hashes the concatenation of all the custom predicates,