Commit Graph

115 Commits

Author SHA1 Message Date
Andreas Schildbach
a91321af91 build.gradle: update JUnit 5 to 5.10.3 2024-08-03 10:16:36 +02:00
Andreas Schildbach
eb8b415d99 build.gradle: update SLF4J to 2.0.13 2024-08-03 10:16:36 +02:00
Andreas Schildbach
2199c7a577 build.gradle: updade picocli to 4.7.6 2024-05-08 12:52:19 +02:00
Andreas Schildbach
5046ad3a49 build.gradle: update SLF4J to 2.0.12 2024-02-09 19:16:44 +01:00
Andreas Schildbach
89e190614a build.gradle: drop the Eclipse plugin
We assume that these days the plugin isn't needed to set up bitcoinj within
Eclipse.
2023-11-19 23:12:10 +01:00
Andreas Schildbach
02ef9d50c3 WalletTool: new option for setting the type of filter for syncing
Currently, only server-side (bloom) filtering is supported.
2023-10-24 23:50:30 +02:00
Andreas Schildbach
c210fe7ba2 WalletTool: remove validation mode option
Keep only "simply payment verification" (SPV). Full validation is
utterly broken in bitcoinj, not tested, not maintained and as of
today nobody cares.
2023-10-24 23:46:29 +02:00
Sean Gilligan
dfe8d3866c build.gradle: updade picocli to 4.7.5 2023-10-24 12:00:11 +02:00
Sean Gilligan
b8b64a339a build.gradle: update SLF4J to 2.0.9 2023-10-24 11:48:23 +02:00
Andreas Schildbach
d326fadda0 WalletTool, BitcoinURITest: update fictious example URLs
- Use a subdomain of `example.com`
- Use HTTPS, though not strictly necessary with BIP-70
- Strip the `.php` suffix
2023-10-11 10:35:32 +02:00
Sean Gilligan
1a30c00df8 WalletTool: remove unused/obsolete print help code
This code has been unused since the conversion to picocli which generates
help text and automatically handles printing it. The `wallet-tool-help.txt`
file was deleted in the commit with the picocli implementation.

Note: this also removes the last use of Guava in WalletTool.
2023-10-01 01:11:12 +02:00
Sean Gilligan
64b5e02a5c graalvm.yml: add JDK 21 to the matrix
This also requires updating to the latest Gradle GraalVM Plugin,
which requires Gradle 7.4 or later.

Recent Gradle GraalVM Plugins don't require the `javaLauncher` setting (which
we had hardcoded to use JDK 17) so that setting is removed.
2023-09-21 19:38:43 +02:00
Sean Gilligan
bce7bc195f WalletTool: eliminate reassignment of feePerVkb 2023-09-12 21:51:31 +02:00
Sean Gilligan
983febfad0 WalletTool: eliminate reassignment of coinSelector 2023-09-12 21:49:40 +02:00
Sean Gilligan
e186ef9c84 WalletTool: simplify coinSelector lambdas 2023-09-12 21:47:20 +02:00
Sean Gilligan
853aeebd81 WalletTool: use CoinSelector.fromPredicate()
Simplify creation of CoinSelectors by using `CoinSelector.fromPredicate()`.
2023-09-12 21:44:32 +02:00
Sean Gilligan
36dce3d9d5 wallet.proto, paymentrequest.proto: move generated files to dedicated packages
* 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.
2023-07-28 21:55:26 +02:00
Sean Gilligan
6775635ce5 uild.gradle: update JUnit 5 to 5.10.0 2023-07-27 11:01:53 +02:00
Sean Gilligan
43021f4394 build.gradle: update picocli-codegen to 4.7.4 2023-07-27 10:59:23 +02:00
Sean Gilligan
39c34186cc BlockChain: use Network in constructors
Constructors that take NetworkParameters are marked as @VisibleForTesting.
This is because of the special UNITTEST NetworkParameters that is required for
certain tests.
2023-07-18 23:10:36 +02:00
Andreas Schildbach
3284b6e309 build.gradle: update JUnit 5 to 5.9.3 2023-07-16 13:05:14 +02:00
Andreas Schildbach
ada7fae5aa build.gradle: update picocli to 4.7.4 2023-07-16 13:01:25 +02:00
Andreas Schildbach
63f72840c4 WalletTool: after send action, also print the entire transaction
Currently, only the transaction hash is printed.
2023-07-07 17:15:44 +02:00
Sean Gilligan
4a45c3b4f4 WalletTool: set peer address for RegTest network
On RegTest we need to add the `localhost` peer address to the
`PeerGroup` and set max connections to 1, to avoid calling peer
discovery.
2023-06-09 11:35:15 +02:00
Sean Gilligan
e76b28a8ca MultiplexingDiscovery: fix empty seeds precondition for RegTest
`checkArgument` should not throw with an empty seeds list _if_ running on RegTest.

The test is disabled because it requires a RegTest node that is advanced
1 block (typically via `generateblocktoaddres`) during the course of the test.
2023-06-04 16:35:49 +02:00
Sean Gilligan
d7c20ff73d WalletTool: convert wait() to return CompletableFuture
This change:
1. Shortens the code by 5 lines while adding many comments
2. Separates output to System.out from the async wait handling
3. Separates wallet/peerGroup setup and starting from async wait handling
4. Passes wait condition (along with wait-type enum) as a parameter

