pub struct VersionedTransaction {
pub signatures: Vec<Signature>,
pub message: VersionedMessage,
}
Expand description
An atomic transaction
Fields§
§signatures: Vec<Signature>
List of signatures
message: VersionedMessage
Message to sign.
Implementations§
Source§impl VersionedTransaction
impl VersionedTransaction
Sourcepub fn try_new<T: Signers + ?Sized>(
message: VersionedMessage,
keypairs: &T,
) -> Result<Self, SignerError>
pub fn try_new<T: Signers + ?Sized>( message: VersionedMessage, keypairs: &T, ) -> Result<Self, SignerError>
Signs a versioned message and if successful, returns a signed transaction.
pub fn sanitize(&self) -> Result<(), SanitizeError>
Sourcepub fn version(&self) -> TransactionVersion
pub fn version(&self) -> TransactionVersion
Returns the version of the transaction
Sourcepub fn into_legacy_transaction(self) -> Option<Transaction>
pub fn into_legacy_transaction(self) -> Option<Transaction>
Returns a legacy transaction if the transaction message is legacy.
Sourcepub fn verify_and_hash_message(&self) -> Result<Hash>
pub fn verify_and_hash_message(&self) -> Result<Hash>
Verify the transaction and hash its message
Sourcepub fn verify_with_results(&self) -> Vec<bool>
pub fn verify_with_results(&self) -> Vec<bool>
Verify the transaction and return a list of verification results
Sourcepub fn uses_durable_nonce(&self) -> bool
pub fn uses_durable_nonce(&self) -> bool
Returns true if transaction begins with an advance nonce instruction.
Trait Implementations§
Source§impl Clone for VersionedTransaction
impl Clone for VersionedTransaction
Source§fn clone(&self) -> VersionedTransaction
fn clone(&self) -> VersionedTransaction
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VersionedTransaction
impl Debug for VersionedTransaction
Source§impl Default for VersionedTransaction
impl Default for VersionedTransaction
Source§fn default() -> VersionedTransaction
fn default() -> VersionedTransaction
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for VersionedTransaction
impl<'de> Deserialize<'de> for VersionedTransaction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Transaction> for VersionedTransaction
impl From<Transaction> for VersionedTransaction
Source§fn from(transaction: Transaction) -> Self
fn from(transaction: Transaction) -> Self
Converts to this type from the input type.
Source§impl PartialEq for VersionedTransaction
impl PartialEq for VersionedTransaction
Source§impl Serialize for VersionedTransaction
impl Serialize for VersionedTransaction
Source§impl TryFrom<VersionedTransaction> for SanitizedVersionedTransaction
impl TryFrom<VersionedTransaction> for SanitizedVersionedTransaction
Source§type Error = SanitizeError
type Error = SanitizeError
The type returned in the event of a conversion error.
impl Eq for VersionedTransaction
impl StructuralPartialEq for VersionedTransaction
Auto Trait Implementations§
impl Freeze for VersionedTransaction
impl RefUnwindSafe for VersionedTransaction
impl Send for VersionedTransaction
impl Sync for VersionedTransaction
impl Unpin for VersionedTransaction
impl UnwindSafe for VersionedTransaction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more