|
1 year ago | |
---|---|---|
dist | 1 year ago | |
docs | 1 year ago | |
emsdk/fastcomp/emscripten/src | 1 year ago | |
examples/csharp | 1 year ago | |
external | 1 year ago | |
include | 1 year ago | |
scripts | 1 year ago | |
src | 1 year ago | |
tests | 1 year ago | |
typescript | 1 year ago | |
.gitignore | 1 year ago | |
CMakeLists.txt | 1 year ago | |
LICENSE | 1 year ago | |
README.md | 1 year ago | |
binding.gyp | 1 year ago | |
build.sh | 1 year ago | |
build_gcc.sh | 1 year ago | |
build_js.sh | 1 year ago | |
install.js | 1 year ago | |
package-lock.json | 1 year ago | |
package.json | 1 year ago | |
tsconfig.json | 1 year ago | |
typedoc.json | 1 year ago |
This repository contains the necessary files to compile the cryptography library used within Fedoragold(FED) & TurtleCoin as a standalone library that can be included in various other projects in a variety of development environments, including:
This is an adaptation of the Turtlecoin crypto module for Fedoragold (FED)
Note: We build prebuilds of the Node.js native addon module as well as the WASM/JS binaries that are included for distribution with the NPM installed version of this package to speed up your development efforts.
Read very careful if you want this to work right the first time.
Open a Windows Powershell console as Administrator
Run the command: npm install -g windows-build-tools --vs2015
This will take a while. Sit tight.
npm install fedoragold-crypto
import { Crypto } from 'fedoragold-crypto';
const FedoragoldCrypto = new Crypto();
const Crypto = require('fedoragold-crypto').Crypto
const FedoragoldCrypto = new Crypto()
You can find the full TypeScript/JS documentation for this library here.
The CMake build system will, by default, create optimized native builds for your particular system type when you build the software. Using this method, the binaries created provide a better experience and all together faster performance.
However, if you wish to create portable binaries that can be shared between systems, specify -DARCH=default
in your CMake arguments during the build process. Note that portable binaries will have a noticable difference in performance than native binaries. For this reason, it is always best to build for your particuar system if possible.
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update
sudo apt-get install aptitude -y
sudo aptitude install -y build-essential git cmake
git clone -b master --single-branch https://git.fedoragold.com/jojapoppa/fedoragold-crypto.git
cd fedoragold-crypto
mkdir build
cd build
cmake ..
make -j
The static library will be built as libfedoragold-crypto.a
in the build folder.
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
You need to modify the below command for your version of ubuntu - see https://apt.llvm.org/
sudo add-apt-repository "deb https://apt.llvm.org/trusty/ llvm-toolchain-trusty 6.0 main"
sudo add-apt-repository "deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial 6.0 main"
sudo add-apt-repository "deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic 6.0 main"
sudo apt-get update
sudo apt-get install aptitude -y
sudo aptitude install -y -o Aptitude::ProblemResolver::SolutionCost='100*canceled-actions,200*removals'
sudo aptitude install build-essential clang-6.0 libstdc++-7-dev git cmake
export CC=clang-6.0
export CXX=clang++-6.0
git clone -b master --single-branch https://git.fedoragold.com/jojapoppa/fedoragold-crypto.git
cd fedoragold-crypto
mkdir build
cd build
cmake ..
make -j
The following library files will be created in the build
folder:
libfedoragold-crypto-static.a
Ensure you have the dependencies listed above.
If you want to use clang, ensure you set the environment variables CC
and CXX
.
See the ubuntu instructions for an example.
git clone -b master --single-branch https://git.fedoragold.com/jojapoppa/fedoragold-crypto.git
cd fedoragold-crypto
mkdir build
cd build
cmake ..
make -j
The following library files will be created in the build
folder:
libfedoragold-crypto-static.a
which brew || /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install --force cmake boost llvm
export CC=/usr/local/opt/llvm/bin/clang
export CXX=/usr/local/opt/llvm/bin/clang++
git clone -b master --single-branch https://git.fedoragold.com/jojapoppa/fedoragold-crypto.git
cd fedoragold-crypto
mkdir build
cd build
cmake ..
make
The following library files will be created in the build
folder:
libfedoragold-crypto-static.a
cd <your_fedoragold-crypto_directory>
mkdir build
cd build
set PATH="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin";%PATH%
cmake -G "Visual Studio 15 2017 Win64" ..
Note: If you have errors on this step about not being able to find the some libraries, you may need to update your cmake. Open ‘Visual Studio Installer’ and click ‘Update’.
MSBuild fedoragold-crypto.sln /p:Configuration=Release /m
The following library files will be created in the build/Release
folder:
fedoragold-crypto-static.lib
fedoragold-crypto-shared.lib
fedoragold-crypto-shared.dll
You will need the following packages:
git clone -b master --single-branch https://git.fedoragold.com/jojapoppa/fedoragold-crypto.git
cd fedoragold-crypto
source ./build_js.sh
This script will install the necessary dependencies on your machine and then proceed to compile the library to Native Javascript and WASM.
The following library files will be created in the jsbuild
folder:
fedoragold-crypto.js
fedoragold-crypto-wasm.js
TurtleCoin, Cryptonote Developers, Bytecoin Developers, Monero Developers, Forknote Project, Fedoragold Community
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2014-2018, The Monero Project
// Copyright (c) 2018-2019, The TurtleCoin Developers
// Copyright (c) 2021, The FedoraGold Developers
//
// Please see the included LICENSE file for more information.