Method: projects.locations.endpoints.submitTransaction

Submits a transaction to the network. The request is first validated for basic correctness. If validation fails, the request will fail immediately. If validation succeeds, this method returns only after the transaction has been replicated across a majority of validators in the network, or until the request fails.

HTTP request


POST https://universalledger.googleapis.com/v1/{endpoint=projects/*/locations/*/endpoints/*}:submitTransaction

The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
endpoint

string

Required. The endpoint to submit the transaction to. Format: projects/{project}/locations/{location}/endpoints/{endpoint} The location is a region.

Request body

The request body contains data with the following structure:

JSON representation
{
  "serializedSignedTransaction": string
}
Fields
serializedSignedTransaction

string (bytes format)

Required. A protobuf serialized SignedTransaction to submit to the ledger. Using a serialized format ensures that all validators compute the same transaction ID as the SHA-256 digest of the serialized bytes.

A base64-encoded string.

Response body

Response message for endpoints.submitTransaction.

If successful, the response body contains data with the following structure:

JSON representation
{
  "transactionDigestHex": string
}
Fields
transactionDigestHex

string

Identifier that uniquely represents the submitted transaction. It is the hexadecimal representation of the SHA-256 digest of the serializedSignedTransaction. This transaction ID is provided so that a client can track the transaction without needing to implement the hashing logic itself. The identifier can be directly used in subsequent API calls, for example to query the transaction state.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.