Andreas Schildbach
7f5b6753f5
Use Address whereever possible in the API, rather than LegacyAddress.
...
This is a preparation for the remaining segwit changes. LegacyAddress
variables in unit tests are also changed.
2018-03-05 10:35:09 +01:00
Andreas Schildbach
6e46d75c61
TransactionBroadcast: Propagate context to EnoughAvailablePeers runnable.
2018-03-04 23:45:00 +01:00
Andreas Schildbach
c9cfd15f7f
Transaction: Fix a JavaDoc link.
2018-03-04 23:44:18 +01:00
Andreas Schildbach
752b06043c
Wallet: Remove several methods that were deprecated long ago.
...
This also removes WalletEventListener and its implementations.
2018-03-04 21:45:35 +01:00
Andreas Schildbach
4971d3fc25
LegacyAddress: Deprecate fromP2SHScript() static constructor.
2018-03-04 18:04:23 +01:00
Andreas Schildbach
c7acfee1a4
LegacyAddress: Rename fromP2SHHash() static constructor to fromScriptHash(), keeping the old method as deprecated.
2018-03-04 17:28:12 +01:00
Andreas Schildbach
bc8828c858
TransactionOutput: Deprecate getAddressFromP2PKHScript() and getAddressFromP2SH() methods.
2018-03-04 17:28:12 +01:00
Andreas Schildbach
3fb6b5fcb6
ScriptPattern: Refactor some matcher methods to use series of ifs.
2018-03-04 17:27:20 +01:00
Andreas Schildbach
061f5c9841
Determine native segwit destination addresses of a transaction by parsing the segwit scriptPubKey.
2018-03-04 16:06:04 +01:00
Andreas Schildbach
52afdc629e
Teach SendRequest and Wallet to send to native segwit addresses.
...
WalletTool and FakeTxBuilder can do it, too.
2018-03-04 15:30:37 +01:00
Andreas Schildbach
2c768bfe07
UTXOProvider: getOpenTransactionOutputs() to take a list of ECKeys rather than addresses.
2018-03-04 15:28:21 +01:00
HashEngineering
d92dfdfd14
Add ability to import an account key that allows for a wallet to spend from it.
...
Previous functionality only allowed watching.
Contributor: Nelson MELINA <nelson.melina@mycelium.com>
2018-03-03 12:57:58 +01:00
Andreas Schildbach
21d65feb28
AddressFormatException: Add InvalidPrefix exception that is thrown when the prefix (version header or HRP) is invalid.
...
WrongNetwork exception is now a subclass of this class.
2018-03-03 10:53:28 +01:00
Andreas Schildbach
b3a41dce89
SegwitAddressTest: Comment test vectors for invalid addresses.
2018-03-03 10:31:23 +01:00
Andreas Schildbach
d55a547740
AddressFormatException: Add InvalidDataLength exception that is thrown when the data part isn't of the right size.
2018-03-03 10:28:30 +01:00
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