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`.
* The check against `maxMoney` is removed. There BIP21 spec does not restrict
the amount towards positive infinity. The new maximum is now dictated by
`Coin.parseCoin()`: `Long.MAX_VALUE` satoshis
* The check for negative amounts now throws `OptionalFieldValidationException`
directly, rather than re-throwing via `ArithmeticException`.
* Exception messages now use string concatenation like everywhere else.
* Tests around the new max amount are added/changed.
* Adds new methods taking `Network` rather than `NetworkParameters`
* Deprecates all converted methods
* Updates tests, examples, and tools that use these calls
* A static constructur `read()` that deserializes from a payload.
* A `write()` helper to write to a buffer.
* A `serialize()` helper to get the serialized bytes.
* A `BYTES` constant for the number of serialized bytes.
Includes a test.
Rather than log an error at runtime, the compiler should fail with an error
when subclasses of `BaseMessage` don't implement `bitcoinSerializeToStream()`.
Previously, `ArithmeticException` was thrown which is unlikely to be handled by
consumers.
`BufferUnderflowException` is the correct exception to throw, under the assumption
that a giant length can't be followed by a collection of equally giant length.
`-1` and `Integer.MIN_VALUE` (and all values inbetween) are in fact
very large VarInts that can only be expressed as a long. So their
test data have been moved from `VarIntTest.integerTestVectors` to
`longTestVectors`.
`intValue()` is changed to guard against such cases, and a helper
`fitsInt()` is introduced.
JavaDocs are added to `intValue()` and `longValue()` to clarify the
expected value ranges.