Trait mitrid_core::crypto::commit::Committable [−][src]
pub trait Committable<P, C> where
P: Datable,
C: Datable + ConstantSize,
Self: 'static + Sized, { fn commit_cb(
&self,
params: &P,
cb: &Fn(&Self, &P) -> Result<C>
) -> Result<C> { ... } fn verify_commitment_cb(
&self,
params: &P,
commitment: &C,
cb: &Fn(&Self, &P, &C) -> Result<bool>
) -> Result<bool> { ... } fn check_commitment_cb(
&self,
params: &P,
commitment: &C,
cb: &Fn(&Self, &P, &C) -> Result<()>
) -> Result<()> { ... } }
Trait used by types that can be cryptographically committed.
Provided Methods
fn commit_cb(&self, params: &P, cb: &Fn(&Self, &P) -> Result<C>) -> Result<C>
Commits cryptographically the implementor using Datable
params and a callback.
Returns a commitment.
fn verify_commitment_cb(
&self,
params: &P,
commitment: &C,
cb: &Fn(&Self, &P, &C) -> Result<bool>
) -> Result<bool>
&self,
params: &P,
commitment: &C,
cb: &Fn(&Self, &P, &C) -> Result<bool>
) -> Result<bool>
Verifies a commitment against the implementor commit.
fn check_commitment_cb(
&self,
params: &P,
commitment: &C,
cb: &Fn(&Self, &P, &C) -> Result<()>
) -> Result<()>
&self,
params: &P,
commitment: &C,
cb: &Fn(&Self, &P, &C) -> Result<()>
) -> Result<()>
Checks a commitment against the implementor commit.
Implementors
impl<CP, C, D, A> Committable<CP, C> for Coin<D, A> where
CP: Datable,
C: Datable + ConstantSize,
D: Datable + ConstantSize,
A: Numerical,impl<CP, C, D, A, P, Pk, Sig> Committable<CP, C> for Input<D, A, P, Pk, Sig> where
CP: Datable,
C: Datable + ConstantSize,
D: Datable + ConstantSize,
A: Numerical,
P: Datable,
Pk: Datable + ConstantSize,
Sig: Datable + ConstantSize,impl<CP, C, D, Pk, A, P> Committable<CP, C> for Output<D, Pk, A, P> where
CP: Datable,
C: Datable + ConstantSize,
D: Datable + ConstantSize,
Pk: Datable + ConstantSize,
A: Numerical,
P: Datable,impl<CP, C, D, A, IP, Pk, Sig, OP, P> Committable<CP, C> for Transaction<D, A, IP, Pk, Sig, OP, P> where
CP: Datable,
C: Datable + ConstantSize,
D: Datable + ConstantSize,
A: Numerical,
IP: Datable,
Pk: Datable + ConstantSize,
Sig: Datable + ConstantSize,
OP: Datable,
P: Datable,impl<CP, C, D> Committable<CP, C> for BlockNode<D> where
CP: Datable,
C: Datable + ConstantSize,
D: Datable + ConstantSize,impl<CP, C, D, A, IP, Pk, Sig, OP, TP, P, Pr> Committable<CP, C> for Block<D, A, IP, Pk, Sig, OP, TP, P, Pr> where
CP: Datable,
C: Datable + ConstantSize,
D: Datable + ConstantSize,
A: Numerical,
IP: Datable,
Pk: Datable + ConstantSize,
Sig: Datable + ConstantSize,
OP: Datable,
TP: Datable,
P: Datable,
Pr: Datable,impl<CP, C, D, P> Committable<CP, C> for BlockGraph<D, P> where
CP: Datable,
C: Datable + ConstantSize,
D: Datable + ConstantSize,
P: Datable,impl<CP, C, D, Sk, Pk, Sig, P> Committable<CP, C> for Wallet<D, Sk, Pk, Sig, P> where
CP: Datable,
C: Datable + ConstantSize,
D: Datable + ConstantSize,
Sk: Datable + ConstantSize,
Pk: Datable + ConstantSize,
Sig: Datable + ConstantSize,
P: Datable,