pub struct AssetTransferTransactionBuilder { /* private fields */ }
Expand description
Builder for AssetTransferTransactionFields
.
Implementations§
Source§impl AssetTransferTransactionBuilder
impl AssetTransferTransactionBuilder
Sourcepub fn header(&mut self, value: TransactionHeader) -> &mut Self
pub fn header(&mut self, value: TransactionHeader) -> &mut Self
Common transaction header fields.
Sourcepub fn amount(&mut self, value: u64) -> &mut Self
pub fn amount(&mut self, value: u64) -> &mut Self
The amount of the asset to transfer.
An integer value representing the number of units (to their smallest denomination) of the asset that are being transferred. In other words, the asset decimals don’t play a role in this value. It should be up to the caller (or a higher abstraction) to handle the conversion based on the asset decimals.
Sourcepub fn receiver(&mut self, value: Address) -> &mut Self
pub fn receiver(&mut self, value: Address) -> &mut Self
The address of the account that will receive the asset.
The receiver must have opted-in to the asset before they can receive it.
Sourcepub fn asset_sender(&mut self, value: Address) -> &mut Self
pub fn asset_sender(&mut self, value: Address) -> &mut Self
Optional address of the account that actually holds the asset being transferred.
If provided, this indicates that the transaction is a clawback operation, where the sender is the asset clawback address and is forcibly moving assets from this account to the receiver.
Sourcepub fn close_remainder_to(&mut self, value: Address) -> &mut Self
pub fn close_remainder_to(&mut self, value: Address) -> &mut Self
Optional address to send all remaining asset units to after the transfer.
If specified, this indicates that the sender is closing out their position in the asset, and all remaining units of this asset owned by the sender will be transferred to this address. This effectively removes the asset from the sender’s account.
Sourcepub fn build_fields(
&self,
) -> Result<AssetTransferTransactionFields, AssetTransferTransactionBuilderError>
pub fn build_fields( &self, ) -> Result<AssetTransferTransactionFields, AssetTransferTransactionBuilderError>
Source§impl AssetTransferTransactionBuilder
impl AssetTransferTransactionBuilder
pub fn build(&self) -> Result<Transaction, AssetTransferTransactionBuilderError>
Trait Implementations§
Source§impl Clone for AssetTransferTransactionBuilder
impl Clone for AssetTransferTransactionBuilder
Source§fn clone(&self) -> AssetTransferTransactionBuilder
fn clone(&self) -> AssetTransferTransactionBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more