Files
ipfs-bch-wallet-consumer/README.md
T

3.0 KiB

ipfs-bch-wallet-consumer

js-standard-style semantic-release

This is a REST API server based on Koa. It's essentially a mirror image of ipfs-bch-wallet-service. Where ipfs-bch-wallet-service is intended to be coupled to bch-api to provide blockchain service, ipfs-bch-wallet-consumer provides a localized REST API for consuming that blockchain service.

When started, this web server starts an IPFS node and connects to an ipfs-bch-wallet-service server over the IPFS network. It then pipes that connection over its own localized REST API.

More details are available at CashStack.info.

Requirements

  • node ^14.18.2
  • npm ^8.3.0
  • Docker ^20.10.8
  • Docker Compose ^1.27.4

Installation

Development Environment

To run this software, you must have an instance of go-ipfs running in daemon mode, with the --enable-pubsub-experiment flag set. Here are instruction for installing go-ipfs.

Clone this repository and install npm dependencies. You'll also need to install MongoDB if you don't already have it installed:

git clone https://github.com/Permissionless-Software-Foundation/ipfs-bch-wallet-consumer
cd ipfs-bch-wallet-consumer
./install-mongo-sh
sudo npm install -g node-pre-gyp
npm install
cd shell-script
./local-external-ipfs-node.sh

Production Environment

The docker directory contains a Dockerfile for building a production deployment.

docker-compose pull
docker-compose up -d

You can bring the containers back up with docker-compose up -d.

Code Structure

The file layout of this repository differs from the koa-api-boilerplate. Instead, it follows the file layout of Clean Architecture.

Usage

  • npm start Start server on live mode
  • npm run docs Generate API documentation
  • npm test Run mocha tests
  • docker-compose build Build a 'production' Docker container
  • docker-compose up Run the docker container

Documentation

API documentation is written inline and generated by apidoc.

Visit http://localhost:5000/docs/ to view docs

There is additional developer documentation in the dev-docs directory.

Dependencies

This repository is forked from ipfs-service-provider.

IPFS

Snapshots pinned to IPFS will be listed here.

License

MIT