POST
/
transactions
/
encode_submission
curl --request POST \
  --url https://aptos-mainnet.s.chainbase.online/{api-key}/v1/transactions/encode_submission \
  --header 'Content-Type: application/json' \
  --data '{
  "sender": "0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd",
  "sequence_number": "32425224034",
  "max_gas_amount": "32425224034",
  "gas_unit_price": "32425224034",
  "expiration_timestamp_secs": "32425224034",
  "payload": {
    "type": "entry_function_payload",
    "function": "0x1::aptos_coin::transfer",
    "type_arguments": [
      "<string>"
    ],
    "arguments": [
      "<any>"
    ]
  },
  "secondary_signers": [
    "0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd"
  ]
}'
"0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd"

Body

application/json

Request to encode a submission

sender
string
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.

Example:

"0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd"

sequence_number
string
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.

Example:

"32425224034"

max_gas_amount
string
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.

Example:

"32425224034"

gas_unit_price
string
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.

Example:

"32425224034"

expiration_timestamp_secs
string
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.

Example:

"32425224034"

payload
object
required

An enum of the possible transaction payloads

secondary_signers
string[]

Secondary signer accounts of the request for Multi-agent

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.

Response

200
application/json

All bytes (Vec<u8>) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.

Unlike the Address type, HexEncodedBytes will not trim any zeros.

Example:

"0xc739507214d0e1bf9795485299d709e00024e92f7c0d055a4c2c39717882bdfd"