pub trait ProofBuild {
    // Required methods
    fn rewind_nonce(
        &self,
        secp: &Secp256k1,
        commit: &Commitment
    ) -> Result<SecretKey, Error>;
    fn private_nonce(
        &self,
        secp: &Secp256k1,
        commit: &Commitment
    ) -> Result<SecretKey, Error>;
    fn proof_message(
        &self,
        secp: &Secp256k1,
        id: &Identifier,
        switch: SwitchCommitmentType
    ) -> Result<ProofMessage, Error>;
    fn check_output(
        &self,
        secp: &Secp256k1,
        commit: &Commitment,
        amount: u64,
        message: ProofMessage
    ) -> Result<Option<(Identifier, SwitchCommitmentType)>, Error>;
}
Expand description

Used for building proofs and checking if the output belongs to the wallet

Required Methods§

source

fn rewind_nonce( &self, secp: &Secp256k1, commit: &Commitment ) -> Result<SecretKey, Error>

Create a BP nonce that will allow to rewind the derivation path and flags

source

fn private_nonce( &self, secp: &Secp256k1, commit: &Commitment ) -> Result<SecretKey, Error>

Create a BP nonce that blinds the private key

source

fn proof_message( &self, secp: &Secp256k1, id: &Identifier, switch: SwitchCommitmentType ) -> Result<ProofMessage, Error>

Create a BP message

source

fn check_output( &self, secp: &Secp256k1, commit: &Commitment, amount: u64, message: ProofMessage ) -> Result<Option<(Identifier, SwitchCommitmentType)>, Error>

Check if the output belongs to this keychain

Implementations on Foreign Types§

source§

impl ProofBuild for ViewKey

source§

fn rewind_nonce( &self, secp: &Secp256k1, commit: &Commitment ) -> Result<SecretKey, Error>

source§

fn private_nonce( &self, _secp: &Secp256k1, _commit: &Commitment ) -> Result<SecretKey, Error>

source§

fn proof_message( &self, _secp: &Secp256k1, _id: &Identifier, _switch: SwitchCommitmentType ) -> Result<ProofMessage, Error>

source§

fn check_output( &self, secp: &Secp256k1, commit: &Commitment, amount: u64, message: ProofMessage ) -> Result<Option<(Identifier, SwitchCommitmentType)>, Error>

Implementors§

source§

impl<'a, K> ProofBuild for LegacyProofBuilder<'a, K>
where K: Keychain,

source§

impl<'a, K> ProofBuild for ProofBuilder<'a, K>
where K: Keychain,