Installation
C++ installation
For macOS you can use brew
to install gcc
by doing so : brew install gcc
CMake
CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice.
Install package with CMake
Head over to cmake.org or install it via Homebrew brew install cmake
.
Once CMake properly installed, you can now build the package.
Client
1git clone https://github.com/ArkEcosystem/cpp-client2cd cpp-client3mkdir build && cd build4cmake .5cmake --build .
Building and Running Tests
1cd cpp-crypto/build2cmake -DUNIT_TEST=ON ..3cmake --build .4./test/ark_cpp_client_tests
Crypto
1git clone https://github.com/ArkEcosystem/cpp-crypto2cd cpp-crypto3mkdir build && cd build4cmake .5cmake --build .
Building and Running Tests
1cd cpp-crypto/build2cmake -DUNIT_TEST=ON ..3cmake --build .4./test/ark_cpp_crypto_tests
Arduino
Arduino is an open-source electronics platform based on easy-to-use hardware and software. It’s intended for anyone making interactive projects.
Install package for Arduino
Download and install the Arduino IDE (>=1.8.5) from arduino.cc
Using the Arduino IDEs built-in Library Manager, install the Ark-Cpp-Crypto library. Be sure to install the “-arduino” version of Cpp-Crypto.
Dependencies
Using the Arduino IDEs built-in Library Manager, also install the following libraries:
Crypto:
Using With the Arduino IDE
Include the following header in your Arduino Sketch:
1#include <arkCrypto.h>
PlatformIO
An open source ecosystem for IoT development. Cross-platform IDE and unified debugger. Remote unit testing and firmware updates.
Install package for PlatformIO
Python is required to run PlatformIO, so grab an installer package from python.org .
Head over to platformio.org to learn how to install PlatformIO.
Once installed, add the following line to your platformio.ini
configuration file:
Client
1lib_deps = Ark-Cpp-Client
This is an example of a fully configured platformio.ini
file for the Adafruit ESP32 Feather:
1; PlatformIO Project Configuration File 2; 3; Build options: build flags, source filter 4; Upload options: custom upload port, speed and extra flags 5; Library options: dependencies, extra library storages 6; Advanced options: extra scripting 7; 8; Please visit documentation for the other options and examples 9; https://docs.platformio.org/page/projectconf.html10 11[env:featheresp32]platform = espressif3212board = featheresp3213framework = arduino14lib_deps = Ark-Cpp-Client15upload_speed = 92160016monitor_speed = 115200
Crypto
1lib_deps = Ark-Cpp-Crypto
This is an example of a fully configured platformio.ini
file for the Adafruit ESP32 Feather:
1; PlatformIO Project Configuration File 2; 3; Build options: build flags, source filter 4; Upload options: custom upload port, speed and extra flags 5; Library options: dependencies, extra library storages 6; Advanced options: extra scripting 7; 8; Please visit documentation for the other options and examples 9; https://docs.platformio.org/page/projectconf.html10 11[env:featheresp32]platform = espressif3212board = featheresp3213framework = arduino14lib_deps = Ark-Cpp-Crypto15upload_speed = 92160016monitor_speed = 115200