snet-daemon

module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2018 License: MIT

README

snet-daemon

CircleCI

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
  • Clone the git repository
$ 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

  1. Generates a bip39 mnemonic
  2. Runs a ganache-cli test RPC with the generated mnemonic
  3. Deploys the required network singleton contracts (SingularityNetToken, AgentFactory, Registry) and creates an Agent contract instance
  4. Writes a daemon configuration file with the Agent contract address, generated mnemonic, and test RPC endpoint
  5. Runs an instance of snetd
  6. Creates and funds a Job contract instance
  7. Signs the job invocation
  8. Calls the daemon using the predetermined job address and job signature
  9. Cleans up
  • Invoke all of the unit tests and the test script
$ ./scripts/test

Usage

Main commands
  • Start snet-daemon
$ ./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.

Directories

Path Synopsis
resources
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL