Transactions

A blockchain is built on its transactions. Transactions are accumulated by an L1 chain and combined into blocks every five seconds. Those blocks are hashed, signed, and written to the ledger for permanent and immutable storage.

Creating Transactions

Creating a transaction is as simple as creating a transaction type and then passing payload information to the chain. L1 chain payloads can be strings or stringified JSON objects.

$ dctl transactionType create "quickstart"
{
  "status": 200,
  "response": {
    "success": true
  },
  "ok": true
}

$ dctl transaction create "quickstart" "hello"
Could not parse JSON for payload, sending raw data instead...
{
  "status": 201,
  "response": {
    "transaction_id": "0296540b-eb8e-429e-addb-f36d6ac08244"
  },
  "ok": true
}

$ dctl transaction create "quickstart" '{"hello":"world"}'
{
  "status": 201,
  "response": {
    "transaction_id": "0f9a75c6-c8db-4c95-9bca-8194211a8e52"
  },
  "ok": true
}