[][src]Trait grin_core::libtx::proof::ProofBuild

pub trait ProofBuild {
    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>; }

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

Required methods

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

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

Create a BP nonce that blinds the private key

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

Create a BP message

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

Loading content...

Implementations on Foreign Types

impl ProofBuild for ViewKey[src]

Loading content...

Implementors

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

fn proof_message(
    &self,
    _secp: &Secp256k1,
    id: &Identifier,
    _switch: &SwitchCommitmentType
) -> Result<ProofMessage, Error>
[src]

Message bytes: 0-3: 0 4-19: derivation path All outputs with this scheme are assumed to use regular switch commitments

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

fn proof_message(
    &self,
    _secp: &Secp256k1,
    id: &Identifier,
    switch: &SwitchCommitmentType
) -> Result<ProofMessage, Error>
[src]

Message bytes: 0: reserved for future use 1: wallet type (0 for standard) 2: switch commitment type 3: path depth 4-19: derivation path

Loading content...