Transaction

This section describes the structure of a transaction

Overview

A transaction is used to effect a change in the state of the blockchain state. We use transactions to authorize and initiate the movement of value from one account to another. They are also use to cause the execution of arbitrary behaviours in smart contracts.

Structure

Field

Type

Description

type

The type of transaction (0x1 = Balance or 0x2 = Allocation)

fee

String

The amount of fee to be paid.

from

String

The address of the creator.

to

String

The address of the recipient or beneficiary.

value

String

The amount of ELL to be sent to the recipient.

nonce

The number of transactions created by the sender.

senderPubKey

String

The public key of the sender. Used to verify the transaction signature.

hash

String

The hash of the transaction

timestamp

The unix time of creation.

sig

The signature of the transaction.

Example:

{
    "fee": "0",
    "from": "eNGGuhVSrXWWFYmVQBid9hFhiNLAfvPwzS",
    "hash": "0xf91be74146afb8717834f70969d02edff4316508dc62ec8716104968391fc492",
    "nonce": "0x0",
    "senderPubKey": "497a8Z5sTvCgFZYyQQ8Uh3tgm726uPBzM4v3fNpcygevyCcTJf6",
    "sig": "0xe579837d73b45af9cc9e381cfe7009106c5ea6c65a22356a61103e9724b92bbb8a7243a4765d28d9e2aa89d34df585efc08c07fff9eb4a649f60f03f3310890e",
    "timestamp": "0x5bcc82b7",
    "to": "eGzzf1HtQL7M9Eh792iGHTvb6fsnnPipad",
    "type": "0x2",
    "value": "100"
}

Last updated