Struct shuttle_sdk::Transaction
[−]
[src]
pub struct Transaction {
pub source: PublicKey,
pub sequence: u64,
pub fee: Stroops,
pub time_bounds: Option<TimeBounds>,
pub memo: Memo,
pub operations: Vec<Operation>,
}A transaction containing operations that change the ledger state.
Fields
source: PublicKey
The source account.
sequence: u64
The sequence number.
fee: Stroops
The fee.
time_bounds: Option<TimeBounds>
The validity time bounds.
memo: Memo
The attached memo.
operations: Vec<Operation>
The operations.
Methods
impl Transaction[src]
fn new(
source: PublicKey,
sequence: u64,
time_bounds: Option<TimeBounds>,
memo: Memo,
operations: Vec<Operation>
) -> Transaction[src]
source: PublicKey,
sequence: u64,
time_bounds: Option<TimeBounds>,
memo: Memo,
operations: Vec<Operation>
) -> Transaction
Create a new transaction.
fn source(&self) -> &PublicKey[src]
The transaction source account.
fn base_fee(&self) -> &Stroops[src]
The transaction fee.
fn time_bounds(&self) -> &Option<TimeBounds>[src]
The transaction time bounds for its validity.
fn memo(&self) -> &Memo[src]
The memo attached to the transaction.
fn sequence(&self) -> u64[src]
The transaction sequence number.
fn operations(&self) -> &Vec<Operation>[src]
The operations included in the transaction.
fn sign(
self,
keypair: &KeyPair,
network: &Network
) -> Result<SignedTransaction, Error>[src]
self,
keypair: &KeyPair,
network: &Network
) -> Result<SignedTransaction, Error>
Sign the transaction, returning a signed transaction that can be submitted to the network.
Trait Implementations
impl Clone for Transaction[src]
fn clone(&self) -> Transaction[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl ToXdr<Transaction> for Transaction[src]
fn to_xdr(&self) -> Result<Transaction, Error>[src]
Build the object that can be serialized to XDR.
fn to_writer<W>(&self, w: &mut W) -> Result<(), Error> where
W: Write, [src]
W: Write,
Serialize to the writer w.
fn to_base64(&self) -> Result<String, Error>[src]
Serialize to base64.
impl Debug for Transaction[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>[src]
Formats the value using the given formatter.