1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use chain_impl_mockchain::certificate::Certificate as CertificateLib;
use wasm_bindgen::prelude::*;

pub mod vote_cast;
pub mod vote_plan;

#[wasm_bindgen]
pub struct Certificate(pub(crate) CertificateLib);

#[wasm_bindgen]
impl Certificate {
    pub fn vote_cast(vote_cast: vote_cast::VoteCast) -> Certificate {
        Certificate(CertificateLib::VoteCast(vote_cast.0))
    }
}