Transaction structure

A typical transaction is a JSON object

{
  "space": "space-test",
  "key": "test-key1",
  "nonce": 18,
  "timestamp": 1565873556855,
  "tags": [
    "tag1",
    "tag2"
  ],
  "memo": "memo",
  "value": "test",
  "hash": "A17708249E655AA4A04A65D466F4503A1DCCDF8179081A8A7107B4D93CFA44DC",
  "signature": "3CX1IUlamnx5YeY03iVEkDiwbdRoEQ6d5cytPYT8sPvEPlNzCzCWc3IHThyWRjxN84hJ1VlKfeaS48ojXw47BQ==",
  "public_key": "hkL4iWtxyRGEKJnv75R/be/FH+x70SdE9yE3pKL/hek="
}

Transaction properties

Name

Description

Max size (bytes)

space

Space represents logical separation of areas where transactions are stored. For example, there could be several participants in a single blockchain network, each of them can have permissions to create transactions in subset of existing spaces.

128

key

The key field represents the document unique identifier. Each transaction represents a change to the state of this document.

128

tags

Tags is a list of additional transaction attributes. It is possible to search transactions by tags. It is possible to add up to 8 tags to transaction.

64

nonce

All transactions within the same space and tag are ordered by nonce. For example, first transaction to space "space1" and key "key1" must have nonce 1. Second transaction to this combination of space and tag must have nonce 2 and so on.

It is necessary as the history of transactions represents how object state was changing. If we would allow nonces to change values in different step, there could be a missed state possible as blockchain nodes can receive transactions in different order.

timestamp

Timestamp is a representation of time in milliseconds provided by the client when transaction has been created. Timestamp of a transaction can not be less than the last timestamp of the corresponding combination of space and tag fields.

memo

Informational field, represent text comment about transaction.

1024

value

The actual value of transaction. Can be a JSON document, base-64 encoded binary data or just plain text.

2048

height

The number of block in which transaction has ben included. Height attribute is not present when transaction is created by client API.

public_key

The public key of the transaction creator, base-64 encoded.

signature

The signature of transaction, base-64 encoded.

Last updated

Was this helpful?