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

77 lines
3.0 KiB
Markdown
Raw Normal View History

2021-07-13 16:42:39 -07:00
# ipfs-bch-wallet-service
2021-07-13 12:34:51 -07:00
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
2021-07-13 16:42:39 -07:00
This is a censorship-resistant, IPFS-based microservice that provides access for wallets to access the Bitcoin Cash (BCH) blockchain. It leverages [bch-js](https://github.com/Permissionless-Software-Foundation/bch-js).
2021-07-13 12:34:51 -07:00
2021-07-13 16:42:39 -07:00
## About This Repository
2021-07-13 12:34:51 -07:00
2021-07-13 16:42:39 -07:00
This repository is forked from the [ipfs-service-provider](https://github.com/Permissionless-Software-Foundation/ipfs-service-provider) repository. That code has been customized to provide BCH blockchain access for wallets. This server-side node.js app provides both REST API over HTTP and JSON RPC over IPFS endpoints for wallets to access the blockchain through.
2021-07-13 12:34:51 -07:00
2021-07-13 16:42:39 -07:00
As part of the end-to-end testing, a virtual client can be started that will interrogate every endpoint provided by this API server. This client can be forked by developers to write their own apps that use this IPFS-based service.
2021-07-13 12:34:51 -07:00
2021-07-13 16:53:30 -07:00
## Roadmap
This repository is one step in a longer path. Here are the major milestones of this path:
- Add wallet-based calls to ipfs-bch-wallet-service.
- Create a miniature version of bch-js that makes calls over JSON RPC (bch-js-ipfs).
- Given a variable, minimal-slp-wallet could call bch-js or bch-js-ipfs for network calls.
- Fork slp-cli-wallet and add `daemon` feature to spin up IPFS node and work with bch-js-ipfs.
2021-07-13 12:34:51 -07:00
## Requirements
- node **^14.17.0**
- npm **^7.13.0**
## Installation
```bash
2021-07-13 16:42:39 -07:00
git clone https://github.com/Permissionless-Software-Foundation/ipfs-bch-wallet-service
cd ipfs-bch-wallet-service
2021-07-13 12:34:51 -07:00
npm install
npm start
```
## Structure
The file layout of this repository differs from the koa-api-boilerplate. Instead, it follows the file layout of [Clean Architecture](troutsblog.com/blog/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](http://apidocjs.com/).
Visit `http://localhost:5000/docs/` to view docs
## Dependencies
- [koa2](https://github.com/koajs/koa/tree/v2.x)
- [koa-router](https://github.com/alexmingoia/koa-router)
- [koa-bodyparser](https://github.com/koajs/bodyparser)
- [koa-generic-session](https://github.com/koajs/generic-session)
- [koa-logger](https://github.com/koajs/logger)
- [MongoDB](http://mongodb.org/)
- [Mongoose](http://mongoosejs.com/)
- [Passport](http://passportjs.org/)
- [Nodemon](http://nodemon.io/)
- [Mocha](https://mochajs.org/)
- [apidoc](http://apidocjs.com/)
- [ESLint](http://eslint.org/)
- [ipfs-coord](https://www.npmjs.com/package/ipfs-coord)
## IPFS
Snapshots pinned to IPFS will be listed here.
## License
[MIT](./LICENSE.md)