Struct iota_client::api::ClientMessageBuilder
source · [−]pub struct ClientMessageBuilder<'a> { /* private fields */ }
Expand description
Builder of the message API
Implementations
sourceimpl<'a> ClientMessageBuilder<'a>
impl<'a> ClientMessageBuilder<'a>
sourcepub fn with_account_index(self, account_index: usize) -> Self
pub fn with_account_index(self, account_index: usize) -> Self
Sets the account index.
sourcepub fn with_initial_address_index(self, initial_address_index: usize) -> Self
pub fn with_initial_address_index(self, initial_address_index: usize) -> Self
Sets the index of the address to start looking for balance.
sourcepub fn with_input(self, input: UtxoInput) -> Self
pub fn with_input(self, input: UtxoInput) -> Self
Set a custom input(transaction output)
sourcepub fn with_input_range(self, range: Range<usize>) -> Self
pub fn with_input_range(self, range: Range<usize>) -> Self
Set a custom range in which to search for addresses for custom provided inputs. Default: 0..100
sourcepub fn with_output(self, address: &str, amount: u64) -> Result<Self>
pub fn with_output(self, address: &str, amount: u64) -> Result<Self>
Set a transfer to the builder
sourcepub fn with_dust_allowance_output(
self,
address: &str,
amount: u64
) -> Result<Self>
pub fn with_dust_allowance_output(
self,
address: &str,
amount: u64
) -> Result<Self>
Set a dust allowance transfer to the builder, address needs to be Bech32 encoded
sourcepub fn with_output_hex(self, address: &str, amount: u64) -> Result<Self>
pub fn with_output_hex(self, address: &str, amount: u64) -> Result<Self>
Set a transfer to the builder, address needs to be hex encoded
sourcepub fn with_parents(self, parent_ids: Vec<MessageId>) -> Result<Self>
pub fn with_parents(self, parent_ids: Vec<MessageId>) -> Result<Self>
Set 1-8 custom parent message ids
sourcepub fn get_output_amount_and_address(
output: &OutputDto
) -> Result<(u64, Address, bool)>
pub fn get_output_amount_and_address(
output: &OutputDto
) -> Result<(u64, Address, bool)>
Get output amount and address from an OutputDto (bool true == SignatureLockedSingle, false == SignatureLockedDustAllowance)
sourcepub async fn prepare_transaction(&self) -> Result<PreparedTransactionData>
pub async fn prepare_transaction(&self) -> Result<PreparedTransactionData>
Prepare a transaction
sourcepub async fn sign_transaction(
&self,
prepared_transaction_data: PreparedTransactionData,
seed: Option<&'a Seed>,
inputs_range: Option<Range<usize>>
) -> Result<Payload>
pub async fn sign_transaction(
&self,
prepared_transaction_data: PreparedTransactionData,
seed: Option<&'a Seed>,
inputs_range: Option<Range<usize>>
) -> Result<Payload>
Sign the transaction
sourcepub async fn finish_indexation(self) -> Result<Message>
pub async fn finish_indexation(self) -> Result<Message>
Consume the builder and get the API result
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ClientMessageBuilder<'a>
impl<'a> Send for ClientMessageBuilder<'a>
impl<'a> Sync for ClientMessageBuilder<'a>
impl<'a> Unpin for ClientMessageBuilder<'a>
impl<'a> !UnwindSafe for ClientMessageBuilder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more