Skip to content

Commit 6171bef

Browse files
authored
Merge pull request #225 from ArkEcosystem/release/1.1.0
release: 1.1.0
2 parents f06376c + 44d47f7 commit 6171bef

Some content is hidden

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

70 files changed

+512
-539
lines changed

.codacy.yml

-4
This file was deleted.

.codeclimate.yml

-16
This file was deleted.

.github/workflows/codeclimate.yml

-35
This file was deleted.

.github/workflows/test/clang_format.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -ex
1+
#!/usr/bin/env bash
22

33
grep -nr '\s$' src test .gitignore 2>&1 > /dev/null
44
if $?; then

CHANGELOG.md

+29-28
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,41 @@ 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-
## [1.0.0] - 2020-02-13
8+
## [1.1.0] - 2020-03-06
99

10-
## [1.0.0-arduino] - 2020-02-13
10+
### Added
11+
- added Delegate Resignation Builder and Tests ([#207])
1112

1213
### Changed
13-
- break up unit tests to support platforms with limited RAM ([#172])
14-
- removed use of monolithic `arkCrypto.h` header ([#190])
14+
- improved transaction builder ([#215])
15+
- improved building as a project dependency ([#206])
16+
17+
### Fixed
18+
- make htlc claim secret a 32-byte hash ([#212])
19+
20+
## [1.0.0] - 2020-02-13
1521

1622
### Added
1723
- added AIP-11 support for Core v.2.6 Transactions ([#198])
1824

25+
### Changed
26+
- removed use of monolithic `arkCrypto.h` header ([#190])
27+
- break up unit tests to support platforms with limited RAM ([#172])
28+
1929
### Fixed
20-
- fixed `transaction::to_array` tests on ESP8266 ([#178])
2130
- fixed `transaction::to_json` tests on ESP8266 ([#180])
31+
- fixed `transaction::to_array` tests on ESP8266 ([#178])
2232

2333
## [0.7.0] - 2019-10-08
2434

25-
## [0.7.0-arduino] - 2019-10-08
26-
2735
### Changed
28-
- improved coverage and formatting ([#121])
36+
- moved external libraries out of source tree ([#156])
2937
- refactored utils implementation ([#133])
38+
- improved coverage and formatting ([#121])
3039
- refactored Identities implementation. ([#120])
31-
- moved external libraries out of source tree ([#156])
3240

3341
## [0.6.0] - 2019-07-16
3442

35-
## [0.6.0-arduino] - 2019-07-16
36-
3743
### Added
3844
- added Bridgechain support ([#105])
3945

@@ -56,9 +62,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
5662
### Changed
5763
- changed to BIP66 lib for DER ser/des ([#88])
5864
- updated vendorField to support 255 bytes in Core v2.4 ([#84])
65+
- improved Windows support ([#83])
5966
- updated ArduinoJson package to version v.6.10.0 ([#76])
6067
- updated tests to use Core fixtures ([#74])
61-
- improved Windows support ([#83])
6268

6369
### Fixed
6470
- properly handle 0 ARKtoshi Transaction amounts ([#85])
@@ -71,33 +77,27 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7177

7278
## [0.3.0] - 2019-02-16
7379

74-
## [0.3.0-arduino] - 2019-02-16
75-
7680
### Added
7781
- Arduino CircleCI config ([#61])
7882

7983
### Changed
80-
- updated `keywords.txt` ([#64])
81-
- updated `./library.json` package export settings ([#64])
82-
- removed unnecessary files and external packages to `./src/lib/` ([#64])
83-
- moved `./docs` to `./extras` in arduino builds ([#64])
84-
- updated `ARDUINO_IDE.sh` script to reflect `lib/` changes ([#64])
84+
- updated Arduino-related files ([#64])
8585
- automated `ARDUINO_IDE.sh` script ([#60])
8686

8787
## [0.2.0] - 2019-02-07
8888

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

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

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

102102
[#49]: https://github.com/ArkEcosystem/cpp-crypto/pull/49
103103
[#50]: https://github.com/ArkEcosystem/cpp-crypto/pull/50
@@ -111,7 +111,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
111111
[#61]: https://github.com/ArkEcosystem/cpp-crypto/pull/61
112112
[#64]: https://github.com/ArkEcosystem/cpp-crypto/pull/64
113113
[0.3.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.2.0...0.3.0
114-
[0.3.0-arduino]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.3.0-arduino
115114
[#69]: https://github.com/ArkEcosystem/cpp-crypto/pull/69
116115
[#70]: https://github.com/ArkEcosystem/cpp-crypto/pull/70
117116
[0.3.1]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.3.0...0.3.1
@@ -131,17 +130,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
131130
[#105]: https://github.com/ArkEcosystem/cpp-crypto/pull/105
132131
[#111]: https://github.com/ArkEcosystem/cpp-crypto/pull/111
133132
[0.6.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.5.0...0.6.0
134-
[0.6.0-arduino]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.3.0-arduino...0.6.0-arduino
135133
[#120]: https://github.com/ArkEcosystem/cpp-crypto/pull/120
136134
[#121]: https://github.com/ArkEcosystem/cpp-crypto/pull/121
137135
[#133]: https://github.com/ArkEcosystem/cpp-crypto/pull/133
138136
[#156]: https://github.com/ArkEcosystem/cpp-crypto/pull/156
139137
[0.7.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.6.0...0.7.0
140-
[0.7.0-arduino]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.6.0-arduino...0.7.0-arduino
141138
[#172]: https://github.com/ArkEcosystem/cpp-crypto/pull/172
142139
[#178]: https://github.com/ArkEcosystem/cpp-crypto/pull/178
143140
[#180]: https://github.com/ArkEcosystem/cpp-crypto/pull/180
144141
[#190]: https://github.com/ArkEcosystem/cpp-crypto/pull/190
145142
[#198]: https://github.com/ArkEcosystem/cpp-crypto/pull/198
146-
[1.0.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.7.0-arduino...1.0.0
147-
[1.0.0-arduino]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.7.0-arduino...1.0.0-arduino
143+
[1.0.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/0.7.0...1.0.0
144+
[#206]: https://github.com/ArkEcosystem/cpp-crypto/pull/206
145+
[#207]: https://github.com/ArkEcosystem/cpp-crypto/pull/207
146+
[#212]: https://github.com/ArkEcosystem/cpp-crypto/pull/212
147+
[#215]: https://github.com/ArkEcosystem/cpp-crypto/pull/215
148+
[1.1.0]: https://github.com/ArkEcosystem/cpp-crypto/compare/1.0.0...1.1.0

build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
rm -dfr build
44
mkdir build

cmake/External.cmake

+8-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# ------------------------------------------------------------------------------
55

66
# Copy the configuration
7-
configure_file(${CMAKE_SOURCE_DIR}/cmake/extern/ArduinoJson.txt.in
7+
configure_file(${CMAKE_INSTALL_PREFIX}/cmake/extern/ArduinoJson.txt.in
88
${EXTERNAL_LIBRARY_DIR}/arduinojson/CMakeLists.txt)
99

1010
# Configure the Cmake build
@@ -38,7 +38,7 @@ include_directories(${ARDUINO_JSON_SOURCE_DIR})
3838
# ------------------------------------------------------------------------------
3939

4040
# Copy the configuration
41-
configure_file(${CMAKE_SOURCE_DIR}/cmake/extern/BCL.txt.in
41+
configure_file(${CMAKE_INSTALL_PREFIX}/cmake/extern/BCL.txt.in
4242
${EXTERNAL_LIBRARY_DIR}/bcl/CMakeLists.txt)
4343

4444
# Configure the Cmake build
@@ -81,7 +81,7 @@ include_directories(${EXTERNAL_LIBRARY_DIR}/bcl/src/src)
8181
# ------------------------------------------------------------------------------
8282

8383
# Copy the configuration
84-
configure_file(${CMAKE_SOURCE_DIR}/cmake/extern/BIP66.txt.in
84+
configure_file(${CMAKE_INSTALL_PREFIX}/cmake/extern/BIP66.txt.in
8585
${EXTERNAL_LIBRARY_DIR}/bip66/CMakeLists.txt)
8686

8787
# Configure the Cmake build
@@ -115,7 +115,7 @@ include_directories(${EXTERNAL_LIBRARY_DIR}/bip66/src/)
115115
# ------------------------------------------------------------------------------
116116

117117
# Copy the configuration
118-
configure_file(${CMAKE_SOURCE_DIR}/cmake/extern/uECC.txt.in
118+
configure_file(${CMAKE_INSTALL_PREFIX}/cmake/extern/uECC.txt.in
119119
${EXTERNAL_LIBRARY_DIR}/uecc/CMakeLists.txt)
120120

121121
# Configure the Cmake build
@@ -158,4 +158,8 @@ set(EXTERNAL_LIBRARY_SOURCE
158158
${UECC_SOURCE}
159159
CACHE INTERNAL "External Lib Binary Files")
160160

161+
set(EXTERNAL_LIBRARY_INCLUDE
162+
${ARDUINO_JSON_SOURCE_DIR}
163+
CACHE INTERNAL "External Lib Include Dirs")
164+
161165
# ------------------------------------------------------------------------------

docs/INSTALL_ARDUINO.MD

+2-2
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,12 @@ void createBridgechainTransaction() {
237237
const Configuration cfg(BridgechainNetwork);
238238

239239
// Use the Transaction Builder to make a transaction.
240-
const auto bridgechainTransaction = builder::Transfer()
240+
const auto bridgechainTransaction = builder::Transfer(cfg)
241241
.recipientId("D61mfSggzbvQgTUe6JhYKH2doHaqJ3Dyib")
242242
.vendorField("this is a custom bridgechain transaction")
243243
.sign(Passphrase)
244244
.secondSign(SecondPassphrase)
245-
.build(cfg);
245+
.build();
246246

247247
// Create and Print the Json representation of the Transaction.
248248
const auto transactionJson = bridgechainTransaction.toJson();

docs/cpp.md

+11-17
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ This project is still under development. This page will get more content as the
2626
```cpp
2727
// Default Configuration is Devnet
2828
const auto transaction = builder::Transfer()
29-
.type(0)
3029
.nonce(1)
3130
.senderPublicKey(fixtures::PublicKeyBytes.data())
3231
.vendorField("this is a devnet transaction")
@@ -41,20 +40,19 @@ const auto transaction = builder::Transfer()
4140
### Mainnet
4241

4342
```cpp
44-
// Use the Configuration Class to create a Mainnet Transaction
45-
const Configuration mainnetCfg(Mainnet);
43+
// Also pass the Network as a builder constructor argument
4644

47-
const auto transaction = builder::Transfer()
48-
.type(0)
45+
#include "networks/mainnet.hpp"
46+
47+
const auto transaction = builder::Transfer(Mainnet)
4948
.nonce(1)
50-
.senderPublicKey(fixtures::PublicKeyBytes.data())
5149
.vendorField("this is a devnet transaction")
5250
.amount(100000000ULL)
5351
.expiration(0)
5452
.recipientId("D61mfSggzbvQgTUe6JhYKH2doHaqJ3Dyib")
5553
.sign("this is a top secret passphrase")
5654
.secondSign("this is a top secret passphrase too")
57-
.build(mainnetCfg);
55+
.build();
5856
```
5957

6058
### BridgeChain Transaction
@@ -77,17 +75,15 @@ const uint8_t radiansRecipient[] = {
7775
65, 29, 252, 105, 181, 76, 127, 233, 1, 233, 29,
7876
90, 154, 183, 131, 136, 100, 94, 36, 39, 234 };
7977

80-
auto transaction = builder::Transfer()
81-
.type(0)
78+
auto transaction = builder::Transfer(radiansCfg)
8279
.nonce(1)
83-
.senderPublicKey(senderPublicKeyBytes.data())
8480
.vendorField("this is a Radians transaction")
8581
.amount(100000000ULL)
8682
.expiration(0)
8783
.recipientId(radiansRecipient)
8884
.sign("this is a top secret passphrase")
8985
.secondSign("this is a top secret passphrase too")
90-
.build(radiansCfg);
86+
.build();
9187
```
9288
9389
### With custom Fees
@@ -106,17 +102,15 @@ const FeePolicy customFees = {
106102
107103
const Configuration customCfg(Radians, MyCustomFees);
108104
109-
auto transaction = builder::Transfer()
110-
.type(0)
105+
auto transaction = builder::Transfer(customCfg)
111106
.nonce(1)
112-
.senderPublicKey(senderPublicKeyBytes.data())
113107
.vendorField("this is a Radians transaction")
114108
.amount(100000000ULL)
115109
.expiration(0)
116110
.recipientId(radiansRecipient)
117111
.sign("this is a top secret passphrase")
118112
.secondSign("this is a top secret passphrase too")
119-
.build(customCfg);
113+
.build();
120114
```
121115

122116
### Sign a Transactions
@@ -539,12 +533,12 @@ void createBridgechainTransaction() {
539533
const Configuration cfg(BridgechainNetwork);
540534

541535
// Use the Transaction Builder to make a transaction.
542-
const auto bridgechainTransaction = builder::Transfer()
536+
const auto bridgechainTransaction = builder::Transfer(cfg)
543537
.recipientId("D61mfSggzbvQgTUe6JhYKH2doHaqJ3Dyib")
544538
.vendorField("this is a custom bridgechain transaction")
545539
.sign(Passphrase)
546540
.secondSign(SecondPassphrase)
547-
.build(cfg);
541+
.build();
548542

549543
// Create and Print the Json representation of the Transaction.
550544
const auto transactionJson = bridgechainTransaction.toJson();

examples/arduino/ESP32/ESP32.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,12 @@ void createBridgechainTransaction() {
181181
const Configuration cfg(BridgechainNetwork);
182182

183183
// Use the Transaction Builder to make a transaction.
184-
const auto bridgechainTransaction = builder::Transfer()
184+
const auto bridgechainTransaction = builder::Transfer(cfg)
185185
.recipientId("D61mfSggzbvQgTUe6JhYKH2doHaqJ3Dyib")
186186
.vendorField("this is a custom bridgechain transaction")
187187
.sign(Passphrase)
188188
.secondSign(SecondPassphrase)
189-
.build(cfg);
189+
.build();
190190

191191
// Create and Print the Json representation of the Transaction.
192192
const auto transactionJson = bridgechainTransaction.toJson();

examples/arduino/ESP8266/ESP8266.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ void createBridgechainTransaction() {
160160
const Configuration cfg(BridgechainNetwork);
161161

162162
// Use the Transaction Builder to make a transaction.
163-
const auto bridgechainTransaction = builder::Transfer()
163+
const auto bridgechainTransaction = builder::Transfer(cfg)
164164
.recipientId("D61mfSggzbvQgTUe6JhYKH2doHaqJ3Dyib")
165165
.vendorField("this is a custom bridgechain transaction")
166166
.sign(Passphrase)
167-
.build(cfg);
167+
.build();
168168

169169
// Create and Print the Json representation of the Transaction.
170170
const auto transactionJson = bridgechainTransaction.toJson();

0 commit comments

Comments
 (0)