pub enum TransactionEnvelope {
Transaction(Transaction),
FeeBumpTransaction(FeeBumpTransaction),
}Expand description
Transaction envelope.
Variants§
Implementations§
Source§impl TransactionEnvelope
impl TransactionEnvelope
Sourcepub fn as_transaction(&self) -> Option<&Transaction>
pub fn as_transaction(&self) -> Option<&Transaction>
If the transaction is a Transaction, returns its value. Returns None otherwise.
Sourcepub fn as_transaction_mut(&mut self) -> Option<&mut Transaction>
pub fn as_transaction_mut(&mut self) -> Option<&mut Transaction>
If the transaction is a Transaction, returns its mutable value. Returns None otherwise.
Sourcepub fn is_transaction(&self) -> bool
pub fn is_transaction(&self) -> bool
Returns true if the transaction is a Transaction.
Sourcepub fn as_fee_bump_transaction(&self) -> Option<&FeeBumpTransaction>
pub fn as_fee_bump_transaction(&self) -> Option<&FeeBumpTransaction>
If the transaction is a FeeBumpTransaction, returns its value. Returns None otherwise.
Sourcepub fn as_fee_bump_transaction_mut(&mut self) -> Option<&mut FeeBumpTransaction>
pub fn as_fee_bump_transaction_mut(&mut self) -> Option<&mut FeeBumpTransaction>
If the transaction is a FeeBumpTransaction, returns its mutable value. Returns None otherwise.
Sourcepub fn is_fee_bump_transaction(&self) -> bool
pub fn is_fee_bump_transaction(&self) -> bool
Returns true if the transaction is a FeeBumpTransaction.
Sourcepub fn sign_hashx(&mut self, preimage: &[u8]) -> Result<()>
pub fn sign_hashx(&mut self, preimage: &[u8]) -> Result<()>
Sign transaction with preimage, and add signature.
This signs the transaction with the preimage x of hash(x).
Sourcepub fn sign<S, V>(
&mut self,
key: &KeyPair<S, V>,
network: &Network,
) -> Result<()>
pub fn sign<S, V>( &mut self, key: &KeyPair<S, V>, network: &Network, ) -> Result<()>
Sign transaction with key for network, and add signature.
Sourcepub fn decorated_signature_from_preimage(
&self,
preimage: &[u8],
) -> Result<DecoratedSignature>
pub fn decorated_signature_from_preimage( &self, preimage: &[u8], ) -> Result<DecoratedSignature>
Returns the decorated signature of the transaction create with image.
Sourcepub fn decorated_signature<S, V>(
&self,
key: &KeyPair<S, V>,
network: &Network,
) -> Result<DecoratedSignature>
pub fn decorated_signature<S, V>( &self, key: &KeyPair<S, V>, network: &Network, ) -> Result<DecoratedSignature>
Returns the decorated signature of the transaction create with key for network.
Sourcepub fn hash(&self, network: &Network) -> Result<Vec<u8>>
pub fn hash(&self, network: &Network) -> Result<Vec<u8>>
Returns the transaction hash for the transaction on network.
Sourcepub fn signature_data(&self, network: &Network) -> Result<Vec<u8>>
pub fn signature_data(&self, network: &Network) -> Result<Vec<u8>>
Returns the transaction signature data as bytes.
Sourcepub fn to_xdr(&self) -> Result<TransactionEnvelope>
pub fn to_xdr(&self) -> Result<TransactionEnvelope>
Returns the xdr object.
Sourcepub fn from_xdr(x: &TransactionEnvelope) -> Result<TransactionEnvelope>
pub fn from_xdr(x: &TransactionEnvelope) -> Result<TransactionEnvelope>
Creates from xdr object.
Sourcepub fn to_xdr_transaction_signature_payload(
&self,
network: &Network,
) -> Result<TransactionSignaturePayload>
pub fn to_xdr_transaction_signature_payload( &self, network: &Network, ) -> Result<TransactionSignaturePayload>
Returns the xdr transaction signature payload object.
Trait Implementations§
Source§impl Clone for TransactionEnvelope
impl Clone for TransactionEnvelope
Source§fn clone(&self) -> TransactionEnvelope
fn clone(&self) -> TransactionEnvelope
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more