Commit graph

4282 commits

Author SHA1 Message Date
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
6d70c60bca PeerTest: static import of FakeTxBuilder methods 2022-05-31 14:01:42 +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
6bd2785b64 integration-test: add support for "Vintage" tests 2022-05-24 18:22:28 +02:00
Sean Gilligan
b95d526a0e WalletApplication: support BIP-43/BIP-44/BIP-84
Create a new constructor in WalletApplication that defaults KeyChainGroupStructure
to BIP43.
2022-05-03 22:40:29 +02:00
Andreas Schildbach
bf71730c3d Deterministic wallets.txt: fix typos heirarchy → hierarchy 2022-05-03 21:30:34 +02:00
Sean Gilligan
c5fd900346 WalletAccountPathTest: use Wallet.fromSeed() to simplify private createWallet() 2022-05-03 20:37:56 +02:00
Sean Gilligan
8f2757c0eb WalletTool: explicitly specify BIP32 in createWallet() 2022-05-03 20:04:16 +02:00
Andreas Schildbach
6a47695fc8 README.md: fix spelling of GitHub 2022-05-03 19:15:43 +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
e428cfbc04 wallet-tool: Add nativeCompile task for GraalVM
Also add graalvm.yml to do a nativeCompile build on Github Actions
2022-05-02 11:57:59 -07: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
Andreas Schildbach
837b614906 ForwardingService, PrivateKeys: also parse segwit addresses from arguments 2022-05-01 00:12:22 +02:00
Andreas Schildbach
eb71e0b0c6 DoubleSpend, SendRequest: migrate hardcoded addresses to segwit 2022-05-01 00:10:28 +02:00
Sean Gilligan
c3896e6caf examples/tools: use explicit script type and wallet structure
* Explicitly use P2WPKH (this changes behavior to segwit)
* Explicitly use BIP32 (this is the same behavior as before)
2022-04-30 23:24:25 +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
8ade47d97a WalletAccountPathTest: create wallets in temp dir and verify account paths 2022-04-29 21:08:45 +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
Sean Gilligan
756e502580 WalletLoadTest: add an assert for accountPath 2022-04-29 00:14:18 +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