[−][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: OutputFeatures
Output features (coinbase vs. regular transaction output) We need to include this when hashing to ensure coinbase maturity can be enforced.
commit: Commitment
Output commitment
Methods
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 from_output(output: &Output) -> OutputIdentifier
[src]
Build an output_identifier from an existing output.
pub fn into_output(self, proof: RangeProof) -> Output
[src]
Converts this identifier to a full output, provided a RangeProof
pub fn from_input(input: &Input) -> OutputIdentifier
[src]
Build an output_identifier from an existing input.
pub fn to_hex(&self) -> String
[src]
convert an output_identifier to hex string format.
Trait Implementations
impl DefaultHashable for OutputIdentifier
[src]
impl Writeable for OutputIdentifier
[src]
impl Readable for OutputIdentifier
[src]
impl FixedLength for OutputIdentifier
[src]
impl From<Output> for OutputIdentifier
[src]
impl Clone for OutputIdentifier
[src]
fn clone(&self) -> OutputIdentifier
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl PartialEq<OutputIdentifier> for OutputIdentifier
[src]
fn eq(&self, other: &OutputIdentifier) -> bool
[src]
fn ne(&self, other: &OutputIdentifier) -> bool
[src]
impl Debug for OutputIdentifier
[src]
impl Serialize for OutputIdentifier
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for OutputIdentifier
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for OutputIdentifier
impl Sync for OutputIdentifier
impl Unpin for OutputIdentifier
impl UnwindSafe for OutputIdentifier
impl RefUnwindSafe for OutputIdentifier
Blanket Implementations
impl<D> Hashed for D where
D: DefaultHashable,
[src]
D: DefaultHashable,
impl<H> ShortIdentifiable for H where
H: Hashed,
[src]
H: Hashed,
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> PMMRIndexHashable for T where
T: DefaultHashable,
[src]
T: DefaultHashable,
fn hash_with_index(&Self, u64) -> Hash
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> DebugAny for T where
T: Any + Debug,
T: Any + Debug,
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
fn clone_any(&self) -> Box<dyn CloneAny + 'static>
fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send> where
T: Send,
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync> where
T: Sync,
T: Sync,
fn clone_any_send_sync(&self) -> Box<dyn CloneAny + 'static + Send + Sync> where
T: Send + Sync,
T: Send + Sync,
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<T> Same<T> for T
type Output = T
Should always be Self