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>(
message: VersionedMessage,
keypairs: &T,
) -> Result<VersionedTransaction, SignerError>
pub fn try_new<T>( message: VersionedMessage, keypairs: &T, ) -> Result<VersionedTransaction, 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, TransactionError>
pub fn verify_and_hash_message(&self) -> Result<Hash, TransactionError>
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
fn example() -> VersionedTransaction
Source§impl Clone for VersionedTransaction
impl Clone for VersionedTransaction
Source§fn clone(&self) -> VersionedTransaction
fn clone(&self) -> VersionedTransaction
Returns a duplicate 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<VersionedTransaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<VersionedTransaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl EncodableWithMeta for VersionedTransaction
impl EncodableWithMeta for VersionedTransaction
type Encoded = EncodedTransaction
fn encode_with_meta( &self, encoding: UiTransactionEncoding, meta: &TransactionStatusMeta, ) -> <VersionedTransaction as EncodableWithMeta>::Encoded
fn json_encode(&self) -> <VersionedTransaction as EncodableWithMeta>::Encoded
Source§impl From<Transaction> for VersionedTransaction
impl From<Transaction> for VersionedTransaction
Source§fn from(transaction: Transaction) -> VersionedTransaction
fn from(transaction: Transaction) -> VersionedTransaction
Converts to this type from the input type.
Source§impl PartialEq for VersionedTransaction
impl PartialEq for VersionedTransaction
Source§impl SerializableTransaction for VersionedTransaction
impl SerializableTransaction for VersionedTransaction
fn get_signature(&self) -> &Signature
fn get_recent_blockhash(&self) -> &Hash
fn uses_durable_nonce(&self) -> bool
Source§impl Serialize for VersionedTransaction
impl Serialize for VersionedTransaction
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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