[−][src]Struct grin_core::core::transaction::OutputIdentifier
An output_identifier can be build from either an input or an output and contains everything we need to uniquely identify an output being spent. Needed because it is not sufficient to pass a commitment around.
Fields
features: OutputFeaturesOutput features (coinbase vs. regular transaction output) We need to include this when hashing to ensure coinbase maturity can be enforced.
commit: CommitmentOutput commitment
Implementations
impl OutputIdentifier[src]
pub fn new(features: OutputFeatures, commit: &Commitment) -> OutputIdentifier[src]
Build a new output_identifier.
pub fn commitment(&self) -> Commitment[src]
Our commitment.
pub fn is_coinbase(&self) -> bool[src]
Is this a coinbase output?
pub fn is_plain(&self) -> bool[src]
Is this a plain output?
pub fn into_output(self, proof: RangeProof) -> Output[src]
Converts this identifier to a full output, provided a RangeProof
Trait Implementations
impl AsRef<Commitment> for OutputIdentifier[src]
impl AsRef<OutputIdentifier> for Output[src]
pub fn as_ref(&self) -> &OutputIdentifier[src]
impl AsRef<OutputIdentifier> for OutputIdentifier[src]
pub fn as_ref(&self) -> &OutputIdentifier[src]
impl Clone for OutputIdentifier[src]
pub fn clone(&self) -> OutputIdentifier[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for OutputIdentifier[src]
impl Debug for OutputIdentifier[src]
impl DefaultHashable for OutputIdentifier[src]
impl<'de> Deserialize<'de> for OutputIdentifier[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl Eq for OutputIdentifier[src]
impl From<&'_ Input> for OutputIdentifier[src]
impl From<&'_ OutputIdentifier> for Input[src]
pub fn from(out: &OutputIdentifier) -> Self[src]
impl Ord for OutputIdentifier[src]
pub fn cmp(&self, other: &OutputIdentifier) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl PMMRable for OutputIdentifier[src]
type E = Self
The type of element actually stored in the MMR data file. This allows us to store Hash elements in the header MMR for variable size BlockHeaders. Read more
pub fn as_elmt(&self) -> OutputIdentifier[src]
pub fn elmt_size() -> Option<u16>[src]
impl PartialEq<OutputIdentifier> for OutputIdentifier[src]
pub fn eq(&self, other: &OutputIdentifier) -> bool[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl PartialOrd<OutputIdentifier> for OutputIdentifier[src]
pub fn partial_cmp(&self, other: &OutputIdentifier) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl Readable for OutputIdentifier[src]
impl Serialize for OutputIdentifier[src]
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, [src]
__S: Serializer,
impl ToHex for OutputIdentifier[src]
impl Writeable for OutputIdentifier[src]
Auto Trait Implementations
impl RefUnwindSafe for OutputIdentifier[src]
impl Send for OutputIdentifier[src]
impl Sync for OutputIdentifier[src]
impl Unpin for OutputIdentifier[src]
impl UnwindSafe for OutputIdentifier[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
pub fn clone_any(&self) -> Box<dyn CloneAny + 'static, Global>
pub fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send, Global> where
T: Send,
T: Send,
pub fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync, Global> where
T: Sync,
T: Sync,
pub fn clone_any_send_sync(
&self
) -> Box<dyn CloneAny + 'static + Send + Sync, Global> where
T: Send + Sync,
&self
) -> Box<dyn CloneAny + 'static + Send + Sync, Global> where
T: Send + Sync,
impl<T> DebugAny for T where
T: Any + Debug,
T: Any + Debug,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<D> Hashed for D where
D: DefaultHashable, [src]
D: DefaultHashable,
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> PMMRIndexHashable for T where
T: DefaultHashable, [src]
T: DefaultHashable,
pub fn hash_with_index(&Self, u64) -> Hash[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<H> ShortIdentifiable for H where
H: Hashed, [src]
H: Hashed,
pub fn short_id(&Self, &Hash, u64) -> ShortId[src]
Generate a short_id via the following -
- extract k0/k1 from block_hash hashed with the nonce (first two u64
values) * initialize a siphasher24 with k0/k1
- self.hash() passing in the siphasher24 instance
- drop the 2 most significant bytes (to return a 6 byte short_id)
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,