Migrate `@Nullable` from JSR 250 (Common Annotations) to Jakarta
Annotations.
Jakarta Annotations supports Java modules, so this is necessary
to migrate to running `wallettemplate` on the module path.
We don't really need to sleep uninterrruptibly here. The code is only displaying
a progress indicator and the `call()` method is already throwing `Exception`.
Ensure key derivation time with `WalletSetPasswordController#SCRYPT_PARAMETERS`
isn't inordinately slow. This is in preparation for some forthcoming changes to
the progress meter in `WalletSetPasswordController`.
* Modify the `java_package` setting in our two `.proto` source files
* Move 2 existing generated-but-checked-in Protos.java files to
dedicated packages (i.e. packages without hand-coded "artisanal" files)
This is a step towards more compatibility with ProtoBuf tooling which
sometimes likes to delete the generated files and:
> can't distinguish between "old generated code" and "your artisan source files."
and more importantly it is a step towards fixing Gradle 8 caching issues.
* Deprecate public fields in `SendResult`
* Make available equivalent accessors
* Update all usages
This prepares the way for replacing `SendResult` with `TransactionBroadcast`
in the future.
* native constructors that were meant to be called by consumers now have static equivalents
* all native constructors are discouraged from being used by a JavaDoc comment
* one constructor that wasn't meant to be used by consumers is switched to private access
* tests and tools that resemble consumers are updated to use the new API
Note: although most native constructors are now deprecated, we're not using
annotations because we're still calling them.
We were using KeyParameter as a wrapper for a byte[] containing an
AES Key and passing it around our API. This introduced an unnecessary
API dependency on Bouncy Castle. This PR adds an AesKey class
for the same purpose to replace it.
This is a breaking change, but one that should be easy to accommodate.
This change migrates from using `NetworkParameters` to `Network` for specifying the network and
also decouples from static methods in `Address` with an interface/implementation approach.
Note that there are 3 use cases for address parsing:
1. Any network is allowed - AddressParser.parseAddressAnyNetwork(String)
2. Parse for a specified network - AddressParser.parseAddress(String, Network)
3. Parse for a previously-specified (context dependent) network - AddressParser.Strict.parseAddress(String)
In most use cases, an AddressParser instance can be accessed through the Wallet,
which already knows the Network type and in this context validation for network makes
sense. This is why `Wallet` is implementing `AddressParser.Strict`
BitcoinURI allocates its own DefaultAddressParser for now, as do some other tests
and examples that don't have access to a Wallet
In the future DefaultAddressParser may be replaced by something loaded
via the ServiceLoader mechanism or other dynamically configured mechanism.
* WalletAppKit: add a constructor that takes a BitcoinNetwork
* WalletAppKit: deprecate constructors taking netParams or Context
* WalletAppKit: add an accessor for network()
* Update examples, tools, and wallettemplate to use the new constructor