pub struct RawTransaction {
pub sender: AccountAddress,
pub sequence_number: u64,
pub payload: TransactionPayload,
pub max_gas_amount: u64,
pub gas_unit_price: u64,
pub expiration_timestamp_secs: u64,
pub chain_id: ChainId,
}Expand description
The raw transaction that a client signs.
A RawTransaction contains all the details of a transaction before
it is signed, including the sender, payload, gas parameters, and
expiration time.
Fields§
§sender: AccountAddressSender’s address.
sequence_number: u64Sequence number of this transaction.
payload: TransactionPayloadThe transaction payload (entry function, script, etc.).
max_gas_amount: u64Maximum gas units the sender is willing to pay.
gas_unit_price: u64Price per gas unit in octas.
expiration_timestamp_secs: u64Expiration time in seconds since Unix epoch.
chain_id: ChainIdChain ID to prevent cross-chain replay.
Implementations§
Source§impl RawTransaction
impl RawTransaction
Sourcepub fn new(
sender: AccountAddress,
sequence_number: u64,
payload: TransactionPayload,
max_gas_amount: u64,
gas_unit_price: u64,
expiration_timestamp_secs: u64,
chain_id: ChainId,
) -> Self
pub fn new( sender: AccountAddress, sequence_number: u64, payload: TransactionPayload, max_gas_amount: u64, gas_unit_price: u64, expiration_timestamp_secs: u64, chain_id: ChainId, ) -> Self
Creates a new raw transaction.
Sourcepub fn signing_message(&self) -> AptosResult<Vec<u8>>
pub fn signing_message(&self) -> AptosResult<Vec<u8>>
Generates the signing message for this transaction.
This is the message that should be signed to create a valid transaction authenticator.
§Errors
Returns an error if BCS serialization of the transaction fails.
Trait Implementations§
Source§impl Clone for RawTransaction
impl Clone for RawTransaction
Source§fn clone(&self) -> RawTransaction
fn clone(&self) -> RawTransaction
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 RawTransaction
impl Debug for RawTransaction
Source§impl<'de> Deserialize<'de> for RawTransaction
impl<'de> Deserialize<'de> for RawTransaction
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 PartialEq for RawTransaction
impl PartialEq for RawTransaction
Source§impl Serialize for RawTransaction
impl Serialize for RawTransaction
impl Eq for RawTransaction
impl StructuralPartialEq for RawTransaction
Auto Trait Implementations§
impl Freeze for RawTransaction
impl RefUnwindSafe for RawTransaction
impl Send for RawTransaction
impl Sync for RawTransaction
impl Unpin for RawTransaction
impl UnwindSafe for RawTransaction
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<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<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> IntoMoveArg for Twhere
T: Serialize,
impl<T> IntoMoveArg for Twhere
T: Serialize,
Source§fn into_move_arg(self) -> Result<Vec<u8>, AptosError>
fn into_move_arg(self) -> Result<Vec<u8>, AptosError>
Converts this value into BCS-encoded bytes. Read more