Skip to main content
Version: release (v0.77)

Submit transaction

POST 

/transaction

Submit a signed transaction to the network containing a command to be executed such that if the submission is successful then it will be included in the chain's mempool. The network will then attempt to execute the transaction in the next available block, where the results of its execution can be seen on the EventBus.

Request

Body

required
    tx object

    Transaction containing a command to execute on the network, and a signature to provide authentication.

    address string

    Hex-encoded address of the sender. Not supported yet.

    inputData byte

    Protobuf message of type InputData marshalled into bytes. If the transaction version is V3 or higher then this bytes string must be prepended with chain_id_as_byes + \0.

    pow object

    Proof-of-work containing the random transaction ID used by the client and the nonce.

    nonce uint64

    Number which, combined with the transaction identifier, will produce a hash with the required number of leading zeros to be accepted by the network.

    tid string

    Unique transaction identifier used to seed the proof-of-work hash.

    pubKey string

    Hex-encoded public key of the sender.

    signature object

    Signature of the input data field, signed by the sender of this transaction.

    algo string

    Algorithm used to create the signature.

    value string

    Hex encoded bytes of the signature.

    version int64

    Version of the algorithm used to create the signature.

    version v1TxVersion (string)

    Possible values: [TX_VERSION_UNSPECIFIED, TX_VERSION_V2, TX_VERSION_V3]

    Default value: TX_VERSION_UNSPECIFIED

    Version of the transaction.

    type v1SubmitTransactionRequestType (string)

    Possible values: [TYPE_UNSPECIFIED, TYPE_ASYNC, TYPE_SYNC, TYPE_COMMIT]

    Default value: TYPE_UNSPECIFIED

    Method of submission.

Responses

A successful response.

Schema
    code int64

    Error code to indicate the category of failure if the transaction was not successfully submitted.

    data string

    Further details for why the transaction was not successfully submitted.

    height int64

    Unused.

    log string

    Further details for the underlying consensus layer of the result of the transaction.

    success boolean

    Whether or not the transaction was validated and submitted to the chain's mempool.

    txHash string

    Hash of the transaction, which can be used to identify the transaction in a node's event stream.

Loading...