snet-daemon
SingularityNET Daemon
Development
These instructions are intended to facilitate the development and testing of SingularityNET Daemon. Users interested in
deploying SingularityNET services using SingularityNET Daemon should install the appropriate binary as
released.
Prerequisites
Installing
$ git clone git@github.com:singnet/snet-daemon.git
$ cd snet-daemon
- Install development/test dependencies
$ ./scripts/install
- Build snet-daemon (on Linux amd64 platform)
$ ./scripts/build linux amd64
Testing
A simple test script has been setup that does the following
- Generates a bip39 mnemonic
- Runs a ganache-cli test RPC with the generated mnemonic
- Deploys the required network singleton contracts (SingularityNetToken, AgentFactory, Registry) and
creates an Agent contract instance
- Writes a daemon configuration file with the Agent contract address, generated mnemonic, and test RPC endpoint
- Runs an instance of snetd
- Creates and funds a Job contract instance
- Signs the job invocation
- Calls the daemon using the predetermined job address and job signature
- Cleans up
- Invoke all of the unit tests and the test script
$ ./scripts/test
Usage
Main commands
$ ./snetd-linux-amd64 serve
- Full list of commands, use --help to get more information.
$ ./build/snetd-linux-amd64 --help
Usage:
snetd [flags]
snetd [command]
Available Commands:
claim Claim money from payment channel
help Help about any command
init Write default configuration to file
list List channels, claims in progress, etc
serve
Flags:
-c, --config string config file (default "snetd.config.json")
-h, --help help for snetd
Use "snetd [command] --help" for more information about a command.
Configuration
Release
Precompiled binaries are published with each release.
Versioning
We use SemVer for versioning. For the versions available, see the
tags on this repository.
License
This project is licensed under the MIT License - see the
LICENSE file for details.