@aptos-labs/ts-sdk - v3.1.1
    Preparing search index...

    Class RawTransaction

    Represents a raw transaction that can be serialized and deserialized. Raw transactions contain the metadata and payloads that can be submitted to the Aptos chain for execution. They must be signed before the Aptos chain can execute them.

    Hierarchy (View Summary)

    Index

    Implementation - BCS

    • Serializes a Serializable value to its BCS representation. This function is the TypeScript SDK equivalent of bcs::to_bytes in Move.

      Returns Uint8Array

      the BCS representation of the Serializable instance as a byte buffer.

    • Converts the BCS-serialized bytes of a value into a Hex instance. This function provides a Hex representation of the BCS-serialized data for easier handling and manipulation.

      Returns Hex

      A Hex instance with the BCS-serialized bytes loaded into its underlying Uint8Array.

    Implementation - Transactions

    • RawTransactions contain the metadata and payloads that can be submitted to Aptos chain for execution. RawTransactions must be signed before Aptos chain can execute them.

      Parameters

      • sender: AccountAddress

        The sender Account Address

      • sequence_number: bigint

        Sequence number of this transaction. This must match the sequence number stored in the sender's account at the time the transaction executes.

      • payload: TransactionPayload

        Instructions for the Aptos Blockchain, including publishing a module, execute an entry function or execute a script payload.

      • max_gas_amount: bigint

        Maximum total gas to spend for this transaction. The account must have more than this gas or the transaction will be discarded during validation.

      • gas_unit_price: bigint

        Price to be paid per gas unit.

      • expiration_timestamp_secs: bigint

        The blockchain timestamp at which the blockchain would discard this transaction.

      • chain_id: ChainId

        The chain ID of the blockchain that this transaction is intended to be run on.

      Returns RawTransaction

    • Serializes the transaction data, including the fee payer transaction type, raw transaction, secondary signer addresses, and fee payer address. This function is essential for preparing the transaction for transmission or storage in a serialized format.

      Parameters

      • serializer: Serializer

        The serializer instance used to serialize the transaction data.

      Returns void

    Methods

    • Returns the hex string representation of the Serializable value with the 0x prefix.

      Returns string

      the hex formatas a string prefixed by 0x.

    Properties

    chain_id: ChainId
    expiration_timestamp_secs: bigint
    gas_unit_price: bigint
    max_gas_amount: bigint
    sequence_number: bigint