Raiinmaker Network
  • Getting Started
    • Who is Raiinmaker?
    • What is AI Reputation?
    • AI Jobs
      • Train the AI
        • How to Navigate the App
        • Train & Tag AI
        • Generate AI Art
      • Support the AI
        • The Coiin.AI Dashboard
        • Run Nodes
        • Burn, Stake Assets
      • Complete Quests/Missions
        • Take Part in Challenges
    • About Rewards
      • All About Moondrops
      • What is $COIIN
      • How to Earn $COIIN
      • How to Buy $COIIN
      • How to Withdraw $COIIN
    • About Citiizens
      • What is a Citiizen?
  • Validator Overview
    • Validators in the Raiinmaker Network
  • Developers
    • Architecture Overview
    • Getting Started with Coiin.AI
    • How to Get Started with EAL
    • Transactions
    • Creating Transactions
    • Getting Blocks
    • Getting Started with Raiinmaker Smart Contracts
  • Reference Documents
    • Dune Dashboard
  • Tutorials
    • How to Link Your Raiinmaker App & Coiin.AI Accounts
    • Raiinmaker: Train AI & Run a DePIN Validator to Earn Coiin
    • How To Set Up A Validator On Coiin.AI
    • Coiin.AI Setup Tutorial
    • Raiinmaker AI Tutorial
  • Links
    • Website
    • X (formerly Twitter)
    • Medium
    • Discord
    • Telegram
    • Instagram
    • Facebook
    • LinkedIn
    • YouTube
  • Support
    • Contact Support
Powered by GitBook
On this page
  • Transactions
  • Creating Transactions
  1. Developers

Creating Transactions

Transactions

A blockchain is built from blocks containing transactions. Transactions are accumulated by an enterprise chain and combined into blocks every five seconds. A block is only created if there are new transactions. Those blocks are hashed, signed, and written to the ledger for permanent and immutable storage. The block and its transactions are then sent (sans payload) to Raiinmaker Network for decentralized verification of proofs.

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.

Create the transaction type:

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

Create various transactions:

$ coiin 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
}

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

On a real system, it is recommended to standardize the data structure for every transaction type so that you may create efficient indexes to search for transactions based upon important payload fields, however, it is possible to send fully arbitrary payload data within a transaction to your business chain if you so desire.

PreviousTransactionsNextGetting Blocks

Last updated 9 months ago