Skip to content

Catapult rest server

License

Unknown, LGPL-3.0 licenses found

Licenses found

Unknown
LICENSE.txt
LGPL-3.0
COPYING.LESSER
Notifications You must be signed in to change notification settings

rg911/catapult-rest

 
 

catapult-rest

Build Status Coverage Status

Catapult REST gateway combines HTTP and WebSockets to perform read and write actions on the blockchain.

Requirements

Versioning

Make sure you choose a version compatible with the catapult-server node you want to use it with.

Starting on v1.1.0, version numbers are described as follows:

vX.Y.Z

  • X: This serves to lock for compatibility with catapult-server, thus it is safe to update by keeping this number without REST losing server compatibility. Additionally, any breaking change to the server should require to upgrade this number.
  • Y: This serves to lock on safe updates to this project, thus it is safe to update by keeping this number without worrying about introducing breaking changes.
  • Z: Represents minor changes progress, used to identify specific versions when reporting bugs, or to get extensions to the code.

Installation

  1. Edit rest/resources/rest.json configuration:
Parameter Description Example
db.url MongoDB connection URL. mongodb://localhost:27017/
apiNode.host API node connection host. 127.0.0.1
apiNode.port API node connection port. 7900
apiNode.tlsClientCertificatePath API node TLS client certificate path. /api-node-config/cert/node.crt.pem
apiNode.tlsClientKeyPath API node TLS client key certificate path. /api-node-config/cert/node.key.pem
apiNode.tlsCaCertificatePath API node TLS CA certificate path. /api-node-config/cert/ca.cert.pem
websocket.mq.host ZeroMQ connection host. 127.0.0.1
websocket.mq.port ZeroMQ connection port. 7902

Note: catapult-rest has to reach the API node, ZeroMQ and MongoDB ports. If you are running catapult-server on a VPS, you can bind the ports to your local development environment creating an SSH tunnel: ssh -L 27017:localhost:27017 -L 7900:localhost:7900 -L 7902:localhost:7902 -p 2357 <USER>@<VPS_IP>

  1. Install the project's dependencies:
./yarn_setup.sh
  1. Run catapult-rest:
cd rest
yarn build
yarn start resources/rest.json

Usage

Please refer to the documentation for more information.

Contributing

Before contributing please read this and consider the following guidelines:

  • Submit small and concise PRs that address a single and clear feature or issue
  • Submit only fully tested code
  • Split test scope areas with Arrange/Act/Assert comments
  • Use spontaneous comments only when necessary
  • Follow linting rules - tests are set to fail if those aren't followed
  • Notify or update related API resources of accepted changes (OpenAPI)

License

Copyright (c) 2018 Jaguar0625, gimre, BloodyRookie, Tech Bureau, Corp Licensed under the GNU Lesser General Public License v3

About

Catapult rest server

Resources

License

Unknown, LGPL-3.0 licenses found

Licenses found

Unknown
LICENSE.txt
LGPL-3.0
COPYING.LESSER

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.2%
  • Other 0.8%