[][src]Struct solana_libra_types::transaction::RawTransaction

pub struct RawTransaction { /* fields omitted */ }

RawTransaction is the portion of a transaction that a client signs

Methods

impl RawTransaction[src]

pub fn new(
    sender: AccountAddress,
    sequence_number: u64,
    payload: TransactionPayload,
    max_gas_amount: u64,
    gas_unit_price: u64,
    expiration_time: Duration
) -> Self
[src]

Create a new RawTransaction with a payload.

It can be either to publish a module, to execute a script, or to issue a writeset transaction.

pub fn new_script(
    sender: AccountAddress,
    sequence_number: u64,
    script: Script,
    max_gas_amount: u64,
    gas_unit_price: u64,
    expiration_time: Duration
) -> Self
[src]

Create a new RawTransaction with a script.

A script transaction contains only code to execute. No publishing is allowed in scripts.

pub fn new_module(
    sender: AccountAddress,
    sequence_number: u64,
    module: Module,
    max_gas_amount: u64,
    gas_unit_price: u64,
    expiration_time: Duration
) -> Self
[src]

Create a new RawTransaction with a module to publish.

A module transaction is the only way to publish code. Only one module per transaction can be published.

pub fn new_write_set(
    sender: AccountAddress,
    sequence_number: u64,
    write_set: WriteSet
) -> Self
[src]

pub fn sign(
    self,
    private_key: &Ed25519PrivateKey,
    public_key: Ed25519PublicKey
) -> Result<SignatureCheckedTransaction>
[src]

Signs the given RawTransaction. Note that this consumes the RawTransaction and turns it into a SignatureCheckedTransaction.

For a transaction that has just been signed, its signature is expected to be valid.

pub fn into_payload(self) -> TransactionPayload[src]

pub fn format_for_client(
    &self,
    get_transaction_name: impl Fn(&[u8]) -> String
) -> String
[src]

pub fn sender(&self) -> AccountAddress[src]

Return the sender of this transaction.

Trait Implementations

impl CanonicalDeserialize for RawTransaction[src]

impl CanonicalSerialize for RawTransaction[src]

impl Clone for RawTransaction[src]

impl CryptoHash for RawTransaction[src]

type Hasher = RawTransactionHasher

The associated Hasher type which comes with a unique salt for this type.

impl Debug for RawTransaction[src]

impl<'de> Deserialize<'de> for RawTransaction[src]

impl Eq for RawTransaction[src]

impl Hash for RawTransaction[src]

impl PartialEq<RawTransaction> for RawTransaction[src]

impl Serialize for RawTransaction[src]

impl StructuralEq for RawTransaction[src]

impl StructuralPartialEq for RawTransaction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

impl<T> TestOnlyHash for T where
    T: Serialize + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,