Skip to content

simple, extensible cryptocurrency built on Lotion

Notifications You must be signed in to change notification settings

keppel/lotion-coin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


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

About

simple, extensible cryptocurrency built on Lotion

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published