This is the repo for the sync component of the SensrNet application. It features a NodeJS API, for administrative purposes.
For more information see our documentation (and especially details about MultiChain).
The component features functionality to listen and write to the Eventstore and MultiChain. This way incoming and outgoing events can be written and published to the network.
The stack can be ran either locally, using docker with docker-compose, or deployed on a kubernetes cluster.
In order to run this application containerized, you'll need docker installed.
- health: Functionality to determine the application health.
- sync:
- checkpoint: Interface to interact with checkpoints.
- core: Module to read and write from Eventstore and MultiChain.
- eventstore: Interface to Eventstore.
- multichain: Interface to MultiChain.
Eventstore:
- Should be running. For instructions, view the Eventstore Documentation.
MongoDB:
- Should be running. For instructions, view the MongoDB Documentation.
MultiChain:
- Should be running. For instructions, view the MultiChain Documentation.
Sync App:
- npm ci
- npm start
Start component: Edit the multichain details in docker-compose.yml.
$ docker-compose up --build
Bringing down:
$ docker-compose stop
The API features functionality to retrieve the multichain blockchain address. This address can be granted permissions by different nodes in the network (e.g. send or create) using the grant API method. Nodes need at least send permissions before they can write to the blockchain network. Furthermore, the API contains functionality for creating streams and transactions, and (dis)approving smart filters. The API methods are documented following the OpenAPI specification.
Eventstore and Multichain checkpoints can be retrieved and updated using the ES and MC API methods. When a checkpoint is reset to a lower value, the events with these numbers will be retrieved from either the Eventstore or Multichain, and reprocessed.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Should you have any questions or concerns, please reach out to one of the project's Maintainers.
This work is licensed under a EUPL v1.2 license.