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:
- 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.
- Sign the encoded transaction and use it to create a TransactionSignature.
- 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.
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.
hexA 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.
uint64A 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.
uint64A 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.
uint64A 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.
uint64An enum of the possible transaction payloads
"entry_function_payload"Entry function id is string representation of a entry function defined on-chain.
Format: {address}::{module name}::{function name}
Both module name and function name are case-sensitive.
Type arguments of the function
Arguments of the function
"script_payload"Move script bytecode
Type arguments of the function
Arguments of the function
"module_bundle_payload""multisig_payload"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.
hexAn enum representing the different transaction signatures available
"ed25519_signature"All bytes (Vec) 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.
hexAll bytes (Vec) 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.
hex"multi_ed25519_signature"The public keys for the Ed25519 signature
Signature associated with the public keys in the same order
The number of signatures required for a successful transaction
uint8All bytes (Vec) 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.
hex"multi_agent_signature"Account signature scheme
The account signature scheme allows you to have two types of accounts:
- A single Ed25519 key account, one private key
- A k-of-n multi-Ed25519 key account, multiple private keys, such that k-of-n must sign a transaction.
- A single Secp256k1Ecdsa key account, one private key
"ed25519_signature"All bytes (Vec) 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.
hexAll bytes (Vec) 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.
hex"multi_ed25519_signature"The public keys for the Ed25519 signature
Signature associated with the public keys in the same order
The number of signatures required for a successful transaction
uint8All bytes (Vec) 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.
hex"single_key_signature""ed25519"All bytes (Vec) 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.
hex"secp256k1_ecdsa"All bytes (Vec) 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.
hex"secp256r1_ecdsa"All bytes (Vec) 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.
hex"keyless"All bytes (Vec) 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.
hex"federated_keyless"All bytes (Vec) 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.
hex"ed25519"All bytes (Vec) 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.
hex"secp256k1_ecdsa"All bytes (Vec) 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.
hex"web_authn"All bytes (Vec) 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.
hex"keyless"All bytes (Vec) 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.
hex"multi_key_signature"uint8"no_account_signature"The other involved parties' addresses
The associated signatures, in the same order as the secondary addresses
"fee_payer_signature"Account signature scheme
The account signature scheme allows you to have two types of accounts:
- A single Ed25519 key account, one private key
- A k-of-n multi-Ed25519 key account, multiple private keys, such that k-of-n must sign a transaction.
- A single Secp256k1Ecdsa key account, one private key
"ed25519_signature"All bytes (Vec) 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.
hexAll bytes (Vec) 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.
hex"multi_ed25519_signature"The public keys for the Ed25519 signature
Signature associated with the public keys in the same order
The number of signatures required for a successful transaction
uint8All bytes (Vec) 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.
hex"single_key_signature""ed25519"All bytes (Vec) 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.
hex"secp256k1_ecdsa"All bytes (Vec) 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.
hex"secp256r1_ecdsa"All bytes (Vec) 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.
hex"keyless"All bytes (Vec) 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.
hex"federated_keyless"All bytes (Vec) 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.
hex"ed25519"All bytes (Vec) 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.
hex"secp256k1_ecdsa"All bytes (Vec) 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.
hex"web_authn"All bytes (Vec) 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.
hex"keyless"All bytes (Vec) 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.
hex"multi_key_signature"uint8"no_account_signature"The other involved parties' addresses
The associated signatures, in the same order as the secondary addresses
Empty Object
"single_sender"Response Body
curl -X POST "https://full.mainnet.movementinfra.xyz/v1/transactions" \
-H "Content-Type: application/json" \
-d '{
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"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": [
null
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
}
}'{
"hash": "string",
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"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": [
null
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
}
}{
"message": "string",
"error_code": "account_not_found",
"vm_error_code": 0
}{
"message": "string",
"error_code": "account_not_found",
"vm_error_code": 0
}{
"message": "string",
"error_code": "account_not_found",
"vm_error_code": 0
}{
"message": "string",
"error_code": "account_not_found",
"vm_error_code": 0
}{
"message": "string",
"error_code": "account_not_found",
"vm_error_code": 0
}{
"message": "string",
"error_code": "account_not_found",
"vm_error_code": 0
}{
"message": "string",
"error_code": "account_not_found",
"vm_error_code": 0
}