Build a new cryptocurrency or DAO in just a few lines of code.
Build blockchain apps in the language of the web. Use any NPM module.
Write secure, scalable, interoperable blockchains on the Cosmos Network.
$ npm install lotion
// app.js
let lotion = require('lotion')
let app = lotion({
initialState: {
count: 0
}
})
app.use(function(state, tx) {
if (state.count === tx.nonce) {
state.count++
}
})
app.start().then(function(appInfo) {
console.log(`app started. gci: ${appInfo.GCI}`)
})
$ node app
# in another terminal:
$ npx lotion-cli state <GCI>