Trait grin_core::libtx::proof::ProofBuild
source · 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§
sourcefn rewind_nonce(
&self,
secp: &Secp256k1,
commit: &Commitment
) -> Result<SecretKey, Error>
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
sourcefn private_nonce(
&self,
secp: &Secp256k1,
commit: &Commitment
) -> Result<SecretKey, Error>
fn private_nonce( &self, secp: &Secp256k1, commit: &Commitment ) -> Result<SecretKey, Error>
Create a BP nonce that blinds the private key
sourcefn proof_message(
&self,
secp: &Secp256k1,
id: &Identifier,
switch: SwitchCommitmentType
) -> Result<ProofMessage, Error>
fn proof_message( &self, secp: &Secp256k1, id: &Identifier, switch: SwitchCommitmentType ) -> Result<ProofMessage, Error>
Create a BP message
sourcefn check_output(
&self,
secp: &Secp256k1,
commit: &Commitment,
amount: u64,
message: ProofMessage
) -> Result<Option<(Identifier, SwitchCommitmentType)>, Error>
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