https://github.com/valerio-vaccaro/c-opentimestamps
C/C++ implementation of OpenTimestamps
https://github.com/valerio-vaccaro/c-opentimestamps
bitcoin c embedded opentimestamps
Last synced: 3 months ago
JSON representation
C/C++ implementation of OpenTimestamps
- Host: GitHub
- URL: https://github.com/valerio-vaccaro/c-opentimestamps
- Owner: valerio-vaccaro
- License: mit
- Created: 2018-06-11T12:31:56.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-28T14:30:02.000Z (almost 7 years ago)
- Last Synced: 2025-01-14T17:58:20.510Z (5 months ago)
- Topics: bitcoin, c, embedded, opentimestamps
- Language: C++
- Size: 146 KB
- Stars: 2
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# c-opentimestamps
C/C++ implementation of OpenTimestamps#### Compile Lib
Build `libc_opentimestamps` shared library and `main` sample binary.
```bash
mkdir build
cd build
cmake ../
make
```#### Import and Run
The sample `main.cpp` imports and uses shared library.
To compile successfully follow:
```bash
g++ main.cpp -o main -L./build/ -lc_opentimestamps
./main
```#### Problems Compiling
If `cmake ../` result's is somethings similar to:
```bash
{…omissis…}
CMake Error at /usr/local/{…omissis…}/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR)
{…omissis…}
```you can specify the right path to OpenSSL in `OPENSSL_ROOT_DIR`; for example:
```
cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl ../
```to debug:
```
cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_BUILD_TYPE=Debug ../
```#### Connect to Python
Install `swig` to generate the wrapper code `ots.py`
```bash
cd swig
./build.sh
```Import and Run on python2.7
```python
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 12:01:12)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ots
>>> dir(ots)
```#### Dependencies
libopenssl library