Skip to content

tendermint/js-abci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Alessio Treglia
Jul 29, 2020
7fbe690 · Jul 29, 2020

History

85 Commits
Nov 29, 2018
Jan 18, 2019
Jul 10, 2020
Oct 1, 2018
Jan 18, 2019
May 4, 2018
Sep 7, 2018
Jun 20, 2018
Feb 13, 2020
Jul 10, 2020
Sep 7, 2018
Jul 10, 2020
Jul 10, 2020
Jul 10, 2020

Repository files navigation

js-abci

ABCI server for Node.js. Supports Tendermint version 0.33+.

Usage

npm install abci

Requires Node.js v10.9+

let createServer = require('abci')

let server = createServer({
  info (request) {
    console.log('got info request', request)
    return { ... }
  }

  // implement any ABCI method handlers here
})
server.listen(26658)

let server = createServer(app)

Returns a net.Server that accepts ABCI connections from a Tendermint node.

app should be an object with ABCI method handler functions. Each handler receives one request argument, and can return the response value or a Promise which resolves to the response value. cb responds to the ABCI request with either the error or response value.

Supported ABCI methods are:

echo
flush
info
setOption
initChain
query
beginBlock
checkTx
deliverTx
endBlock
commit