[][src]Struct grin_wallet_libwallet::api_impl::types::InitTxArgs

pub struct InitTxArgs {
    pub src_acct_name: Option<String>,
    pub amount: u64,
    pub minimum_confirmations: u64,
    pub max_outputs: u32,
    pub num_change_outputs: u32,
    pub selection_strategy_is_use_all: bool,
    pub message: Option<String>,
    pub target_slate_version: Option<u16>,
    pub ttl_blocks: Option<u64>,
    pub payment_proof_recipient_address: Option<OnionV3Address>,
    pub estimate_only: Option<bool>,
    pub send_args: Option<InitTxSendArgs>,
}

V2 Init / Send TX API Args

Fields

src_acct_name: Option<String>

The human readable account name from which to draw outputs for the transaction, overriding whatever the active account is as set via the set_active_account method.

amount: u64

The amount to send, in nanogrins. (1 G = 1_000_000_000nG)

minimum_confirmations: u64

The minimum number of confirmations an output should have in order to be included in the transaction.

max_outputs: u32

By default, the wallet selects as many inputs as possible in a transaction, to reduce the Output set and the fees. The wallet will attempt to spend include up to max_outputs in a transaction, however if this is not enough to cover the whole amount, the wallet will include more outputs. This parameter should be considered a soft limit.

num_change_outputs: u32

The target number of change outputs to create in the transaction. The actual number created will be num_change_outputs + whatever remainder is needed.

selection_strategy_is_use_all: bool

If true, attempt to use up as many outputs as possible to create the transaction, up the 'soft limit' of max_outputs. This helps to reduce the size of the UTXO set and the amount of data stored in the wallet, and minimizes fees. This will generally result in many inputs and a large change output(s), usually much larger than the amount being sent. If false, the transaction will include as many outputs as are needed to meet the amount, (and no more) starting with the smallest value outputs.

message: Option<String>

An optional participant message to include alongside the sender's public ParticipantData within the slate. This message will include a signature created with the sender's private excess value, and will be publically verifiable. Note this message is for the convenience of the participants during the exchange; it is not included in the final transaction sent to the chain. The message will be truncated to 256 characters.

target_slate_version: Option<u16>

Optionally set the output target slate version (acceptable down to the minimum slate version compatible with the current. If None the slate is generated with the latest version.

ttl_blocks: Option<u64>

Number of blocks from current after which TX should be ignored

payment_proof_recipient_address: Option<OnionV3Address>

If set, require a payment proof for the particular recipient

estimate_only: Option<bool>

If true, just return an estimate of the resulting slate, containing fees and amounts locked without actually locking outputs or creating the transaction. Note if this is set to 'true', the amount field in the slate will contain the total amount locked, not the provided transaction amount

send_args: Option<InitTxSendArgs>

Sender arguments. If present, the underlying function will also attempt to send the transaction to a destination and optionally finalize the result

Trait Implementations

impl Clone for InitTxArgs[src]

impl Default for InitTxArgs[src]

impl<'de> Deserialize<'de> for InitTxArgs[src]

impl Serialize for InitTxArgs[src]

Auto Trait Implementations

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> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> CloneAny for T where
    T: Clone + Any

impl<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Clone + Send + Sync

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone

impl<T> SafeBorrow<T> for T where
    T: ?Sized

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<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<T> UnsafeAny for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,