Movement Labs LogoMovement Docs
Node API

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
senderAddress

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.

Formathex
sequence_numberU64

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.

Formatuint64
max_gas_amountU64

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.

Formatuint64
gas_unit_priceU64

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.

Formatuint64
expiration_timestamp_secsU64

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.

Formatuint64
payloadTransactionPayload

An enum of the possible transaction payloads

typestring
Value in"entry_function_payload"
functionEntryFunctionId

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_argumentsarray<MoveType>

Type arguments of the function

argumentsarray<unknown>

Arguments of the function

typestring
Value in"script_payload"
codeMoveScriptBytecode

Move script bytecode

type_argumentsarray<MoveType>

Type arguments of the function

argumentsarray<unknown>

Arguments of the function

typestring
Value in"module_bundle_payload"
typestring
Value in"multisig_payload"
multisig_addressAddress

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.

Formathex
transaction_payload?MultisigTransactionPayload
signatureTransactionSignature

An enum representing the different transaction signatures available

typestring
Value in"ed25519_signature"
public_keyHexEncodedBytes

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.

Formathex
signatureHexEncodedBytes

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.

Formathex
typestring
Value in"multi_ed25519_signature"
public_keysarray<HexEncodedBytes>

The public keys for the Ed25519 signature

signaturesarray<HexEncodedBytes>

Signature associated with the public keys in the same order

thresholdinteger

The number of signatures required for a successful transaction

Formatuint8
bitmapHexEncodedBytes

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.

Formathex
typestring
Value in"multi_agent_signature"
senderAccountSignature

Account signature scheme

The account signature scheme allows you to have two types of accounts:

  1. A single Ed25519 key account, one private key
  2. A k-of-n multi-Ed25519 key account, multiple private keys, such that k-of-n must sign a transaction.
  3. A single Secp256k1Ecdsa key account, one private key
typestring
Value in"ed25519_signature"
public_keyHexEncodedBytes

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.

Formathex
signatureHexEncodedBytes

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.

Formathex
typestring
Value in"multi_ed25519_signature"
public_keysarray<HexEncodedBytes>

The public keys for the Ed25519 signature

signaturesarray<HexEncodedBytes>

Signature associated with the public keys in the same order

thresholdinteger

The number of signatures required for a successful transaction

Formatuint8
bitmapHexEncodedBytes

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.

Formathex
typestring
Value in"single_key_signature"
public_keyPublicKey
typestring
Value in"ed25519"
valueHexEncodedBytes

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.

Formathex
typestring
Value in"secp256k1_ecdsa"
valueHexEncodedBytes

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.

Formathex
typestring
Value in"secp256r1_ecdsa"
valueHexEncodedBytes

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.

Formathex
typestring
Value in"keyless"
valueHexEncodedBytes

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.

Formathex
typestring
Value in"federated_keyless"
valueHexEncodedBytes

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.

Formathex
signatureSignature
typestring
Value in"ed25519"
valueHexEncodedBytes

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.

Formathex
typestring
Value in"secp256k1_ecdsa"
valueHexEncodedBytes

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.

Formathex
typestring
Value in"web_authn"
valueHexEncodedBytes

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.

Formathex
typestring
Value in"keyless"
valueHexEncodedBytes

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.

Formathex
typestring
Value in"multi_key_signature"
public_keysarray<PublicKey>
signaturesarray<IndexedSignature>
signatures_requiredinteger
Formatuint8
typestring
Value in"no_account_signature"
secondary_signer_addressesarray<Address>

The other involved parties' addresses

secondary_signersarray<AccountSignature>

The associated signatures, in the same order as the secondary addresses

typestring
Value in"fee_payer_signature"
senderAccountSignature

Account signature scheme

The account signature scheme allows you to have two types of accounts:

  1. A single Ed25519 key account, one private key
  2. A k-of-n multi-Ed25519 key account, multiple private keys, such that k-of-n must sign a transaction.
  3. A single Secp256k1Ecdsa key account, one private key
typestring
Value in"ed25519_signature"
public_keyHexEncodedBytes

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.

Formathex
signatureHexEncodedBytes

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.

Formathex
typestring
Value in"multi_ed25519_signature"
public_keysarray<HexEncodedBytes>

The public keys for the Ed25519 signature

signaturesarray<HexEncodedBytes>

Signature associated with the public keys in the same order

thresholdinteger

The number of signatures required for a successful transaction

Formatuint8
bitmapHexEncodedBytes

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.

Formathex
typestring
Value in"single_key_signature"
public_keyPublicKey
typestring
Value in"ed25519"
valueHexEncodedBytes

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.

Formathex
typestring
Value in"secp256k1_ecdsa"
valueHexEncodedBytes

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.

Formathex
typestring
Value in"secp256r1_ecdsa"
valueHexEncodedBytes

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.

Formathex
typestring
Value in"keyless"
valueHexEncodedBytes

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.

Formathex
typestring
Value in"federated_keyless"
valueHexEncodedBytes

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.

Formathex
signatureSignature
typestring
Value in"ed25519"
valueHexEncodedBytes

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.

Formathex
typestring
Value in"secp256k1_ecdsa"
valueHexEncodedBytes

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.

Formathex
typestring
Value in"web_authn"
valueHexEncodedBytes

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.

Formathex
typestring
Value in"keyless"
valueHexEncodedBytes

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.

Formathex
typestring
Value in"multi_key_signature"
public_keysarray<PublicKey>
signaturesarray<IndexedSignature>
signatures_requiredinteger
Formatuint8
typestring
Value in"no_account_signature"
secondary_signer_addressesarray<Address>

The other involved parties' addresses

secondary_signersarray<AccountSignature>

The associated signatures, in the same order as the secondary addresses

fee_payer_addressAddress
fee_payer_signerAccountSignature

Empty Object

typestring
Value in"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
}