M2M wallet, as a part of MXProtocol is responsible for the Payments and accounting among machines (gateways, and devices) in MXC network.
M2M wallet will be used for accounting allocated and obtained network resources, Smart Machine Bidding and Data Market Place of MXProtocol.
Every organization (may have gateways or/and IoT devices) in MXC network has a corresponding wallet in M2M wallet.
At the first stage, MXC M2M wallet will be used in the MXProtocol MVP. MXProtocol MVP will be released in Q4 2019.
Note. This preliminary version of M2M wallet is under development and supposed to be improved. Additional features will be added to M2M wallet based on the MXProtocol design.
See MXC Developer Handbook for further information.
Note: UI part from m2m has been merged into lpwan-app-server, m2m no longer contains UI part.
However part of the APIs get data from m2m service, you need to start m2m service for accessing all features correctly.
-
Install Docker
Just follow Install using the repository / SET UP THE REPOSITORY, no need to install docker engine community -
Install docker-compose Just follow Install Compose on Linux systems
-
Add user to docker group
$ sudo usermod -aG docker $USER
git clone [email protected]:MXCFoundation/cloud/mxprotocol-server.git &&
cd mxprotocol-server
git fetch origin develop:develop &&
git checkout develop &&
git pull --rebase origin develop
- New feature branch required?
git checkout -b feature/MCL-XXX
- Existing feature branch?
Example: If there is a "feature" branch that you are working on in Jira (i.e. feature/MCL-117) and you are working on a task of that feature, then create a branch from that feature that is prefixed with your name (i.e. luke/MCL-118-page-network-servers)
git fetch origin feature/MCL-117:feature/MCL-117 &&
git checkout feature/MCL-117 &&
git pull --rebase origin feature/MCL-117
git checkout -b luke/MCL-118-page-network-servers
- Outside of container, do
$MXPROTOCOL-SERVER-PATH/mxprotocol-server local_database
After building, the service will start running with config file $MXPROTOCOL-SERVER-PATH/configuration/mxprotocol-server.toml.
- When you stop the service with Ctrl+c, you wil be inside of the container, after modifying the code, if you wanna rebuild, just stay inside of container and do:
$MXPROTOCOL-SERVER-PATH/mxprotocol-server build
Again, after building, the service will start running with config file $MXPROTOCOL-SERVER-PATH/configuration/mxprotocol-server.toml.
- Outside of container, do
$MXPROTOCOL-SERVER-PATH/mxprotocol-server remote_database REMOTE_SEVER
After building, the service will start running with config file $MXPROTOCOL-SERVER-PATH/configuration/mxprotocol-server.toml.
- When you stop the service with Ctrl+c, you wil be inside of the container, after modifying the code, if you wanna rebuild, just stay inside of container and do:
$MXPROTOCOL-SERVER-PATH/mxprotocol-server build
Again, after building, the service will start running with config file $MXPROTOCOL-SERVER-PATH/configuration/mxprotocol-server.toml.
Hint: if you wanna connect appserver, you need to do outside container:
docker network connect NETWORK_NAME_APPSERVER MXPROTOCOL_CONTGAINER_ID docker network connect MXPROTOCOL_CONTGAINER_ID NETWORK_NAME_APPSERVER
For sharing testing data during development, set postgresql service server wherever it is needed. Change in configuration/lora-app-server.toml
[postgresql]
dsn="postgres://USERNAME:PASSWORD@SERVICE_SERVER_DOMAIN_NAME:5432/DATABASE_NAME?sslmode=disable"
After changing config file, simply restart the service in docker container again
$ ./m2m/build/m2m -c configuration/mxprotocol-server.toml