ocm-backend

command module
v0.0.0-...-6dc35e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2021 License: MIT Imports: 7 Imported by: 0

README

OCM Backend

This is a bespoke backend for fetching blockchain data from the One Click Miner.

This is work in progress and lacking documentation

Installation

Either compile the go binary or build the Docker container using the Dockerfile

Then, set up a PostgreSQL server and create a database. In that database run database.sql from the repository to create the table structure

Running

Set the following environment variables (either in a docker-compose if you're using the Docker container, or just plain export if you're running the go binary):

Setting Meaning Example
PGSQL_CONNECTION The connection string for the database postgres://user:pass@server/database?sslmode=disable
RPCHOST The host where vertcoind listens for RPC commands mainnet:5888
RPCUSER The rpc user to authenticate with rpc
RPCPASS The password to authenticate with 4rlkjjkasdlfkj2
OCM_BACKEND_STARTHEIGHT The height at which to begin indexing. Will start at genesis if omitted. Outputs received before startheight will not be shown as part of the balance 1300000
OCM_BACKEND_APIONLY Set this to 1 for backup API endpoints. The software does not support running the indexer twice against the same database, but setting this to 1 allows a backup endpoint for serving API requests and loadbalance it that way 1

Donations

If you want to reward this work you can donate some coins here:

  • Vertcoin : VnGYRfD65XFab4gE3feJwWVUuaxK7EgFPK
  • Bitcoin : 37E56moXYRE2RU9ddXnhu8gTLk7Rqq45eh

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL