Encode submission
POST
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.
Path Parameters
chainstringrequired
Parameter specifying the target chain to query.networkstringrequired
Parameter specifying the network of the target chain.header
acceptstring
The content type that the client can receive. The API works correctly only when application/x-bcs is specified.Responses
codestringrequired
Code identifying the cause of the failed request.messagestringrequired
Detailed message including the name and value of the invalid parameter.{"code": "ERROR_CODE","message": "Bad Request"}
cURL
curl -X POST 'https://aptos-mainnet.nodit.io/v1/transactions/encode_submission' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo' \-d '{}'