Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tendermint/js-abci
Javascript ABCI libraries
https://github.com/tendermint/js-abci
Last synced: 9 days ago
JSON representation
Javascript ABCI libraries
- Host: GitHub
- URL: https://github.com/tendermint/js-abci
- Owner: tendermint
- Created: 2016-01-29T19:10:46.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-11-03T13:42:04.000Z (about 1 year ago)
- Last Synced: 2024-09-30T23:12:48.429Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 674 KB
- Stars: 87
- Watchers: 16
- Forks: 41
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - ABCI server
README
# js-abci
ABCI server for Node.js. Supports Tendermint version 0.33+.
## Usage
`npm install abci`
Requires Node.js v10.9+
```js
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`](https://nodejs.org/api/net.html#net_class_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
```