[][src]Struct ergo_lib::wallet::tx_builder::TxBuilder

pub struct TxBuilder<S: ErgoBoxAssets> { /* fields omitted */ }

Unsigned transaction builder

Implementations

impl<S: ErgoBoxAssets + ErgoBoxId + Clone> TxBuilder<S>[src]

pub fn new(
    box_selection: BoxSelection<S>,
    output_candidates: Vec<ErgoBoxCandidate>,
    current_height: u32,
    fee_amount: BoxValue,
    change_address: Address,
    min_change_value: BoxValue
) -> TxBuilder<S>
[src]

Creates new TxBuilder box_selection - selected input boxes (via super::box_selector::BoxSelector) output_candidates - output boxes to be "created" in this transaction, current_height - chain height that will be used in additionally created boxes (change, miner's fee, etc.), fee_amount - miner's fee (higher values will speed up inclusion in blocks), change_address - change (inputs - outputs) will be sent to this address, min_change_value - minimal value of the change to be sent to change_address, value less than that will be given to miners,

pub fn box_selection(&self) -> BoxSelection<S>[src]

Get inputs

pub fn data_inputs(&self) -> Vec<DataInput>[src]

Get data inputs

pub fn output_candidates(&self) -> Vec<ErgoBoxCandidate>[src]

Get outputs

pub fn current_height(&self) -> u32[src]

Get current height

pub fn fee_amount(&self) -> BoxValue[src]

Get fee amount

pub fn change_address(&self) -> Address[src]

Get change

pub fn min_change_value(&self) -> BoxValue[src]

Get min change value

pub fn set_data_inputs(&mut self, data_inputs: Vec<DataInput>)[src]

Set transaction's data inputs

pub fn estimate_tx_size_bytes(&self) -> Result<usize, TxBuilderError>[src]

Estimated serialized transaction size in bytes after signing (assuming P2PK box spending)

pub fn build(self) -> Result<UnsignedTransaction, TxBuilderError>[src]

Build the unsigned transaction

Trait Implementations

impl<S: Clone + ErgoBoxAssets> Clone for TxBuilder<S>[src]

Auto Trait Implementations

impl<S> !RefUnwindSafe for TxBuilder<S>[src]

impl<S> !Send for TxBuilder<S>[src]

impl<S> !Sync for TxBuilder<S>[src]

impl<S> Unpin for TxBuilder<S> where
    S: Unpin
[src]

impl<S> !UnwindSafe for TxBuilder<S>[src]

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<F> TryExtractInto<F> for F[src]

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>,