Front-to-Back Example 1

Using the MPE payment system in SingularityNET with one replica configuration.

NOTE: Please find the .sh documents on Github if you are reading this on the developer portal here.


  • - install and setup everything and start a local network and IPFS
  • - register and start a simple service (one payment group one endpoint)
  • - make a call to the service
  • - run treasurer server in order to see list of claimed channels, and claim your channels

Test should be run on a clean environment in the given order.

Run tests in docker container

Install everything

#I. Download example scripts and make sure that scripts are in the current directory.

git clone
cd dev-portal/docs/all/mpe/front-to-back-examples/scripts/example1

#II. Run ubuntu:latest docker container and "mount" ./ to /example1
docker run -v `pwd`:/example1 -it ubuntu:latest

#III. Now you are inside a docker container. We will install everything.
. /example1/for_docker/

Create docker image with everything installed (optional)

At this point you can “commit” your docker container.

  1. Open new terminal on your main system (without closing your docker container!)
  2. Using “docker ps” your get “container id” of your running container.
  3. Type “docker commit $USER/snet_example1"

After this you will be able to use $USER/snet_example1 instead of ubuntu:latest (without running

# you should be inside example1 directory
#cd dev-portal/docs/all/mpe/front-to-back-examples/scripts/example1
docker run -v `pwd`:/example1 -it $USER/snet_example1

Register and run example service

# reset environment
. /example1/for_docker/

# register your service
. /example1/

Run client

After running the service, the terminal will not return to you, so you will need to open a second terminal in your container.

  1. You should open new terminal in your main system.
  2. You should get “container id” of your running container by typing “docker ps”
  3. You should type “docker exec -it bash".

And your can run your client

. /example1/

# it should print "42.0"

Run treasurer

. /example1/