tomFlowee
8ff3802687
Fixes in the HDMaster* classes
2022-07-11 18:04:14 +02:00
tomFlowee
887fbef139
Add some convenients methods.
2022-07-11 13:31:24 +02:00
tomFlowee
a737803198
Install HDMasterPubkey.h
2022-07-11 12:55:31 +02:00
tomFlowee
0c2ddfe760
fix language in comment
2022-07-10 12:07:11 +02:00
tomFlowee
9a9a2d0829
Avoid duplicating magic numbers
...
Move the prefix numbers all to one place to avoid copy-pasting them.
Also make the xpub more complete.
2022-07-08 13:14:41 +02:00
tomFlowee
f318774663
Add HDMasterPubkey to derive xpub style addresses
...
This also alters the 'toString()' on HDMasterKey to stop giving
a rather useless xpub and turn it into a dedicated toXPubString()
Closes : #1
2022-07-07 21:16:50 +02:00
tomFlowee
0eee5a06b6
Split test into two.
...
Since they are in different libs, it makes sense to put the right part in
the right test dir.
2022-07-07 21:00:53 +02:00
tomFlowee
1ab4d88993
Split version.h
...
Version.h held mostly stuff for protocol.h, which is a hub-specific file.
The only thing that we actually use is the PROTOCOL_VERSION in our code
and as such that one moved to the interfaces dir.
2022-07-06 22:50:53 +02:00
tomFlowee
05bbba3cb3
Rename class CKey -> PrivateKey
2022-07-06 22:12:33 +02:00
tomFlowee
0f91e9ac46
Remove dead code
2022-07-06 22:08:50 +02:00
tomFlowee
c9af7cca4a
Rename class CPubKey -> PublicKey
2022-07-06 21:56:34 +02:00
tomFlowee
c33d54ed7d
Rename class CKeyID -> KeyId
2022-07-06 21:52:47 +02:00
tomFlowee
32c7f28b24
Change cast.
...
This correctly makes our value signed before turning it into
a negative number.
2022-07-06 14:28:34 +02:00
tomFlowee
1572608605
Make this explicit
...
Since the default copy constructor of the HDMasterKey uses the copy
constructor of CKey, make the latter have a copy constructor explicitly
defined as well.
2022-07-06 14:10:23 +02:00
tomFlowee
bc52d3eda0
Be consistent in the header file and avoid misuse.
2022-07-06 14:09:17 +02:00
tomFlowee
82ca91d836
Use slightly less memory.
...
This avoids creating an empty static string in most well written apps.
Also use const ref for a loop because that avoids copying.
2022-07-06 14:08:18 +02:00
tomFlowee
cfc50b3a9a
Always initialize this field in the constructor.
...
This avoids future problems should the constructor be used elsewhere.
2022-07-06 14:05:44 +02:00
tomFlowee
9fa877f425
Rename hashing methods to start with lowercase
2022-05-17 00:46:54 +02:00
tomFlowee
cca8a885bc
Fix coding style issues
...
Follow the coding styleguide and make the methods lowercase on CKey
2022-05-11 13:46:15 +02:00
tomFlowee
7b57024413
Make set() be internally consistent
...
setting an incorrect value should not keep the old data after we already
update the fValid boolean.
That would give the user the impression that the data was removed while
it really isn't.
2022-05-11 13:20:15 +02:00
tomFlowee
aef7366034
Implement BIP69 in TransactionBuilder
...
This adds support for the
Lexicographical Indexing of Transaction Inputs and Outputs
anonimize concepts of transactions directly in the transaction builder.
2022-04-15 17:33:55 +02:00
tomFlowee
e23925a954
Clean up the API and implement logging on failure
2022-04-06 14:23:37 +02:00
tomFlowee
e5c97d1e87
Use non-openssl cleanse
2022-04-06 12:04:23 +02:00
tomFlowee
a47a7072b3
Add unit test for allocator too
2022-04-06 11:39:49 +02:00
tomFlowee
0d4b214e23
Move over to the new allocator
2022-04-06 10:24:16 +02:00
tomFlowee
26262783de
Allow mid(1, 0) to be called
...
This now creates a zero size, empty, result.
2022-02-10 18:02:50 +01:00
tomFlowee
c0989158c0
Add API docs.
2022-02-08 19:03:14 +01:00
tomFlowee
41e00b134f
Add convenience methods on ConstBuffer
...
this adds indexOf() and toString()
2022-01-25 23:59:54 +01:00
tomFlowee
5bebaeb37c
Add another write() helper method.
2022-01-24 13:19:23 +01:00
tomFlowee
7376c28a3c
Move pool thread-local getter to utils.
...
This nicely cleans up the calling usage a static on the connection
manager instance.
2022-01-24 12:06:37 +01:00
tomFlowee
7b5c10845e
Add helper method
2022-01-21 22:44:36 +01:00
tomFlowee
1b5ae89d31
[Refactor] rename FastTransaction.{h|cpp} -> Tx.*
2021-11-02 11:05:14 +01:00
tomFlowee
639a57d957
[Refactor] primitives/BlockHeader -> BlockHeaderFields
...
This avoids a naming conflict with a p2p class BlockHeader.
Notice that the block data structures are mostly still private API, they
are in the utils dir but headers are not installed, nobody has needed
them so far.
2021-11-02 11:05:14 +01:00
tomFlowee
50af3dc02c
[Refactor] rename FastBlock.{h|cpp} -> Block.*
2021-11-02 10:24:58 +01:00
tomFlowee
6ff0e7c0de
[Refactor] FastBlock -> Block
2021-11-02 10:18:24 +01:00
tomFlowee
dce57fd8ea
[Refactor] rename block.{h|cpp} -> MutableBlock.*
2021-11-02 10:13:23 +01:00
tomFlowee
406dc46671
[Refactor] move CBlockLocator to libs/server
...
Its not needed anywhere outside the apps.
2021-11-02 09:59:13 +01:00
tomFlowee
4689cc6a92
[Refactor] CBlock -> MutableBlock
2021-11-02 09:36:09 +01:00
tomFlowee
64d901d760
Refactor; CBlockHeader -> BlockHeader
2021-11-02 09:28:35 +01:00
tomFlowee
cc2b725452
Install random.h from flowee_utils
2021-10-27 19:14:09 +02:00
tomFlowee
6da5090202
Make converter method available in API.
...
This allows people to validate and convert a deriviation path from a
string to a vector of numbers.
2021-10-18 22:59:11 +02:00
tomFlowee
b8e6ddfb19
Add a specific operator=
...
This avoids checkers being worries about the inconsistency of a
specific copy-constructor but a generic assignment operator.
The assignment operator can be generic because locking doesn't
care what the content is.
2021-10-13 17:06:58 +02:00
tomFlowee
4252e859e7
Remove obsolete (and untested) code.
2021-10-13 17:06:58 +02:00
tomFlowee
c264641cbe
Provide hierarchically deterministic wallet parts
...
This introduces a Mnemonic class for BIP39 (seed words)
validation as well as a HDMasterKey class with provides the
BIP32 & BIP43 support.
All tests went into the apputils unit test.
2021-10-13 17:03:02 +02:00
tomFlowee
e30c4ceca5
Wrap new feature in ifdef
...
The API-wise nice addition of base58 encoding learning about
private keys has as a downside that external projects get the
surprise of pulling in a lot more code.
Those that want to avoid this, while not using private keys, can
simply add
add_definitions(-DNPRIVKEY) # avoid private-key using code
to their CMake file.
2021-08-09 20:04:27 +02:00
tomFlowee
b1f6f497dd
Prevent misuse of API
2021-08-05 22:43:24 +02:00
tomFlowee
3bac1cc9e0
Add setData for CKey style data.
2021-07-31 17:36:15 +02:00
tomFlowee
47f0d955bb
Add double include protection
2021-07-29 20:26:03 +02:00
tomFlowee
2308600929
Add convenience constructor.
2021-07-26 15:01:25 +02:00
tomFlowee
e7a229e806
Add some API docs.
2021-07-01 20:09:04 +02:00