Transactions

Submit transaction

This endpoint accepts transaction submissions in two formats.

To submit a transaction as JSON, you must submit a SubmitTransactionRequest. To build this request, do the following:

  1. Encode the transaction as BCS. If you are using a language that has native BCS support, make sure of that library. If not, you may take advantage of /transactions/encode_submission. When using this endpoint, make sure you trust the node you're talking to, as it is possible they could manipulate your request.
  2. Sign the encoded transaction and use it to create a TransactionSignature.
  3. Submit the request. Make sure to use the "application/json" Content-Type.

To submit a transaction as BCS, you must submit a SignedTransaction encoded as BCS. See SignedTransaction in types/src/transaction/mod.rs. Make sure to use the application/x.aptos.signed_transaction+bcs Content-Type.

post/transactions

Request body

senderstring hex required

A hex encoded 32 byte Aptos account address.

This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.

For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1.

sequence_numberstring uint64 required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

max_gas_amountstring uint64 required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

gas_unit_pricestring uint64 required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

expiration_timestamp_secsstring uint64 required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

signatureTransactionSignature required— unresolved $ref

Response

hashstring required
senderstring hex required

A hex encoded 32 byte Aptos account address.

This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.

For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1.

sequence_numberstring uint64 required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

max_gas_amountstring uint64 required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

gas_unit_pricestring uint64 required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

expiration_timestamp_secsstring uint64 required

A string containing a 64-bit unsigned integer.

We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

signatureTransactionSignature — unresolved $ref

Changes