Skip to content

Commit

Permalink
Merge #146: Export Blind*Proofs traits
Browse files Browse the repository at this point in the history
ebc6b8e Export Blind*Proofs traits (Leonardo Comandini)

Pull request description:

  So that the traits methods can be used downstream.

ACKs for top commit:
  apoelstra:
    ACK ebc6b8e

Tree-SHA512: 06d4af81e82b91e8836b107f54771f355ac9ff302c65905a761478072f777925537c96b5a6f179fb757ea5853558039571d795b1d281059593c99c6bab0f41c1
  • Loading branch information
RCasatta committed Sep 23, 2022
2 parents 95fb5fa + ebc6b8e commit 3edf8da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/blind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,7 @@ impl From<ConfidentialTxOutError> for BlindError {
}
}

/// A trait to create and verify explicit rangeproofs
pub trait BlindValueProofs: Sized {
/// Outputs a `[RangeProof]` that blinded value
/// corresponfs to unblinded explicit value
Expand Down Expand Up @@ -939,6 +940,7 @@ impl BlindValueProofs for RangeProof {
}
}

/// A trait to create and verify explicit surjection proofs
pub trait BlindAssetProofs: Sized {
/// Outputs a `[SurjectionProof]` that blinded asset
/// corresponfs to unblinded explicit asset
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub use bitcoin::{bech32, hashes};
// export everything at the top level so it can be used as `elements::Transaction` etc.
pub use crate::address::{Address, AddressParams, AddressError};
pub use crate::transaction::{OutPoint, PeginData, PegoutData, EcdsaSigHashType, TxIn, TxOut, TxInWitness, TxOutWitness, Transaction, AssetIssuance};
pub use crate::blind::{ConfidentialTxOutError, TxOutSecrets, TxOutError, VerificationError, BlindError, UnblindError};
pub use crate::blind::{ConfidentialTxOutError, TxOutSecrets, TxOutError, VerificationError, BlindError, UnblindError, BlindValueProofs, BlindAssetProofs};
pub use crate::block::{BlockHeader, Block};
pub use crate::block::ExtData as BlockExtData;
pub use ::bitcoin::consensus::encode::VarInt;
Expand All @@ -74,4 +74,4 @@ pub use crate::hash_types::*;
pub use crate::issuance::{AssetId, ContractHash};
pub use crate::script::Script;
pub use crate::sighash::SchnorrSigHashType;
pub use crate::schnorr::{SchnorrSig, SchnorrSigError};
pub use crate::schnorr::{SchnorrSig, SchnorrSigError};

0 comments on commit 3edf8da

Please sign in to comment.