Andreas Schildbach
bc1afbc6c3
Bech32: Encoding should not throw AddressFormatException.
2018-03-03 09:40:29 +01:00
Andreas Schildbach
64aa2ecac6
Bech32Test: Sync test vectors with current version of BIP173.
2018-03-02 16:08:36 +01:00
Andreas Schildbach
15a15ac024
AddressFormatException: Add InvalidCharacter exception that is thrown when a character is used that is invalid in the encoding.
2018-03-02 15:53:22 +01:00
Andreas Schildbach
0297ba4d58
AddressFormatException: Add InvalidChecksum exception that is thrown when a Base58 or Bech32 checksum is invalid.
2018-03-02 15:50:44 +01:00
Andreas Schildbach
0a7f346919
Move WrongNetworkException to AddressFormatException.WrongNetwork.
2018-03-02 13:00:56 +01:00
Andreas Schildbach
6a7a136d7c
LegacyAddress: Make sure the various by-hash constructors throw AddressFormatException if the hash length isn't 20 bytes.
2018-03-02 12:44:52 +01:00
Andreas Schildbach
82edec0978
DumpedPrivateKey: Don't dump private key into exception message, even if it's likely invalid anyway.
2018-03-01 18:42:20 +01:00
Andreas Schildbach
2e8a7474b2
BitcoinURI: Make aware of native segwit addresses.
2018-02-28 18:25:22 +01:00
Andreas Schildbach
d2caf699e1
LegacyAddress: Deprecate isP2SHAddress().
2018-02-28 17:07:39 +01:00
Andreas Schildbach
c0d8039c82
LegacyAddress: Deprecate getHash160().
2018-02-28 17:01:56 +01:00
Andreas Schildbach
e11119b64f
Rename VersionedChecksummedBytes→PrefixedChecksummedBytes, Address→LegacyAddress and AbstractAddress→Address.
...
This also renames corresponding test classes and mentions in comments.
2018-02-28 16:57:16 +01:00
Andreas Schildbach
6593d74619
Implement native segwit addresses in new SegwitAddress class.
...
This commit establishes a base class for legacy and segwit addresses.
Uses Bech32 code from https://github.com/sipa/bech32/pull/40 .
2018-02-28 16:37:29 +01:00
Andreas Schildbach
57f25d4c22
VersionedChecksummedBytes: Store network params rather than version, in preparation for native segwit addresses.
2018-02-28 16:27:43 +01:00
Andreas Schildbach
f25840309b
Rename the org.bitcoinj.core.CheckpointManagerTest test package to lowercase.
2018-02-28 10:02:31 +01:00
Andreas Schildbach
a8c9a33d6a
PaymentSessionTest: Fix missing context.
2018-02-28 01:35:24 +01:00
Andreas Schildbach
5ed7847a80
PaymentSessionTest: Ignore test that has a hardcoded expiration date.
2018-02-28 01:34:47 +01:00
Andreas Schildbach
2aec06a281
Consequently use constants for network params in test cases.
2018-02-28 00:51:43 +01:00
Andreas Schildbach
1d15d95d97
Some Javadoc changes related to addresses.
2018-02-27 21:32:32 +01:00
Andreas Schildbach
44474be186
Address: Migrate use of the other pubKeyHash constructor to fromPubKeyHash(). Deprecate the constructor.
2018-02-27 12:09:01 +01:00
Andreas Schildbach
cc2e8ba935
Address: Make main constructor private.
...
There is no reason to call it directly.
2018-02-27 11:34:54 +01:00
Andreas Schildbach
ebd402eb4b
Rename static NetworkParameters constants in test cases.
2018-02-27 11:34:54 +01:00
Andreas Schildbach
31a06d7095
ScriptPattern: Add Javadocs to methods.
2018-02-26 13:43:16 +01:00
Andreas Schildbach
4b129475b3
Script: Deprecate the script data extraction methods for CLTV payment channels.
...
Create and make sure to only use equivalents in ScriptPattern.
2018-02-26 13:25:46 +01:00
Andreas Schildbach
c6bbd947a0
Script: Move getPubKey() to ScriptPattern.extractKeyFromPayToPubKey().
2018-02-26 13:01:34 +01:00
Andreas Schildbach
234384c87e
Script.getPubKey(): Remove ability to extract the pubKey from inputs spending from P2PKH outputs.
...
This was only used in unit tests to determine the from address. One of the
tests now tests this manually so that we don't loose test coverage.
2018-02-26 11:14:13 +01:00
Andreas Schildbach
ea2dc695d7
Remove the concept of "acceptable Base58 address headers" (version headers) for a given network.
...
The concept was always weakly defined, as version headers have been used for different types of
data too (which wasn't included in the list). What's acceptable is always dependent on the
usecase, not only the network.
Also, with the coming Bech32 addresses there are no int version headers any more. Rather, it
uses an HRP (human readable part) which is a string.
This is an API breaking change, but I doubt many users have used this in the form of a list.
2018-02-26 02:51:16 +01:00
Andreas Schildbach
55f2a60fb6
Remove the concept of 'from address'.
...
Segwit is another nail on the coffin, because for each pubkey there is now also a segwit address.
A number of wallets will not recognize returned payments if sent to the wrong address type.
2018-02-26 02:25:34 +01:00
Andreas Schildbach
dedeb01dac
Move ECKey.toAddress() to Address.fromKey().
...
This is a preparation for supporting native segwit addresses. Keys can't know what
type of address is wanted. In future, there will also be a SegwitAddress.fromKey().
2018-02-26 02:13:18 +01:00
Andreas Schildbach
1a1693bd8a
pom.xml: Exclude two more network tests from surefire when using the no-network profile.
2018-02-26 02:11:31 +01:00
Andreas Schildbach
0a21b586e8
Script: Extract the extraction of the P2PKH and P2SH hashes to ScriptPattern.
2018-02-26 01:57:41 +01:00
Andreas Schildbach
e44591a9b5
Script: Deprecate the old matcher methods, move their Javadocs over to ScriptPattern and use only the equivalents in ScriptPattern.
2018-02-25 22:51:15 +01:00
Andreas Schildbach
8d98c3e1e2
Script: Remove deprecated matcher method isSentToP2SH().
2018-02-25 22:51:08 +01:00
Andreas Schildbach
fc4a29e3cb
ScriptPattern: For all matcher methods, take Script as an argument rather than List<ScriptChunk>.
2018-02-25 22:50:28 +01:00
Andreas Schildbach
caf9e52940
ScriptPattern: Rename some matcher methods to the typical name of the matched scripts.
2018-02-25 22:12:39 +01:00
Andreas Schildbach
71a5b1b89f
Remove some unused imports.
2018-02-23 20:09:41 +01:00
Andreas Schildbach
cb01312395
Update to slf4j 1.7.25.
2018-02-23 12:24:06 +01:00
Andreas Schildbach
30767c9e28
Update to OkHttp 3.9.1.
2018-02-23 12:24:06 +01:00
Andreas Schildbach
e0e8ecbd69
Update to Guava 24.0-android.
2018-02-23 12:24:06 +01:00
Andreas Schildbach
95c225a4ff
Update to maven-surefire-plugin 2.20.1.
2018-02-23 12:24:06 +01:00
Andreas Schildbach
ec28f13355
Update to maven-source-plugin 3.0.1.
2018-02-23 12:24:06 +01:00
Andreas Schildbach
5881404c94
Update to maven-site-plugin 3.7.
2018-02-23 12:24:06 +01:00
Andreas Schildbach
7e788657e1
Update to maven-shade-plugin 3.1.0.
2018-02-23 12:24:06 +01:00
Andreas Schildbach
03df9f303a
Update to maven-resources-plugin 3.0.2.
2018-02-23 12:24:06 +01:00
Andreas Schildbach
b70e4521b9
Update to maven-javadoc-plugin 3.0.0.
2018-02-23 12:24:06 +01:00
Andreas Schildbach
5ee55fe1f2
Update to maven-jar-plugin 3.0.2.
2018-02-23 02:04:33 +01:00
Andreas Schildbach
607ddcf124
Update to maven-enforcer-plugin 3.0.0-M1.
2018-02-23 02:04:33 +01:00
Andreas Schildbach
4dce437e82
Update to maven-dependency-plugin 3.0.2.
2018-02-23 02:04:33 +01:00
Andreas Schildbach
15d5d444c6
Update to maven-compiler-plugin 3.7.0.
2018-02-23 02:04:33 +01:00
Andreas Schildbach
41fd06a739
Update to maven-clean-plugin 3.0.0.
2018-02-23 02:04:33 +01:00
Andreas Schildbach
90f35ca8aa
Target Java 7 for core
...
Now that Android KitKat (4.4) seems to be the baseline for apps, we can make the switch to Java 7
official. We can finally use all language features (including try-with-resources) and most of the
API (not all, the Android API is still missing some packages).
2018-02-23 00:53:09 +01:00