Struct solana_sdk::transaction::VersionedTransaction
source · 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>(
message: VersionedMessage,
keypairs: &T
) -> Result<Self, SignerError>
pub fn try_new<T: Signers>( message: VersionedMessage, keypairs: &T ) -> Result<Self, SignerError>
Signs a versioned message and if successful, returns a signed transaction.
pub fn sanitize( &self, require_static_program_ids: bool ) -> 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<VersionedTransaction> for VersionedTransaction
impl PartialEq<VersionedTransaction> for VersionedTransaction
source§fn eq(&self, other: &VersionedTransaction) -> bool
fn eq(&self, other: &VersionedTransaction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for VersionedTransaction
impl Serialize for VersionedTransaction
source§impl TryFrom<VersionedTransaction> for SanitizedVersionedTransaction
impl TryFrom<VersionedTransaction> for SanitizedVersionedTransaction
§type Error = SanitizeError
type Error = SanitizeError
The type returned in the event of a conversion error.