Behavior should be unchanged with the exception that the balance will
be output in the case that it "already meets the given condition".
2023-06-01 10:28:30 +02:00
Sean Gilligan
b8bfbcc658 WalletTool: fix --date option
Also adds tests for the `create` action.
2023-05-24 18:10:45 +02:00
Andreas Schildbach
d65aefd93e WalletTool: use an else branch rather than break (from a case) 2023-05-24 10:33:11 +02:00
Sean Gilligan
021ace195f WalletTool: convert method onChange() to a lambda
It is a method that is only used in one place and getting rid of it
should enable further simplification.
2023-05-24 10:23:55 +02:00
Sean Gilligan
784722370f WalletTool: replace WalletEventListener with lambdas 2023-05-23 12:35:36 +02:00
Sean Gilligan
dd92480401 WalletTool: fix two time-related deprecations 2023-05-23 11:21:40 +02:00
Sean Gilligan
7d00afc7a0 WalletTool: extract creation of SendRequest to private method
This is a step towards an immutable `SendRequest`.
2023-05-04 10:38:19 +02:00
Andreas Schildbach
4187f2328d MarriedKeyChain: remove married key chains
The current implementation is based on plain P2SH. I assume as of
today one would prefer an implementation based on taproot or at least
segwit (P2WSH).

Note the `isFollowing` and `sigsRequiredToSpend` fields in the
`DeterministicKey` message of the wallet protobuf are preserved for
now, because they might come in handy for a future implementation and
in general it's hard to remove fields from protobufs.

Also removes the `marry` action from `WalletTool`.
2023-04-28 23:07:49 +02:00
Andreas Schildbach
5db73f2d7a BitcoinURI: migrate to static from native constructors 2023-04-19 23:08:40 +02:00
Sean Gilligan
9291841f8d Wallet: use Network in static factory methods
* Adds new methods taking `Network` rather than `NetworkParameters`
* Deprecates all converted methods
* Updates tests, examples, and tools that use these calls
2023-04-18 12:47:09 +02:00
Andreas Schildbach
838d14d027 PeerAddress: make immutable
* Static constructors `simple()` and `inet()` that replace the native constructors.
2023-04-13 00:21:36 +02:00
Andreas Schildbach
87bf6c0266 Transaction: make more use of getInput(index) 2023-04-08 16:33:41 +02:00
Andreas Schildbach
dedf478c66 Transaction: remove params from constructors 2023-04-03 16:23:13 +02:00
Sean Gilligan
23d1ce97b5 WalletTool: use net over params where possible
Note that `params` is initialized from `net`.
2023-03-31 21:01:16 +02:00
Sean Gilligan
04ff5335cf WalletTool: separate try block for setup/peerGroup.start in send()
This makes it more clear which operations throw `BlockStoreException`
and which throw `ExecutionException` or `InterruptedException`.
2023-03-31 20:58:01 +02:00
Sean Gilligan
1e088596df WalletTool: remove nested try in send()
This makes the code much more readable as you can see which operations
throw which exceptions and how they are handled.
2023-03-31 20:56:03 +02:00
Sean Gilligan
f41e5f2e1e WalletTool: remove explicit handling of KeyCrypterException from send()
`KeyCrypterException` is a runtime exception so there is no need
to catch and rethrow wrapped as a `RuntimeException`.
2023-03-31 20:52:34 +02:00
Sean Gilligan
786a1e1953 Script: migrate to Network from NetworkParameters
Provide deprecated methods for compatibility.
2023-03-31 01:23:27 +02:00
Andreas Schildbach
773a9aeb4e PeerAddress: remove params from constructor
To make this possible, a port has to be specified in all cases.
2023-03-30 18:03:18 +02:00
Sean Gilligan
b24964d056 TransactionBroadcast: add awaitRelayed(), deprecate future()
* Add `awaitRelayed()` method that returns a CF that completes when relaying is confirmed.
* Deprecate `future()` and reimplement it using `awaitRelayed()`.
2023-03-27 18:38:15 +02:00
Andreas Schildbach
b528fb5180 build.gradle: update SLF4J to 2.0.7
Starting with SLF4J 2.0.0, we can use the fluent logger API.
2023-03-27 15:25:02 +02:00
Andreas Schildbach
150c911750 LegacyAddress: flip arguments of new static constructor fromBase58()
Otherwise the deprecation cycle won't be of much use for consumers who pass `null` for `params`.
2023-03-27 09:17:37 +02:00
Sean Gilligan
6e1fc2cda9 WalletTool: rename tx from t in send() 2023-03-26 18:15:54 +02:00
Sean Gilligan
17f9b1dcfe WalletTool: don't unnecessarily reinitialize tx variable t in send() 2023-03-26 18:13:43 +02:00
Andreas Schildbach
7090c6a152 PaymentSession: rename time() method from getTime() 2023-03-18 11:06:17 +01:00