scala-tron

Scala implementation of the Tron Protocol

Quick StartHow To UseClusterWikiContact

What’s TRON?

TRON is a block chain-based decentralized smart protocol and an application development platform. It allows each user to freely publish, store and own contents and data, and in the decentralized autonomous form, decides an incentive mechanism and enables application developers and content creators through digital asset distribution, circulation and transaction, thus forming a decentralized content entertainment ecosystem.

TRON is a product of Web 4.0 and the decentralized internet of next generation.

Quick Start

This project requires SBT
SBT (Simple Build Tool) is an open-source build tool for Scala and Java projects, similar to Java’s Maven and Ant.
Follow the instructions installing SBT to install SBT

git clone http://github.com/rovak/scala-tron
cd scala-tron
sbt "project cli" run

How To Use

The application can be interfaced in 2 ways:

Command Line

To launch the project on a command line, First run:

sbt "project cli" run

After that the following commands are available:

account

Show account key

balance

Show account balance

send --to <address> --amount <amount>

Sends the given amount to the given address

In order to execute the following commands, the cluster has to be up and running properly

cluster

Start cluster as leader

cluster --join <address>

Join cluster as client

Cluster

Cluster is based on Akka.
Akka is a toolkit for building highly concurrent, distributed, and resilient message-driven applications for Java and Scala

To start a cluster follow the following steps:

Web API

Start the server using sbt "project api" run

The API will then be available on http://localhost:9000

/wallet/<public key>

Shows the balance of the wallet for the given public key

Response

{
  "address": "a9c030dfbfb83f6c9454b5e1da5cecdb8737d4af",
  "balance": 10
}

Wiki

Contact