Andreas Schildbach
7db1521b6c
ByteUtils: fix integer shift implicitly cast to long problem
2022-06-23 17:06:33 +02:00
Andreas Schildbach
8ab62e7149
ByteUtils: fix redundant type casts
2022-06-23 17:06:33 +02:00
Andreas Schildbach
91f22138e8
ByteUtils: fix long literal ends with lowercase l
problems
2022-06-23 17:06:28 +02:00
Sean Gilligan
ef870fcbc8
PrefixedChecksummedBytes: remove unused transient keyword
...
Now that serialization support has been removed from PrefixedChecksummedBytes,
we no longer need the `transient` keyword.
2022-06-23 16:54:27 +02:00
Sean Gilligan
44d0576ce4
org.bitcoinj.base: move Base58, Bech32, AddressFormatException to base
2022-06-23 11:48:01 +02:00
Sean Gilligan
0645a835de
org.bitcoinj.base: move Script.ScriptType to a top level type in base
2022-06-22 18:13:34 +02:00
Sean Gilligan
93cc0ac9c5
org.bitcoinj.base: move Sha256Hash and byte/math Utils members to base
...
* move o.b.core.Sha256Hash to o.b.base.Sha256Hash
* move byte and math utility methods from o.b.core.Utils to a new
o.b.base.ByteUtils class
2022-06-22 17:40:50 +02:00
Sean Gilligan
84e737acdf
org.bitcoinj.base: introduce new package that provides fundamental types with minimal dependencies
...
This also moves Coin, Fiat, its parent Monetary and the related MonetaryFormat into the new base package.
See the provided package-info.java for details.
2022-06-21 19:25:47 +02:00
Sean Gilligan
a4ea1f62bb
BasicKeyChain, KeyChainGroup: functional earliest key creation time
2022-06-20 11:41:01 +02:00
Sean Gilligan
69ff779a82
DeterministicKey: deprecate serializeP*B58 methods with outputScriptType parameter
...
The reasons are explained in the added JavaDoc.
* Add deprecation and JavaDoc comments
2022-06-20 11:22:08 +02:00
Sean Gilligan
6688a472f1
KeyChainGroup: supportsDeterministicChains() without the 'is'
...
The JavaBean-style syntax is unnecessary and distracting here. Rename
the method and provide the old name as a deprecated method.
2022-06-19 13:43:06 +02:00
Sean Gilligan
4e5c00937f
Wallet: private listener lists as List type (was CopyOnWriteArrayList)
...
This simplifies the declaration and verifies that we're using the standard List
interface in all our code. The implementation remains unchanged.
2022-06-19 13:33:48 +02:00
Sean Gilligan
6671bc01c6
VarInt: make value
member private
2022-06-19 12:44:59 +02:00
Sean Gilligan
7e1be32369
Wallet.calculateAllSpendCandidates: make more functional
...
Use a filtered stream to generate an unmodifiable list.
2022-06-19 12:01:13 +02:00
Sean Gilligan
36ac6926e9
Wallet: minor JavaDoc improvements
2022-06-18 16:25:49 -07:00
Andreas Schildbach
24095fd9b8
NativeSecp256k1: deprecate native interface to libsecp256k1
...
This native implementation is unmaintained and untested for years.
2022-06-15 10:34:17 +02:00
Sean Gilligan
7f50aa78b3
org.bitcionj.jni: deprecate all classes
...
These native implementations have been unused and unmaintained for years.
2022-06-15 10:22:54 +02:00
Sean Gilligan
5ae7a42a9e
DeterministicKey: remove deprecated serializePublic/serializePrivate
...
Add a package-visible serialize() method annotated with @VisibleForTesting to
support existing tests.
2022-06-13 10:35:05 +02:00
Sean Gilligan
1aa1bf6d94
Remove all usage of Java Serialization
...
* Remove all implementations of `Serializable`
* Remove unit tests of Java serialization
2022-06-12 10:39:24 -07:00
Sean Gilligan
f6b3d82e8d
PrefixedChecksummedBytes: remove Cloneable
...
* Remove the `implements Cloneable` marker
* Remove the `@Override` of `clone()`
* Remove tests of `clone()` for the implementing classes
2022-06-12 18:35:24 +02:00
Sean Gilligan
8800840e7e
integration-test: move tests derived from TestWithNetworkConnections to integration-test submodule
2022-05-31 13:56:38 +02:00
Sean Gilligan
aafdbccbc5
FakeTxBuilder: move from src/test
to src/main
...
This will allow it to be used in both core tests and integration-test.
2022-05-24 22:52:16 +02:00
Sean Gilligan
906f82a095
WalletAppKit: replace null with BIP32 in constructor
...
This makes the code for this constructor more explicit/readable
and prepares the way for making the parameter in the "full" constructor
non-nullable (in a minor breaking change) in the future.
2022-05-03 19:04:24 +02:00
Sean Gilligan
760d9847fb
Wallet: add createDeterministic() overloads with KeyChainGroupStructure parameter
2022-05-02 12:34:36 +02:00
Sean Gilligan
3a0060461f
KeyChainGroupStructure: Deprecate DEFAULT structure
...
Deprecates DEFAULT and uses BIP32 internally where DEFAULT
had been used before.
This makes the code more clear. I think it makes sense to be
explicit when specifying a KeyChainGroupStructure and not have
a DEFAULT symbol (which implies the default might change.)
2022-05-01 22:05:47 +02:00
Sean Gilligan
bd775eafad
KeyChainGroupStructure: add BIP32 constant, DEFAULT = BIP32
2022-04-30 23:15:34 +02:00
Sean Gilligan
18be2aa3ff
MnemonicCode: make wordList final and unmodifiable
...
Also improve JavaDoc and add 2 tests.
2022-04-30 23:00:25 +02:00
Sean Gilligan
406d976fd6
KeyChainGroupStructure: support BIP-43/BIP-44/BIP-84 structure
2022-04-29 10:24:52 +02:00
Sean Gilligan
6ab20a098b
Network: add two more static constructors for convenience
2022-04-29 10:21:09 +02:00
Sean Gilligan
1283fe6f36
Network.java: remove PROD (alias for MAIN)
...
This affects the command-line UI of some tools, but since the `Network`
enum hasn't been released yet, we can remove it without deprecating
first.
2022-04-29 01:19:22 +02:00
Andreas Schildbach
407e8cccdb
DefaultCoinSelectorTest: replace a qualified name with import
2022-04-29 00:02:10 +02:00
Sean Gilligan
571f688957
KeyChain hierarchy: simplify KeyChain serialization with Streams
...
In 5 related KeyChain classes:
* Convert serialization to use Streams
* Add JavaDoc
* Warn that returned lists/maps will become unmodifiable in the future
2022-04-21 10:31:36 +02:00
Sean Gilligan
05a654167e
Wallet: deprecate public method serializeKeyChainGroupToProtobuf()
...
Package-private serializeKeyChainGroupToProtobufInternal() remains for
internal use.
2022-04-20 23:33:51 +02:00
Sean Gilligan
f37f696108
DeterministicKeyChain: extract to static addChain() method
2022-04-20 21:39:17 +02:00
Sean Gilligan
6ac5f0b5a7
DeterministicKeyChain: add and use static cloneKey() method
2022-04-20 21:11:39 +02:00
Sean Gilligan
333cf03e7e
DeterministicKeyChain: remove an @SuppressWarnings annotation
...
The warning is no longer present so we don't need to suppress.
2022-04-20 20:32:56 +02:00
Sean Gilligan
5e2e62f868
DeterministicKeyChain: use getLeafKeys() to simplify two for-loops
2022-04-20 20:26:34 +02:00
Sean Gilligan
3744876a83
bitcoinj-core: optimize imports
2022-04-20 17:06:15 +02:00
Sean Gilligan
1f0c1a3bb7
DeterministicKeyChain, DeterministicHierarchy: add putKeys(), and use it
2022-04-20 02:05:45 +02:00
Sean Gilligan
8bcfec0ed2
DeterministicKeyChain: maybeLookAhead() to return unmodifiable
...
This should have no side effects.
2022-04-20 01:38:36 +02:00
Andreas Schildbach
aff7435944
ECKey: fix usage of deprecated method ASN1TaggedObject.getObject()
2022-04-20 01:13:55 +02:00
Sean Gilligan
c178c9534c
HDKeyGeneration: add generate() method, use in DeterministicKeyChain
2022-04-20 00:44:15 +02:00
Sean Gilligan
14217dbd7b
Wallet: remove deprecated constructor
...
Also: Update unit test that used that constructor, add JavaDoc to
replacement constructor.
2022-04-20 00:27:15 +02:00
Sean Gilligan
79fbf5ab02
DeterministicKeyChain: add private putKey(key) method, and use it
...
To add a key it must be added to both the `hierarchy` and `basicKeyChain` this
should be wrapped in a method and used whenever a key is addded.
2022-04-20 00:00:11 +02:00
Sean Gilligan
184be16773
Coin: only allocate Coin with zero value once
2022-04-19 15:58:36 +02:00
Andreas Schildbach
4f17e006b2
DumpedPrivateKeyTest: properly use NetworkParameters.getDumpedPrivateKeyHeader() accessor
2022-04-19 10:44:56 +02:00
Sean Gilligan
a6e5c88ce8
build.gradle: add detailed deprecation warnings to all modules
2022-04-19 10:07:55 +02:00
Sean Gilligan
f75c55fe5a
PeerGroup: migrate to BlockchainDownloadEventListener (breaking)
...
* Deprecate PeerDataEventListener (aggregate of 4 listeners)
* Remove long-deprecated AbstractPeerDataEventListener (4 no-op listeners)
* Add BlockchainDownloadEventListener (aggregate of 2 listeners)
* PeerGroup: replace PeerDataEventListener with BlockchainDownloadEventListener (BREAKING!)
* DownloadProgressTracker: implement BlockchainDownloadEventListener instead of AbstractPeerDataEventListener
This is a breaking change and may require simple, one-line changes to consumers. However, it removes the
long-deprecated AbstractPeerDataEventListener and simplifies the listeners for blockchain downloading.
After another release the deprecated PeerDataEventListener can be removed.
2022-04-19 10:02:10 +02:00
Sean Gilligan
a6433d91b9
Wallet: fix !equals() vs != bug in getTotalSent()
...
Coin values should be compared with .equals() not == or !=.
2022-04-19 09:16:04 +02:00
Sean Gilligan
7141321c38
Wallet: make fields final where possible
2022-04-18 19:51:48 -07:00