@hokid/transcan

Scan transactions and save on server

Usage no npm install needed!

<script type="module">
  import hokidTranscan from 'https://cdn.skypack.dev/@hokid/transcan';
</script>

README

Install

$ npm install -g @hokid/transcan

Usage

  1. Make directory for transcan
$ makedir transcan-example
$ cd transcan-example
  1. Create configuration file, for example, .transcan.config.js.

Put this in configuration file and replace placeholders.

module.exports = {
  tasks: [
    { name: 'BTC', scheduleTime: <CRON_SCHEDULIGN_FORMAT> },
    { name: 'ETH', scheduleTime: <CRON_SCHEDULIGN_FORMAT> }
  ],
  db: {
    host: <POSTGRES_HOST>,
    port: <POSTGRES_PORT>,
    user: <POSTGRES_USER>,
    password: <POSTGRES_PASSWORD>,
    database: <POSTGRES_DATABASE>
  },
  apiBase: <API_URL>,
  cacheFile: <NAME_FOR_CACHE_FILE>
}

  1. Run it:
$ transcan -c .transcan.config.js