[][src]Struct wagyu_zcash::transaction::ZcashTransparentInput

pub struct ZcashTransparentInput<N: ZcashNetwork> {
    pub outpoint: Outpoint<N>,
    pub script: Vec<u8>,
    pub sequence: Vec<u8>,
    pub sighash_code: SignatureHash,
    pub is_signed: bool,
}

Represents a Zcash transaction transparent input

Fields

outpoint: Outpoint<N>

Outpoint - transaction id and index - 36 bytes

script: Vec<u8>

Tx-in script - Variable size

sequence: Vec<u8>

Sequence number - 4 bytes (normally 0xFFFFFFFF, unless lock > 0) Also used in replace-by-fee - BIP 125.

sighash_code: SignatureHash

SIGHASH Code - 4 Bytes (used in signing raw transaction only)

is_signed: bool

If true, the input has been signed

Methods

impl<N: ZcashNetwork> ZcashTransparentInput<N>[src]

pub fn new(
    transaction_id: Vec<u8>,
    index: u32,
    address: Option<ZcashAddress<N>>,
    amount: Option<ZcashAmount>,
    redeem_script: Option<Vec<u8>>,
    script_pub_key: Option<Vec<u8>>,
    sequence: Option<Vec<u8>>,
    sighash_code: SignatureHash
) -> Result<Self, TransactionError>
[src]

Returns a new Zcash transparent input without the script.

pub fn read<R: Read>(reader: &mut R) -> Result<Self, TransactionError>[src]

Read and output a Zcash transaction transparent input

pub fn serialize(
    &self,
    raw: bool,
    hash_preimage: bool
) -> Result<Vec<u8>, TransactionError>
[src]

Returns the serialized transparent input.

Trait Implementations

impl<N: Clone + ZcashNetwork> Clone for ZcashTransparentInput<N>[src]

impl<N: Debug + ZcashNetwork> Debug for ZcashTransparentInput<N>[src]

Auto Trait Implementations

impl<N> RefUnwindSafe for ZcashTransparentInput<N> where
    N: RefUnwindSafe

impl<N> Send for ZcashTransparentInput<N>

impl<N> Sync for ZcashTransparentInput<N>

impl<N> Unpin for ZcashTransparentInput<N> where
    N: Unpin

impl<N> UnwindSafe for ZcashTransparentInput<N> where
    N: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,