Skip to content

Commit

Permalink
Do parameter derivation in the wrapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
tolikzinovyev committed Nov 25, 2024
1 parent d0329fc commit 2b9f44d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/centralized_telescope/wrapper.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use super::algorithm;
use super::init::make_setup;
use super::params::Params;
use super::proof::Proof;
use super::setup::Setup;
use crate::utils::types::Element;
Expand All @@ -10,8 +12,15 @@ pub struct Wrapper {
}

impl Wrapper {
/// Initialize ALBA with `Setup` parameters.
pub fn new(setup: &Setup) -> Self {
/// Initialize ALBA with `Params`.
pub fn create(params: &Params) -> Self {
let setup = make_setup(params);
Self::create_with_setup(&setup)
}

/// Initialize ALBA with `Setup`. This function is unsafe to use and should
/// be avoided.
pub fn create_with_setup(setup: &Setup) -> Self {
Self { setup: *setup }
}

Expand Down

0 comments on commit 2b9f44d

Please sign in to comment.