Skip to content

Commit

Permalink
release: v0.7.0-arduino (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
faustbrian authored Oct 9, 2019
2 parents 6cbc2a4 + 86cc685 commit 331fbcd
Show file tree
Hide file tree
Showing 101 changed files with 2,099 additions and 2,099 deletions.
20 changes: 0 additions & 20 deletions .circleci/config.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .circleci/install_arduino.sh

This file was deleted.

10 changes: 0 additions & 10 deletions .circleci/script_arduino.sh

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/arduino.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Arduino

on:
push:
branches:
- "**"
pull_request:
types: [ready_for_review, synchronize, opened] # fix: synchronize triggers builds for PR merges with the base branch, currently causes duplicate builds as synchronize is treated the same as push for everything besides merges

jobs:
arduino:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Install Dependencies
run: |
sudo apt-get install bzip2
yes | sudo apt install python-pip
pip install pyserial
pip install --upgrade pip
wget -O arduino-cli-linux64.tar.bz2 https://github.com/arduino/arduino-cli/releases/download/0.3.3-alpha.preview/arduino-cli-0.3.3-alpha.preview-linux64.tar.bz2
bunzip2 arduino-cli-linux64.tar.bz2
tar xvf arduino-cli-linux64.tar
sudo mv arduino-cli-0.3.3-alpha.preview-linux64 /usr/local/share/arduino-cli
sudo ln -s /usr/local/share/arduino-cli /usr/local/bin/arduino-cli
printf "board_manager:
additional_urls:
- https://dl.espressif.com/dl/package_esp32_index.json" >> .cli-config.yml
sudo mv .cli-config.yml /usr/local/share/
arduino-cli core update-index
arduino-cli core install esp32:esp32
- name: Build Arduino Sketch
run: |
mkdir -p ~/Arduino/libraries/cpp-crypto/
mv ${GITHUB_WORKSPACE}/* ~/Arduino/libraries/cpp-crypto/
arduino-cli lib install "[email protected]"
arduino-cli lib install "[email protected]"
arduino-cli lib install "[email protected]"
arduino-cli compile --output temp.bin -b esp32:esp32:esp32 ~/Arduino/libraries/cpp-crypto/examples/ESP32/ESP32.ino --debug
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@

/.circleci
/.vscode
.DS_Store
124 changes: 67 additions & 57 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,108 +5,118 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.6.0-arduino] - 2019-07-16
## [0.7.0-arduino] - 2019-10-08

### Changed
- improved coverage and formatting ([#121])
- refactored utils implementation ([#133])
- refactored Identities implementation. ([#120])
- moved external libraries out of source tree ([#156])

## [0.6.0] - 2019-07-16

### Added
## [0.6.0-arduino] - 2019-07-16

- added Bridgechain support ([#105])
### Added
- added Bridgechain support ([#105])

### Changed

- changed amount and fee Json serialization to match Core v.2.5 ([#111])
- improved PlatformIO configuration ([#101])
- improved formatting and maintainability ([#98])
- improved Slots implementations ([#92])
- changed amount and fee Json serialization to match Core v.2.5 ([#111])
- improved PlatformIO configuration ([#101])
- improved formatting and maintainability ([#98])
- improved Slots implementations ([#92])

### Fixed

- fixed Transaction Json numeric serialization ([#103])
- fixed Transaction Json numeric serialization ([#103])

## [0.5.0] - 2019-02-20

### Changed

- removed bip39 and mnemonic feature ([#86])
- removed bip39 and mnemonic feature ([#86])

## [0.4.0] - 2019-05-20

### Changed

- changed to BIP66 lib for DER ser/des. ([#88])
- updated vendorField to support 255 bytes in Core v2.4 ([#84])
- updated ArduinoJson package to version v.6.10.0 ([#76])
- updated tests to use Core fixtures ([#74])
- improved Windows support ([#83])
- changed to BIP66 lib for DER ser/des ([#88])
- updated vendorField to support 255 bytes in Core v2.4 ([#84])
- updated ArduinoJson package to version v.6.10.0 ([#76])
- updated tests to use Core fixtures ([#74])
- improved Windows support ([#83])

### Fixed

- properly handle 0 ARKtoshi Transaction amounts. ([#85])
- properly handle 0 ARKtoshi Transaction amounts ([#85])

## [0.3.1] - 2019-02-19

### Fixed

- fixed PIO submodule ignore paths in `./platformio.ini` ([#70])
- added `./src/lib` to build flags for PIO in `./library.json` ([#69])
- fixed PIO submodule ignore paths in `./platformio.ini` ([#70])
- added `./src/lib` to build flags for PIO in `./library.json` ([#69])

## [0.3.0] - 2019-02-16

## [0.3.0-arduino] - 2019-02-16

### Added

- Arduino CircleCI config ([#61])
- Arduino CircleCI config ([#61])

### Changed

- updated `keywords.txt` ([#64])
- updated `./library.json` package export settings ([#64])
- removed unnecessary files ([#64]):
- `./appveyor.yml`.
- `./CMakeSettings.json`.
- `./test/travis.yml`.
- `uECC_README.md`.
- submodule from `cmake_example`.
- moved external packages to `./src/lib/` ([#64]):
- `./src/bcl`.
- `./src/rfc6979`.
- `./src/stl`.
- `./date`.
- moved `./docs` to `./extras` in arduino builds ([#64])
- updated `ARDUINO_IDE.sh` script to reflect `lib/` changes ([#64])
- automated `ARDUINO_IDE.sh` script ([#60])
- updated `keywords.txt` ([#64])
- updated `./library.json` package export settings ([#64])
- removed unnecessary files and external packages to `./src/lib/` ([#64])
- moved `./docs` to `./extras` in arduino builds ([#64])
- updated `ARDUINO_IDE.sh` script to reflect `lib/` changes ([#64])
- automated `ARDUINO_IDE.sh` script ([#60])

## [0.2.0] - 2019-02-07

### Added

- Added `toJson()` method to `Transaction` class ([#54])
- Added `ArduinoJson` dependency and Arduino Sketch paths to `library.json` ([#55])
- Added `toJson()` method to `Transaction` class ([#54])
- Added `ArduinoJson` dependency and Arduino Sketch paths to `library.json` ([#55])

### Changed

- Removed unused Arduino Adapter Header ([#50])
- Renamed `Helpers` class to avoid naming collision with Cpp-Client `Helpers` ([#51])
- Refactored Timestamps & `Slots` to use milliseconds and avoid integer overflow ([#53])
- Removed unused Arduino Adapter Header ([#50])
- Renamed `Helpers` class to avoid naming collision with Cpp-Client `Helpers` ([#51])
- Refactored Timestamps & `Slots` to use milliseconds and avoid integer overflow ([#53])

### Fixed
- Fixed the way the Arduino IDE Script restores converted directories ([#49])
- Corrected PIO Builds to determine dependency versions explicitly ([#52])

- Fixed the way the Arduino IDE Script restores converted directories ([#49])
- Corrected PIO Builds to determine dependency versions explicitly ([#52])

[unreleased]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.2.0...develop
[0.2.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.1.0..0.2.0
[#54]: https://github.com/ArkEcosystem/cpp-crypto/pull/54
[#55]: https://github.com/ArkEcosystem/cpp-crypto/pull/55
[#49]: https://github.com/ArkEcosystem/cpp-crypto/pull/49
[#50]: https://github.com/ArkEcosystem/cpp-crypto/pull/50
[#51]: https://github.com/ArkEcosystem/cpp-crypto/pull/51
[#49]: https://github.com/ArkEcosystem/cpp-crypto/pull/49
[#52]: https://github.com/ArkEcosystem/cpp-crypto/pull/52
[#53]: https://github.com/ArkEcosystem/cpp-crypto/pull/53
[#54]: https://github.com/ArkEcosystem/cpp-crypto/pull/54
[#55]: https://github.com/ArkEcosystem/cpp-crypto/pull/55
[0.2.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.1.0...0.2.0
[#60]: https://github.com/ArkEcosystem/cpp-crypto/pull/60
[#61]: https://github.com/ArkEcosystem/cpp-crypto/pull/61
[#64]: https://github.com/ArkEcosystem/cpp-crypto/pull/64
[0.3.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.2.0...0.3.0
[0.3.0-arduino]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.3.0-arduino
[#69]: https://github.com/ArkEcosystem/cpp-crypto/pull/69
[#70]: https://github.com/ArkEcosystem/cpp-crypto/pull/70
[0.3.1]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.3.0...0.3.1
[#74]: https://github.com/ArkEcosystem/cpp-crypto/pull/74
[#76]: https://github.com/ArkEcosystem/cpp-crypto/pull/76
[#83]: https://github.com/ArkEcosystem/cpp-crypto/pull/83
[#84]: https://github.com/ArkEcosystem/cpp-crypto/pull/84
[#85]: https://github.com/ArkEcosystem/cpp-crypto/pull/85
[#88]: https://github.com/ArkEcosystem/cpp-crypto/pull/88
[0.4.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.3.1...0.4.0
[#86]: https://github.com/ArkEcosystem/cpp-crypto/pull/86
[0.5.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.4.0...0.5.0
[#92]: https://github.com/ArkEcosystem/cpp-crypto/pull/92
[#98]: https://github.com/ArkEcosystem/cpp-crypto/pull/98
[#101]: https://github.com/ArkEcosystem/cpp-crypto/pull/101
[#103]: https://github.com/ArkEcosystem/cpp-crypto/pull/103
[#105]: https://github.com/ArkEcosystem/cpp-crypto/pull/105
[#111]: https://github.com/ArkEcosystem/cpp-crypto/pull/111
[0.6.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.5.0...0.6.0
[0.6.0-arduino]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.5.0-arduino...0.6.0-arduino
[#120]: https://github.com/ArkEcosystem/cpp-crypto/pull/120
[#121]: https://github.com/ArkEcosystem/cpp-crypto/pull/121
[#133]: https://github.com/ArkEcosystem/cpp-crypto/pull/133
[#156]: https://github.com/ArkEcosystem/cpp-crypto/pull/156
[0.7.0-arduino]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.6.0-arduino...0.7.0-arduino
12 changes: 9 additions & 3 deletions examples/ESP32/ESP32.ino
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
#include <arkCrypto.h>
/**/

/**
* This is a small hex helper header included in ARK Cpp-Crypto
*/
#include "utils/hex.hpp"
/**/

/****************************************/

void checkCrypto() {
Expand Down Expand Up @@ -134,7 +140,7 @@ void checkCrypto() {
*/
const auto passphrase4 = "this is a top secret passphrase";
const uint8_t wifByte = 0xaa;
WIF wifFromPassphrase = WIF::fromPassphrase(passphrase4, wifByte);
Wif wifFromPassphrase = Wif::fromPassphrase(passphrase4, wifByte);
Serial.print("\nWIF from Passphrase: ");
Serial.println(wifFromPassphrase.toString().c_str()); // the 'WIF' object is a type. Use 'toString()' to view the output. Arduino requires a 'c_str()' to 'print'.
/**/
Expand All @@ -151,10 +157,10 @@ void checkCrypto() {
*/
const auto text = "Hello World";
const auto passphrase5 = "this is a top secret passphrase";
Ark::Crypto::Utils::Message message;
Ark::Crypto::Message message;
message.sign(text, passphrase5);
Serial.print("\nSignature from Signed Message: ");
Serial.println(BytesToHex(message.signature).c_str()); // the 'message.signature' is a byte-array. Use 'BytesToHex()' to view the output. Arduino requires a 'c_str()' to 'print'.
Serial.println(BytesToHex(message.signature).c_str());
// Additionally, you can verify the message.
bool isValid = message.verify();
Serial.print("\nSigned Message Signature is Verified: ");
Expand Down
2 changes: 1 addition & 1 deletion examples/ESP8266/ESP8266.ino
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void checkCrypto() {
*/
const auto passphrase4 = "this is a top secret passphrase";
const uint8_t wifByte = 0xaa;
WIF wifFromPassphrase = WIF::fromPassphrase(passphrase4, wifByte);
Wif wifFromPassphrase = Wif::fromPassphrase(passphrase4, wifByte);
Serial.print("\nWIF from Passphrase: ");
Serial.println(wifFromPassphrase.toString().c_str()); // the 'WIF' object is a type. Use 'toString()' to view the output. Arduino requires a 'c_str()' to 'print'.
/**/
Expand Down
Loading

0 comments on commit 331fbcd

Please sign in to comment.