Skip to main content

Encode submission

POST 

/transactions/encode_submission

This API accepts unsigned transaction information in JSON format and converts it to BCS (Binary Canonical Serialization) format. You can use the converted result to sign the transaction and then submit it via the Submit Transaction API.

That is, this endpoint enables you to submit transaction requests to the API even in languages that do not have BCS-supporting libraries. You do not need to use this endpoint when using an SDK that supports BCS, such as the official Rust, TypeScript, or Python SDK.

To sign a transaction using this endpoint's response:

  • Decode the hex-encoded string from the response into bytes.
  • Sign the decoded bytes.
  • Convert the signed bytes to Ed25519 signature format and use it to create the final transaction signature.

Request

Responses

Successful Response

Response Headers
    X-APTOS-BLOCK-HEIGHT

    Current block height of the chain

    X-APTOS-CHAIN-ID

    Chain ID of the current chain

    X-APTOS-EPOCH

    Current epoch of the chain

    X-APTOS-LEDGER-OLDEST-VERSION

    Oldest unpruned ledger version of the chain

    X-APTOS-LEDGER-TIMESTAMPUSEC

    Current timestamp of the chain

    X-APTOS-LEDGER-VERSION

    Current ledger version of the chain

    X-APTOS-OLDEST-BLOCK-HEIGHT

    Oldest unpruned block height of the chain

    X-APTOS-CURSOR

    Cursor for the next page

    X-APTOS-GAS-USED

    Amount of gas actually used for transaction execution