pub struct PreAccountTransaction {
pub header: TransactionHeader,
pub payload: Payload,
pub encoded: EncodedPayload,
pub hash_to_sign: TransactionSignHash,
}
Expand description
A transaction that is prepared to be signed. The serde instance serializes the structured payload and skips serializing the encoded one.
Fields§
§header: TransactionHeader
§payload: Payload
The payload.
encoded: EncodedPayload
The encoded payload. This is already serialized payload that is constructed during construction of the prepared transaction since we need it to compute the cost.
hash_to_sign: TransactionSignHash
Hash of the transaction to sign.
Implementations§
source§impl PreAccountTransaction
impl PreAccountTransaction
sourcepub fn sign(
self,
signer: &impl TransactionSigner
) -> AccountTransaction<EncodedPayload>
pub fn sign( self, signer: &impl TransactionSigner ) -> AccountTransaction<EncodedPayload>
Sign the transaction with the provided signer. Note that this signer must match the account address and the number of keys that were used in construction, otherwise the transaction will be invalid.
Trait Implementations§
source§impl Clone for PreAccountTransaction
impl Clone for PreAccountTransaction
source§fn clone(&self) -> PreAccountTransaction
fn clone(&self) -> PreAccountTransaction
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 PreAccountTransaction
impl Debug for PreAccountTransaction
source§impl Deserial for PreAccountTransaction
impl Deserial for PreAccountTransaction
fn deserial<R: ReadBytesExt>(source: &mut R) -> ParseResult<Self>
source§impl Serial for PreAccountTransaction
impl Serial for PreAccountTransaction
Serialize only the header and payload, so that this can be deserialized as a transaction body.
Auto Trait Implementations§
impl RefUnwindSafe for PreAccountTransaction
impl Send for PreAccountTransaction
impl Sync for PreAccountTransaction
impl Unpin for PreAccountTransaction
impl UnwindSafe for PreAccountTransaction
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