Catapult REST gateway combines HTTP and WebSockets to perform read and write actions on the blockchain.
- Node.js 12 LTS
- yarn dependency manager
- docker
- symbol-bootstrap
-
Validate you are able to run Bootstrap by following the requirements.
-
Install the project dependencies:
./yarn_setup.sh
- Run a Symbol private network using Bootstrap:
cd rest
yarn build
yarn bootstrap-start
This Symbol network is a light preset network without rest. Rest will be running from source code, so you can test your changes! Mongo DB (27017), Server (7900) and Broker (7902) ports are open to localhost.
- Run catapult-rest:
In another terminal:
yarn start:dev
If everything goes well, you should see catapult-rest running by opening http://localhost:3000/node/info
in a new browser tab.
Alternatively, you can run bootstrap in detached
mode to avoid opening a new terminal.
cd rest
yarn build
yarn bootstrap-start-detached
yarn start:dev
yarn bootstrap-stop
Useful for test automation:
cd rest
yarn build
yarn bootstrap-start-detached
yarn test
yarn bootstrap-stop
Another alternative, is having bootstrap creating a Testnet node without rest that you can run from code:
yarn bootstrap-start-testnet
In another terminal
yarn start:dev
Please refer to the documentation for more information.
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.
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)
Copyright (c) 2018 Jaguar0625, gimre, BloodyRookie, Tech Bureau, Corp Licensed under the GNU Lesser General Public License v3