[−][src]Struct ergo_lib::wallet::tx_builder::TxBuilder
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]
box_selection: BoxSelection<S>,
output_candidates: Vec<ErgoBoxCandidate>,
current_height: u32,
fee_amount: BoxValue,
change_address: Address,
min_change_value: BoxValue
) -> TxBuilder<S>
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]
S: Unpin,
impl<S> !UnwindSafe for TxBuilder<S>
[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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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<F> TryExtractInto<F> for F
[src]
pub fn try_extract_into<T>(Self) -> Result<T, TryExtractFromError> where
T: TryExtractFrom<F>,
[src]
T: TryExtractFrom<F>,
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,