Serializes a Serializable
value to its BCS representation.
This function is the TypeScript SDK equivalent of bcs::to_bytes
in Move.
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.
A Hex instance with the BCS-serialized bytes loaded into its underlying Uint8Array.
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.
The sender Account Address
Sequence number of this transaction. This must match the sequence number stored in the sender's account at the time the transaction executes.
Instructions for the Aptos Blockchain, including publishing a module, execute an entry function or execute a script payload.
Maximum total gas to spend for this transaction. The account must have more than this gas or the transaction will be discarded during validation.
Price to be paid per gas unit.
The blockchain timestamp at which the blockchain would discard this transaction.
The chain ID of the blockchain that this transaction is intended to be run on.
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.
The serializer instance used to serialize the transaction data.
Static
deserializeDeserialize a Raw Transaction With Data. This function retrieves the appropriate raw transaction based on the variant index provided by the deserializer.
An instance of the Deserializer used to read the serialized data.
Returns the hex string representation of the Serializable
value with the 0x prefix.
the hex formatas a string prefixed by 0x
.
Returns the hex string representation of the Serializable
value without the 0x prefix.
the hex format as a string without 0x
prefix.
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.