From 864a55e4855d4112edce1457040c2458935c711f Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 29 Mar 2023 11:28:03 +0200 Subject: [PATCH 01/57] gui/src/MainWindow.hpp: fix indentation --- gui/src/MainWindow.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/MainWindow.hpp b/gui/src/MainWindow.hpp index 1658195..deb4a66 100644 --- a/gui/src/MainWindow.hpp +++ b/gui/src/MainWindow.hpp @@ -34,7 +34,7 @@ class MainWindow : public QMainWindow { Q_OBJECT public: - MainWindow(QWidget *parent = 0); + MainWindow(QWidget *parent = 0); private slots : From b3378eda160fbbf393062ae2f6433272965efb4e Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 29 Mar 2023 11:30:24 +0200 Subject: [PATCH 02/57] common/cmake/libeosio.cmake: Update to v0.1.6 --- common/cmake/libeosio.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/cmake/libeosio.cmake b/common/cmake/libeosio.cmake index c45cac9..11c5d15 100644 --- a/common/cmake/libeosio.cmake +++ b/common/cmake/libeosio.cmake @@ -2,7 +2,7 @@ # Variables # -------------------------------- set( LIBEOSIO_GIT_URL "https://github.com/eosswedenorg/libeosio.git" ) -set( LIBEOSIO_WANTED_VERSION v0.1.4 ) +set( LIBEOSIO_WANTED_VERSION v0.1.6 ) # -------------------------------- # Macros From 13a99e15d996d6e2a09ecb9702a8e053203ba149 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 29 Mar 2023 11:30:49 +0200 Subject: [PATCH 03/57] fix libeosio header includes. --- cli/src/cli_key_search_result.hpp | 2 +- common/include/eoskeygen/key_search.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/cli_key_search_result.hpp b/cli/src/cli_key_search_result.hpp index 4f1e47b..a81a877 100644 --- a/cli/src/cli_key_search_result.hpp +++ b/cli/src/cli_key_search_result.hpp @@ -25,7 +25,7 @@ #define EOSIOKEYGEN_KEY_SEARCH_HELPERS_H #include -#include +#include #include #include #include diff --git a/common/include/eoskeygen/key_search.hpp b/common/include/eoskeygen/key_search.hpp index b7fa5af..21e3c2a 100644 --- a/common/include/eoskeygen/key_search.hpp +++ b/common/include/eoskeygen/key_search.hpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include From 0781b7db805ef887dca8c7fc7d066f699bc2e0be Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 29 Mar 2023 11:31:21 +0200 Subject: [PATCH 04/57] cli/src/main.cpp: Make sure to call libeosio::ec_init() and ec_shutdown() --- cli/src/main.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/cli/src/main.cpp b/cli/src/main.cpp index ebf8789..74a7aa0 100644 --- a/cli/src/main.cpp +++ b/cli/src/main.cpp @@ -124,6 +124,9 @@ int main(int argc, char **argv) { std::string search_words; int search_count; size_t bench_count; + int rc = 0; + + libeosio::ec_init(); CLI::Option* version = cmd.add_flag("-v,--version", "Show version"); CLI::Option* fio = cmd.add_flag("--fio", "Generate keys from FIO network instead of EOSIO."); @@ -165,7 +168,7 @@ int main(int argc, char **argv) { if (*version) { std::cout << PROGRAM_NAME << ": v" << PROGRAM_VERSION << std::endl; - return 0; + goto end; } if (*fio) { @@ -205,18 +208,19 @@ int main(int argc, char **argv) { std::string filename = search_words.substr(5); if (!eoskeygen::readLines(filename, words)) { std::cerr << "Could not read file: " << filename << std::endl; - return 0; + goto end; } if (words.size() < 1) { std::cerr << filename << " did not contain any words" << std::endl; - return 0; + goto end; } } else { words = eoskeygen::strlist::splitw(search_words); } - return cmd_search(words, dict, search_count); + rc = cmd_search(words, dict, search_count); + goto end; } else if (bench_cmd->parsed()) { cmd_benchmark(bench_count); @@ -226,8 +230,9 @@ int main(int argc, char **argv) { struct libeosio::ec_keypair pair; libeosio::ec_generate_key(&pair); libeosio::wif_print_key(&pair, key_prefix); - return 0; + goto end; } - return 0; +end: libeosio::ec_shutdown(); + return rc; } From e0a7d8fb216a9c47e1d0a46613d4bddbe603f929 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 29 Mar 2023 11:31:42 +0200 Subject: [PATCH 05/57] gui/src/MainWindow.cpp: Make sure to call libeosio::ec_init() and ec_shutdown() --- gui/src/MainWindow.cpp | 7 +++++++ gui/src/MainWindow.hpp | 1 + 2 files changed, 8 insertions(+) diff --git a/gui/src/MainWindow.cpp b/gui/src/MainWindow.cpp index 8000ac1..78b3a7a 100644 --- a/gui/src/MainWindow.cpp +++ b/gui/src/MainWindow.cpp @@ -35,6 +35,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow (parent), m_fio_action (nullptr) { + libeosio::ec_init(); + // Create sub windows and stacked widget. m_stacked = new QStackedWidget(); m_stacked->addWidget(new GenerateWindow()); @@ -60,6 +62,11 @@ m_fio_action (nullptr) menuBar()->addAction("About", this, SLOT(showAbout())); } +MainWindow::~MainWindow() +{ + libeosio::ec_shutdown(); +} + void MainWindow::switchToGenerate() { m_stacked->setCurrentIndex(0); diff --git a/gui/src/MainWindow.hpp b/gui/src/MainWindow.hpp index deb4a66..06d3fcb 100644 --- a/gui/src/MainWindow.hpp +++ b/gui/src/MainWindow.hpp @@ -35,6 +35,7 @@ class MainWindow : public QMainWindow Q_OBJECT public: MainWindow(QWidget *parent = 0); + virtual ~MainWindow(); private slots : From b39a2a09ae3a817981d3f7925ac644e7a9eb2f2b Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 29 Mar 2023 11:33:23 +0200 Subject: [PATCH 06/57] LICENSE: Update year. --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 81ee5da..635055a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019-2021 EOS Sw/eden +Copyright (c) 2019-2023 EOS Sw/eden Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From d579879d71352b2a271aeeff5911fef1d309506f Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 4 Apr 2023 14:08:53 +0200 Subject: [PATCH 07/57] common/include/eoskeygen/key_search.hpp: make prefix into a variable (we need it for k1 keys). --- common/include/eoskeygen/key_search.hpp | 6 ++++++ common/src/key_search.cpp | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/common/include/eoskeygen/key_search.hpp b/common/include/eoskeygen/key_search.hpp index 21e3c2a..040023a 100644 --- a/common/include/eoskeygen/key_search.hpp +++ b/common/include/eoskeygen/key_search.hpp @@ -47,6 +47,8 @@ public : public : KeySearch(); + void setPrefix(const std::string& prefix); + // Add a word to search for. void addWord(const std::string& str); @@ -97,6 +99,10 @@ protected : void _search_linear(); protected : + + // Public key prefix. + std::string m_prefix; + // List of words to search for. strlist_t m_words; diff --git a/common/src/key_search.cpp b/common/src/key_search.cpp index f7af039..7b8c086 100644 --- a/common/src/key_search.cpp +++ b/common/src/key_search.cpp @@ -31,6 +31,7 @@ namespace eoskeygen { KeySearch::KeySearch() : + m_prefix ("EOS"), m_max (0), m_count (0), #ifdef EOSIOKEYGEN_HAVE_THREADS @@ -40,6 +41,11 @@ KeySearch::KeySearch() : { } +void KeySearch::setPrefix(const std::string& prefix) +{ + m_prefix = prefix; +} + void KeySearch::addWord(const std::string& str) { std::string tmp = str; @@ -107,14 +113,14 @@ void KeySearch::find(size_t num_results) bool KeySearch::_contains_word(const struct libeosio::ec_keypair* key, struct result& result) { - // skip first 3 chars, as those are always "EOS" - std::string pubstr = libeosio::wif_pub_encode(key->pub).substr(3); + size_t prefix_len = m_prefix.length(); + std::string pubstr = libeosio::wif_pub_encode(key->pub, m_prefix).substr(prefix_len); strtolower(pubstr); for(auto const& w: m_words) { size_t p = pubstr.find(w); if (p != std::string::npos) { - result.pos = p + 3; + result.pos = p + prefix_len; result.len = w.length(); return true; } From cbe6902d0376f576bc38b5842b37d2b4ec05234f Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 4 Apr 2023 19:05:48 +0200 Subject: [PATCH 08/57] common/cmake/libeosio.cmake: Use libeosio v0.1.7 --- common/cmake/libeosio.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/cmake/libeosio.cmake b/common/cmake/libeosio.cmake index 11c5d15..780f05f 100644 --- a/common/cmake/libeosio.cmake +++ b/common/cmake/libeosio.cmake @@ -2,7 +2,7 @@ # Variables # -------------------------------- set( LIBEOSIO_GIT_URL "https://github.com/eosswedenorg/libeosio.git" ) -set( LIBEOSIO_WANTED_VERSION v0.1.6 ) +set( LIBEOSIO_WANTED_VERSION v0.1.7 ) # -------------------------------- # Macros From e18886e074bbe510c1181fc6482111cb13faa322 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 4 Apr 2023 18:58:14 +0200 Subject: [PATCH 09/57] cli: implement support for K1 keys (default, can be switched with --legacy flag) --- cli/src/cli_key_search_result.cpp | 13 +++++++------ cli/src/cli_key_search_result.hpp | 5 +++-- cli/src/main.cpp | 21 +++++++++++++++------ 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/cli/src/cli_key_search_result.cpp b/cli/src/cli_key_search_result.cpp index fa3d009..d0cc9fd 100644 --- a/cli/src/cli_key_search_result.cpp +++ b/cli/src/cli_key_search_result.cpp @@ -38,22 +38,23 @@ static size_t highlight(console::Color color, const std::string& str, size_t pos return len; } -CliKeySearchResult::CliKeySearchResult(const Dictionary& dict, const std::string& prefix) : +CliKeySearchResult::CliKeySearchResult(const Dictionary& dict, const libeosio::wif_codec_t& codec) : m_dict (dict), -m_prefix (prefix) +m_codec (codec) { } void CliKeySearchResult::onResult(const struct libeosio::ec_keypair* key, const struct KeySearch::result& result) { - std::string pub = libeosio::wif_pub_encode(key->pub); + std::string pub = libeosio::wif_pub_encode(key->pub, m_codec.pub); Dictionary::search_result_t dict_res = m_dict.search(pub); + int pub_prefix_len = (int) m_codec.pub.length(); std::cout << "----" << std::endl; std::cout << "Found: " << pub.substr(result.pos, result.len) << std::endl; - std::cout << "Public: " << m_prefix.substr(0, 3); - for(size_t i = 3; i < pub.length(); ) { + std::cout << "Public: " << m_codec.pub; + for(size_t i = pub_prefix_len; i < pub.length(); ) { if (i == result.pos) { i += highlight(console::red, pub, result.pos, result.len); @@ -70,7 +71,7 @@ void CliKeySearchResult::onResult(const struct libeosio::ec_keypair* key, const } std::cout << std::endl - << "Private: " << libeosio::wif_priv_encode(key->secret) << std::endl; + << "Private: " << libeosio::wif_priv_encode(key->secret, m_codec.pvt) << std::endl; } } // namespace eoskeygen diff --git a/cli/src/cli_key_search_result.hpp b/cli/src/cli_key_search_result.hpp index a81a877..254ee8f 100644 --- a/cli/src/cli_key_search_result.hpp +++ b/cli/src/cli_key_search_result.hpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -37,7 +38,7 @@ class Dictionary; class CliKeySearchResult : public IKeySearchResult { public: - CliKeySearchResult(const Dictionary& dict, const std::string& prefix); + CliKeySearchResult(const Dictionary& dict, const libeosio::wif_codec_t& codec); virtual void onResult(const struct libeosio::ec_keypair* key, const struct KeySearch::result& result); @@ -45,7 +46,7 @@ protected : const Dictionary& m_dict; - std::string m_prefix; + libeosio::wif_codec_t m_codec; }; } // namespace eoskeygen diff --git a/cli/src/main.cpp b/cli/src/main.cpp index 74a7aa0..ddb8dc6 100644 --- a/cli/src/main.cpp +++ b/cli/src/main.cpp @@ -40,7 +40,7 @@ // Command line options. bool option_l33t = false; -std::string key_prefix = "EOS"; +libeosio::wif_codec_t key_codec; #ifdef EOSIOKEYGEN_HAVE_THREADS size_t option_num_threads; @@ -65,8 +65,9 @@ public: int cmd_search(const eoskeygen::strlist_t& words, const eoskeygen::Dictionary& dict, int count) { eoskeygen::KeySearch ks; - eoskeygen::CliKeySearchResult rs(dict, key_prefix); + eoskeygen::CliKeySearchResult rs(dict, key_codec); + ks.setPrefix(key_codec.pub); ks.setCallback(&rs); for(auto it = words.begin(); it != words.end(); it++) { @@ -122,6 +123,7 @@ int main(int argc, char **argv) { std::vector dict_list; std::vector lang_list; std::string search_words; + std::string key_format; int search_count; size_t bench_count; int rc = 0; @@ -129,7 +131,7 @@ int main(int argc, char **argv) { libeosio::ec_init(); CLI::Option* version = cmd.add_flag("-v,--version", "Show version"); - CLI::Option* fio = cmd.add_flag("--fio", "Generate keys from FIO network instead of EOSIO."); + cmd.add_option("--format", key_format, "valid values: K1, fio, legacy")->default_val("K1"); // Search CLI::App* search_cmd = cmd.add_subcommand("search", @@ -171,8 +173,15 @@ int main(int argc, char **argv) { goto end; } - if (*fio) { - key_prefix = "FIO"; + if (key_format == "fio") { + key_codec = libeosio::wif_create_legacy_codec("FIO"); + } else if (key_format == "legacy") { + key_codec = libeosio::WIF_CODEC_LEG; + } else if (key_format == "K1") { + key_codec = libeosio::WIF_CODEC_K1; + } else { + std::cerr << "invalid key format: " << key_format << std::endl; + goto end; } if (search_cmd->parsed()) { @@ -229,7 +238,7 @@ int main(int argc, char **argv) { else { struct libeosio::ec_keypair pair; libeosio::ec_generate_key(&pair); - libeosio::wif_print_key(&pair, key_prefix); + libeosio::wif_print_key(&pair, key_codec); goto end; } From 04b1d60f9b6324242f74a792b7ecd8eeae568d26 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 4 Apr 2023 19:15:54 +0200 Subject: [PATCH 10/57] .github/workflows: Update jurplel/install-qt-action to v3 --- .github/workflows/ci.yml | 2 +- .github/workflows/package.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1809bbd..e5f0b1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: - name: Qt - Windows/Mac if: startsWith(matrix.build, 'gui') && runner.os != 'Linux' - uses: jurplel/install-qt-action@v2 + uses: jurplel/install-qt-action@v3 with: version: '5.11.0' diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index ec96375..667776b 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -65,7 +65,7 @@ jobs: - uses: actions/checkout@v1 - name: Qt - uses: jurplel/install-qt-action@v2 + uses: jurplel/install-qt-action@v3 with: arch: ${{ matrix.qt-arch }} version: '5.11.0' From 8d413941ed6158694346647cf974f08b59a925f4 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 4 Apr 2023 19:17:56 +0200 Subject: [PATCH 11/57] .github/workflows: remove ubuntu-18.04 as its is not supported anymore as github runner. --- .github/workflows/ci.yml | 2 +- .github/workflows/package.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5f0b1f..0adbaff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-20.04, ubuntu-18.04, macos-latest, windows-latest ] + os: [ ubuntu-20.04, macos-latest, windows-latest ] build: [ cli, cli-mt, cli-ansi, cli-ansi-mt, gui, gui-mt ] include: - build: cli diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 667776b..ed5856d 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -9,7 +9,7 @@ jobs: ubuntu: strategy: matrix: - os: [ ubuntu-18.04, ubuntu-20.04 ] + os: [ ubuntu-20.04 ] component: [ cli, gui ] include: - component: cli From 8bc93c1becbdae6e685d64b63e532b0e37294351 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 4 Apr 2023 19:18:51 +0200 Subject: [PATCH 12/57] .github/workflows: run on ubuntu-22.04 --- .github/workflows/ci.yml | 2 +- .github/workflows/package.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0adbaff..958b178 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-20.04, macos-latest, windows-latest ] + os: [ ubuntu-20.04, ubuntu-22.04, macos-latest, windows-latest ] build: [ cli, cli-mt, cli-ansi, cli-ansi-mt, gui, gui-mt ] include: - build: cli diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index ed5856d..b7e43c7 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -9,7 +9,7 @@ jobs: ubuntu: strategy: matrix: - os: [ ubuntu-20.04 ] + os: [ ubuntu-20.04, ubuntu-22.04 ] component: [ cli, gui ] include: - component: cli From cf104e1616ba4c74548b8767b87cfdb91edbe04c Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 4 Apr 2023 19:23:26 +0200 Subject: [PATCH 13/57] .github/workflows/ci.yml: fix qt package on ubuntu-22.04 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 958b178..71b835b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,10 +46,10 @@ jobs: shell: bash run: | sudo apt-get update - if [ "${{matrix.os}}" == "ubuntu-20.04" ]; then - sudo apt-get install qt5-default=5.12.8+dfsg-0ubuntu2.1 + if [ "${{matrix.os}}" == "ubuntu-22.04" ]; then + sudo apt-get install qtbase5-dev=5.15.3+dfsg-2ubuntu0.2 else : - sudo apt-get install qt5-default=5.9.5+dfsg-0ubuntu2.6 + sudo apt-get install qt5-default=5.12.8+dfsg-0ubuntu2.1 fi - name: Qt - Windows/Mac From 5fd76814c138c90b220601cd95d30d67e788f11b Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 5 Apr 2023 15:14:24 +0200 Subject: [PATCH 14/57] CMakeLists.txt: use COMPILE_LANG_AND_ID generator expression instead of just CXX_COMPILER_ID --- CMakeLists.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e24e38e..0d09074 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,20 +71,20 @@ set( CMAKE_CXX_EXTENSIONS OFF ) # c++ flags add_compile_options( - "$<$:-Wall;-Wconversion;-Wno-sign-conversion;-Wextra>" - "$<$:/W3;-D_CRT_SECURE_NO_WARNINGS=1>" + "$<$:-Wall;-Wconversion;-Wno-sign-conversion;-Wextra>" + "$<$:/W3;-D_CRT_SECURE_NO_WARNINGS=1>" # Debug - "$<$:$<$:-O0;-g>>" - "$<$:$<$:/Od;/Zi>>" + "$<$:$<$:-O0;-g>>" + "$<$:$<$:/Od;/Zi>>" # Release - "$<$:$<$:-O3>>" - "$<$:$<$:/O2>>" + "$<$:$<$:-O3>>" + "$<$:$<$:/O2>>" # MinSizeRel - "$<$:$<$:-Os>>" - "$<$:$<$:/O1>>" + "$<$:$<$:-Os>>" + "$<$:$<$:/O1>>" ) # Project config file From 71cb07e6e7de637e9fed2bbe69a1530b298d5a04 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 5 Apr 2023 15:16:12 +0200 Subject: [PATCH 15/57] CMakeLists.txt: Set strip flag for GNU linkers on release config. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d09074..295b339 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,6 +87,11 @@ add_compile_options( "$<$:$<$:/O1>>" ) +add_link_options( + # Release + "$<$:$<$:-s>>" +) + # Project config file configure_file(config.hpp.in "${PROJECT_BINARY_DIR}/config.hpp" @ONLY) include_directories(${PROJECT_BINARY_DIR}) From 9ad3d47d9567cf9f423ef59045b227ec16a34eb1 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 5 Apr 2023 15:18:00 +0200 Subject: [PATCH 16/57] CMakeLists.txt: Compile position independent code. --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 295b339..3b39969 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,6 +92,12 @@ add_link_options( "$<$:$<$:-s>>" ) +include(CheckPIESupported) +check_pie_supported() +#cmake_policy(SET CMP0083 NEW) + +set( CMAKE_POSITION_INDEPENDENT_CODE TRUE ) + # Project config file configure_file(config.hpp.in "${PROJECT_BINARY_DIR}/config.hpp" @ONLY) include_directories(${PROJECT_BINARY_DIR}) From aacfdbe4a9dbc91dd4cdce9bdd2a495c7f53d8e4 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 5 Apr 2023 15:18:22 +0200 Subject: [PATCH 17/57] cli/CMakeLists.txt: Minor whitespace fix. --- cli/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index 64528ce..b769020 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -57,7 +57,7 @@ install (FILES ${LIBCLI11_LICENSE} DESTINATION ${CMAKE_INSTALL_SHAREDIR} COMPONENT cli RENAME LICENSE.libcli11) - + # Documentation From 8bb164997458936888e8a67859394923c549a708 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 5 Apr 2023 15:33:35 +0200 Subject: [PATCH 18/57] .github/workflows/package.yml: set qt versions from ci.yml --- .github/workflows/package.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index b7e43c7..deea394 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -25,10 +25,11 @@ jobs: if: startsWith(matrix.component, 'gui') shell: bash run: | - if [ "${{matrix.os}}" == "ubuntu-20.04" ]; then - sudo apt-get install qt5-default=5.12.8+dfsg-0ubuntu2.1 + sudo apt-get update + if [ "${{matrix.os}}" == "ubuntu-22.04" ]; then + sudo apt-get install qtbase5-dev=5.15.3+dfsg-2ubuntu0.2 else : - sudo apt-get install qt5-default=5.9.5+dfsg-0ubuntu2.6 + sudo apt-get install qt5-default=5.12.8+dfsg-0ubuntu2.1 fi - name: Package From 2cc93efadf3a215164bce928f6acf506afd76f1b Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 5 Apr 2023 16:19:16 +0200 Subject: [PATCH 19/57] cmake/CPackConfig.cmake: Adding RPM stuff. --- cmake/CPackConfig.cmake | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cmake/CPackConfig.cmake b/cmake/CPackConfig.cmake index 9dd5e7a..8f55ba5 100644 --- a/cmake/CPackConfig.cmake +++ b/cmake/CPackConfig.cmake @@ -97,6 +97,19 @@ set( CPACK_DEBIAN_PACKAGE_HOMEPAGE "${PROJECT_HOMEPAGE_URL}" ) set( CPACK_DEB_COMPONENT_INSTALL ON ) +# RPM + +# Always build components for rpm packages +set( CPACK_RPM_COMPONENT_INSTALL ON ) + +# Same as with DEB package. +set( CPACK_RPM_PACKAGE_HOMEPAGE "${PROJECT_HOMEPAGE_URL}" ) + +set( CPACK_RPM_PACKAGE_RELEASE_DIST ON ) +set( CPACK_RPM_PACKAGE_RELEASE "1" CACHE STRING "RPM package release version" ) +set( CPACK_RPM_PACKAGE_LICENSE "MIT" ) +set( CPACK_RPM_FILE_NAME "RPM-DEFAULT" ) + # -------------------------------- # Generator default # -------------------------------- From 8076eb6342a18bc96bbbfb02c5d1fc0338df4dda Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 5 Apr 2023 16:19:45 +0200 Subject: [PATCH 20/57] build.sh: support rpm for --pkg-type --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index a58395c..fca2d5f 100755 --- a/build.sh +++ b/build.sh @@ -28,7 +28,7 @@ while true; do ;; --pkg-type) shift - [[ ! "$1" =~ ^(nsis|deb|zip|tgz)$ ]] && { + [[ ! "$1" =~ ^(nsis|deb|rpm|zip|tgz)$ ]] && { echo "Incorrect package type '$1' provided" usage } From 85955baf429ab5f5f81d0a14ac43bebd8224fa03 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 5 Apr 2023 19:16:34 +0200 Subject: [PATCH 21/57] .github/workflows/package.yml: add RPM package. --- .github/workflows/package.yml | 51 ++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index deea394..3cb8921 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -16,7 +16,7 @@ jobs: build-opts: --cli --no-gui -t Release --pkg-type deb - component: gui build-opts: --no-cli --gui -t Release --pkg-type deb - name: ${{matrix.os}} (${{matrix.component}}) + name: DBM ${{matrix.os}} (${{matrix.component}}) runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v1 @@ -50,6 +50,55 @@ jobs: asset_path: ${{ steps.package.outputs.filename }} asset_content_type: application/x-deb + # RPM package for redhat based systems. + rpm: + strategy: + matrix: + container: [ "fedora:36" ] + component: [ cli, gui ] + include: + - component: cli + build-opts: --cli --no-gui -t Release --pkg-type rpm + - component: gui + build-opts: --no-cli --gui -t Release --pkg-type rpm + name: RPM ${{matrix.container}} (${{matrix.component}}) + runs-on: ubuntu-latest + container: ${{ matrix.container}} + steps: + - uses: actions/checkout@v1 + + - name: Dependancies + run: | + sudo dnf install -y util-linux rpmdevtools git \ + gcc-12.2.1-4.fc36.x86_64 \ + gcc-c++-12.2.1-4.fc36.x86_64 \ + cmake-3.25.2-1.fc36.x86_64 \ + openssl1.1-devel-1.1.1q-1.fc36.x86_64 + + - name: Qt + if: startsWith(matrix.component, 'gui') + shell: bash + run: | + sudo dnf install -y qt5-qtbase-devel-5.15.3-1.fc36.x86_64 + + - name: Package + id: package + run: | + ./build.sh ${{matrix.build-opts}} + FILE=$(ls build/eosio-*.rpm | head -1) + echo "::set-output name=filename::$FILE" + echo "::set-output name=name::$(basename $FILE)" + + - name: Upload + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_name: ${{ steps.package.outputs.name }} + asset_path: ${{ steps.package.outputs.filename }} + asset_content_type: application/octet-stream + # Windows installer windows: strategy: From 90f5aa17a8c64bf015629ab0be171275452f6959 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 5 Apr 2023 19:17:45 +0200 Subject: [PATCH 22/57] build.sh: set default TARGET value to "all" --- build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sh b/build.sh index a58395c..8177c70 100755 --- a/build.sh +++ b/build.sh @@ -11,6 +11,7 @@ options=$(getopt -n "${0##*/}" -o "lht:" -l "help,cli,no-cli,gui,no-gui,type:,li eval set -- "$options" +TARGET="all" ONLY_CONFIG=0 ARGS="" BUILD_ARGS="--clean-first" From 9ed6e6ab80d81089c5f91072a10514fe86572528 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 4 Apr 2023 19:06:55 +0200 Subject: [PATCH 23/57] gui: implement support for K1 keys. --- gui/src/GenerateWindow.cpp | 8 +++--- gui/src/MainWindow.cpp | 53 +++++++++++++++++++++++++++++++------- gui/src/MainWindow.hpp | 8 ++++-- gui/src/SearchWindow.cpp | 13 +++++++--- gui/src/Settings.cpp | 12 ++++----- gui/src/Settings.hpp | 6 +++-- 6 files changed, 73 insertions(+), 27 deletions(-) diff --git a/gui/src/GenerateWindow.cpp b/gui/src/GenerateWindow.cpp index 8880ffb..fa8711c 100644 --- a/gui/src/GenerateWindow.cpp +++ b/gui/src/GenerateWindow.cpp @@ -92,14 +92,16 @@ m_btn_copy_both ("Copy keys") void GenerateWindow::generate_key() { - std::string pubstr; + std::string pubstr, pvtstr; struct libeosio::ec_keypair pair; + const libeosio::wif_codec_t& codec = Settings::getKeyCodec(); libeosio::ec_generate_key(&pair); - pubstr = libeosio::wif_pub_encode(pair.pub, Settings::shouldGenerateFioKeys() ? "FIO" : "EOS"); + pubstr = libeosio::wif_pub_encode(pair.pub, codec.pub); + pvtstr = libeosio::wif_priv_encode(pair.secret, codec.pvt); m_pub.setText(QString::fromStdString(pubstr)); - m_priv.setText(QString::fromStdString(libeosio::wif_priv_encode(pair.secret))); + m_priv.setText(QString::fromStdString(pvtstr)); } void GenerateWindow::copy_both_keys() diff --git a/gui/src/MainWindow.cpp b/gui/src/MainWindow.cpp index 78b3a7a..4001ef4 100644 --- a/gui/src/MainWindow.cpp +++ b/gui/src/MainWindow.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include "gui_text.h" #include "Settings.hpp" #include "GenerateWindow.hpp" @@ -32,8 +33,10 @@ #include "MainWindow.hpp" MainWindow::MainWindow(QWidget *parent) : -QMainWindow (parent), -m_fio_action (nullptr) +QMainWindow (parent), +m_format_fio_action (nullptr), +m_format_legacy_action (nullptr), +m_format_k1_action (nullptr) { libeosio::ec_init(); @@ -51,12 +54,28 @@ m_fio_action (nullptr) // Settings - m_fio_action = new QAction("FIO Keys", this); - m_fio_action->setCheckable(true); - connect(m_fio_action, SIGNAL(triggered()), this, SLOT(fioKeysCheckboxChanged())); + QActionGroup* formatGroup = new QActionGroup(this); - QMenu *settings_menu = menuBar()->addMenu("Settings"); - settings_menu->addAction(m_fio_action); + m_format_fio_action = new QAction("FIO", formatGroup); + m_format_fio_action->setCheckable(true); + m_format_legacy_action = new QAction("Legacy", formatGroup); + m_format_legacy_action->setCheckable(true); + m_format_k1_action = new QAction("K1", formatGroup); + m_format_k1_action->setCheckable(true); + + // Set k1 and trigger the changed action so we set the codec. + m_format_k1_action->setChecked(true); + formatK1CheckboxChanged(); + + connect(m_format_fio_action, SIGNAL(triggered()), this, SLOT(formatFioCheckboxChanged())); + connect(m_format_legacy_action, SIGNAL(triggered()), this, SLOT(formatLegacyCheckboxChanged())); + connect(m_format_k1_action, SIGNAL(triggered()), this, SLOT(formatK1CheckboxChanged())); + + QMenu *settings = menuBar()->addMenu("Settings"); + QMenu *format_menu = settings->addMenu("Key Format"); + format_menu->addAction(m_format_k1_action); + format_menu->addAction(m_format_legacy_action); + format_menu->addAction(m_format_fio_action); // About menuBar()->addAction("About", this, SLOT(showAbout())); @@ -84,7 +103,23 @@ void MainWindow::showAbout() EOSIOKEYGEN_GUI_TEXT_ABOUT_BODY); } -void MainWindow::fioKeysCheckboxChanged() +void MainWindow::formatFioCheckboxChanged() { - Settings::setGenerateFioKeys(m_fio_action ? m_fio_action->isChecked() : false); + if (m_format_fio_action->isChecked()) { + Settings::setKeyCodec(libeosio::wif_create_legacy_codec("FIO")); + } +} + +void MainWindow::formatLegacyCheckboxChanged() +{ + if (m_format_legacy_action->isChecked()) { + Settings::setKeyCodec(libeosio::WIF_CODEC_LEG); + } +} + +void MainWindow::formatK1CheckboxChanged() +{ + if (m_format_k1_action->isChecked()) { + Settings::setKeyCodec(libeosio::WIF_CODEC_K1); + } } diff --git a/gui/src/MainWindow.hpp b/gui/src/MainWindow.hpp index 06d3fcb..3d4b172 100644 --- a/gui/src/MainWindow.hpp +++ b/gui/src/MainWindow.hpp @@ -47,13 +47,17 @@ private slots : void showAbout(); - void fioKeysCheckboxChanged(); + void formatFioCheckboxChanged(); + void formatLegacyCheckboxChanged(); + void formatK1CheckboxChanged(); private : QStackedWidget* m_stacked; - QPointer m_fio_action; + QPointer m_format_fio_action; + QPointer m_format_legacy_action; + QPointer m_format_k1_action; }; #endif /* MAIN_WINDOW_H */ diff --git a/gui/src/SearchWindow.cpp b/gui/src/SearchWindow.cpp index 23e2cf3..7af886d 100644 --- a/gui/src/SearchWindow.cpp +++ b/gui/src/SearchWindow.cpp @@ -150,14 +150,16 @@ void SearchWindow::onResult(const struct libeosio::ec_keypair* key, const struct { int pos = (int) result.pos; int len = (int) result.len; - QString pub = QString::fromStdString(libeosio::wif_pub_encode(key->pub, Settings::shouldGenerateFioKeys() ? "FIO" : "EOS")); + libeosio::wif_codec_t codec = Settings::getKeyCodec(); + QString pub = QString::fromStdString(libeosio::wif_pub_encode(key->pub, codec.pub)); + int pub_prefix_len = (int) codec.pub.length(); QString mid = pub.mid(pos, len); QString left = pub.left(pos); QString right = pub.mid(pos + len, pub.size() - pos); eoskeygen::Dictionary::search_result_t dict_res = m_dict.search(pub.toStdString()); - QString out = "Public: " + pub.left(3); - for(int i = 3; i < pub.length(); ) { + QString out = "Public: " + pub.left(pub_prefix_len); + for(int i = pub_prefix_len; i < pub.length(); ) { if (i == pos) { out += "" + pub.mid(pos, len) + ""; @@ -178,7 +180,7 @@ void SearchWindow::onResult(const struct libeosio::ec_keypair* key, const struct out += pub[i++]; } - out += "
Private: " + QString::fromStdString(libeosio::wif_priv_encode(key->secret)); + out += "
Private: " + QString::fromStdString(libeosio::wif_priv_encode(key->secret, codec.pvt)); // As this function could be called from a non-gui thread. we use signals. emit addOutput("

" + out + "

"); @@ -253,6 +255,9 @@ void SearchWindow::langFileAdd() void SearchWindow::searchStarted() { + // Set prefix for search + m_ksearch.setPrefix(Settings::getKeyCodec().pub); + m_btn_exec.setText("Cancel"); m_txt_search.setEnabled(false); diff --git a/gui/src/Settings.cpp b/gui/src/Settings.cpp index d49c408..733e028 100644 --- a/gui/src/Settings.cpp +++ b/gui/src/Settings.cpp @@ -24,16 +24,14 @@ #include "Settings.hpp" namespace priv { - bool fio_keys = false; + libeosio::wif_codec_t key_format = libeosio::WIF_CODEC_K1; } // namespace priv -bool Settings::shouldGenerateFioKeys() -{ - return priv::fio_keys; +void Settings::setKeyCodec(const libeosio::wif_codec_t& format) { + priv::key_format = format; } -void Settings::setGenerateFioKeys(bool value) -{ - priv::fio_keys = value; +const libeosio::wif_codec_t& Settings::getKeyCodec() { + return priv::key_format; } diff --git a/gui/src/Settings.hpp b/gui/src/Settings.hpp index d47c26f..4cf04be 100644 --- a/gui/src/Settings.hpp +++ b/gui/src/Settings.hpp @@ -24,11 +24,13 @@ #ifndef SETTINGS_H #define SETTINGS_H +#include + namespace Settings { - bool shouldGenerateFioKeys(); + void setKeyCodec(const libeosio::wif_codec_t& format); - void setGenerateFioKeys(bool value); + const libeosio::wif_codec_t& getKeyCodec(); }; #endif /* SEARCH_WINDOW_H */ From 3ae2c00faadead85dddbe00ed67a278e7f32eefa Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 5 Apr 2023 19:36:36 +0200 Subject: [PATCH 24/57] gui/src/GenerateWindow.cpp: set fixed font (monospace) for the key fQLineEdit fields. --- gui/src/GenerateWindow.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gui/src/GenerateWindow.cpp b/gui/src/GenerateWindow.cpp index fa8711c..d1ef594 100644 --- a/gui/src/GenerateWindow.cpp +++ b/gui/src/GenerateWindow.cpp @@ -26,13 +26,16 @@ #include #include #include +#include +#include #include #include #include "Settings.hpp" #include "GenerateWindow.hpp" -void _initKeyWidget(QLineEdit& w) { +void _initKeyWidget(QLineEdit& w, const QFont& font) { w.setFixedWidth(450); + w.setFont(font); w.setReadOnly(true); } @@ -46,11 +49,13 @@ QWidget (parent), m_btn_gen ("Generate"), m_btn_copy_both ("Copy keys") { + QFont mono = QFontDatabase::systemFont(QFontDatabase::FixedFont); + QIcon copy_icon = QIcon::fromTheme("edit-copy"); QGridLayout* layout; - _initKeyWidget(m_pub); - _initKeyWidget(m_priv); + _initKeyWidget(m_pub, mono); + _initKeyWidget(m_priv, mono); _initKeyCopyButton(m_btn_copy_pub, copy_icon); _initKeyCopyButton(m_btn_copy_priv, copy_icon); From 6589011be5e54d048b35b036c8292a7eb5bab60e Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 5 Apr 2023 19:37:40 +0200 Subject: [PATCH 25/57] gui/src/GenerateWindow.cpp: Make the key fields abit longer. --- gui/src/GenerateWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/GenerateWindow.cpp b/gui/src/GenerateWindow.cpp index d1ef594..48ce8f1 100644 --- a/gui/src/GenerateWindow.cpp +++ b/gui/src/GenerateWindow.cpp @@ -34,7 +34,7 @@ #include "GenerateWindow.hpp" void _initKeyWidget(QLineEdit& w, const QFont& font) { - w.setFixedWidth(450); + w.setFixedWidth(460); w.setFont(font); w.setReadOnly(true); } From d5da7d1491d537de9e424c519270dd7f26731098 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 5 Apr 2023 21:14:57 +0200 Subject: [PATCH 26/57] README.md: Update info about supported Linux distros/versions. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e4ac358..67c5130 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,10 @@ You will need `libeosio` and `cmake 3.15` or later to compile this project. ### Linux/MacOS -**NOTE:** Only Ubuntu 18.04 is officially supported. +**NOTE:** Only Ubuntu 20.04 and 22.04 and Fedoora 36 is officially supported. The project should compile fine on most versions/distros but it is only tested -and distributed for Ubuntu 18.04 by [Sw/eden](www.eossweden.org). +and distributed for those distros/versions by [Sw/eden](www.eossweden.org). #### Dependencies From 914205541a05f7d46828911b910f055577387468 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 6 Apr 2023 15:04:12 +0200 Subject: [PATCH 27/57] Update from libeosio v0.1.7 to libantelope v0.2.0 --- cli/src/benchmark.cpp | 6 +-- cli/src/cli_key_search_result.cpp | 10 ++-- cli/src/cli_key_search_result.hpp | 10 ++-- cli/src/main.cpp | 26 ++++----- common/CMakeLists.txt | 6 +-- common/cmake/libantelope.cmake | 53 +++++++++++++++++++ common/cmake/libeosio.cmake | 53 ------------------- common/include/eoskeygen/key_search.hpp | 4 +- .../include/eoskeygen/key_search_result.hpp | 2 +- common/src/key_search.cpp | 12 ++--- common/src/key_search_mt.cpp | 6 +-- gui/src/GenerateWindow.cpp | 14 ++--- gui/src/MainWindow.cpp | 12 ++--- gui/src/SearchWindow.cpp | 10 ++-- gui/src/SearchWindow.hpp | 2 +- gui/src/Settings.cpp | 6 +-- gui/src/Settings.hpp | 6 +-- 17 files changed, 119 insertions(+), 119 deletions(-) create mode 100644 common/cmake/libantelope.cmake delete mode 100644 common/cmake/libeosio.cmake diff --git a/cli/src/benchmark.cpp b/cli/src/benchmark.cpp index 9c65375..b0a32b9 100644 --- a/cli/src/benchmark.cpp +++ b/cli/src/benchmark.cpp @@ -22,7 +22,7 @@ * SOFTWARE. */ #include -#include +#include #include "benchmark.hpp" namespace eoskeygen { @@ -30,8 +30,8 @@ namespace eoskeygen { std::chrono::duration _run_benchmark(size_t num_keys) { auto start = std::chrono::steady_clock::now(); for(size_t i = 0; i < num_keys; i++) { - struct libeosio::ec_keypair k; - libeosio::ec_generate_key(&k); + struct libantelope::ec_keypair k; + libantelope::ec_generate_key(&k); } return std::chrono::steady_clock::now() - start; } diff --git a/cli/src/cli_key_search_result.cpp b/cli/src/cli_key_search_result.cpp index d0cc9fd..aaa9f97 100644 --- a/cli/src/cli_key_search_result.cpp +++ b/cli/src/cli_key_search_result.cpp @@ -23,7 +23,7 @@ */ #include #include -#include +#include #include #include "console.hpp" #include "cli_key_search_result.hpp" @@ -38,15 +38,15 @@ static size_t highlight(console::Color color, const std::string& str, size_t pos return len; } -CliKeySearchResult::CliKeySearchResult(const Dictionary& dict, const libeosio::wif_codec_t& codec) : +CliKeySearchResult::CliKeySearchResult(const Dictionary& dict, const libantelope::wif_codec_t& codec) : m_dict (dict), m_codec (codec) { } -void CliKeySearchResult::onResult(const struct libeosio::ec_keypair* key, const struct KeySearch::result& result) { +void CliKeySearchResult::onResult(const struct libantelope::ec_keypair* key, const struct KeySearch::result& result) { - std::string pub = libeosio::wif_pub_encode(key->pub, m_codec.pub); + std::string pub = libantelope::wif_pub_encode(key->pub, m_codec.pub); Dictionary::search_result_t dict_res = m_dict.search(pub); int pub_prefix_len = (int) m_codec.pub.length(); @@ -71,7 +71,7 @@ void CliKeySearchResult::onResult(const struct libeosio::ec_keypair* key, const } std::cout << std::endl - << "Private: " << libeosio::wif_priv_encode(key->secret, m_codec.pvt) << std::endl; + << "Private: " << libantelope::wif_priv_encode(key->secret, m_codec.pvt) << std::endl; } } // namespace eoskeygen diff --git a/cli/src/cli_key_search_result.hpp b/cli/src/cli_key_search_result.hpp index 254ee8f..0d0a1a5 100644 --- a/cli/src/cli_key_search_result.hpp +++ b/cli/src/cli_key_search_result.hpp @@ -25,8 +25,8 @@ #define EOSIOKEYGEN_KEY_SEARCH_HELPERS_H #include -#include -#include +#include +#include #include #include #include @@ -38,15 +38,15 @@ class Dictionary; class CliKeySearchResult : public IKeySearchResult { public: - CliKeySearchResult(const Dictionary& dict, const libeosio::wif_codec_t& codec); + CliKeySearchResult(const Dictionary& dict, const libantelope::wif_codec_t& codec); - virtual void onResult(const struct libeosio::ec_keypair* key, const struct KeySearch::result& result); + virtual void onResult(const struct libantelope::ec_keypair* key, const struct KeySearch::result& result); protected : const Dictionary& m_dict; - libeosio::wif_codec_t m_codec; + libantelope::wif_codec_t m_codec; }; } // namespace eoskeygen diff --git a/cli/src/main.cpp b/cli/src/main.cpp index ddb8dc6..5351444 100644 --- a/cli/src/main.cpp +++ b/cli/src/main.cpp @@ -24,9 +24,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -40,7 +40,7 @@ // Command line options. bool option_l33t = false; -libeosio::wif_codec_t key_codec; +libantelope::wif_codec_t key_codec; #ifdef EOSIOKEYGEN_HAVE_THREADS size_t option_num_threads; @@ -71,7 +71,7 @@ int cmd_search(const eoskeygen::strlist_t& words, const eoskeygen::Dictionary& d ks.setCallback(&rs); for(auto it = words.begin(); it != words.end(); it++) { - size_t p = libeosio::is_base58(*it); + size_t p = libantelope::is_base58(*it); if (p != std::string::npos) { std::cerr << "The word '" << *it << "' contains an invalid non-base58 character '" @@ -128,7 +128,7 @@ int main(int argc, char **argv) { size_t bench_count; int rc = 0; - libeosio::ec_init(); + libantelope::ec_init(); CLI::Option* version = cmd.add_flag("-v,--version", "Show version"); cmd.add_option("--format", key_format, "valid values: K1, fio, legacy")->default_val("K1"); @@ -174,11 +174,11 @@ int main(int argc, char **argv) { } if (key_format == "fio") { - key_codec = libeosio::wif_create_legacy_codec("FIO"); + key_codec = libantelope::wif_create_legacy_codec("FIO"); } else if (key_format == "legacy") { - key_codec = libeosio::WIF_CODEC_LEG; + key_codec = libantelope::WIF_CODEC_LEG; } else if (key_format == "K1") { - key_codec = libeosio::WIF_CODEC_K1; + key_codec = libantelope::WIF_CODEC_K1; } else { std::cerr << "invalid key format: " << key_format << std::endl; goto end; @@ -236,12 +236,12 @@ int main(int argc, char **argv) { } // No subcommand given, just generate and print a keypair. else { - struct libeosio::ec_keypair pair; - libeosio::ec_generate_key(&pair); - libeosio::wif_print_key(&pair, key_codec); + struct libantelope::ec_keypair pair; + libantelope::ec_generate_key(&pair); + libantelope::wif_print_key(&pair, key_codec); goto end; } -end: libeosio::ec_shutdown(); +end: libantelope::ec_shutdown(); return rc; } diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index e268a16..0acf3ec 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -40,10 +40,10 @@ add_library( ${COMMON_NAME} STATIC ${COMMON_SOURCE} ) target_include_directories( ${COMMON_NAME} PUBLIC include ) -# Link with libeosio and threads library. -include( libeosio ) +# Link with libantelope and threads library. +include( libantelope ) target_link_libraries( ${COMMON_NAME} PUBLIC - libeosio + libantelope ${CMAKE_THREAD_LIBS_INIT} ) diff --git a/common/cmake/libantelope.cmake b/common/cmake/libantelope.cmake new file mode 100644 index 0000000..f70330b --- /dev/null +++ b/common/cmake/libantelope.cmake @@ -0,0 +1,53 @@ +# -------------------------------- +# Variables +# -------------------------------- +set( LIBANTELOPE_GIT_URL "https://github.com/eosswedenorg/libantelope.git" ) +set( LIBANTELOPE_WANTED_VERSION v0.2.0 ) + +# -------------------------------- +# Macros +# -------------------------------- +macro(fromGit tag) + + message ("Using libantelope from: ${LIBANTELOPE_GIT_URL}@${tag}") + + include(FetchContent) + FetchContent_Declare(libantelope + GIT_REPOSITORY ${LIBANTELOPE_GIT_URL} + GIT_TAG ${tag} + SOURCE_DIR ${DOWNLOAD_CACHE_DIR}/libeosio/src + STAMP_DIR ${DOWNLOAD_CACHE_DIR}/libeosio/stamp + ) + + FetchContent_GetProperties(libantelope) + if (NOT libantelope_POPULATED) + FetchContent_Populate(libantelope) + add_subdirectory(${libantelope_SOURCE_DIR} ${libantelope_BINARY_DIR} EXCLUDE_FROM_ALL) + endif() +endmacro() + +macro(buildLocal src) + message ("Using local libantelope at: ${src}") + add_subdirectory(${src} ${src}/build EXCLUDE_FROM_ALL) +endmacro() + +# If we have a local libantelope +if (LIBANTELOPE_SOURCE_DIR) + buildLocal( ${LIBANTELOPE_SOURCE_DIR} ) +else() + + # Check if version is in fact a version. + if (LIBANTELOPE_WANTED_VERSION MATCHES "^[0-9]+(.[0-9]+)?(.[0-9]+)(-[a-zA-Z0-9]+)?$") + # Try finding the package on the system. + find_package(libantelope ${LIBANTELOPE_WANTED_VERSION} QUIET) + if (libantelope_FOUND) + message ("Using libeosio in: ${libantelope_DIR}") + # Not found, download from git. + else() + fromGit( v${LIBANTELOPE_WANTED_VERSION} ) + endif() + # Assume version contains a git branch. + else() + fromGit( ${LIBANTELOPE_WANTED_VERSION} ) + endif() +endif() diff --git a/common/cmake/libeosio.cmake b/common/cmake/libeosio.cmake deleted file mode 100644 index 780f05f..0000000 --- a/common/cmake/libeosio.cmake +++ /dev/null @@ -1,53 +0,0 @@ -# -------------------------------- -# Variables -# -------------------------------- -set( LIBEOSIO_GIT_URL "https://github.com/eosswedenorg/libeosio.git" ) -set( LIBEOSIO_WANTED_VERSION v0.1.7 ) - -# -------------------------------- -# Macros -# -------------------------------- -macro(fromGit tag) - - message ("Using libeosio from: ${LIBEOSIO_GIT_URL}@${tag}") - - include(FetchContent) - FetchContent_Declare(libeosio - GIT_REPOSITORY ${LIBEOSIO_GIT_URL} - GIT_TAG ${tag} - SOURCE_DIR ${DOWNLOAD_CACHE_DIR}/libeosio/src - STAMP_DIR ${DOWNLOAD_CACHE_DIR}/libeosio/stamp - ) - - FetchContent_GetProperties(libeosio) - if (NOT libeosio_POPULATED) - FetchContent_Populate(libeosio) - add_subdirectory(${libeosio_SOURCE_DIR} ${libeosio_BINARY_DIR} EXCLUDE_FROM_ALL) - endif() -endmacro() - -macro(buildLocal src) - message ("Using local libeosio at: ${src}") - add_subdirectory(${src} ${src}/build EXCLUDE_FROM_ALL) -endmacro() - -# If we have a locallibeosio -if (LIBEOSIO_SOURCE_DIR) - buildLocal( ${LIBEOSIO_SOURCE_DIR} ) -else() - - # Check if version is in fact a version. - if (LIBEOSIO_WANTED_VERSION MATCHES "^[0-9]+(.[0-9]+)?(.[0-9]+)(-[a-zA-Z0-9]+)?$") - # Try finding the package on the system. - find_package(libeosio ${LIBEOSIO_WANTED_VERSION} QUIET) - if (libeoskeygen_FOUND) - message ("Using libeosio in: ${libeosio_DIR}") - # Not found, download from git. - else() - fromGit( v${LIBEOSIO_WANTED_VERSION} ) - endif() - # Assume version contains a git branch. - else() - fromGit( ${LIBEOSIO_WANTED_VERSION} ) - endif() -endif() diff --git a/common/include/eoskeygen/key_search.hpp b/common/include/eoskeygen/key_search.hpp index 040023a..0574575 100644 --- a/common/include/eoskeygen/key_search.hpp +++ b/common/include/eoskeygen/key_search.hpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include @@ -88,7 +88,7 @@ protected : // Check if any word in appears in 's public key. // returns true if a word was found (stored in ), false otherwise. - bool _contains_word(const struct libeosio::ec_keypair* key, struct result& result); + bool _contains_word(const struct libantelope::ec_keypair* key, struct result& result); #ifdef EOSIOKEYGEN_HAVE_THREADS void _thr_proc(); diff --git a/common/include/eoskeygen/key_search_result.hpp b/common/include/eoskeygen/key_search_result.hpp index e174d18..7abd975 100644 --- a/common/include/eoskeygen/key_search_result.hpp +++ b/common/include/eoskeygen/key_search_result.hpp @@ -32,7 +32,7 @@ class IKeySearchResult { public : - virtual void onResult(const struct libeosio::ec_keypair* key, const struct KeySearch::result& result) = 0; + virtual void onResult(const struct libantelope::ec_keypair* key, const struct KeySearch::result& result) = 0; }; } // namespace eoskeygen diff --git a/common/src/key_search.cpp b/common/src/key_search.cpp index 7b8c086..3e11303 100644 --- a/common/src/key_search.cpp +++ b/common/src/key_search.cpp @@ -21,8 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include -#include +#include +#include #include #include #include @@ -77,11 +77,11 @@ void KeySearch::setCallback(IKeySearchResult* callback) void KeySearch::_search_linear() { - struct libeosio::ec_keypair pair; + struct libantelope::ec_keypair pair; while (m_count < m_max) { struct result res; - libeosio::ec_generate_key(&pair); + libantelope::ec_generate_key(&pair); if (_contains_word(&pair, res)) { m_callback->onResult(&pair, res); m_count++; @@ -111,10 +111,10 @@ void KeySearch::find(size_t num_results) _search_linear(); } -bool KeySearch::_contains_word(const struct libeosio::ec_keypair* key, struct result& result) { +bool KeySearch::_contains_word(const struct libantelope::ec_keypair* key, struct result& result) { size_t prefix_len = m_prefix.length(); - std::string pubstr = libeosio::wif_pub_encode(key->pub, m_prefix).substr(prefix_len); + std::string pubstr = libantelope::wif_pub_encode(key->pub, m_prefix).substr(prefix_len); strtolower(pubstr); for(auto const& w: m_words) { diff --git a/common/src/key_search_mt.cpp b/common/src/key_search_mt.cpp index b0773ba..25fa17e 100644 --- a/common/src/key_search_mt.cpp +++ b/common/src/key_search_mt.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include @@ -37,12 +37,12 @@ std::mutex g_count_mtx; // Thread process. void KeySearch::_thr_proc() { - struct libeosio::ec_keypair pair; + struct libantelope::ec_keypair pair; while (m_count < m_max) { struct result res; - libeosio::ec_generate_key(&pair); + libantelope::ec_generate_key(&pair); if (_contains_word(&pair, res)) { // Guard output with mutex, so we don't get diff --git a/gui/src/GenerateWindow.cpp b/gui/src/GenerateWindow.cpp index 48ce8f1..6d5e3f0 100644 --- a/gui/src/GenerateWindow.cpp +++ b/gui/src/GenerateWindow.cpp @@ -28,8 +28,8 @@ #include #include #include -#include -#include +#include +#include #include "Settings.hpp" #include "GenerateWindow.hpp" @@ -98,13 +98,13 @@ m_btn_copy_both ("Copy keys") void GenerateWindow::generate_key() { std::string pubstr, pvtstr; - struct libeosio::ec_keypair pair; - const libeosio::wif_codec_t& codec = Settings::getKeyCodec(); + struct libantelope::ec_keypair pair; + const libantelope::wif_codec_t& codec = Settings::getKeyCodec(); - libeosio::ec_generate_key(&pair); + libantelope::ec_generate_key(&pair); - pubstr = libeosio::wif_pub_encode(pair.pub, codec.pub); - pvtstr = libeosio::wif_priv_encode(pair.secret, codec.pvt); + pubstr = libantelope::wif_pub_encode(pair.pub, codec.pub); + pvtstr = libantelope::wif_priv_encode(pair.secret, codec.pvt); m_pub.setText(QString::fromStdString(pubstr)); m_priv.setText(QString::fromStdString(pvtstr)); } diff --git a/gui/src/MainWindow.cpp b/gui/src/MainWindow.cpp index 4001ef4..9b1a043 100644 --- a/gui/src/MainWindow.cpp +++ b/gui/src/MainWindow.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include "gui_text.h" #include "Settings.hpp" #include "GenerateWindow.hpp" @@ -38,7 +38,7 @@ m_format_fio_action (nullptr), m_format_legacy_action (nullptr), m_format_k1_action (nullptr) { - libeosio::ec_init(); + libantelope::ec_init(); // Create sub windows and stacked widget. m_stacked = new QStackedWidget(); @@ -83,7 +83,7 @@ m_format_k1_action (nullptr) MainWindow::~MainWindow() { - libeosio::ec_shutdown(); + libantelope::ec_shutdown(); } void MainWindow::switchToGenerate() @@ -106,20 +106,20 @@ void MainWindow::showAbout() void MainWindow::formatFioCheckboxChanged() { if (m_format_fio_action->isChecked()) { - Settings::setKeyCodec(libeosio::wif_create_legacy_codec("FIO")); + Settings::setKeyCodec(libantelope::wif_create_legacy_codec("FIO")); } } void MainWindow::formatLegacyCheckboxChanged() { if (m_format_legacy_action->isChecked()) { - Settings::setKeyCodec(libeosio::WIF_CODEC_LEG); + Settings::setKeyCodec(libantelope::WIF_CODEC_LEG); } } void MainWindow::formatK1CheckboxChanged() { if (m_format_k1_action->isChecked()) { - Settings::setKeyCodec(libeosio::WIF_CODEC_K1); + Settings::setKeyCodec(libantelope::WIF_CODEC_K1); } } diff --git a/gui/src/SearchWindow.cpp b/gui/src/SearchWindow.cpp index 7af886d..b2b4e60 100644 --- a/gui/src/SearchWindow.cpp +++ b/gui/src/SearchWindow.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include "Settings.hpp" @@ -146,12 +146,12 @@ void SearchWindow::loadDictionaries() } } -void SearchWindow::onResult(const struct libeosio::ec_keypair* key, const struct eoskeygen::KeySearch::result& result) +void SearchWindow::onResult(const struct libantelope::ec_keypair* key, const struct eoskeygen::KeySearch::result& result) { int pos = (int) result.pos; int len = (int) result.len; - libeosio::wif_codec_t codec = Settings::getKeyCodec(); - QString pub = QString::fromStdString(libeosio::wif_pub_encode(key->pub, codec.pub)); + libantelope::wif_codec_t codec = Settings::getKeyCodec(); + QString pub = QString::fromStdString(libantelope::wif_pub_encode(key->pub, codec.pub)); int pub_prefix_len = (int) codec.pub.length(); QString mid = pub.mid(pos, len); QString left = pub.left(pos); @@ -180,7 +180,7 @@ void SearchWindow::onResult(const struct libeosio::ec_keypair* key, const struct out += pub[i++]; } - out += "
Private: " + QString::fromStdString(libeosio::wif_priv_encode(key->secret, codec.pvt)); + out += "
Private: " + QString::fromStdString(libantelope::wif_priv_encode(key->secret, codec.pvt)); // As this function could be called from a non-gui thread. we use signals. emit addOutput("

" + out + "

"); diff --git a/gui/src/SearchWindow.hpp b/gui/src/SearchWindow.hpp index a161628..479edf2 100644 --- a/gui/src/SearchWindow.hpp +++ b/gui/src/SearchWindow.hpp @@ -43,7 +43,7 @@ class SearchWindow : public QWidget, public eoskeygen::IKeySearchResult public: explicit SearchWindow(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags()); - void onResult(const struct libeosio::ec_keypair* key, const struct eoskeygen::KeySearch::result& result); + void onResult(const struct libantelope::ec_keypair* key, const struct eoskeygen::KeySearch::result& result); private : void initSignals(); diff --git a/gui/src/Settings.cpp b/gui/src/Settings.cpp index 733e028..aa8dad9 100644 --- a/gui/src/Settings.cpp +++ b/gui/src/Settings.cpp @@ -25,13 +25,13 @@ namespace priv { - libeosio::wif_codec_t key_format = libeosio::WIF_CODEC_K1; + libantelope::wif_codec_t key_format = libantelope::WIF_CODEC_K1; } // namespace priv -void Settings::setKeyCodec(const libeosio::wif_codec_t& format) { +void Settings::setKeyCodec(const libantelope::wif_codec_t& format) { priv::key_format = format; } -const libeosio::wif_codec_t& Settings::getKeyCodec() { +const libantelope::wif_codec_t& Settings::getKeyCodec() { return priv::key_format; } diff --git a/gui/src/Settings.hpp b/gui/src/Settings.hpp index 4cf04be..08a56cd 100644 --- a/gui/src/Settings.hpp +++ b/gui/src/Settings.hpp @@ -24,13 +24,13 @@ #ifndef SETTINGS_H #define SETTINGS_H -#include +#include namespace Settings { - void setKeyCodec(const libeosio::wif_codec_t& format); + void setKeyCodec(const libantelope::wif_codec_t& format); - const libeosio::wif_codec_t& getKeyCodec(); + const libantelope::wif_codec_t& getKeyCodec(); }; #endif /* SEARCH_WINDOW_H */ From 4b26e277f81323f895c55a5e1bae00e9169db108 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 6 Apr 2023 15:18:07 +0200 Subject: [PATCH 28/57] README.md: Update documentation for libeosio to use libantelope instead. --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 67c5130..4d0d46d 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This program generates public and private keypair for [EOS](https://eos.io/) ## Compile -You will need `libeosio` and `cmake 3.15` or later to compile this project. +You will need `libantelope` and `cmake 3.15` or later to compile this project. `Qt 5.9.0` or later is required for the graphical program. @@ -78,7 +78,7 @@ $ brew install cmake If you need a newer version of cmake, you can download the official `.dmg` file: [cmake-3.15.7-Darwin-x86_64.dmg](https://github.com/Kitware/CMake/releases/download/v3.15.7/cmake-3.15.7-Darwin-x86_64.dmg). or see https://cmake.org/download for other versions. -`libeosio` needs to be compiled and installed from source. [Go here](https://github.com/eosswedenorg/libeosio) +`libantelope` needs to be compiled and installed from source. [Go here](https://github.com/eosswedenorg/libantelope) **Qt (only for gui program)** @@ -150,9 +150,9 @@ These compile options are available: For more details about options run `./build.sh -l` or `mkdir build && cmake build -LA` -### libeosio +### libantelope -To speed up the build process, you can install `libeosio` +To speed up the build process, you can install `libantelope` #### Ubuntu @@ -162,19 +162,19 @@ You can use [EOS Sweden's APT Repository](https://eosswedenorg.github.io/apt) li $ sudo apt-get install software-properties-common $ curl https://apt.eossweden.org/key 2> /dev/null | sudo apt-key add - $ sudo apt-add-repository -y 'deb [arch=amd64] https://apt.eossweden.org/main `lsb_release -cs` stable' -$ sudo apt-get install libeosio-dev +$ sudo apt-get install libantelope-dev ``` -or manually via `.deb` file from [github](https://github.com/eosswedenorg/libeosio/releases) +or manually via `.deb` file from [github](https://github.com/eosswedenorg/libantelope/releases) ```sh $ wget -$ sudo apt install ./libeosio-dev-.deb +$ sudo apt install ./libantelope-dev-.deb ``` #### Other -Consult [libeosio's github](https://github.com/eosswedenorg/libeosio) +Consult [libantelope's github](https://github.com/eosswedenorg/libantelope) ## Install From 2679dc6ef4b3f49c1dfde425fdf2f6df2cd8b6c1 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 6 Apr 2023 15:23:37 +0200 Subject: [PATCH 29/57] README.md: change "EOS Sweden" to "Sw/eden" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d0d46d..d3f7223 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,7 @@ To speed up the build process, you can install `libantelope` #### Ubuntu -You can use [EOS Sweden's APT Repository](https://eosswedenorg.github.io/apt) like this: +You can use [Sw/eden's APT Repository](https://eosswedenorg.github.io/apt) like this: ```sh $ sudo apt-get install software-properties-common From 2b4ab781764ad189e767e2802b71f7edaf598125 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 10 Apr 2023 14:53:26 +0200 Subject: [PATCH 30/57] rename namespace and header guards from eosio to antelope --- CMakeLists.txt | 8 ++--- README.md | 9 +++--- cli/CMakeLists.txt | 4 +-- cli/docs/README.md.in | 10 +++---- ...eosio-keygen.1.in => antelope-keygen.1.in} | 0 cli/src/benchmark.cpp | 4 +-- cli/src/benchmark.hpp | 4 +-- cli/src/cli_key_search_result.cpp | 4 +-- cli/src/cli_key_search_result.hpp | 4 +-- cli/src/console.cpp | 4 +-- cli/src/console.hpp | 4 +-- cli/src/console_ansi.cpp | 4 +-- cli/src/console_win32.cpp | 4 +-- cli/src/isatty.cpp | 4 +-- cli/src/isatty.hpp | 4 +-- cli/src/main.cpp | 30 +++++++++---------- common/CMakeLists.txt | 2 +- common/config.hpp.in | 8 ++--- common/include/eoskeygen/core/dictionary.hpp | 10 +++---- common/include/eoskeygen/core/file.hpp | 8 ++--- common/include/eoskeygen/core/leet.hpp | 10 +++---- common/include/eoskeygen/core/string.hpp | 10 +++---- common/include/eoskeygen/core/strlist.hpp | 10 +++---- common/include/eoskeygen/key_search.hpp | 22 +++++++------- .../include/eoskeygen/key_search_result.hpp | 10 +++---- common/src/core/dictionary.cpp | 4 +-- common/src/core/file.cpp | 4 +-- common/src/core/leet.cpp | 4 +-- common/src/core/string.cpp | 4 +-- common/src/core/strlist.cpp | 6 ++-- common/src/key_search.cpp | 4 +-- common/src/key_search_mt.cpp | 4 +-- gui/CMakeLists.txt | 4 +-- gui/src/SearchWindow.cpp | 20 ++++++------- gui/src/SearchWindow.hpp | 8 ++--- 35 files changed, 126 insertions(+), 127 deletions(-) rename cli/docs/{eosio-keygen.1.in => antelope-keygen.1.in} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b39969..df118dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,10 +4,10 @@ cmake_minimum_required(VERSION 3.15) # Project Info # -------------------------------- -project(eosio-keygen +project(antelope-keygen VERSION 1.0.8 - DESCRIPTION "Keygenerator for EOSIO" - HOMEPAGE_URL "https://github.com/eosswedenorg/eosio-keygen" ) + DESCRIPTION "Keygenerator for Antelope blockchain" + HOMEPAGE_URL "https://github.com/eosswedenorg/antelope-keygen" ) set( PROJECT_MAINTAINER "Henrik Hautakoski ") set( PROJECT_LICENSE_FILE ${CMAKE_CURRENT_LIST_DIR}/LICENSE ) @@ -102,7 +102,7 @@ set( CMAKE_POSITION_INDEPENDENT_CODE TRUE ) configure_file(config.hpp.in "${PROJECT_BINARY_DIR}/config.hpp" @ONLY) include_directories(${PROJECT_BINARY_DIR}) -# Bundle eosio-extras on windows. +# Bundle antelope-extras on windows. if (WIN32) include(extras) list(APPEND components extras ) diff --git a/README.md b/README.md index d3f7223..30c0ce9 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -![](https://github.com/eosswedenorg/eosio-keygen/workflows/CI/badge.svg) -[![GitHub release](https://img.shields.io/github/v/release/eosswedenorg/eosio-keygen?include_prereleases)](https://github.com/eosswedenorg/eosio-keygen/releases/latest) +![](https://github.com/eosswedenorg/antelope-keygen/workflows/CI/badge.svg) +[![GitHub release](https://img.shields.io/github/v/release/eosswedenorg/antelope-keygen?include_prereleases)](https://github.com/eosswedenorg/antelope-keygen/releases/latest) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -# EOSIO Keygen +# Antelope Keygen -This program generates public and private keypair for [EOS](https://eos.io/) +This program generates public and private keypair for [Antelope IO](https://antelope.io) ## Compile @@ -164,7 +164,6 @@ $ curl https://apt.eossweden.org/key 2> /dev/null | sudo apt-key add - $ sudo apt-add-repository -y 'deb [arch=amd64] https://apt.eossweden.org/main `lsb_release -cs` stable' $ sudo apt-get install libantelope-dev ``` - or manually via `.deb` file from [github](https://github.com/eosswedenorg/libantelope/releases) ```sh diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index b769020..087b24d 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.15) # Project Info # -------------------------------- -project(eosio-keygen +project(antelope-keygen VERSION ${CMAKE_PROJECT_VERSION} LANGUAGES CXX) @@ -67,7 +67,7 @@ install(FILES ${PROJECT_BINARY_DIR}/README.cli.md COMPONENT cli) if (UNIX) - configure_file( docs/eosio-keygen.1.in ${PROJECT_BINARY_DIR}/man1/eosio-keygen.1 ) + configure_file( docs/antelope-keygen.1.in ${PROJECT_BINARY_DIR}/man1/antelope-keygen.1 ) install(DIRECTORY ${PROJECT_BINARY_DIR}/man1 DESTINATION ${CMAKE_INSTALL_MANDIR} diff --git a/cli/docs/README.md.in b/cli/docs/README.md.in index d387386..b3e0b98 100644 --- a/cli/docs/README.md.in +++ b/cli/docs/README.md.in @@ -1,9 +1,9 @@ -# eosio-keygen (cli) +# antelope-keygen (cli) -Generate public and private keypair for [EOSIO](https://eos.io/) +Generate public and private keypair for [Antelope IO](https://antelope.io) -Source code is available at [github.com](https://github.com/eosswedenorg/eosio-keygen) +Source code is available at [github.com](https://github.com/eosswedenorg/antelope-keygen) ## Synopsis @@ -19,7 +19,7 @@ Source code is available at [github.com](https://github.com/eosswedenorg/eosio-k ## Description -Output one EOSIO key pair if no arguments are given. +Output one Antelope key pair if no arguments are given. Options and subcommands are as follows: ### General flags @@ -70,7 +70,7 @@ Number of keys to search for (default is 10) ### benchmark command -`eosio-keygen benchmark [num_keys]` +`antelope-keygen benchmark [num_keys]` performs a benchmark test, generating `num_keys` keys and measuring the time. diff --git a/cli/docs/eosio-keygen.1.in b/cli/docs/antelope-keygen.1.in similarity index 100% rename from cli/docs/eosio-keygen.1.in rename to cli/docs/antelope-keygen.1.in diff --git a/cli/src/benchmark.cpp b/cli/src/benchmark.cpp index b0a32b9..01a8bbf 100644 --- a/cli/src/benchmark.cpp +++ b/cli/src/benchmark.cpp @@ -25,7 +25,7 @@ #include #include "benchmark.hpp" -namespace eoskeygen { +namespace antelopekeygen { std::chrono::duration _run_benchmark(size_t num_keys) { auto start = std::chrono::steady_clock::now(); @@ -47,4 +47,4 @@ void benchmark(size_t num_keys, struct benchmark_result* res) { res->kps = static_cast(num_keys) / res->sec; } -} // namespace eoskeygen +} // namespace antelopekeygen diff --git a/cli/src/benchmark.hpp b/cli/src/benchmark.hpp index 9300cc3..180872e 100644 --- a/cli/src/benchmark.hpp +++ b/cli/src/benchmark.hpp @@ -26,7 +26,7 @@ #include -namespace eoskeygen { +namespace antelopekeygen { struct benchmark_result { float sec; // elapsed seconds. @@ -35,6 +35,6 @@ struct benchmark_result { void benchmark(size_t num_keys, struct benchmark_result* res); -} // namespace eoskeygen +} // namespace antelopekeygen #endif /* EOSIOKEYGEN_BENCHMARK_H */ diff --git a/cli/src/cli_key_search_result.cpp b/cli/src/cli_key_search_result.cpp index aaa9f97..d70b7cb 100644 --- a/cli/src/cli_key_search_result.cpp +++ b/cli/src/cli_key_search_result.cpp @@ -28,7 +28,7 @@ #include "console.hpp" #include "cli_key_search_result.hpp" -namespace eoskeygen { +namespace antelopekeygen { static size_t highlight(console::Color color, const std::string& str, size_t pos, size_t len) { @@ -74,4 +74,4 @@ void CliKeySearchResult::onResult(const struct libantelope::ec_keypair* key, con << "Private: " << libantelope::wif_priv_encode(key->secret, m_codec.pvt) << std::endl; } -} // namespace eoskeygen +} // namespace antelopekeygen diff --git a/cli/src/cli_key_search_result.hpp b/cli/src/cli_key_search_result.hpp index 0d0a1a5..1428477 100644 --- a/cli/src/cli_key_search_result.hpp +++ b/cli/src/cli_key_search_result.hpp @@ -31,7 +31,7 @@ #include #include -namespace eoskeygen { +namespace antelopekeygen { class Dictionary; @@ -49,6 +49,6 @@ protected : libantelope::wif_codec_t m_codec; }; -} // namespace eoskeygen +} // namespace antelopekeygen #endif /* EOSIOKEYGEN_KEY_SEARCH_HELPERS_H */ diff --git a/cli/src/console.cpp b/cli/src/console.cpp index ebcfe1f..9b3529d 100644 --- a/cli/src/console.cpp +++ b/cli/src/console.cpp @@ -25,7 +25,7 @@ #include "isatty.hpp" #include "console.hpp" -namespace eoskeygen { namespace console { +namespace antelopekeygen { namespace console { bool disable_color = false; @@ -45,4 +45,4 @@ bool isColorsSupported(const std::ostream& os) { return disable_color == false && isatty(fd); } -} } // namespace eoskeygen::console +} } // namespace antelopekeygen::console diff --git a/cli/src/console.hpp b/cli/src/console.hpp index f847f75..0dd2c46 100644 --- a/cli/src/console.hpp +++ b/cli/src/console.hpp @@ -26,7 +26,7 @@ #include -namespace eoskeygen { +namespace antelopekeygen { namespace console { @@ -86,6 +86,6 @@ namespace console { } // namespace console -} // namespace eoskeygen +} // namespace antelopekeygen #endif /* EOSIOKEYGEN_CONSOLE_H */ diff --git a/cli/src/console_ansi.cpp b/cli/src/console_ansi.cpp index 5cf5850..f49006c 100644 --- a/cli/src/console_ansi.cpp +++ b/cli/src/console_ansi.cpp @@ -24,7 +24,7 @@ #include #include "console.hpp" -namespace eoskeygen { +namespace antelopekeygen { namespace console { @@ -80,4 +80,4 @@ std::ostream& operator<<(std::ostream& os, const fg& obj) { } // namespace console -} // namespace eoskeygen +} // namespace antelopekeygen diff --git a/cli/src/console_win32.cpp b/cli/src/console_win32.cpp index 3b13f5a..ec3b1b1 100644 --- a/cli/src/console_win32.cpp +++ b/cli/src/console_win32.cpp @@ -25,7 +25,7 @@ #include #include "console.hpp" -namespace eoskeygen { +namespace antelopekeygen { // WinAPI colors #define FG_BLACK 0 @@ -105,4 +105,4 @@ std::ostream& operator<<(std::ostream& os, const fg& obj) { } // namespace console -} // namespace eoskeygen +} // namespace antelopekeygen diff --git a/cli/src/isatty.cpp b/cli/src/isatty.cpp index ea03397..75d0778 100644 --- a/cli/src/isatty.cpp +++ b/cli/src/isatty.cpp @@ -31,7 +31,7 @@ #endif #include "isatty.hpp" -namespace eoskeygen { +namespace antelopekeygen { bool isatty(int fd) { return ::_isatty(fd); @@ -42,4 +42,4 @@ bool isatty(FILE* fd) { return fd ? isatty(_fileno(fd)) : false; } -} // namespace eoskeygen +} // namespace antelopekeygen diff --git a/cli/src/isatty.hpp b/cli/src/isatty.hpp index 0b724af..54d1e00 100644 --- a/cli/src/isatty.hpp +++ b/cli/src/isatty.hpp @@ -26,12 +26,12 @@ #include -namespace eoskeygen { +namespace antelopekeygen { bool isatty(int fd); bool isatty(FILE* fd); -} // namespace eoskeygen +} // namespace antelopekeygen #endif /* EOSIOKEYGEN_CORE_ISATTY_H */ diff --git a/cli/src/main.cpp b/cli/src/main.cpp index 5351444..f9205c7 100644 --- a/cli/src/main.cpp +++ b/cli/src/main.cpp @@ -62,10 +62,10 @@ public: } }; -int cmd_search(const eoskeygen::strlist_t& words, const eoskeygen::Dictionary& dict, int count) { +int cmd_search(const antelopekeygen::strlist_t& words, const antelopekeygen::Dictionary& dict, int count) { - eoskeygen::KeySearch ks; - eoskeygen::CliKeySearchResult rs(dict, key_codec); + antelopekeygen::KeySearch ks; + antelopekeygen::CliKeySearchResult rs(dict, key_codec); ks.setPrefix(key_codec.pub); ks.setCallback(&rs); @@ -82,7 +82,7 @@ int cmd_search(const eoskeygen::strlist_t& words, const eoskeygen::Dictionary& d if (option_l33t) { for(std::size_t i = 0; i < words.size(); i++) { - ks.addList(eoskeygen::l33twords(words[i])); + ks.addList(antelopekeygen::l33twords(words[i])); } } else { ks.addList(words); @@ -93,7 +93,7 @@ int cmd_search(const eoskeygen::strlist_t& words, const eoskeygen::Dictionary& d #endif /* EOSIOKEYGEN_HAVE_THREADS */ std::cout << "Searching for " << count - << " keys containing: " << eoskeygen::strlist::join(ks.getList(), ",") + << " keys containing: " << antelopekeygen::strlist::join(ks.getList(), ",") #ifdef EOSIOKEYGEN_HAVE_THREADS << ", Using: " << ks.getThreadCount() << " threads" #endif /* EOSIOKEYGEN_HAVE_THREADS */ @@ -106,12 +106,12 @@ int cmd_search(const eoskeygen::strlist_t& words, const eoskeygen::Dictionary& d void cmd_benchmark(size_t num_keys) { - struct eoskeygen::benchmark_result res; + struct antelopekeygen::benchmark_result res; std::cout << "Benchmark: Generating " << num_keys << " keys" << std::endl; - eoskeygen::benchmark(num_keys, &res); + antelopekeygen::benchmark(num_keys, &res); std::cout << "Result: Took " << res.sec << " seconds, " << res.kps << " keys per second." << std::endl; @@ -146,7 +146,7 @@ int main(int argc, char **argv) { search_cmd->add_option("--threads", option_num_threads, "Use of parallel threads for searching.\n" "Default is what the operating system recomends.") - ->default_val(eoskeygen::KeySearch::max_threads()); + ->default_val(antelopekeygen::KeySearch::max_threads()); #endif /* EOSIOKEYGEN_HAVE_THREADS */ @@ -185,15 +185,15 @@ int main(int argc, char **argv) { } if (search_cmd->parsed()) { - eoskeygen::strlist_t words; - eoskeygen::Dictionary dict; + antelopekeygen::strlist_t words; + antelopekeygen::Dictionary dict; if (*monocrome) { - eoskeygen::console::disable_color = true; + antelopekeygen::console::disable_color = true; } for (auto item : dict_list) { - eoskeygen::Dictionary d; + antelopekeygen::Dictionary d; if (d.loadFromFile(item)) { dict.add(d); @@ -203,7 +203,7 @@ int main(int argc, char **argv) { } for (auto item : lang_list) { - eoskeygen::Dictionary d; + antelopekeygen::Dictionary d; std::string filename(CONFIG_SHARE_FULL_PATH "/dicts/" + item); if (d.loadFromFile(filename)) { @@ -215,7 +215,7 @@ int main(int argc, char **argv) { if (search_words.rfind("file:", 0) == 0) { std::string filename = search_words.substr(5); - if (!eoskeygen::readLines(filename, words)) { + if (!antelopekeygen::readLines(filename, words)) { std::cerr << "Could not read file: " << filename << std::endl; goto end; } @@ -225,7 +225,7 @@ int main(int argc, char **argv) { goto end; } } else { - words = eoskeygen::strlist::splitw(search_words); + words = antelopekeygen::strlist::splitw(search_words); } rc = cmd_search(words, dict, search_count); diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 0acf3ec..eb3e3a7 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -28,7 +28,7 @@ set( COMMON_SOURCE if (USE_THREADS) find_package(Threads) if (Threads_FOUND) - set( EOSIOKEYGEN_HAVE_THREADS TRUE ) + set( ANTELOPEKEYGEN_HAVE_THREADS TRUE ) set( COMMON_SOURCE ${COMMON_SOURCE} src/key_search_mt.cpp ) endif (Threads_FOUND) endif (USE_THREADS) diff --git a/common/config.hpp.in b/common/config.hpp.in index 8b1d7f9..1cbe1c8 100644 --- a/common/config.hpp.in +++ b/common/config.hpp.in @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef EOSIOKEYGEN_COMMON_CONFIG_H -#define EOSIOKEYGEN_COMMON_CONFIG_H +#ifndef ANTELOPEKEYGEN_COMMON_CONFIG_H +#define ANTELOPEKEYGEN_COMMON_CONFIG_H // Defined if we have thread support. -#cmakedefine EOSIOKEYGEN_HAVE_THREADS +#cmakedefine ANTELOPEKEYGEN_HAVE_THREADS -#endif /* EOSIOKEYGEN_COMMON_CONFIG_H */ +#endif /* ANTELOPEKEYGEN_COMMON_CONFIG_H */ diff --git a/common/include/eoskeygen/core/dictionary.hpp b/common/include/eoskeygen/core/dictionary.hpp index 4a939c0..8008a30 100644 --- a/common/include/eoskeygen/core/dictionary.hpp +++ b/common/include/eoskeygen/core/dictionary.hpp @@ -21,14 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef EOSIOKEYGEN_COMMON_CORE_DICTIONARY_H -#define EOSIOKEYGEN_COMMON_CORE_DICTIONARY_H +#ifndef ANTELOPEKEYGEN_COMMON_CORE_DICTIONARY_H +#define ANTELOPEKEYGEN_COMMON_CORE_DICTIONARY_H #include #include #include -namespace eoskeygen { +namespace antelopekeygen { class Dictionary { @@ -70,6 +70,6 @@ protected : std::set m_words; }; -} // namespace eoskeygen +} // namespace antelopekeygen -#endif /* EOSIOKEYGEN_COMMON_CORE_DICTIONARY_H */ +#endif /* ANTELOPEKEYGEN_COMMON_CORE_DICTIONARY_H */ diff --git a/common/include/eoskeygen/core/file.hpp b/common/include/eoskeygen/core/file.hpp index 330c974..15ec64c 100644 --- a/common/include/eoskeygen/core/file.hpp +++ b/common/include/eoskeygen/core/file.hpp @@ -21,15 +21,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef EOSIOKEYGEN_COMMON_CORE_FILE_H -#define EOSIOKEYGEN_COMMON_CORE_FILE_H +#ifndef ANTELOPEKEYGEN_COMMON_CORE_FILE_H +#define ANTELOPEKEYGEN_COMMON_CORE_FILE_H #include -namespace eoskeygen { +namespace antelopekeygen { bool readLines(const std::string& filename, strlist_t& lines); } // namespace -#endif /* EOSIOKEYGEN_COMMON_CORE_FILE_H */ +#endif /* ANTELOPEKEYGEN_COMMON_CORE_FILE_H */ diff --git a/common/include/eoskeygen/core/leet.hpp b/common/include/eoskeygen/core/leet.hpp index 29eea80..6cc3796 100644 --- a/common/include/eoskeygen/core/leet.hpp +++ b/common/include/eoskeygen/core/leet.hpp @@ -21,16 +21,16 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef EOSIOKEYGEN_COMMON_CORE_LEET_H -#define EOSIOKEYGEN_COMMON_CORE_LEET_H +#ifndef ANTELOPEKEYGEN_COMMON_CORE_LEET_H +#define ANTELOPEKEYGEN_COMMON_CORE_LEET_H #include #include -namespace eoskeygen { +namespace antelopekeygen { strlist_t l33twords(std::string str); -} // namespace eoskeygen +} // namespace antelopekeygen -#endif /* EOSIOKEYGEN_COMMON_CORE_LEET_H */ +#endif /* ANTELOPEKEYGEN_COMMON_CORE_LEET_H */ diff --git a/common/include/eoskeygen/core/string.hpp b/common/include/eoskeygen/core/string.hpp index 4e008c0..a1ef0dc 100644 --- a/common/include/eoskeygen/core/string.hpp +++ b/common/include/eoskeygen/core/string.hpp @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef EOSIOKEYGEN_COMMON_CORE_STRING_H -#define EOSIOKEYGEN_COMMON_CORE_STRING_H +#ifndef ANTELOPEKEYGEN_COMMON_CORE_STRING_H +#define ANTELOPEKEYGEN_COMMON_CORE_STRING_H #include #include -namespace eoskeygen { +namespace antelopekeygen { std::string& strtolower(std::string& str); @@ -35,6 +35,6 @@ std::string& rtrim(std::string& str); std::string& ltrim(std::string& str); std::string& trim(std::string& str); -} // namespace eoskeygen +} // namespace antelopekeygen -#endif /* EOSIOKEYGEN_COMMON_CORE_STRING_H */ +#endif /* ANTELOPEKEYGEN_COMMON_CORE_STRING_H */ diff --git a/common/include/eoskeygen/core/strlist.hpp b/common/include/eoskeygen/core/strlist.hpp index 96f509e..2cc63b6 100644 --- a/common/include/eoskeygen/core/strlist.hpp +++ b/common/include/eoskeygen/core/strlist.hpp @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef EOSIOKEYGEN_COMMON_CORE_STRLIST_H -#define EOSIOKEYGEN_COMMON_CORE_STRLIST_H +#ifndef ANTELOPEKEYGEN_COMMON_CORE_STRLIST_H +#define ANTELOPEKEYGEN_COMMON_CORE_STRLIST_H #include #include -namespace eoskeygen { +namespace antelopekeygen { typedef std::vector strlist_t; @@ -45,6 +45,6 @@ strlist_t& strip(strlist_t& list, strlist_stripfunc_t fn); } // namespace strlist -} // namespace eoskeygen +} // namespace antelopekeygen -#endif /* EOSIOKEYGEN_COMMON_CORE_STRLIST_H */ +#endif /* ANTELOPEKEYGEN_COMMON_CORE_STRLIST_H */ diff --git a/common/include/eoskeygen/key_search.hpp b/common/include/eoskeygen/key_search.hpp index 0574575..5e0b9ae 100644 --- a/common/include/eoskeygen/key_search.hpp +++ b/common/include/eoskeygen/key_search.hpp @@ -21,8 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef EOSIOKEYGEN_COMMON_KEY_SEARCH_H -#define EOSIOKEYGEN_COMMON_KEY_SEARCH_H +#ifndef ANTELOPEKEYGEN_COMMON_KEY_SEARCH_H +#define ANTELOPEKEYGEN_COMMON_KEY_SEARCH_H #include #include @@ -31,7 +31,7 @@ #include #include -namespace eoskeygen { +namespace antelopekeygen { class IKeySearchResult; @@ -64,7 +64,7 @@ public : // Set callback for search result. void setCallback(IKeySearchResult* callback); -#ifdef EOSIOKEYGEN_HAVE_THREADS +#ifdef ANTELOPEKEYGEN_HAVE_THREADS // Returns the maximum number of threads // reported by the operating system. static size_t max_threads(); @@ -73,7 +73,7 @@ public : void setThreadCount(size_t num); size_t getThreadCount() const; -#endif /* EOSIOKEYGEN_HAVE_THREADS */ +#endif /* ANTELOPEKEYGEN_HAVE_THREADS */ // Aborts find() operation if started. // This is useful for multithreaded code (like GUI application) @@ -90,11 +90,11 @@ protected : // returns true if a word was found (stored in ), false otherwise. bool _contains_word(const struct libantelope::ec_keypair* key, struct result& result); -#ifdef EOSIOKEYGEN_HAVE_THREADS +#ifdef ANTELOPEKEYGEN_HAVE_THREADS void _thr_proc(); void _search_mt(); -#endif /* EOSIOKEYGEN_HAVE_THREADS */ +#endif /* ANTELOPEKEYGEN_HAVE_THREADS */ void _search_linear(); @@ -112,14 +112,14 @@ protected : // Current number of keys found. std::size_t m_count; -#ifdef EOSIOKEYGEN_HAVE_THREADS +#ifdef ANTELOPEKEYGEN_HAVE_THREADS // Number of threads to use. size_t m_threads; -#endif /* EOSIOKEYGEN_HAVE_THREADS */ +#endif /* ANTELOPEKEYGEN_HAVE_THREADS */ IKeySearchResult* m_callback; }; -} // namespace eoskeygen +} // namespace antelopekeygen -#endif /* EOSIOKEYGEN_COMMON_KEY_SEARCH_H */ +#endif /* ANTELOPEKEYGEN_COMMON_KEY_SEARCH_H */ diff --git a/common/include/eoskeygen/key_search_result.hpp b/common/include/eoskeygen/key_search_result.hpp index 7abd975..ef598e0 100644 --- a/common/include/eoskeygen/key_search_result.hpp +++ b/common/include/eoskeygen/key_search_result.hpp @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef EOSIOKEYGEN_COMMON_KEY_SEARCH_RESULT_H -#define EOSIOKEYGEN_COMMON_KEY_SEARCH_RESULT_H +#ifndef ANTELOPEKEYGEN_COMMON_KEY_SEARCH_RESULT_H +#define ANTELOPEKEYGEN_COMMON_KEY_SEARCH_RESULT_H #include -namespace eoskeygen { +namespace antelopekeygen { class IKeySearchResult { @@ -35,6 +35,6 @@ public : virtual void onResult(const struct libantelope::ec_keypair* key, const struct KeySearch::result& result) = 0; }; -} // namespace eoskeygen +} // namespace antelopekeygen -#endif /* EOSIOKEYGEN_COMMON_KEY_SEARCH_RESULT_H */ +#endif /* ANTELOPEKEYGEN_COMMON_KEY_SEARCH_RESULT_H */ diff --git a/common/src/core/dictionary.cpp b/common/src/core/dictionary.cpp index 806922b..2e5033a 100644 --- a/common/src/core/dictionary.cpp +++ b/common/src/core/dictionary.cpp @@ -29,7 +29,7 @@ #include #include -namespace eoskeygen { +namespace antelopekeygen { struct StringContains { StringContains(const std::string& str, std::vector& pos) : m_str(str), m_pos(pos) {} @@ -126,4 +126,4 @@ Dictionary::search_result_t Dictionary::search(const std::string& subject) const return res; } -} // namespace eoskeygen +} // namespace antelopekeygen diff --git a/common/src/core/file.cpp b/common/src/core/file.cpp index 6cbdac5..500d86b 100644 --- a/common/src/core/file.cpp +++ b/common/src/core/file.cpp @@ -25,7 +25,7 @@ #include #include -namespace eoskeygen { +namespace antelopekeygen { bool readLines(const std::string& filename, strlist_t& lines) { @@ -46,4 +46,4 @@ bool readLines(const std::string& filename, strlist_t& lines) { return true; } -} // namespace eoskeygen +} // namespace antelopekeygen diff --git a/common/src/core/leet.cpp b/common/src/core/leet.cpp index e30e54d..763bc11 100644 --- a/common/src/core/leet.cpp +++ b/common/src/core/leet.cpp @@ -24,7 +24,7 @@ #include #include -namespace eoskeygen { +namespace antelopekeygen { static bool is_l33t(char ch, char& r) { @@ -79,4 +79,4 @@ strlist_t l33twords(std::string str) { return list; } -} // namespace eoskeygen +} // namespace antelopekeygen diff --git a/common/src/core/string.cpp b/common/src/core/string.cpp index 6186556..54acb8a 100644 --- a/common/src/core/string.cpp +++ b/common/src/core/string.cpp @@ -26,7 +26,7 @@ #include #include -namespace eoskeygen { +namespace antelopekeygen { std::string& strtolower(std::string& str) { std::transform(str.begin(), str.end(), str.begin(), [](unsigned char c){ return std::tolower(c); }); @@ -49,4 +49,4 @@ std::string& trim(std::string& str) { return ltrim(rtrim(str)); } -} // namespace eoskeygen +} // namespace antelopekeygen diff --git a/common/src/core/strlist.cpp b/common/src/core/strlist.cpp index 8c8f874..dc3e5db 100644 --- a/common/src/core/strlist.cpp +++ b/common/src/core/strlist.cpp @@ -25,7 +25,7 @@ #include #include -namespace eoskeygen { +namespace antelopekeygen { strlist_t strlist::splitw(const std::string& str, const std::string& delim) { @@ -48,7 +48,7 @@ strlist_t strlist::split(const std::string& str, const std::string& delim) { return r; } -std::string strlist::join(const eoskeygen::strlist_t& list, const std::string& delim) { +std::string strlist::join(const strlist_t& list, const std::string& delim) { std::string out; @@ -72,4 +72,4 @@ strlist_t& strlist::strip(strlist_t& list, strlist_stripfunc_t fn) { return list; } -} // namespace eoskeygen +} // namespace antelopekeygen diff --git a/common/src/key_search.cpp b/common/src/key_search.cpp index 3e11303..d20597d 100644 --- a/common/src/key_search.cpp +++ b/common/src/key_search.cpp @@ -28,7 +28,7 @@ #include #include -namespace eoskeygen { +namespace antelopekeygen { KeySearch::KeySearch() : m_prefix ("EOS"), @@ -128,4 +128,4 @@ bool KeySearch::_contains_word(const struct libantelope::ec_keypair* key, struct return false; } -} // namespace eoskeygen +} // namespace antelopekeygen diff --git a/common/src/key_search_mt.cpp b/common/src/key_search_mt.cpp index 25fa17e..f73a635 100644 --- a/common/src/key_search_mt.cpp +++ b/common/src/key_search_mt.cpp @@ -29,7 +29,7 @@ #include #include -namespace eoskeygen { +namespace antelopekeygen { // Mutex guard for m_count. std::mutex g_count_mtx; @@ -98,4 +98,4 @@ void KeySearch::_search_mt() } } -} // namespace eoskeygen +} // namespace antelopekeygen diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 361dfeb..fec8fec 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.15) -project(eosio-keygen-gui +project(antelope-keygen-gui VERSION ${CMAKE_PROJECT_VERSION} - DESCRIPTION "Keygenerator for EOSIO (gui)" + DESCRIPTION "Keygenerator for Antelope blockchain (gui)" LANGUAGES CXX) # Append modules dir diff --git a/gui/src/SearchWindow.cpp b/gui/src/SearchWindow.cpp index b2b4e60..e4661e2 100644 --- a/gui/src/SearchWindow.cpp +++ b/gui/src/SearchWindow.cpp @@ -72,8 +72,8 @@ m_btn_clear ("Clear") m_layout.addWidget(&m_leet_cb, 0, 2); #ifdef EOSIOKEYGEN_HAVE_THREADS - m_num_threads.setValue((int) eoskeygen::KeySearch::max_threads()); - m_num_threads.setRange(1, (int) eoskeygen::KeySearch::max_threads()); + m_num_threads.setValue((int) antelopekeygen::KeySearch::max_threads()); + m_num_threads.setRange(1, (int) antelopekeygen::KeySearch::max_threads()); m_num_threads.setSuffix(" Threads"); m_layout.addWidget(&m_num_threads, 0, 3); #endif /* EOSIOKEYGEN_HAVE_THREADS */ @@ -121,7 +121,7 @@ void SearchWindow::initSignals() void SearchWindow::loadDictionaries() { QStringList list; - eoskeygen::Dictionary tmpDict; + antelopekeygen::Dictionary tmpDict; std::string base_path(CONFIG_DICT_FULL_PATH); // Clear dictionary first. @@ -146,7 +146,7 @@ void SearchWindow::loadDictionaries() } } -void SearchWindow::onResult(const struct libantelope::ec_keypair* key, const struct eoskeygen::KeySearch::result& result) +void SearchWindow::onResult(const struct libantelope::ec_keypair* key, const struct antelopekeygen::KeySearch::result& result) { int pos = (int) result.pos; int len = (int) result.len; @@ -156,7 +156,7 @@ void SearchWindow::onResult(const struct libantelope::ec_keypair* key, const str QString mid = pub.mid(pos, len); QString left = pub.left(pos); QString right = pub.mid(pos + len, pub.size() - pos); - eoskeygen::Dictionary::search_result_t dict_res = m_dict.search(pub.toStdString()); + antelopekeygen::Dictionary::search_result_t dict_res = m_dict.search(pub.toStdString()); QString out = "Public: " + pub.left(pub_prefix_len); for(int i = pub_prefix_len; i < pub.length(); ) { @@ -198,12 +198,12 @@ void SearchWindow::search() } const std::string& input = m_txt_search.text().toLocal8Bit().constData(); - eoskeygen::strlist_t list; + antelopekeygen::strlist_t list; if (m_leet_cb.isChecked()) { - list = eoskeygen::l33twords(input); + list = antelopekeygen::l33twords(input); } else { - list = eoskeygen::strlist::splitw(input); + list = antelopekeygen::strlist::splitw(input); } // Validate that we atleast got something to search for. @@ -222,10 +222,10 @@ void SearchWindow::search() m_ksearch.setThreadCount(m_num_threads.value()); #endif /* EOSIOKEYGEN_HAVE_THREADS */ - QFuture future = QtConcurrent::run(&m_ksearch, &eoskeygen::KeySearch::find, m_num_results.value()); + QFuture future = QtConcurrent::run(&m_ksearch, &antelopekeygen::KeySearch::find, m_num_results.value()); m_worker.setFuture(future); - m_status.setText("Searching for: " + QString::fromStdString(eoskeygen::strlist::join(list, ", "))); + m_status.setText("Searching for: " + QString::fromStdString(antelopekeygen::strlist::join(list, ", "))); } void SearchWindow::output(const std::string& html) diff --git a/gui/src/SearchWindow.hpp b/gui/src/SearchWindow.hpp index 479edf2..9282ef4 100644 --- a/gui/src/SearchWindow.hpp +++ b/gui/src/SearchWindow.hpp @@ -37,13 +37,13 @@ #include #include "MultiSelect.hpp" -class SearchWindow : public QWidget, public eoskeygen::IKeySearchResult +class SearchWindow : public QWidget, public antelopekeygen::IKeySearchResult { Q_OBJECT public: explicit SearchWindow(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags()); - void onResult(const struct libantelope::ec_keypair* key, const struct eoskeygen::KeySearch::result& result); + void onResult(const struct libantelope::ec_keypair* key, const struct antelopekeygen::KeySearch::result& result); private : void initSignals(); @@ -76,9 +76,9 @@ private: // Search worker thread. QFutureWatcher m_worker; - eoskeygen::KeySearch m_ksearch; + antelopekeygen::KeySearch m_ksearch; - eoskeygen::Dictionary m_dict; + antelopekeygen::Dictionary m_dict; // Widgets // ---------------- From 10ec4355e6a1be8e2d0cedeabf90212ee8ec21f5 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 10 Apr 2023 15:25:48 +0200 Subject: [PATCH 31/57] cli/docs/antelope-keygen.1.in: Update to reflect new cli syntax and change eosio to antelope. --- cli/docs/antelope-keygen.1.in | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/cli/docs/antelope-keygen.1.in b/cli/docs/antelope-keygen.1.in index c7ef574..1283977 100644 --- a/cli/docs/antelope-keygen.1.in +++ b/cli/docs/antelope-keygen.1.in @@ -1,9 +1,9 @@ -.TH @PROJECT_NAME@ 1 "January, 2020" "@PROJECT_NAME@ @PROJECT_VERSION@" +.TH @PROJECT_NAME@ 1 "April, 2023" "@PROJECT_NAME@ @PROJECT_VERSION@" .SH NAME @PROJECT_NAME@ - Generate public and private keypair for -.UR https://eos.io/ -EOS +.UR https://antelope.io +Antelope IO .UE . .SH SYNOPSIS @@ -16,13 +16,17 @@ EOS .OP \-v .YS +.SY @PROJECT_NAME@ +.OP \--format +.YS + .SY @PROJECT_NAME@ search .OP -m .OP \--l33t -.OP \--threads= -.OP \--dict= ... -.OP \--lang= ... +.OP \--threads +.OP \--dict ... +.OP \--lang ... .B word_list .OP count .YS @@ -34,17 +38,20 @@ benchmark .SH DESCRIPTION .P -Output one EOSIO key pair if no arguments are given +Output one Antelope key pair if no arguments are given .P Options and subcommands are as follows: -.TP 15 +.TP 20 .B -h, --help Shows this help text. -.TP 15 +.TP 20 .B -v Shows version. -.TP 15 +.TP 20 +.B --format +What keyformat to use, valid values are: K1, legacy, fio +.TP 20 .B search performs a search, finding .I @@ -65,12 +72,12 @@ Takes each word in .I and find all l33tspeak combinations of that word and uses the new list for the search. .TP 20 -.B --threads= +.B --threads Use .I of parallel threads for searching. Default is what the operating system recommends. .TP 20 -.B --dict= +.B --dict Use words found in .I (separated by newline) to highlight words in the keys found (note that the words in this @@ -78,7 +85,7 @@ Use words found in .B --dict flag. In that case contents of all files are merged into one dictionary. .TP 20 -.B --lang= +.B --lang Same as .B --dict but will use From 25025c21b40e924f14005ef070814ed455e47943 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 10 Apr 2023 16:10:54 +0200 Subject: [PATCH 32/57] README.md: Update security notice. --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 30c0ce9..20a5875 100644 --- a/README.md +++ b/README.md @@ -195,13 +195,12 @@ Run `sudo ./uninstall.sh` or remove the files listed in `build/install_manifest. ## Security notice -Keys are generated by `OpenSSL`'s `EC_KEY_generate_key` function. The program will -never expose your keys to anything but the computers memory and output of the -program. You are free to inspect the source code and compile yourself to verify. +Keys are generated using [libantelope](https://github.com/eosswedenorg/libantelope) +while the library does not claim to guarantee cryptographically secure keys. it +relies on widly used open source cryptographic libraries (OpenSSL, libsecp256k1). -However, use this at your own risk. we cannot guarantee that the keys are -cryptographically secure as this depends on OpenSSL's implementation (alto it is -widely used and should be safe) +Use at your own risk. The author and [Sw/eden](https://eossweden.org/) does not take responsability +for any damage caused by keys generated by the program. Please read the `LICENSE` file. From 2f92e6b2b20e3174e38565700a2da1adc7cf2c53 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 10 Apr 2023 16:31:53 +0200 Subject: [PATCH 33/57] cli/docs/README.md.in: Update to reflect new cli syntax and security notice. --- cli/docs/README.md.in | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/cli/docs/README.md.in b/cli/docs/README.md.in index b3e0b98..aaa281a 100644 --- a/cli/docs/README.md.in +++ b/cli/docs/README.md.in @@ -12,7 +12,7 @@ Source code is available at [github.com](https://github.com/eosswedenorg/antelop @PROJECT_NAME@ [-v] -@PROJECT_NAME@ search [-m] [--l33t] [--threads=] [--dict= ...] [--lang= ...] word_list [count] +@PROJECT_NAME@ search [-m] [--l33t] [--threads ] [--dict ...] [--lang ...] word_list [count] @PROJECT_NAME@ benchmark [num_keys] ``` @@ -32,7 +32,7 @@ Options and subcommands are as follows: ### search command -`eosio-keygen search [-m] [--l33t] [--threads=] [--dict= ...] [--lang= ...] word_list [count]` +`eosio-keygen search [-m] [--l33t] [--threads ] [--dict ...] [--lang ...] word_list [count]` performs a search, finding `count` public keys containing one or more words from `word_list` (separated with ','). @@ -48,17 +48,17 @@ Monochrome, disables all color output. Takes each word in `word_list` and find all l33tspeak combinations of that word and uses the new list for the search. -#### --threads=num +#### --threads num Use `num` of parallel threads for searching. Default is what the operating system recommends. -#### --dict=file +#### --dict file Use words found in `file` (separated by newline) to highlight words in the keys found (note that the words in this file are not used for search. only for highlight output). There can be more then one `--dict` flag. In that case contents of all files are merged into one dictionary. -#### --lang=value +#### --lang value Same as `--dict` but will use `value` to find a file in `@CMAKE_INSTALL_FULL_DATADIR@/@CMAKE_PROJECT_NAME@/dict`. There can be more then one `--lang` flag. In that case contents of all files are merged into one dictionary. @@ -83,13 +83,12 @@ Number of keys to search for (default is 10) ## Security notice -Keys are generated by `OpenSSL`'s `EC_KEY_generate_key` function. The program will -never expose your keys to anything but the computers memory and output of the -program. You are free to inspect the source code and compile yourself to verify. +Keys are generated using [libantelope](https://github.com/eosswedenorg/libantelope) +while the library does not claim to guarantee cryptographically secure keys. it +relies on widly used open source cryptographic libraries (OpenSSL, libsecp256k1). -However, use this at your own risk. we cannot guarantee that the keys are -cryptographically secure as this depends on OpenSSL's implementation (alto it is -widely used and should be safe) +Use at your own risk. The author and [Sw/eden](https://eossweden.org/) does not take responsability +for any damage caused by keys generated by the program. Please read the `LICENSE.cli` file. From 6554e6c806bbc0a9f2ddcc4292f5636b6604e8ba Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 10 Apr 2023 16:33:43 +0200 Subject: [PATCH 34/57] cli/docs/README.md.in: use @PROJECT_NAME@ in some missed places that used hardcoded values. --- cli/docs/README.md.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/docs/README.md.in b/cli/docs/README.md.in index aaa281a..17768e5 100644 --- a/cli/docs/README.md.in +++ b/cli/docs/README.md.in @@ -1,5 +1,5 @@ -# antelope-keygen (cli) +# @PROJECT_NAME@ (cli) Generate public and private keypair for [Antelope IO](https://antelope.io) @@ -32,7 +32,7 @@ Options and subcommands are as follows: ### search command -`eosio-keygen search [-m] [--l33t] [--threads ] [--dict ...] [--lang ...] word_list [count]` +`@PROJECT_NAME@ search [-m] [--l33t] [--threads ] [--dict ...] [--lang ...] word_list [count]` performs a search, finding `count` public keys containing one or more words from `word_list` (separated with ','). @@ -70,7 +70,7 @@ Number of keys to search for (default is 10) ### benchmark command -`antelope-keygen benchmark [num_keys]` +`@PROJECT_NAME@ benchmark [num_keys]` performs a benchmark test, generating `num_keys` keys and measuring the time. From 3a2c80e9b5800cd33c4763b2a27b425812ed2b02 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 10 Apr 2023 16:35:15 +0200 Subject: [PATCH 35/57] cli/docs: adding antelope-keygen-benchmark.1.in and antelope-keygen-search.1.in --- cli/CMakeLists.txt | 2 + cli/docs/antelope-keygen-benchmark.1.in | 67 ++++++++++++++ cli/docs/antelope-keygen-search.1.in | 112 ++++++++++++++++++++++++ 3 files changed, 181 insertions(+) create mode 100644 cli/docs/antelope-keygen-benchmark.1.in create mode 100644 cli/docs/antelope-keygen-search.1.in diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index 087b24d..ff3512f 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -68,6 +68,8 @@ install(FILES ${PROJECT_BINARY_DIR}/README.cli.md if (UNIX) configure_file( docs/antelope-keygen.1.in ${PROJECT_BINARY_DIR}/man1/antelope-keygen.1 ) + configure_file( docs/antelope-keygen-search.1.in ${PROJECT_BINARY_DIR}/man1/antelope-keygen-search.1 ) + configure_file( docs/antelope-keygen-benchmark.1.in ${PROJECT_BINARY_DIR}/man1/antelope-keygen-benchmark.1 ) install(DIRECTORY ${PROJECT_BINARY_DIR}/man1 DESTINATION ${CMAKE_INSTALL_MANDIR} diff --git a/cli/docs/antelope-keygen-benchmark.1.in b/cli/docs/antelope-keygen-benchmark.1.in new file mode 100644 index 0000000..cd16012 --- /dev/null +++ b/cli/docs/antelope-keygen-benchmark.1.in @@ -0,0 +1,67 @@ +.TH @PROJECT_NAME@-benchmark 1 "April, 2023" "@PROJECT_NAME@-benchmark @PROJECT_VERSION@" + +.SH NAME +@PROJECT_NAME@ benchmark - Benchmark the performance of the @PROJECT_NAME@ key generator. + +.SH SYNOPSIS + +.SY @PROJECT_NAME@ +benchmark +.OP \-h|--help +.YS + +.SY @PROJECT_NAME@ +benchmark +.OP num_keys +.YS + +.SH DESCRIPTION + +performs a benchmark test, generating \fInum_keys\fR (default 1000) keys and measuring the time. + +.SH SECURITY NOTICE + +.PP +Keys are generated using +.UR https://github.com/eosswedenorg/libantelope +libantelope +.UE . +while the library does not claim to guarantee cryptographically secure keys. it +relies on widly used open source cryptographic libraries (OpenSSL, libsecp256k1). + +.PP +Use at your own risk. The author and +.UR https://eossweden.org +Sw/eden +.UE +does not take responsability for any damage caused by keys generated by the program. + +.P +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +.br +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +.br +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +.br +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +.br +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +.br +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +.SH BUGS + +Report bugs to +.UR https://github.com/eosswedenorg/eosio-keygen/issues +Github +.UE . Thank you. + +.SH AUTHOR + +.MT henrik@eossweden.org +Henrik Hautakoski +.ME + +.UR https://eossweden.org +EOS Sw/eden +.UE \ No newline at end of file diff --git a/cli/docs/antelope-keygen-search.1.in b/cli/docs/antelope-keygen-search.1.in new file mode 100644 index 0000000..1ab0af3 --- /dev/null +++ b/cli/docs/antelope-keygen-search.1.in @@ -0,0 +1,112 @@ +.TH @PROJECT_NAME@-search 1 "April, 2023" "@PROJECT_NAME@-search @PROJECT_VERSION@" + +.SH NAME +@PROJECT_NAME@ search - Search after +.UR https://antelope.io +Antelope IO +.UE +vanity keys. + +.SH SYNOPSIS + +.SY @PROJECT_NAME@ +search +.OP \-h|--help +.YS + +.SY @PROJECT_NAME@ +search +.OP -m +.OP \--l33t +.OP \--threads +.OP \--dict ... +.OP \--lang ... +.B word_list +.OP count +.YS + +.SH DESCRIPTION + +.PP +performs a search, finding \fIcount\fR public keys containing one or more words from +\fIword_list\fR (separated with ','). +.PP +Instead of a list it is possible to specify a file with words (separated with newline \fB'\\n'\fR) using +\fIfile: and find all l33tspeak combinations of that word and uses the new list for the search. +.TP +\fB\-\-threads\fR \fInum\fR +Use <\fInum\fR> of parallel threads for searching. Default is what the operating system recommends. +.TP +\fB\-\-dict\fR \fIfile\fR +Use words found in \fIfile\fR (separated by newline) to highlight words in the keys found. +.br +There can be more then one \fB\-\-dict\fR flag. +In that case contents of all files are merged into one dictionary. +.br +\fBnote:\fR the words in this file are not used for search. only for highlight output. +.TP +\fB\-\-lang\fR \fIvalue\fR +Same as \fB\-\-dict\fR but will use \fIvalue\fR to find a file in +\fB@CMAKE_INSTALL_FULL_DATADIR@/@CMAKE_PROJECT_NAME@/dict\fR. +.br +There can be more then one \fB\-\-lang\fR flag. In that case contents of all files are merged into one dictionary. +.TP +\fBcount\fR +Number of keys to search for (default is 10) + +.SH SECURITY NOTICE + +.PP +Keys are generated using +.UR https://github.com/eosswedenorg/libantelope +libantelope +.UE . +while the library does not claim to guarantee cryptographically secure keys. it +relies on widly used open source cryptographic libraries (OpenSSL, libsecp256k1). + +.PP +Use at your own risk. The author and +.UR https://eossweden.org +Sw/eden +.UE +does not take responsability for any damage caused by keys generated by the program. + +.P +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +.br +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +.br +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +.br +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +.br +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +.br +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +.SH BUGS + +Report bugs to +.UR https://github.com/eosswedenorg/eosio-keygen/issues +Github +.UE . Thank you. + +.SH AUTHOR + +.MT henrik@eossweden.org +Henrik Hautakoski +.ME + +.UR https://eossweden.org +EOS Sw/eden +.UE \ No newline at end of file From 133aa230fbb1500966b511125e70608e082944e2 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 10 Apr 2023 16:35:49 +0200 Subject: [PATCH 36/57] cli/docs/antelope-keygen.1.in: remove subcommands and refer to their man pages. update security notice and some formatting fixes. --- cli/docs/antelope-keygen.1.in | 142 +++++++++++----------------------- 1 file changed, 44 insertions(+), 98 deletions(-) diff --git a/cli/docs/antelope-keygen.1.in b/cli/docs/antelope-keygen.1.in index 1283977..16273cc 100644 --- a/cli/docs/antelope-keygen.1.in +++ b/cli/docs/antelope-keygen.1.in @@ -20,115 +20,61 @@ Antelope IO .OP \--format .YS -.SY @PROJECT_NAME@ -search -.OP -m -.OP \--l33t -.OP \--threads -.OP \--dict ... -.OP \--lang ... -.B word_list -.OP count -.YS +.SH SUBCOMMANDS -.SY @PROJECT_NAME@ -benchmark -.OP num_keys -.YS +.PP +\fB@PROJECT_NAME@ search\fR +.RS 4 +Search after +.UR https://antelope.io +Antelope IO +.UE +vanity keys. +.br +see \fB@PROJECT_NAME@-search\fR(1) +.RE + +.PP +\fB@PROJECT_NAME@ benchmark\fR +.RS 4 +Benchmark the performance of the @PROJECT_NAME@ key generator. +.br +see \fB@PROJECT_NAME@-benchmark\fR(1) +.RE .SH DESCRIPTION -.P +.PP Output one Antelope key pair if no arguments are given -.P +.PP Options and subcommands are as follows: -.TP 20 -.B -h, --help +.TP +\fB\-h\fR, \fB\-\-help\fR Shows this help text. -.TP 20 -.B -v +.TP +\fB\-v\fR Shows version. -.TP 20 -.B --format -What keyformat to use, valid values are: K1, legacy, fio -.TP 20 -.B search -performs a search, finding -.I -public keys containing one or more words from -.I -(separated with ','). -Instead of a list it is possible to specify a file with words (separated with newline '\\n') using -.I file: -.RS 16 -Search specific options: -.RS 2 -.TP 20 -.B -m -Monochrome, disables all color output. -.TP 20 -.B --l33t -Takes each word in -.I -and find all l33tspeak combinations of that word and uses the new list for the search. -.TP 20 -.B --threads -Use -.I -of parallel threads for searching. Default is what the operating system recommends. -.TP 20 -.B --dict -Use words found in -.I -(separated by newline) to highlight words in the keys found (note that the words in this - file are not used for search. only for highlight output). There can be more then one -.B --dict -flag. In that case contents of all files are merged into one dictionary. -.TP 20 -.B --lang -Same as -.B --dict -but will use -.I -to find a file in -.B @CMAKE_INSTALL_FULL_DATADIR@/@CMAKE_PROJECT_NAME@/dict. -There can be more then one -.B --lang -flag. In that case contents of all files are merged into one dictionary. -.TP 20 -.B count -Number of keys to search for (default is 10) -.RE 1 -.TP 15 -.B benchmark -performs a benchmark test, generating -.I -keys and measuring the time. -.PP -.RS 16 -Benchmark specific options: -.RS 2 -.TP 15 -.B num_keys -Number of keys to search for (default is 10) -.RE 1 - +.TP +\fB\-\-format\fR \fR\fI\,value\/\fR +What keyformat to use, valid values are: \fIK1\fR, \fIlegacy\fR, \fIfio\fR .SH SECURITY NOTICE -Keys are generated by OpenSSL\'s -.B EC_KEY_generate_key -function. The program will -never expose your keys to anything but the computers memory and output of the\ -program. You are free to inspect the source code and compile yourself to verify. -.P -However, use this at your own risk. we cannot guarantee that the keys are\ -cryptographically secure as this depends on OpenSSL's implementation (alto it is\ -widely used and should be safe) -.P -Please read the -.I LICENSE -file. +.PP +Keys are generated using +.UR https://github.com/eosswedenorg/libantelope +libantelope +.UE . +while the library does not claim to guarantee cryptographically secure keys. it +relies on widly used open source cryptographic libraries (OpenSSL, libsecp256k1). + +.PP +Use at your own risk. The author and +.UR https://eossweden.org +Sw/eden +.UE +does not take responsability for any damage caused by keys generated by the program. + .P THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, .br From 19f8b67fdd680b905815e931d61262063806fb53 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 10 Apr 2023 16:39:20 +0200 Subject: [PATCH 37/57] gui/README.md: change from eosio-keygen to antelope-keygen --- gui/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/README.md b/gui/README.md index cf078bf..f8a2850 100644 --- a/gui/README.md +++ b/gui/README.md @@ -1,9 +1,9 @@ -# eosio-keygen (gui) +# antelope-keygen (gui) -This is the graphical version of [eosio-keygen](https://github.com/eosswedenorg/eosio-keygen) project. +This is the graphical version of the [antelope-keygen](https://github.com/eosswedenorg/antelope-keygen) project. -The program generates public and private keypairs for [EOSIO](https://eos.io/) +This program generates public and private keypair for [Antelope IO](https://antelope.io) Among the basic functionality the program can also search for keys containing specific words also know as _vanity keys_. From 9a839290296f5e65ca16a8e08194d200d2de1d15 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 10 Apr 2023 16:40:02 +0200 Subject: [PATCH 38/57] gui/README.md: Update security notice. --- gui/README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gui/README.md b/gui/README.md index f8a2850..b6d88ae 100644 --- a/gui/README.md +++ b/gui/README.md @@ -9,15 +9,14 @@ Among the basic functionality the program can also search for keys containing sp ## Security notice -Keys are generated by `OpenSSL`'s `EC_KEY_generate_key` function. The program will -never expose your keys to anything but the computers memory and output of the -program. You are free to inspect the source code and compile yourself to verify. +Keys are generated using [libantelope](https://github.com/eosswedenorg/libantelope) +while the library does not claim to guarantee cryptographically secure keys. it +relies on widly used open source cryptographic libraries (OpenSSL, libsecp256k1). -However, use this at your own risk. we cannot guarantee that the keys are -cryptographically secure as this depends on OpenSSL's implementation (alto it is -widely used and should be safe) +Use at your own risk. The author and [Sw/eden](https://eossweden.org/) does not take responsability +for any damage caused by keys generated by the program. -Please read the `LICENSE.gui` file. +Please read the `LICENSE` file. ``` THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, From ec07b199ed9ad2426a0ffef3995d5a809ce2d693 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 4 May 2023 12:54:47 +0200 Subject: [PATCH 39/57] cli/src/main.cpp: update program description --- cli/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/src/main.cpp b/cli/src/main.cpp index f9205c7..0b8ca7a 100644 --- a/cli/src/main.cpp +++ b/cli/src/main.cpp @@ -119,7 +119,7 @@ void cmd_benchmark(size_t num_keys) { int main(int argc, char **argv) { - CLI::App cmd("Keygenerator for EOSIO", PROGRAM_NAME); + CLI::App cmd("Keygenerator for Antelope based blockchains", PROGRAM_NAME); std::vector dict_list; std::vector lang_list; std::string search_words; From a73b52b9877b732422f85c0c9766a0fbffd1f9e2 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 4 May 2023 12:55:21 +0200 Subject: [PATCH 40/57] CMakeLists.txt: Update project description --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df118dc..9ca563a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.15) project(antelope-keygen VERSION 1.0.8 - DESCRIPTION "Keygenerator for Antelope blockchain" + DESCRIPTION "Keygenerator for Antelope based blockchain" HOMEPAGE_URL "https://github.com/eosswedenorg/antelope-keygen" ) set( PROJECT_MAINTAINER "Henrik Hautakoski ") From a421ceb5d8be59d2c5cdbb3042bb5a858d5f9143 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 4 May 2023 13:11:40 +0200 Subject: [PATCH 41/57] .github/workflows/package.yml: bump cmake version for fedora --- .github/workflows/package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 3cb8921..8c2cc18 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -72,7 +72,7 @@ jobs: sudo dnf install -y util-linux rpmdevtools git \ gcc-12.2.1-4.fc36.x86_64 \ gcc-c++-12.2.1-4.fc36.x86_64 \ - cmake-3.25.2-1.fc36.x86_64 \ + cmake-3.26.3-1.fc36.x86_64 \ openssl1.1-devel-1.1.1q-1.fc36.x86_64 - name: Qt From 8cab0cbced3f50c46b900fdb31259b6d15b54ea8 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 4 May 2023 13:30:53 +0200 Subject: [PATCH 42/57] .github/workflows/package.yml: Use Environment files for output parameters --- .github/workflows/package.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 8c2cc18..1bf8744 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -37,8 +37,8 @@ jobs: run: | ./build.sh ${{matrix.build-opts}} FILE=$(ls build/eosio-*.deb | head -1) - echo "::set-output name=filename::$FILE" - echo "::set-output name=name::$(basename $FILE)" + echo "filename=$FILE" >> "$GITHUB_OUTPUT" + echo "name=$(basename $FILE)" >> "$GITHUB_OUTPUT" - name: Upload uses: actions/upload-release-asset@v1 @@ -86,8 +86,8 @@ jobs: run: | ./build.sh ${{matrix.build-opts}} FILE=$(ls build/eosio-*.rpm | head -1) - echo "::set-output name=filename::$FILE" - echo "::set-output name=name::$(basename $FILE)" + echo "filename=$FILE" >> "$GITHUB_OUTPUT" + echo "name=$(basename $FILE)" >> "$GITHUB_OUTPUT" - name: Upload uses: actions/upload-release-asset@v1 From 54ca24bbd966fbf5ebafdc85d6c1500e6941bbd2 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 4 May 2023 13:38:51 +0200 Subject: [PATCH 43/57] .github/workflows/package.yml: fix ls command for finding the package files. --- .github/workflows/package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 1bf8744..bf92e1f 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -36,7 +36,7 @@ jobs: id: package run: | ./build.sh ${{matrix.build-opts}} - FILE=$(ls build/eosio-*.deb | head -1) + FILE=$(ls build/*.deb | head -1) echo "filename=$FILE" >> "$GITHUB_OUTPUT" echo "name=$(basename $FILE)" >> "$GITHUB_OUTPUT" @@ -85,7 +85,7 @@ jobs: id: package run: | ./build.sh ${{matrix.build-opts}} - FILE=$(ls build/eosio-*.rpm | head -1) + FILE=$(ls build/*.rpm | head -1) echo "filename=$FILE" >> "$GITHUB_OUTPUT" echo "name=$(basename $FILE)" >> "$GITHUB_OUTPUT" From b82ba44544c2ee1bf3c1ca2597bc4c9011f8f72e Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 4 May 2023 13:42:24 +0200 Subject: [PATCH 44/57] Version 1.1.0 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ca563a..3074eea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.15) # -------------------------------- project(antelope-keygen - VERSION 1.0.8 + VERSION 1.1.0 DESCRIPTION "Keygenerator for Antelope based blockchain" HOMEPAGE_URL "https://github.com/eosswedenorg/antelope-keygen" ) From 83f09d494c38722cc1aa6457b85e452246f1f347 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 31 May 2023 19:21:05 +0200 Subject: [PATCH 45/57] common/cmake/libantelope.cmake: use version 0.2.1 --- common/cmake/libantelope.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/cmake/libantelope.cmake b/common/cmake/libantelope.cmake index f70330b..ef6aada 100644 --- a/common/cmake/libantelope.cmake +++ b/common/cmake/libantelope.cmake @@ -2,7 +2,7 @@ # Variables # -------------------------------- set( LIBANTELOPE_GIT_URL "https://github.com/eosswedenorg/libantelope.git" ) -set( LIBANTELOPE_WANTED_VERSION v0.2.0 ) +set( LIBANTELOPE_WANTED_VERSION v0.2.1 ) # -------------------------------- # Macros From 1c4e01a7267ac3e1ce447d38c114eae9e560d472 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 5 Jul 2023 05:00:01 +0200 Subject: [PATCH 46/57] README.md: Fix link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 20a5875..bf10612 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ You will need `libantelope` and `cmake 3.15` or later to compile this project. **NOTE:** Only Ubuntu 20.04 and 22.04 and Fedoora 36 is officially supported. The project should compile fine on most versions/distros but it is only tested -and distributed for those distros/versions by [Sw/eden](www.eossweden.org). +and distributed for those distros/versions by [Sw/eden](http://www.eossweden.org). #### Dependencies From baaf7e5b5417ccb5edb279e592d43b9d941af914 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 16 Aug 2023 16:00:10 +0200 Subject: [PATCH 47/57] common/cmake/libantelope.cmake: Use version 0.2.2 --- common/cmake/libantelope.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/cmake/libantelope.cmake b/common/cmake/libantelope.cmake index ef6aada..85a0ccd 100644 --- a/common/cmake/libantelope.cmake +++ b/common/cmake/libantelope.cmake @@ -2,7 +2,7 @@ # Variables # -------------------------------- set( LIBANTELOPE_GIT_URL "https://github.com/eosswedenorg/libantelope.git" ) -set( LIBANTELOPE_WANTED_VERSION v0.2.1 ) +set( LIBANTELOPE_WANTED_VERSION v0.2.2 ) # -------------------------------- # Macros From ad5d46479263edb7b35a334d5bc44f41bfd75dce Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 16 Aug 2023 18:38:17 +0200 Subject: [PATCH 48/57] .github/workflows/package.yml: Update actions/checkout to version 3 --- .github/workflows/package.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index bf92e1f..5698798 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -19,7 +19,7 @@ jobs: name: DBM ${{matrix.os}} (${{matrix.component}}) runs-on: ${{matrix.os}} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Qt if: startsWith(matrix.component, 'gui') @@ -65,7 +65,7 @@ jobs: runs-on: ubuntu-latest container: ${{ matrix.container}} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Dependancies run: | @@ -112,7 +112,7 @@ jobs: name: Windows (${{matrix.arch}}) runs-on: windows-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Qt uses: jurplel/install-qt-action@v3 From 1ef34246380908a0b5e8096b3fead5f095f3bb5e Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 16 Aug 2023 18:44:39 +0200 Subject: [PATCH 49/57] .github/workflows/ci.yml: Update qt version for windows/mac to 5.15.2 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71b835b..3a15317 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,7 @@ jobs: if: startsWith(matrix.build, 'gui') && runner.os != 'Linux' uses: jurplel/install-qt-action@v3 with: - version: '5.11.0' + version: '5.15.2' - name: Configure shell: bash From 53644e9ceb3ff066c54a9fef2710134ed845c854 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 16 Aug 2023 18:51:45 +0200 Subject: [PATCH 50/57] .github/workflows/ci.yml: update actions/checkout to version 3. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a15317..5fd9c8f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: runs-on: ${{matrix.os}} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: OpenSSL OSX if: runner.os == 'macOS' From 772d03a6e3840e324587ac420fca8787eca7cdb2 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 16 Aug 2023 18:57:33 +0200 Subject: [PATCH 51/57] .github/workflows/package.yml: Typofix, change "DBM" to "DEB" --- .github/workflows/package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 5698798..1663a3e 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -16,7 +16,7 @@ jobs: build-opts: --cli --no-gui -t Release --pkg-type deb - component: gui build-opts: --no-cli --gui -t Release --pkg-type deb - name: DBM ${{matrix.os}} (${{matrix.component}}) + name: DEB ${{matrix.os}} (${{matrix.component}}) runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v3 From d03d27589e2760ee620a6a98492fb202c59a6102 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 16 Aug 2023 17:24:12 +0200 Subject: [PATCH 52/57] .github/workflows/package.yml: build and package for fedora 38 --- .github/workflows/package.yml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 1663a3e..fc409df 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -54,32 +54,43 @@ jobs: rpm: strategy: matrix: - container: [ "fedora:36" ] + container: + - name: "fedora:36" + deps: + gcc-12.2.1-4.fc36.x86_64 + gcc-c++-12.2.1-4.fc36.x86_64 + cmake-3.26.3-1.fc36.x86_64 + openssl1.1-devel-1.1.1q-1.fc36.x86_64 + qt: qt5-qtbase-devel-5.15.3-1.fc36.x86_64 + + - name: "fedora:38" + deps: + gcc-13.2.1-1.fc38.x86_64 + gcc-c++-13.2.1-1.fc38.x86_64 + cmake-3.26.2-1.fc38.x86_64 + openssl-devel-1:3.0.9-2.fc38.x86_64 + qt: qt5-qtbase-devel-5.15.10-1.fc38.x86_64 component: [ cli, gui ] include: - component: cli build-opts: --cli --no-gui -t Release --pkg-type rpm - component: gui build-opts: --no-cli --gui -t Release --pkg-type rpm - name: RPM ${{matrix.container}} (${{matrix.component}}) + name: RPM ${{matrix.container.name}} (${{matrix.component}}) runs-on: ubuntu-latest - container: ${{ matrix.container}} + container: ${{ matrix.container.name }} steps: - uses: actions/checkout@v3 - name: Dependancies run: | - sudo dnf install -y util-linux rpmdevtools git \ - gcc-12.2.1-4.fc36.x86_64 \ - gcc-c++-12.2.1-4.fc36.x86_64 \ - cmake-3.26.3-1.fc36.x86_64 \ - openssl1.1-devel-1.1.1q-1.fc36.x86_64 + sudo dnf install -y util-linux rpmdevtools git ${{ matrix.container.deps }} - name: Qt if: startsWith(matrix.component, 'gui') shell: bash run: | - sudo dnf install -y qt5-qtbase-devel-5.15.3-1.fc36.x86_64 + sudo dnf install -y ${{ matrix.container.qt }} - name: Package id: package From 2874862d704c0d9756aed1e453e7652f7f24eabf Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 17 Aug 2023 16:55:05 +0200 Subject: [PATCH 53/57] .github/workflows/package.yml: Package for fedora 37 --- .github/workflows/package.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index fc409df..e2609f5 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -63,6 +63,14 @@ jobs: openssl1.1-devel-1.1.1q-1.fc36.x86_64 qt: qt5-qtbase-devel-5.15.3-1.fc36.x86_64 + - name: "fedora:37" + deps: + gcc-12.3.1-1.fc37.x86_64 + gcc-c++-12.3.1-1.fc37.x86_64 + cmake-3.27.1-1.fc37.x86_64 + openssl-devel-3.0.9-1.fc37.x86_64 + qt: qt5-qtbase-devel-5.15.9-3.fc37.x86_64 + - name: "fedora:38" deps: gcc-13.2.1-1.fc38.x86_64 From 8949a80b1164f65ec14e3ef05298bfb79d93127f Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 17 Aug 2023 17:14:26 +0200 Subject: [PATCH 54/57] .github/workflows/package.yml: set-output command to environment variables. --- .github/workflows/package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index e2609f5..48dd58c 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -147,8 +147,8 @@ jobs: run: | cmake --build build --config Release --target package $FILE=(ls build/*.exe) - echo "::set-output name=filename::$FILE" - echo "::set-output name=name::$(([io.fileinfo]"$FILE").basename).exe" + echo "filename=$FILE" >> "$GITHUB_OUTPUT" + echo "name=$(([io.fileinfo]"$FILE").basename)" >> "$GITHUB_OUTPUT" - name: Upload uses: actions/upload-release-asset@v1 From 7e8b1d6e664a423ffae337bba10d127498b587e1 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Fri, 25 Aug 2023 12:38:34 +0200 Subject: [PATCH 55/57] README.md: fix link to CI tests. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bf10612..5609aa3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -![](https://github.com/eosswedenorg/antelope-keygen/workflows/CI/badge.svg) +[![CI Test](https://github.com/eosswedenorg/antelope-keygen/workflows/CI/badge.svg)](https://github.com/eosswedenorg/antelope-keygen/actions) [![GitHub release](https://img.shields.io/github/v/release/eosswedenorg/antelope-keygen?include_prereleases)](https://github.com/eosswedenorg/antelope-keygen/releases/latest) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) From 24136406a75a2661dfa16d0e33ec6c2158533229 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Fri, 25 Aug 2023 12:41:19 +0200 Subject: [PATCH 56/57] .github/workflows/package.yml: for ubuntu, use matrix includes for qt package instead of the if/else in bash. --- .github/workflows/package.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 48dd58c..3c5f738 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -12,6 +12,10 @@ jobs: os: [ ubuntu-20.04, ubuntu-22.04 ] component: [ cli, gui ] include: + - os: ubuntu-20.04 + qt: qt5-default=5.12.8+dfsg-0ubuntu2.1 + - os: ubuntu-22.04 + qt: qtbase5-dev=5.15.3+dfsg-2ubuntu0.2 - component: cli build-opts: --cli --no-gui -t Release --pkg-type deb - component: gui @@ -26,11 +30,7 @@ jobs: shell: bash run: | sudo apt-get update - if [ "${{matrix.os}}" == "ubuntu-22.04" ]; then - sudo apt-get install qtbase5-dev=5.15.3+dfsg-2ubuntu0.2 - else : - sudo apt-get install qt5-default=5.12.8+dfsg-0ubuntu2.1 - fi + sudo apt-get install ${{matrix.qt}} - name: Package id: package From 6c4769a0303cd40778b031360c96da1d0636deac Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sun, 27 Aug 2023 14:19:35 +0200 Subject: [PATCH 57/57] .github/workflows/package.yml: fix qt5 package for fedora 38 --- .github/workflows/package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 3c5f738..30106ea 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -77,7 +77,7 @@ jobs: gcc-c++-13.2.1-1.fc38.x86_64 cmake-3.26.2-1.fc38.x86_64 openssl-devel-1:3.0.9-2.fc38.x86_64 - qt: qt5-qtbase-devel-5.15.10-1.fc38.x86_64 + qt: qt5-qtbase-devel-5.15.10-5.fc38.x86_64 component: [ cli, gui ] include: - component: cli