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 a valid advance nonce instruction. Since dynamically loaded addresses can’t have write locks demoted without loading addresses, this shouldn’t be used in the runtime.
Trait Implementations§
source§impl AbiExample for VersionedTransaction
impl AbiExample for VersionedTransaction
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> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, _digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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