simple, extensible cryptocurrency built on Lotion
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin initial commit Sep 13, 2017
example initial commit Sep 13, 2017
.gitignore initial commit Sep 13, 2017
index.js initial commit Sep 13, 2017
package-lock.json 0.0.1 Sep 13, 2017
package.json 0.0.1 Sep 13, 2017
readme.md Update readme.md Sep 13, 2017

readme.md


Lotion
Lotion coin

Friction-free framework for developing new cryptocurrencies. Built on Lotion.

Travis Build NPM Downloads NPM Version


Lotion coin is a simple, extensible cryptocurrency library written for Lotion.

With just a few lines of JavaScript, you can make your own new coin that behaves exactly how you want it to.

Out of the box, lotion-coin supports addresses and send transactions, but you can arbitrarily extend your coin's functionality by using it from within a more complex Lotion state machine.

lotion-coin can be used as a node module, or as a cli if it's installed globally.

If your coin is going to have real value, please use Cosmos SDK instead of lotion-coin. The security of lotion-coin has not yet been evaluated.

Usage

Lotion app usage

npm install lotion lotion-coin
let lotion = require('lotion')
let { handler, client } = require('lotion-coin')

let opts = {
  port: 3000
}

let app = lotion(opts)((state, tx) => {
  handler(state, tx)
})

CLI usage

To initialize and run as a validator for a new currency:

npm install -g lotion-coin
Lcoin init
Lcoin start

That'll log a genesis key and start a validator node.

Users can use that genesis key to connect with:

Lcoin start <genesis key>

To send some coins, open another terminal window and run:

Lcoin send --address <recipient address> --amount 123

You can always open http://localhost:3232 while Lcoin is running to see the full JSON representation of the blockchain state from Lotion.

joco