[−][src]Struct ergo_lib_wasm::tx_builder::TxBuilder
Unsigned transaction builder
Implementations
impl TxBuilder
[src]
pub fn SUGGESTED_TX_FEE() -> BoxValue
[src]
Suggested transaction fee (semi-default value used across wallets and dApps as of Oct 2020)
pub fn new(
box_selection: &BoxSelection,
output_candidates: &ErgoBoxCandidates,
current_height: u32,
fee_amount: &BoxValue,
change_address: &Address,
min_change_value: &BoxValue
) -> TxBuilder
[src]
box_selection: &BoxSelection,
output_candidates: &ErgoBoxCandidates,
current_height: u32,
fee_amount: &BoxValue,
change_address: &Address,
min_change_value: &BoxValue
) -> TxBuilder
Creates new TxBuilder
box_selection
- selected input boxes (via super::box_selector
)
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,
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 set_data_inputs(&mut self, data_inputs: &DataInputs)
[src]
Set transaction's data inputs
pub fn build(&self) -> Result<UnsignedTransaction, JsValue>
[src]
Build the unsigned transaction
pub fn box_selection(&self) -> BoxSelection
[src]
Get inputs
pub fn data_inputs(&self) -> DataInputs
[src]
Get data inputs
pub fn output_candidates(&self) -> ErgoBoxCandidates
[src]
Get outputs EXCLUDING fee and change
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
Trait Implementations
impl FromWasmAbi for TxBuilder
[src]
type Abi = u32
The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more
pub unsafe fn from_abi(js: u32) -> Self
[src]
impl IntoWasmAbi for TxBuilder
[src]
type Abi = u32
The wasm ABI type that this converts into when crossing the ABI boundary. Read more
pub fn into_abi(self) -> u32
[src]
impl OptionFromWasmAbi for TxBuilder
[src]
impl OptionIntoWasmAbi for TxBuilder
[src]
impl RefFromWasmAbi for TxBuilder
[src]
type Abi = u32
The wasm ABI type references to Self
are recovered from.
type Anchor = Ref<'static, TxBuilder>
The type that holds the reference to Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don't persist beyond one function
call, and so that they remain anonymous. Read more
pub unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
[src]
impl RefMutFromWasmAbi for TxBuilder
[src]
type Abi = u32
Same as RefFromWasmAbi::Abi
type Anchor = RefMut<'static, TxBuilder>
Same as RefFromWasmAbi::Anchor
pub unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
[src]
impl WasmDescribe for TxBuilder
[src]
Auto Trait Implementations
impl !RefUnwindSafe for TxBuilder
[src]
impl !Send for TxBuilder
[src]
impl !Sync for TxBuilder
[src]
impl Unpin for TxBuilder
[src]
impl !UnwindSafe for TxBuilder
[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> ReturnWasmAbi for T where
T: IntoWasmAbi,
[src]
T: IntoWasmAbi,
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi
pub fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
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>,