Skip to content

SpaceXpanse/libspex

 
 

Repository files navigation

SpeX Library

libspex is a C++ library that makes it easy to implement DApps on the SpaceXpanse Multiverse platform. It takes care of the interaction with the ROD Core daemon, so that developers only have to implement the rules of their DApp.

mover is a simple game using this library, where players can move around an infinite plane. It is fully functional, although mainly meant as example and/or basis for more complex games.

Similarly, nonfungible is a simple implementation of non-fungible assets on the SpaceXpanse Multiverse platform. It is useful as another example (of using the SQLite integration), for testing Democrit but also as an actual application on SpaceXpanse Multiverse for issuing and trading fungible and non-fungible tokens.

This repository also contains a framework for side channels as well as Ships, which is an example game for these channels.

Building

To build libspex and the example mover game, use the standard routine for building autotools-based software:

autogen.sh && ./configure && make

After a successful build, you can optionally run make check and/or make install to run tests and install the library and moverd on your system, respectively.

Prerequisites

libspex has a couple of dependencies which need to be installed for the configuration and/or build to be successful:

  • libjsoncpp: The Debian package libjsoncpp-dev can be used.
  • jsonrpccpp: For Debian, the packages libjsonrpccpp-dev and libjsonrpccpp-tools are not fresh enough. They need to be built from source; in particular, it must be a version that includes the commit 4f24acaf4c6737cd07d40a02edad0a56147e0713.
  • ZeroMQ with C++ bindings: Core ZeroMQ is available in the Debian package libzmq3-dev. The C++ bindings need to be installed from the source repository, as the version in the Debian package (at least for Debain 10 "Buster") is too old.
  • zlib: Available in Debian as zlib1g-dev.
  • SQLite3 with the session extension. In Debian, the libsqlite3-dev package can be installed. Alternatively, build from source and configure with --enable-session.
  • LMDB: Available for Debian in the liblmdb-dev package.
  • glog: Available for Debian as libgoogle-glog-dev.
  • gflags: The package (libgflags-dev) included with Debian can be used.
  • Protocol buffers are used both in C++ and Python. On Debian, the packages libprotobuf-dev, protobuf-compiler and python-protobuf can be used.
  • eth-utils, which itself depends on libsecp256k1. The latter is available on Debian as libsecp256k1-dev.

For the unit tests, also the Google test framework is needed. The package included with Debian 10 "Buster" is not fresh enough, it should be built and installed from source instead.

For running the integration tests based on Python, install Python3 and the jsonrpclib library. On Debian, this is python3-jsonrpclib-pelix.

Documentation

You can find an extensive dotumentation here.

About

C++ library that makes it easy to implement dApps into ROD blockchain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 88.3%
  • Python 9.7%
  • Makefile 1.3%
  • Other 0.7%