Struct grin_core::core::transaction::Output
source · pub struct Output {
pub identifier: OutputIdentifier,
pub proof: RangeProof,
}
Expand description
Output for a transaction, defining the new ownership of coins that are being transferred. The commitment is a blinded value for the output while the range proof guarantees the commitment includes a positive value without overflow and the ownership of the private key.
Fields§
§identifier: OutputIdentifier
Output identifier (features and commitment).
proof: RangeProof
Rangeproof associated with the commitment.
Implementations§
source§impl Output
impl Output
sourcepub fn new(
features: OutputFeatures,
commit: Commitment,
proof: RangeProof
) -> Output
pub fn new( features: OutputFeatures, commit: Commitment, proof: RangeProof ) -> Output
Create a new output with the provided features, commitment and rangeproof.
sourcepub fn identifier(&self) -> OutputIdentifier
pub fn identifier(&self) -> OutputIdentifier
Output identifier.
sourcepub fn commitment(&self) -> Commitment
pub fn commitment(&self) -> Commitment
Commitment for the output
sourcepub fn features(&self) -> OutputFeatures
pub fn features(&self) -> OutputFeatures
Output features.
sourcepub fn is_coinbase(&self) -> bool
pub fn is_coinbase(&self) -> bool
Is this a coinbase output?
sourcepub fn proof(&self) -> RangeProof
pub fn proof(&self) -> RangeProof
Range proof for the output
sourcepub fn proof_bytes(&self) -> &[u8] ⓘ
pub fn proof_bytes(&self) -> &[u8] ⓘ
Get range proof as byte slice
sourcepub fn verify_proof(&self) -> Result<(), Error>
pub fn verify_proof(&self) -> Result<(), Error>
Validates the range proof using the commitment
sourcepub fn batch_verify_proofs(
commits: &[Commitment],
proofs: &[RangeProof]
) -> Result<(), Error>
pub fn batch_verify_proofs( commits: &[Commitment], proofs: &[RangeProof] ) -> Result<(), Error>
Batch validates the range proofs using the commitments
Trait Implementations§
source§impl AsRef<Commitment> for Output
impl AsRef<Commitment> for Output
source§fn as_ref(&self) -> &Commitment
fn as_ref(&self) -> &Commitment
source§impl AsRef<OutputIdentifier> for Output
impl AsRef<OutputIdentifier> for Output
source§fn as_ref(&self) -> &OutputIdentifier
fn as_ref(&self) -> &OutputIdentifier
source§impl<'de> Deserialize<'de> for Output
impl<'de> Deserialize<'de> for Output
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Ord for Output
impl Ord for Output
source§impl PartialEq for Output
impl PartialEq for Output
source§impl PartialOrd for Output
impl PartialOrd for Output
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Readable for Output
impl Readable for Output
Implementation of Readable for a transaction Output, defines how to read an Output from a binary stream.
source§impl Writeable for Output
impl Writeable for Output
Implementation of Writeable for a transaction Output, defines how to write an Output as binary.
impl Copy for Output
impl Eq for Output
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.