Skip to content

Commit 331fbcd

Browse files
authored
release: v0.7.0-arduino (#157)
2 parents 6cbc2a4 + 86cc685 commit 331fbcd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+2099
-2099
lines changed

.circleci/config.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.circleci/install_arduino.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

.circleci/script_arduino.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/arduino.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Arduino
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
pull_request:
8+
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
9+
10+
jobs:
11+
arduino:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: Install Dependencies
17+
run: |
18+
sudo apt-get install bzip2
19+
yes | sudo apt install python-pip
20+
pip install pyserial
21+
pip install --upgrade pip
22+
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
23+
bunzip2 arduino-cli-linux64.tar.bz2
24+
tar xvf arduino-cli-linux64.tar
25+
sudo mv arduino-cli-0.3.3-alpha.preview-linux64 /usr/local/share/arduino-cli
26+
sudo ln -s /usr/local/share/arduino-cli /usr/local/bin/arduino-cli
27+
printf "board_manager:
28+
additional_urls:
29+
- https://dl.espressif.com/dl/package_esp32_index.json" >> .cli-config.yml
30+
sudo mv .cli-config.yml /usr/local/share/
31+
arduino-cli core update-index
32+
arduino-cli core install esp32:esp32
33+
- name: Build Arduino Sketch
34+
run: |
35+
mkdir -p ~/Arduino/libraries/cpp-crypto/
36+
mv ${GITHUB_WORKSPACE}/* ~/Arduino/libraries/cpp-crypto/
37+
arduino-cli lib install "ArduinoJson@6.12.0"
38+
arduino-cli lib install "BIP66@0.2.0"
39+
arduino-cli lib install "micro-ecc@1.0.0"
40+
arduino-cli compile --output temp.bin -b esp32:esp32:esp32 ~/Arduino/libraries/cpp-crypto/examples/ESP32/ESP32.ino --debug

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11

2-
/.circleci
3-
/.vscode
42
.DS_Store

CHANGELOG.md

Lines changed: 67 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -5,108 +5,118 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8-
## [0.6.0-arduino] - 2019-07-16
8+
## [0.7.0-arduino] - 2019-10-08
9+
10+
### Changed
11+
- improved coverage and formatting ([#121])
12+
- refactored utils implementation ([#133])
13+
- refactored Identities implementation. ([#120])
14+
- moved external libraries out of source tree ([#156])
915

1016
## [0.6.0] - 2019-07-16
1117

12-
### Added
18+
## [0.6.0-arduino] - 2019-07-16
1319

14-
- added Bridgechain support ([#105])
20+
### Added
21+
- added Bridgechain support ([#105])
1522

1623
### Changed
17-
18-
- changed amount and fee Json serialization to match Core v.2.5 ([#111])
19-
- improved PlatformIO configuration ([#101])
20-
- improved formatting and maintainability ([#98])
21-
- improved Slots implementations ([#92])
24+
- changed amount and fee Json serialization to match Core v.2.5 ([#111])
25+
- improved PlatformIO configuration ([#101])
26+
- improved formatting and maintainability ([#98])
27+
- improved Slots implementations ([#92])
2228

2329
### Fixed
24-
25-
- fixed Transaction Json numeric serialization ([#103])
30+
- fixed Transaction Json numeric serialization ([#103])
2631

2732
## [0.5.0] - 2019-02-20
2833

2934
### Changed
30-
31-
- removed bip39 and mnemonic feature ([#86])
35+
- removed bip39 and mnemonic feature ([#86])
3236

3337
## [0.4.0] - 2019-05-20
3438

3539
### Changed
36-
37-
- changed to BIP66 lib for DER ser/des. ([#88])
38-
- updated vendorField to support 255 bytes in Core v2.4 ([#84])
39-
- updated ArduinoJson package to version v.6.10.0 ([#76])
40-
- updated tests to use Core fixtures ([#74])
41-
- improved Windows support ([#83])
40+
- changed to BIP66 lib for DER ser/des ([#88])
41+
- updated vendorField to support 255 bytes in Core v2.4 ([#84])
42+
- updated ArduinoJson package to version v.6.10.0 ([#76])
43+
- updated tests to use Core fixtures ([#74])
44+
- improved Windows support ([#83])
4245

4346
### Fixed
44-
45-
- properly handle 0 ARKtoshi Transaction amounts. ([#85])
47+
- properly handle 0 ARKtoshi Transaction amounts ([#85])
4648

4749
## [0.3.1] - 2019-02-19
4850

4951
### Fixed
50-
51-
- fixed PIO submodule ignore paths in `./platformio.ini` ([#70])
52-
- added `./src/lib` to build flags for PIO in `./library.json` ([#69])
52+
- fixed PIO submodule ignore paths in `./platformio.ini` ([#70])
53+
- added `./src/lib` to build flags for PIO in `./library.json` ([#69])
5354

5455
## [0.3.0] - 2019-02-16
5556

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

5859
### Added
59-
60-
- Arduino CircleCI config ([#61])
60+
- Arduino CircleCI config ([#61])
6161

6262
### Changed
63-
64-
- updated `keywords.txt` ([#64])
65-
- updated `./library.json` package export settings ([#64])
66-
- removed unnecessary files ([#64]):
67-
- `./appveyor.yml`.
68-
- `./CMakeSettings.json`.
69-
- `./test/travis.yml`.
70-
- `uECC_README.md`.
71-
- submodule from `cmake_example`.
72-
- moved external packages to `./src/lib/` ([#64]):
73-
- `./src/bcl`.
74-
- `./src/rfc6979`.
75-
- `./src/stl`.
76-
- `./date`.
77-
- moved `./docs` to `./extras` in arduino builds ([#64])
78-
- updated `ARDUINO_IDE.sh` script to reflect `lib/` changes ([#64])
79-
- automated `ARDUINO_IDE.sh` script ([#60])
63+
- updated `keywords.txt` ([#64])
64+
- updated `./library.json` package export settings ([#64])
65+
- removed unnecessary files and external packages to `./src/lib/` ([#64])
66+
- moved `./docs` to `./extras` in arduino builds ([#64])
67+
- updated `ARDUINO_IDE.sh` script to reflect `lib/` changes ([#64])
68+
- automated `ARDUINO_IDE.sh` script ([#60])
8069

8170
## [0.2.0] - 2019-02-07
8271

8372
### Added
84-
85-
- Added `toJson()` method to `Transaction` class ([#54])
86-
- Added `ArduinoJson` dependency and Arduino Sketch paths to `library.json` ([#55])
73+
- Added `toJson()` method to `Transaction` class ([#54])
74+
- Added `ArduinoJson` dependency and Arduino Sketch paths to `library.json` ([#55])
8775

8876
### Changed
89-
90-
- Removed unused Arduino Adapter Header ([#50])
91-
- Renamed `Helpers` class to avoid naming collision with Cpp-Client `Helpers` ([#51])
92-
- Refactored Timestamps & `Slots` to use milliseconds and avoid integer overflow ([#53])
77+
- Removed unused Arduino Adapter Header ([#50])
78+
- Renamed `Helpers` class to avoid naming collision with Cpp-Client `Helpers` ([#51])
79+
- Refactored Timestamps & `Slots` to use milliseconds and avoid integer overflow ([#53])
9380

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

96-
- Fixed the way the Arduino IDE Script restores converted directories ([#49])
97-
- Corrected PIO Builds to determine dependency versions explicitly ([#52])
98-
99-
[unreleased]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.2.0...develop
100-
[0.2.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.1.0..0.2.0
101-
[#54]: https://github.com/ArkEcosystem/cpp-crypto/pull/54
102-
[#55]: https://github.com/ArkEcosystem/cpp-crypto/pull/55
85+
[#49]: https://github.com/ArkEcosystem/cpp-crypto/pull/49
10386
[#50]: https://github.com/ArkEcosystem/cpp-crypto/pull/50
10487
[#51]: https://github.com/ArkEcosystem/cpp-crypto/pull/51
105-
[#49]: https://github.com/ArkEcosystem/cpp-crypto/pull/49
10688
[#52]: https://github.com/ArkEcosystem/cpp-crypto/pull/52
10789
[#53]: https://github.com/ArkEcosystem/cpp-crypto/pull/53
90+
[#54]: https://github.com/ArkEcosystem/cpp-crypto/pull/54
91+
[#55]: https://github.com/ArkEcosystem/cpp-crypto/pull/55
92+
[0.2.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.1.0...0.2.0
10893
[#60]: https://github.com/ArkEcosystem/cpp-crypto/pull/60
10994
[#61]: https://github.com/ArkEcosystem/cpp-crypto/pull/61
11095
[#64]: https://github.com/ArkEcosystem/cpp-crypto/pull/64
96+
[0.3.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.2.0...0.3.0
97+
[0.3.0-arduino]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.3.0-arduino
11198
[#69]: https://github.com/ArkEcosystem/cpp-crypto/pull/69
11299
[#70]: https://github.com/ArkEcosystem/cpp-crypto/pull/70
100+
[0.3.1]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.3.0...0.3.1
101+
[#74]: https://github.com/ArkEcosystem/cpp-crypto/pull/74
102+
[#76]: https://github.com/ArkEcosystem/cpp-crypto/pull/76
103+
[#83]: https://github.com/ArkEcosystem/cpp-crypto/pull/83
104+
[#84]: https://github.com/ArkEcosystem/cpp-crypto/pull/84
105+
[#85]: https://github.com/ArkEcosystem/cpp-crypto/pull/85
106+
[#88]: https://github.com/ArkEcosystem/cpp-crypto/pull/88
107+
[0.4.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.3.1...0.4.0
108+
[#86]: https://github.com/ArkEcosystem/cpp-crypto/pull/86
109+
[0.5.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.4.0...0.5.0
110+
[#92]: https://github.com/ArkEcosystem/cpp-crypto/pull/92
111+
[#98]: https://github.com/ArkEcosystem/cpp-crypto/pull/98
112+
[#101]: https://github.com/ArkEcosystem/cpp-crypto/pull/101
113+
[#103]: https://github.com/ArkEcosystem/cpp-crypto/pull/103
114+
[#105]: https://github.com/ArkEcosystem/cpp-crypto/pull/105
115+
[#111]: https://github.com/ArkEcosystem/cpp-crypto/pull/111
116+
[0.6.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.5.0...0.6.0
117+
[0.6.0-arduino]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.5.0-arduino...0.6.0-arduino
118+
[#120]: https://github.com/ArkEcosystem/cpp-crypto/pull/120
119+
[#121]: https://github.com/ArkEcosystem/cpp-crypto/pull/121
120+
[#133]: https://github.com/ArkEcosystem/cpp-crypto/pull/133
121+
[#156]: https://github.com/ArkEcosystem/cpp-crypto/pull/156
122+
[0.7.0-arduino]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.6.0-arduino...0.7.0-arduino

examples/ESP32/ESP32.ino

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
#include <arkCrypto.h>
2929
/**/
3030

31+
/**
32+
* This is a small hex helper header included in ARK Cpp-Crypto
33+
*/
34+
#include "utils/hex.hpp"
35+
/**/
36+
3137
/****************************************/
3238

3339
void checkCrypto() {
@@ -134,7 +140,7 @@ void checkCrypto() {
134140
*/
135141
const auto passphrase4 = "this is a top secret passphrase";
136142
const uint8_t wifByte = 0xaa;
137-
WIF wifFromPassphrase = WIF::fromPassphrase(passphrase4, wifByte);
143+
Wif wifFromPassphrase = Wif::fromPassphrase(passphrase4, wifByte);
138144
Serial.print("\nWIF from Passphrase: ");
139145
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'.
140146
/**/
@@ -151,10 +157,10 @@ void checkCrypto() {
151157
*/
152158
const auto text = "Hello World";
153159
const auto passphrase5 = "this is a top secret passphrase";
154-
Ark::Crypto::Utils::Message message;
160+
Ark::Crypto::Message message;
155161
message.sign(text, passphrase5);
156162
Serial.print("\nSignature from Signed Message: ");
157-
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'.
163+
Serial.println(BytesToHex(message.signature).c_str());
158164
// Additionally, you can verify the message.
159165
bool isValid = message.verify();
160166
Serial.print("\nSigned Message Signature is Verified: ");

examples/ESP8266/ESP8266.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ void checkCrypto() {
133133
*/
134134
const auto passphrase4 = "this is a top secret passphrase";
135135
const uint8_t wifByte = 0xaa;
136-
WIF wifFromPassphrase = WIF::fromPassphrase(passphrase4, wifByte);
136+
Wif wifFromPassphrase = Wif::fromPassphrase(passphrase4, wifByte);
137137
Serial.print("\nWIF from Passphrase: ");
138138
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'.
139139
/**/

0 commit comments

Comments
 (0)