pub struct SignedTransaction { /* private fields */ }
Expand description
A transaction that has been signed.
A SignedTransaction
is a single transaction that can be atomically executed. Clients submit
these to validator nodes, and the validator and executor submits these to the VM.
IMPORTANT: The signature of a SignedTransaction
is not guaranteed to be verified. For a
transaction whose signature is statically guaranteed to be verified, see
[SignatureCheckedTransaction
].
Implementations§
§impl SignedTransaction
impl SignedTransaction
pub fn new( raw_txn: RawTransaction, public_key: Ed25519PublicKey, signature: Ed25519Signature ) -> SignedTransaction
pub fn new_multisig( raw_txn: RawTransaction, public_key: MultiEd25519PublicKey, signature: MultiEd25519Signature ) -> SignedTransaction
pub fn new_multi_agent( raw_txn: RawTransaction, sender: AccountAuthenticator, secondary_signer_addresses: Vec<AccountAddress, Global>, secondary_signers: Vec<AccountAuthenticator, Global> ) -> SignedTransaction
pub fn authenticator(&self) -> TransactionAuthenticator
pub fn sender(&self) -> AccountAddress
pub fn into_raw_transaction(self) -> RawTransaction
pub fn sequence_number(&self) -> u64
pub fn chain_id(&self) -> ChainId
pub fn payload(&self) -> &TransactionPayload
pub fn max_gas_amount(&self) -> u64
pub fn gas_unit_price(&self) -> u64
pub fn gas_currency_code(&self) -> &str
pub fn expiration_timestamp_secs(&self) -> u64
pub fn raw_txn_bytes_len(&self) -> usize
pub fn check_signature(self) -> Result<SignatureCheckedTransaction, Error>
pub fn check_signature(self) -> Result<SignatureCheckedTransaction, Error>
Checks that the signature of given transaction. Returns Ok(SignatureCheckedTransaction)
if
the signature is valid.
pub fn contains_duplicate_signers(&self) -> bool
pub fn format_for_client( &self, get_transaction_name: impl Fn(&[u8]) -> String ) -> String
pub fn is_multi_agent(&self) -> bool
Trait Implementations§
§impl Arbitrary for SignedTransaction
impl Arbitrary for SignedTransaction
This Arbitrary
impl only generates valid signed transactions. TODO: maybe add invalid ones?
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§fn arbitrary_with(_args: ()) -> <SignedTransaction as Arbitrary>::Strategy
fn arbitrary_with(_args: ()) -> <SignedTransaction as Arbitrary>::Strategy
§type Strategy = BoxedStrategy<SignedTransaction>
type Strategy = BoxedStrategy<SignedTransaction>
The type of
Strategy
used to generate values of type Self
.§impl Clone for SignedTransaction
impl Clone for SignedTransaction
§fn clone(&self) -> SignedTransaction
fn clone(&self) -> SignedTransaction
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 more§impl Debug for SignedTransaction
impl Debug for SignedTransaction
§impl<'de> Deserialize<'de> for SignedTransaction
impl<'de> Deserialize<'de> for SignedTransaction
§fn deserialize<__D>(
__deserializer: __D
) -> Result<SignedTransaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<SignedTransaction, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Hash for SignedTransaction
impl Hash for SignedTransaction
§impl PartialEq<SignedTransaction> for SignedTransaction
impl PartialEq<SignedTransaction> for SignedTransaction
§fn eq(&self, other: &SignedTransaction) -> bool
fn eq(&self, other: &SignedTransaction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl Serialize for SignedTransaction
impl Serialize for SignedTransaction
§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 TryFrom<Transaction> for SignedTransaction
impl TryFrom<Transaction> for SignedTransaction
impl Eq for SignedTransaction
impl StructuralEq for SignedTransaction
impl StructuralPartialEq for SignedTransaction
Auto Trait Implementations§
impl RefUnwindSafe for SignedTransaction
impl Send for SignedTransaction
impl Sync for SignedTransaction
impl Unpin for SignedTransaction
impl UnwindSafe for SignedTransaction
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
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<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>
§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.