open-index/open-npm huggingface dataset:
npm package: @qryio/eosio-ship-scanner
Description: EOSIO SHiP Scanner
Latest version: 0.1.0-alpha20

# EOSIO SHiP Scanner [![Test](https://github.com/qryio/eosio-ship-scanner/actions/workflows/test.yml/badge.svg)](https://github.com/qryio/eosio-ship-scanner/actions/workflows/test.yml)

`eosio-ship-scanner` is a TypeScript/JavaScript component that helps receiving and parsing decoded actions and rows sent by the [EOSIO State History Plugin (SHiP)](https://developers.eos.io/manuals/eos/v2.0/nodeos/plugins/state_history_plugin/index)

## Runtime Requirements

The following is required to run it:

 - An EOSIO node configured to run with:
   - [State History Plugin (SHiP)](https://developers.eos.io/manuals/eos/v2.0/nodeos/plugins/state_history_plugin/index)
   - [Chain API Plugin](https://developers.eos.io/manuals/eos/v2.0/nodeos/plugins/chain_api_plugin/index)
   - [Http Plugin](https://developers.eos.io/manuals/eos/v2.0/nodeos/plugins/http_plugin/index)
- A redis database

## Usage

The basic usage is:
```typescript
import { SHiPEventEmitter } from '@qryio/eosio-ship-scanner'

const emitter = new SHiPEventEmitter({
    eosioHost: 'eosio-host',
    shipPort:  8080,
    rpcPort:   8888,
    batchSize: 10
}, {
    host: 'redis-host'
})

emitter.on('action', action => {
    // process action (block and trace)
})

emitter.on('row', row => {
    // process row in table delta
})

// blocks until it starts following head
await emitter.start()

```

## License

Code and documentation released under [Apache License 2.0](LICENSE)