From 6420b3a78e0e40e77b920afd7ac4a8424d9eccf0 Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Mon, 16 Dec 2024 17:46:14 +0100 Subject: [PATCH] pre-release-notes.md: release bitcoinj 0.17 release candidate 1 --- javadoc/0.17-rc1/allclasses-index.html | 1510 ++ javadoc/0.17-rc1/allpackages-index.html | 149 + javadoc/0.17-rc1/constant-values.html | 1223 ++ javadoc/0.17-rc1/deprecated-list.html | 1255 ++ javadoc/0.17-rc1/element-list | 24 + javadoc/0.17-rc1/help-doc.html | 191 + javadoc/0.17-rc1/index-all.html | 14844 ++++++++++++++++ javadoc/0.17-rc1/index.html | 151 + javadoc/0.17-rc1/jquery-ui.overrides.css | 35 + javadoc/0.17-rc1/legal/ASSEMBLY_EXCEPTION | 27 + javadoc/0.17-rc1/legal/jquery.md | 26 + javadoc/0.17-rc1/legal/jqueryUI.md | 49 + javadoc/0.17-rc1/member-search-index.js | 1 + javadoc/0.17-rc1/module-search-index.js | 1 + .../0.17-rc1/org/bitcoinj/base/Address.html | 342 + .../AddressParser.AddressParserProvider.html | 154 + .../org/bitcoinj/base/AddressParser.html | 258 + .../0.17-rc1/org/bitcoinj/base/Base58.html | 296 + .../org/bitcoinj/base/Bech32.Bech32Bytes.html | 201 + .../org/bitcoinj/base/Bech32.Bech32Data.html | 161 + .../org/bitcoinj/base/Bech32.Encoding.html | 222 + .../0.17-rc1/org/bitcoinj/base/Bech32.html | 306 + .../org/bitcoinj/base/BitcoinNetwork.html | 668 + javadoc/0.17-rc1/org/bitcoinj/base/Coin.html | 922 + .../base/LegacyAddress.AddressHeader.html | 254 + .../base/LegacyAddress.P2SHHeader.html | 246 + .../org/bitcoinj/base/LegacyAddress.html | 612 + .../0.17-rc1/org/bitcoinj/base/Monetary.html | 154 + .../0.17-rc1/org/bitcoinj/base/Network.html | 263 + .../org/bitcoinj/base/ScriptType.html | 382 + .../base/SegwitAddress.SegwitHrp.html | 298 + .../org/bitcoinj/base/SegwitAddress.html | 667 + .../org/bitcoinj/base/Sha256Hash.html | 619 + .../0.17-rc1/org/bitcoinj/base/VarInt.html | 405 + ...dressFormatException.InvalidCharacter.html | 208 + ...ddressFormatException.InvalidChecksum.html | 176 + ...ressFormatException.InvalidDataLength.html | 176 + .../AddressFormatException.InvalidPrefix.html | 180 + ...matException.UnexpectedWitnessVersion.html | 175 + .../AddressFormatException.WrongNetwork.html | 179 + .../exceptions/AddressFormatException.html | 211 + .../base/exceptions/package-summary.html | 130 + .../base/exceptions/package-tree.html | 99 + .../org/bitcoinj/base/internal/Buffers.html | 292 + .../org/bitcoinj/base/internal/ByteArray.html | 269 + .../org/bitcoinj/base/internal/ByteUtils.html | 1116 ++ .../FutureUtils.ThrowingSupplier.html | 176 + .../bitcoinj/base/internal/FutureUtils.html | 234 + .../org/bitcoinj/base/internal/HexFormat.html | 172 + .../base/internal/InternalUtils.Joiner.html | 142 + .../base/internal/InternalUtils.Splitter.html | 142 + .../bitcoinj/base/internal/InternalUtils.html | 298 + .../base/internal/PlatformUtils.OS.html | 229 + .../base/internal/PlatformUtils.Runtime.html | 229 + .../bitcoinj/base/internal/PlatformUtils.html | 260 + .../bitcoinj/base/internal/Preconditions.html | 253 + .../org/bitcoinj/base/internal/Stopwatch.html | 258 + .../bitcoinj/base/internal/StreamUtils.html | 167 + .../org/bitcoinj/base/internal/TimeUtils.html | 292 + .../base/internal/package-summary.html | 162 + .../bitcoinj/base/internal/package-tree.html | 108 + .../org/bitcoinj/base/package-summary.html | 201 + .../org/bitcoinj/base/package-tree.html | 119 + .../org/bitcoinj/base/utils/Fiat.html | 521 + .../bitcoinj/base/utils/MonetaryFormat.html | 748 + .../bitcoinj/base/utils/package-summary.html | 106 + .../org/bitcoinj/base/utils/package-tree.html | 72 + .../core/AbstractBlockChain.NewBlockType.html | 228 + .../org/bitcoinj/core/AbstractBlockChain.html | 1077 ++ .../org/bitcoinj/core/AddressMessage.html | 268 + .../org/bitcoinj/core/AddressV1Message.html | 224 + .../org/bitcoinj/core/AddressV2Message.html | 226 + .../org/bitcoinj/core/BaseMessage.html | 229 + ...BitcoinSerializer.BitcoinPacketHeader.html | 214 + .../org/bitcoinj/core/BitcoinSerializer.html | 554 + .../org/bitcoinj/core/Block.VerifyFlag.html | 218 + javadoc/0.17-rc1/org/bitcoinj/core/Block.html | 1169 ++ .../org/bitcoinj/core/BlockChain.html | 555 + .../org/bitcoinj/core/BlockLocator.html | 262 + .../core/BloomFilter.BloomUpdate.html | 234 + .../org/bitcoinj/core/BloomFilter.html | 490 + .../org/bitcoinj/core/CheckpointManager.html | 380 + .../0.17-rc1/org/bitcoinj/core/Context.html | 407 + .../org/bitcoinj/core/EmptyMessage.html | 220 + .../org/bitcoinj/core/FeeFilterMessage.html | 256 + .../org/bitcoinj/core/FilteredBlock.html | 355 + .../bitcoinj/core/FullPrunedBlockChain.html | 537 + .../org/bitcoinj/core/GetAddrMessage.html | 157 + .../org/bitcoinj/core/GetBlocksMessage.html | 323 + .../org/bitcoinj/core/GetDataMessage.html | 283 + .../org/bitcoinj/core/GetHeadersMessage.html | 254 + .../org/bitcoinj/core/HeadersMessage.html | 276 + .../core/InsufficientMoneyException.html | 217 + .../org/bitcoinj/core/InventoryItem.Type.html | 299 + .../org/bitcoinj/core/InventoryItem.html | 259 + .../org/bitcoinj/core/InventoryMessage.html | 348 + .../org/bitcoinj/core/ListMessage.html | 342 + .../bitcoinj/core/LockTime.HeightLock.html | 164 + .../org/bitcoinj/core/LockTime.TimeLock.html | 163 + .../0.17-rc1/org/bitcoinj/core/LockTime.html | 347 + .../org/bitcoinj/core/MemoryPoolMessage.html | 160 + .../0.17-rc1/org/bitcoinj/core/Message.html | 245 + .../org/bitcoinj/core/MessageSerializer.html | 454 + .../org/bitcoinj/core/NetworkParameters.html | 1424 ++ .../org/bitcoinj/core/NotFoundMessage.html | 248 + .../org/bitcoinj/core/PartialMerkleTree.html | 368 + javadoc/0.17-rc1/org/bitcoinj/core/Peer.html | 1289 ++ .../org/bitcoinj/core/PeerAddress.html | 469 + .../org/bitcoinj/core/PeerException.html | 166 + .../org/bitcoinj/core/PeerFilterProvider.html | 215 + .../core/PeerGroup.FilterRecalculateMode.html | 229 + .../0.17-rc1/org/bitcoinj/core/PeerGroup.html | 2004 +++ .../org/bitcoinj/core/PeerSocketHandler.html | 399 + javadoc/0.17-rc1/org/bitcoinj/core/Ping.html | 267 + javadoc/0.17-rc1/org/bitcoinj/core/Pong.html | 219 + .../org/bitcoinj/core/ProtocolException.html | 185 + .../org/bitcoinj/core/ProtocolVersion.html | 292 + .../org/bitcoinj/core/PrunedException.html | 181 + .../core/RejectMessage.RejectCode.html | 307 + .../org/bitcoinj/core/RejectMessage.html | 421 + .../core/RejectedTransactionException.html | 198 + .../org/bitcoinj/core/SendAddrV2Message.html | 159 + .../org/bitcoinj/core/SendHeadersMessage.html | 161 + .../0.17-rc1/org/bitcoinj/core/Services.html | 506 + .../org/bitcoinj/core/StoredBlock.html | 457 + .../bitcoinj/core/StoredUndoableBlock.html | 243 + .../bitcoinj/core/Transaction.Purpose.html | 284 + .../bitcoinj/core/Transaction.SigHash.html | 313 + .../org/bitcoinj/core/Transaction.html | 2188 +++ .../org/bitcoinj/core/TransactionBag.html | 190 + ...TransactionBroadcast.ProgressCallback.html | 137 + .../bitcoinj/core/TransactionBroadcast.html | 374 + .../bitcoinj/core/TransactionBroadcaster.html | 133 + .../TransactionConfidence.ConfidenceType.html | 285 + ...ctionConfidence.Listener.ChangeReason.html | 246 + .../core/TransactionConfidence.Listener.html | 158 + .../core/TransactionConfidence.Source.html | 241 + .../bitcoinj/core/TransactionConfidence.html | 650 + .../core/TransactionInput.ConnectMode.html | 221 + .../TransactionInput.ConnectionResult.html | 229 + .../org/bitcoinj/core/TransactionInput.html | 914 + .../bitcoinj/core/TransactionOutPoint.html | 540 + .../org/bitcoinj/core/TransactionOutput.html | 716 + .../core/TransactionOutputChanges.html | 171 + .../org/bitcoinj/core/TransactionWitness.html | 366 + .../org/bitcoinj/core/TxConfidenceTable.html | 306 + javadoc/0.17-rc1/org/bitcoinj/core/UTXO.html | 328 + .../org/bitcoinj/core/UTXOProvider.html | 183 + .../bitcoinj/core/UTXOProviderException.html | 172 + .../org/bitcoinj/core/UnknownMessage.html | 194 + javadoc/0.17-rc1/org/bitcoinj/core/Utils.html | 238 + ...cationException.BlockVersionOutOfDate.html | 163 + ...ationException.CoinbaseHeightMismatch.html | 163 + ...xception.CoinbaseScriptSizeOutOfRange.html | 163 + ...ificationException.DuplicatedOutPoint.html | 163 + ...icationException.EmptyInputsOrOutputs.html | 163 + .../VerificationException.ExcessiveValue.html | 163 + ...ationException.LargerThanMaxBlockSize.html | 163 + ...ficationException.NegativeValueOutput.html | 163 + ...cationException.NoncanonicalSignature.html | 163 + ...tionException.UnexpectedCoinbaseInput.html | 163 + .../bitcoinj/core/VerificationException.html | 220 + .../org/bitcoinj/core/VersionAck.html | 157 + .../org/bitcoinj/core/VersionMessage.html | 660 + .../org/bitcoinj/core/internal/TorUtils.html | 210 + .../core/internal/package-summary.html | 101 + .../bitcoinj/core/internal/package-tree.html | 71 + .../core/listeners/AddressEventListener.html | 137 + .../BlockchainDownloadEventListener.html | 106 + .../BlocksDownloadedEventListener.html | 155 + .../ChainDownloadStartedEventListener.html | 145 + .../listeners/DownloadProgressTracker.html | 291 + .../core/listeners/GetDataEventListener.html | 141 + .../core/listeners/NewBestBlockListener.html | 147 + .../OnTransactionBroadcastListener.html | 130 + .../listeners/PeerConnectedEventListener.html | 136 + .../core/listeners/PeerDataEventListener.html | 113 + .../PeerDisconnectedEventListener.html | 138 + .../PeerDiscoveredEventListener.html | 134 + .../PreMessageReceivedEventListener.html | 142 + .../core/listeners/ReorganizeListener.html | 148 + .../TransactionConfidenceEventListener.html | 157 + .../TransactionReceivedInBlockListener.html | 193 + .../core/listeners/package-summary.html | 177 + .../bitcoinj/core/listeners/package-tree.html | 107 + .../org/bitcoinj/core/package-summary.html | 481 + .../org/bitcoinj/core/package-tree.html | 230 + .../0.17-rc1/org/bitcoinj/crypto/AesKey.html | 249 + ...IP38PrivateKey.BadPassphraseException.html | 150 + .../org/bitcoinj/crypto/BIP38PrivateKey.html | 305 + .../org/bitcoinj/crypto/ChildNumber.html | 416 + .../crypto/DeterministicHierarchy.html | 344 + .../org/bitcoinj/crypto/DeterministicKey.html | 1271 ++ .../org/bitcoinj/crypto/DumpedPrivateKey.html | 248 + .../bitcoinj/crypto/ECKey.ECDSASignature.html | 305 + .../crypto/ECKey.KeyIsEncryptedException.html | 154 + .../ECKey.MissingPrivateKeyException.html | 156 + .../0.17-rc1/org/bitcoinj/crypto/ECKey.html | 1654 ++ .../bitcoinj/crypto/EncodedPrivateKey.html | 274 + .../org/bitcoinj/crypto/EncryptableItem.html | 201 + .../org/bitcoinj/crypto/EncryptedData.html | 233 + .../crypto/HDDerivationException.html | 148 + .../HDKeyDerivation.PublicDeriveMode.html | 221 + .../crypto/HDKeyDerivation.RawKeyBytes.html | 171 + .../org/bitcoinj/crypto/HDKeyDerivation.html | 373 + .../0.17-rc1/org/bitcoinj/crypto/HDPath.html | 639 + .../0.17-rc1/org/bitcoinj/crypto/HDUtils.html | 161 + .../org/bitcoinj/crypto/KeyCrypter.html | 205 + ...KeyCrypterException.InvalidCipherText.html | 175 + ...rypterException.PublicPrivateMismatch.html | 175 + .../bitcoinj/crypto/KeyCrypterException.html | 193 + .../org/bitcoinj/crypto/KeyCrypterScrypt.html | 435 + .../org/bitcoinj/crypto/LazyECPoint.html | 515 + .../bitcoinj/crypto/LinuxSecureRandom.html | 209 + .../org/bitcoinj/crypto/MnemonicCode.html | 326 + ...icException.MnemonicChecksumException.html | 162 + ...onicException.MnemonicLengthException.html | 162 + ...emonicException.MnemonicWordException.html | 194 + .../bitcoinj/crypto/MnemonicException.html | 186 + .../org/bitcoinj/crypto/PBKDF2SHA512.html | 187 + .../crypto/SignatureDecodeException.html | 172 + .../bitcoinj/crypto/TransactionSignature.html | 358 + ...stStoreLoader.DefaultTrustStoreLoader.html | 194 + ...TrustStoreLoader.FileTrustStoreLoader.html | 200 + .../org/bitcoinj/crypto/TrustStoreLoader.html | 203 + .../org/bitcoinj/crypto/X509Utils.html | 199 + .../bitcoinj/crypto/internal/CryptoUtils.html | 186 + .../crypto/internal/package-summary.html | 101 + .../crypto/internal/package-tree.html | 71 + .../org/bitcoinj/crypto/package-summary.html | 258 + .../org/bitcoinj/crypto/package-tree.html | 173 + .../crypto/utils/MessageVerifyUtils.html | 191 + .../crypto/utils/package-summary.html | 102 + .../bitcoinj/crypto/utils/package-tree.html | 71 + .../jni/NativeBlockChainListener.html | 343 + .../bitcoinj/jni/NativeFutureCallback.html | 228 + .../jni/NativeKeyChainEventListener.html | 218 + .../jni/NativeScriptsChangeEventListener.html | 220 + ...iveTransactionConfidenceEventListener.html | 240 + .../NativeTransactionConfidenceListener.html | 223 + .../jni/NativeWalletChangeEventListener.html | 230 + ...ativeWalletCoinsReceivedEventListener.html | 232 + .../NativeWalletCoinsSentEventListener.html | 235 + .../NativeWalletReorganizeEventListener.html | 222 + .../org/bitcoinj/jni/package-summary.html | 120 + .../org/bitcoinj/jni/package-tree.html | 80 + .../org/bitcoinj/kits/WalletAppKit.html | 976 + .../org/bitcoinj/kits/package-summary.html | 88 + .../org/bitcoinj/kits/package-tree.html | 75 + .../bitcoinj/net/AbstractTimeoutHandler.html | 239 + .../org/bitcoinj/net/BlockingClient.html | 255 + .../bitcoinj/net/BlockingClientManager.html | 307 + .../bitcoinj/net/ClientConnectionManager.html | 180 + .../org/bitcoinj/net/FilterMerger.Result.html | 178 + .../org/bitcoinj/net/FilterMerger.html | 214 + .../org/bitcoinj/net/MessageWriteTarget.html | 152 + .../0.17-rc1/org/bitcoinj/net/NioClient.html | 214 + .../org/bitcoinj/net/NioClientManager.html | 270 + .../0.17-rc1/org/bitcoinj/net/NioServer.html | 215 + .../org/bitcoinj/net/SocketTimeoutTask.html | 200 + .../org/bitcoinj/net/StreamConnection.html | 206 + .../bitcoinj/net/StreamConnectionFactory.html | 136 + .../org/bitcoinj/net/TimeoutHandler.html | 158 + .../DnsDiscovery.DnsSeedDiscovery.html | 239 + .../bitcoinj/net/discovery/DnsDiscovery.html | 268 + .../net/discovery/MultiplexingDiscovery.html | 374 + .../bitcoinj/net/discovery/PeerDiscovery.html | 183 + .../net/discovery/PeerDiscoveryException.html | 172 + .../org/bitcoinj/net/discovery/SeedPeers.html | 270 + .../net/discovery/package-summary.html | 126 + .../bitcoinj/net/discovery/package-tree.html | 92 + .../org/bitcoinj/net/package-summary.html | 162 + .../org/bitcoinj/net/package-tree.html | 101 + .../bitcoinj/params/BitcoinNetworkParams.html | 505 + .../org/bitcoinj/params/MainNetParams.html | 273 + .../org/bitcoinj/params/Networks.html | 231 + .../org/bitcoinj/params/RegTestParams.html | 227 + .../org/bitcoinj/params/SigNetParams.html | 275 + .../org/bitcoinj/params/TestNet3Params.html | 304 + .../org/bitcoinj/params/UnitTestParams.html | 274 + .../org/bitcoinj/params/package-summary.html | 114 + .../org/bitcoinj/params/package-tree.html | 84 + .../payments/PaymentProtocol.Ack.html | 142 + .../payments/PaymentProtocol.Output.html | 174 + .../PaymentProtocol.PkiVerificationData.html | 208 + .../protocols/payments/PaymentProtocol.html | 664 + .../PaymentProtocolException.Expired.html | 161 + ...ymentProtocolException.InvalidNetwork.html | 161 + ...ymentProtocolException.InvalidOutputs.html | 161 + ...colException.InvalidPaymentRequestURL.html | 169 + ...ntProtocolException.InvalidPaymentURL.html | 169 + ...ymentProtocolException.InvalidPkiData.html | 169 + ...ymentProtocolException.InvalidPkiType.html | 161 + ...ymentProtocolException.InvalidVersion.html | 161 + ...colException.PkiVerificationException.html | 208 + .../payments/PaymentProtocolException.html | 197 + .../protocols/payments/PaymentSession.html | 680 + .../protocols/payments/package-summary.html | 131 + .../protocols/payments/package-tree.html | 96 + .../bitcoinj/script/Script.VerifyFlag.html | 295 + .../0.17-rc1/org/bitcoinj/script/Script.html | 971 + .../org/bitcoinj/script/ScriptBuilder.html | 847 + .../org/bitcoinj/script/ScriptChunk.html | 335 + .../org/bitcoinj/script/ScriptError.html | 555 + .../org/bitcoinj/script/ScriptException.html | 204 + .../org/bitcoinj/script/ScriptOpCodes.html | 2192 +++ .../org/bitcoinj/script/ScriptPattern.html | 374 + .../org/bitcoinj/script/package-summary.html | 117 + .../org/bitcoinj/script/package-tree.html | 107 + ...stomTransactionSigner.SignatureAndKey.html | 171 + .../signers/CustomTransactionSigner.html | 228 + .../signers/LocalTransactionSigner.html | 211 + .../signers/MissingSigResolutionSigner.html | 214 + ...ctionSigner.MissingSignatureException.html | 152 + ...TransactionSigner.ProposedTransaction.html | 178 + .../bitcoinj/signers/TransactionSigner.html | 174 + .../org/bitcoinj/signers/package-summary.html | 116 + .../org/bitcoinj/signers/package-tree.html | 94 + .../org/bitcoinj/store/BlockStore.html | 222 + .../bitcoinj/store/BlockStoreException.html | 169 + .../store/ChainFileLockedException.html | 157 + .../bitcoinj/store/FullPrunedBlockStore.html | 390 + .../org/bitcoinj/store/MemoryBlockStore.html | 258 + ...ckStore.StoredBlockAndWasUndoableFlag.html | 171 + .../store/MemoryFullPrunedBlockStore.html | 621 + .../org/bitcoinj/store/SPVBlockStore.html | 480 + .../org/bitcoinj/store/package-summary.html | 121 + .../org/bitcoinj/store/package-tree.html | 102 + .../testing/FakeTxBuilder.BlockPair.html | 171 + .../testing/FakeTxBuilder.DoubleSpends.html | 178 + .../org/bitcoinj/testing/FakeTxBuilder.html | 583 + .../org/bitcoinj/testing/MockAltNetwork.html | 322 + .../testing/MockAltNetworkParams.html | 368 + .../org/bitcoinj/testing/package-summary.html | 96 + .../org/bitcoinj/testing/package-tree.html | 79 + .../0.17-rc1/org/bitcoinj/uri/BitcoinURI.html | 593 + .../uri/BitcoinURIParseException.html | 167 + .../uri/OptionalFieldValidationException.html | 167 + .../uri/RequiredFieldValidationException.html | 168 + .../org/bitcoinj/uri/package-summary.html | 105 + .../org/bitcoinj/uri/package-tree.html | 85 + .../org/bitcoinj/utils/AppDataDirectory.html | 196 + .../bitcoinj/utils/BaseTaggableObject.html | 279 + .../BlockFileLoader.BlockFileIterator.html | 212 + .../org/bitcoinj/utils/BlockFileLoader.html | 308 + .../org/bitcoinj/utils/BriefLogFormatter.html | 207 + .../bitcoinj/utils/BtcAutoFormat.Style.html | 229 + .../org/bitcoinj/utils/BtcAutoFormat.html | 334 + .../org/bitcoinj/utils/BtcFixedFormat.html | 436 + .../org/bitcoinj/utils/BtcFormat.Builder.html | 372 + .../org/bitcoinj/utils/BtcFormat.html | 1772 ++ .../ContextPropagatingThreadFactory.html | 179 + .../bitcoinj/utils/DaemonThreadFactory.html | 178 + .../org/bitcoinj/utils/ExchangeRate.html | 262 + .../utils/ExponentialBackoff.Params.html | 153 + .../bitcoinj/utils/ExponentialBackoff.html | 309 + .../utils/ListenableCompletableFuture.html | 266 + .../utils/ListenableCompletionStage.html | 157 + .../bitcoinj/utils/ListenerRegistration.html | 213 + .../org/bitcoinj/utils/TaggableObject.html | 194 + .../bitcoinj/utils/Threading.UserThread.html | 232 + .../org/bitcoinj/utils/Threading.html | 338 + .../org/bitcoinj/utils/VersionTally.html | 235 + .../org/bitcoinj/utils/package-summary.html | 181 + .../org/bitcoinj/utils/package-tree.html | 142 + .../wallet/AllRandomKeysRotating.html | 150 + .../wallet/AllowUnconfirmedCoinSelector.html | 186 + .../bitcoinj/wallet/BasicKeyChain.State.html | 230 + .../org/bitcoinj/wallet/BasicKeyChain.html | 774 + .../org/bitcoinj/wallet/CoinSelection.html | 250 + .../org/bitcoinj/wallet/CoinSelector.html | 162 + .../org/bitcoinj/wallet/DecryptingKeyBag.html | 269 + .../bitcoinj/wallet/DefaultCoinSelector.html | 249 + .../wallet/DefaultKeyChainFactory.html | 240 + .../wallet/DefaultRiskAnalysis.Analyzer.html | 175 + .../DefaultRiskAnalysis.RuleViolation.html | 255 + .../bitcoinj/wallet/DefaultRiskAnalysis.html | 321 + .../wallet/DeterministicKeyChain.Builder.html | 444 + .../wallet/DeterministicKeyChain.html | 1303 ++ .../bitcoinj/wallet/DeterministicSeed.html | 746 + ...DeterministicUpgradeRequiredException.html | 150 + .../DeterministicUpgradeRequiresPassword.html | 151 + .../bitcoinj/wallet/EncryptableKeyChain.html | 237 + .../wallet/FilteringCoinSelector.html | 216 + .../0.17-rc1/org/bitcoinj/wallet/KeyBag.html | 181 + .../bitcoinj/wallet/KeyChain.KeyPurpose.html | 237 + .../org/bitcoinj/wallet/KeyChain.html | 325 + .../org/bitcoinj/wallet/KeyChainFactory.html | 272 + .../wallet/KeyChainGroup.Builder.html | 269 + .../org/bitcoinj/wallet/KeyChainGroup.html | 1240 ++ .../wallet/KeyChainGroupStructure.html | 314 + .../bitcoinj/wallet/KeyTimeCoinSelector.html | 241 + .../org/bitcoinj/wallet/RedeemData.html | 217 + .../wallet/RiskAnalysis.Analyzer.html | 136 + .../bitcoinj/wallet/RiskAnalysis.Result.html | 229 + .../org/bitcoinj/wallet/RiskAnalysis.html | 154 + .../org/bitcoinj/wallet/SendRequest.html | 497 + ...UnreadableWalletException.BadPassword.html | 161 + ...readableWalletException.FutureVersion.html | 161 + ...nreadableWalletException.WrongNetwork.html | 161 + .../wallet/UnreadableWalletException.html | 183 + ...allet.BadWalletEncryptionKeyException.html | 156 + .../bitcoinj/wallet/Wallet.BalanceType.html | 264 + .../wallet/Wallet.CompletionException.html | 173 + .../Wallet.CouldNotAdjustDownwards.html | 126 + .../wallet/Wallet.DustySendRequested.html | 155 + .../Wallet.ExceededMaxTransactionSize.html | 155 + .../wallet/Wallet.MissingSigsMode.html | 242 + .../Wallet.MultipleOpReturnRequested.html | 155 + .../bitcoinj/wallet/Wallet.SendResult.html | 273 + .../0.17-rc1/org/bitcoinj/wallet/Wallet.html | 4799 +++++ .../org/bitcoinj/wallet/WalletExtension.html | 181 + .../bitcoinj/wallet/WalletFiles.Listener.html | 146 + .../org/bitcoinj/wallet/WalletFiles.html | 267 + ...alletProtobufSerializer.WalletFactory.html | 179 + .../wallet/WalletProtobufSerializer.html | 562 + .../wallet/WalletTransaction.Pool.html | 237 + .../bitcoinj/wallet/WalletTransaction.html | 185 + .../AbstractKeyChainEventListener.html | 174 + .../CurrentKeyChangeEventListener.html | 127 + .../listeners/KeyChainEventListener.html | 134 + .../listeners/ScriptsChangeEventListener.html | 141 + .../listeners/WalletChangeEventListener.html | 148 + .../WalletCoinsReceivedEventListener.html | 152 + .../WalletCoinsSentEventListener.html | 155 + .../WalletReorganizeEventListener.html | 139 + .../wallet/listeners/package-summary.html | 131 + .../wallet/listeners/package-tree.html | 83 + .../org/bitcoinj/wallet/package-summary.html | 313 + .../org/bitcoinj/wallet/package-tree.html | 169 + javadoc/0.17-rc1/overview-summary.html | 25 + javadoc/0.17-rc1/overview-tree.html | 678 + javadoc/0.17-rc1/package-search-index.js | 1 + javadoc/0.17-rc1/resources/glass.png | Bin 0 -> 499 bytes javadoc/0.17-rc1/resources/x.png | Bin 0 -> 394 bytes .../0.17-rc1/script-dir/jquery-3.7.1.min.js | 2 + javadoc/0.17-rc1/script-dir/jquery-ui.min.css | 6 + javadoc/0.17-rc1/script-dir/jquery-ui.min.js | 6 + javadoc/0.17-rc1/script.js | 132 + javadoc/0.17-rc1/search.js | 354 + javadoc/0.17-rc1/serialized-form.html | 732 + javadoc/0.17-rc1/stylesheet.css | 869 + javadoc/0.17-rc1/tag-search-index.js | 1 + javadoc/0.17-rc1/type-search-index.js | 1 + pre-release-notes.md | 14 + 445 files changed, 147187 insertions(+) create mode 100644 javadoc/0.17-rc1/allclasses-index.html create mode 100644 javadoc/0.17-rc1/allpackages-index.html create mode 100644 javadoc/0.17-rc1/constant-values.html create mode 100644 javadoc/0.17-rc1/deprecated-list.html create mode 100644 javadoc/0.17-rc1/element-list create mode 100644 javadoc/0.17-rc1/help-doc.html create mode 100644 javadoc/0.17-rc1/index-all.html create mode 100644 javadoc/0.17-rc1/index.html create mode 100644 javadoc/0.17-rc1/jquery-ui.overrides.css create mode 100644 javadoc/0.17-rc1/legal/ASSEMBLY_EXCEPTION create mode 100644 javadoc/0.17-rc1/legal/jquery.md create mode 100644 javadoc/0.17-rc1/legal/jqueryUI.md create mode 100644 javadoc/0.17-rc1/member-search-index.js create mode 100644 javadoc/0.17-rc1/module-search-index.js create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/Address.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/AddressParser.AddressParserProvider.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/AddressParser.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/Base58.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/Bech32.Bech32Bytes.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/Bech32.Bech32Data.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/Bech32.Encoding.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/Bech32.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/BitcoinNetwork.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/Coin.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/LegacyAddress.AddressHeader.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/LegacyAddress.P2SHHeader.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/LegacyAddress.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/Monetary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/Network.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/ScriptType.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/SegwitAddress.SegwitHrp.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/SegwitAddress.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/Sha256Hash.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/VarInt.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.InvalidCharacter.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.InvalidChecksum.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.InvalidDataLength.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.InvalidPrefix.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.UnexpectedWitnessVersion.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.WrongNetwork.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/exceptions/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/exceptions/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/Buffers.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/ByteArray.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/ByteUtils.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/FutureUtils.ThrowingSupplier.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/FutureUtils.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/HexFormat.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/InternalUtils.Joiner.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/InternalUtils.Splitter.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/InternalUtils.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/PlatformUtils.OS.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/PlatformUtils.Runtime.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/PlatformUtils.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/Preconditions.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/Stopwatch.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/StreamUtils.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/TimeUtils.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/internal/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/utils/Fiat.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/utils/MonetaryFormat.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/utils/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/base/utils/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/AbstractBlockChain.NewBlockType.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/AbstractBlockChain.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/AddressMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/AddressV1Message.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/AddressV2Message.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/BaseMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/BitcoinSerializer.BitcoinPacketHeader.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/BitcoinSerializer.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/Block.VerifyFlag.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/Block.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/BlockChain.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/BlockLocator.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/BloomFilter.BloomUpdate.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/BloomFilter.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/CheckpointManager.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/Context.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/EmptyMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/FeeFilterMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/FilteredBlock.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/FullPrunedBlockChain.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/GetAddrMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/GetBlocksMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/GetDataMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/GetHeadersMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/HeadersMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/InsufficientMoneyException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/InventoryItem.Type.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/InventoryItem.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/InventoryMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/ListMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/LockTime.HeightLock.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/LockTime.TimeLock.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/LockTime.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/MemoryPoolMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/Message.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/MessageSerializer.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/NetworkParameters.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/NotFoundMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/PartialMerkleTree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/Peer.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/PeerAddress.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/PeerException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/PeerFilterProvider.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/PeerGroup.FilterRecalculateMode.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/PeerGroup.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/PeerSocketHandler.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/Ping.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/Pong.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/ProtocolException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/ProtocolVersion.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/PrunedException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/RejectMessage.RejectCode.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/RejectMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/RejectedTransactionException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/SendAddrV2Message.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/SendHeadersMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/Services.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/StoredBlock.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/StoredUndoableBlock.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/Transaction.Purpose.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/Transaction.SigHash.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/Transaction.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TransactionBag.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TransactionBroadcast.ProgressCallback.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TransactionBroadcast.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TransactionBroadcaster.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.ConfidenceType.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.Listener.ChangeReason.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.Listener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.Source.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TransactionInput.ConnectMode.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TransactionInput.ConnectionResult.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TransactionInput.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TransactionOutPoint.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TransactionOutput.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TransactionOutputChanges.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TransactionWitness.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/TxConfidenceTable.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/UTXO.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/UTXOProvider.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/UTXOProviderException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/UnknownMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/Utils.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.BlockVersionOutOfDate.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.CoinbaseHeightMismatch.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.CoinbaseScriptSizeOutOfRange.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.DuplicatedOutPoint.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.EmptyInputsOrOutputs.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.ExcessiveValue.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.LargerThanMaxBlockSize.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.NegativeValueOutput.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.NoncanonicalSignature.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.UnexpectedCoinbaseInput.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/VersionAck.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/VersionMessage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/internal/TorUtils.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/internal/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/internal/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/AddressEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/BlockchainDownloadEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/BlocksDownloadedEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/ChainDownloadStartedEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/DownloadProgressTracker.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/GetDataEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/NewBestBlockListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/OnTransactionBroadcastListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/PeerConnectedEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/PeerDataEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/PeerDisconnectedEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/PeerDiscoveredEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/PreMessageReceivedEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/ReorganizeListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/TransactionConfidenceEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/TransactionReceivedInBlockListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/listeners/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/core/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/AesKey.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/BIP38PrivateKey.BadPassphraseException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/BIP38PrivateKey.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/ChildNumber.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/DeterministicHierarchy.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/DeterministicKey.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/DumpedPrivateKey.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/ECKey.ECDSASignature.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/ECKey.KeyIsEncryptedException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/ECKey.MissingPrivateKeyException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/ECKey.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/EncodedPrivateKey.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/EncryptableItem.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/EncryptedData.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/HDDerivationException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/HDKeyDerivation.PublicDeriveMode.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/HDKeyDerivation.RawKeyBytes.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/HDKeyDerivation.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/HDPath.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/HDUtils.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypter.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypterException.InvalidCipherText.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypterException.PublicPrivateMismatch.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypterException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypterScrypt.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/LazyECPoint.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/LinuxSecureRandom.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicCode.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicException.MnemonicChecksumException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicException.MnemonicLengthException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicException.MnemonicWordException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/PBKDF2SHA512.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/SignatureDecodeException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/TransactionSignature.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/TrustStoreLoader.DefaultTrustStoreLoader.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/TrustStoreLoader.FileTrustStoreLoader.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/TrustStoreLoader.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/X509Utils.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/internal/CryptoUtils.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/internal/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/internal/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/utils/MessageVerifyUtils.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/utils/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/crypto/utils/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/jni/NativeBlockChainListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/jni/NativeFutureCallback.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/jni/NativeKeyChainEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/jni/NativeScriptsChangeEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/jni/NativeTransactionConfidenceEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/jni/NativeTransactionConfidenceListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/jni/NativeWalletChangeEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/jni/NativeWalletCoinsReceivedEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/jni/NativeWalletCoinsSentEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/jni/NativeWalletReorganizeEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/jni/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/jni/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/kits/WalletAppKit.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/kits/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/kits/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/AbstractTimeoutHandler.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/BlockingClient.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/BlockingClientManager.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/ClientConnectionManager.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/FilterMerger.Result.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/FilterMerger.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/MessageWriteTarget.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/NioClient.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/NioClientManager.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/NioServer.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/SocketTimeoutTask.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/StreamConnection.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/StreamConnectionFactory.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/TimeoutHandler.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/discovery/DnsDiscovery.DnsSeedDiscovery.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/discovery/DnsDiscovery.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/discovery/MultiplexingDiscovery.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/discovery/PeerDiscovery.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/discovery/PeerDiscoveryException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/discovery/SeedPeers.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/discovery/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/discovery/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/net/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/params/BitcoinNetworkParams.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/params/MainNetParams.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/params/Networks.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/params/RegTestParams.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/params/SigNetParams.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/params/TestNet3Params.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/params/UnitTestParams.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/params/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/params/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocol.Ack.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocol.Output.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocol.PkiVerificationData.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocol.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.Expired.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidNetwork.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidOutputs.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPaymentRequestURL.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPaymentURL.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPkiData.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPkiType.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidVersion.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.PkiVerificationException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentSession.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/protocols/payments/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/script/Script.VerifyFlag.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/script/Script.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/script/ScriptBuilder.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/script/ScriptChunk.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/script/ScriptError.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/script/ScriptException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/script/ScriptOpCodes.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/script/ScriptPattern.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/script/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/script/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/signers/CustomTransactionSigner.SignatureAndKey.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/signers/CustomTransactionSigner.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/signers/LocalTransactionSigner.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/signers/MissingSigResolutionSigner.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/signers/TransactionSigner.MissingSignatureException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/signers/TransactionSigner.ProposedTransaction.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/signers/TransactionSigner.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/signers/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/signers/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/store/BlockStore.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/store/BlockStoreException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/store/ChainFileLockedException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/store/FullPrunedBlockStore.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/store/MemoryBlockStore.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/store/MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/store/MemoryFullPrunedBlockStore.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/store/SPVBlockStore.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/store/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/store/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/testing/FakeTxBuilder.BlockPair.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/testing/FakeTxBuilder.DoubleSpends.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/testing/FakeTxBuilder.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/testing/MockAltNetwork.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/testing/MockAltNetworkParams.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/testing/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/testing/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/uri/BitcoinURI.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/uri/BitcoinURIParseException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/uri/OptionalFieldValidationException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/uri/RequiredFieldValidationException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/uri/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/uri/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/AppDataDirectory.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/BaseTaggableObject.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/BlockFileLoader.BlockFileIterator.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/BlockFileLoader.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/BriefLogFormatter.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/BtcAutoFormat.Style.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/BtcAutoFormat.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/BtcFixedFormat.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/BtcFormat.Builder.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/BtcFormat.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/ContextPropagatingThreadFactory.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/DaemonThreadFactory.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/ExchangeRate.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/ExponentialBackoff.Params.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/ExponentialBackoff.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/ListenableCompletableFuture.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/ListenableCompletionStage.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/ListenerRegistration.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/TaggableObject.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/Threading.UserThread.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/Threading.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/VersionTally.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/utils/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/AllRandomKeysRotating.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/AllowUnconfirmedCoinSelector.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/BasicKeyChain.State.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/BasicKeyChain.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/CoinSelection.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/CoinSelector.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/DecryptingKeyBag.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultCoinSelector.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultKeyChainFactory.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultRiskAnalysis.Analyzer.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultRiskAnalysis.RuleViolation.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultRiskAnalysis.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicKeyChain.Builder.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicKeyChain.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicSeed.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicUpgradeRequiredException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicUpgradeRequiresPassword.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/EncryptableKeyChain.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/FilteringCoinSelector.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/KeyBag.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChain.KeyPurpose.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChain.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChainFactory.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChainGroup.Builder.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChainGroup.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChainGroupStructure.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/KeyTimeCoinSelector.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/RedeemData.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/RiskAnalysis.Analyzer.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/RiskAnalysis.Result.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/RiskAnalysis.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/SendRequest.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/UnreadableWalletException.BadPassword.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/UnreadableWalletException.FutureVersion.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/UnreadableWalletException.WrongNetwork.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/UnreadableWalletException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.BadWalletEncryptionKeyException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.BalanceType.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.CompletionException.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.CouldNotAdjustDownwards.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.DustySendRequested.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.ExceededMaxTransactionSize.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.MissingSigsMode.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.MultipleOpReturnRequested.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.SendResult.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/WalletExtension.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/WalletFiles.Listener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/WalletFiles.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/WalletProtobufSerializer.WalletFactory.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/WalletProtobufSerializer.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/WalletTransaction.Pool.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/WalletTransaction.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/AbstractKeyChainEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/CurrentKeyChangeEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/KeyChainEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/ScriptsChangeEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/WalletChangeEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/WalletCoinsSentEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/WalletReorganizeEventListener.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/package-tree.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/package-summary.html create mode 100644 javadoc/0.17-rc1/org/bitcoinj/wallet/package-tree.html create mode 100644 javadoc/0.17-rc1/overview-summary.html create mode 100644 javadoc/0.17-rc1/overview-tree.html create mode 100644 javadoc/0.17-rc1/package-search-index.js create mode 100644 javadoc/0.17-rc1/resources/glass.png create mode 100644 javadoc/0.17-rc1/resources/x.png create mode 100644 javadoc/0.17-rc1/script-dir/jquery-3.7.1.min.js create mode 100644 javadoc/0.17-rc1/script-dir/jquery-ui.min.css create mode 100644 javadoc/0.17-rc1/script-dir/jquery-ui.min.js create mode 100644 javadoc/0.17-rc1/script.js create mode 100644 javadoc/0.17-rc1/search.js create mode 100644 javadoc/0.17-rc1/serialized-form.html create mode 100644 javadoc/0.17-rc1/stylesheet.css create mode 100644 javadoc/0.17-rc1/tag-search-index.js create mode 100644 javadoc/0.17-rc1/type-search-index.js diff --git a/javadoc/0.17-rc1/allclasses-index.html b/javadoc/0.17-rc1/allclasses-index.html new file mode 100644 index 000000000..3469beafb --- /dev/null +++ b/javadoc/0.17-rc1/allclasses-index.html @@ -0,0 +1,1510 @@ + + + + +All Classes and Interfaces (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

All Classes and Interfaces

+
+
+
+
+
+
Class
+
Description
+ +
+
An AbstractBlockChain holds a series of Block objects, links them together, and knows how to verify that + the chain follows the rules of the NetworkParameters for this chain.
+
+ +
+
Indicates whether new Block was on the best chain or not
+
+ +
 
+ +
Deprecated. +
Don't extend this class, implement TimeoutHandler using SocketTimeoutTask instead
+
+ +
+
Interface for addresses, e.g.
+
+ +
+
Implementors can listen to addresses being received from remote peers.
+
+ +
 
+ +
+
This exception is thrown by Base58, Bech32 and the EncodedPrivateKey hierarchy of + classes when you try to decode data and a character isn't valid.
+
+ +
+
This exception is thrown by Base58, Bech32 and the EncodedPrivateKey hierarchy of + classes when you try to decode data and the checksum isn't valid.
+
+ +
+
This exception is thrown by Base58, Bech32 and the EncodedPrivateKey hierarchy of + classes when you try to decode data and the data isn't of the right size.
+
+ +
+
This exception is thrown by the EncodedPrivateKey hierarchy of classes when you try and decode an + address or private key with an invalid prefix (version header or human-readable part).
+
+ +
+
This exception is thrown by SegwitAddress when you try to decode data and the witness version doesn't + match the Bech32 encoding as per BIP350.
+
+ +
+
This exception is thrown by the EncodedPrivateKey hierarchy of classes when you try and decode an + address with a prefix (version header or human-readable part) that used by another network (usually: mainnet vs + testnet).
+
+ +
+
Abstract superclass for address messages on the P2P network, which contain network addresses of other peers.
+
+ +
+
Functional interface for parsing an Address.
+
+ +
+
Interface implemented by custom address parser providers.
+
+ +
+
Represents an "addr" message on the P2P network, which contains broadcast IP addresses of other peers.
+
+ +
+
Represents an "addrv2" message on the P2P network, which contains broadcast addresses of other peers.
+
+ +
+
Wrapper for a byte[] containing an AES Key.
+
+ +
+
This coin selector will select any transaction at all, regardless of where it came from or whether it was + confirmed yet.
+
+ +
+
Indicates that an attempt was made to upgrade a random wallet to deterministic, but there were no non-rotating + random keys to use as source material for the seed.
+
+ +
+
Find/create App Data Directory in correct platform-specific location.
+
+ +
+
Base58 is a way to encode Bitcoin addresses (or arbitrary data) as alphanumeric strings.
+
+ +
+
A Message is a data structure that can be serialized/deserialized using the Bitcoin serialization format.
+
+ +
Deprecated. +
Applications should use another mechanism to persist application state data
+
+ +
+
A KeyChain that implements the simplest model possible: it can have keys imported into it, and just acts as + a dumb bag of keys.
+
+ +
+
Whether this basic key chain is empty, full of regular (usable for signing) keys, or full of watching keys.
+
+ +
+
Implementation of the Bech32 encoding.
+
+ +
+
Binary data in 5-bits-per-byte format as used in Bech32 encoding/decoding.
+
+ +
+
Bech32 data in 5-bit byte format with Bech32.Encoding and human-readable part (HRP) information.
+
+ +
+
Enumeration of known Bech32 encoding format types: Bech32 and Bech32m.
+
+ +
+
Implementation of BIP 38 + passphrase-protected private keys.
+
+ +
 
+ +
+
A convenient enum representation of a Bitcoin network.
+
+ +
+
Parameters for Bitcoin-like networks.
+
+ +
+
Methods to serialize and de-serialize messages to the Bitcoin network format as defined in + the protocol specification.
+
+ +
 
+ +
+
Provides a standard implementation of a Bitcoin URI with support for the following:
+
+ +
+
Exception to provide the following to BitcoinURI:
+
+ +
+
A block is a group of transactions, and is one of the fundamental data structures of the Bitcoin system.
+
+ +
+
Flags used to control which elements of block validation are done on + received blocks.
+
+ +
+
A BlockChain implements the simplified payment verification mode of the Bitcoin protocol.
+
+ +
+
Event Listener for blockchain download.
+
+ +
+
This class reads block files stored in the Bitcoin Core format.
+
+ +
+
Creates a simple connection to a server using a StreamConnection to process data.
+
+ +
+
A thin wrapper around a set of BlockingClients.
+
+ +
+
Represents Block Locator in GetBlocks and GetHeaders messages
+
+ +
+
Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, + they can pre-filter messages before they are processed by a Peer or PeerGroup, and they can + provide transactions to remote peers when they ask for them.
+
+ +
+
An implementor of BlockStore saves StoredBlock objects to disk.
+
+ +
+
Thrown when something goes wrong with storing a block.
+
+ +
+
A Bloom filter is a probabilistic data structure which can be sent to another client so that it can avoid + sending us transactions that aren't relevant to our set of keys.
+
+ +
+
The BLOOM_UPDATE_* constants control when the bloom filter is auto-updated by the peer using + it as a filter, either never, for all outputs or only for P2PK outputs (default)
+
+ +
+
A Java logging formatter that writes more compact output than the default.
+
+ +
+
This class, a concrete extension of BtcFormat, is distinguished by its + accommodation of multiple denominational units as follows:
+
+ +
+
Enum for specifying the style of currency indicators that are used + when formatting, either codes or symbols.
+
+ +
+
This class, a concrete extension of BtcFormat, is distinguished in that each + instance formats and by-default parses all Bitcoin monetary values in units of a single + denomination that is specified at the time that instance is constructed.
+
+ +
+
Instances of this class format and parse locale-specific numerical + representations of Bitcoin monetary values.
+
+ +
+
This class constructs new instances of BtcFormat, allowing for the + configuration of those instances before they are constructed.
+
+ +
+
Utility methods for common operations on Bitcoin P2P message buffers.
+
+ +
+
An effectively-immutable byte array.
+
+ +
+
Utility methods for bit, byte, and integer manipulation and conversion.
+
+ +
+
Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, + they can pre-filter messages before they are processed by a Peer or PeerGroup, and they can + provide transactions to remote peers when they ask for them.
+
+ +
+
Thrown by SPVBlockStore when the process cannot gain exclusive access to the chain file.
+
+ +
+
Vends hard-coded StoredBlocks for blocks throughout the chain.
+
+ +
+
This is just a wrapper for the i (child number) as per BIP 32 with a boolean getter for the most significant bit + and a getter for the actual 0-based child number.
+
+ +
+
A generic interface for an object which keeps track of a set of open client connections, creates new ones and + ensures they are serviced properly.
+
+ +
+
Represents a monetary Bitcoin value.
+
+ +
+
Represents the results of a CoinSelector.select(Coin, List) operation.
+
+ +
+
A CoinSelector is responsible for picking some outputs to spend, from the list of all possible outputs.
+
+ +
+
The Context object holds various objects and pieces of configuration that are scoped to a specific instantiation of + bitcoinj for a specific network.
+
+ +
+
A ThreadFactory that propagates a Context from the creating + thread into the new thread.
+
+ +
+
Utilities for the crypto module (e.g.
+
+ +
 
+ +
+
This signer may be used as a template for creating custom multisig transaction signers.
+
+ +
 
+ +
+
Thread factory whose threads are marked as daemon and won't prevent process exit.
+
+ +
+
A DecryptingKeyBag filters a pre-existing key bag, decrypting keys as they are requested using the provided + AES key.
+
+ +
+
This class implements a CoinSelector which attempts to get the highest priority + possible.
+
+ +
+
Default factory for creating keychains while de-serializing.
+
+ +
+
The default risk analysis.
+
+ +
 
+ +
+
The reason a transaction is considered non-standard, returned by + DefaultRiskAnalysis.isStandard(Transaction).
+
+ +
+
A DeterministicHierarchy calculates and keeps a whole tree (hierarchy) of keys originating from a single + root key.
+
+ +
+
A deterministic key is a node in a DeterministicHierarchy.
+
+ +
+
A deterministic key chain is a KeyChain that uses the + BIP 32 standard, as implemented by + DeterministicHierarchy, to derive all the keys in the keychain from a master seed.
+
+ +
 
+ +
+
Holds the seed bytes for the BIP32 deterministic wallet algorithm, inside a + DeterministicKeyChain.
+
+ +
+
Indicates that an attempt was made to use HD wallet features on a wallet that was deserialized from an old, + pre-HD random wallet without calling upgradeToDeterministic() beforehand.
+
+ +
+
Indicates that the pre-HD random wallet is encrypted, so you should try the upgrade again after getting the + users password.
+
+ +
+
Supports peer discovery through DNS.
+
+ +
+
Implements discovery from a single DNS host.
+
+ +
+
An implementation of BlockchainDownloadEventListener that listens to chain download events and tracks progress + as a percentage.
+
+ +
+
Parses and generates private keys in the form used by the Bitcoin "dumpprivkey" command.
+
+ +
+
Represents an elliptic curve public and (optionally) private key, usable for digital signatures but not encryption.
+
+ +
+
Groups the two components that make up a signature, and provides a way to encode to DER form, which is + how ECDSA signatures are represented when embedded in other data structures in the Bitcoin protocol.
+
+ +
 
+ +
 
+ +
+
Parent class for header only messages that don't have a payload.
+
+ +
+
Some form of string-encoded private key.
+
+ +
+
Provides a uniform way to access something that can be optionally encrypted with a + KeyCrypter, yielding an EncryptedData, and + which can have a creation time associated with it.
+
+ +
+
An encryptable key chain is a key-chain that can be encrypted with a user-provided password or AES key.
+
+ +
+
An instance of EncryptedData is a holder for an initialization vector and encrypted bytes.
+
+ +
+
An exchange rate is expressed as a ratio of a Coin and a Fiat amount.
+
+ +
+
Tracks successes and failures and calculates a time to retry the operation.
+
+ +
+
Parameters to configure a particular kind of exponential backoff.
+
+ +
+
Methods for building fake transactions for unit tests.
+
+ +
 
+ +
 
+ +
+
Represents a "feefilter" message on the P2P network, which instructs a peer to filter transaction invs for + transactions that fall below the feerate provided.
+
+ +
+
Represents a monetary fiat value.
+
+ +
+
A FilteredBlock is used to relay a block with its transactions filtered using a BloomFilter.
+
+ +
+
A filtering coin selector delegates to another coin selector, but won't select outputs spent by the given transactions.
+
+ +
+
A reusable object that will calculate, given a list of PeerFilterProviders, a merged + BloomFilter and earliest key time for all of them.
+
+ +
 
+ +
+
A FullPrunedBlockChain works in conjunction with a FullPrunedBlockStore to verify all the rules of the + Bitcoin system, with the downside being a large cost in system resources.
+
+ +
+
An implementor of FullPrunedBlockStore saves StoredBlock objects to some storage mechanism.
+
+ +
+
Utilities for CompletableFuture.
+
+ +
+
Subinterface of Supplier for Lambdas which throw exceptions.
+
+ +
+
Represents the "getaddr" P2P protocol message, which requests network AddressMessages from a peer.
+
+ +
+
Represents the "getblocks" P2P network message, which requests the hashes of the parts of the block chain we're + missing.
+
+ +
+
Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, + they can pre-filter messages before they are processed by a Peer or PeerGroup, and they can + provide transactions to remote peers when they ask for them.
+
+ +
+
Represents the "getdata" P2P network message, which requests the contents of blocks or transactions given their + hashes.
+
+ +
+
The "getheaders" command is structurally identical to "getblocks", but has different meaning.
+
+ +
 
+ +
+
Implementation of the BIP 32 + deterministic wallet child key generation algorithm.
+
+ +
 
+ +
 
+ +
+
HD Key derivation path.
+
+ +
+
Static utilities used in BIP 32 Hierarchical Deterministic Wallets (HDW).
+
+ +
+
A protocol message that contains a repeated series of block headers, sent in response to the "getheaders" command.
+
+ +
+
This class implements a subset of the functionality of the HexFormat class available in Java 17 and later.
+
+ +
+
Thrown to indicate that you don't have enough money available to perform the requested operation.
+
+ +
+
Utilities for internal use only.
+
+ +
+
A functional interface for joining Strings or Objects via Object.toString() using + a pre-configured delimiter.
+
+ +
+
A functional interface for splitting Strings using a pre-configured regular expression.
+
+ +
 
+ +
 
+ +
+
Represents the "inv" P2P network message.
+
+ +
+
A KeyBag is simply an object that can map public keys, their 160-bit hashes and script hashes to ECKey + and RedeemData objects.
+
+ +
+
A KeyChain is a class that stores a collection of keys for a Wallet.
+
+ +
 
+ +
 
+ +
+
Factory interface for creation keychains while de-serializing a wallet.
+
+ +
+
A KeyChainGroup is used by the Wallet and manages: a BasicKeyChain object + (which will normally be empty), and zero or more DeterministicKeyChains.
+
+ +
+
Builder for KeyChainGroup.
+
+ +
+
Defines a structure for hierarchical deterministic wallets.
+
+ +
+
A KeyCrypter can be used to encrypt and decrypt a message.
+
+ +
+
Exception to provide the following:
+
+ +
+
This exception is thrown when a private key or seed is decrypted, the decrypted message is damaged + (e.g.
+
+ +
+
This exception is thrown when a private key or seed is decrypted, it doesn't match its public key any + more.
+
+ +
+
This class encrypts and decrypts byte arrays and strings using scrypt as the + key derivation function and AES for the encryption.
+
+ +
+
A coin selector that takes all coins assigned to keys created before the given timestamp.
+
+ +
+
A wrapper around a SECP256K1 ECPoint that delays decoding of the point for as long as possible.
+
+ +
+
A Bitcoin address looks like 1MsScoe2fTJoq4ZPdQgqyhgWeoNamYPevy and is derived from an elliptic curve public key + plus a set of network parameters.
+
+ +
+
Address header of legacy P2PKH addresses for standard Bitcoin networks.
+
+ +
+
Address header of legacy P2SH addresses for standard Bitcoin networks.
+
+ +
+
A SecureRandom implementation that is able to override the standard JVM provided implementation, and which simply + serves random numbers by reading /dev/urandom.
+
+ +
+
A CompletableFuture that is also a ListenableFuture for migration + from Guava ListenableFuture to CompletableFuture.
+
+ +
+
A CompletionStage with a ListenableFuture-compatible interface to smooth migration + from Guava ListenableFuture to CompletableFuture/CompletionStage.
+
+ +
+
A simple wrapper around a listener and an executor, with some utility methods.
+
+ +
+
Abstract superclass of classes with list based payload, ie InventoryMessage and GetDataMessage.
+
+ +
+
TransactionSigner implementation for signing inputs using keys from provided KeyBag.
+
+ +
+
Wrapper for transaction lock time, specified either as a block height LockTime.HeightLock or as a timestamp + LockTime.TimeLock (in seconds since epoch).
+
+ +
+
A LockTime instance that contains a block height.
+
+ +
+
A LockTime instance that contains a timestamp.
+
+ +
+
Parameters for the main production network on which people trade goods and services.
+
+ +
+
Keeps StoredBlocks in memory.
+
+ +
+
Keeps StoredBlocks, StoredUndoableBlocks and UTXOs in memory.
+
+ +
 
+ +
+
The "mempool" message asks a remote peer to announce all transactions in its memory pool, possibly restricted by + any Bloom filter set on the connection.
+
+ +
+
A Message is a data structure that can be serialized/deserialized using the Bitcoin serialization format.
+
+ +
+
Generic interface for classes which serialize/deserialize messages.
+
+ +
+
Small utility class for verifying signatures of text messages created with + Bitcoin addresses (more precisely: with the private key of Bitcoin addresses).
+
+ +
+
A target to which messages can be written/connection can be closed
+
+ +
+
This transaction signer resolves missing signatures in accordance with the given Wallet.MissingSigsMode.
+
+ +
+
A MnemonicCode object may be used to convert between binary seed values and + lists of words per the BIP 39 + specification
+
+ +
+
Exceptions thrown by the MnemonicCode module.
+
+ +
+
Thrown when a list of MnemonicCode words fails the checksum check.
+
+ +
+
Thrown when an argument to MnemonicCode is the wrong length.
+
+ +
+
Thrown when a word is encountered which is not in the MnemonicCode's word list.
+
+ +
+
Mock Alt-net implementation of Network for unit tests.
+
+ +
+
Mock Alt-net subclass of NetworkParameters for unit tests.
+
+ +
+
Classes implementing this interface represent a monetary value, such as a Bitcoin or fiat amount.
+
+ +
+
+ Utility for formatting and parsing coin values to and from human-readable form.
+
+ +
+
MultiplexingDiscovery queries multiple PeerDiscovery objects, optionally shuffles their responses and then returns the results, + thus selecting randomly between them and reducing the influence of any particular seed.
+
+ +
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+ +
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+ +
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+ +
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+ +
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+ +
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+ +
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+ +
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+ +
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+ +
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+ +
+
Interface for a generic Bitcoin-like cryptocurrency network.
+
+ +
+
NetworkParameters contains the data needed for working with an instantiation of a Bitcoin chain.
+
+ +
+
Utility class that holds all the registered NetworkParameters types used for address auto discovery.
+
+ +
+
Listener interface for when a new block on the best chain is seen.
+
+ +
+
Creates a simple connection to a server using a StreamConnection to process data.
+
+ +
+
A class which manages a set of client connections.
+
+ +
+
Creates a simple server listener which listens for incoming client connections and uses a StreamConnection to + process data.
+
+ +
+
Sent by a peer when a getdata request doesn't find the requested data in the mempool.
+
+ +
+
Called when a new transaction is broadcast over the network.
+
+ +
+
Exception to provide the following to BitcoinURI:
+
+ +
+
A data structure that contains proofs of block inclusion for one or more transactions, in an efficient manner.
+
+ +
+
Utility methods and constants for working with + BIP 70 aka the payment protocol.
+
+ +
+
Message returned by the merchant in response to a Payment message.
+
+ +
+
Value object to hold amount/script pairs.
+
+ +
+
Information about the X.509 signature's issuer and subject.
+
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
+
Provides a standard implementation of the Payment Protocol (BIP 0070)
+
+ +
+
This is a clean-room implementation of PBKDF2 using RFC 2898 as a reference.
+
+ +
+
A Peer handles the high level communication with a Bitcoin node, extending a PeerSocketHandler which + handles low-level message (de)serialization.
+
+ +
+
A PeerAddress holds an IP address and port number representing the network location of + a peer in the Bitcoin P2P network.
+
+ +
+
Implementors can listen to events indicating a new peer connecting.
+
+ + + +
+
Implementors can listen to events indicating a peer disconnecting.
+
+ +
+
Implementors can listen to events for peers being discovered.
+
+ +
+
A PeerDiscovery object is responsible for finding addresses of other nodes in the Bitcoin P2P network.
+
+ +
 
+ +
+
Thrown when a problem occurs in communicating with a peer, and we should + retry.
+
+ +
+
An interface which provides the information required to properly filter data downloaded from Peers.
+
+ +
+
Runs a set of connections to the P2P network, brings up connections to replace disconnected nodes and manages + the interaction between them all.
+
+ +
 
+ +
+
Handles high-level message (de)serialization for peers, acting as the bridge between the + org.bitcoinj.net classes and Peer.
+
+ +
+
See BIP31 for details.
+
+ +
+
Utilities for determining platform information (OS and runtime)
+
+ +
 
+ +
 
+ +
+
See BIP31 for details.
+
+ +
 
+ +
+
Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, + they can pre-filter messages before they are processed by a Peer or PeerGroup, and they can + provide transactions to remote peers when they ask for them.
+
+ +
 
+ +
+
Define important versions of the Bitcoin Protocol
+
+ +
+
PrunedException is thrown in cases where a fully verifying node has deleted (pruned) old block data that turned + out to be necessary for handling a re-org.
+
+ +
+
This class aggregates data required to spend transaction output.
+
+ +
+
Network parameters for the regression test mode of bitcoind in which all blocks are trivially solvable.
+
+ +
+
This exception is used by the TransactionBroadcast class to indicate that a broadcast + Transaction has been rejected by the network, for example because it violates a + protocol rule.
+
+ +
+
A message sent by nodes when a message we sent was rejected (ie a transaction had too little fee/was invalid/etc).
+
+ +
 
+ +
+
Listener interface for when the best chain has changed.
+
+ +
+
Exception to provide the following to BitcoinURI:
+
+ +
+
A RiskAnalysis represents an analysis of how likely it is that a transaction (and its dependencies) represents a + possible double spending attack.
+
+ +
 
+ +
 
+ +
+
Programs embedded inside transactions that control redemption of payments.
+
+ + + +
+
Tools for the construction of commonly used script types.
+
+ +
+
A script element that is either a data push (signature, pubkey, etc) or a non-push (logic, numeric, etc) operation.
+
+ +
 
+ +
 
+ +
+
Various constants that define the assembly-like scripting language that forms part of the Bitcoin protocol.
+
+ +
+
This is a Script pattern matcher with some typical script patterns
+
+ +
+
Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money + or a block chain re-organize.
+
+ +
+
Supported Bitcoin script types and their script identifier strings.
+
+ +
+
SeedPeers stores a pre-determined list of Bitcoin node addresses.
+
+ +
+
Implementation of native segwit addresses.
+
+ +
+
Human-readable part (HRP) of Segwit addresses for standard Bitcoin networks.
+
+ +
+
Represents the sendaddrv2 P2P protocol message, which indicates that a node can understand and prefers + to receive addrv2 messages instead of addr messages.
+
+ +
+
+ A new message, "sendheaders", which indicates that a node prefers to receive new block announcements via a "headers" + message rather than an "inv".
+
+ +
+
A SendRequest gives the wallet information about precisely how to send money to a recipient or set of recipients.
+
+ +
+
Wrapper for services bitfield used in various messages of the Bitcoin protocol.
+
+ +
+
A Sha256Hash wraps a byte[] so that Sha256Hash.equals(java.lang.Object) and Sha256Hash.hashCode() work correctly, allowing it to be used as a key in a + map.
+
+ +
 
+ +
+
Parameters for the signet, a separate public instance of Bitcoin that has relaxed rules suitable for development + and testing of applications and new Bitcoin versions.
+
+ +
+
Component that implements the timeout capability of TimeoutHandler.
+
+ +
+
An SPVBlockStore holds a limited number of block headers in a memory mapped ring buffer.
+
+ +
+
A tool for measuring time, mainly for log messages.
+
+ +
+
Wraps a Block object with extra data that can be derived from the block chain but is slow or inconvenient to + calculate.
+
+ +
+
Contains minimal data necessary to disconnect/connect the transactions + in the stored block at will.
+
+ +
+
A generic handler which is used in NioServer, NioClient and BlockingClient to handle incoming + data streams.
+
+ +
+
A factory which generates new StreamConnections when a new connection is opened.
+
+ +
+
Stream Utilities.
+
+ +
Deprecated. +
Applications should use another mechanism to persist application state data
+
+ +
+
Parameters for the testnet, a separate public instance of Bitcoin that has relaxed rules suitable for development + and testing of applications and new Bitcoin versions.
+
+ +
+
Various threading related utilities.
+
+ +
 
+ +
+
Provides basic support for socket timeouts.
+
+ +
+
Utilities for time and mock time.
+
+ +
+
Utilities for encoding and decoding Onion addresses.
+
+ +
+
A transaction represents the movement of coins from some addresses to some other addresses.
+
+ +
+
This enum describes the underlying reason the transaction was created.
+
+ +
+
These constants are a part of a scriptSig signature on the inputs.
+
+ +
+
This interface is used to abstract the Wallet and the Transaction
+
+ +
+
Represents a single transaction broadcast that we are performing.
+
+ +
+
An interface for receiving progress information on the propagation of the tx, from 0.0 to 1.0
+
+ +
+
A general interface which declares the ability to broadcast transactions.
+
+ +
+
A TransactionConfidence object tracks data you can use to make a confidence decision about a transaction.
+
+ +
+
Describes the state of the transaction in general terms.
+
+ +
+
A confidence listener is informed when the level of TransactionConfidence is updated by something, like + for example a Wallet.
+
+ +
+
An enum that describes why a transaction confidence listener is being invoked (i.e.
+
+ +
+
Information about where the transaction was first seen (network, sent direct from peer, created by ourselves).
+
+ +
+
Implementors are called when confidence of a transaction changes.
+
+ +
+
A transfer of coins from one address to another creates a transaction in which the outputs + can be claimed by the recipient in the input of another transaction.
+
+ +
 
+ +
 
+ +
+
This message is a reference or pointer to an output of a different transaction.
+
+ +
+
A TransactionOutput message contains a scriptPubKey that controls who is able to spend its value.
+
+ +
+
TransactionOutputChanges represents a delta to the set of unspent outputs.
+
+ +
+
Listener interface for when we receive a new block that contains a relevant + transaction.
+
+ +
+
A TransactionSignature wraps an ECKey.ECDSASignature and adds methods for handling + the additional SIGHASH mode byte that is used.
+
+ +
+
Implementations of this interface are intended to sign inputs of the given transaction.
+
+ +
 
+ +
+
This class wraps transaction proposed to complete keeping a metadata that may be updated, used and effectively + shared by transaction signers.
+
+ +
 
+ +
+
An implementation of TrustStoreLoader handles fetching a KeyStore from the operating system, a file, etc.
+
+ +
 
+ +
 
+ +
+
Tracks transactions that are being announced across the network.
+
+ +
+
Network parameters used by the bitcoinj unit tests (and potentially your own).
+
+ +
+
Instances of this class are not safe for use by multiple threads.
+
+ +
+
Thrown by the WalletProtobufSerializer when the serialized protocol buffer is either corrupted, + internally inconsistent or appears to be from the future.
+
+ +
 
+ +
 
+ +
 
+ +
+
A collection of various utility methods that are helpful for working with the Bitcoin protocol.
+
+ +
+
A UTXO message contains the information necessary to check a spending transaction.
+
+ +
+
A UTXOProvider encapsulates functionality for returning unspent transaction outputs, + for use by the wallet or other code that crafts spends.
+
+ +
 
+ +
+
A variable-length encoded unsigned integer using Satoshi's encoding (a.k.a.
+
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
 
+ +
+
The verack message, sent by a client accepting the version message they + received from their peer.
+
+ +
+
A VersionMessage holds information exchanged during connection setup with another peer.
+
+ +
+
Caching counter for the block versions within a moving window.
+
+ +
+
A Wallet stores keys and a record of transactions that send and receive value from those keys.
+
+ +
+
Thrown if the private keys and seed of this wallet cannot be decrypted due to the supplied encryption + key or password being wrong.
+
+ +
+
It's possible to calculate a wallets balance from multiple points of view.
+
+ +
+
Class of exceptions thrown in Wallet.completeTx(SendRequest).
+
+ +
+
Thrown when we were trying to empty the wallet, and the total amount of money we were trying to empty after + being reduced for the fee was smaller than the min payment.
+
+ +
+
Thrown if the resultant transaction would violate the dust rules (an output that's too small to be worthwhile).
+
+ +
+
Thrown if the resultant transaction is too big for Bitcoin to process.
+
+ +
+
Enumerates possible resolutions for missing signatures.
+
+ +
+
Thrown if there is more than one OP_RETURN output for the resultant transaction.
+
+ +
+
A SendResult is returned to you as part of sending coins to a recipient.
+
+ +
+
Utility class that wraps the boilerplate needed to set up a new SPV bitcoinj app.
+
+ +
+
Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money + or a block chain re-organize.
+
+ +
+
Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money + or a block chain re-organize.
+
+ +
+
Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money + or a block chain re-organize.
+
+ +
+
An object implementing this interface can be added to a Wallet and provide arbitrary byte arrays that will + be serialized alongside the wallet.
+
+ +
+
A class that handles atomic and optionally delayed writing of the wallet file to disk.
+
+ +
+
Implementors can do pre/post treatment of the wallet file.
+
+ +
+
Serialize and de-serialize a wallet to a byte stream containing a + protocol buffer.
+
+ +
 
+ +
+
Implementors are called when the wallet is reorganized.
+
+ +
+
Stores data about a transaction that is only relevant to the Wallet class.
+
+ +
 
+ +
+
X509Utils provides tools for working with X.509 certificates and keystores, as used in the BIP 70 payment protocol.
+
+
+
+
+
+
+
+ + diff --git a/javadoc/0.17-rc1/allpackages-index.html b/javadoc/0.17-rc1/allpackages-index.html new file mode 100644 index 000000000..8b4318dca --- /dev/null +++ b/javadoc/0.17-rc1/allpackages-index.html @@ -0,0 +1,149 @@ + + + + +All Packages (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

All Packages

+
+
Package Summary
+
+
Package
+
Description
+ +
+
The base package provides foundational types for bitcoinj.
+
+ +
 
+ +
 
+ +
 
+ +
+
The core package contains classes for network messages like Block and + Transaction, peer connectivity via PeerGroup, + and block chain management.
+
+ +
 
+ +
 
+ +
+
The crypto package contains classes that work with key derivation algorithms like scrypt (passwords to AES keys), + BIP 32 hierarchies (chains of keys from a root seed), X.509 utilities for the payment protocol and other general + cryptography tasks.
+
+ +
 
+ +
 
+ +
 
+ +
+
High level wrapper APIs around the bitcoinj building blocks.
+
+ +
+
Classes handling low level network management using either NIO (async io) or older style blocking sockets (useful for + using SOCKS proxies, Tor, SSL etc).
+
+ +
+
Classes that know how to discover peers in the P2P network using DNS or HTTP.
+
+ +
+
Network parameters encapsulate some of the differences between different Bitcoin networks such as the main + network, the testnet, regtest mode, unit testing params and so on.
+
+ +
+
The BIP70 payment protocol wraps Bitcoin transactions and adds various useful features like memos, refund addresses + and authentication.
+
+ +
+
Classes for working with and executing Bitcoin script programs, as embedded in inputs and outputs.
+
+ +
+
Transaction signers know how to calculate signatures over transactions in different contexts, for example, using + local private keys or fetching them from remote servers.
+
+ +
+
Block stores persist blockchain data downloaded from remote peers.
+
+ +
 
+ +
+
Parsing and handling of bitcoin: textual URIs as found in qr codes and web links.
+
+ +
+
Formatting monetary amounts, representing exchange rates, a program for loading Bitcoin Core saved block files, + a class to control how bitcoinj uses threads and misc other utility classes that don't fit anywhere else.
+
+ +
+
Classes that support the Wallet, which knows how to find and save transactions relevant to + a set of keys or scripts, calculate balances, and spend money: the wallet has many features and can be extended + in various ways, please refer to the website for documentation on how to use it.
+
+ +
 
+
+
+
+
+ + diff --git a/javadoc/0.17-rc1/constant-values.html b/javadoc/0.17-rc1/constant-values.html new file mode 100644 index 000000000..957885faf --- /dev/null +++ b/javadoc/0.17-rc1/constant-values.html @@ -0,0 +1,1223 @@ + + + + +Constant Field Values (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Constant Field Values

+
+

Contents

+ +
+
+
+

org.bitcoinj.*

+ + + + + + + +
    +
  • +
    org.bitcoinj.script.Script
    +
    +
    Modifier and Type
    +
    Constant Field
    +
    Value
    +
    public static final int
    + +
    15
    +
    public static final int
    + +
    520
    +
    public static final int
    + +
    75
    +
    +
  • +
  • +
    org.bitcoinj.script.ScriptOpCodes
    +
    +
    Modifier and Type
    +
    Constant Field
    +
    Value
    +
    public static final int
    + +
    0
    +
    public static final int
    + +
    146
    +
    public static final int
    + +
    81
    +
    public static final int
    + +
    90
    +
    public static final int
    + +
    91
    +
    public static final int
    + +
    92
    +
    public static final int
    + +
    93
    +
    public static final int
    + +
    94
    +
    public static final int
    + +
    95
    +
    public static final int
    + +
    96
    +
    public static final int
    + +
    139
    +
    public static final int
    + +
    79
    +
    public static final int
    + +
    140
    +
    public static final int
    + +
    82
    +
    public static final int
    + +
    142
    +
    public static final int
    + +
    109
    +
    public static final int
    + +
    110
    +
    public static final int
    + +
    141
    +
    public static final int
    + +
    112
    +
    public static final int
    + +
    113
    +
    public static final int
    + +
    114
    +
    public static final int
    + +
    83
    +
    public static final int
    + +
    111
    +
    public static final int
    + +
    84
    +
    public static final int
    + +
    85
    +
    public static final int
    + +
    86
    +
    public static final int
    + +
    87
    +
    public static final int
    + +
    88
    +
    public static final int
    + +
    89
    +
    public static final int
    + +
    144
    +
    public static final int
    + +
    147
    +
    public static final int
    + +
    132
    +
    public static final int
    + +
    154
    +
    public static final int
    + +
    155
    +
    public static final int
    + +
    126
    +
    public static final int
    + +
    177
    +
    public static final int
    + +
    174
    +
    public static final int
    + +
    175
    +
    public static final int
    + +
    178
    +
    public static final int
    + +
    172
    +
    public static final int
    + +
    173
    +
    public static final int
    + +
    171
    +
    public static final int
    + +
    116
    +
    public static final int
    + +
    150
    +
    public static final int
    + +
    117
    +
    public static final int
    + +
    118
    +
    public static final int
    + +
    103
    +
    public static final int
    + +
    104
    +
    public static final int
    + +
    135
    +
    public static final int
    + +
    136
    +
    public static final int
    + +
    0
    +
    public static final int
    + +
    108
    +
    public static final int
    + +
    160
    +
    public static final int
    + +
    162
    +
    public static final int
    + +
    169
    +
    public static final int
    + +
    170
    +
    public static final int
    + +
    99
    +
    public static final int
    + +
    115
    +
    public static final int
    + +
    255
    +
    public static final int
    + +
    131
    +
    public static final int
    + +
    128
    +
    public static final int
    + +
    159
    +
    public static final int
    + +
    161
    +
    public static final int
    + +
    152
    +
    public static final int
    + +
    164
    +
    public static final int
    + +
    163
    +
    public static final int
    + +
    151
    +
    public static final int
    + +
    149
    +
    public static final int
    + +
    143
    +
    public static final int
    + +
    119
    +
    public static final int
    + +
    97
    +
    public static final int
    + +
    176
    +
    public static final int
    + +
    185
    +
    public static final int
    + +
    177
    +
    public static final int
    + +
    178
    +
    public static final int
    + +
    179
    +
    public static final int
    + +
    180
    +
    public static final int
    + +
    181
    +
    public static final int
    + +
    182
    +
    public static final int
    + +
    183
    +
    public static final int
    + +
    184
    +
    public static final int
    + +
    145
    +
    public static final int
    + +
    100
    +
    public static final int
    + +
    156
    +
    public static final int
    + +
    157
    +
    public static final int
    + +
    158
    +
    public static final int
    + +
    133
    +
    public static final int
    + +
    120
    +
    public static final int
    + +
    121
    +
    public static final int
    + +
    76
    +
    public static final int
    + +
    77
    +
    public static final int
    + +
    78
    +
    public static final int
    + +
    80
    +
    public static final int
    + +
    137
    +
    public static final int
    + +
    138
    +
    public static final int
    + +
    106
    +
    public static final int
    + +
    129
    +
    public static final int
    + +
    166
    +
    public static final int
    + +
    122
    +
    public static final int
    + +
    123
    +
    public static final int
    + +
    153
    +
    public static final int
    + +
    167
    +
    public static final int
    + +
    168
    +
    public static final int
    + +
    130
    +
    public static final int
    + +
    148
    +
    public static final int
    + +
    127
    +
    public static final int
    + +
    124
    +
    public static final int
    + +
    107
    +
    public static final int
    + +
    81
    +
    public static final int
    + +
    125
    +
    public static final int
    + +
    98
    +
    public static final int
    + +
    101
    +
    public static final int
    + +
    105
    +
    public static final int
    + +
    102
    +
    public static final int
    + +
    165
    +
    public static final int
    + +
    134
    +
    +
  • +
+ + + + + +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/deprecated-list.html b/javadoc/0.17-rc1/deprecated-list.html new file mode 100644 index 000000000..3745dadcf --- /dev/null +++ b/javadoc/0.17-rc1/deprecated-list.html @@ -0,0 +1,1255 @@ + + + + +Deprecated List (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Deprecated API

+

Contents

+ +
+ + + + + + +
+
+
+ + diff --git a/javadoc/0.17-rc1/element-list b/javadoc/0.17-rc1/element-list new file mode 100644 index 000000000..b779a1b74 --- /dev/null +++ b/javadoc/0.17-rc1/element-list @@ -0,0 +1,24 @@ +org.bitcoinj.base +org.bitcoinj.base.exceptions +org.bitcoinj.base.internal +org.bitcoinj.base.utils +org.bitcoinj.core +org.bitcoinj.core.internal +org.bitcoinj.core.listeners +org.bitcoinj.crypto +org.bitcoinj.crypto.internal +org.bitcoinj.crypto.utils +org.bitcoinj.jni +org.bitcoinj.kits +org.bitcoinj.net +org.bitcoinj.net.discovery +org.bitcoinj.params +org.bitcoinj.protocols.payments +org.bitcoinj.script +org.bitcoinj.signers +org.bitcoinj.store +org.bitcoinj.testing +org.bitcoinj.uri +org.bitcoinj.utils +org.bitcoinj.wallet +org.bitcoinj.wallet.listeners diff --git a/javadoc/0.17-rc1/help-doc.html b/javadoc/0.17-rc1/help-doc.html new file mode 100644 index 000000000..e931551e2 --- /dev/null +++ b/javadoc/0.17-rc1/help-doc.html @@ -0,0 +1,191 @@ + + + + +API Help (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+

JavaDoc Help

+ +
+
+

Navigation

+Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces + +
+
+
+

Kinds of Pages

+The following sections describe the different kinds of pages in this collection. +
+

Overview

+

The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

+
+
+

Package

+

Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:

+
    +
  • Interfaces
  • +
  • Classes
  • +
  • Enum Classes
  • +
  • Exceptions
  • +
  • Errors
  • +
  • Annotation Interfaces
  • +
+
+
+

Class or Interface

+

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.

+
    +
  • Class Inheritance Diagram
  • +
  • Direct Subclasses
  • +
  • All Known Subinterfaces
  • +
  • All Known Implementing Classes
  • +
  • Class or Interface Declaration
  • +
  • Class or Interface Description
  • +
+
+
    +
  • Nested Class Summary
  • +
  • Enum Constant Summary
  • +
  • Field Summary
  • +
  • Property Summary
  • +
  • Constructor Summary
  • +
  • Method Summary
  • +
  • Required Element Summary
  • +
  • Optional Element Summary
  • +
+
+
    +
  • Enum Constant Details
  • +
  • Field Details
  • +
  • Property Details
  • +
  • Constructor Details
  • +
  • Method Details
  • +
  • Element Details
  • +
+

Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.

+

The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

+
+
+

Other Files

+

Packages and modules may contain pages with additional information related to the declarations nearby.

+
+
+

Tree (Class Hierarchy)

+

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

+
    +
  • When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
  • +
  • When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
  • +
+
+
+

Deprecated API

+

The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to shortcomings, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

+
+
+

Constant Field Values

+

The Constant Field Values page lists the static final fields and their values.

+
+
+

Serialized Form

+

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See Also" section of the class description.

+
+
+

All Packages

+

The All Packages page contains an alphabetic index of all packages contained in the documentation.

+
+
+

All Classes and Interfaces

+

The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.

+
+
+

Index

+

The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.

+
+
+
+This help file applies to API documentation generated by the standard doclet.
+
+
+ + diff --git a/javadoc/0.17-rc1/index-all.html b/javadoc/0.17-rc1/index-all.html new file mode 100644 index 000000000..51e995fc8 --- /dev/null +++ b/javadoc/0.17-rc1/index-all.html @@ -0,0 +1,14844 @@ + + + + +Index (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+A B C D E F G H I J K L M N O P Q R S T U V W X Z 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form +

A

+
+
ABORT_ON_CONFLICT - Enum constant in enum class org.bitcoinj.core.TransactionInput.ConnectMode
+
 
+
abortDatabaseBatchWrite() - Method in interface org.bitcoinj.store.FullPrunedBlockStore
+
 
+
abortDatabaseBatchWrite() - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
AbstractBlockChain - Class in org.bitcoinj.core
+
+
An AbstractBlockChain holds a series of Block objects, links them together, and knows how to verify that + the chain follows the rules of the NetworkParameters for this chain.
+
+
AbstractBlockChain(Network, List<? extends Wallet>, BlockStore) - Constructor for class org.bitcoinj.core.AbstractBlockChain
+
+
Constructs a BlockChain connected to the given list of listeners (wallets) and a store.
+
+
AbstractBlockChain(NetworkParameters, List<? extends Wallet>, BlockStore) - Constructor for class org.bitcoinj.core.AbstractBlockChain
+
+
Constructs a BlockChain connected to the given list of listeners (wallets) and a store.
+
+
AbstractBlockChain.NewBlockType - Enum Class in org.bitcoinj.core
+
+
Indicates whether new Block was on the best chain or not
+
+
AbstractKeyChainEventListener - Class in org.bitcoinj.wallet.listeners
+
 
+
AbstractKeyChainEventListener() - Constructor for class org.bitcoinj.wallet.listeners.AbstractKeyChainEventListener
+
 
+
AbstractTimeoutHandler - Class in org.bitcoinj.net
+
+
Deprecated. +
Don't extend this class, implement TimeoutHandler using SocketTimeoutTask instead
+
+
+
AbstractTimeoutHandler() - Constructor for class org.bitcoinj.net.AbstractTimeoutHandler
+
+
Deprecated.
+
account(int) - Static method in interface org.bitcoinj.wallet.KeyChainGroupStructure
+
+
Return path component for an account
+
+
ACCOUNT_ONE_PATH - Static variable in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
ACCOUNT_ZERO_PATH - Static variable in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
accountPath - Variable in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
 
+
accountPath(List<ChildNumber>) - Method in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
+
Use an account path other than the default DeterministicKeyChain.ACCOUNT_ZERO_PATH.
+
+
accountPathFor(ScriptType) - Method in interface org.bitcoinj.wallet.KeyChainGroupStructure
+
+ +
+
accountPathFor(ScriptType, Network) - Method in interface org.bitcoinj.wallet.KeyChainGroupStructure
+
+
Map desired output script type and network to an account path
+
+
accountPathFor(ScriptType, NetworkParameters) - Method in interface org.bitcoinj.wallet.KeyChainGroupStructure
+
+ +
+
add(long) - Method in class org.bitcoinj.utils.VersionTally
+
+
Add a new block version to the tally, and return the count for that version + within the window.
+
+
add(Coin) - Method in class org.bitcoinj.base.Coin
+
 
+
add(Sha256Hash) - Method in class org.bitcoinj.core.BlockLocator
+
+
Deprecated. + +
+
+
add(Fiat) - Method in class org.bitcoinj.base.utils.Fiat
+
 
+
add(Block) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Processes a received block and tries to add it to the chain.
+
+
add(FilteredBlock) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Processes a received block and tries to add it to the chain.
+
+
add(FilteredBlock) - Method in class org.bitcoinj.core.BlockChain
+
 
+
add(ECPoint) - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
addAddress(InetAddress) - Method in class org.bitcoinj.core.PeerGroup
+
+
Convenience method for PeerGroup.addAddress(PeerAddress).
+
+
addAddress(InetAddress, int) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
addAddress(PeerAddress) - Method in class org.bitcoinj.core.AddressMessage
+
 
+
addAddress(PeerAddress) - Method in class org.bitcoinj.core.AddressV1Message
+
 
+
addAddress(PeerAddress) - Method in class org.bitcoinj.core.AddressV2Message
+
 
+
addAddress(PeerAddress) - Method in class org.bitcoinj.core.PeerGroup
+
+
Add an address to the list of potential peers to connect to.
+
+
addAddress(PeerAddress, int) - Method in class org.bitcoinj.core.PeerGroup
+
+
Add an address to the list of potential peers to connect to.
+
+
addAddressEventListener(Executor, AddressEventListener) - Method in class org.bitcoinj.core.Peer
+
+
Registers a listener that is called when addr or addrv2 messages are received.
+
+
addAddressEventListener(AddressEventListener) - Method in class org.bitcoinj.core.Peer
+
+
Registers a listener that is called when addr or addrv2 messages are received.
+
+
addAndActivateHDChain(DeterministicKeyChain) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Adds an HD chain to the chains list, and make it the default chain (from which keys are issued).
+
+
addAndActivateHDChain(DeterministicKeyChain) - Method in class org.bitcoinj.wallet.Wallet
+
+
Add a pre-configured keychain to the wallet.
+
+
addBlock(Sha256Hash, boolean) - Method in class org.bitcoinj.core.GetDataMessage
+
+
Deprecated.
+
+
addBlock(Block) - Method in class org.bitcoinj.core.InventoryMessage
+
+
Deprecated. +
Use a constructor or factoring
+
+
+
addBlockAppearance(Sha256Hash, int) - Method in class org.bitcoinj.core.Transaction
+
 
+
addBlocksDownloadedEventListener(Executor, BlocksDownloadedEventListener) - Method in class org.bitcoinj.core.Peer
+
+
Registers a listener that is invoked when new blocks are downloaded.
+
+
addBlocksDownloadedEventListener(Executor, BlocksDownloadedEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+
Adds a listener that will be notified on the given executor when + blocks are downloaded by the download peer.
+
+
addBlocksDownloadedEventListener(BlocksDownloadedEventListener) - Method in class org.bitcoinj.core.Peer
+
+
Registers a listener that is invoked when new blocks are downloaded.
+
+
addBlocksDownloadedEventListener(BlocksDownloadedEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
addChain(DeterministicKeyChain) - Method in class org.bitcoinj.wallet.KeyChainGroup.Builder
+
+
Add a single chain.
+
+
addChainDownloadStartedEventListener(Executor, ChainDownloadStartedEventListener) - Method in class org.bitcoinj.core.Peer
+
+
Registers a listener that is invoked when a blockchain downloaded starts.
+
+
addChainDownloadStartedEventListener(Executor, ChainDownloadStartedEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+
Adds a listener that will be notified on the given executor when + chain download starts.
+
+
addChainDownloadStartedEventListener(ChainDownloadStartedEventListener) - Method in class org.bitcoinj.core.Peer
+
+
Registers a listener that is invoked when a blockchain downloaded starts.
+
+
addChainDownloadStartedEventListener(ChainDownloadStartedEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
addChangeEventListener(Executor, WalletChangeEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds an event listener object.
+
+
addChangeEventListener(WalletChangeEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds an event listener object.
+
+
addChunk(int, ScriptChunk) - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Adds the given chunk at the given index in the program
+
+
addChunk(ScriptChunk) - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Adds the given chunk to the end of the program
+
+
addCoinsReceivedEventListener(Executor, WalletCoinsReceivedEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds an event listener object called when coins are received.
+
+
addCoinsReceivedEventListener(WalletCoinsReceivedEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds an event listener object called when coins are received.
+
+
addCoinsSentEventListener(Executor, WalletCoinsSentEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds an event listener object called when coins are sent.
+
+
addCoinsSentEventListener(WalletCoinsSentEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds an event listener object called when coins are sent.
+
+
addConnectedEventListener(Executor, PeerConnectedEventListener) - Method in class org.bitcoinj.core.Peer
+
+
Registers a listener that is invoked when a peer is connected.
+
+
addConnectedEventListener(Executor, PeerConnectedEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+
Adds a listener that will be notified on the given executor when + new peers are connected to.
+
+
addConnectedEventListener(PeerConnectedEventListener) - Method in class org.bitcoinj.core.Peer
+
+
Registers a listener that is invoked when a peer is connected.
+
+
addConnectedEventListener(PeerConnectedEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
addCurrentKeyChangeEventListener(Executor, CurrentKeyChangeEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds an event listener object.
+
+
addCurrentKeyChangeEventListener(CurrentKeyChangeEventListener) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Removes a listener for events that are run when a current key and/or address changes.
+
+
addCurrentKeyChangeEventListener(CurrentKeyChangeEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds an event listener object.
+
+
addCurrentKeyChangeEventListener(CurrentKeyChangeEventListener, Executor) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Adds a listener for events that are run when a current key and/or address changes, on the given + executor.
+
+
addDisconnectedEventListener(Executor, PeerDisconnectedEventListener) - Method in class org.bitcoinj.core.Peer
+
+
Registers a listener that is invoked when a peer is disconnected.
+
+
addDisconnectedEventListener(Executor, PeerDisconnectedEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+
Adds a listener that will be notified on the given executor when + peers are disconnected from.
+
+
addDisconnectedEventListener(PeerDisconnectedEventListener) - Method in class org.bitcoinj.core.Peer
+
+
Registers a listener that is invoked when a peer is disconnected.
+
+
addDisconnectedEventListener(PeerDisconnectedEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
addDiscoveredEventListener(Executor, PeerDiscoveredEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+
Adds a listener that will be notified on the given executor when new + peers are discovered.
+
+
addDiscoveredEventListener(PeerDiscoveredEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
addEventListener(Executor, TransactionConfidence.Listener) - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Adds an event listener that will be run when this confidence object is updated.
+
+
addEventListener(TransactionConfidence.Listener) - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Adds an event listener that will be run when this confidence object is updated.
+
+
addEventListener(KeyChainEventListener) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
addEventListener(KeyChainEventListener) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
addEventListener(KeyChainEventListener) - Method in interface org.bitcoinj.wallet.KeyChain
+
+
Adds a listener for events that are run when keys are added, on the user thread.
+
+
addEventListener(KeyChainEventListener) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Adds a listener for events that are run when keys are added, on the user thread.
+
+
addEventListener(KeyChainEventListener, Executor) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
addEventListener(KeyChainEventListener, Executor) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
addEventListener(KeyChainEventListener, Executor) - Method in interface org.bitcoinj.wallet.KeyChain
+
+
Adds a listener for events that are run when keys are added, on the given executor.
+
+
addEventListener(KeyChainEventListener, Executor) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Adds a listener for events that are run when keys are added, on the given executor.
+
+
addExtension(WalletExtension) - Method in class org.bitcoinj.wallet.Wallet
+
+
By providing an object implementing the WalletExtension interface, you can save and load arbitrary + additional data that will be stored with the wallet.
+
+
addFilteredBlock(Sha256Hash) - Method in class org.bitcoinj.core.GetDataMessage
+
+
Deprecated.
+
+
addGetDataEventListener(Executor, GetDataEventListener) - Method in class org.bitcoinj.core.Peer
+
+
Registers a listener that is called when messages are received.
+
+
addGetDataEventListener(Executor, GetDataEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
addGetDataEventListener(GetDataEventListener) - Method in class org.bitcoinj.core.Peer
+
+
Registers a listener that is called when messages are received.
+
+
addGetDataEventListener(GetDataEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
addInput(Sha256Hash, long, Script) - Method in class org.bitcoinj.core.Transaction
+
+
Creates and adds an input to this transaction, with no checking that it's valid.
+
+
addInput(TransactionInput) - Method in class org.bitcoinj.core.Transaction
+
+
Adds an input directly, with no checking that it's valid.
+
+
addInput(TransactionOutput) - Method in class org.bitcoinj.core.Transaction
+
+
Adds an input to this transaction that imports value from the given output.
+
+
addItem(InventoryItem) - Method in class org.bitcoinj.core.ListMessage
+
+
Deprecated.
+
+
addKeyChainEventListener(Executor, KeyChainEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds an event listener object.
+
+
addKeyChainEventListener(KeyChainEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds an event listener object.
+
+
addListener(Runnable, Executor) - Method in interface org.bitcoinj.utils.ListenableCompletionStage
+
+ +
+
addNewBestBlockListener(Executor, NewBestBlockListener) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Adds a NewBestBlockListener listener to the chain.
+
+
addNewBestBlockListener(NewBestBlockListener) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Adds a NewBestBlockListener listener to the chain.
+
+
addOnTransactionBroadcastListener(Executor, OnTransactionBroadcastListener) - Method in class org.bitcoinj.core.Peer
+
+
Registers a listener that is called when a transaction is broadcast across the network
+
+
addOnTransactionBroadcastListener(Executor, OnTransactionBroadcastListener) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
addOnTransactionBroadcastListener(OnTransactionBroadcastListener) - Method in class org.bitcoinj.core.Peer
+
+
Registers a listener that is called when a transaction is broadcast across the network
+
+
addOnTransactionBroadcastListener(OnTransactionBroadcastListener) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
addOrGetExistingExtension(WalletExtension) - Method in class org.bitcoinj.wallet.Wallet
+
+
Atomically adds extension or returns an existing extension if there is one with the same id already present.
+
+
addOrUpdateExtension(WalletExtension) - Method in class org.bitcoinj.wallet.Wallet
+
+
Either adds extension as a new extension or replaces the existing extension if one already exists with the same + id.
+
+
addOutput(Coin, Address) - Method in class org.bitcoinj.core.Transaction
+
+
Creates an output based on the given address and value, adds it to this transaction, and returns the new output.
+
+
addOutput(Coin, ECKey) - Method in class org.bitcoinj.core.Transaction
+
+
Creates an output that pays to the given pubkey directly (no address) with the given value, adds it to this + transaction, and returns the new output.
+
+
addOutput(Coin, Script) - Method in class org.bitcoinj.core.Transaction
+
+
Creates an output that pays to the given script.
+
+
addOutput(TransactionOutput) - Method in class org.bitcoinj.core.Transaction
+
+
Adds the given output to this transaction.
+
+
addPeerDiscovery(PeerDiscovery) - Method in class org.bitcoinj.core.PeerGroup
+
+
Add addresses from a discovery source to the list of potential peers to connect to.
+
+
addPeerFilterProvider(PeerFilterProvider) - Method in class org.bitcoinj.core.PeerGroup
+
+
Link the given PeerFilterProvider to this PeerGroup.
+
+
addPreMessageReceivedEventListener(Executor, PreMessageReceivedEventListener) - Method in class org.bitcoinj.core.Peer
+
+
Registers a listener that is called immediately before a message is received
+
+
addPreMessageReceivedEventListener(Executor, PreMessageReceivedEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
addPreMessageReceivedEventListener(PreMessageReceivedEventListener) - Method in class org.bitcoinj.core.Peer
+
+
Registers a listener that is called immediately before a message is received
+
+
addPreMessageReceivedEventListener(PreMessageReceivedEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
addReorganizeEventListener(Executor, WalletReorganizeEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds an event listener object.
+
+
addReorganizeEventListener(WalletReorganizeEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds an event listener object.
+
+
addReorganizeListener(Executor, ReorganizeListener) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Adds a generic ReorganizeListener listener to the chain.
+
+
addReorganizeListener(ReorganizeListener) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Adds a generic ReorganizeListener listener to the chain.
+
+
Address - Interface in org.bitcoinj.base
+
+
Interface for addresses, e.g.
+
+
addresses - Variable in class org.bitcoinj.core.AddressMessage
+
 
+
AddressEventListener - Interface in org.bitcoinj.core.listeners
+
+
Implementors can listen to addresses being received from remote peers.
+
+
AddressFormatException - Exception in org.bitcoinj.base.exceptions
+
 
+
AddressFormatException() - Constructor for exception org.bitcoinj.base.exceptions.AddressFormatException
+
 
+
AddressFormatException(String) - Constructor for exception org.bitcoinj.base.exceptions.AddressFormatException
+
 
+
AddressFormatException.InvalidCharacter - Exception in org.bitcoinj.base.exceptions
+
+
This exception is thrown by Base58, Bech32 and the EncodedPrivateKey hierarchy of + classes when you try to decode data and a character isn't valid.
+
+
AddressFormatException.InvalidChecksum - Exception in org.bitcoinj.base.exceptions
+
+
This exception is thrown by Base58, Bech32 and the EncodedPrivateKey hierarchy of + classes when you try to decode data and the checksum isn't valid.
+
+
AddressFormatException.InvalidDataLength - Exception in org.bitcoinj.base.exceptions
+
+
This exception is thrown by Base58, Bech32 and the EncodedPrivateKey hierarchy of + classes when you try to decode data and the data isn't of the right size.
+
+
AddressFormatException.InvalidPrefix - Exception in org.bitcoinj.base.exceptions
+
+
This exception is thrown by the EncodedPrivateKey hierarchy of classes when you try and decode an + address or private key with an invalid prefix (version header or human-readable part).
+
+
AddressFormatException.UnexpectedWitnessVersion - Exception in org.bitcoinj.base.exceptions
+
+
This exception is thrown by SegwitAddress when you try to decode data and the witness version doesn't + match the Bech32 encoding as per BIP350.
+
+
AddressFormatException.WrongNetwork - Exception in org.bitcoinj.base.exceptions
+
+
This exception is thrown by the EncodedPrivateKey hierarchy of classes when you try and decode an + address with a prefix (version header or human-readable part) that used by another network (usually: mainnet vs + testnet).
+
+
addressHash - Variable in class org.bitcoinj.crypto.BIP38PrivateKey
+
 
+
addressHeader - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
AddressMessage - Class in org.bitcoinj.core
+
+
Abstract superclass for address messages on the P2P network, which contain network addresses of other peers.
+
+
AddressMessage(List<PeerAddress>) - Constructor for class org.bitcoinj.core.AddressMessage
+
 
+
AddressParser - Interface in org.bitcoinj.base
+
+
Functional interface for parsing an Address.
+
+
AddressParser.AddressParserProvider - Interface in org.bitcoinj.base
+
+
Interface implemented by custom address parser providers.
+
+
AddressV1Message - Class in org.bitcoinj.core
+
+
Represents an "addr" message on the P2P network, which contains broadcast IP addresses of other peers.
+
+
AddressV2Message - Class in org.bitcoinj.core
+
+
Represents an "addrv2" message on the P2P network, which contains broadcast addresses of other peers.
+
+
addrSeeds - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
addScriptsChangeEventListener(Executor, ScriptsChangeEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds an event listener object.
+
+
addScriptsChangeEventListener(ScriptsChangeEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds an event listener object.
+
+
addSignedInput(TransactionOutPoint, Script, Coin, ECKey) - Method in class org.bitcoinj.core.Transaction
+
+
Adds a new and fully signed input for the given parameters.
+
+
addSignedInput(TransactionOutPoint, Script, Coin, ECKey, Transaction.SigHash, boolean) - Method in class org.bitcoinj.core.Transaction
+
+
Adds a new and fully signed input for the given parameters.
+
+
addSignedInput(TransactionOutPoint, Script, ECKey) - Method in class org.bitcoinj.core.Transaction
+
+ +
+
addSignedInput(TransactionOutPoint, Script, ECKey, Transaction.SigHash, boolean) - Method in class org.bitcoinj.core.Transaction
+
+ +
+
addSignedInput(TransactionOutput, ECKey) - Method in class org.bitcoinj.core.Transaction
+
+
Adds an input that points to the given output and contains a valid signature for it, calculated using the + signing key.
+
+
addSignedInput(TransactionOutput, ECKey, Transaction.SigHash, boolean) - Method in class org.bitcoinj.core.Transaction
+
+
Adds an input that points to the given output and contains a valid signature for it, calculated using the + signing key.
+
+
addTo(Temporal) - Method in class org.bitcoinj.base.internal.Stopwatch
+
 
+
addToBlockStore(StoredBlock, Block) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Adds/updates the given Block with the block store.
+
+
addToBlockStore(StoredBlock, Block) - Method in class org.bitcoinj.core.BlockChain
+
 
+
addToBlockStore(StoredBlock, Block) - Method in class org.bitcoinj.core.FullPrunedBlockChain
+
 
+
addToBlockStore(StoredBlock, Block, TransactionOutputChanges) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Adds/updates the given StoredBlock with the block store.
+
+
addToBlockStore(StoredBlock, Block, TransactionOutputChanges) - Method in class org.bitcoinj.core.BlockChain
+
 
+
addToBlockStore(StoredBlock, Block, TransactionOutputChanges) - Method in class org.bitcoinj.core.FullPrunedBlockChain
+
 
+
addTransaction(Sha256Hash, boolean) - Method in class org.bitcoinj.core.GetDataMessage
+
+
Deprecated.
+
+
addTransaction(Transaction) - Method in class org.bitcoinj.core.Block
+
+
Adds a transaction to this block.
+
+
addTransaction(Transaction) - Method in class org.bitcoinj.core.InventoryMessage
+
+
Deprecated. +
Use a constructor or factoring
+
+
+
addTransactionConfidenceEventListener(Executor, TransactionConfidenceEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds an event listener object.
+
+
addTransactionConfidenceEventListener(TransactionConfidenceEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds an event listener object.
+
+
addTransactionReceivedListener(Executor, TransactionReceivedInBlockListener) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Adds a generic TransactionReceivedInBlockListener listener to the chain.
+
+
addTransactionReceivedListener(TransactionReceivedInBlockListener) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Adds a generic TransactionReceivedInBlockListener listener to the chain.
+
+
addTransactionSigner(TransactionSigner) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds given transaction signer to the list of signers.
+
+
addUnspentTransactionOutput(UTXO) - Method in interface org.bitcoinj.store.FullPrunedBlockStore
+
+
Adds a UTXO to the list of unspent TransactionOutputs
+
+
addUnspentTransactionOutput(UTXO) - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
addWallet(Wallet) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Add a wallet to the BlockChain.
+
+
addWallet(Wallet) - Method in class org.bitcoinj.core.Peer
+
+
Links the given wallet to this peer.
+
+
addWallet(Wallet) - Method in class org.bitcoinj.core.PeerGroup
+
+
Link the given wallet to this PeerGroup.
+
+
addWalletTransaction(WalletTransaction) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds a transaction that has been associated with a particular wallet pool.
+
+
addWatchedAddress(Address) - Method in class org.bitcoinj.wallet.Wallet
+
+
Same as Wallet.addWatchedAddress(Address, Instant) with the current time as the creation time.
+
+
addWatchedAddress(Address, long) - Method in class org.bitcoinj.wallet.Wallet
+
+ +
+
addWatchedAddress(Address, Instant) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds the given address to the wallet to be watched.
+
+
addWatchedAddresses(List<Address>) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds the given addresses to the wallet to be watched.
+
+
addWatchedAddresses(List<Address>, long) - Method in class org.bitcoinj.wallet.Wallet
+
+ +
+
addWatchedAddresses(List<Address>, Instant) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds the given addresses to the wallet to be watched.
+
+
addWatchedScripts(List<Script>) - Method in class org.bitcoinj.wallet.Wallet
+
+
Adds the given output scripts to the wallet to be watched.
+
+
aesKey - Variable in class org.bitcoinj.wallet.DecryptingKeyBag
+
 
+
aesKey - Variable in class org.bitcoinj.wallet.SendRequest
+
+
The AES key to use to decrypt the private keys before signing.
+
+
AesKey - Class in org.bitcoinj.crypto
+
+
Wrapper for a byte[] containing an AES Key.
+
+
AesKey(byte[]) - Constructor for class org.bitcoinj.crypto.AesKey
+
+
Wrapper for a byte[] containing an AES Key
+
+
AGE_COMPARATOR - Static variable in class org.bitcoinj.crypto.ECKey
+
+
Sorts oldest keys first, newest last.
+
+
ALL - Enum constant in enum class org.bitcoinj.core.Transaction.SigHash
+
 
+
ALL_VERIFY_FLAGS - Static variable in class org.bitcoinj.script.Script
+
 
+
allAsList(List<? extends CompletionStage<? extends T>>) - Static method in class org.bitcoinj.base.internal.FutureUtils
+
+
Note: When the migration to CompletableFuture is complete this routine will + either be removed or changed to return a generic CompletableFuture.
+
+
allowEmptyPeerChain() - Method in class org.bitcoinj.core.NetworkParameters
+
+
If we are running in testnet-in-a-box mode, we allow connections to nodes with 0 non-genesis blocks.
+
+
allowEmptyPeerChain() - Method in class org.bitcoinj.params.RegTestParams
+
 
+
allowUnconfirmed() - Method in class org.bitcoinj.wallet.SendRequest
+
+
Shortcut for req.coinSelector = AllowUnconfirmedCoinSelector.get();.
+
+
AllowUnconfirmedCoinSelector - Class in org.bitcoinj.wallet
+
+
This coin selector will select any transaction at all, regardless of where it came from or whether it was + confirmed yet.
+
+
AllowUnconfirmedCoinSelector() - Constructor for class org.bitcoinj.wallet.AllowUnconfirmedCoinSelector
+
 
+
AllRandomKeysRotating - Exception in org.bitcoinj.wallet
+
+
Indicates that an attempt was made to upgrade a random wallet to deterministic, but there were no non-rotating + random keys to use as source material for the seed.
+
+
AllRandomKeysRotating() - Constructor for exception org.bitcoinj.wallet.AllRandomKeysRotating
+
 
+
ALPHABET - Static variable in class org.bitcoinj.base.Base58
+
 
+
ALREADY_SPENT - Enum constant in enum class org.bitcoinj.core.TransactionInput.ConnectionResult
+
 
+
amount - Variable in class org.bitcoinj.protocols.payments.PaymentProtocol.Output
+
 
+
analyze() - Method in class org.bitcoinj.wallet.DefaultRiskAnalysis
+
 
+
analyze() - Method in interface org.bitcoinj.wallet.RiskAnalysis
+
 
+
analyzed - Variable in class org.bitcoinj.wallet.DefaultRiskAnalysis
+
 
+
Analyzer() - Constructor for class org.bitcoinj.wallet.DefaultRiskAnalysis.Analyzer
+
 
+
ancestors() - Method in class org.bitcoinj.crypto.HDPath
+
+
Return a list of all ancestors of this path
+
+
ancestors(boolean) - Method in class org.bitcoinj.crypto.HDPath
+
+
Return a list of all ancestors of this path
+
+
ANDROID - Enum constant in enum class org.bitcoinj.base.internal.PlatformUtils.Runtime
+
 
+
anyOf(long) - Method in class org.bitcoinj.core.Services
+
+
Checks if at least one of the given node services is signaled by this bitfield.
+
+
anyoneCanPay() - Method in class org.bitcoinj.crypto.TransactionSignature
+
 
+
ANYONECANPAY - Enum constant in enum class org.bitcoinj.core.Transaction.SigHash
+
 
+
ANYONECANPAY_ALL - Enum constant in enum class org.bitcoinj.core.Transaction.SigHash
+
 
+
ANYONECANPAY_NONE - Enum constant in enum class org.bitcoinj.core.Transaction.SigHash
+
 
+
ANYONECANPAY_SINGLE - Enum constant in enum class org.bitcoinj.core.Transaction.SigHash
+
 
+
AppDataDirectory - Class in org.bitcoinj.utils
+
+
Find/create App Data Directory in correct platform-specific location.
+
+
AppDataDirectory() - Constructor for class org.bitcoinj.utils.AppDataDirectory
+
 
+
appendToSubVer(String, String, String) - Method in class org.bitcoinj.core.VersionMessage
+
+
Appends the given user-agent information to the subVer field.
+
+
applyAndUpdate(Block) - Method in class org.bitcoinj.core.BloomFilter
+
+
Creates a new FilteredBlock from the given Block, using this filter to select transactions.
+
+
applyAndUpdate(Transaction) - Method in class org.bitcoinj.core.BloomFilter
+
 
+
arrayUnsignedComparator() - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Provides a byte array comparator.
+
+
ASSURANCE_CONTRACT_CLAIM - Enum constant in enum class org.bitcoinj.core.Transaction.Purpose
+
+
Transaction that uses up pledges to an assurance contract
+
+
ASSURANCE_CONTRACT_PLEDGE - Enum constant in enum class org.bitcoinj.core.Transaction.Purpose
+
+
Transaction that makes a pledge to an assurance contract.
+
+
ASSURANCE_CONTRACT_STUB - Enum constant in enum class org.bitcoinj.core.Transaction.Purpose
+
+
Send-to-self transaction that exists just to create an output of the right size we can pledge.
+
+
AUTHENTICATION - Enum constant in enum class org.bitcoinj.wallet.KeyChain.KeyPurpose
+
 
+
autosaveToFile(File, long, TimeUnit, WalletFiles.Listener) - Method in class org.bitcoinj.wallet.Wallet
+
+ +
+
autosaveToFile(File, Duration, WalletFiles.Listener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Sets up the wallet to auto-save itself to the given file, using temp files with atomic renames to ensure + consistency.
+
+
autoStop - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
AVAILABLE - Enum constant in enum class org.bitcoinj.wallet.Wallet.BalanceType
+
+
Balance that could be safely used to create new spends, if we had all the needed private keys.
+
+
AVAILABLE_SPENDABLE - Enum constant in enum class org.bitcoinj.wallet.Wallet.BalanceType
+
+
Same as AVAILABLE but only for outputs we have the private keys for and can sign ourselves.
+
+
await() - Method in class org.bitcoinj.core.listeners.DownloadProgressTracker
+
+
Wait for the chain to be downloaded.
+
+
awaitRelayed() - Method in class org.bitcoinj.core.TransactionBroadcast
+
+
Wait for confirmation the transaction has been relayed.
+
+
awaitRelayed() - Method in class org.bitcoinj.wallet.Wallet.SendResult
+
 
+
awaitSent() - Method in class org.bitcoinj.core.TransactionBroadcast
+
+
Wait for confirmation the transaction has been sent to a remote peer.
+
+
+

B

+
+
BadPassphraseException() - Constructor for exception org.bitcoinj.crypto.BIP38PrivateKey.BadPassphraseException
+
 
+
BadPassword() - Constructor for exception org.bitcoinj.wallet.UnreadableWalletException.BadPassword
+
 
+
BadWalletEncryptionKeyException(Throwable) - Constructor for exception org.bitcoinj.wallet.Wallet.BadWalletEncryptionKeyException
+
 
+
badWord - Variable in exception org.bitcoinj.crypto.MnemonicException.MnemonicWordException
+
+
Contains the word that was not found in the word list.
+
+
Base58 - Class in org.bitcoinj.base
+
+
Base58 is a way to encode Bitcoin addresses (or arbitrary data) as alphanumeric strings.
+
+
Base58() - Constructor for class org.bitcoinj.base.Base58
+
 
+
BASE64 - Static variable in class org.bitcoinj.core.CheckpointManager
+
 
+
BaseMessage - Class in org.bitcoinj.core
+
+
A Message is a data structure that can be serialized/deserialized using the Bitcoin serialization format.
+
+
BaseMessage() - Constructor for class org.bitcoinj.core.BaseMessage
+
 
+
BaseTaggableObject - Class in org.bitcoinj.utils
+
+
Deprecated. +
Applications should use another mechanism to persist application state data
+
+
+
BaseTaggableObject() - Constructor for class org.bitcoinj.utils.BaseTaggableObject
+
+
Deprecated.
+
BasicKeyChain - Class in org.bitcoinj.wallet
+
+
A KeyChain that implements the simplest model possible: it can have keys imported into it, and just acts as + a dumb bag of keys.
+
+
BasicKeyChain() - Constructor for class org.bitcoinj.wallet.BasicKeyChain
+
 
+
BasicKeyChain(KeyCrypter) - Constructor for class org.bitcoinj.wallet.BasicKeyChain
+
 
+
BasicKeyChain.State - Enum Class in org.bitcoinj.wallet
+
+
Whether this basic key chain is empty, full of regular (usable for signing) keys, or full of watching keys.
+
+
BC - Enum constant in enum class org.bitcoinj.base.SegwitAddress.SegwitHrp
+
 
+
BCRT - Enum constant in enum class org.bitcoinj.base.SegwitAddress.SegwitHrp
+
 
+
Bech32 - Class in org.bitcoinj.base
+
+
Implementation of the Bech32 encoding.
+
+
Bech32() - Constructor for class org.bitcoinj.base.Bech32
+
 
+
BECH32 - Enum constant in enum class org.bitcoinj.base.Bech32.Encoding
+
 
+
Bech32.Bech32Bytes - Class in org.bitcoinj.base
+
+
Binary data in 5-bits-per-byte format as used in Bech32 encoding/decoding.
+
+
Bech32.Bech32Data - Class in org.bitcoinj.base
+
+
Bech32 data in 5-bit byte format with Bech32.Encoding and human-readable part (HRP) information.
+
+
Bech32.Encoding - Enum Class in org.bitcoinj.base
+
+
Enumeration of known Bech32 encoding format types: Bech32 and Bech32m.
+
+
Bech32Bytes(byte[]) - Constructor for class org.bitcoinj.base.Bech32.Bech32Bytes
+
+
Wrapper for a byte[] array.
+
+
BECH32M - Enum constant in enum class org.bitcoinj.base.Bech32.Encoding
+
 
+
beginBloomFilterCalculation() - Method in interface org.bitcoinj.core.PeerFilterProvider
+
+
Called on all registered filter providers before PeerFilterProvider.getBloomFilterElementCount() and + PeerFilterProvider.getBloomFilter(int, double, int) are called.
+
+
beginBloomFilterCalculation() - Method in class org.bitcoinj.wallet.Wallet
+
 
+
beginDatabaseBatchWrite() - Method in interface org.bitcoinj.store.FullPrunedBlockStore
+
+
Begins/Commits/Aborts a database transaction.
+
+
beginDatabaseBatchWrite() - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
BEST_CHAIN - Enum constant in enum class org.bitcoinj.core.AbstractBlockChain.NewBlockType
+
+
New block is on the best chain
+
+
bestHeight - Variable in class org.bitcoinj.core.VersionMessage
+
+
How many blocks are in the chain, according to the other side.
+
+
bigIntegerToBytes(BigInteger, int) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
+ The built-in BigInteger.toByteArray() includes the sign bit of the number and + may result in an extra byte in cases of unsigned data.
+
+
bigNum(int, long) - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Adds the given number as a push data chunk to the given index in the program.
+
+
bigNum(long) - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Adds the given number as a push data chunk.
+
+
BIP16_ENFORCE_TIME - Static variable in class org.bitcoinj.core.NetworkParameters
+
+
Blocks with a timestamp after this should enforce BIP 16, aka "Pay to script hash".
+
+
BIP32 - Static variable in interface org.bitcoinj.wallet.KeyChainGroupStructure
+
+
Original bitcoinj KeyChainGroupStructure implementation.
+
+
BIP32_STANDARDISATION_TIME - Static variable in class org.bitcoinj.crypto.DeterministicHierarchy
+
 
+
BIP32_STANDARDISATION_TIME_SECS - Static variable in class org.bitcoinj.crypto.DeterministicHierarchy
+
+ +
+
bip32HeaderP2PKHpriv - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
bip32HeaderP2PKHpub - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
bip32HeaderP2WPKHpriv - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
bip32HeaderP2WPKHpub - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
BIP38PrivateKey - Class in org.bitcoinj.crypto
+
+
Implementation of BIP 38 + passphrase-protected private keys.
+
+
BIP38PrivateKey.BadPassphraseException - Exception in org.bitcoinj.crypto
+
 
+
BIP39_STANDARDISATION_TIME - Static variable in class org.bitcoinj.crypto.MnemonicCode
+
+
UNIX time for when the BIP39 standard was finalised.
+
+
BIP39_STANDARDISATION_TIME_SECS - Static variable in class org.bitcoinj.crypto.MnemonicCode
+
+ +
+
BIP43 - Static variable in interface org.bitcoinj.wallet.KeyChainGroupStructure
+
+
KeyChainGroupStructure implementation for BIP-43 family structures.
+
+
BIP44_ACCOUNT_ZERO_PATH - Static variable in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
BIP44_PARENT - Static variable in class org.bitcoinj.crypto.HDPath
+
+
Partial path with BIP44 purpose
+
+
BIP84_PARENT - Static variable in class org.bitcoinj.crypto.HDPath
+
+
Partial path with BIP84 purpose
+
+
BIP86_PARENT - Static variable in class org.bitcoinj.crypto.HDPath
+
+
Partial path with BIP86 purpose
+
+
BITCOIN_SCHEME - Static variable in enum class org.bitcoinj.base.BitcoinNetwork
+
+
Scheme part for Bitcoin URIs.
+
+
BITCOIN_SCHEME - Static variable in class org.bitcoinj.params.BitcoinNetworkParams
+
+ +
+
BITCOIN_SCHEME - Static variable in class org.bitcoinj.uri.BitcoinURI
+
+
Deprecated. + +
+
+
BITCOINJ_VERSION - Static variable in class org.bitcoinj.core.VersionMessage
+
+
The version of this library release, as a string.
+
+
BitcoinNetwork - Enum Class in org.bitcoinj.base
+
+
A convenient enum representation of a Bitcoin network.
+
+
BitcoinNetworkParams - Class in org.bitcoinj.params
+
+
Parameters for Bitcoin-like networks.
+
+
BitcoinNetworkParams(BitcoinNetwork) - Constructor for class org.bitcoinj.params.BitcoinNetworkParams
+
+
No-args constructor
+
+
BitcoinPacketHeader(ByteBuffer) - Constructor for class org.bitcoinj.core.BitcoinSerializer.BitcoinPacketHeader
+
 
+
bitcoinSerialize() - Method in interface org.bitcoinj.core.Message
+
+
Deprecated. + +
+
+
bitcoinSerialize() - Method in class org.bitcoinj.core.TransactionInput
+
+
Deprecated. + +
+
+
bitcoinSerialize() - Method in class org.bitcoinj.core.TransactionOutPoint
+
+ +
+
bitcoinSerialize() - Method in class org.bitcoinj.core.TransactionOutput
+
+ +
+
BitcoinSerializer - Class in org.bitcoinj.core
+
+
Methods to serialize and de-serialize messages to the Bitcoin network format as defined in + the protocol specification.
+
+
BitcoinSerializer(Network) - Constructor for class org.bitcoinj.core.BitcoinSerializer
+
+
Constructs a BitcoinSerializer with the given behavior.
+
+
BitcoinSerializer(Network, int) - Constructor for class org.bitcoinj.core.BitcoinSerializer
+
+
Constructs a BitcoinSerializer with the given behavior.
+
+
BitcoinSerializer(NetworkParameters) - Constructor for class org.bitcoinj.core.BitcoinSerializer
+
+
Deprecated.
+
+
BitcoinSerializer(NetworkParameters, int) - Constructor for class org.bitcoinj.core.BitcoinSerializer
+
+
Deprecated.
+
+
BitcoinSerializer.BitcoinPacketHeader - Class in org.bitcoinj.core
+
 
+
bitcoinSerializeToStream(OutputStream) - Method in class org.bitcoinj.core.AddressV1Message
+
 
+
bitcoinSerializeToStream(OutputStream) - Method in class org.bitcoinj.core.AddressV2Message
+
 
+
bitcoinSerializeToStream(OutputStream) - Method in class org.bitcoinj.core.BaseMessage
+
+
Serializes this message to the provided stream.
+
+
bitcoinSerializeToStream(OutputStream) - Method in class org.bitcoinj.core.Block
+
 
+
bitcoinSerializeToStream(OutputStream) - Method in class org.bitcoinj.core.BloomFilter
+
+
Serializes this message to the provided stream.
+
+
bitcoinSerializeToStream(OutputStream) - Method in class org.bitcoinj.core.EmptyMessage
+
 
+
bitcoinSerializeToStream(OutputStream) - Method in class org.bitcoinj.core.FeeFilterMessage
+
 
+
bitcoinSerializeToStream(OutputStream) - Method in class org.bitcoinj.core.FilteredBlock
+
 
+
bitcoinSerializeToStream(OutputStream) - Method in class org.bitcoinj.core.GetBlocksMessage
+
 
+
bitcoinSerializeToStream(OutputStream) - Method in class org.bitcoinj.core.HeadersMessage
+
 
+
bitcoinSerializeToStream(OutputStream) - Method in class org.bitcoinj.core.ListMessage
+
 
+
bitcoinSerializeToStream(OutputStream) - Method in class org.bitcoinj.core.Ping
+
 
+
bitcoinSerializeToStream(OutputStream) - Method in class org.bitcoinj.core.Pong
+
 
+
bitcoinSerializeToStream(OutputStream) - Method in class org.bitcoinj.core.RejectMessage
+
 
+
bitcoinSerializeToStream(OutputStream) - Method in class org.bitcoinj.core.Transaction
+
 
+
bitcoinSerializeToStream(OutputStream) - Method in class org.bitcoinj.core.VersionMessage
+
 
+
bitcoinSerializeToStream(OutputStream, boolean) - Method in class org.bitcoinj.core.Transaction
+
+
Serialize according to BIP144 or the + classic format, depending on if segwit is + desired.
+
+
BitcoinURI - Class in org.bitcoinj.uri
+
+
Provides a standard implementation of a Bitcoin URI with support for the following:
+
+
BitcoinURI(NetworkParameters, String) - Constructor for class org.bitcoinj.uri.BitcoinURI
+
+ +
+
BitcoinURIParseException - Exception in org.bitcoinj.uri
+
+
Exception to provide the following to BitcoinURI:
+
+
BitcoinURIParseException(String) - Constructor for exception org.bitcoinj.uri.BitcoinURIParseException
+
 
+
BitcoinURIParseException(String, Throwable) - Constructor for exception org.bitcoinj.uri.BitcoinURIParseException
+
 
+
bits - Variable in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
 
+
bits() - Method in class org.bitcoinj.core.Services
+
+
Gets the 64 bits of this bitfield, each representing a node service.
+
+
block - Variable in class org.bitcoinj.store.MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag
+
 
+
block - Variable in class org.bitcoinj.testing.FakeTxBuilder.BlockPair
+
 
+
Block - Class in org.bitcoinj.core
+
+
A block is a group of transactions, and is one of the fundamental data structures of the Bitcoin system.
+
+
Block(long, Sha256Hash, Sha256Hash, long, long, long, List<Transaction>) - Constructor for class org.bitcoinj.core.Block
+
+ +
+
Block(long, Sha256Hash, Sha256Hash, Instant, long, long, List<Transaction>) - Constructor for class org.bitcoinj.core.Block
+
+
Construct a block initialized with all the given fields.
+
+
BLOCK - Enum constant in enum class org.bitcoinj.core.InventoryItem.Type
+
 
+
BLOCK_HEIGHT_GENESIS - Static variable in class org.bitcoinj.core.Block
+
+
Height of the first block
+
+
BLOCK_HEIGHT_UNKNOWN - Static variable in class org.bitcoinj.core.Block
+
+
Value to use if the block height is unknown
+
+
BLOCK_LENGTH - Static variable in class org.bitcoinj.crypto.KeyCrypterScrypt
+
+
The size of an AES block in bytes.
+
+
BLOCK_VERSION_BIP34 - Static variable in class org.bitcoinj.core.Block
+
+
Block version introduced in BIP 34: Height in coinbase
+
+
BLOCK_VERSION_BIP65 - Static variable in class org.bitcoinj.core.Block
+
+
Block version introduced in BIP 65: OP_CHECKLOCKTIMEVERIFY
+
+
BLOCK_VERSION_BIP66 - Static variable in class org.bitcoinj.core.Block
+
+
Block version introduced in BIP 66: Strict DER signatures
+
+
BLOCK_VERSION_GENESIS - Static variable in class org.bitcoinj.core.Block
+
 
+
Block.VerifyFlag - Enum Class in org.bitcoinj.core
+
+
Flags used to control which elements of block validation are done on + received blocks.
+
+
blockCache - Variable in class org.bitcoinj.store.SPVBlockStore
+
 
+
BlockChain - Class in org.bitcoinj.core
+
+
A BlockChain implements the simplified payment verification mode of the Bitcoin protocol.
+
+
BlockChain(Network, List<? extends Wallet>, BlockStore) - Constructor for class org.bitcoinj.core.BlockChain
+
+
Constructs a BlockChain connected to the given list of listeners and a store.
+
+
BlockChain(Network, BlockStore) - Constructor for class org.bitcoinj.core.BlockChain
+
+
Constructs a BlockChain that has no wallet at all.
+
+
BlockChain(Network, Wallet, BlockStore) - Constructor for class org.bitcoinj.core.BlockChain
+
+
Constructs a BlockChain connected to the given wallet and store.
+
+
BlockChain(NetworkParameters, Wallet, BlockStore) - Constructor for class org.bitcoinj.core.BlockChain
+
 
+
BlockchainDownloadEventListener - Interface in org.bitcoinj.core.listeners
+
+
Event Listener for blockchain download.
+
+
BlockFileIterator(File) - Constructor for class org.bitcoinj.utils.BlockFileLoader.BlockFileIterator
+
 
+
BlockFileLoader - Class in org.bitcoinj.utils
+
+
This class reads block files stored in the Bitcoin Core format.
+
+
BlockFileLoader(Network, File) - Constructor for class org.bitcoinj.utils.BlockFileLoader
+
 
+
BlockFileLoader(Network, List<File>) - Constructor for class org.bitcoinj.utils.BlockFileLoader
+
 
+
BlockFileLoader(NetworkParameters, File) - Constructor for class org.bitcoinj.utils.BlockFileLoader
+
+
Deprecated.
+
+
BlockFileLoader(NetworkParameters, List<File>) - Constructor for class org.bitcoinj.utils.BlockFileLoader
+
+
Deprecated.
+
+
BlockFileLoader.BlockFileIterator - Class in org.bitcoinj.utils
+
+
Iterates all the blocks in a single block file.
+
+
blockHeight() - Method in class org.bitcoinj.core.LockTime.HeightLock
+
 
+
BlockingClient - Class in org.bitcoinj.net
+
+
Creates a simple connection to a server using a StreamConnection to process data.
+
+
BlockingClient(SocketAddress, StreamConnection, Duration, SocketFactory, Set<BlockingClient>) - Constructor for class org.bitcoinj.net.BlockingClient
+
+
Creates a new client to the given server address using the given StreamConnection to decode the data.
+
+
BlockingClientManager - Class in org.bitcoinj.net
+
+
A thin wrapper around a set of BlockingClients.
+
+
BlockingClientManager() - Constructor for class org.bitcoinj.net.BlockingClientManager
+
 
+
BlockingClientManager(SocketFactory) - Constructor for class org.bitcoinj.net.BlockingClientManager
+
+
Creates a blocking client manager that will obtain sockets from the given factory.
+
+
blockingStartup - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
BlockLocator - Class in org.bitcoinj.core
+
+
Represents Block Locator in GetBlocks and GetHeaders messages
+
+
BlockLocator() - Constructor for class org.bitcoinj.core.BlockLocator
+
+
Deprecated. + +
+
+
BlockLocator(List<Sha256Hash>) - Constructor for class org.bitcoinj.core.BlockLocator
+
+
Creates a Block locator with defined list of hashes.
+
+
BlockPair(Block, StoredBlock) - Constructor for class org.bitcoinj.testing.FakeTxBuilder.BlockPair
+
 
+
BlocksDownloadedEventListener - Interface in org.bitcoinj.core.listeners
+
+
Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, + they can pre-filter messages before they are processed by a Peer or PeerGroup, and they can + provide transactions to remote peers when they ask for them.
+
+
blockStore - Variable in class org.bitcoinj.core.BlockChain
+
+
Keeps a map of block hashes to StoredBlocks.
+
+
blockStore - Variable in class org.bitcoinj.core.FullPrunedBlockChain
+
+
Keeps a map of block hashes to StoredBlocks.
+
+
BlockStore - Interface in org.bitcoinj.store
+
+
An implementor of BlockStore saves StoredBlock objects to disk.
+
+
BlockStoreException - Exception in org.bitcoinj.store
+
+
Thrown when something goes wrong with storing a block.
+
+
BlockStoreException(String) - Constructor for exception org.bitcoinj.store.BlockStoreException
+
 
+
BlockStoreException(String, Throwable) - Constructor for exception org.bitcoinj.store.BlockStoreException
+
 
+
BlockStoreException(Throwable) - Constructor for exception org.bitcoinj.store.BlockStoreException
+
 
+
BlockVersionOutOfDate(long) - Constructor for exception org.bitcoinj.core.VerificationException.BlockVersionOutOfDate
+
 
+
BLOOM_FILTER - Enum constant in enum class org.bitcoinj.core.ProtocolVersion
+
 
+
BLOOM_FILTER_BIP111 - Enum constant in enum class org.bitcoinj.core.ProtocolVersion
+
 
+
BloomFilter - Class in org.bitcoinj.core
+
+
A Bloom filter is a probabilistic data structure which can be sent to another client so that it can avoid + sending us transactions that aren't relevant to our set of keys.
+
+
BloomFilter(int, double, int) - Constructor for class org.bitcoinj.core.BloomFilter
+
+
Constructs a filter with the given parameters which is updated on P2PK outputs only.
+
+
BloomFilter(int, double, int, BloomFilter.BloomUpdate) - Constructor for class org.bitcoinj.core.BloomFilter
+
+
Constructs a new Bloom Filter which will provide approximately the given false positive rate when the given + number of elements have been inserted.
+
+
BloomFilter.BloomUpdate - Enum Class in org.bitcoinj.core
+
+
The BLOOM_UPDATE_* constants control when the bloom filter is auto-updated by the peer using + it as a filter, either never, for all outputs or only for P2PK outputs (default)
+
+
BriefLogFormatter - Class in org.bitcoinj.utils
+
+
A Java logging formatter that writes more compact output than the default.
+
+
BriefLogFormatter() - Constructor for class org.bitcoinj.utils.BriefLogFormatter
+
 
+
broadcast - Variable in class org.bitcoinj.wallet.Wallet.SendResult
+
+ +
+
broadcast() - Method in class org.bitcoinj.core.TransactionBroadcast
+
+ +
+
broadcastAndAwaitRelay() - Method in class org.bitcoinj.core.TransactionBroadcast
+
+
Broadcast the transaction and wait for confirmation that the transaction has been received by the appropriate + number of Peers before completing.
+
+
broadcastComplete - Variable in class org.bitcoinj.wallet.Wallet.SendResult
+
+ +
+
broadcastOnly() - Method in class org.bitcoinj.core.TransactionBroadcast
+
+
Broadcast this transaction to the proper calculated number of peers.
+
+
broadcastTransaction(Transaction) - Method in class org.bitcoinj.core.PeerGroup
+
+
Calls PeerGroup.broadcastTransaction(Transaction, int, boolean) with getMinBroadcastConnections() as + the number of connections to wait for before commencing broadcast.
+
+
broadcastTransaction(Transaction) - Method in interface org.bitcoinj.core.TransactionBroadcaster
+
+
Broadcast the given transaction on the network
+
+
broadcastTransaction(Transaction, int, boolean) - Method in class org.bitcoinj.core.PeerGroup
+
+
Given a transaction, sends it un-announced to one peer and then waits for it to be received back from other + peers.
+
+
BTC - Static variable in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Standard format for the BTC denomination.
+
+
BtcAutoFormat - Class in org.bitcoinj.utils
+
+
This class, a concrete extension of BtcFormat, is distinguished by its + accommodation of multiple denominational units as follows:
+
+
BtcAutoFormat(Locale, BtcAutoFormat.Style, int) - Constructor for class org.bitcoinj.utils.BtcAutoFormat
+
+
Constructor
+
+
BtcAutoFormat.Style - Enum Class in org.bitcoinj.utils
+
+
Enum for specifying the style of currency indicators that are used + when formatting, either codes or symbols.
+
+
BtcFixedFormat - Class in org.bitcoinj.utils
+
+
This class, a concrete extension of BtcFormat, is distinguished in that each + instance formats and by-default parses all Bitcoin monetary values in units of a single + denomination that is specified at the time that instance is constructed.
+
+
BtcFixedFormat(Locale, int, int, List<Integer>) - Constructor for class org.bitcoinj.utils.BtcFixedFormat
+
+
Constructor
+
+
BtcFormat - Class in org.bitcoinj.utils
+
+
Instances of this class format and parse locale-specific numerical + representations of Bitcoin monetary values.
+
+
BtcFormat(DecimalFormat, int, List<Integer>) - Constructor for class org.bitcoinj.utils.BtcFormat
+
+
This single constructor is invoked by the overriding subclass constructors.
+
+
BtcFormat.Builder - Class in org.bitcoinj.utils
+
+
This class constructs new instances of BtcFormat, allowing for the + configuration of those instances before they are constructed.
+
+
btcToSatoshi(BigDecimal) - Static method in class org.bitcoinj.base.Coin
+
+
Convert a decimal amount of BTC into satoshis.
+
+
buffer - Variable in class org.bitcoinj.store.SPVBlockStore
+
 
+
Buffers - Class in org.bitcoinj.base.internal
+
+
Utility methods for common operations on Bitcoin P2P message buffers.
+
+
Buffers() - Constructor for class org.bitcoinj.base.internal.Buffers
+
 
+
build() - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a new immutable Script based on the state of the builder.
+
+
build() - Method in class org.bitcoinj.utils.BtcFormat.Builder
+
+
Return a new BtcFormat instance.
+
+
build() - Method in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
 
+
build() - Method in class org.bitcoinj.wallet.KeyChainGroup.Builder
+
 
+
build(Block) - Method in class org.bitcoinj.core.StoredBlock
+
+
Creates a new StoredBlock, calculating the additional fields by adding to the values in this block.
+
+
builder() - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new BtcFormat.Builder object.
+
+
builder() - Static method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
builder(Network) - Static method in class org.bitcoinj.wallet.KeyChainGroup
+
 
+
builder(Network, KeyChainGroupStructure) - Static method in class org.bitcoinj.wallet.KeyChainGroup
+
 
+
builder(NetworkParameters) - Static method in class org.bitcoinj.wallet.KeyChainGroup
+
+ +
+
builder(NetworkParameters, KeyChainGroupStructure) - Static method in class org.bitcoinj.wallet.KeyChainGroup
+
+ +
+
Builder() - Constructor for class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
 
+
buildFromLeaves(byte[], List<Sha256Hash>) - Static method in class org.bitcoinj.core.PartialMerkleTree
+
+
Calculates a PMT given the list of leaf hashes and which leaves need to be included.
+
+
BUILDING - Enum constant in enum class org.bitcoinj.core.TransactionConfidence.ConfidenceType
+
+
If BUILDING, then the transaction is included in the best chain and your confidence in it is increasing.
+
+
ByteArray - Class in org.bitcoinj.base.internal
+
+
An effectively-immutable byte array.
+
+
ByteArray(byte[]) - Constructor for class org.bitcoinj.base.internal.ByteArray
+
+
Wrapper for a byte[]
+
+
bytes - Variable in class org.bitcoinj.base.internal.ByteArray
+
 
+
bytes - Variable in class org.bitcoinj.base.LegacyAddress
+
 
+
bytes - Variable in class org.bitcoinj.crypto.EncodedPrivateKey
+
 
+
bytes() - Method in class org.bitcoinj.base.internal.ByteArray
+
 
+
BYTES - Static variable in class org.bitcoinj.base.Coin
+
+
Number of bytes to store this amount.
+
+
BYTES - Static variable in class org.bitcoinj.core.Services
+
+
Number of bytes of this bitfield.
+
+
BYTES - Static variable in class org.bitcoinj.core.TransactionOutPoint
+
 
+
bytesToBigInteger(byte[]) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Converts an array of bytes into a positive BigInteger.
+
+
byteStringToHash(ByteString) - Static method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
 
+
ByteUtils - Class in org.bitcoinj.base.internal
+
+
Utility methods for bit, byte, and integer manipulation and conversion.
+
+
ByteUtils() - Constructor for class org.bitcoinj.base.internal.ByteUtils
+
 
+
byteValue() - Method in enum class org.bitcoinj.core.Transaction.SigHash
+
 
+
+

C

+
+
calcSigHashValue(Transaction.SigHash, boolean) - Static method in class org.bitcoinj.crypto.TransactionSignature
+
+
Calculates the byte used in the protocol to represent the combination of mode and anyoneCanPay.
+
+
calculate(List<PeerFilterProvider>) - Method in class org.bitcoinj.net.FilterMerger
+
 
+
calculateAllSpendCandidates() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns a list of the outputs that can potentially be spent, i.e.
+
+
calculateAllSpendCandidates(boolean, boolean) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns a list of all outputs that are being tracked by this wallet either from the UTXOProvider + (in this case the existence or not of private keys is ignored), or the wallets internal storage (the default) + taking into account the flags.
+
+
calculateAllSpendCandidatesFromUTXOProvider(boolean) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns the spendable candidates from the UTXOProvider based on keys that the wallet contains.
+
+
calculateSignature(int, ECKey, byte[], Transaction.SigHash, boolean) - Method in class org.bitcoinj.core.Transaction
+
+
Calculates a signature that is valid for being inserted into the input at the given position.
+
+
calculateSignature(int, ECKey, AesKey, byte[], Transaction.SigHash, boolean) - Method in class org.bitcoinj.core.Transaction
+
+
Calculates a signature that is valid for being inserted into the input at the given position.
+
+
calculateSignature(int, ECKey, AesKey, Script, Transaction.SigHash, boolean) - Method in class org.bitcoinj.core.Transaction
+
+
Calculates a signature that is valid for being inserted into the input at the given position.
+
+
calculateSignature(int, ECKey, Script, Transaction.SigHash, boolean) - Method in class org.bitcoinj.core.Transaction
+
+
Calculates a signature that is valid for being inserted into the input at the given position.
+
+
calculateWitnessSignature(int, ECKey, byte[], Coin, Transaction.SigHash, boolean) - Method in class org.bitcoinj.core.Transaction
+
 
+
calculateWitnessSignature(int, ECKey, AesKey, byte[], Coin, Transaction.SigHash, boolean) - Method in class org.bitcoinj.core.Transaction
+
 
+
calculateWitnessSignature(int, ECKey, AesKey, Script, Coin, Transaction.SigHash, boolean) - Method in class org.bitcoinj.core.Transaction
+
 
+
calculateWitnessSignature(int, ECKey, Script, Coin, Transaction.SigHash, boolean) - Method in class org.bitcoinj.core.Transaction
+
 
+
canSignFor(Script) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns true if this wallet has at least one of the private keys needed to sign for this scriptPubKey.
+
+
CENT - Static variable in class org.bitcoinj.base.Coin
+
+
0.01 Bitcoins.
+
+
certificates - Variable in exception org.bitcoinj.protocols.payments.PaymentProtocolException.PkiVerificationException
+
 
+
chain - Variable in class org.bitcoinj.core.PeerGroup
+
 
+
chain() - Method in class org.bitcoinj.kits.WalletAppKit
+
 
+
chainCode - Variable in class org.bitcoinj.crypto.HDKeyDerivation.RawKeyBytes
+
 
+
ChainDownloadStartedEventListener - Interface in org.bitcoinj.core.listeners
+
+
Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, + they can pre-filter messages before they are processed by a Peer or PeerGroup, and they can + provide transactions to remote peers when they ask for them.
+
+
ChainFileLockedException - Exception in org.bitcoinj.store
+
+
Thrown by SPVBlockStore when the process cannot gain exclusive access to the chain file.
+
+
ChainFileLockedException(String) - Constructor for exception org.bitcoinj.store.ChainFileLockedException
+
 
+
ChainFileLockedException(Throwable) - Constructor for exception org.bitcoinj.store.ChainFileLockedException
+
 
+
chainHead - Variable in class org.bitcoinj.core.AbstractBlockChain
+
+
Tracks the top of the best known chain.
+
+
chains - Variable in class org.bitcoinj.wallet.KeyChainGroup
+
 
+
chains(List<DeterministicKeyChain>) - Method in class org.bitcoinj.wallet.KeyChainGroup.Builder
+
+
Add multiple chains.
+
+
CHANGE - Enum constant in enum class org.bitcoinj.wallet.KeyChain.KeyPurpose
+
 
+
CHANGE_CHANGE - Static variable in class org.bitcoinj.crypto.ChildNumber
+
 
+
CHANGE_RECEIVING - Static variable in class org.bitcoinj.crypto.ChildNumber
+
 
+
changeAddress - Variable in class org.bitcoinj.wallet.SendRequest
+
+
"Change" means the difference between the value gathered by a transactions inputs (the size of which you + don't really control as it depends on who sent you money), and the value being sent somewhere else.
+
+
changed - Variable in class org.bitcoinj.net.FilterMerger.Result
+
 
+
changeEncryptionKey(KeyCrypter, AesKey, AesKey) - Method in class org.bitcoinj.wallet.Wallet
+
+
Changes wallet AES encryption key, this is atomic operation.
+
+
changeEncryptionPassword(CharSequence, CharSequence) - Method in class org.bitcoinj.wallet.Wallet
+
+
Changes wallet encryption password, this is atomic operation.
+
+
character - Variable in exception org.bitcoinj.base.exceptions.AddressFormatException.InvalidCharacter
+
 
+
check() - Method in class org.bitcoinj.wallet.DeterministicSeed
+
+
Check if our mnemonic is a valid mnemonic phrase for our word list.
+
+
check(boolean, Supplier<? extends X>) - Static method in class org.bitcoinj.base.internal.Preconditions
+
+
Ensures the truth of an expression, throwing a custom exception if untrue.
+
+
check(List<String>) - Method in class org.bitcoinj.crypto.MnemonicCode
+
+
Check to see if a mnemonic word list is valid.
+
+
checkAddress(Address) - Method in enum class org.bitcoinj.base.BitcoinNetwork
+
+
Check if an address is valid on this network.
+
+
checkAESKey(AesKey) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
+
Check whether the AES key can decrypt the first encrypted key in the wallet.
+
+
checkAESKey(AesKey) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
checkAESKey(AesKey) - Method in interface org.bitcoinj.wallet.EncryptableKeyChain
+
 
+
checkAESKey(AesKey) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
 
+
checkAESKey(AesKey) - Method in class org.bitcoinj.wallet.Wallet
+
+
Check whether the AES key can decrypt the first encrypted key in the wallet.
+
+
checkArgument(boolean) - Static method in class org.bitcoinj.base.internal.Preconditions
+
+
Ensures the truth of an expression involving one or more parameters to the calling method.
+
+
checkArgument(boolean, Supplier<String>) - Static method in class org.bitcoinj.base.internal.Preconditions
+
+
Ensures the truth of an expression involving one or more parameters to the calling method.
+
+
checkBitLE(byte[], int) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Checks if the given bit is set in data, using little endian (not the same as Java native big endian)
+
+
checkCoinBaseHeight(int) - Method in class org.bitcoinj.core.Transaction
+
+
Check block height is in coinbase input script, for use after BIP 34 + enforcement is enabled.
+
+
checkDifficultyTransitions(StoredBlock, Block, BlockStore) - Method in class org.bitcoinj.core.NetworkParameters
+
+
Throws an exception if the block's difficulty is not correct.
+
+
checkDifficultyTransitions(StoredBlock, Block, BlockStore) - Method in class org.bitcoinj.params.BitcoinNetworkParams
+
 
+
checkDifficultyTransitions(StoredBlock, Block, BlockStore) - Method in class org.bitcoinj.params.TestNet3Params
+
 
+
checkDifficultyTransitions(StoredBlock, Block, BlockStore) - Method in class org.bitcoinj.testing.MockAltNetworkParams
+
 
+
checkForFilterExhaustion(FilteredBlock) - Method in class org.bitcoinj.wallet.Wallet
+
+
Used by Peer to decide whether or not to discard this block and any blocks building upon it, in case + the Bloom filter used to request them may be exhausted, that is, not have sufficient keys in the deterministic + sequence within it to reliably find relevant transactions.
+
+
CHECKLOCKTIMEVERIFY - Enum constant in enum class org.bitcoinj.script.Script.VerifyFlag
+
 
+
checkPassword(CharSequence) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
+
Returns whether the given password is correct for this key chain.
+
+
checkPassword(CharSequence) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
checkPassword(CharSequence) - Method in interface org.bitcoinj.wallet.EncryptableKeyChain
+
 
+
checkPassword(CharSequence) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
 
+
checkPassword(CharSequence) - Method in class org.bitcoinj.wallet.Wallet
+
+
Check whether the password can decrypt the first key in the wallet.
+
+
checkpoint(NetworkParameters, InputStream, BlockStore, long) - Static method in class org.bitcoinj.core.CheckpointManager
+
+ +
+
checkpoint(NetworkParameters, InputStream, BlockStore, Instant) - Static method in class org.bitcoinj.core.CheckpointManager
+
+
Convenience method that creates a CheckpointManager, loads the given data, gets the checkpoint for the given + time, then inserts it into the store and sets that to be the chain head.
+
+
CHECKPOINT - Enum constant in enum class org.bitcoinj.core.RejectMessage.RejectCode
+
+
The message described a block which was invalid according to hard-coded checkpoint blocks.
+
+
CheckpointManager - Class in org.bitcoinj.core
+
+
Vends hard-coded StoredBlocks for blocks throughout the chain.
+
+
CheckpointManager(NetworkParameters) - Constructor for class org.bitcoinj.core.CheckpointManager
+
+
Loads the default checkpoints bundled with bitcoinj
+
+
CheckpointManager(NetworkParameters, InputStream) - Constructor for class org.bitcoinj.core.CheckpointManager
+
+
Loads the checkpoints from the given stream
+
+
checkpoints - Variable in class org.bitcoinj.core.CheckpointManager
+
 
+
checkpoints - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
checkpoints - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
checkProofOfWork(boolean) - Method in class org.bitcoinj.core.Block
+
+
Returns true if the hash of the block is OK (lower than difficulty target).
+
+
CHECKSEQUENCEVERIFY - Enum constant in enum class org.bitcoinj.script.Script.VerifyFlag
+
 
+
checkState(boolean) - Static method in class org.bitcoinj.base.internal.Preconditions
+
+
Ensures the truth of an expression involving the state of the calling instance, but not + involving any parameters to the calling method.
+
+
checkState(boolean, Supplier<String>) - Static method in class org.bitcoinj.base.internal.Preconditions
+
+
Ensures the truth of an expression involving the state of the calling instance, but not + involving any parameters to the calling method.
+
+
checksum - Variable in class org.bitcoinj.core.BitcoinSerializer.BitcoinPacketHeader
+
 
+
CHILDNUM_ORDER - Static variable in class org.bitcoinj.crypto.DeterministicKey
+
+
Sorts deterministic keys in the order of their child number.
+
+
ChildNumber - Class in org.bitcoinj.crypto
+
+
This is just a wrapper for the i (child number) as per BIP 32 with a boolean getter for the most significant bit + and a getter for the actual 0-based child number.
+
+
ChildNumber(int) - Constructor for class org.bitcoinj.crypto.ChildNumber
+
 
+
ChildNumber(int, boolean) - Constructor for class org.bitcoinj.crypto.ChildNumber
+
 
+
childPaysForParent(Wallet, Transaction, Coin) - Static method in class org.bitcoinj.wallet.SendRequest
+
+
Construct a SendRequest for a CPFP (child-pays-for-parent) transaction.
+
+
chunks() - Method in class org.bitcoinj.script.Script
+
+
Gets an immutable list of the scripts parsed form.
+
+
CLEANSTACK - Enum constant in enum class org.bitcoinj.script.Script.VerifyFlag
+
 
+
cleanup() - Method in class org.bitcoinj.wallet.Wallet
+
+
Clean up the wallet.
+
+
clear() - Method in class org.bitcoinj.store.SPVBlockStore
+
 
+
clearBroadcastBy() - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Erases the set of broadcast/seen peers.
+
+
clearCreationTime() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Clears the creation time of this key.
+
+
clearCreationTime() - Method in class org.bitcoinj.crypto.ECKey
+
+
Clears the creation time of this key.
+
+
clearCreationTime() - Method in class org.bitcoinj.wallet.DeterministicSeed
+
+
Clears the creation time of this seed.
+
+
clearInputs() - Method in class org.bitcoinj.core.Transaction
+
+
Removes all the inputs from this transaction.
+
+
clearLastBlockSeenTime() - Method in class org.bitcoinj.wallet.Wallet
+
 
+
clearMockClock() - Static method in class org.bitcoinj.base.internal.TimeUtils
+
+
Clears the mock clock and causes time to tick again.
+
+
clearOutputs() - Method in class org.bitcoinj.core.Transaction
+
+
Removes all the outputs from this transaction.
+
+
clearScriptBytes() - Method in class org.bitcoinj.core.TransactionInput
+
+
Clear input scripts, e.g.
+
+
clearTransactions(int) - Method in class org.bitcoinj.wallet.Wallet
+
+
Deletes transactions which appeared above the given block height from the wallet, but does not touch the keys.
+
+
clearUpdateTime() - Method in class org.bitcoinj.core.Transaction
+
+
Clears the update time of this transaction.
+
+
ClientConnectionManager - Interface in org.bitcoinj.net
+
+
A generic interface for an object which keeps track of a set of open client connections, creates new ones and + ensures they are serviced properly.
+
+
clientVersion - Variable in class org.bitcoinj.core.VersionMessage
+
+
The version number of the protocol spoken.
+
+
clientVersion() - Method in class org.bitcoinj.core.VersionMessage
+
+
Gets the client version.
+
+
cloneAsHeader() - Method in class org.bitcoinj.core.Block
+
+
Returns a copy of the block, but without any transactions.
+
+
close() - Method in class org.bitcoinj.core.PeerSocketHandler
+
+
Closes the connection to the peer if one exists, or immediately closes the connection as soon as it opens
+
+
close() - Method in class org.bitcoinj.kits.WalletAppKit
+
+
Close and release resources.
+
+
close() - Method in interface org.bitcoinj.store.BlockStore
+
+
Closes the store.
+
+
close() - Method in class org.bitcoinj.store.MemoryBlockStore
+
 
+
close() - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
close() - Method in class org.bitcoinj.store.SPVBlockStore
+
 
+
closeConnection() - Method in class org.bitcoinj.net.BlockingClient
+
+
Closes the connection to the server, triggering the StreamConnection.connectionClosed() + event on the network-handling thread where all callbacks occur.
+
+
closeConnection() - Method in interface org.bitcoinj.net.MessageWriteTarget
+
+
Closes the connection to the server, triggering the StreamConnection.connectionClosed() + event on the network-handling thread where all callbacks occur.
+
+
closeConnection() - Method in class org.bitcoinj.net.NioClient
+
 
+
closeConnections(int) - Method in class org.bitcoinj.net.BlockingClientManager
+
 
+
closeConnections(int) - Method in interface org.bitcoinj.net.ClientConnectionManager
+
+
Closes n peer connections
+
+
closeConnections(int) - Method in class org.bitcoinj.net.NioClientManager
+
 
+
code - Variable in enum class org.bitcoinj.core.InventoryItem.Type
+
 
+
code() - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Get currency code that will be used for current shift.
+
+
code() - Method in class org.bitcoinj.core.RejectMessage
+
+
The reason code given for why the peer rejected the message.
+
+
code() - Method in class org.bitcoinj.utils.BtcFixedFormat
+
+
Return the currency code that identifies the units in which values formatted and + (by-default) parsed by this instance are denominated.
+
+
code(int, String) - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Configure currency code for given decimal separator shift.
+
+
code(String) - Method in class org.bitcoinj.utils.BtcFormat.Builder
+
+
Specify a custom currency code to be used in the denomination-unit indicators + of formatted values.
+
+
CODE - Enum constant in enum class org.bitcoinj.utils.BtcAutoFormat.Style
+
+
Constant for the formatting style that uses a currency code, e.g., "BTC".
+
+
CODE_BTC - Static variable in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Currency code for base 1 Bitcoin.
+
+
CODE_MBTC - Static variable in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Currency code for base 1/1000 Bitcoin.
+
+
CODE_SAT - Static variable in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Currency code for base 1 satoshi.
+
+
CODE_UBTC - Static variable in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Currency code for base 1/1000000 Bitcoin.
+
+
codeSeparator(char) - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Separator between currency code and formatted value.
+
+
coin - Variable in class org.bitcoinj.utils.ExchangeRate
+
 
+
Coin - Class in org.bitcoinj.base
+
+
Represents a monetary Bitcoin value.
+
+
COIN - Static variable in class org.bitcoinj.base.Coin
+
+
One Bitcoin.
+
+
COIN_SCALE - Static variable in class org.bitcoinj.utils.BtcFormat
+
+
A constant useful for specifying a denomination of bitcoins, the int value + 0.
+
+
COIN_SYMBOL_ALT - Static variable in class org.bitcoinj.utils.BtcFormat
+
+
An alternative currency symbol to use in locales where the default symbol is used for the national currency.
+
+
coinbase() - Static method in class org.bitcoinj.core.Transaction
+
+
Constructs an incomplete coinbase transaction with a minimal input script and no outputs.
+
+
coinbase(byte[]) - Static method in class org.bitcoinj.core.Transaction
+
+
Constructs an incomplete coinbase transaction with given bytes for the input script and no outputs.
+
+
CoinbaseHeightMismatch(String) - Constructor for exception org.bitcoinj.core.VerificationException.CoinbaseHeightMismatch
+
 
+
coinbaseInput(Transaction, byte[]) - Static method in class org.bitcoinj.core.TransactionInput
+
+
Creates an input that connects to nothing - used only in creation of coinbase transactions.
+
+
CoinbaseScriptSizeOutOfRange() - Constructor for exception org.bitcoinj.core.VerificationException.CoinbaseScriptSizeOutOfRange
+
 
+
coinCode() - Method in class org.bitcoinj.utils.BtcFormat
+
+
Return the unprefixed international currency code for bitcoins configured for this + object.
+
+
CoinSelection - Class in org.bitcoinj.wallet
+
+
Represents the results of a CoinSelector.select(Coin, List) operation.
+
+
CoinSelection(List<TransactionOutput>) - Constructor for class org.bitcoinj.wallet.CoinSelection
+
 
+
CoinSelection(Coin, Collection<TransactionOutput>) - Constructor for class org.bitcoinj.wallet.CoinSelection
+
+
Deprecated. + +
+
+
coinSelector - Variable in class org.bitcoinj.wallet.SendRequest
+
+
If not null, the CoinSelector to use instead of the wallets default.
+
+
coinSelector - Variable in class org.bitcoinj.wallet.Wallet
+
 
+
CoinSelector - Interface in org.bitcoinj.wallet
+
+
A CoinSelector is responsible for picking some outputs to spend, from the list of all possible outputs.
+
+
coinSymbol() - Method in class org.bitcoinj.utils.BtcFormat
+
+
Return the unprefixed currency symbol for bitcoins configured for this object.
+
+
coinToFiat(Coin) - Method in class org.bitcoinj.utils.ExchangeRate
+
+
Convert a coin amount to a fiat amount using this exchange rate.
+
+
coinType(Network) - Static method in interface org.bitcoinj.wallet.KeyChainGroupStructure
+
+
Return coin type path component for a network id
+
+
COINTYPE_BTC - Static variable in class org.bitcoinj.crypto.ChildNumber
+
 
+
COINTYPE_TBTC - Static variable in class org.bitcoinj.crypto.ChildNumber
+
 
+
commaJoin(String...) - Static method in class org.bitcoinj.base.internal.InternalUtils
+
+
Join strings with ", " skipping nulls
+
+
command - Variable in class org.bitcoinj.core.BitcoinSerializer.BitcoinPacketHeader
+
 
+
commitDatabaseBatchWrite() - Method in interface org.bitcoinj.store.FullPrunedBlockStore
+
 
+
commitDatabaseBatchWrite() - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
commitTx(Transaction) - Method in class org.bitcoinj.wallet.Wallet
+
+
Updates the wallet with the given transaction: puts it into the pending pool, sets the spent flags and runs + the onCoinsSent/onCoinsReceived event listener.
+
+
COMPACT_SERIALIZED_SIZE - Static variable in class org.bitcoinj.core.StoredBlock
+
+
Number of bytes serialized by StoredBlock.serializeCompact(ByteBuffer)
+
+
COMPACT_SERIALIZED_SIZE_V2 - Static variable in class org.bitcoinj.core.StoredBlock
+
+
Number of bytes serialized by StoredBlock.serializeCompactV2(ByteBuffer)
+
+
compareByDepth(TransactionOutput, TransactionOutput) - Static method in class org.bitcoinj.wallet.DefaultCoinSelector
+
+
Comparator for sorting TransactionOutput by coin depth, value, and then hash.
+
+
compareTo(Address) - Method in interface org.bitcoinj.base.Address
+
+
Comparison field order for addresses is: + + Network.id() + Legacy vs.
+
+
compareTo(Address) - Method in class org.bitcoinj.base.LegacyAddress
+
+
Comparison field order for addresses is: + + Network.id() + Legacy vs.
+
+
compareTo(Address) - Method in class org.bitcoinj.base.SegwitAddress
+
+
Comparison field order for addresses is: + + Network.id() + Legacy vs.
+
+
compareTo(Coin) - Method in class org.bitcoinj.base.Coin
+
 
+
compareTo(ByteArray) - Method in class org.bitcoinj.base.internal.ByteArray
+
compareTo(Sha256Hash) - Method in class org.bitcoinj.base.Sha256Hash
+
 
+
compareTo(Fiat) - Method in class org.bitcoinj.base.utils.Fiat
+
 
+
compareTo(ChildNumber) - Method in class org.bitcoinj.crypto.ChildNumber
+
 
+
compareTo(ExponentialBackoff) - Method in class org.bitcoinj.utils.ExponentialBackoff
+
 
+
compareTypes(Address, Address) - Static method in interface org.bitcoinj.base.Address
+
 
+
completedFuture(T) - Static method in class org.bitcoinj.utils.ListenableCompletableFuture
+
+ +
+
completeTx(SendRequest) - Method in class org.bitcoinj.wallet.Wallet
+
+
Given a spend request containing an incomplete transaction, makes it valid by adding outputs and signed inputs + according to the instructions in the request.
+
+
CompletionException() - Constructor for exception org.bitcoinj.wallet.Wallet.CompletionException
+
 
+
CompletionException(String) - Constructor for exception org.bitcoinj.wallet.Wallet.CompletionException
+
 
+
CompletionException(Throwable) - Constructor for exception org.bitcoinj.wallet.Wallet.CompletionException
+
 
+
compress() - Method in class org.bitcoinj.crypto.LazyECPoint
+
+
Returns a compressed version of this elliptic curve point.
+
+
compressed - Variable in class org.bitcoinj.crypto.BIP38PrivateKey
+
 
+
concat(byte[], byte[]) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Concatenate two byte arrays
+
+
connect(Map<Sha256Hash, Transaction>, TransactionInput.ConnectMode) - Method in class org.bitcoinj.core.TransactionInput
+
+
Connects this input to the relevant output of the referenced transaction if it's in the given map.
+
+
connect(TransactionOutput) - Method in class org.bitcoinj.core.TransactionInput
+
+
Internal use only: connects this TransactionInput to the given output (updates pointers and spent flags)
+
+
connect(Transaction, TransactionInput.ConnectMode) - Method in class org.bitcoinj.core.TransactionInput
+
+
Connects this input to the relevant output of the referenced transaction.
+
+
connectionClosed() - Method in class org.bitcoinj.core.Peer
+
 
+
connectionClosed() - Method in interface org.bitcoinj.net.StreamConnection
+
+
Called when the connection socket is closed
+
+
connectionOpened() - Method in class org.bitcoinj.core.Peer
+
 
+
connectionOpened() - Method in interface org.bitcoinj.net.StreamConnection
+
+
Called when the connection socket is first opened
+
+
connectTo(InetSocketAddress) - Method in class org.bitcoinj.core.PeerGroup
+
+
Connect to a peer by creating a channel to the destination address.
+
+
connectTo(PeerAddress, boolean, Duration) - Method in class org.bitcoinj.core.PeerGroup
+
+
Creates a version message to send, constructs a Peer object and attempts to connect it.
+
+
connectToLocalHost() - Method in class org.bitcoinj.core.PeerGroup
+
+
Helper for forcing a connection to localhost.
+
+
connectToLocalHost() - Method in class org.bitcoinj.kits.WalletAppKit
+
+
Will only connect to localhost.
+
+
connectTransaction(Transaction) - Method in class org.bitcoinj.core.TransactionOutPoint
+
+
Returns a copy of this outpoint, but with the provided transaction as fromTx.
+
+
connectTransactions(int, Block) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Connect each transaction in block.transactions, verifying them as we go and removing spent outputs + If an error is encountered in a transaction, no changes should be made to the underlying BlockStore.
+
+
connectTransactions(int, Block) - Method in class org.bitcoinj.core.BlockChain
+
 
+
connectTransactions(int, Block) - Method in class org.bitcoinj.core.FullPrunedBlockChain
+
 
+
connectTransactions(StoredBlock) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Load newBlock from BlockStore and connect its transactions, returning changes to the set of unspent transactions.
+
+
connectTransactions(StoredBlock) - Method in class org.bitcoinj.core.BlockChain
+
 
+
connectTransactions(StoredBlock) - Method in class org.bitcoinj.core.FullPrunedBlockChain
+
+
Used during reorgs to connect a block previously on a fork
+
+
contains(byte[]) - Method in class org.bitcoinj.core.BloomFilter
+
+
Returns true if the given object matches the filter either because it was inserted, or because we have a + false-positive.
+
+
content - Variable in class org.bitcoinj.crypto.BIP38PrivateKey
+
 
+
Context - Class in org.bitcoinj.core
+
+
The Context object holds various objects and pieces of configuration that are scoped to a specific instantiation of + bitcoinj for a specific network.
+
+
Context() - Constructor for class org.bitcoinj.core.Context
+
+
Creates a new context object.
+
+
Context(int, Coin, boolean, boolean) - Constructor for class org.bitcoinj.core.Context
+
+
Creates a new custom context object.
+
+
Context(NetworkParameters) - Constructor for class org.bitcoinj.core.Context
+
+
Deprecated. + +
+
+
Context(NetworkParameters, int, Coin, boolean) - Constructor for class org.bitcoinj.core.Context
+
+ +
+
ContextPropagatingThreadFactory - Class in org.bitcoinj.utils
+
+
A ThreadFactory that propagates a Context from the creating + thread into the new thread.
+
+
ContextPropagatingThreadFactory(String) - Constructor for class org.bitcoinj.utils.ContextPropagatingThreadFactory
+
 
+
ContextPropagatingThreadFactory(String, int) - Constructor for class org.bitcoinj.utils.ContextPropagatingThreadFactory
+
 
+
convertToBitcoinURI(Address, Coin, String, String) - Static method in class org.bitcoinj.uri.BitcoinURI
+
+
Simple Bitcoin URI builder using known good fields.
+
+
convertToBitcoinURI(Network, String, Coin, String, String) - Static method in class org.bitcoinj.uri.BitcoinURI
+
+
Simple Bitcoin URI builder using known good fields.
+
+
convertToBitcoinURI(NetworkParameters, String, Coin, String, String) - Static method in class org.bitcoinj.uri.BitcoinURI
+
+ +
+
correctlySpends(Transaction, int, TransactionWitness, Coin, Script, Set<Script.VerifyFlag>) - Method in class org.bitcoinj.script.Script
+
+
Verifies that this script (interpreted as a scriptSig) correctly spends the given scriptPubKey.
+
+
correctlySpends(Transaction, long, Script, Set<Script.VerifyFlag>) - Method in class org.bitcoinj.script.Script
+
+ +
+
create(Network, KeyChainGroup) - Method in interface org.bitcoinj.wallet.WalletProtobufSerializer.WalletFactory
+
 
+
create(NetworkParameters, KeyChainGroup) - Method in interface org.bitcoinj.wallet.WalletProtobufSerializer.WalletFactory
+
+
Deprecated.
+
+
create(Wallet, Transaction, List<Transaction>) - Method in class org.bitcoinj.wallet.DefaultRiskAnalysis.Analyzer
+
 
+
create(Wallet, Transaction, List<Transaction>) - Method in interface org.bitcoinj.wallet.RiskAnalysis.Analyzer
+
 
+
createBasic(Network) - Static method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Creates a keychain group with just a basic chain.
+
+
createBasic(Network) - Static method in class org.bitcoinj.wallet.Wallet
+
+
Creates a new, empty wallet with just a basic keychain and no transactions.
+
+
createBasic(NetworkParameters) - Static method in class org.bitcoinj.wallet.KeyChainGroup
+
+ +
+
createBasic(NetworkParameters) - Static method in class org.bitcoinj.wallet.Wallet
+
+
Deprecated. + +
+
+
createDeterministic(Network, ScriptType) - Static method in class org.bitcoinj.wallet.Wallet
+
+
Creates a new, empty wallet with a randomly chosen seed and no transactions.
+
+
createDeterministic(Network, ScriptType, KeyChainGroupStructure) - Static method in class org.bitcoinj.wallet.Wallet
+
+
Creates a new, empty wallet with a randomly chosen seed and no transactions.
+
+
createDeterministic(NetworkParameters, ScriptType) - Static method in class org.bitcoinj.wallet.Wallet
+
+ +
+
createDeterministic(NetworkParameters, ScriptType, KeyChainGroupStructure) - Static method in class org.bitcoinj.wallet.Wallet
+
+ +
+
createEmpty() - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates an empty script.
+
+
createEmptyInputScript(ECKey, Script) - Method in class org.bitcoinj.script.Script
+
+
Creates an incomplete scriptSig that, once filled with signatures, can redeem output containing this scriptPubKey.
+
+
createExecutor() - Method in class org.bitcoinj.net.discovery.DnsDiscovery
+
 
+
createExecutor() - Method in class org.bitcoinj.net.discovery.MultiplexingDiscovery
+
 
+
createFakeBlock(BlockStore, int, Transaction...) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+
Emulates receiving a valid block that builds on top of the chain.
+
+
createFakeBlock(BlockStore, long, long, int, Transaction...) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+ +
+
createFakeBlock(BlockStore, long, long, Transaction...) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+ +
+
createFakeBlock(BlockStore, long, Instant, int, Transaction...) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+
Emulates receiving a valid block that builds on top of the chain.
+
+
createFakeBlock(BlockStore, long, Instant, Transaction...) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+
Emulates receiving a valid block that builds on top of the chain.
+
+
createFakeBlock(BlockStore, StoredBlock, int, Transaction...) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
 
+
createFakeBlock(BlockStore, StoredBlock, long, long, int, Transaction...) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+ +
+
createFakeBlock(BlockStore, StoredBlock, long, Instant, int, Transaction...) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+
Emulates receiving a valid block
+
+
createFakeBlock(BlockStore, Transaction...) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+
Emulates receiving a valid block that builds on top of the chain.
+
+
createFakeCoinbaseTx() - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+
Create a fake coinbase transaction.
+
+
createFakeDoubleSpendTxns(Address) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+
Creates two transactions that spend the same (fake) output.
+
+
createFakeTx(Coin, Address, Address) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+
Transaction[0] is a feeder transaction, supplying BTC to Transaction[1]
+
+
createFakeTx(Coin, ECKey) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+
Create a fake TX of sufficient realism to exercise the unit tests.
+
+
createFakeTx(Network) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+
Create a fake transaction, without change.
+
+
createFakeTx(Network, Coin, Address) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+
Create a fake TX of sufficient realism to exercise the unit tests.
+
+
createFakeTx(NetworkParameters) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+ +
+
createFakeTx(NetworkParameters, Coin, Address) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+ +
+
createFakeTxWithChangeAddress(Coin, Address, Address) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+
Create a fake TX of sufficient realism to exercise the unit tests.
+
+
createFakeTxWithoutChange(TransactionOutput) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+
Create a fake transaction, without change.
+
+
createFakeTxWithoutChangeAddress(Coin, Address) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+
Create a fake TX for unit tests, for use with unit tests that need greater control.
+
+
createFromBitcoinUri(BitcoinURI) - Static method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri.
+
+
createFromBitcoinUri(BitcoinURI, boolean) - Static method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri.
+
+
createFromBitcoinUri(BitcoinURI, boolean, TrustStoreLoader) - Static method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri.
+
+
createFromUrl(String) - Static method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns a future that will be notified with a PaymentSession object after it is fetched using the provided url.
+
+
createFromUrl(String, boolean) - Static method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns a future that will be notified with a PaymentSession object after it is fetched using the provided url.
+
+
createFromUrl(String, boolean, TrustStoreLoader) - Static method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns a future that will be notified with a PaymentSession object after it is fetched using the provided url.
+
+
createGenesis(Instant, long) - Static method in class org.bitcoinj.core.Block
+
 
+
createGenesis(Instant, long, long) - Static method in class org.bitcoinj.core.Block
+
 
+
createInputScript(byte[]) - Static method in class org.bitcoinj.script.Script
+
 
+
createInputScript(byte[], byte[]) - Static method in class org.bitcoinj.script.Script
+
 
+
createInputScript(TransactionSignature) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a scriptSig that can redeem a P2PK output.
+
+
createInputScript(TransactionSignature, ECKey) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a scriptSig that can redeem a P2PKH output.
+
+
createMasterPrivateKey(byte[]) - Static method in class org.bitcoinj.crypto.HDKeyDerivation
+
+
Generates a new deterministic key from the given seed, which can be any arbitrary byte array.
+
+
createMasterPrivKeyFromBytes(byte[], byte[]) - Static method in class org.bitcoinj.crypto.HDKeyDerivation
+
 
+
createMasterPubKeyFromBytes(byte[], byte[]) - Static method in class org.bitcoinj.crypto.HDKeyDerivation
+
 
+
createMockBroadcast(Transaction, CompletableFuture<Transaction>) - Static method in class org.bitcoinj.core.TransactionBroadcast
+
 
+
createMultiSigInputScript(List<TransactionSignature>) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Create a program that satisfies an OP_CHECKMULTISIG program.
+
+
createMultiSigInputScript(TransactionSignature...) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Create a program that satisfies an OP_CHECKMULTISIG program.
+
+
createMultiSigInputScriptBytes(List<byte[]>) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Create a program that satisfies an OP_CHECKMULTISIG program, using pre-encoded signatures.
+
+
createMultiSigInputScriptBytes(List<byte[]>, byte[]) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Create a program that satisfies an OP_CHECKMULTISIG program, using pre-encoded signatures.
+
+
createMultiSigOutputScript(int, List<ECKey>) - Static method in class org.bitcoinj.script.Script
+
+
Creates a program that requires at least N of the given keys to sign, using OP_CHECKMULTISIG.
+
+
createMultiSigOutputScript(int, List<ECKey>) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a program that requires at least N of the given keys to sign, using OP_CHECKMULTISIG.
+
+
createNextBlock(Address) - Method in class org.bitcoinj.core.Block
+
+
This method is intended for test use only.
+
+
createNextBlock(Address, long, Instant, int) - Method in class org.bitcoinj.core.Block
+
+
Returns a solved block that builds on top of this one.
+
+
createNextBlock(Address, Coin) - Method in class org.bitcoinj.core.Block
+
+
This method is intended for test use only.
+
+
createNextBlock(Address, TransactionOutPoint) - Method in class org.bitcoinj.core.Block
+
+
This method is intended for test use only.
+
+
createNextBlockWithCoinbase(long, byte[], Coin, int) - Method in class org.bitcoinj.core.Block
+
+
This method is intended for test use only.
+
+
createOpReturnScript(byte[]) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a script of the form OP_RETURN [data].
+
+
createOutputScript(Address) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a scriptPubKey that encodes payment to the given address.
+
+
createOutputScript(Address, Instant) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a scriptPubKey that encodes payment to the given address.
+
+
createP2PKHOutputScript(byte[]) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a scriptPubKey that sends to the given public key hash.
+
+
createP2PKHOutputScript(ECKey) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a scriptPubKey that sends to the given public key.
+
+
createP2PKOutputScript(byte[]) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a scriptPubKey that encodes payment to the given raw public key.
+
+
createP2PKOutputScript(ECKey) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a scriptPubKey that encodes payment to the given raw public key.
+
+
createP2SHMultiSigInputScript(List<TransactionSignature>, Script) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Create a program that satisfies a P2SH OP_CHECKMULTISIG program.
+
+
createP2SHOutputScript(byte[]) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a scriptPubKey that sends to the given script hash.
+
+
createP2SHOutputScript(int, List<ECKey>) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a P2SH output script for n-of-m multisig with given public keys and threshold.
+
+
createP2SHOutputScript(Script) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a scriptPubKey for a given redeem script.
+
+
createP2WPKHOutputScript(byte[]) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a segwit scriptPubKey that sends to the given public key hash.
+
+
createP2WPKHOutputScript(ECKey) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a segwit scriptPubKey that sends to the given public key.
+
+
createP2WSHOutputScript(byte[]) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a segwit scriptPubKey that sends to the given script hash.
+
+
createP2WSHOutputScript(Script) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates a segwit scriptPubKey for the given redeem script.
+
+
createPaymentAck(Protos.Payment, String) - Static method in class org.bitcoinj.protocols.payments.PaymentProtocol
+
+
Create a payment ack.
+
+
createPaymentMessage(List<Transaction>, List<Protos.Output>, String, byte[]) - Static method in class org.bitcoinj.protocols.payments.PaymentProtocol
+
+
Create a payment message.
+
+
createPaymentMessage(List<Transaction>, Coin, Address, String, byte[]) - Static method in class org.bitcoinj.protocols.payments.PaymentProtocol
+
+
Create a payment message with one standard pay to address output.
+
+
createPaymentRequest(NetworkParameters, List<Protos.Output>, String, String, byte[]) - Static method in class org.bitcoinj.protocols.payments.PaymentProtocol
+
+
Create a payment request.
+
+
createPaymentRequest(NetworkParameters, Coin, Address, String, String, byte[]) - Static method in class org.bitcoinj.protocols.payments.PaymentProtocol
+
+
Create a payment request with one standard pay to address output.
+
+
createPayToAddressOutput(Coin, Address) - Static method in class org.bitcoinj.protocols.payments.PaymentProtocol
+
+ +
+
createPeer(PeerAddress, VersionMessage) - Method in class org.bitcoinj.core.PeerGroup
+
+
You can override this to customise the creation of Peer objects.
+
+
createPeerGroup() - Method in class org.bitcoinj.kits.WalletAppKit
+
 
+
createPrivateExecutor() - Method in class org.bitcoinj.core.PeerGroup
+
 
+
createRedeemScript(int, List<ECKey>) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Creates an n-of-m multisig redeem script with given public keys and threshold.
+
+
createSend(Address, Coin) - Method in class org.bitcoinj.wallet.Wallet
+
+
Statelessly creates a transaction that sends the given value to address.
+
+
createSend(Address, Coin, boolean) - Method in class org.bitcoinj.wallet.Wallet
+
+
Statelessly creates a transaction that sends the given value to address.
+
+
createWallet() - Method in class org.bitcoinj.kits.WalletAppKit
+
 
+
creationTime - Variable in class org.bitcoinj.crypto.ECKey
+
 
+
creationTime - Variable in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
 
+
creationTime() - Method in class org.bitcoinj.script.Script
+
+
Gets the associated creation time of this script, or empty if undefined.
+
+
creationTime(Instant) - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Associates this script to be built with a given creation time.
+
+
CryptoUtils - Class in org.bitcoinj.crypto.internal
+
+
Utilities for the crypto module (e.g.
+
+
CryptoUtils() - Constructor for class org.bitcoinj.crypto.internal.CryptoUtils
+
 
+
currencyCode - Variable in class org.bitcoinj.base.utils.Fiat
+
 
+
CURRENT - Enum constant in enum class org.bitcoinj.core.ProtocolVersion
+
 
+
CURRENT_WALLET_VERSION - Static variable in class org.bitcoinj.wallet.WalletProtobufSerializer
+
+
Current version used for serializing wallets.
+
+
currentAddress(KeyChain.KeyPurpose) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+ +
+
currentAddress(KeyChain.KeyPurpose) - Method in class org.bitcoinj.wallet.Wallet
+
+ +
+
currentChangeAddress() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns the address used for change outputs.
+
+
currentKey(KeyChain.KeyPurpose) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Returns a key that hasn't been seen in a transaction yet, and which is suitable for displaying in a wallet + user interface as "a convenient key to receive funds on" when the purpose parameter is + KeyChain.KeyPurpose.RECEIVE_FUNDS.
+
+
currentKey(KeyChain.KeyPurpose) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns a key that hasn't been seen in a transaction yet, and which is suitable for displaying in a wallet + user interface as "a convenient key to receive funds on" when the purpose parameter is + KeyChain.KeyPurpose.RECEIVE_FUNDS.
+
+
CurrentKeyChangeEventListener - Interface in org.bitcoinj.wallet.listeners
+
 
+
currentReceiveAddress() - Method in class org.bitcoinj.wallet.Wallet
+
+ +
+
currentReceiveKey() - Method in class org.bitcoinj.wallet.Wallet
+
+ +
+
currentTime() - Static method in class org.bitcoinj.base.internal.TimeUtils
+
+
Returns the current time as an Instant, or a mocked out equivalent.
+
+
CustomTransactionSigner - Class in org.bitcoinj.signers
+
+
This signer may be used as a template for creating custom multisig transaction signers.
+
+
CustomTransactionSigner() - Constructor for class org.bitcoinj.signers.CustomTransactionSigner
+
 
+
CustomTransactionSigner.SignatureAndKey - Class in org.bitcoinj.signers
+
 
+
+

D

+
+
DaemonThreadFactory - Class in org.bitcoinj.utils
+
+
Thread factory whose threads are marked as daemon and won't prevent process exit.
+
+
DaemonThreadFactory() - Constructor for class org.bitcoinj.utils.DaemonThreadFactory
+
 
+
DaemonThreadFactory(String) - Constructor for class org.bitcoinj.utils.DaemonThreadFactory
+
 
+
data - Variable in class org.bitcoinj.script.ScriptChunk
+
+
For push operations, this is the vector to be pushed on the stack.
+
+
data(byte[]) - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Adds a copy of the given byte array as a data element (i.e.
+
+
data(int, byte[]) - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Adds a copy of the given byte array as a data element (i.e.
+
+
dataHash - Variable in class org.bitcoinj.core.CheckpointManager
+
 
+
dateTimeFormat(Instant) - Static method in class org.bitcoinj.base.internal.TimeUtils
+
+
Formats a given date+time value to an ISO 8601 string.
+
+
DEAD - Enum constant in enum class org.bitcoinj.core.TransactionConfidence.ConfidenceType
+
+
If DEAD, then it means the transaction won't confirm unless there is another re-org, + because some other transaction is spending one of its inputs.
+
+
DEAD - Enum constant in enum class org.bitcoinj.wallet.WalletTransaction.Pool
+
 
+
decimalGroups - Variable in class org.bitcoinj.utils.BtcFormat
+
 
+
decimalMark(char) - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Set character to use as the decimal mark.
+
+
decode(String) - Static method in class org.bitcoinj.base.Base58
+
+
Decodes the given base58 string into the original data bytes.
+
+
decode(String) - Static method in class org.bitcoinj.base.Bech32
+
+
Decode a Bech32 string.
+
+
decode5to8() - Method in class org.bitcoinj.base.Bech32.Bech32Bytes
+
+
Return the data, fully-decoded with 8-bits per byte.
+
+
decodeBytes(String, String, Bech32.Encoding) - Static method in class org.bitcoinj.base.Bech32
+
+
Decode a Bech32 string to a byte array.
+
+
decodeChecked(String) - Static method in class org.bitcoinj.base.Base58
+
+
Decodes the given base58 string into the original data bytes, using the checksum in the + last 4 bytes of the decoded data to verify that the rest are correct.
+
+
decodeCompactBits(long) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
The "compact" format is a representation of a whole number N using an unsigned 32 bit number similar to a + floating point format.
+
+
decodeFromBitcoin(byte[], boolean, boolean) - Static method in class org.bitcoinj.crypto.TransactionSignature
+
+
Returns a decoded signature.
+
+
decodeFromDER(byte[]) - Static method in class org.bitcoinj.crypto.ECKey.ECDSASignature
+
 
+
decodeFromOpN(int) - Static method in class org.bitcoinj.script.Script
+
 
+
decodeMPI(byte[], boolean) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
MPI encoded numbers are produced by the OpenSSL BN_bn2mpi function.
+
+
decodeOnionUrl(String) - Static method in class org.bitcoinj.core.internal.TorUtils
+
+
Decode an Onion URL into a Tor V2 or V3 address.
+
+
decodeOpN() - Method in class org.bitcoinj.script.ScriptChunk
+
+
If this chunk is an OP_N opcode returns the equivalent integer value.
+
+
decodeToBigInteger(String) - Static method in class org.bitcoinj.base.Base58
+
 
+
decompress() - Method in class org.bitcoinj.crypto.ECKey
+
+
Returns a copy of this key, but with the public point represented in uncompressed form.
+
+
decompress() - Method in class org.bitcoinj.crypto.LazyECPoint
+
+
Returns a decompressed version of this elliptic curve point.
+
+
decrypt(CharSequence) - Method in class org.bitcoinj.wallet.Wallet
+
+
Decrypt the wallet with the wallets keyCrypter and password.
+
+
decrypt(String) - Method in class org.bitcoinj.crypto.BIP38PrivateKey
+
 
+
decrypt(AesKey) - Method in class org.bitcoinj.crypto.DeterministicKey
+
 
+
decrypt(AesKey) - Method in class org.bitcoinj.crypto.ECKey
+
+
Create a decrypted private key with AES key.
+
+
decrypt(AesKey) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Decrypt the keys in the group using the previously given key crypter and the AES key.
+
+
decrypt(AesKey) - Method in class org.bitcoinj.wallet.Wallet
+
+
Decrypt the wallet with the wallets keyCrypter and AES key.
+
+
decrypt(EncryptedData, AesKey) - Method in interface org.bitcoinj.crypto.KeyCrypter
+
+
Decrypt the provided encrypted bytes, converting them into unencrypted bytes.
+
+
decrypt(EncryptedData, AesKey) - Method in class org.bitcoinj.crypto.KeyCrypterScrypt
+
+
Decrypt bytes previously encrypted with this class.
+
+
decrypt(KeyCrypter, String, AesKey) - Method in class org.bitcoinj.wallet.DeterministicSeed
+
 
+
decrypt(KeyCrypter, AesKey) - Method in class org.bitcoinj.crypto.DeterministicKey
+
 
+
decrypt(KeyCrypter, AesKey) - Method in class org.bitcoinj.crypto.ECKey
+
+
Create a decrypted private key with the keyCrypter and AES key supplied.
+
+
DecryptingKeyBag - Class in org.bitcoinj.wallet
+
+
A DecryptingKeyBag filters a pre-existing key bag, decrypting keys as they are requested using the provided + AES key.
+
+
DecryptingKeyBag(KeyBag, AesKey) - Constructor for class org.bitcoinj.wallet.DecryptingKeyBag
+
 
+
DEFAULT - Static variable in interface org.bitcoinj.wallet.KeyChainGroupStructure
+
+
Deprecated. + +
+
+
DEFAULT - Static variable in interface org.bitcoinj.wallet.WalletProtobufSerializer.WalletFactory
+
 
+
DEFAULT_BLOOM_FILTER_FP_RATE - Static variable in class org.bitcoinj.core.PeerGroup
+
+
The default Bloom filter false positive rate, which is selected to be extremely low such that you hardly ever + download false positives.
+
+
DEFAULT_CAPACITY - Static variable in class org.bitcoinj.store.SPVBlockStore
+
+
The default number of headers that will be stored in the ring buffer.
+
+
DEFAULT_CONNECT_TIMEOUT - Static variable in class org.bitcoinj.core.PeerGroup
+
+
The default timeout between when a connection attempt begins and version message exchange completes
+
+
DEFAULT_CONNECTIONS - Static variable in class org.bitcoinj.core.PeerGroup
+
+
The default number of connections to the p2p network the library will try to build.
+
+
DEFAULT_EVENT_HORIZON - Static variable in class org.bitcoinj.core.Context
+
 
+
DEFAULT_INITIAL_INTERVAL - Static variable in class org.bitcoinj.utils.ExponentialBackoff
+
 
+
DEFAULT_KEYSTORE_PASSWORD - Static variable in interface org.bitcoinj.crypto.TrustStoreLoader
+
 
+
DEFAULT_KEYSTORE_TYPE - Static variable in interface org.bitcoinj.crypto.TrustStoreLoader
+
 
+
DEFAULT_MAXIMUM_INTERVAL - Static variable in class org.bitcoinj.utils.ExponentialBackoff
+
 
+
DEFAULT_MULTIPLIER - Static variable in class org.bitcoinj.utils.ExponentialBackoff
+
 
+
DEFAULT_PASSPHRASE_FOR_MNEMONIC - Static variable in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
DEFAULT_PING_INTERVAL_MSEC - Static variable in class org.bitcoinj.core.PeerGroup
+
+
How many milliseconds to wait after receiving a pong before sending another ping.
+
+
DEFAULT_SEED_ENTROPY_BITS - Static variable in class org.bitcoinj.wallet.DeterministicSeed
+
 
+
DEFAULT_TX_FEE - Static variable in class org.bitcoinj.core.Transaction
+
+
If using this feePerKb, transactions will get confirmed within the next couple of blocks.
+
+
defaultBlocksDir() - Static method in class org.bitcoinj.utils.BlockFileLoader
+
 
+
DefaultCoinSelector - Class in org.bitcoinj.wallet
+
+
This class implements a CoinSelector which attempts to get the highest priority + possible.
+
+
DefaultCoinSelector() - Constructor for class org.bitcoinj.wallet.DefaultCoinSelector
+
 
+
DefaultKeyChainFactory - Class in org.bitcoinj.wallet
+
+
Default factory for creating keychains while de-serializing.
+
+
DefaultKeyChainFactory() - Constructor for class org.bitcoinj.wallet.DefaultKeyChainFactory
+
 
+
DefaultRiskAnalysis - Class in org.bitcoinj.wallet
+
+
The default risk analysis.
+
+
DefaultRiskAnalysis.Analyzer - Class in org.bitcoinj.wallet
+
 
+
DefaultRiskAnalysis.RuleViolation - Enum Class in org.bitcoinj.wallet
+
+
The reason a transaction is considered non-standard, returned by + DefaultRiskAnalysis.isStandard(Transaction).
+
+
defaultSerializer - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
DefaultTrustStoreLoader() - Constructor for class org.bitcoinj.crypto.TrustStoreLoader.DefaultTrustStoreLoader
+
 
+
delegate - Variable in class org.bitcoinj.wallet.FilteringCoinSelector
+
 
+
dependencies - Variable in class org.bitcoinj.wallet.DefaultRiskAnalysis
+
 
+
DEPTH - Enum constant in enum class org.bitcoinj.core.TransactionConfidence.Listener.ChangeReason
+
+
Occurs when a transaction that is in the best known block chain gets buried by another block.
+
+
derByteStream() - Method in class org.bitcoinj.crypto.ECKey.ECDSASignature
+
 
+
derive(int) - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Derives a child at the given index using hardened derivation.
+
+
derive(String, String, int, int) - Static method in class org.bitcoinj.crypto.PBKDF2SHA512
+
+
Derive a key using PBKDF2-SHA512
+
+
deriveChild(List<ChildNumber>, boolean, boolean, ChildNumber) - Method in class org.bitcoinj.crypto.DeterministicHierarchy
+
+
Extends the tree by calculating the requested child for the given path.
+
+
deriveChildKey(DeterministicKey, int) - Static method in class org.bitcoinj.crypto.HDKeyDerivation
+
+
Derives a key given the "extended" child number, ie.
+
+
deriveChildKey(DeterministicKey, ChildNumber) - Static method in class org.bitcoinj.crypto.HDKeyDerivation
+
 
+
deriveChildKeyBytesFromPrivate(DeterministicKey, ChildNumber) - Static method in class org.bitcoinj.crypto.HDKeyDerivation
+
 
+
deriveChildKeyBytesFromPublic(DeterministicKey, ChildNumber, HDKeyDerivation.PublicDeriveMode) - Static method in class org.bitcoinj.crypto.HDKeyDerivation
+
 
+
deriveChildKeyFromPrivate(DeterministicKey, ChildNumber) - Static method in class org.bitcoinj.crypto.HDKeyDerivation
+
 
+
deriveChildKeyFromPublic(DeterministicKey, ChildNumber, HDKeyDerivation.PublicDeriveMode) - Static method in class org.bitcoinj.crypto.HDKeyDerivation
+
 
+
deriveKey(CharSequence) - Method in interface org.bitcoinj.crypto.KeyCrypter
+
+
Create an AESKey (which typically contains an AES key)
+
+
deriveKey(CharSequence) - Method in class org.bitcoinj.crypto.KeyCrypterScrypt
+
+
Generate AES key.
+
+
deriveNextChild(List<ChildNumber>, boolean, boolean, boolean) - Method in class org.bitcoinj.crypto.DeterministicHierarchy
+
+
Extends the tree by calculating the next key that hangs off the given parent path.
+
+
deriveThisOrNextChildKey(DeterministicKey, int) - Static method in class org.bitcoinj.crypto.HDKeyDerivation
+
+
Derives a key of the "extended" child number, ie.
+
+
DERSIG - Enum constant in enum class org.bitcoinj.script.Script.VerifyFlag
+
 
+
deserialize(ByteBuffer) - Method in class org.bitcoinj.core.BitcoinSerializer
+
+
Reads a message from the given ByteBuffer and returns it.
+
+
deserialize(ByteBuffer) - Method in class org.bitcoinj.core.MessageSerializer
+
+
Reads a message from the given ByteBuffer and returns it.
+
+
deserialize(List<Integer>) - Static method in class org.bitcoinj.crypto.HDPath
+
+
Deserialize a list of integers into an HDPath (internal use only)
+
+
deserialize(Network, byte[]) - Static method in class org.bitcoinj.crypto.DeterministicKey
+
+
Deserialize an HD Key with no parent
+
+
deserialize(Network, byte[], DeterministicKey) - Static method in class org.bitcoinj.crypto.DeterministicKey
+
+
Deserialize an HD Key.
+
+
deserialize(NetworkParameters, byte[]) - Static method in class org.bitcoinj.crypto.DeterministicKey
+
+ +
+
deserialize(NetworkParameters, byte[], DeterministicKey) - Static method in class org.bitcoinj.crypto.DeterministicKey
+
+ +
+
deserializeB58(String, Network) - Static method in class org.bitcoinj.crypto.DeterministicKey
+
+
Deserialize a base-58-encoded HD Key with no parent
+
+
deserializeB58(String, NetworkParameters) - Static method in class org.bitcoinj.crypto.DeterministicKey
+
+ +
+
deserializeB58(DeterministicKey, String, Network) - Static method in class org.bitcoinj.crypto.DeterministicKey
+
+
Deserialize a base-58-encoded HD Key.
+
+
deserializeB58(DeterministicKey, String, NetworkParameters) - Static method in class org.bitcoinj.crypto.DeterministicKey
+
+ +
+
deserializeCompact(ByteBuffer) - Static method in class org.bitcoinj.core.StoredBlock
+
+
Deserializes the stored block from a custom packed format.
+
+
deserializeCompact(MessageSerializer, ByteBuffer) - Static method in class org.bitcoinj.core.StoredBlock
+
+ +
+
deserializeCompactV2(ByteBuffer) - Static method in class org.bitcoinj.core.StoredBlock
+
+
Deserializes the stored block from a custom packed format.
+
+
deserializeExtension(WalletExtension, byte[]) - Method in class org.bitcoinj.wallet.Wallet
+
+
Deserialize the wallet extension with the supplied data and then install it, replacing any existing extension + that may have existed with the same ID.
+
+
deserializeHeader(ByteBuffer) - Method in class org.bitcoinj.core.BitcoinSerializer
+
+
Deserializes only the header in case packet meta data is needed before decoding + the payload.
+
+
deserializeHeader(ByteBuffer) - Method in class org.bitcoinj.core.MessageSerializer
+
+
Deserializes only the header in case packet meta data is needed before decoding + the payload.
+
+
deserializePayload(BitcoinSerializer.BitcoinPacketHeader, ByteBuffer) - Method in class org.bitcoinj.core.BitcoinSerializer
+
+
Deserialize payload only.
+
+
deserializePayload(BitcoinSerializer.BitcoinPacketHeader, ByteBuffer) - Method in class org.bitcoinj.core.MessageSerializer
+
+
Deserialize payload only.
+
+
deserializeWalletExtension(Wallet, byte[]) - Method in interface org.bitcoinj.wallet.WalletExtension
+
+
Loads the contents of this object from the wallet.
+
+
DeterministicHierarchy - Class in org.bitcoinj.crypto
+
+
A DeterministicHierarchy calculates and keeps a whole tree (hierarchy) of keys originating from a single + root key.
+
+
DeterministicHierarchy(DeterministicKey) - Constructor for class org.bitcoinj.crypto.DeterministicHierarchy
+
+
Constructs a new hierarchy rooted at the given key.
+
+
DeterministicKey - Class in org.bitcoinj.crypto
+
+
A deterministic key is a node in a DeterministicHierarchy.
+
+
DeterministicKey(List<ChildNumber>, byte[], BigInteger, DeterministicKey, int, int) - Constructor for class org.bitcoinj.crypto.DeterministicKey
+
+
Constructs a key from its components, including its private key data and possibly-redundant + information about its parent key.
+
+
DeterministicKey(List<ChildNumber>, byte[], KeyCrypter, LazyECPoint, EncryptedData, DeterministicKey) - Constructor for class org.bitcoinj.crypto.DeterministicKey
+
+
Constructs a key from its components.
+
+
DeterministicKey(List<ChildNumber>, byte[], LazyECPoint, BigInteger, DeterministicKey) - Constructor for class org.bitcoinj.crypto.DeterministicKey
+
+
Constructs a key from its components.
+
+
DeterministicKey(List<ChildNumber>, byte[], LazyECPoint, DeterministicKey, int, int) - Constructor for class org.bitcoinj.crypto.DeterministicKey
+
+
Constructs a key from its components, including its public key data and possibly-redundant + information about its parent key.
+
+
DeterministicKey(List<ChildNumber>, byte[], ECPoint, boolean, BigInteger, DeterministicKey) - Constructor for class org.bitcoinj.crypto.DeterministicKey
+
 
+
DeterministicKey(DeterministicKey, DeterministicKey) - Constructor for class org.bitcoinj.crypto.DeterministicKey
+
+
Clones the key
+
+
DeterministicKey(HDPath, byte[], BigInteger, DeterministicKey) - Constructor for class org.bitcoinj.crypto.DeterministicKey
+
+
Constructs a key from its components.
+
+
DeterministicKeyChain - Class in org.bitcoinj.wallet
+
+
A deterministic key chain is a KeyChain that uses the + BIP 32 standard, as implemented by + DeterministicHierarchy, to derive all the keys in the keychain from a master seed.
+
+
DeterministicKeyChain(DeterministicKey, boolean, boolean, ScriptType) - Constructor for class org.bitcoinj.wallet.DeterministicKeyChain
+
+
+ Creates a deterministic key chain from a watched or spendable account key.
+
+
DeterministicKeyChain(KeyCrypter, AesKey, DeterministicKeyChain) - Constructor for class org.bitcoinj.wallet.DeterministicKeyChain
+
+
For use in encryption when DeterministicKeyChain.toEncrypted(KeyCrypter, AesKey) is called, so that + subclasses can override that method and create an instance of the right class.
+
+
DeterministicKeyChain(DeterministicSeed, KeyCrypter, ScriptType, List<ChildNumber>) - Constructor for class org.bitcoinj.wallet.DeterministicKeyChain
+
+
+ Creates a deterministic key chain with an encrypted deterministic seed using the provided account path.
+
+
DeterministicKeyChain.Builder<T extends DeterministicKeyChain.Builder<T>> - Class in org.bitcoinj.wallet
+
 
+
DeterministicSeed - Class in org.bitcoinj.wallet
+
+
Holds the seed bytes for the BIP32 deterministic wallet algorithm, inside a + DeterministicKeyChain.
+
+
DeterministicSeed(byte[], String, long) - Constructor for class org.bitcoinj.wallet.DeterministicSeed
+
+ +
+
DeterministicSeed(String, byte[], String, long) - Constructor for class org.bitcoinj.wallet.DeterministicSeed
+
+ +
+
DeterministicSeed(SecureRandom, int, String) - Constructor for class org.bitcoinj.wallet.DeterministicSeed
+
+ +
+
DeterministicSeed(List<String>, byte[], String, long) - Constructor for class org.bitcoinj.wallet.DeterministicSeed
+
+ +
+
DeterministicSeed(EncryptedData, EncryptedData, long) - Constructor for class org.bitcoinj.wallet.DeterministicSeed
+
+
Deprecated. +
will be removed in a future release
+
+
+
DeterministicUpgradeRequiredException - Exception in org.bitcoinj.wallet
+
+
Indicates that an attempt was made to use HD wallet features on a wallet that was deserialized from an old, + pre-HD random wallet without calling upgradeToDeterministic() beforehand.
+
+
DeterministicUpgradeRequiredException() - Constructor for exception org.bitcoinj.wallet.DeterministicUpgradeRequiredException
+
 
+
DeterministicUpgradeRequiresPassword - Exception in org.bitcoinj.wallet
+
+
Indicates that the pre-HD random wallet is encrypted, so you should try the upgrade again after getting the + users password.
+
+
DeterministicUpgradeRequiresPassword() - Constructor for exception org.bitcoinj.wallet.DeterministicUpgradeRequiresPassword
+
 
+
digestRipeMd160(byte[]) - Static method in class org.bitcoinj.crypto.internal.CryptoUtils
+
+
Calculate RIPEMD160(input).
+
+
digits(char) - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Set character range to use for representing digits.
+
+
directory - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
directory() - Method in class org.bitcoinj.kits.WalletAppKit
+
 
+
disconnect() - Method in class org.bitcoinj.core.TransactionInput
+
+
If this input is connected, check the output is connected back to this input and release it if so, making + it spendable once again.
+
+
DISCONNECT_ON_CONFLICT - Enum constant in enum class org.bitcoinj.core.TransactionInput.ConnectMode
+
 
+
disconnectOutput() - Method in class org.bitcoinj.core.TransactionOutPoint
+
+
Returns a copy of this outpoint, but with the connectedOutput removed.
+
+
disconnectTransaction() - Method in class org.bitcoinj.core.TransactionOutPoint
+
+
Returns a copy of this outpoint, but with fromTx removed.
+
+
disconnectTransactions(StoredBlock) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Disconnect each transaction in the block (after reading it from the block store) + Only called if(shouldVerifyTransactions())
+
+
disconnectTransactions(StoredBlock) - Method in class org.bitcoinj.core.BlockChain
+
 
+
disconnectTransactions(StoredBlock) - Method in class org.bitcoinj.core.FullPrunedBlockChain
+
+
This is broken for blocks that do not pass BIP30, so all BIP30-failing blocks which are allowed to fail BIP30 + must be checkpointed.
+
+
DISCOURAGE_UPGRADABLE_NOPS - Enum constant in enum class org.bitcoinj.script.Script.VerifyFlag
+
 
+
discoverPeers() - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns number of discovered peers.
+
+
discovery - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
displayName - Variable in class org.bitcoinj.protocols.payments.PaymentProtocol.PkiVerificationData
+
+
Display name of the payment requestor, could be a domain name, email address, legal name, etc
+
+
div(int) - Method in class org.bitcoinj.base.Coin
+
+
Alias for divide
+
+
div(long) - Method in class org.bitcoinj.base.Coin
+
+
Alias for divide
+
+
divide(long) - Method in class org.bitcoinj.base.Coin
+
 
+
divide(long) - Method in class org.bitcoinj.base.utils.Fiat
+
 
+
divide(Coin) - Method in class org.bitcoinj.base.Coin
+
 
+
divide(Fiat) - Method in class org.bitcoinj.base.utils.Fiat
+
 
+
divideAndRemainder(long) - Method in class org.bitcoinj.base.Coin
+
 
+
divideAndRemainder(long) - Method in class org.bitcoinj.base.utils.Fiat
+
 
+
DnsDiscovery - Class in org.bitcoinj.net.discovery
+
+
Supports peer discovery through DNS.
+
+
DnsDiscovery(String[], Network) - Constructor for class org.bitcoinj.net.discovery.DnsDiscovery
+
+
Supports finding peers through DNS A records.
+
+
DnsDiscovery(String[], NetworkParameters) - Constructor for class org.bitcoinj.net.discovery.DnsDiscovery
+
+ +
+
DnsDiscovery(Network) - Constructor for class org.bitcoinj.net.discovery.DnsDiscovery
+
+
Supports finding peers through DNS A records.
+
+
DnsDiscovery(NetworkParameters) - Constructor for class org.bitcoinj.net.discovery.DnsDiscovery
+
+
Deprecated. + +
+
+
DnsDiscovery.DnsSeedDiscovery - Class in org.bitcoinj.net.discovery
+
+
Implements discovery from a single DNS host.
+
+
DnsSeedDiscovery(Network, String) - Constructor for class org.bitcoinj.net.discovery.DnsDiscovery.DnsSeedDiscovery
+
 
+
DnsSeedDiscovery(NetworkParameters, String) - Constructor for class org.bitcoinj.net.discovery.DnsDiscovery.DnsSeedDiscovery
+
+ +
+
dnsSeeds - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
doMaintenance(AesKey, boolean) - Method in class org.bitcoinj.wallet.Wallet
+
+
A wallet app should call this from time to time in order to let the wallet craft and send transactions needed + to re-organise coins internally.
+
+
doMaintenance(KeyChainGroupStructure, AesKey, boolean) - Method in class org.bitcoinj.wallet.Wallet
+
+
A wallet app should call this from time to time in order to let the wallet craft and send transactions needed + to re-organise coins internally.
+
+
doneDownload() - Method in class org.bitcoinj.core.listeners.DownloadProgressTracker
+
+
Called when we are done downloading the block chain.
+
+
DONT_SEND - Enum constant in enum class org.bitcoinj.core.PeerGroup.FilterRecalculateMode
+
 
+
doSetChainHead(StoredBlock) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Called before setting chain head in memory.
+
+
doSetChainHead(StoredBlock) - Method in class org.bitcoinj.core.BlockChain
+
 
+
doSetChainHead(StoredBlock) - Method in class org.bitcoinj.core.FullPrunedBlockChain
+
 
+
doSign(Sha256Hash, BigInteger) - Method in class org.bitcoinj.crypto.ECKey
+
 
+
DoubleSpends() - Constructor for class org.bitcoinj.testing.FakeTxBuilder.DoubleSpends
+
 
+
downloadBlockChain() - Method in class org.bitcoinj.core.PeerGroup
+
+
Download the blockchain from peers.
+
+
downloadDependencies(Transaction) - Method in class org.bitcoinj.core.Peer
+
+
Returns a future that wraps a list of all transactions that the given transaction depends on, recursively.
+
+
downloadDependenciesInternal(Transaction, int, int) - Method in class org.bitcoinj.core.Peer
+
+
Internal, recursive dependency downloader
+
+
downloadListener - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
DownloadProgressTracker - Class in org.bitcoinj.core.listeners
+
+
An implementation of BlockchainDownloadEventListener that listens to chain download events and tracks progress + as a percentage.
+
+
DownloadProgressTracker() - Constructor for class org.bitcoinj.core.listeners.DownloadProgressTracker
+
 
+
drainOrphanBlocks() - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Returns the hashes of the currently stored orphan blocks and then deletes them from this objects storage.
+
+
dropAllPeers() - Method in class org.bitcoinj.core.PeerGroup
+
+
Gracefully drops all connected peers.
+
+
dropParent() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Returns the same key with the parent pointer removed (it still knows its own path and the parent fingerprint).
+
+
dropPrivateBytes() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Returns the same key with the private bytes removed.
+
+
dummy() - Static method in class org.bitcoinj.crypto.TransactionSignature
+
+
Returns a dummy invalid signature whose R/S values are set such that they will take up the same number of + encoded bytes as a real signature.
+
+
DumpedPrivateKey - Class in org.bitcoinj.crypto
+
+
Parses and generates private keys in the form used by the Bitcoin "dumpprivkey" command.
+
+
dumpedPrivateKeyHeader - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
duplicate() - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Returns a copy of this object.
+
+
duplicate() - Method in class org.bitcoinj.core.VersionMessage
+
 
+
DUPLICATE - Enum constant in enum class org.bitcoinj.core.RejectMessage.RejectCode
+
+
The message was relayed multiple times or described an object which is in conflict with another.
+
+
duplicateDetached() - Method in class org.bitcoinj.core.TransactionOutput
+
+
Returns a copy of the output detached from its containing transaction, if need be.
+
+
DuplicatedOutPoint() - Constructor for exception org.bitcoinj.core.VerificationException.DuplicatedOutPoint
+
 
+
DUST - Enum constant in enum class org.bitcoinj.core.RejectMessage.RejectCode
+
+
This refers to a specific form of NONSTANDARD transactions, which have an output smaller than some constant + defining them as dust (this is no longer used).
+
+
DUST - Enum constant in enum class org.bitcoinj.wallet.DefaultRiskAnalysis.RuleViolation
+
 
+
DustySendRequested() - Constructor for exception org.bitcoinj.wallet.Wallet.DustySendRequested
+
 
+
+

E

+
+
earlier(Instant, Instant) - Static method in class org.bitcoinj.base.internal.TimeUtils
+
+
Determines the earlier of two instants.
+
+
earliestKeyCreationTime() - Method in interface org.bitcoinj.core.PeerFilterProvider
+
+
Returns the earliest time for which full/bloom-filtered blocks must be downloaded.
+
+
earliestKeyCreationTime() - Method in class org.bitcoinj.wallet.BasicKeyChain
+
+
Returns the earliest creation time of keys in this chain.
+
+
earliestKeyCreationTime() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
earliestKeyCreationTime() - Method in interface org.bitcoinj.wallet.KeyChain
+
+
Returns the earliest creation time of keys in this chain.
+
+
earliestKeyCreationTime() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Gets the earliest time for which full block must be downloaded.
+
+
earliestKeyCreationTime() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns the earliest creation time of keys or watched scripts in this wallet, ie the min + of ECKey.getCreationTime().
+
+
earliestKeyTime - Variable in class org.bitcoinj.net.FilterMerger.Result
+
 
+
EASIEST_DIFFICULTY_TARGET - Static variable in class org.bitcoinj.core.Block
+
+
A value for difficultyTarget (nBits) that allows (slightly less than) half of all possible hash solutions.
+
+
ecDomainParameters() - Static method in class org.bitcoinj.crypto.ECKey
+
+
Return EC parameters for the SECP256K1 curve, in a Bouncy Castle type.
+
+
ECDSASignature(BigInteger, BigInteger) - Constructor for class org.bitcoinj.crypto.ECKey.ECDSASignature
+
+
Constructs a signature with the given components.
+
+
ECKey - Class in org.bitcoinj.crypto
+
+
Represents an elliptic curve public and (optionally) private key, usable for digital signatures but not encryption.
+
+
ECKey() - Constructor for class org.bitcoinj.crypto.ECKey
+
+
Generates an entirely new keypair.
+
+
ECKey(BigInteger, LazyECPoint) - Constructor for class org.bitcoinj.crypto.ECKey
+
 
+
ECKey(BigInteger, ECPoint, boolean) - Constructor for class org.bitcoinj.crypto.ECKey
+
 
+
ECKey(SecureRandom) - Constructor for class org.bitcoinj.crypto.ECKey
+
+
Generates an entirely new keypair with the given SecureRandom object.
+
+
ECKey.ECDSASignature - Class in org.bitcoinj.crypto
+
+
Groups the two components that make up a signature, and provides a way to encode to DER form, which is + how ECDSA signatures are represented when embedded in other data structures in the Bitcoin protocol.
+
+
ECKey.KeyIsEncryptedException - Exception in org.bitcoinj.crypto
+
 
+
ECKey.MissingPrivateKeyException - Exception in org.bitcoinj.crypto
+
 
+
ecMultiply - Variable in class org.bitcoinj.crypto.BIP38PrivateKey
+
 
+
elapsed() - Method in class org.bitcoinj.base.internal.Stopwatch
+
+
Gets the elapsed time on the watch.
+
+
elapsedTime(Instant) - Static method in class org.bitcoinj.base.internal.TimeUtils
+
+
Returns elapsed time between given start and current time as a Duration.
+
+
EMPTY - Enum constant in enum class org.bitcoinj.wallet.BasicKeyChain.State
+
 
+
EMPTY - Static variable in class org.bitcoinj.core.TransactionWitness
+
 
+
EmptyInputsOrOutputs() - Constructor for exception org.bitcoinj.core.VerificationException.EmptyInputsOrOutputs
+
 
+
EmptyMessage - Class in org.bitcoinj.core
+
+
Parent class for header only messages that don't have a payload.
+
+
EmptyMessage() - Constructor for class org.bitcoinj.core.EmptyMessage
+
 
+
emptyWallet - Variable in class org.bitcoinj.wallet.SendRequest
+
+
When emptyWallet is set, all coins selected by the coin selector are sent to the first output in tx + (its value is ignored and set to Wallet.getBalance() - the fees required + for the transaction).
+
+
emptyWallet(Address) - Static method in class org.bitcoinj.wallet.SendRequest
+
 
+
enableStrictMode() - Static method in class org.bitcoinj.core.Context
+
+
Require that new threads use Context.propagate(Context) or ContextPropagatingThreadFactory, + rather than using a heuristic for the desired context.
+
+
encode(byte[]) - Static method in class org.bitcoinj.base.Base58
+
+
Encodes the given bytes as a base58 string (no checksum is appended).
+
+
encode(Bech32.Bech32Data) - Static method in class org.bitcoinj.base.Bech32
+
+
Encode a Bech32 string.
+
+
encode(Bech32.Encoding, String, Bech32.Bech32Bytes) - Static method in class org.bitcoinj.base.Bech32
+
+
Encode a Bech32 string.
+
+
encodeBytes(Bech32.Encoding, String, byte[]) - Static method in class org.bitcoinj.base.Bech32
+
+
Encode a byte array to a Bech32 string
+
+
encodeChecked(int, byte[]) - Static method in class org.bitcoinj.base.Base58
+
+
Encodes the given version and bytes as a base58 string.
+
+
encodeCompactBits(BigInteger) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
 
+
EncodedPrivateKey - Class in org.bitcoinj.crypto
+
+
Some form of string-encoded private key.
+
+
EncodedPrivateKey(Network, byte[]) - Constructor for class org.bitcoinj.crypto.EncodedPrivateKey
+
 
+
EncodedPrivateKey(NetworkParameters, byte[]) - Constructor for class org.bitcoinj.crypto.EncodedPrivateKey
+
+
Deprecated.
+
+
encodeMPI(BigInteger, boolean) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
MPI encoded numbers are produced by the OpenSSL BN_bn2mpi function.
+
+
encodeOnionUrlV2(byte[]) - Static method in class org.bitcoinj.core.internal.TorUtils
+
+
Encode an Onion URL from a Tor V2 address.
+
+
encodeOnionUrlV3(byte[]) - Static method in class org.bitcoinj.core.internal.TorUtils
+
+
Encode an Onion URL from a Tor V3 address (pubkey).
+
+
encodeToBitcoin() - Method in class org.bitcoinj.crypto.TransactionSignature
+
+
What we get back from the signer are the two components of a signature, r and s.
+
+
encodeToDER() - Method in class org.bitcoinj.crypto.ECKey.ECDSASignature
+
+
DER is an international standard for serializing data structures which is widely used in cryptography.
+
+
encodeToOpN(int) - Static method in class org.bitcoinj.script.Script
+
 
+
encoding - Variable in class org.bitcoinj.base.Bech32.Bech32Data
+
 
+
encrypt(byte[], AesKey) - Method in interface org.bitcoinj.crypto.KeyCrypter
+
+
Encrypt the supplied bytes, converting them into ciphertext.
+
+
encrypt(byte[], AesKey) - Method in class org.bitcoinj.crypto.KeyCrypterScrypt
+
+
Password based encryption using AES - CBC 256 bits.
+
+
encrypt(CharSequence) - Method in class org.bitcoinj.wallet.Wallet
+
+
Convenience wrapper around Wallet.encrypt(KeyCrypter, AesKey) which uses the default Scrypt key derivation algorithm and + parameters to derive a key from the given password.
+
+
encrypt(KeyCrypter, AesKey) - Method in class org.bitcoinj.crypto.DeterministicKey
+
 
+
encrypt(KeyCrypter, AesKey) - Method in class org.bitcoinj.crypto.ECKey
+
+
Create an encrypted private key with the keyCrypter and the AES key supplied.
+
+
encrypt(KeyCrypter, AesKey) - Method in class org.bitcoinj.wallet.DeterministicSeed
+
 
+
encrypt(KeyCrypter, AesKey) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Encrypt the keys in the group using the KeyCrypter and the AES key.
+
+
encrypt(KeyCrypter, AesKey) - Method in class org.bitcoinj.wallet.Wallet
+
+
Encrypt the wallet using the KeyCrypter and the AES key.
+
+
encrypt(KeyCrypter, AesKey, DeterministicKey) - Method in class org.bitcoinj.crypto.DeterministicKey
+
 
+
EncryptableItem - Interface in org.bitcoinj.crypto
+
+
Provides a uniform way to access something that can be optionally encrypted with a + KeyCrypter, yielding an EncryptedData, and + which can have a creation time associated with it.
+
+
EncryptableKeyChain - Interface in org.bitcoinj.wallet
+
+
An encryptable key chain is a key-chain that can be encrypted with a user-provided password or AES key.
+
+
encryptedBytes - Variable in class org.bitcoinj.crypto.EncryptedData
+
 
+
EncryptedData - Class in org.bitcoinj.crypto
+
+
An instance of EncryptedData is a holder for an initialization vector and encrypted bytes.
+
+
EncryptedData(byte[], byte[]) - Constructor for class org.bitcoinj.crypto.EncryptedData
+
 
+
encryptedPrivateKey - Variable in class org.bitcoinj.crypto.ECKey
+
 
+
encryptionIsReversible(ECKey, ECKey, KeyCrypter, AesKey) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Check that it is possible to decrypt the key with the keyCrypter and that the original key is returned.
+
+
endBloomFilterCalculation() - Method in interface org.bitcoinj.core.PeerFilterProvider
+
+ +
+
endBloomFilterCalculation() - Method in class org.bitcoinj.wallet.Wallet
+
 
+
endFilteredBlock(FilteredBlock) - Method in class org.bitcoinj.core.Peer
+
 
+
engineGenerateSeed(int) - Method in class org.bitcoinj.crypto.LinuxSecureRandom
+
 
+
engineNextBytes(byte[]) - Method in class org.bitcoinj.crypto.LinuxSecureRandom
+
 
+
engineSetSeed(byte[]) - Method in class org.bitcoinj.crypto.LinuxSecureRandom
+
 
+
ensureMinRequiredFee - Variable in class org.bitcoinj.wallet.SendRequest
+
+
Requires that there be enough fee for a default Bitcoin Core to at least relay the transaction.
+
+
entropy - Variable in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
 
+
entropy(byte[], long) - Method in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
+ +
+
entropy(byte[], Instant) - Method in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
+
Creates a deterministic key chain starting from the given entropy.
+
+
equals(Object) - Method in class org.bitcoinj.base.Coin
+
 
+
equals(Object) - Method in class org.bitcoinj.base.internal.ByteArray
+
equals(Object) - Method in class org.bitcoinj.base.LegacyAddress
+
 
+
equals(Object) - Method in class org.bitcoinj.base.SegwitAddress
+
 
+
equals(Object) - Method in class org.bitcoinj.base.Sha256Hash
+
 
+
equals(Object) - Method in class org.bitcoinj.base.utils.Fiat
+
 
+
equals(Object) - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Two formats are equal if they have the same parameters.
+
+
equals(Object) - Method in class org.bitcoinj.base.VarInt
+
 
+
equals(Object) - Method in class org.bitcoinj.core.Block
+
 
+
equals(Object) - Method in class org.bitcoinj.core.BlockLocator
+
 
+
equals(Object) - Method in class org.bitcoinj.core.BloomFilter
+
 
+
equals(Object) - Method in class org.bitcoinj.core.FilteredBlock
+
 
+
equals(Object) - Method in class org.bitcoinj.core.GetBlocksMessage
+
 
+
equals(Object) - Method in class org.bitcoinj.core.GetHeadersMessage
+
+
Compares two getheaders messages.
+
+
equals(Object) - Method in class org.bitcoinj.core.InventoryItem
+
 
+
equals(Object) - Method in class org.bitcoinj.core.ListMessage
+
 
+
equals(Object) - Method in class org.bitcoinj.core.LockTime
+
 
+
equals(Object) - Method in class org.bitcoinj.core.NetworkParameters
+
 
+
equals(Object) - Method in class org.bitcoinj.core.PartialMerkleTree
+
 
+
equals(Object) - Method in class org.bitcoinj.core.PeerAddress
+
 
+
equals(Object) - Method in class org.bitcoinj.core.RejectMessage
+
 
+
equals(Object) - Method in class org.bitcoinj.core.Services
+
 
+
equals(Object) - Method in class org.bitcoinj.core.StoredBlock
+
 
+
equals(Object) - Method in class org.bitcoinj.core.StoredUndoableBlock
+
 
+
equals(Object) - Method in class org.bitcoinj.core.Transaction
+
 
+
equals(Object) - Method in class org.bitcoinj.core.TransactionInput
+
 
+
equals(Object) - Method in class org.bitcoinj.core.TransactionOutPoint
+
 
+
equals(Object) - Method in class org.bitcoinj.core.TransactionOutput
+
 
+
equals(Object) - Method in class org.bitcoinj.core.TransactionWitness
+
 
+
equals(Object) - Method in class org.bitcoinj.core.UTXO
+
 
+
equals(Object) - Method in class org.bitcoinj.core.VersionMessage
+
 
+
equals(Object) - Method in class org.bitcoinj.crypto.ChildNumber
+
 
+
equals(Object) - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Verifies equality of all fields but NOT the parent pointer (thus the same key derived in two separate hierarchy + objects will equal each other.
+
+
equals(Object) - Method in class org.bitcoinj.crypto.ECKey.ECDSASignature
+
 
+
equals(Object) - Method in class org.bitcoinj.crypto.ECKey
+
 
+
equals(Object) - Method in class org.bitcoinj.crypto.EncodedPrivateKey
+
 
+
equals(Object) - Method in class org.bitcoinj.crypto.EncryptedData
+
 
+
equals(Object) - Method in class org.bitcoinj.crypto.KeyCrypterScrypt
+
 
+
equals(Object) - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
equals(Object) - Method in class org.bitcoinj.script.Script
+
 
+
equals(Object) - Method in class org.bitcoinj.script.ScriptChunk
+
 
+
equals(Object) - Method in class org.bitcoinj.utils.BtcAutoFormat
+
+
Return true if the other instance is equivalent to this one.
+
+
equals(Object) - Method in class org.bitcoinj.utils.BtcFixedFormat
+
+
Return true if the given object is equivalent to this one.
+
+
equals(Object) - Method in class org.bitcoinj.utils.BtcFormat
+
+
Return true if the given object is equivalent to this one.
+
+
equals(Object) - Method in class org.bitcoinj.utils.ExchangeRate
+
 
+
equals(Object) - Method in class org.bitcoinj.wallet.DeterministicSeed
+
 
+
equals(ECPoint) - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
equalsOpCode(int) - Method in class org.bitcoinj.script.ScriptChunk
+
 
+
ERROR - Enum constant in enum class org.bitcoinj.core.InventoryItem.Type
+
 
+
estimateBlockTime(int) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+ +
+
estimateBlockTimeInstant(int) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Returns an estimate of when the given block will be reached, assuming a perfect 10 minute average for each + block.
+
+
ESTIMATED - Enum constant in enum class org.bitcoinj.wallet.Wallet.BalanceType
+
+
Balance calculated assuming all pending transactions are in fact included into the best chain by miners.
+
+
ESTIMATED_SPENDABLE - Enum constant in enum class org.bitcoinj.wallet.Wallet.BalanceType
+
+
Same as ESTIMATED but only for outputs we have the private keys for and can sign ourselves.
+
+
estimateLockTime(AbstractBlockChain) - Method in class org.bitcoinj.core.Transaction
+
+ +
+
estimateUnlockTime(AbstractBlockChain) - Method in class org.bitcoinj.core.Transaction
+
+
Returns either the lock time, if it was specified as a timestamp, or an estimate based on the time in + the current head block if it was specified as a block height.
+
+
ExceededMaxTransactionSize() - Constructor for exception org.bitcoinj.wallet.Wallet.ExceededMaxTransactionSize
+
 
+
exceedsMaxMoney(Monetary) - Method in enum class org.bitcoinj.base.BitcoinNetwork
+
 
+
exceedsMaxMoney(Monetary) - Method in interface org.bitcoinj.base.Network
+
+
Check if an amount exceeds the maximum allowed for a network (if the network has one)
+
+
exceedsMaxMoney(Monetary) - Method in class org.bitcoinj.testing.MockAltNetwork
+
 
+
ExcessiveValue() - Constructor for exception org.bitcoinj.core.VerificationException.ExcessiveValue
+
 
+
exchangeRate - Variable in class org.bitcoinj.wallet.SendRequest
+
+
If not null, this exchange rate is recorded with the transaction during completion.
+
+
ExchangeRate - Class in org.bitcoinj.utils
+
+
An exchange rate is expressed as a ratio of a Coin and a Fiat amount.
+
+
ExchangeRate(Coin, Fiat) - Constructor for class org.bitcoinj.utils.ExchangeRate
+
+
Construct exchange rate.
+
+
ExchangeRate(Fiat) - Constructor for class org.bitcoinj.utils.ExchangeRate
+
+
Construct exchange rate.
+
+
execute(Runnable) - Method in class org.bitcoinj.utils.Threading.UserThread
+
 
+
executeScript(Transaction, long, Script, LinkedList<byte[]>, Set<Script.VerifyFlag>) - Static method in class org.bitcoinj.script.Script
+
+
Exposes the script interpreter.
+
+
executor - Variable in class org.bitcoinj.core.PeerGroup
+
 
+
executor - Variable in class org.bitcoinj.utils.ListenerRegistration
+
 
+
executor() - Method in class org.bitcoinj.net.NioClientManager
+
 
+
Expired(String) - Constructor for exception org.bitcoinj.protocols.payments.PaymentProtocolException.Expired
+
 
+
expires() - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns the expires time of the payment request, or empty if none.
+
+
ExponentialBackoff - Class in org.bitcoinj.utils
+
+
Tracks successes and failures and calculates a time to retry the operation.
+
+
ExponentialBackoff(ExponentialBackoff.Params) - Constructor for class org.bitcoinj.utils.ExponentialBackoff
+
 
+
ExponentialBackoff.Params - Class in org.bitcoinj.utils
+
+
Parameters to configure a particular kind of exponential backoff.
+
+
extend(List<ChildNumber>) - Method in class org.bitcoinj.crypto.HDPath
+
+
Extend the path by appending a relative path.
+
+
extend(ChildNumber, ChildNumber...) - Method in class org.bitcoinj.crypto.HDPath
+
+
Extend the path by appending additional ChildNumber objects.
+
+
extend(HDPath) - Method in class org.bitcoinj.crypto.HDPath
+
+
Extend the path by appending a relative path.
+
+
EXTERNAL_SUBPATH - Static variable in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
extractHashFromP2PKH(Script) - Static method in class org.bitcoinj.script.ScriptPattern
+
+
Extract the pubkey hash from a P2PKH scriptPubKey.
+
+
extractHashFromP2SH(Script) - Static method in class org.bitcoinj.script.ScriptPattern
+
+
Extract the script hash from a P2SH scriptPubKey.
+
+
extractHashFromP2WH(Script) - Static method in class org.bitcoinj.script.ScriptPattern
+
+
Extract the pubkey hash from a P2WPKH or the script hash from a P2WSH scriptPubKey.
+
+
extractKeyFromP2PK(Script) - Static method in class org.bitcoinj.script.ScriptPattern
+
+
Extract the pubkey from a P2SH scriptPubKey.
+
+
extractOutputKeyFromP2TR(Script) - Static method in class org.bitcoinj.script.ScriptPattern
+
+
Extract the taproot output key from a P2TR scriptPubKey.
+
+
extractWitnessCommitmentHash(Script) - Static method in class org.bitcoinj.script.ScriptPattern
+
+
Retrieves the hash from a segwit commitment (in an output of the coinbase transaction).
+
+
+

F

+
+
factory - Static variable in class org.bitcoinj.utils.Threading
+
 
+
FACTORY - Static variable in class org.bitcoinj.wallet.DefaultRiskAnalysis
+
 
+
failedFuture(Throwable) - Static method in class org.bitcoinj.base.internal.FutureUtils
+
+
Can be replaced with CompletableFuture.failedFuture(Throwable) in Java 9+.
+
+
failedFuture(Throwable) - Static method in class org.bitcoinj.utils.ListenableCompletableFuture
+
+
Deprecated. +
Use new CompletableFuture() + CompletableFuture.completeExceptionally() or if JDK 9+ use CompletableFuture.failedFuture()
+
+
+
FakeTxBuilder - Class in org.bitcoinj.testing
+
+
Methods for building fake transactions for unit tests.
+
+
FakeTxBuilder() - Constructor for class org.bitcoinj.testing.FakeTxBuilder
+
 
+
FakeTxBuilder.BlockPair - Class in org.bitcoinj.testing
+
 
+
FakeTxBuilder.DoubleSpends - Class in org.bitcoinj.testing
+
 
+
FEEFILTER - Enum constant in enum class org.bitcoinj.core.ProtocolVersion
+
 
+
FeeFilterMessage - Class in org.bitcoinj.core
+
+
Represents a "feefilter" message on the P2P network, which instructs a peer to filter transaction invs for + transactions that fall below the feerate provided.
+
+
feePerKb - Variable in class org.bitcoinj.wallet.SendRequest
+
+
A transaction can have a fee attached, which is defined as the difference between the input values + and output values.
+
+
feeRate() - Method in class org.bitcoinj.core.FeeFilterMessage
+
+
Gets the fee rate.
+
+
fiat - Variable in class org.bitcoinj.utils.ExchangeRate
+
 
+
Fiat - Class in org.bitcoinj.base.utils
+
+
Represents a monetary fiat value.
+
+
FIAT - Static variable in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Standard format for fiat amounts.
+
+
fiatToCoin(Fiat) - Method in class org.bitcoinj.utils.ExchangeRate
+
+
Convert a fiat amount to a coin amount using this exchange rate.
+
+
FIELD_ADDRESS - Static variable in class org.bitcoinj.uri.BitcoinURI
+
 
+
FIELD_AMOUNT - Static variable in class org.bitcoinj.uri.BitcoinURI
+
 
+
FIELD_LABEL - Static variable in class org.bitcoinj.uri.BitcoinURI
+
 
+
FIELD_MESSAGE - Static variable in class org.bitcoinj.uri.BitcoinURI
+
 
+
FIELD_PAYMENT_REQUEST_URL - Static variable in class org.bitcoinj.uri.BitcoinURI
+
 
+
FIFTY_COINS - Static variable in class org.bitcoinj.base.Coin
+
 
+
FILE_PROLOGUE_BYTES - Static variable in class org.bitcoinj.store.SPVBlockStore
+
 
+
fileBlockSpliterator(File) - Method in class org.bitcoinj.utils.BlockFileLoader
+
 
+
fileBlockStream(File) - Method in class org.bitcoinj.utils.BlockFileLoader
+
 
+
fileLock - Variable in class org.bitcoinj.store.SPVBlockStore
+
 
+
filePrefix - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
FileTrustStoreLoader(File) - Constructor for class org.bitcoinj.crypto.TrustStoreLoader.FileTrustStoreLoader
+
 
+
filter - Variable in class org.bitcoinj.net.FilterMerger.Result
+
 
+
FILTERED_BLOCK - Enum constant in enum class org.bitcoinj.core.InventoryItem.Type
+
 
+
FilteredBlock - Class in org.bitcoinj.core
+
+
A FilteredBlock is used to relay a block with its transactions filtered using a BloomFilter.
+
+
FilteredBlock(Block, PartialMerkleTree) - Constructor for class org.bitcoinj.core.FilteredBlock
+
 
+
FilteringCoinSelector - Class in org.bitcoinj.wallet
+
+
A filtering coin selector delegates to another coin selector, but won't select outputs spent by the given transactions.
+
+
FilteringCoinSelector(CoinSelector, List<TransactionOutPoint>) - Constructor for class org.bitcoinj.wallet.FilteringCoinSelector
+
 
+
FilterMerger - Class in org.bitcoinj.net
+
+
A reusable object that will calculate, given a list of PeerFilterProviders, a merged + BloomFilter and earliest key time for all of them.
+
+
FilterMerger(double) - Constructor for class org.bitcoinj.net.FilterMerger
+
 
+
FilterMerger.Result - Class in org.bitcoinj.net
+
 
+
find(String) - Static method in enum class org.bitcoinj.base.ScriptType
+
+
Use this method to create a ScriptType from a script identifier string that should be + validated.
+
+
find(String) - Static method in enum class org.bitcoinj.base.SegwitAddress.SegwitHrp
+
 
+
find(Network) - Static method in class org.bitcoinj.params.Networks
+
+ +
+
findKeyFromAddress(Address) - Method in class org.bitcoinj.wallet.Wallet
+
+
Locates a keypair from the wallet given the corresponding address.
+
+
findKeyFromPubHash(byte[]) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
findKeyFromPubHash(byte[]) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
findKeyFromPubKey(byte[]) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
findKeyFromPubKey(byte[]) - Method in class org.bitcoinj.wallet.DecryptingKeyBag
+
 
+
findKeyFromPubKey(byte[]) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
findKeyFromPubKey(byte[]) - Method in interface org.bitcoinj.wallet.KeyBag
+
+
Locates a keypair from the keychain given the raw public key bytes.
+
+
findKeyFromPubKey(byte[]) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
 
+
findKeyFromPubKey(byte[]) - Method in class org.bitcoinj.wallet.Wallet
+
+
Locates a keypair from the basicKeyChain given the raw public key bytes.
+
+
findKeyFromPubKeyHash(byte[], ScriptType) - Method in class org.bitcoinj.wallet.DecryptingKeyBag
+
 
+
findKeyFromPubKeyHash(byte[], ScriptType) - Method in interface org.bitcoinj.wallet.KeyBag
+
+
Locates a keypair from the keychain given the hash of the public key, and (optionally) by usage for a specific + script type.
+
+
findKeyFromPubKeyHash(byte[], ScriptType) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
 
+
findKeyFromPubKeyHash(byte[], ScriptType) - Method in class org.bitcoinj.wallet.Wallet
+
+
Locates a keypair from the basicKeyChain given the hash of the public key.
+
+
findKeysBefore(long) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
+ +
+
findKeysBefore(Instant) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
+
Returns a list of all ECKeys created after the given time.
+
+
findOldestKeyAfter(long) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
+ +
+
findOldestKeyAfter(Instant) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
+
Returns the first ECKey created after the given time, or empty if there is none.
+
+
findPeersOfAtLeastVersion(long) - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns an array list of peers that implement the given protocol version or better.
+
+
findPeersWithServiceMask(int) - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns an array list of peers that match the requested service bit mask.
+
+
findRecoveryId(Sha256Hash, ECKey.ECDSASignature) - Method in class org.bitcoinj.crypto.ECKey
+
+
Returns the recovery ID, a byte with value between 0 and 3, inclusive, that specifies which of 4 possible + curve points was used to sign a message.
+
+
findRedeemDataByScriptHash(ByteString) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns the redeem script by its hash or null if this keychain did not generate the script.
+
+
findRedeemDataFromScriptHash(byte[]) - Method in class org.bitcoinj.wallet.DecryptingKeyBag
+
 
+
findRedeemDataFromScriptHash(byte[]) - Method in interface org.bitcoinj.wallet.KeyBag
+
+
Locates a redeem data (redeem script and keys) from the keychain given the hash of the script.
+
+
findRedeemDataFromScriptHash(byte[]) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
 
+
findRedeemDataFromScriptHash(byte[]) - Method in class org.bitcoinj.wallet.Wallet
+
+
Locates a redeem data (redeem script and keys) from the keyChainGroup given the hash of the script.
+
+
findWitnessCommitment() - Method in class org.bitcoinj.core.Transaction
+
+
Loops the outputs of a coinbase transaction to locate the witness commitment.
+
+
fitsInt() - Method in class org.bitcoinj.base.VarInt
+
+
Determine if the value would fit an int, i.e.
+
+
FORCE_SEND_FOR_REFRESH - Enum constant in enum class org.bitcoinj.core.PeerGroup.FilterRecalculateMode
+
 
+
forKnownNetworks() - Method in interface org.bitcoinj.base.AddressParser.AddressParserProvider
+
+
Return a parser that will parse valid addresses for all networks (Network) known by this provider.
+
+
format(Object, int, int...) - Method in class org.bitcoinj.utils.BtcFormat
+
+
Formats a bitcoin value as a number and possibly a units indicator to a + String.The type of monetary value argument can be any one of any of the + following classes: Coin, Integer, Long, + BigInteger, BigDecimal.
+
+
format(Object, StringBuffer, FieldPosition) - Method in class org.bitcoinj.utils.BtcFormat
+
+
Formats a bitcoin value as a number and possibly a units indicator and appends the + resulting text to the given string buffer.
+
+
format(Object, StringBuffer, FieldPosition, int, int...) - Method in class org.bitcoinj.utils.BtcFormat
+
+
Formats a bitcoin value as a number and possibly a units indicator and appends the + resulting text to the given string buffer.
+
+
format(LogRecord) - Method in class org.bitcoinj.utils.BriefLogFormatter
+
 
+
format(Monetary) - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Format the given monetary value to a human-readable form.
+
+
formatAddresses(boolean, boolean, AesKey, Network, StringBuilder) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
formatHex() - Method in class org.bitcoinj.base.internal.ByteArray
+
 
+
formatHex(byte[]) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
 
+
formatHex(byte[]) - Method in class org.bitcoinj.base.internal.HexFormat
+
 
+
formatKeyWithAddress(boolean, AesKey, StringBuilder, Network, ScriptType, String) - Method in class org.bitcoinj.crypto.DeterministicKey
+
 
+
formatKeyWithAddress(boolean, AesKey, StringBuilder, Network, ScriptType, String) - Method in class org.bitcoinj.crypto.ECKey
+
 
+
formatKeyWithAddress(boolean, AesKey, StringBuilder, NetworkParameters, ScriptType, String) - Method in class org.bitcoinj.crypto.DeterministicKey
+
+ +
+
formatKeyWithAddress(boolean, AesKey, StringBuilder, NetworkParameters, ScriptType, String) - Method in class org.bitcoinj.crypto.ECKey
+
+ +
+
formatToCharacterIterator(Object) - Method in class org.bitcoinj.utils.BtcFormat
+
+
Formats a bitcoin monetary value and returns an AttributedCharacterIterator.
+
+
forNetwork(Network) - Method in interface org.bitcoinj.base.AddressParser.AddressParserProvider
+
+
Return a parser that will parse valid addresses for a given Network.
+
+
forServices(Network, long) - Static method in class org.bitcoinj.net.discovery.MultiplexingDiscovery
+
+
Builds a suitable set of peer discoveries.
+
+
forServices(Network, long, boolean, boolean) - Static method in class org.bitcoinj.net.discovery.MultiplexingDiscovery
+
+
Builds a suitable set of peer discoveries.
+
+
forServices(NetworkParameters, long) - Static method in class org.bitcoinj.net.discovery.MultiplexingDiscovery
+
+ +
+
forServices(NetworkParameters, long, boolean, boolean) - Static method in class org.bitcoinj.net.discovery.MultiplexingDiscovery
+
+ +
+
forTx(Transaction) - Static method in class org.bitcoinj.wallet.SendRequest
+
+
Simply wraps a pre-built incomplete transaction provided by you.
+
+
FP_ESTIMATOR_ALPHA - Static variable in class org.bitcoinj.core.AbstractBlockChain
+
+
False positive estimation uses a double exponential moving average.
+
+
FP_ESTIMATOR_BETA - Static variable in class org.bitcoinj.core.AbstractBlockChain
+
+
False positive estimation uses a double exponential moving average.
+
+
fractionDigits(int) - Method in class org.bitcoinj.utils.BtcFormat.Builder
+
+
Specify the number of decimal places in the fraction part of formatted numbers.
+
+
fractionGroups(int...) - Method in class org.bitcoinj.utils.BtcFormat.Builder
+
+
Specify the sizes of a variable number of optional decimal-place groups in the + fraction part of formatted values.
+
+
fractionPlaceGroups() - Method in class org.bitcoinj.utils.BtcFixedFormat
+
+
Return the fractional decimal-placing used when formatting.
+
+
fractionPlaces() - Method in class org.bitcoinj.utils.BtcAutoFormat
+
+
Return the number of decimal places in the fraction part of numbers formatted by this + instance.
+
+
freshAddress(KeyChain.KeyPurpose) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+ +
+
freshAddress(KeyChain.KeyPurpose) - Method in class org.bitcoinj.wallet.Wallet
+
+ +
+
freshAddress(KeyChain.KeyPurpose, ScriptType, long) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+ +
+
freshAddress(KeyChain.KeyPurpose, ScriptType, Instant) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Returns a fresh address for a given KeyChain.KeyPurpose and of a given + ScriptType.
+
+
freshKey(KeyChain.KeyPurpose) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Returns a key that has not been returned by this method before (fresh).
+
+
freshKey(KeyChain.KeyPurpose) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns a key that has not been returned by this method before (fresh).
+
+
freshKeys(KeyChain.KeyPurpose, int) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Returns a key/s that have not been returned by this method before (fresh).
+
+
freshKeys(KeyChain.KeyPurpose, int) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns a key/s that has not been returned by this method before (fresh).
+
+
freshOutputScript(KeyChain.KeyPurpose) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Create a new key and return the matching output script.
+
+
freshReceiveAddress() - Method in class org.bitcoinj.wallet.Wallet
+
+ +
+
freshReceiveAddress(ScriptType) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns a fresh receive address for a given ScriptType.
+
+
freshReceiveKey() - Method in class org.bitcoinj.wallet.Wallet
+
+
An alias for calling Wallet.freshKey(KeyChain.KeyPurpose) with + KeyChain.KeyPurpose.RECEIVE_FUNDS as the parameter.
+
+
fromAddress(Address) - Static method in class org.bitcoinj.core.NetworkParameters
+
+
Deprecated. +
You should be using Address.network() instead
+
+
+
fromASN1(byte[]) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Construct an ECKey from an ASN.1 encoded private key.
+
+
fromBase58(String, Network) - Static method in class org.bitcoinj.base.LegacyAddress
+
+
Construct a LegacyAddress from its base58 form.
+
+
fromBase58(Network, String) - Static method in class org.bitcoinj.crypto.BIP38PrivateKey
+
+
Construct a password-protected private key from its Base58 representation.
+
+
fromBase58(Network, String) - Static method in class org.bitcoinj.crypto.DumpedPrivateKey
+
+
Construct a private key from its Base58 representation.
+
+
fromBase58(NetworkParameters, String) - Static method in class org.bitcoinj.base.LegacyAddress
+
+ +
+
fromBase58(NetworkParameters, String) - Static method in class org.bitcoinj.crypto.BIP38PrivateKey
+
+ +
+
fromBase58(NetworkParameters, String) - Static method in class org.bitcoinj.crypto.DumpedPrivateKey
+
+ +
+
fromBech32(String, Network) - Static method in class org.bitcoinj.base.SegwitAddress
+
+
Construct a SegwitAddress from its textual form.
+
+
fromBech32(NetworkParameters, String) - Static method in class org.bitcoinj.base.SegwitAddress
+
+
Deprecated. + +
+
+
fromEncrypted(EncryptedData, KeyCrypter, byte[]) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Constructs a key that has an encrypted private component.
+
+
fromHash(Network, byte[]) - Static method in class org.bitcoinj.base.SegwitAddress
+
+
Construct a SegwitAddress that represents the given hash, which is either a pubkey hash or a script hash.
+
+
fromHash(NetworkParameters, byte[]) - Static method in class org.bitcoinj.base.SegwitAddress
+
+ +
+
fromID(String) - Static method in class org.bitcoinj.core.NetworkParameters
+
+ +
+
fromID(String) - Static method in class org.bitcoinj.params.BitcoinNetworkParams
+
+
Return network parameters for a network id
+
+
fromIdString(String) - Static method in enum class org.bitcoinj.base.BitcoinNetwork
+
+
Find the BitcoinNetwork from an ID String
+
+
fromKey(NetworkParameters, ECKey) - Static method in class org.bitcoinj.base.LegacyAddress
+
+ +
+
fromKey(NetworkParameters, ECKey) - Static method in class org.bitcoinj.base.SegwitAddress
+
+ +
+
fromKey(NetworkParameters, ECKey, ScriptType) - Static method in interface org.bitcoinj.base.Address
+
+ +
+
fromKey(DeterministicKey, ScriptType) - Method in class org.bitcoinj.wallet.KeyChainGroup.Builder
+
+
Add chain from a given account key.
+
+
fromMasterKey(Network, DeterministicKey, ScriptType, ChildNumber) - Static method in class org.bitcoinj.wallet.Wallet
+
+
Creates a spending wallet that tracks payments to and from a BIP32-style HD key hierarchy rooted by masterKey and + accountNumber.
+
+
fromMasterKey(NetworkParameters, DeterministicKey, ScriptType, ChildNumber) - Static method in class org.bitcoinj.wallet.Wallet
+
+ +
+
fromMnemonic(String) - Static method in enum class org.bitcoinj.script.ScriptError
+
 
+
fromPaymentDetails(Protos.PaymentDetails) - Method in class org.bitcoinj.wallet.SendRequest
+
+
Copy data from payment request.
+
+
fromPmtProtocolID(String) - Static method in class org.bitcoinj.core.NetworkParameters
+
+ +
+
fromPredicate(Predicate<TransactionOutput>) - Static method in interface org.bitcoinj.wallet.CoinSelector
+
+
Create a CoinSelector from a predicate function that filters a single TransactionOutput
+
+
fromPrivate(byte[]) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Creates an ECKey given the private key only.
+
+
fromPrivate(byte[], boolean) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Creates an ECKey given the private key only.
+
+
fromPrivate(BigInteger) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Creates an ECKey given the private key only.
+
+
fromPrivate(BigInteger, boolean) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Creates an ECKey given the private key only.
+
+
fromPrivateAndPrecalculatedPublic(byte[], byte[]) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Creates an ECKey that simply trusts the caller to ensure that point is really the result of multiplying the + generator point by the private key.
+
+
fromPrivateAndPrecalculatedPublic(BigInteger, ECPoint, boolean) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Creates an ECKey that simply trusts the caller to ensure that point is really the result of multiplying the + generator point by the private key.
+
+
fromProgram(Network, int, byte[]) - Static method in class org.bitcoinj.base.SegwitAddress
+
+
Construct a SegwitAddress that represents the given program, which is either a pubkey, a pubkey hash + or a script hash – depending on the script version.
+
+
fromProgram(NetworkParameters, int, byte[]) - Static method in class org.bitcoinj.base.SegwitAddress
+
+ +
+
fromProtobuf(List<Protos.Key>, KeyCrypter, KeyChainFactory) - Static method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns all the key chains found in the given list of keys.
+
+
fromProtobufEncrypted(List<Protos.Key>, KeyCrypter) - Static method in class org.bitcoinj.wallet.BasicKeyChain
+
+
Returns a new BasicKeyChain that contains all basic, ORIGINAL type keys and also any encrypted keys extracted + from the list.
+
+
fromProtobufEncrypted(Network, List<Protos.Key>, KeyCrypter, KeyChainFactory) - Static method in class org.bitcoinj.wallet.KeyChainGroup
+
 
+
fromProtobufUnencrypted(List<Protos.Key>) - Static method in class org.bitcoinj.wallet.BasicKeyChain
+
+
Returns a new BasicKeyChain that contains all basic, ORIGINAL type keys extracted from the list.
+
+
fromProtobufUnencrypted(Network, List<Protos.Key>, KeyChainFactory) - Static method in class org.bitcoinj.wallet.KeyChainGroup
+
 
+
fromPubKeyHash(Network, byte[]) - Static method in class org.bitcoinj.base.LegacyAddress
+
+
Construct a LegacyAddress that represents the given pubkey hash.
+
+
fromPubKeyHash(NetworkParameters, byte[]) - Static method in class org.bitcoinj.base.LegacyAddress
+
+ +
+
fromPublicOnly(byte[]) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Creates an ECKey that cannot be used for signing, only verifying signatures, from the given encoded point.
+
+
fromPublicOnly(ECKey) - Static method in class org.bitcoinj.crypto.ECKey
+
 
+
fromPublicOnly(ECPoint, boolean) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Creates an ECKey that cannot be used for signing, only verifying signatures, from the given point.
+
+
fromRandom(ScriptType) - Method in class org.bitcoinj.wallet.KeyChainGroup.Builder
+
+
Add chain from a random source.
+
+
fromScriptHash(Network, byte[]) - Static method in class org.bitcoinj.base.LegacyAddress
+
+
Construct a LegacyAddress that represents the given P2SH script hash.
+
+
fromScriptHash(NetworkParameters, byte[]) - Static method in class org.bitcoinj.base.LegacyAddress
+
+ +
+
fromSeed(Network, DeterministicSeed, ScriptType) - Static method in class org.bitcoinj.wallet.Wallet
+
 
+
fromSeed(Network, DeterministicSeed, ScriptType, List<ChildNumber>) - Static method in class org.bitcoinj.wallet.Wallet
+
 
+
fromSeed(Network, DeterministicSeed, ScriptType, KeyChainGroupStructure) - Static method in class org.bitcoinj.wallet.Wallet
+
 
+
fromSeed(NetworkParameters, DeterministicSeed, ScriptType) - Static method in class org.bitcoinj.wallet.Wallet
+
+ +
+
fromSeed(NetworkParameters, DeterministicSeed, ScriptType, List<ChildNumber>) - Static method in class org.bitcoinj.wallet.Wallet
+
+ +
+
fromSeed(NetworkParameters, DeterministicSeed, ScriptType, KeyChainGroupStructure) - Static method in class org.bitcoinj.wallet.Wallet
+
+ +
+
fromSeed(DeterministicSeed, ScriptType) - Method in class org.bitcoinj.wallet.KeyChainGroup.Builder
+
+
Add chain from a given seed.
+
+
fromSpendingKey(Network, DeterministicKey, ScriptType) - Static method in class org.bitcoinj.wallet.Wallet
+
+
Creates a wallet that tracks payments to and from the HD key hierarchy rooted by the given spending key.
+
+
fromSpendingKey(NetworkParameters, DeterministicKey, ScriptType) - Static method in class org.bitcoinj.wallet.Wallet
+
+ +
+
fromSpendingKeyB58(Network, String) - Static method in class org.bitcoinj.wallet.Wallet
+
+
Creates a wallet that tracks payments to and from the HD key hierarchy rooted by the given spending key.
+
+
fromSpendingKeyB58(Network, String, Instant) - Static method in class org.bitcoinj.wallet.Wallet
+
+
Creates a wallet that tracks payments to and from the HD key hierarchy rooted by the given spending key.
+
+
fromSpendingKeyB58(NetworkParameters, String) - Static method in class org.bitcoinj.wallet.Wallet
+
+ +
+
fromSpendingKeyB58(NetworkParameters, String, long) - Static method in class org.bitcoinj.wallet.Wallet
+
+ +
+
fromSpendingKeyB58(NetworkParameters, String, Instant) - Static method in class org.bitcoinj.wallet.Wallet
+
+ +
+
fromString(String) - Static method in enum class org.bitcoinj.base.BitcoinNetwork
+
+
Find the BitcoinNetwork from a name string, e.g.
+
+
fromString(NetworkParameters, String) - Static method in interface org.bitcoinj.base.Address
+
+ +
+
fromWatchingKey(Network, DeterministicKey, ScriptType) - Static method in class org.bitcoinj.wallet.Wallet
+
+
Creates a wallet that tracks payments to and from the HD key hierarchy rooted by the given watching key.
+
+
fromWatchingKey(NetworkParameters, DeterministicKey, ScriptType) - Static method in class org.bitcoinj.wallet.Wallet
+
+ +
+
fromWatchingKeyB58(Network, String) - Static method in class org.bitcoinj.wallet.Wallet
+
+
Creates a wallet that tracks payments to and from the HD key hierarchy rooted by the given watching key.
+
+
fromWatchingKeyB58(Network, String, Instant) - Static method in class org.bitcoinj.wallet.Wallet
+
+
Creates a wallet that tracks payments to and from the HD key hierarchy rooted by the given watching key.
+
+
fromWatchingKeyB58(NetworkParameters, String) - Static method in class org.bitcoinj.wallet.Wallet
+
+ +
+
fromWatchingKeyB58(NetworkParameters, String, long) - Static method in class org.bitcoinj.wallet.Wallet
+
+ +
+
fromWatchingKeyB58(NetworkParameters, String, Instant) - Static method in class org.bitcoinj.wallet.Wallet
+
+ +
+
FullPrunedBlockChain - Class in org.bitcoinj.core
+
+
A FullPrunedBlockChain works in conjunction with a FullPrunedBlockStore to verify all the rules of the + Bitcoin system, with the downside being a large cost in system resources.
+
+
FullPrunedBlockChain(NetworkParameters, List<Wallet>, FullPrunedBlockStore) - Constructor for class org.bitcoinj.core.FullPrunedBlockChain
+
+
Constructs a block chain connected to the given list of wallets and a store.
+
+
FullPrunedBlockChain(NetworkParameters, FullPrunedBlockStore) - Constructor for class org.bitcoinj.core.FullPrunedBlockChain
+
+
Constructs a block chain connected to the given store.
+
+
FullPrunedBlockChain(NetworkParameters, Wallet, FullPrunedBlockStore) - Constructor for class org.bitcoinj.core.FullPrunedBlockChain
+
+
Constructs a block chain connected to the given wallet and store.
+
+
FullPrunedBlockStore - Interface in org.bitcoinj.store
+
+
An implementor of FullPrunedBlockStore saves StoredBlock objects to some storage mechanism.
+
+
future() - Method in class org.bitcoinj.core.TransactionBroadcast
+
+ +
+
FutureUtils - Class in org.bitcoinj.base.internal
+
+
Utilities for CompletableFuture.
+
+
FutureUtils() - Constructor for class org.bitcoinj.base.internal.FutureUtils
+
 
+
FutureUtils.ThrowingSupplier<T> - Interface in org.bitcoinj.base.internal
+
+
Subinterface of Supplier for Lambdas which throw exceptions.
+
+
FutureVersion() - Constructor for exception org.bitcoinj.wallet.UnreadableWalletException.FutureVersion
+
 
+
+

G

+
+
gathered - Variable in class org.bitcoinj.wallet.CoinSelection
+
+
Deprecated. + +
+
+
generate(DeterministicKey, int) - Static method in class org.bitcoinj.crypto.HDKeyDerivation
+
+
Generate an infinite stream of DeterministicKeys from the given parent and index.
+
+
genesisBlock - Variable in class org.bitcoinj.params.BitcoinNetworkParams
+
+
lazy-initialized by the first call to NetworkParameters.getGenesisBlock()
+
+
get() - Method in interface org.bitcoinj.base.internal.FutureUtils.ThrowingSupplier
+
+
Gets a result wrapping checked Exceptions with RuntimeException
+
+
get() - Static method in class org.bitcoinj.core.Context
+
+
Returns the current context that is associated with the calling thread.
+
+
get() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
get() - Static method in class org.bitcoinj.params.MainNetParams
+
 
+
get() - Static method in class org.bitcoinj.params.Networks
+
 
+
get() - Static method in class org.bitcoinj.params.RegTestParams
+
 
+
get() - Static method in class org.bitcoinj.params.SigNetParams
+
 
+
get() - Static method in class org.bitcoinj.params.TestNet3Params
+
 
+
get() - Static method in class org.bitcoinj.params.UnitTestParams
+
 
+
get() - Static method in class org.bitcoinj.wallet.AllowUnconfirmedCoinSelector
+
 
+
get(int) - Method in class org.bitcoinj.core.BlockLocator
+
+
Get hash by index from this block locator.
+
+
get(int) - Method in class org.bitcoinj.crypto.HDPath
+
 
+
get(String) - Static method in class org.bitcoinj.utils.AppDataDirectory
+
+
Get and create if necessary the Path to the application data directory.
+
+
get(TemporalUnit) - Method in class org.bitcoinj.base.internal.Stopwatch
+
 
+
get(List<ChildNumber>, boolean, boolean) - Method in class org.bitcoinj.crypto.DeterministicHierarchy
+
+
Returns a key for the given path, optionally creating it.
+
+
get(Network) - Static method in class org.bitcoinj.wallet.DefaultCoinSelector
+
 
+
get(Sha256Hash) - Method in class org.bitcoinj.core.TxConfidenceTable
+
+
Returns the TransactionConfidence for the given hash if we have downloaded it, or null if that tx hash + is unknown to the system at this time.
+
+
get(Sha256Hash) - Method in interface org.bitcoinj.store.BlockStore
+
+
Returns the StoredBlock given a hash.
+
+
get(Sha256Hash) - Method in class org.bitcoinj.store.MemoryBlockStore
+
 
+
get(Sha256Hash) - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
get(Sha256Hash) - Method in class org.bitcoinj.store.SPVBlockStore
+
 
+
getAccountPath() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
getActiveKeyChain() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Returns the key chain that's used for generation of default fresh/current keys.
+
+
getActiveKeyChain() - Method in class org.bitcoinj.wallet.Wallet
+
+
Gets the default active keychain via KeyChainGroup.getActiveKeyChain().
+
+
getActiveKeyChain(ScriptType, long) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+ +
+
getActiveKeyChain(ScriptType, Instant) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Returns the key chain that's used for generation of fresh/current keys of the given type.
+
+
getActiveKeyChains() - Method in class org.bitcoinj.wallet.Wallet
+
+
Gets the active keychains via KeyChainGroup.getActiveKeyChains(Instant).
+
+
getActiveKeyChains(long) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+ +
+
getActiveKeyChains(Instant) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Returns the key chains that are used for generation of fresh/current keys, in the order of how they + were added.
+
+
getAddr() - Method in class org.bitcoinj.core.Peer
+
+
Sends a getaddr request to the peer and returns a future that completes with the answer once the peer has replied.
+
+
getAddr() - Method in class org.bitcoinj.core.PeerAddress
+
 
+
getAddress() - Method in class org.bitcoinj.core.PeerSocketHandler
+
 
+
getAddress() - Method in class org.bitcoinj.core.UTXO
+
+
The address of this output, can be the empty string if none was provided at construction time or was deserialized
+
+
getAddress() - Method in class org.bitcoinj.uri.BitcoinURI
+
+
The Bitcoin address from the URI, if one was present.
+
+
getAddresses() - Method in class org.bitcoinj.core.AddressMessage
+
 
+
getAddressHeader() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Deprecated.
+
+
GetAddrMessage - Class in org.bitcoinj.core
+
+
Represents the "getaddr" P2P protocol message, which requests network AddressMessages from a peer.
+
+
GetAddrMessage() - Constructor for class org.bitcoinj.core.GetAddrMessage
+
 
+
getAddrSeeds() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Return IP addresses of active peers
+
+
getAffineXCoord() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
getAffineYCoord() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
getAmount() - Method in class org.bitcoinj.uri.BitcoinURI
+
 
+
getAppearedAtChainHeight() - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Returns the chain height at which the transaction appeared if confidence type is BUILDING.
+
+
getAppearsInHashes() - Method in class org.bitcoinj.core.Transaction
+
+
Returns a map of block [hashes] which contain the transaction mapped to relativity counters, or null if this + transaction doesn't have that data because it's not stored in the wallet or because it has never appeared in a + block.
+
+
getAssociatedTransactions() - Method in class org.bitcoinj.core.FilteredBlock
+
+
Gets the set of transactions which were provided using provideTransaction() which match in getTransactionHashes()
+
+
getAvailableLocales() - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return an array of all locales for which the getInstance() method of this class can + return localized instances.
+
+
getBalance() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns the AVAILABLE balance of this wallet.
+
+
getBalance(CoinSelector) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns the balance that would be considered spendable by the given coin selector, including watched outputs + (i.e.
+
+
getBalance(Wallet.BalanceType) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns the balance of this wallet as calculated by the provided balanceType.
+
+
getBalanceFuture(Coin, Wallet.BalanceType) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns a future that will complete when the balance of the given type has becom equal or larger to the given + value.
+
+
getBestChainHeight() - Method in class org.bitcoinj.core.AbstractBlockChain
+
 
+
getBestHeight() - Method in class org.bitcoinj.core.Peer
+
 
+
getBip32HeaderP2PKHpriv() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Returns the 4 byte header for BIP32 wallet P2PKH - private key part.
+
+
getBip32HeaderP2PKHpub() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Returns the 4 byte header for BIP32 wallet P2PKH - public key part.
+
+
getBip32HeaderP2WPKHpriv() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Returns the 4 byte header for BIP32 wallet P2WPKH - private key part.
+
+
getBip32HeaderP2WPKHpub() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Returns the 4 byte header for BIP32 wallet P2WPKH - public key part.
+
+
getBitcoinProtocolVersion() - Method in enum class org.bitcoinj.core.ProtocolVersion
+
+
Deprecated. + +
+
+
getBlock(Sha256Hash) - Method in class org.bitcoinj.core.Peer
+
+
Asks the connected peer for the block of the given hash, and returns a future representing the answer.
+
+
getBlockHeader() - Method in class org.bitcoinj.core.FilteredBlock
+
+
Gets a copy of the block header
+
+
getBlockHeaders() - Method in class org.bitcoinj.core.HeadersMessage
+
 
+
getBlockInflation(int) - Method in class org.bitcoinj.params.BitcoinNetworkParams
+
+
A utility method that calculates how much new Bitcoin would be created by the block at the given height.
+
+
GetBlocksMessage - Class in org.bitcoinj.core
+
+
Represents the "getblocks" P2P network message, which requests the hashes of the parts of the block chain we're + missing.
+
+
GetBlocksMessage(long, BlockLocator, Sha256Hash) - Constructor for class org.bitcoinj.core.GetBlocksMessage
+
 
+
getBlockStore() - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Returns the BlockStore the chain was constructed with.
+
+
getBlockVerificationFlags(Block, VersionTally, Integer) - Method in class org.bitcoinj.core.NetworkParameters
+
+
The flags indicating which block validation tests should be applied to + the given block.
+
+
getBloomFilter() - Method in class org.bitcoinj.core.Peer
+
+ +
+
getBloomFilter(double) - Method in class org.bitcoinj.wallet.Wallet
+
+
Gets a bloom filter that contains all of the public keys from this wallet, and which will provide the given + false-positive rate.
+
+
getBloomFilter(int, double, int) - Method in interface org.bitcoinj.core.PeerFilterProvider
+
+
Gets a bloom filter that contains all the necessary elements for the listener to receive relevant transactions.
+
+
getBloomFilter(int, double, int) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
 
+
getBloomFilter(int, double, int) - Method in class org.bitcoinj.wallet.Wallet
+
+
Gets a bloom filter that contains all of the public keys from this wallet, and which will provide the given + false-positive rate if it has size elements.
+
+
getBloomFilterElementCount() - Method in interface org.bitcoinj.core.PeerFilterProvider
+
+
Gets the number of elements that will be added to a bloom filter returned by + PeerFilterProvider.getBloomFilter(int, double, int)
+
+
getBloomFilterElementCount() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
 
+
getBloomFilterElementCount() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns the number of distinct data items (note: NOT keys) that will be inserted into a bloom filter, when it + is constructed.
+
+
getBloomFilterFPRate() - Method in class org.bitcoinj.net.FilterMerger
+
 
+
getBroadcast() - Method in class org.bitcoinj.wallet.Wallet.SendResult
+
 
+
getBroadcastBy() - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Returns a snapshot of PeerAddresses that announced the transaction.
+
+
getByAddress(byte[]) - Static method in class org.bitcoinj.core.PeerAddress
+
 
+
getBytes() - Method in class org.bitcoinj.base.Sha256Hash
+
+
Returns the internal byte array, without defensively copying.
+
+
getChainCode() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Returns the chain code associated with this key.
+
+
getChainHead() - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Returns the block at the head of the current best chain.
+
+
getChainHead() - Method in interface org.bitcoinj.store.BlockStore
+
+
Returns the StoredBlock that represents the top of the chain of greatest total work.
+
+
getChainHead() - Method in class org.bitcoinj.store.MemoryBlockStore
+
 
+
getChainHead() - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
getChainHead() - Method in class org.bitcoinj.store.SPVBlockStore
+
 
+
getChainHeadHeight() - Method in interface org.bitcoinj.core.UTXOProvider
+
+
Get the height of the chain head.
+
+
getChainHeadHeight() - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
getChainWork() - Method in class org.bitcoinj.core.StoredBlock
+
+
The total sum of work done in this block, and all the blocks below it in the chain.
+
+
getCheckpointBefore(long) - Method in class org.bitcoinj.core.CheckpointManager
+
+ +
+
getCheckpointBefore(Instant) - Method in class org.bitcoinj.core.CheckpointManager
+
+
Returns a StoredBlock representing the last checkpoint before the given time, for example, normally + you would want to know the checkpoint before the earliest wallet birthday.
+
+
getChildNumber() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Returns the last element of the path returned by DeterministicKey.getPath()
+
+
getChunks() - Method in class org.bitcoinj.script.Script
+
+
Deprecated. + +
+
+
getCodeInstance() - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new auto-denominating instance that will indicate units using a currency + code, for example, "BTC".
+
+
getCodeInstance(int) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new code-style auto-formatter with the given number of fractional decimal + places.
+
+
getCodeInstance(Locale) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new code-style auto-formatter for the given locale.
+
+
getCodeInstance(Locale, int) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new code-style auto-formatter for the given locale with the given number of + fraction places.
+
+
getCoinInstance() - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new coin-denominated formatter.
+
+
getCoinInstance(int, int...) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new coin-denominated formatter with the specified fraction-places.
+
+
getCoinInstance(Locale) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new coin-denominated formatter for the given locale.
+
+
getCoinInstance(Locale, int, int...) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a newly-constructed instance for the given locale that will format + values in terms of bitcoins, with the given minimum number of fractional + decimal places.
+
+
getCoinSelector() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns the default CoinSelector object that is used by this wallet if no custom selector is specified.
+
+
getCombinedKeyLookaheadEpochs() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Returns a counter that increases (by an arbitrary amount) each time new keys have been calculated due to + lookahead and thus the Bloom filter that was previously calculated has become stale.
+
+
getConfidence() - Method in class org.bitcoinj.core.Transaction
+
+
Returns the confidence object for this transaction from the TxConfidenceTable + referenced by the implicit Context.
+
+
getConfidence(Transaction) - Method in class org.bitcoinj.core.TxConfidenceTable
+
+
Get the confidence object for a transaction
+
+
getConfidenceTable() - Method in class org.bitcoinj.core.Context
+
+
Returns the TxConfidenceTable created by this context.
+
+
getConfidenceType() - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Returns a general statement of the level of confidence you can have in this transaction.
+
+
getConnectedClientCount() - Method in class org.bitcoinj.net.BlockingClientManager
+
 
+
getConnectedClientCount() - Method in interface org.bitcoinj.net.ClientConnectionManager
+
+
Gets the number of connected peers
+
+
getConnectedClientCount() - Method in class org.bitcoinj.net.NioClientManager
+
 
+
getConnectedKey(KeyBag) - Method in class org.bitcoinj.core.TransactionOutPoint
+
+
Returns the ECKey identified in the connected output, for either P2PKH, P2WPKH or P2PK scripts.
+
+
getConnectedOutput() - Method in class org.bitcoinj.core.TransactionInput
+
+
Returns the connected output, assuming the input was connected with + TransactionInput.connect(TransactionOutput) or variants at some point.
+
+
getConnectedOutput() - Method in class org.bitcoinj.core.TransactionOutPoint
+
+
An outpoint is a part of a transaction input that points to the output of another transaction.
+
+
getConnectedPeers() - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns a newly allocated list containing the currently connected peers.
+
+
getConnectedPubKeyScript() - Method in class org.bitcoinj.core.TransactionOutPoint
+
+
Returns the pubkey script from the connected output.
+
+
getConnectedRedeemData(KeyBag) - Method in class org.bitcoinj.core.TransactionInput
+
+
Alias for getOutpoint().getConnectedRedeemData(keyBag)
+
+
getConnectedRedeemData(KeyBag) - Method in class org.bitcoinj.core.TransactionOutPoint
+
+
Returns the RedeemData identified in the connected output, for either P2PKH, P2WPKH, P2PK + or P2SH scripts.
+
+
getConnectedTransaction() - Method in class org.bitcoinj.core.TransactionInput
+
+
Returns the connected transaction, assuming the input was connected with + TransactionInput.connect(TransactionOutput) or variants at some point.
+
+
getConnectFuture() - Method in class org.bitcoinj.net.BlockingClient
+
+
Returns a future that completes once connection has occurred at the socket level or with an exception if failed to connect.
+
+
getConnectionOpenFuture() - Method in class org.bitcoinj.core.Peer
+
+
Provides a ListenableCompletableFuture that can be used to wait for the socket to connect.
+
+
getCountAtOrAbove(long) - Method in class org.bitcoinj.utils.VersionTally
+
+
Get the count of blocks at or above the given version, within the window.
+
+
getCreationTime() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
The creation time of a deterministic key is equal to that of its parent, unless this key is the root of a tree + in which case the time is stored alongside the key as per normal, see ECKey.getCreationTime().
+
+
getCreationTime() - Method in class org.bitcoinj.crypto.ECKey
+
+
Returns the creation time of this key, or empty if the key was deserialized from a version that did not store + that data.
+
+
getCreationTime() - Method in interface org.bitcoinj.crypto.EncryptableItem
+
+
Returns the time at which this encryptable item was first created/derived, or empty of unknown.
+
+
getCreationTime() - Method in class org.bitcoinj.wallet.DeterministicSeed
+
 
+
getCreationTimeSeconds() - Method in interface org.bitcoinj.crypto.EncryptableItem
+
+ +
+
getCreationTimeSeconds() - Method in class org.bitcoinj.script.Script
+
+
Deprecated. + +
+
+
getCurrencyCode() - Method in class org.bitcoinj.base.utils.Fiat
+
 
+
getCurve() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
getData(Peer, GetDataMessage) - Method in interface org.bitcoinj.core.listeners.GetDataEventListener
+
+
Called when a peer receives a getdata message, usually in response to an "inv" being broadcast.
+
+
GetDataEventListener - Interface in org.bitcoinj.core.listeners
+
+
Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, + they can pre-filter messages before they are processed by a Peer or PeerGroup, and they can + provide transactions to remote peers when they ask for them.
+
+
getDataHash() - Method in class org.bitcoinj.core.CheckpointManager
+
+
Returns a hash of the concatenated checkpoint data.
+
+
GetDataMessage - Class in org.bitcoinj.core
+
+
Represents the "getdata" P2P network message, which requests the contents of blocks or transactions given their + hashes.
+
+
GetDataMessage() - Constructor for class org.bitcoinj.core.GetDataMessage
+
+
Deprecated.
+
+
getDate() - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Deprecated. + +
+
+
getDefault() - Static method in interface org.bitcoinj.base.AddressParser
+
 
+
getDefault(Network) - Static method in interface org.bitcoinj.base.AddressParser
+
 
+
getDefaultSerializer() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Return the default serializer for this network.
+
+
getDepth() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Return this key's depth in the hierarchy, where the root node is at depth zero.
+
+
getDepthFuture(int) - Method in class org.bitcoinj.core.TransactionConfidence
+
 
+
getDepthInBlocks() - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Depth in the chain is an approximation of how much time has elapsed since the transaction has been confirmed.
+
+
getDescription() - Method in class org.bitcoinj.wallet.Wallet
+
+
Get the description of the wallet.
+
+
getDetachedPoint() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
getDeterministicKeyChains() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Returns a copy of the current list of chains.
+
+
getDifficultyTarget() - Method in class org.bitcoinj.core.Block
+
+
Returns the difficulty of the proof of work that this block should meet encoded in compact form.
+
+
getDifficultyTargetAsInteger() - Method in class org.bitcoinj.core.Block
+
+
Returns the difficulty target as a 256 bit value that can be compared to a SHA-256 hash.
+
+
getDisplayNameFromCertificate(X509Certificate, boolean) - Static method in class org.bitcoinj.crypto.X509Utils
+
+
Returns either a string that "sums up" the certificate for humans, in a similar manner to what you might see + in a web browser, or null if one cannot be extracted.
+
+
getDnsSeeds() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Return DNS names that when resolved, give IP addresses of active peers
+
+
getDownloadPeer() - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns the currently selected download peer.
+
+
getDumpedPrivateKeyHeader() - Method in class org.bitcoinj.core.NetworkParameters
+
+
First byte of a base58 encoded dumped private key.
+
+
getEarliestKeyCreationTime() - Method in interface org.bitcoinj.core.PeerFilterProvider
+
+ +
+
getEarliestKeyCreationTime() - Method in interface org.bitcoinj.wallet.KeyChain
+
+ +
+
getEarliestKeyCreationTime() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+ +
+
getEncoded() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
getEncoded(boolean) - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
getEncryptedData() - Method in class org.bitcoinj.crypto.ECKey
+
+ +
+
getEncryptedData() - Method in interface org.bitcoinj.crypto.EncryptableItem
+
+
Returns the initialization vector and encrypted secret bytes, or null if not encrypted.
+
+
getEncryptedData() - Method in class org.bitcoinj.wallet.DeterministicSeed
+
 
+
getEncryptedPrivateKey() - Method in class org.bitcoinj.crypto.ECKey
+
+
Returns the encrypted private key bytes and initialisation vector for this ECKey, or null if the ECKey + is not encrypted.
+
+
getEncryptedSeedData() - Method in class org.bitcoinj.wallet.DeterministicSeed
+
 
+
getEncryptionType() - Method in class org.bitcoinj.crypto.ECKey
+
 
+
getEncryptionType() - Method in interface org.bitcoinj.crypto.EncryptableItem
+
+
Returns an enum constant describing what algorithm was used to encrypt the key or UNENCRYPTED.
+
+
getEncryptionType() - Method in class org.bitcoinj.wallet.DeterministicSeed
+
 
+
getEncryptionType() - Method in class org.bitcoinj.wallet.Wallet
+
+
Get the type of encryption used for this wallet.
+
+
getError() - Method in exception org.bitcoinj.script.ScriptException
+
 
+
getEventHorizon() - Method in class org.bitcoinj.core.Context
+
+
The event horizon is the number of blocks after which various bits of the library consider a transaction to be + so confirmed that it's safe to delete data.
+
+
getExchangeRate() - Method in class org.bitcoinj.core.Transaction
+
+
Getter for Transaction.exchangeRate.
+
+
getExpires() - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Deprecated. + +
+
+
getExtensions() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns a snapshot of all registered extension objects.
+
+
getFalsePositiveRate() - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
The false positive rate is the average over all blockchain transactions of: + + - 1.0 if the transaction was false-positive (was irrelevant to all listeners) + - 0.0 if the transaction was relevant or filtered out
+
+
getFalsePositiveRate(int) - Method in class org.bitcoinj.core.BloomFilter
+
+
Returns the theoretical false positive rate of this filter if were to contain the given number of elements.
+
+
getFastCatchupTime() - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns the current fast catchup time.
+
+
getFastCatchupTimeSecs() - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
getFee() - Method in class org.bitcoinj.core.Transaction
+
+
The transaction fee is the difference of the value of all inputs and the value of all outputs.
+
+
getFeeFilter() - Method in class org.bitcoinj.core.Peer
+
+
Returns the fee filter announced by the remote peer, interpreted as satoshis per kB.
+
+
getFeePerKb() - Method in class org.bitcoinj.core.Context
+
+
The default fee per 1000 virtual bytes of transaction data to pay when completing transactions.
+
+
getFeeRate() - Method in class org.bitcoinj.core.FeeFilterMessage
+
+
Deprecated. + +
+
+
getFileSize(int) - Static method in class org.bitcoinj.store.SPVBlockStore
+
+
Returns the size in bytes of the file that is used to store the chain with the current parameters.
+
+
getFilter(int, double, int) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
getFilter(int, double, int) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
getFilter(int, double, int) - Method in interface org.bitcoinj.wallet.KeyChain
+
+
Gets a bloom filter that contains all of the public keys from this chain, and which will provide the given + false-positive rate if it has size elements.
+
+
getFingerprint() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Returns the first 32 bits of the result of DeterministicKey.getIdentifier().
+
+
getFullKey() - Method in class org.bitcoinj.wallet.RedeemData
+
+
Returns the first key that has private bytes
+
+
getFuture() - Method in class org.bitcoinj.core.listeners.DownloadProgressTracker
+
+
Returns a listenable future that completes with the height of the best chain (as reported by the peer) once chain + download seems to be finished.
+
+
getGenesisBlock() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Genesis block for this chain.
+
+
getGenesisBlock() - Method in class org.bitcoinj.params.MainNetParams
+
 
+
getGenesisBlock() - Method in class org.bitcoinj.params.RegTestParams
+
 
+
getGenesisBlock() - Method in class org.bitcoinj.params.SigNetParams
+
 
+
getGenesisBlock() - Method in class org.bitcoinj.params.TestNet3Params
+
 
+
getGenesisBlock() - Method in class org.bitcoinj.params.UnitTestParams
+
 
+
getGenesisBlock() - Method in class org.bitcoinj.testing.MockAltNetworkParams
+
 
+
getHash() - Method in interface org.bitcoinj.base.Address
+
+
Get either the public key hash or script hash that is encoded in the address.
+
+
getHash() - Method in class org.bitcoinj.base.LegacyAddress
+
+
The (big endian) 20 byte hash that is the core of a Bitcoin address.
+
+
getHash() - Method in class org.bitcoinj.base.SegwitAddress
+
 
+
getHash() - Method in class org.bitcoinj.core.Block
+
+
Returns the hash of the block (which for a valid, solved block should be + below the target).
+
+
getHash() - Method in class org.bitcoinj.core.FilteredBlock
+
+
Gets the hash of the block represented in this Filtered Block
+
+
getHash() - Method in exception org.bitcoinj.core.PrunedException
+
 
+
getHash() - Method in class org.bitcoinj.core.StoredUndoableBlock
+
+
Get the hash of the represented block
+
+
getHash() - Method in class org.bitcoinj.core.TransactionOutPoint
+
+
Deprecated. + +
+
+
getHash() - Method in class org.bitcoinj.core.UTXO
+
+
The hash of the transaction which holds this output.
+
+
getHashAsString() - Method in class org.bitcoinj.core.Block
+
+
Returns the hash of the block (which for a valid, solved block should be below the target) in the form seen on + the block explorer.
+
+
getHashes() - Method in class org.bitcoinj.core.BlockLocator
+
+
Returns List of Block locator hashes.
+
+
getHashOf(int) - Method in class org.bitcoinj.core.GetDataMessage
+
 
+
getHeader() - Method in class org.bitcoinj.core.StoredBlock
+
+
The block header this object wraps.
+
+
GetHeadersMessage - Class in org.bitcoinj.core
+
+
The "getheaders" command is structurally identical to "getblocks", but has different meaning.
+
+
GetHeadersMessage(long, BlockLocator, Sha256Hash) - Constructor for class org.bitcoinj.core.GetHeadersMessage
+
 
+
getHeight() - Method in class org.bitcoinj.core.StoredBlock
+
+
Position in the chain for this block.
+
+
getHeight() - Method in class org.bitcoinj.core.UTXO
+
+
Gets the height of the block that created this output.
+
+
getHeightFuture(int) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Returns a future that completes when the block chain has reached the given height.
+
+
getHostname() - Method in class org.bitcoinj.core.PeerAddress
+
 
+
getI() - Method in class org.bitcoinj.crypto.ChildNumber
+
+
Returns the uint32 encoded form of the path element, including the most significant bit.
+
+
getId() - Method in class org.bitcoinj.core.NetworkParameters
+
+
A Java package style string acting as unique ID for these parameters
+
+
getIdentifier() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Returns RIPE-MD160(SHA256(pub key bytes)).
+
+
getImportedKeys() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Returns a list of the non-deterministic keys that have been imported into the wallet, or the empty list if none.
+
+
getImportedKeys() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns a list of the non-deterministic keys that have been imported into the wallet, or the empty list if none.
+
+
getIndex() - Method in class org.bitcoinj.core.TransactionInput
+
+
Gets the index of this input in the parent transaction, or throws if this input is freestanding.
+
+
getIndex() - Method in class org.bitcoinj.core.TransactionOutPoint
+
+
Deprecated. + +
+
+
getIndex() - Method in class org.bitcoinj.core.TransactionOutput
+
+
Gets the index of this output in the parent transaction, or throws if this output is freestanding.
+
+
getIndex() - Method in class org.bitcoinj.core.UTXO
+
+
The index of this output in the transaction which holds it.
+
+
getInput(long) - Method in class org.bitcoinj.core.Transaction
+
+
Same as getInputs().get(index).
+
+
getInputs() - Method in class org.bitcoinj.core.Transaction
+
+
Returns an unmodifiable view of all inputs.
+
+
getInputSum() - Method in class org.bitcoinj.core.Transaction
+
+
Gets the sum of all transaction inputs, regardless of who owns them.
+
+
getInstance() - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new instance of this class using all defaults.
+
+
getInstance(int) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new fixed-denomination formatter.
+
+
getInstance(int, int, int...) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new fixed-denomination formatter with the specified fractional decimal + placing.
+
+
getInstance(int, Locale) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new fixed-denomination formatter for the given locale.
+
+
getInstance(int, Locale, int, int...) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new fixed-denomination formatter for the given locale, with the specified + fractional decimal placing.
+
+
getInstance(int, Locale, int, List<Integer>) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new fixed-denomination formatter for the given locale, with the specified + fractional decimal placing.
+
+
getInstance(Locale) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new code-style auto-formatter for the given locale.
+
+
getInstance(Locale, int) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new code-style auto-formatter for the given locale with the given number of + fraction places.
+
+
getInstance(BtcAutoFormat.Style) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new auto-denominating formatter.
+
+
getInstance(BtcAutoFormat.Style, int) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new auto-denominating formatter with the given number of fractional decimal + places.
+
+
getInstance(BtcAutoFormat.Style, Locale) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new auto-formatter with the given style for the given locale.
+
+
getInstance(BtcAutoFormat.Style, Locale, int) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new auto-formatter for the given locale with the given number of fraction places.
+
+
getInterval() - Method in class org.bitcoinj.core.NetworkParameters
+
+
How many blocks pass between difficulty adjustment periods.
+
+
getIssuedExternalKeys() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns number of keys used on external path.
+
+
getIssuedInternalKeys() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns number of keys used on internal path.
+
+
getIssuedReceiveAddresses() - Method in class org.bitcoinj.wallet.Wallet
+
+ +
+
getIssuedReceiveKeys() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns only the external keys that have been issued by this chain, lookahead not included.
+
+
getIssuedReceiveKeys() - Method in class org.bitcoinj.wallet.Wallet
+
+ +
+
getItems() - Method in class org.bitcoinj.core.ListMessage
+
 
+
getKey() - Method in class org.bitcoinj.crypto.AesKey
+
+
Deprecated. + +
+
+
getKey() - Method in class org.bitcoinj.crypto.DumpedPrivateKey
+
+
Returns an ECKey created from this encoded private key.
+
+
getKey(KeyChain.KeyPurpose) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
getKey(KeyChain.KeyPurpose) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns a freshly derived key that has not been returned by this method before.
+
+
getKey(KeyChain.KeyPurpose) - Method in interface org.bitcoinj.wallet.KeyChain
+
+
Obtains a key intended for the given purpose.
+
+
getKeyByPath(List<ChildNumber>) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns the deterministic key for the given absolute path in the hierarchy.
+
+
getKeyByPath(List<ChildNumber>) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns a key for the given HD path, assuming it's already been derived.
+
+
getKeyByPath(List<ChildNumber>, boolean) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns the deterministic key for the given absolute path in the hierarchy, optionally creating it
+
+
getKeyByPath(ChildNumber...) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns the deterministic key for the given absolute path in the hierarchy.
+
+
getKeyChainGroupCombinedKeyLookaheadEpochs() - Method in class org.bitcoinj.wallet.Wallet
+
 
+
getKeyChainGroupLookaheadSize() - Method in class org.bitcoinj.wallet.Wallet
+
+ +
+
getKeyChainGroupLookaheadThreshold() - Method in class org.bitcoinj.wallet.Wallet
+
+ +
+
getKeyChainGroupSize() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns the number of keys in the key chain group, including lookahead keys.
+
+
getKeyChainSeed() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns the immutable seed for the current active HD chain.
+
+
getKeyCrypter() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Returns this keys KeyCrypter or the keycrypter of its parent key.
+
+
getKeyCrypter() - Method in class org.bitcoinj.crypto.ECKey
+
+
Returns the KeyCrypter that was used to encrypt to encrypt this ECKey.
+
+
getKeyCrypter() - Method in class org.bitcoinj.wallet.BasicKeyChain
+
+
Returns the KeyCrypter in use or null if the key chain is not encrypted.
+
+
getKeyCrypter() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
getKeyCrypter() - Method in interface org.bitcoinj.wallet.EncryptableKeyChain
+
+
Returns the key crypter used by this key chain, or null if it's not encrypted.
+
+
getKeyCrypter() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Returns the key crypter or null if the group is not encrypted.
+
+
getKeyCrypter() - Method in class org.bitcoinj.wallet.Wallet
+
+
Get the wallet's KeyCrypter, or null if the wallet is not encrypted.
+
+
getKeyLookaheadEpoch() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns a counter that is incremented each time new keys are generated due to lookahead.
+
+
getKeyRotationTime() - Method in class org.bitcoinj.wallet.Wallet
+
+
Deprecated. + +
+
+
getKeys() - Method in class org.bitcoinj.wallet.BasicKeyChain
+
+
Returns a copy of the list of keys that this chain is managing.
+
+
getKeys(KeyChain.KeyPurpose, int) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
getKeys(KeyChain.KeyPurpose, int) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns freshly derived key/s that have not been returned by this method before.
+
+
getKeys(KeyChain.KeyPurpose, int) - Method in interface org.bitcoinj.wallet.KeyChain
+
+
Obtains a number of key/s intended for the given purpose.
+
+
getKeyStore() - Method in class org.bitcoinj.crypto.TrustStoreLoader.DefaultTrustStoreLoader
+
 
+
getKeyStore() - Method in class org.bitcoinj.crypto.TrustStoreLoader.FileTrustStoreLoader
+
 
+
getKeyStore() - Method in interface org.bitcoinj.crypto.TrustStoreLoader
+
 
+
getLabel() - Method in class org.bitcoinj.uri.BitcoinURI
+
 
+
getLastBlockSeenHash() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns the hash of the last seen best-chain block, or null if the wallet is too old to store this data.
+
+
getLastBlockSeenHeight() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns the height of the last seen best-chain block.
+
+
getLastBlockSeenTime() - Method in class org.bitcoinj.wallet.Wallet
+
+
Deprecated. + +
+
+
getLastBlockSeenTimeSecs() - Method in class org.bitcoinj.wallet.Wallet
+
+
Deprecated. + +
+
+
getLastBroadcastedAt() - Method in class org.bitcoinj.core.TransactionConfidence
+
+ +
+
getLastBroadcastTime() - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Return the time the transaction was last announced to us, or empty if unknown.
+
+
getLastFilter() - Method in class org.bitcoinj.net.FilterMerger
+
 
+
getLastPingTime() - Method in class org.bitcoinj.core.Peer
+
+
Deprecated. + +
+
+
getLeafKeys() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns leaf keys issued by this chain (including lookahead zone)
+
+
getLegacy() - Static method in interface org.bitcoinj.base.AddressParser
+
+
Deprecated.
+
+
getLegacy(Network) - Static method in interface org.bitcoinj.base.AddressParser
+
+
Deprecated.
+
+
getLegacy(NetworkParameters) - Static method in interface org.bitcoinj.base.AddressParser
+
+
Deprecated.
+
+
getListeners() - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
getLocator() - Method in class org.bitcoinj.core.GetBlocksMessage
+
 
+
getLockTime() - Method in class org.bitcoinj.core.Transaction
+
+
Deprecated. + +
+
+
getLookaheadSize() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
The number of public keys we should pre-generate on each path before they are requested by the app.
+
+
getLookaheadSize() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Gets the current lookahead size being used for ALL deterministic key chains.
+
+
getLookaheadThreshold() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Gets the threshold for the key pre-generation.
+
+
getLookaheadThreshold() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Gets the current lookahead threshold being used for ALL deterministic key chains.
+
+
getMajorityEnforceBlockUpgrade() - Method in class org.bitcoinj.core.NetworkParameters
+
+
The number of blocks in the last NetworkParameters.getMajorityWindow() blocks + at which to trigger a notice to the user to upgrade their client, where + the client does not understand those blocks.
+
+
getMajorityRejectBlockOutdated() - Method in class org.bitcoinj.core.NetworkParameters
+
+
The number of blocks in the last NetworkParameters.getMajorityWindow() blocks + at which to enforce the requirement that all new blocks are of the + newer type (i.e.
+
+
getMajorityWindow() - Method in class org.bitcoinj.core.NetworkParameters
+
+
The sampling window from which the version numbers of blocks are taken + in order to determine if a new block version is now the majority.
+
+
getMaxConnections() - Method in class org.bitcoinj.core.PeerGroup
+
+
The maximum number of connections that we will create to peers.
+
+
getMaxMessageSize() - Method in class org.bitcoinj.core.PeerSocketHandler
+
 
+
getMaxMessageSize() - Method in interface org.bitcoinj.net.StreamConnection
+
+
Returns the maximum message size of a message on the socket.
+
+
getMaxMoney() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Deprecated. + +
+
+
getMaxMoney() - Method in class org.bitcoinj.params.BitcoinNetworkParams
+
+
Deprecated.
+
+
getMaxMoney() - Method in class org.bitcoinj.testing.MockAltNetworkParams
+
 
+
getMaxPeersToDiscoverCount() - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns the maximum number of Peers to discover.
+
+
getMaxTarget() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Maximum target represents the easiest allowable proof of work.
+
+
getMemo() - Method in class org.bitcoinj.core.Transaction
+
+
Returns the transaction Transaction.memo.
+
+
getMemo() - Method in class org.bitcoinj.protocols.payments.PaymentProtocol.Ack
+
+
Returns the memo included by the merchant in the payment ack.
+
+
getMemo() - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns the memo included by the merchant in the payment request, or null if not found.
+
+
getMemoryPool() - Method in class org.bitcoinj.core.PeerGroup
+
+
Deprecated.
+
+
getMerchantData() - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns the merchant data included by the merchant in the payment request, or null if none.
+
+
getMerkleRoot() - Method in class org.bitcoinj.core.Block
+
+
Returns the merkle root in big endian form, calculating it from transactions if necessary.
+
+
getMessage() - Method in class org.bitcoinj.uri.BitcoinURI
+
 
+
getMessageSize() - Method in interface org.bitcoinj.core.Message
+
+
Deprecated. + +
+
+
getMessageSize() - Method in class org.bitcoinj.core.PartialMerkleTree
+
+ +
+
getMessageSize() - Method in class org.bitcoinj.core.TransactionInput
+
+ +
+
getMessageSize() - Method in class org.bitcoinj.core.TransactionOutPoint
+
+
Deprecated. + +
+
+
getMessageSize() - Method in class org.bitcoinj.core.TransactionOutput
+
+ +
+
getMessageSize() - Method in class org.bitcoinj.core.TransactionWitness
+
+ +
+
getMessageSize(int) - Method in class org.bitcoinj.core.PeerAddress
+
+
Return the size of the serialized message, using a given protocol variant.
+
+
getMessageSizeForPriorityCalc() - Method in class org.bitcoinj.core.Transaction
+
+
The priority (coin age) calculation doesn't use the regular message size, but rather one adjusted downwards + for the number of inputs.
+
+
getMicroInstance() - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new microcoin-denominated formatter for the default locale.
+
+
getMicroInstance(int, int...) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new microcoin-denominated formatter with the specified fractional decimal + placing.
+
+
getMicroInstance(Locale) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new microcoin-denominated formatter for the given locale.
+
+
getMicroInstance(Locale, int, int...) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new microcoin-denominated formatter for the given locale with the specified + fractional decimal placing.
+
+
getMilliInstance() - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new millicoin-denominated formatter.
+
+
getMilliInstance(int, int...) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new millicoin-denominated formatter with the specified fractional decimal + placing.
+
+
getMilliInstance(Locale) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new millicoin-denominated formatter for the given locale.
+
+
getMilliInstance(Locale, int, int...) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new millicoin-denominated formatter for the given locale with the specified + fractional decimal placing.
+
+
getMinBroadcastConnections() - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns the number of connections that are required before transactions will be broadcast.
+
+
getMinNonDustValue() - Method in class org.bitcoinj.core.TransactionOutput
+
+
Returns the minimum value for this output to be considered "not dust", i.e.
+
+
getMinNonDustValue(Coin) - Method in class org.bitcoinj.core.TransactionOutput
+
+
Gets the minimum value for a txout of this size to be considered non-dust by Bitcoin Core + (and thus relayed).
+
+
getMinRequiredProtocolVersion() - Method in class org.bitcoinj.core.PeerGroup
+
+
The minimum protocol version required: defaults to the version required for Bloom filtering.
+
+
getMnemonic() - Method in enum class org.bitcoinj.script.ScriptError
+
 
+
getMnemonicCode() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns a list of words that represent the seed or null if this chain is a watching chain.
+
+
getMnemonicCode() - Method in class org.bitcoinj.wallet.DeterministicSeed
+
+
Get the mnemonic code, or null if unknown.
+
+
getMnemonicString() - Method in class org.bitcoinj.wallet.DeterministicSeed
+
+
Get the mnemonic code as string, or null if unknown.
+
+
getMonetaryFormat() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Deprecated. +
Get one another way or construct your own MonetaryFormat as needed.
+
+
+
getMonetaryFormat() - Method in class org.bitcoinj.params.BitcoinNetworkParams
+
+
Deprecated. +
Get one another way or construct your own MonetaryFormat as needed.
+
+
+
getMonetaryFormat() - Method in class org.bitcoinj.testing.MockAltNetworkParams
+
 
+
getMostCommonChainHeight() - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns our peers most commonly reported chain height.
+
+
getMostCommonChainHeight(List<Peer>) - Static method in class org.bitcoinj.core.PeerGroup
+
+
Returns most commonly reported chain height from the given list of Peers.
+
+
getNetworkParameters() - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Gets the params as read from the PaymentRequest.network field: main is the default if missing.
+
+
getNetworkParameters() - Method in class org.bitcoinj.wallet.Wallet
+
+
Deprecated. + +
+
+
getNewConnection(InetAddress, int) - Method in interface org.bitcoinj.net.StreamConnectionFactory
+
+
Returns a new handler or null to have the connection close.
+
+
getNonce() - Method in class org.bitcoinj.core.Block
+
+
Returns the nonce, an arbitrary value that exists only to make the hash of the block header fall below the + difficulty target.
+
+
getNonFinal() - Method in class org.bitcoinj.wallet.DefaultRiskAnalysis
+
+
Returns the transaction that was found to be non-final, or null.
+
+
getNonStandard() - Method in class org.bitcoinj.wallet.DefaultRiskAnalysis
+
+
Returns the transaction that was found to be non-standard, or null.
+
+
getNumberOfBytesRequiredToSpend(ECKey, Script) - Method in class org.bitcoinj.script.Script
+
+
Returns number of bytes required to spend this script.
+
+
getNumberOfSignaturesRequiredToSpend() - Method in class org.bitcoinj.script.Script
+
+
Returns number of signatures required to satisfy this script.
+
+
getNumChildren(HDPath) - Method in class org.bitcoinj.crypto.DeterministicHierarchy
+
 
+
getOnceUndoableStoredBlock(Sha256Hash) - Method in interface org.bitcoinj.store.FullPrunedBlockStore
+
+
Returns the StoredBlock that was added as a StoredUndoableBlock given a hash.
+
+
getOnceUndoableStoredBlock(Sha256Hash) - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
getOpCode(String) - Static method in class org.bitcoinj.script.ScriptOpCodes
+
+
Converts the given OpCodeName into an int
+
+
getOpCodeName(int) - Static method in class org.bitcoinj.script.ScriptOpCodes
+
+
Converts the given OpCode into a string (e.g.
+
+
getOpenTransactionOutputs(List<ECKey>) - Method in interface org.bitcoinj.core.UTXOProvider
+
+
Get the list of UTXO's for given keys.
+
+
getOpenTransactionOutputs(List<ECKey>) - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
getOrCreate() - Static method in class org.bitcoinj.core.Context
+
 
+
getOrCreate(Sha256Hash) - Method in class org.bitcoinj.core.TxConfidenceTable
+
+
Returns the TransactionConfidence for the given hash if we have downloaded it, or null if that tx hash + is unknown to the system at this time.
+
+
getOrCreate(NetworkParameters) - Static method in class org.bitcoinj.core.Context
+
+
Deprecated. + +
+
+
getOriginalSizeInBytes() - Method in class org.bitcoinj.base.VarInt
+
+
Returns the original number of bytes used to encode the value if it was + deserialized from a byte array, or the minimum encoded size if it was not.
+
+
getOrphanRoot(Sha256Hash) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
An orphan block is one that does not connect to the chain anywhere (ie we can't find its parent, therefore + it's an orphan).
+
+
getOutpoint() - Method in class org.bitcoinj.core.TransactionInput
+
 
+
getOutPointFor() - Method in class org.bitcoinj.core.TransactionOutput
+
+
Returns a new TransactionOutPoint, which is essentially a structure pointing to this output.
+
+
getOutput(long) - Method in class org.bitcoinj.core.Transaction
+
+
Same as getOutputs().get(index)
+
+
getOutput(TransactionOutPoint) - Method in class org.bitcoinj.core.Transaction
+
+
Gets the output the gihven outpoint is referring to.
+
+
getOutputs() - Method in class org.bitcoinj.core.Transaction
+
+
Returns an unmodifiable view of all outputs.
+
+
getOutputs() - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns the outputs of the payment request.
+
+
getOutputScriptType() - Method in interface org.bitcoinj.base.Address
+
+
Get the type of output script that will be used for sending to the address.
+
+
getOutputScriptType() - Method in class org.bitcoinj.base.LegacyAddress
+
+
Get the type of output script that will be used for sending to the address.
+
+
getOutputScriptType() - Method in class org.bitcoinj.base.SegwitAddress
+
+
Get the type of output script that will be used for sending to the address.
+
+
getOutputScriptType() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
getOutputSum() - Method in class org.bitcoinj.core.Transaction
+
+
Gets the sum of the outputs of the transaction.
+
+
getOverridingTxId() - Method in class org.bitcoinj.core.TransactionConfidence
+
+
If this transaction has been overridden by a double spend (is dead), this call returns the overriding transaction ID.
+
+
getP2SHHeader() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Deprecated.
+
+
getP2SHSigOpCount(byte[]) - Static method in class org.bitcoinj.script.Script
+
+
Gets the count of P2SH Sig Ops in the Script scriptSig
+
+
getPacketMagic() - Method in class org.bitcoinj.core.NetworkParameters
+
+
The header bytes that identify the start of a packet on this network.
+
+
getParameterByName(String) - Method in class org.bitcoinj.uri.BitcoinURI
+
 
+
getParameters() - Method in interface org.bitcoinj.base.Address
+
+
Deprecated. + +
+
+
getParameters() - Method in class org.bitcoinj.core.BitcoinSerializer
+
+
Deprecated.
+
+
getParameters() - Method in class org.bitcoinj.crypto.EncodedPrivateKey
+
+
Deprecated. + +
+
+
getParametersFromAddress(String) - Static method in class org.bitcoinj.base.LegacyAddress
+
+
Deprecated.
+
+
getParams() - Method in class org.bitcoinj.wallet.Wallet
+
+
Deprecated. + +
+
+
getParent() - Method in class org.bitcoinj.crypto.DeterministicKey
+
 
+
getParentFingerprint() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Return the fingerprint of the key from which this key was derived, if this is a + child key, or else an array of four zero-value bytes.
+
+
getParentTransaction() - Method in class org.bitcoinj.core.TransactionInput
+
 
+
getParentTransaction() - Method in class org.bitcoinj.core.TransactionOutput
+
+
Returns the transaction that owns this output.
+
+
getParentTransactionDepthInBlocks() - Method in class org.bitcoinj.core.TransactionOutput
+
+
Returns the depth in blocks of the parent tx.
+
+
getParentTransactionHash() - Method in class org.bitcoinj.core.TransactionOutput
+
+
Returns the transaction hash that owns this output.
+
+
getPartialMerkleTree() - Method in class org.bitcoinj.core.FilteredBlock
+
+
Returns the PartialMerkleTree object that provides the mathematical proof of transaction inclusion in the block.
+
+
getPassphrase() - Method in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
 
+
getPath() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Returns the path through some DeterministicHierarchy which reaches this keys position in the tree.
+
+
getPath(String) - Static method in class org.bitcoinj.utils.AppDataDirectory
+
+
Return the Path to the application data directory without making + sure it exists or creating it.
+
+
getPathAsString() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Returns the path of this key as a human-readable string starting with M or m to indicate the master key.
+
+
getPayment(List<Transaction>, Address, String) - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Generates a Payment message based on the information in the PaymentRequest.
+
+
getPaymentDetails() - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns the protobuf that describes the payment to be made.
+
+
getPaymentProtocolId() - Method in class org.bitcoinj.core.NetworkParameters
+
+ +
+
getPaymentProtocolId() - Method in class org.bitcoinj.params.BitcoinNetworkParams
+
+ +
+
getPaymentProtocolId() - Method in class org.bitcoinj.testing.MockAltNetworkParams
+
 
+
getPaymentRequest() - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns the protobuf that this object was instantiated with.
+
+
getPaymentRequestUrl() - Method in class org.bitcoinj.uri.BitcoinURI
+
 
+
getPaymentRequestUrls() - Method in class org.bitcoinj.uri.BitcoinURI
+
+
Returns the URLs where a payment request (as specified in BIP 70) may be fetched.
+
+
getPaymentUrl() - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns the payment url where the Payment message should be sent.
+
+
getPeer() - Method in class org.bitcoinj.net.discovery.SeedPeers
+
+
Acts as an iterator, returning the address of each node in the list sequentially.
+
+
getPeerBlockHeightDifference() - Method in class org.bitcoinj.core.Peer
+
+
Returns the difference between our best chain height and the peers, which can either be positive if we are + behind the peer, or negative if the peer is ahead of us.
+
+
getPeerMempoolTransaction(Sha256Hash) - Method in class org.bitcoinj.core.Peer
+
+
Asks the connected peer for the given transaction from its memory pool.
+
+
getPeers(long, long, TimeUnit) - Method in interface org.bitcoinj.net.discovery.PeerDiscovery
+
+ +
+
getPeers(long, Duration) - Method in class org.bitcoinj.net.discovery.DnsDiscovery.DnsSeedDiscovery
+
 
+
getPeers(long, Duration) - Method in class org.bitcoinj.net.discovery.MultiplexingDiscovery
+
 
+
getPeers(long, Duration) - Method in interface org.bitcoinj.net.discovery.PeerDiscovery
+
+
Queries for addresses.
+
+
getPeers(long, Duration) - Method in class org.bitcoinj.net.discovery.SeedPeers
+
+
Returns all the Bitcoin nodes within the list.
+
+
getPeerVersionMessage() - Method in class org.bitcoinj.core.Peer
+
+
Returns version data announced by the remote peer.
+
+
getPendingPeers() - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns a list containing Peers that did not complete connection yet.
+
+
getPendingTransactions() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns an immutable view of the transactions currently waiting for network confirmations.
+
+
getPingIntervalMsec() - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns the period between pings for an individual peer.
+
+
getPingTime() - Method in class org.bitcoinj.core.Peer
+
+
Deprecated. + +
+
+
getPolicy() - Static method in class org.bitcoinj.utils.Threading
+
 
+
getPool() - Method in class org.bitcoinj.wallet.WalletTransaction
+
 
+
getPoolSize(WalletTransaction.Pool) - Method in class org.bitcoinj.wallet.Wallet
+
 
+
getPort() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Default TCP port on which to connect to nodes
+
+
getPort() - Method in class org.bitcoinj.core.PeerAddress
+
 
+
getPrev(BlockStore) - Method in class org.bitcoinj.core.StoredBlock
+
+
Given a block store, looks up the previous block in this chain.
+
+
getPrevBlockHash() - Method in class org.bitcoinj.core.Block
+
+
Returns the hash of the previous block in the chain, as defined by the block header.
+
+
getPrivateKeyAsHex() - Method in class org.bitcoinj.crypto.ECKey
+
 
+
getPrivateKeyAsWiF(Network) - Method in class org.bitcoinj.crypto.ECKey
+
 
+
getPrivateKeyAsWiF(NetworkParameters) - Method in class org.bitcoinj.crypto.ECKey
+
+ +
+
getPrivateKeyEncoded(Network) - Method in class org.bitcoinj.crypto.ECKey
+
+
Exports the private key in the form used by Bitcoin Core's "dumpprivkey" and "importprivkey" commands.
+
+
getPrivateKeyEncoded(NetworkParameters) - Method in class org.bitcoinj.crypto.ECKey
+
+ +
+
getPrivKey() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Returns the private key of this deterministic key.
+
+
getPrivKey() - Method in class org.bitcoinj.crypto.ECKey
+
+
Gets the private key in the form of an integer field element.
+
+
getPrivKeyBytes() - Method in class org.bitcoinj.crypto.ECKey
+
+
Returns a 32 byte array containing the private key.
+
+
getPrivKeyBytes33() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Returns private key bytes, padded with zeros to 33 bytes.
+
+
getProgram() - Method in class org.bitcoinj.script.Script
+
+
Deprecated. + +
+
+
getProtocolVersion() - Method in class org.bitcoinj.core.BitcoinSerializer
+
 
+
getProtocolVersion() - Method in class org.bitcoinj.core.MessageSerializer
+
+
Get the protocol version of this serializer.
+
+
getProtocolVersionNum(ProtocolVersion) - Method in class org.bitcoinj.core.NetworkParameters
+
+
Deprecated. + +
+
+
getPubKey() - Method in class org.bitcoinj.crypto.ECKey
+
+
Gets the raw public key value.
+
+
getPubKeyHash() - Method in class org.bitcoinj.crypto.ECKey
+
+
Gets the hash160 form of the public key (as seen in addresses).
+
+
getPubKeyHash() - Method in class org.bitcoinj.script.Script
+
+
If the program somehow pays to a hash, returns the hash.
+
+
getPubKeyPoint() - Method in class org.bitcoinj.crypto.ECKey
+
+
Gets the public key in the form of an elliptic curve point object from Bouncy Castle.
+
+
getPubKeys() - Method in class org.bitcoinj.script.Script
+
+
Returns a list of the keys required by this script, assuming a multi-sig script.
+
+
getPublicKeyAsHex() - Method in class org.bitcoinj.crypto.ECKey
+
 
+
getPurpose() - Method in class org.bitcoinj.core.Transaction
+
+
Returns the purpose for which this transaction was created.
+
+
getPush(int) - Method in class org.bitcoinj.core.TransactionWitness
+
 
+
getPushCount() - Method in class org.bitcoinj.core.TransactionWitness
+
 
+
getPushDataName(int) - Static method in class org.bitcoinj.script.ScriptOpCodes
+
+
Converts the given pushdata OpCode into a string (e.g.
+
+
getReasonCode() - Method in class org.bitcoinj.core.RejectMessage
+
+
Deprecated. + +
+
+
getReasonString() - Method in class org.bitcoinj.core.RejectMessage
+
+
Deprecated. + +
+
+
getRecentTransactions(int, boolean) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns an list of N transactions, ordered by increasing age.
+
+
getRedeemData(DeterministicKey) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Get redeem data for a key.
+
+
getReferenceClientBlockFileList() - Static method in class org.bitcoinj.utils.BlockFileLoader
+
 
+
getReferenceClientBlockFileList(File) - Static method in class org.bitcoinj.utils.BlockFileLoader
+
+
Gets the list of files which contain blocks from Bitcoin Core.
+
+
getRejectedMessage() - Method in class org.bitcoinj.core.RejectMessage
+
+ +
+
getRejectedObjectHash() - Method in class org.bitcoinj.core.RejectMessage
+
+ +
+
getRejectMessage() - Method in exception org.bitcoinj.core.RejectedTransactionException
+
+
Return the RejectMessage object representing the broadcast rejection.
+
+
getRetryTime() - Method in class org.bitcoinj.utils.ExponentialBackoff
+
+ +
+
getReversedBytes() - Method in class org.bitcoinj.base.Sha256Hash
+
+
Deprecated. + +
+
+
getRiskAnalyzer() - Method in class org.bitcoinj.wallet.Wallet
+
+
Gets the current RiskAnalysis implementation.
+
+
getRootKey() - Method in class org.bitcoinj.crypto.DeterministicHierarchy
+
+
Returns the root key that the DeterministicHierarchy was created with.
+
+
getRootKey() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
getScript() - Method in class org.bitcoinj.core.UTXO
+
+
The Script object which you can use to get address, script bytes or script type.
+
+
getScriptBytes() - Method in class org.bitcoinj.core.TransactionInput
+
+
The "script bytes" might not actually be a script.
+
+
getScriptBytes() - Method in class org.bitcoinj.core.TransactionOutput
+
+
The backing script bytes which can be turned into a Script object.
+
+
getScriptPubKey() - Method in class org.bitcoinj.core.TransactionOutput
+
 
+
getScriptSig() - Method in class org.bitcoinj.core.TransactionInput
+
+
Returns the script that is fed to the referenced output (scriptPubKey) script in order to satisfy it: usually + contains signatures and maybe keys, but can contain arbitrary data if the output script accepts it.
+
+
getScriptSigWithSignature(Script, byte[], int) - Method in class org.bitcoinj.script.Script
+
+
Returns a copy of the given scriptSig with the signature inserted in the given position.
+
+
getScriptType() - Method in class org.bitcoinj.script.Script
+
+
Get the ScriptType.
+
+
getScryptParameters() - Method in class org.bitcoinj.crypto.KeyCrypterScrypt
+
 
+
getSecretBytes() - Method in class org.bitcoinj.crypto.DeterministicKey
+
 
+
getSecretBytes() - Method in class org.bitcoinj.crypto.ECKey
+
+
A wrapper for ECKey.getPrivKeyBytes() that returns null if the private key bytes are missing or would have + to be derived (for the HD key case).
+
+
getSecretBytes() - Method in interface org.bitcoinj.crypto.EncryptableItem
+
+
Returns the raw bytes of the item, if not encrypted, or null if encrypted or the secret is missing.
+
+
getSecretBytes() - Method in class org.bitcoinj.wallet.DeterministicSeed
+
 
+
getSeed() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns the seed or null if this chain is a watching chain.
+
+
getSeedBytes() - Method in class org.bitcoinj.wallet.DeterministicSeed
+
 
+
getSegwitAddressHrp() - Method in class org.bitcoinj.core.NetworkParameters
+
+ +
+
getSendRequest() - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns a SendRequest suitable for broadcasting to the network.
+
+
getSequenceNumber() - Method in class org.bitcoinj.core.TransactionInput
+
+
Sequence numbers allow participants in a multi-party transaction signing protocol to create new versions of the + transaction independently of each other.
+
+
getSerializer() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Construct and return a custom serializer.
+
+
getSerializer() - Method in class org.bitcoinj.params.BitcoinNetworkParams
+
 
+
getSerializer() - Method in class org.bitcoinj.testing.MockAltNetworkParams
+
 
+
getServices() - Method in class org.bitcoinj.core.PeerAddress
+
 
+
getSigInsertionIndex(Sha256Hash, ECKey) - Method in class org.bitcoinj.script.Script
+
+
Returns the index where a signature by the key should be inserted.
+
+
getSignature(Sha256Hash, List<ChildNumber>) - Method in class org.bitcoinj.signers.CustomTransactionSigner
+
 
+
getSigOpCount() - Method in class org.bitcoinj.core.Transaction
+
+
Gets the count of regular SigOps in this transactions
+
+
getSigOpCount(byte[]) - Static method in class org.bitcoinj.script.Script
+
+
Gets the count of regular SigOps in the script program (counting multisig ops as 20)
+
+
getSigsRequiredToSpend() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns the number of signatures required to spend transactions for this KeyChain.
+
+
getSizeInBytes() - Method in class org.bitcoinj.base.VarInt
+
+
Returns the minimum encoded size of the value.
+
+
getSocketAddress() - Method in class org.bitcoinj.core.PeerAddress
+
 
+
getSource() - Method in class org.bitcoinj.core.TransactionConfidence
+
+
The source of a transaction tries to identify where it came from originally.
+
+
getSpendableCoinbaseDepth() - Method in class org.bitcoinj.core.NetworkParameters
+
 
+
getSpentBy() - Method in class org.bitcoinj.core.TransactionOutput
+
+
Returns the connected input.
+
+
getStopHash() - Method in class org.bitcoinj.core.GetBlocksMessage
+
 
+
getStoredBlockInCurrentScope(Sha256Hash) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
For a standard BlockChain, this should return blockStore.get(hash), + for a FullPrunedBlockChain blockStore.getOnceUndoableStoredBlock(hash)
+
+
getStoredBlockInCurrentScope(Sha256Hash) - Method in class org.bitcoinj.core.BlockChain
+
 
+
getStoredBlockInCurrentScope(Sha256Hash) - Method in class org.bitcoinj.core.FullPrunedBlockChain
+
 
+
getStoredOutputsFromUTXOProvider() - Method in class org.bitcoinj.wallet.Wallet
+
+
Get all the UTXO's from the UTXOProvider based on keys that the + wallet contains.
+
+
getSubsidyDecreaseBlockCount() - Method in class org.bitcoinj.core.NetworkParameters
+
 
+
getSymbolInstance() - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new auto-denominating instance that will indicate units using a currency + symbol, for example, "฿".
+
+
getSymbolInstance(int) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new symbol-style auto-formatter with the given number of fractional decimal + places.
+
+
getSymbolInstance(Locale) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new symbol-style auto-formatter for the given locale.
+
+
getSymbolInstance(Locale, int) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Return a new symbol-style auto-formatter for the given locale with the given number of + fraction places.
+
+
getTag(String) - Method in class org.bitcoinj.utils.BaseTaggableObject
+
+
Deprecated.
+
+
getTag(String) - Method in interface org.bitcoinj.utils.TaggableObject
+
+
Deprecated.
+
+
getTags() - Method in class org.bitcoinj.utils.BaseTaggableObject
+
+
Deprecated.
+
+
getTags() - Method in interface org.bitcoinj.utils.TaggableObject
+
+
Deprecated.
+
+
getTargetTimespan() - Method in class org.bitcoinj.core.NetworkParameters
+
+
How much time in seconds is supposed to pass between "interval" blocks.
+
+
getThrows() - Method in interface org.bitcoinj.base.internal.FutureUtils.ThrowingSupplier
+
+
Gets a result.
+
+
getTime() - Method in class org.bitcoinj.core.Block
+
+
Deprecated. + +
+
+
getTime() - Method in class org.bitcoinj.core.PeerAddress
+
+
Deprecated. + +
+
+
getTimeSeconds() - Method in class org.bitcoinj.core.Block
+
+
Deprecated. + +
+
+
getToAddress(Network) - Method in class org.bitcoinj.script.Script
+
+
Gets the destination address from this script, if it's in the required form.
+
+
getToAddress(Network, boolean) - Method in class org.bitcoinj.script.Script
+
+
Gets the destination address from this script, if it's in the required form.
+
+
getToAddress(NetworkParameters) - Method in class org.bitcoinj.script.Script
+
+
Deprecated. + +
+
+
getToAddress(NetworkParameters, boolean) - Method in class org.bitcoinj.script.Script
+
+ +
+
getTotalReceived() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns the amount of bitcoin ever received via output.
+
+
getTotalSent() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns the amount of bitcoin ever sent via output.
+
+
getTransaction() - Method in exception org.bitcoinj.core.RejectedTransactionException
+
+
Return the original Transaction object whose broadcast was rejected.
+
+
getTransaction() - Method in class org.bitcoinj.wallet.WalletTransaction
+
 
+
getTransaction(Sha256Hash) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns a transaction object given its hash, if it exists in this wallet, or null otherwise.
+
+
getTransactionCount() - Method in class org.bitcoinj.core.FilteredBlock
+
+
Number of transactions in this block, before it was filtered
+
+
getTransactionCount() - Method in class org.bitcoinj.core.PartialMerkleTree
+
 
+
getTransactionHash() - Method in class org.bitcoinj.core.TransactionConfidence
+
 
+
getTransactionHashes() - Method in class org.bitcoinj.core.FilteredBlock
+
+
Gets a list of leaf hashes which are contained in the partial merkle tree in this filtered block
+
+
getTransactionOutput(Sha256Hash, long) - Method in interface org.bitcoinj.store.FullPrunedBlockStore
+
+
Gets a UTXO with the given hash and index, or null if none is found
+
+
getTransactionOutput(Sha256Hash, long) - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
getTransactionPool(WalletTransaction.Pool) - Method in interface org.bitcoinj.core.TransactionBag
+
+
Returns transactions from a specific pool.
+
+
getTransactionPool(WalletTransaction.Pool) - Method in class org.bitcoinj.wallet.Wallet
+
 
+
getTransactions() - Method in class org.bitcoinj.core.Block
+
+
Returns an unmodifiable list of transactions held in this block, or null if this object represents just a header.
+
+
getTransactions() - Method in class org.bitcoinj.core.StoredUndoableBlock
+
+
Get the full list of transactions if it is stored, otherwise null.
+
+
getTransactions(boolean) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns a set of all transactions in the wallet.
+
+
getTransactionsByTime() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns all non-dead, active transactions ordered by recency.
+
+
getTransactionSigners() - Method in class org.bitcoinj.wallet.Wallet
+
 
+
getTransactionVerificationFlags(Block, Transaction, VersionTally, Integer) - Method in class org.bitcoinj.core.NetworkParameters
+
+
The flags indicating which script validation tests should be applied to + the given transaction.
+
+
getTxId() - Method in class org.bitcoinj.core.Transaction
+
+
Returns the transaction id as you see them in block explorers.
+
+
getTxnHashAndMerkleRoot(List<Sha256Hash>) - Method in class org.bitcoinj.core.PartialMerkleTree
+
+
Extracts tx hashes that are in this merkle tree + and returns the merkle root of this tree.
+
+
getTxOutChanges() - Method in class org.bitcoinj.core.StoredUndoableBlock
+
+
Get the transaction output changes if they have been calculated, otherwise null.
+
+
getUnderstoodEncryptionType() - Method in interface org.bitcoinj.crypto.KeyCrypter
+
+
Return the EncryptionType enum value which denotes the type of encryption/ decryption that this KeyCrypter + can understand.
+
+
getUnderstoodEncryptionType() - Method in class org.bitcoinj.crypto.KeyCrypterScrypt
+
+
Return the EncryptionType enum value which denotes the type of encryption/ decryption that this KeyCrypter + can understand.
+
+
getUndoBlock(Sha256Hash) - Method in interface org.bitcoinj.store.FullPrunedBlockStore
+
+
Returns a StoredUndoableBlock whose block.getHash() method will be equal to the parameter.
+
+
getUndoBlock(Sha256Hash) - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
getUninterruptibly(Future<V>) - Static method in class org.bitcoinj.base.internal.InternalUtils
+
+
Get a future's value uninterruptibly by temporarily ignoring InterruptedException, but making + sure we re-set the thread's interrupt status, so higher-level code on the thread can handle the + interruption properly.
+
+
getUnits() - Method in class org.bitcoinj.base.internal.Stopwatch
+
 
+
getUnspents() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns a copy of the internal unspent outputs list
+
+
getUpdateFlag() - Method in class org.bitcoinj.core.BloomFilter
+
+
The update flag controls how application of the filter to a block modifies the filter.
+
+
getUpdateTime() - Method in class org.bitcoinj.core.Transaction
+
+
Deprecated. + +
+
+
getUriScheme() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Deprecated. + +
+
+
getUriScheme() - Method in class org.bitcoinj.params.BitcoinNetworkParams
+
+
Deprecated.
+
+
getUriScheme() - Method in class org.bitcoinj.testing.MockAltNetworkParams
+
 
+
getUseLocalhostPeerWhenPossible() - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
getUTXOProvider() - Method in class org.bitcoinj.wallet.Wallet
+
+
Get the UTXOProvider.
+
+
getValue() - Method in class org.bitcoinj.base.Coin
+
+
Returns the number of satoshis of this monetary value.
+
+
getValue() - Method in interface org.bitcoinj.base.Monetary
+
+
Returns the number of "smallest units" of this monetary value.
+
+
getValue() - Method in class org.bitcoinj.base.utils.Fiat
+
+
Returns the number of "smallest units" of this monetary value.
+
+
getValue() - Method in enum class org.bitcoinj.core.TransactionConfidence.ConfidenceType
+
 
+
getValue() - Method in class org.bitcoinj.core.TransactionInput
+
 
+
getValue() - Method in class org.bitcoinj.core.TransactionOutput
+
+
Returns the value of this output.
+
+
getValue() - Method in class org.bitcoinj.core.UTXO
+
+
The value which this Transaction output holds.
+
+
getValue() - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns the total amount of bitcoins requested.
+
+
getValue(TransactionBag) - Method in class org.bitcoinj.core.Transaction
+
+ +
+
getValueSentFromMe(TransactionBag) - Method in class org.bitcoinj.core.Transaction
+
+
Calculates the sum of the inputs that are spending coins with keys in the wallet.
+
+
getValueSentToMe(TransactionBag) - Method in class org.bitcoinj.core.Transaction
+
+
Calculates the sum of the outputs that are sending coins to a key in the wallet.
+
+
getVerifiedChainHead() - Method in interface org.bitcoinj.store.FullPrunedBlockStore
+
+
Returns the StoredBlock that represents the top of the chain of greatest total work that has + been fully verified and the point in the chain at which the unspent transaction output set in this + store represents.
+
+
getVerifiedChainHead() - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
getVersion() - Method in class org.bitcoinj.base.LegacyAddress
+
+
Get the version header of an address.
+
+
getVersion() - Method in class org.bitcoinj.core.Block
+
+
Returns the version of the block data structure as defined by the Bitcoin protocol.
+
+
getVersion() - Method in class org.bitcoinj.core.Transaction
+
 
+
getVersion() - Method in class org.bitcoinj.wallet.Wallet
+
+
Get the version of the Wallet.
+
+
getVersionHandshakeFuture() - Method in class org.bitcoinj.core.Peer
+
 
+
getVersionMessage() - Method in class org.bitcoinj.core.Peer
+
+
Returns version data we announce to our remote peers.
+
+
getVersionMessage() - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns the version message provided by setVersionMessage or a default if none was given.
+
+
getVersionTally() - Method in class org.bitcoinj.core.AbstractBlockChain
+
 
+
getVsize() - Method in class org.bitcoinj.core.Transaction
+
+
Gets the virtual transaction size as defined in BIP141.
+
+
getWallet() - Method in class org.bitcoinj.wallet.WalletFiles
+
+
Get the Wallet this WalletFiles is managing.
+
+
getWalletExtensionID() - Method in interface org.bitcoinj.wallet.WalletExtension
+
+
Returns a Java package/class style name used to disambiguate this extension from others.
+
+
getWalletOutputs(TransactionBag) - Method in class org.bitcoinj.core.Transaction
+
+
Returns the list of transacion outputs, whether spent or unspent, that match a wallet by address or that are + watched by a wallet, i.e., transaction outputs whose script's address is controlled by the wallet and transaction + outputs whose script is watched by the wallet.
+
+
getWalletTransactions() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns a set of all WalletTransactions in the wallet.
+
+
getWatchedAddresses() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns all addresses watched by this wallet.
+
+
getWatchedOutputs(boolean) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns all the outputs that match addresses or scripts added via Wallet.addWatchedAddress(Address) or + Wallet.addWatchedScripts(java.util.List).
+
+
getWatchedScripts() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns a snapshot of the watched scripts.
+
+
getWatchingKey() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
An alias for getKeyByPath(getAccountPath()).
+
+
getWatchingKey() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns a public-only DeterministicKey that can be used to set up a watching wallet: that is, a wallet that + can import transactions from the block chain just as the normal wallet can, but which cannot spend.
+
+
getWeight() - Method in class org.bitcoinj.core.Transaction
+
+
Gets the transaction weight as defined in BIP141.
+
+
getWitness() - Method in class org.bitcoinj.core.TransactionInput
+
+
Get the transaction witness of this input.
+
+
getWitnessProgram() - Method in class org.bitcoinj.base.SegwitAddress
+
+
Returns the witness program in decoded form.
+
+
getWitnessRoot() - Method in class org.bitcoinj.core.Block
+
+
Returns the witness root in big endian form, calculating it from transactions if necessary.
+
+
getWitnessVersion() - Method in class org.bitcoinj.base.SegwitAddress
+
+
Returns the witness version in decoded form.
+
+
getWordList() - Method in class org.bitcoinj.crypto.MnemonicCode
+
+
Gets the word list this code uses.
+
+
getWork() - Method in class org.bitcoinj.core.Block
+
+
Returns the work represented by this block.
+
+
getWTxId() - Method in class org.bitcoinj.core.Transaction
+
+
Returns the witness transaction id (aka witness id) as per BIP144.
+
+
getX() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
getXCoord() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
getY() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
getYCoord() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
getZCoord(int) - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
getZCoords() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
+

H

+
+
handleNewPeer(Peer) - Method in class org.bitcoinj.core.PeerGroup
+
 
+
handlePeerDeath(Peer, Throwable) - Method in class org.bitcoinj.core.PeerGroup
+
 
+
HARDENED_BIT - Static variable in class org.bitcoinj.crypto.ChildNumber
+
+
The bit that's set in the child number to indicate whether this key is "hardened".
+
+
has(long) - Method in class org.bitcoinj.core.Services
+
+
Checks if given specific node services are signaled by this bitfield.
+
+
hasAny() - Method in class org.bitcoinj.core.Services
+
+
Checks if this bitfield signals any node services at all.
+
+
hasConfidence() - Method in class org.bitcoinj.core.Transaction
+
+
Check if the transaction has a known confidence
+
+
hash - Variable in class org.bitcoinj.core.InventoryItem
+
 
+
hash() - Method in class org.bitcoinj.core.TransactionOutPoint
+
+
Returns the hash of the transaction this outpoint references/spends/is connected to.
+
+
hash(byte[]) - Static method in class org.bitcoinj.base.Sha256Hash
+
+
Calculates the SHA-256 hash of the given bytes.
+
+
hash(byte[], int, int) - Static method in class org.bitcoinj.base.Sha256Hash
+
+
Calculates the SHA-256 hash of the given byte range.
+
+
hashCode() - Method in class org.bitcoinj.base.Coin
+
 
+
hashCode() - Method in class org.bitcoinj.base.internal.ByteArray
+
hashCode() - Method in class org.bitcoinj.base.LegacyAddress
+
 
+
hashCode() - Method in class org.bitcoinj.base.SegwitAddress
+
 
+
hashCode() - Method in class org.bitcoinj.base.Sha256Hash
+
+
Returns the last four bytes of the wrapped hash.
+
+
hashCode() - Method in class org.bitcoinj.base.utils.Fiat
+
 
+
hashCode() - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
 
+
hashCode() - Method in class org.bitcoinj.base.VarInt
+
 
+
hashCode() - Method in class org.bitcoinj.core.Block
+
 
+
hashCode() - Method in class org.bitcoinj.core.BlockLocator
+
 
+
hashCode() - Method in class org.bitcoinj.core.BloomFilter
+
 
+
hashCode() - Method in class org.bitcoinj.core.FilteredBlock
+
 
+
hashCode() - Method in class org.bitcoinj.core.GetBlocksMessage
+
 
+
hashCode() - Method in class org.bitcoinj.core.GetHeadersMessage
+
 
+
hashCode() - Method in class org.bitcoinj.core.InventoryItem
+
 
+
hashCode() - Method in class org.bitcoinj.core.ListMessage
+
 
+
hashCode() - Method in class org.bitcoinj.core.LockTime
+
 
+
hashCode() - Method in class org.bitcoinj.core.NetworkParameters
+
 
+
hashCode() - Method in class org.bitcoinj.core.PartialMerkleTree
+
 
+
hashCode() - Method in class org.bitcoinj.core.PeerAddress
+
 
+
hashCode() - Method in class org.bitcoinj.core.RejectMessage
+
 
+
hashCode() - Method in class org.bitcoinj.core.Services
+
 
+
hashCode() - Method in class org.bitcoinj.core.StoredBlock
+
 
+
hashCode() - Method in class org.bitcoinj.core.StoredUndoableBlock
+
 
+
hashCode() - Method in class org.bitcoinj.core.Transaction
+
 
+
hashCode() - Method in class org.bitcoinj.core.TransactionInput
+
 
+
hashCode() - Method in class org.bitcoinj.core.TransactionOutPoint
+
 
+
hashCode() - Method in class org.bitcoinj.core.TransactionOutput
+
 
+
hashCode() - Method in class org.bitcoinj.core.TransactionWitness
+
 
+
hashCode() - Method in class org.bitcoinj.core.UTXO
+
 
+
hashCode() - Method in class org.bitcoinj.core.VersionMessage
+
 
+
hashCode() - Method in class org.bitcoinj.crypto.ChildNumber
+
 
+
hashCode() - Method in class org.bitcoinj.crypto.DeterministicKey
+
 
+
hashCode() - Method in class org.bitcoinj.crypto.ECKey.ECDSASignature
+
 
+
hashCode() - Method in class org.bitcoinj.crypto.ECKey
+
 
+
hashCode() - Method in class org.bitcoinj.crypto.EncodedPrivateKey
+
 
+
hashCode() - Method in class org.bitcoinj.crypto.EncryptedData
+
 
+
hashCode() - Method in class org.bitcoinj.crypto.KeyCrypterScrypt
+
 
+
hashCode() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
hashCode() - Method in class org.bitcoinj.script.Script
+
 
+
hashCode() - Method in class org.bitcoinj.script.ScriptChunk
+
 
+
hashCode() - Method in class org.bitcoinj.utils.BtcFixedFormat
+
+
Return a hash code value for this instance.
+
+
hashCode() - Method in class org.bitcoinj.utils.BtcFormat
+
+
Return a hash code value for this instance.
+
+
hashCode() - Method in class org.bitcoinj.utils.ExchangeRate
+
 
+
hashCode() - Method in class org.bitcoinj.wallet.DeterministicSeed
+
 
+
hashForSignature(int, byte[], byte) - Method in class org.bitcoinj.core.Transaction
+
+
This is required for signatures which use a sigHashType which cannot be represented using SigHash and anyoneCanPay + See transaction c99c49da4c38af669dea436d3e73780dfdb6c1ecf9958baa52960e8baee30e73, which has sigHashType 0
+
+
hashForSignature(int, byte[], Transaction.SigHash, boolean) - Method in class org.bitcoinj.core.Transaction
+
+
Calculates a signature hash, that is, a hash of a simplified form of the transaction.
+
+
hashForSignature(int, Script, Transaction.SigHash, boolean) - Method in class org.bitcoinj.core.Transaction
+
+
Calculates a signature hash, that is, a hash of a simplified form of the transaction.
+
+
hashForWitnessSignature(int, byte[], Coin, byte) - Method in class org.bitcoinj.core.Transaction
+
 
+
hashForWitnessSignature(int, byte[], Coin, Transaction.SigHash, boolean) - Method in class org.bitcoinj.core.Transaction
+
 
+
hashForWitnessSignature(int, Script, Coin, Transaction.SigHash, boolean) - Method in class org.bitcoinj.core.Transaction
+
+
Calculates a signature hash, that is, a hash of a simplified form of the transaction.
+
+
hashToByteString(Sha256Hash) - Static method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
 
+
hashTwice(byte[]) - Static method in class org.bitcoinj.base.Sha256Hash
+
+
Calculates the SHA-256 hash of the given bytes, + and then hashes the resulting hash again.
+
+
hashTwice(byte[], byte[]) - Static method in class org.bitcoinj.base.Sha256Hash
+
+
Calculates the hash of hash on the given chunks of bytes.
+
+
hashTwice(byte[], int, int) - Static method in class org.bitcoinj.base.Sha256Hash
+
+
Calculates the SHA-256 hash of the given byte range, + and then hashes the resulting hash again.
+
+
hashTwice(byte[], int, int, byte[], int, int) - Static method in class org.bitcoinj.base.Sha256Hash
+
+
Calculates the hash of hash on the given byte ranges.
+
+
hasKey(ECKey) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
hasKey(ECKey) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
hasKey(ECKey) - Method in interface org.bitcoinj.wallet.KeyChain
+
+
Returns true if the given key is in the chain.
+
+
hasKey(ECKey) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
 
+
hasKey(ECKey) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns true if the given key is in the wallet, false otherwise.
+
+
hasLotAndSequence - Variable in class org.bitcoinj.crypto.BIP38PrivateKey
+
 
+
hasMaxMoney() - Method in enum class org.bitcoinj.base.BitcoinNetwork
+
 
+
hasMaxMoney() - Method in interface org.bitcoinj.base.Network
+
+
Does this network have a fixed maximum number of coins
+
+
hasMaxMoney() - Method in class org.bitcoinj.core.NetworkParameters
+
+
Deprecated. + +
+
+
hasMaxMoney() - Method in class org.bitcoinj.params.BitcoinNetworkParams
+
+
Deprecated.
+
+
hasMaxMoney() - Method in class org.bitcoinj.testing.MockAltNetwork
+
 
+
hasMaxMoney() - Method in class org.bitcoinj.testing.MockAltNetworkParams
+
 
+
hasNext() - Method in class org.bitcoinj.utils.BlockFileLoader.BlockFileIterator
+
 
+
hasNonce() - Method in class org.bitcoinj.core.Ping
+
+
Deprecated. +
returns true
+
+
+
hasPrivateKey - Variable in class org.bitcoinj.crypto.HDPath
+
 
+
hasPrivateKey() - Method in class org.bitcoinj.crypto.HDPath
+
+
Is this a path to a private key?
+
+
hasPrivKey() - Method in class org.bitcoinj.crypto.DeterministicKey
+
 
+
hasPrivKey() - Method in class org.bitcoinj.crypto.ECKey
+
+
Returns true if this key has unencrypted access to private key bytes.
+
+
hasRelativeLockTime() - Method in class org.bitcoinj.core.Transaction
+
+
A transaction has a relative lock time + (BIP 68) if it is version 2 or + higher and at least one of its inputs has its TransactionInput.SEQUENCE_LOCKTIME_DISABLE_FLAG cleared.
+
+
hasRelativeLockTime() - Method in class org.bitcoinj.core.TransactionInput
+
+
Returns whether this input, if it belongs to a version 2 (or higher) transaction, has + relative lock-time enabled.
+
+
hasSequence() - Method in class org.bitcoinj.core.TransactionInput
+
 
+
hasTransactions() - Method in class org.bitcoinj.core.Block
+
+
Return whether this block contains any transactions.
+
+
hasUnspentOutputs(Sha256Hash, int) - Method in interface org.bitcoinj.store.FullPrunedBlockStore
+
+
True if this store has any unspent outputs from a transaction with a hash equal to the first parameter
+
+
hasUnspentOutputs(Sha256Hash, int) - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
hasWitness() - Method in class org.bitcoinj.core.TransactionInput
+
+
Determine if the transaction has witnesses.
+
+
hasWitnesses() - Method in class org.bitcoinj.core.Transaction
+
 
+
HDDerivationException - Exception in org.bitcoinj.crypto
+
 
+
HDDerivationException(String) - Constructor for exception org.bitcoinj.crypto.HDDerivationException
+
 
+
HDKeyDerivation - Class in org.bitcoinj.crypto
+
+
Implementation of the BIP 32 + deterministic wallet child key generation algorithm.
+
+
HDKeyDerivation.PublicDeriveMode - Enum Class in org.bitcoinj.crypto
+
 
+
HDKeyDerivation.RawKeyBytes - Class in org.bitcoinj.crypto
+
 
+
HDPath - Class in org.bitcoinj.crypto
+
+
HD Key derivation path.
+
+
HDPath(boolean, List<ChildNumber>) - Constructor for class org.bitcoinj.crypto.HDPath
+
+
Constructs a path for a public or private key.
+
+
HDPath(List<ChildNumber>) - Constructor for class org.bitcoinj.crypto.HDPath
+
+
Deprecated. + +
+
+
HDUtils - Class in org.bitcoinj.crypto
+
+
Static utilities used in BIP 32 Hierarchical Deterministic Wallets (HDW).
+
+
HDUtils() - Constructor for class org.bitcoinj.crypto.HDUtils
+
 
+
header - Variable in class org.bitcoinj.core.BitcoinSerializer.BitcoinPacketHeader
+
 
+
HEADER_LENGTH - Static variable in class org.bitcoinj.core.BitcoinSerializer.BitcoinPacketHeader
+
+
The largest number of bytes that a header can represent
+
+
HEADER_MAGIC - Static variable in class org.bitcoinj.store.SPVBlockStore
+
+
Deprecated.
+
+
HEADER_SIZE - Static variable in class org.bitcoinj.core.Block
+
+
How many bytes are required to represent a block header WITHOUT the trailing 00 length byte.
+
+
headerByte() - Method in enum class org.bitcoinj.base.LegacyAddress.AddressHeader
+
 
+
headerByte() - Method in enum class org.bitcoinj.base.LegacyAddress.P2SHHeader
+
 
+
HeadersMessage - Class in org.bitcoinj.core
+
+
A protocol message that contains a repeated series of block headers, sent in response to the "getheaders" command.
+
+
HeadersMessage(List<Block>) - Constructor for class org.bitcoinj.core.HeadersMessage
+
 
+
HeadersMessage(Block...) - Constructor for class org.bitcoinj.core.HeadersMessage
+
 
+
HEIGHT_IN_COINBASE - Enum constant in enum class org.bitcoinj.core.Block.VerifyFlag
+
+
Check that block height is in coinbase transaction (BIP 34).
+
+
HEX - Static variable in class org.bitcoinj.base.internal.ByteUtils
+
+
Deprecated. +
Use ByteUtils.hexFormat or ByteUtils.parseHex(String) or other available + options.
+
+
+
HexFormat - Class in org.bitcoinj.base.internal
+
+
This class implements a subset of the functionality of the HexFormat class available in Java 17 and later.
+
+
HexFormat() - Constructor for class org.bitcoinj.base.internal.HexFormat
+
 
+
hmacSha512(byte[], byte[]) - Static method in class org.bitcoinj.crypto.HDUtils
+
 
+
hrp - Variable in class org.bitcoinj.base.Bech32.Bech32Data
+
 
+
+

I

+
+
i() - Method in class org.bitcoinj.crypto.ChildNumber
+
+
Returns the uint32 encoded form of the path element, including the most significant bit.
+
+
id - Variable in enum class org.bitcoinj.base.ScriptType
+
+
Deprecated. +
Use ScriptType.numericId() or better yet use ScriptType.id() to get a script identifier string
+
+
+
id - Variable in class org.bitcoinj.core.NetworkParameters
+
+
See getId()
+
+
id() - Method in enum class org.bitcoinj.base.BitcoinNetwork
+
+
Return the network ID string as defined by (these were previously defined in NetworkParameters) + + BitcoinNetwork.MAINNET + org.bitcoin.production + BitcoinNetwork.TESTNET + org.bitcoin.test + BitcoinNetwork.SIGNET + org.bitcoin.signet + BitcoinNetwork.REGTEST + org.bitcoin.regtest +
+
+
id() - Method in interface org.bitcoinj.base.Network
+
+
The dot-seperated string id for this network.
+
+
id() - Method in enum class org.bitcoinj.base.ScriptType
+
+
Return the script identifier string for this ScriptType.
+
+
id() - Method in class org.bitcoinj.testing.MockAltNetwork
+
 
+
ID_MAINNET - Static variable in enum class org.bitcoinj.base.BitcoinNetwork
+
+
The ID string for the main, production network where people trade things.
+
+
ID_REGTEST - Static variable in enum class org.bitcoinj.base.BitcoinNetwork
+
+
The ID string for regtest mode.
+
+
ID_SIGNET - Static variable in enum class org.bitcoinj.base.BitcoinNetwork
+
+
The ID string for the signet.
+
+
ID_TESTNET - Static variable in enum class org.bitcoinj.base.BitcoinNetwork
+
+
The ID string for the testnet.
+
+
ignoreLockCycles() - Static method in class org.bitcoinj.utils.Threading
+
 
+
importKey(ECKey) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
+
Imports a key to the key chain.
+
+
importKey(ECKey) - Method in class org.bitcoinj.wallet.Wallet
+
+
Imports the given ECKey to the wallet.
+
+
importKeys(List<? extends ECKey>) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
importKeys(List<ECKey>) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Imports the given keys into the basic chain, creating it if necessary.
+
+
importKeys(List<ECKey>) - Method in class org.bitcoinj.wallet.Wallet
+
+
Imports the given keys to the wallet.
+
+
importKeys(ECKey...) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
importKeys(ECKey...) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Imports the given keys into the basic chain, creating it if necessary.
+
+
importKeysAndEncrypt(List<ECKey>, CharSequence) - Method in class org.bitcoinj.wallet.Wallet
+
+
Takes a list of keys and a password, then encrypts and imports them in one step using the current keycrypter.
+
+
importKeysAndEncrypt(List<ECKey>, AesKey) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Imports the given unencrypted keys into the basic chain, encrypting them along the way with the given key.
+
+
importKeysAndEncrypt(List<ECKey>, AesKey) - Method in class org.bitcoinj.wallet.Wallet
+
+
Takes a list of keys and an AES key, then encrypts and imports them in one step using the current keycrypter.
+
+
IN_CONFLICT - Enum constant in enum class org.bitcoinj.core.TransactionConfidence.ConfidenceType
+
+
If IN_CONFLICT, then it means there is another transaction (or several other transactions) spending one + (or several) of its inputs but nor this transaction nor the other/s transaction/s are included in the best chain.
+
+
incrementDepthInBlocks() - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Called by the wallet when the tx appears on the best chain and a new block is added to the top.
+
+
index() - Method in class org.bitcoinj.core.TransactionOutPoint
+
 
+
inet(InetAddress, int, Services, Instant) - Static method in class org.bitcoinj.core.PeerAddress
+
+
Constructs a peer address from the given IP address, port, services and time.
+
+
inet(InetSocketAddress, Services, Instant) - Static method in class org.bitcoinj.core.PeerAddress
+
+
Constructs a peer address from the given IP address, port, services and time.
+
+
init() - Static method in class org.bitcoinj.utils.BriefLogFormatter
+
 
+
init(Level) - Static method in class org.bitcoinj.utils.BriefLogFormatter
+
+
Configures JDK logging to use this class for everything.
+
+
initialisationVector - Variable in class org.bitcoinj.crypto.EncryptedData
+
 
+
initialize(BlockStore, StoredBlock) - Method in class org.bitcoinj.utils.VersionTally
+
+
Initialize the version tally from the block store.
+
+
initVerbose() - Static method in class org.bitcoinj.utils.BriefLogFormatter
+
 
+
initWithSilentBitcoinJ() - Static method in class org.bitcoinj.utils.BriefLogFormatter
+
 
+
insert(byte[]) - Method in class org.bitcoinj.core.BloomFilter
+
+
Insert the given arbitrary data into the filter
+
+
insert(TransactionOutPoint) - Method in class org.bitcoinj.core.BloomFilter
+
+
Inserts the given transaction outpoint.
+
+
insert(ECKey) - Method in class org.bitcoinj.core.BloomFilter
+
+
Inserts the given key and equivalent hashed form (for the address).
+
+
INSTANCE - Static variable in class org.bitcoinj.crypto.MnemonicCode
+
 
+
INSUFFICIENTFEE - Enum constant in enum class org.bitcoinj.core.RejectMessage.RejectCode
+
+
The messages described an object which did not have sufficient fee to be relayed further.
+
+
InsufficientMoneyException - Exception in org.bitcoinj.core
+
+
Thrown to indicate that you don't have enough money available to perform the requested operation.
+
+
InsufficientMoneyException() - Constructor for exception org.bitcoinj.core.InsufficientMoneyException
+
 
+
InsufficientMoneyException(Coin) - Constructor for exception org.bitcoinj.core.InsufficientMoneyException
+
 
+
InsufficientMoneyException(Coin, String) - Constructor for exception org.bitcoinj.core.InsufficientMoneyException
+
 
+
InsufficientMoneyException(Coin, Coin, Coin, Coin) - Constructor for exception org.bitcoinj.core.InsufficientMoneyException
+
 
+
INTERNAL_SUBPATH - Static variable in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
InternalUtils - Class in org.bitcoinj.base.internal
+
+
Utilities for internal use only.
+
+
InternalUtils() - Constructor for class org.bitcoinj.base.internal.InternalUtils
+
 
+
InternalUtils.Joiner - Interface in org.bitcoinj.base.internal
+
+
A functional interface for joining Strings or Objects via Object.toString() using + a pre-configured delimiter.
+
+
InternalUtils.Splitter - Interface in org.bitcoinj.base.internal
+
+
A functional interface for splitting Strings using a pre-configured regular expression.
+
+
interval - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
INTERVAL - Static variable in class org.bitcoinj.core.NetworkParameters
+
 
+
intValue() - Method in class org.bitcoinj.base.VarInt
+
+
Gets the value as an unsigned int in the range of 0 to Integer.MAX_VALUE.
+
+
intValue() - Method in enum class org.bitcoinj.core.ProtocolVersion
+
 
+
INVALID - Enum constant in enum class org.bitcoinj.core.RejectMessage.RejectCode
+
+
The message described an invalid object
+
+
InvalidCharacter(char, int) - Constructor for exception org.bitcoinj.base.exceptions.AddressFormatException.InvalidCharacter
+
 
+
InvalidChecksum() - Constructor for exception org.bitcoinj.base.exceptions.AddressFormatException.InvalidChecksum
+
 
+
InvalidChecksum(String) - Constructor for exception org.bitcoinj.base.exceptions.AddressFormatException.InvalidChecksum
+
 
+
InvalidCipherText(String) - Constructor for exception org.bitcoinj.crypto.KeyCrypterException.InvalidCipherText
+
 
+
InvalidCipherText(String, Throwable) - Constructor for exception org.bitcoinj.crypto.KeyCrypterException.InvalidCipherText
+
 
+
InvalidDataLength() - Constructor for exception org.bitcoinj.base.exceptions.AddressFormatException.InvalidDataLength
+
 
+
InvalidDataLength(String) - Constructor for exception org.bitcoinj.base.exceptions.AddressFormatException.InvalidDataLength
+
 
+
InvalidNetwork(String) - Constructor for exception org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidNetwork
+
 
+
InvalidOutputs(String) - Constructor for exception org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidOutputs
+
 
+
InvalidPaymentRequestURL(Exception) - Constructor for exception org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidPaymentRequestURL
+
 
+
InvalidPaymentRequestURL(String) - Constructor for exception org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidPaymentRequestURL
+
 
+
InvalidPaymentURL(Exception) - Constructor for exception org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidPaymentURL
+
 
+
InvalidPaymentURL(String) - Constructor for exception org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidPaymentURL
+
 
+
InvalidPkiData(Exception) - Constructor for exception org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidPkiData
+
 
+
InvalidPkiData(String) - Constructor for exception org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidPkiData
+
 
+
InvalidPkiType(String) - Constructor for exception org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidPkiType
+
 
+
InvalidPrefix() - Constructor for exception org.bitcoinj.base.exceptions.AddressFormatException.InvalidPrefix
+
 
+
InvalidPrefix(String) - Constructor for exception org.bitcoinj.base.exceptions.AddressFormatException.InvalidPrefix
+
 
+
InvalidVersion(String) - Constructor for exception org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidVersion
+
 
+
InventoryItem - Class in org.bitcoinj.core
+
 
+
InventoryItem(Block) - Constructor for class org.bitcoinj.core.InventoryItem
+
 
+
InventoryItem(InventoryItem.Type, Sha256Hash) - Constructor for class org.bitcoinj.core.InventoryItem
+
 
+
InventoryItem(Transaction) - Constructor for class org.bitcoinj.core.InventoryItem
+
 
+
InventoryItem.Type - Enum Class in org.bitcoinj.core
+
 
+
InventoryMessage - Class in org.bitcoinj.core
+
+
Represents the "inv" P2P network message.
+
+
InventoryMessage() - Constructor for class org.bitcoinj.core.InventoryMessage
+
+
Deprecated.
+
+
InventoryMessage(List<InventoryItem>) - Constructor for class org.bitcoinj.core.InventoryMessage
+
 
+
isAcceptRiskyTransactions() - Method in class org.bitcoinj.wallet.Wallet
+
+
See Wallet.setAcceptRiskyTransactions(boolean) for an explanation of this property.
+
+
isAddressMine(Address) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns true if the address is belongs to this wallet.
+
+
isAddressWatched(Address) - Method in class org.bitcoinj.wallet.Wallet
+
+
Return true if we are watching this address.
+
+
isAndroidRuntime() - Static method in class org.bitcoinj.base.internal.PlatformUtils
+
 
+
isAnyOutputSpent() - Method in class org.bitcoinj.core.Transaction
+
+
Returns true if any of the outputs is marked as spent.
+
+
isAvailableForSpending() - Method in class org.bitcoinj.core.TransactionOutput
+
+
Returns whether TransactionOutput.markAsSpent(TransactionInput) has been called on this class.
+
+
isBIP34() - Method in class org.bitcoinj.core.Block
+
+
Returns whether this block conforms to + BIP34: Height in Coinbase.
+
+
isBIP65() - Method in class org.bitcoinj.core.Block
+
+
Returns whether this block conforms to + BIP65: OP_CHECKLOCKTIMEVERIFY.
+
+
isBIP66() - Method in class org.bitcoinj.core.Block
+
+
Returns whether this block conforms to + BIP66: Strict DER signatures.
+
+
isBloomFilteringEnabled() - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns whether the Bloom filtering protocol optimisation is in use: defaults to true.
+
+
isCanonical() - Method in class org.bitcoinj.crypto.ECKey.ECDSASignature
+
+
Returns true if the S component is "low", that means it is below ECKey.HALF_CURVE_ORDER.
+
+
isChainFileLocked() - Method in class org.bitcoinj.kits.WalletAppKit
+
+
Tests to see if the spvchain file has an operating system file lock on it.
+
+
isCheckpoint(int) - Method in class org.bitcoinj.core.NetworkParameters
+
+
Is height a checkpoint
+
+
isCoinbase() - Method in class org.bitcoinj.core.UTXO
+
+
Gets the flag of whether this was created by a coinbase tx.
+
+
isCoinBase() - Method in class org.bitcoinj.core.Transaction
+
+
A coinbase transaction is one that creates a new coin.
+
+
isCoinBase() - Method in class org.bitcoinj.core.TransactionInput
+
+
Coinbase transactions have special inputs with hashes of zero.
+
+
isCompressed() - Method in class org.bitcoinj.crypto.ECKey
+
+
Returns whether this key is using the compressed form or not.
+
+
isCompressed() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
isConsistent() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns if this wallet is structurally consistent, so e.g.
+
+
isConsistentOrThrow() - Method in class org.bitcoinj.wallet.Wallet
+
+
Variant of Wallet.isConsistent() that throws an IllegalStateException describing the first + inconsistency.
+
+
isDeterministicUpgradeRequired(ScriptType) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns true if the wallet contains random keys and no HD chains, in which case you should call + Wallet.upgradeToDeterministic(ScriptType, AesKey) before attempting to do anything + that would require a new address or key.
+
+
isDeterministicUpgradeRequired(ScriptType, long) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+ +
+
isDeterministicUpgradeRequired(ScriptType, Instant) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Returns true if a call to KeyChainGroup.upgradeToDeterministic(ScriptType, KeyChainGroupStructure, long, AesKey) is required + in order to have an active deterministic keychain of the desired script type.
+
+
isDifficultyTransitionPoint(int) - Method in class org.bitcoinj.params.BitcoinNetworkParams
+
+
Checks if we are at a difficulty transition point.
+
+
isDownloadData() - Method in class org.bitcoinj.core.Peer
+
+
Returns true if this peer will try and download things it is sent in "inv" messages.
+
+
isDownloadTxDependencies() - Method in class org.bitcoinj.core.Peer
+
+
Returns true if this peer will use getdata/notfound messages to walk backwards through transaction dependencies + before handing the transaction off to the wallet.
+
+
isDust() - Method in class org.bitcoinj.core.TransactionOutput
+
+
Will this transaction be considered dust and not be relayable and mined by default miners?
+
+
isEncodingCanonical(byte[]) - Static method in class org.bitcoinj.crypto.TransactionSignature
+
+
Returns true if the given signature is has canonical encoding, and will thus be accepted as standard by + Bitcoin Core.
+
+
isEncrypted() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
A deterministic key is considered to be encrypted if it has access to encrypted private key bytes, OR if its + parent does.
+
+
isEncrypted() - Method in class org.bitcoinj.crypto.ECKey
+
+
Indicates whether the private key is encrypted (true) or not (false).
+
+
isEncrypted() - Method in interface org.bitcoinj.crypto.EncryptableItem
+
+
Returns whether the item is encrypted or not.
+
+
isEncrypted() - Method in class org.bitcoinj.wallet.DeterministicSeed
+
 
+
isEncrypted() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Returns true if the group is encrypted.
+
+
isEncrypted() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns true if the wallet is encrypted using any scheme, false if not.
+
+
isEnsureMinRequiredFee() - Method in class org.bitcoinj.core.Context
+
+
Whether to ensure the minimum required fee by default when completing transactions.
+
+
isEveryOwnedOutputSpent(TransactionBag) - Method in class org.bitcoinj.core.Transaction
+
+
Returns false if this transaction has at least one output that is owned by the given wallet and unspent, true + otherwise.
+
+
isExpired() - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
This should always be called before attempting to call sendPayment.
+
+
isFinal(int, long) - Method in class org.bitcoinj.core.Transaction
+
+ +
+
isFinal(int, Instant) - Method in class org.bitcoinj.core.Transaction
+
+
Returns true if this transaction is considered finalized and can be placed in a block.
+
+
isFollowing() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Return true if this keychain is following another keychain
+
+
isGreaterThan(Coin) - Method in class org.bitcoinj.base.Coin
+
+
Returns true if the monetary value represented by this instance is greater than that + of the given other Coin, otherwise false.
+
+
isGreaterThan(Fiat) - Method in class org.bitcoinj.base.utils.Fiat
+
+
Returns true if the monetary value represented by this instance is greater than that of the given other Fiat, + otherwise false.
+
+
isHardened() - Method in class org.bitcoinj.crypto.ChildNumber
+
 
+
isInfinity() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
isInputStandard(TransactionInput) - Static method in class org.bitcoinj.wallet.DefaultRiskAnalysis
+
+
Checks if the given input passes some of the AreInputsStandard checks.
+
+
isKeyRotating(ECKey) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns whether the keys creation time is before the key rotation time, if one was set.
+
+
isLessThan(Coin) - Method in class org.bitcoinj.base.Coin
+
+
Returns true if the monetary value represented by this instance is less than that + of the given other Coin, otherwise false.
+
+
isLessThan(Fiat) - Method in class org.bitcoinj.base.utils.Fiat
+
+
Returns true if the monetary value represented by this instance is less than that of the given other Fiat, + otherwise false.
+
+
isLinux() - Static method in class org.bitcoinj.base.internal.PlatformUtils
+
 
+
isMac() - Static method in class org.bitcoinj.base.internal.PlatformUtils
+
 
+
isMine(TransactionBag) - Method in class org.bitcoinj.core.TransactionOutput
+
+
Returns true if this output is to a key, or an address we have the keys for, in the wallet.
+
+
isMineOrWatched(TransactionBag) - Method in class org.bitcoinj.core.TransactionOutput
+
+
Returns true if this output is to a key in the wallet or to an address/script we are watching.
+
+
isNegative() - Method in class org.bitcoinj.base.Coin
+
+
Returns true if and only if this instance represents a monetary value less than zero, + otherwise false.
+
+
isNegative() - Method in class org.bitcoinj.base.utils.Fiat
+
+
Returns true if and only if this instance represents a monetary value less than zero, otherwise false.
+
+
isNormalized() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
isOpCode() - Method in class org.bitcoinj.script.ScriptChunk
+
+
If this chunk is a single byte of non-pushdata content (could be OP_RESERVED or some invalid Opcode)
+
+
isOpenJDKRuntime() - Static method in class org.bitcoinj.base.internal.PlatformUtils
+
 
+
isOpReturn(Script) - Static method in class org.bitcoinj.script.ScriptPattern
+
+
Returns whether this script is using OP_RETURN to store arbitrary data.
+
+
isOptInFullRBF() - Method in class org.bitcoinj.core.Transaction
+
+
Returns whether this transaction will opt into the + full replace-by-fee semantics.
+
+
isOptInFullRBF() - Method in class org.bitcoinj.core.TransactionInput
+
+
Returns whether this input will cause a transaction to opt into the + full replace-by-fee semantics.
+
+
isOracleJavaRuntime() - Static method in class org.bitcoinj.base.internal.PlatformUtils
+
 
+
isOrphan(Sha256Hash) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Returns true if the given block is currently in the orphan blocks list.
+
+
isOutputStandard(TransactionOutput) - Static method in class org.bitcoinj.wallet.DefaultRiskAnalysis
+
+
Checks the output to see if the script violates a standardness rule.
+
+
isP2PK(Script) - Static method in class org.bitcoinj.script.ScriptPattern
+
+
Returns true if this script is of the form <pubkey> OP_CHECKSIG.
+
+
isP2PKH(Script) - Static method in class org.bitcoinj.script.ScriptPattern
+
+
Returns true if this script is of the form DUP HASH160 <pubkey hash> EQUALVERIFY CHECKSIG, ie, payment to an + address like 1VayNert3x1KzbpzMGt2qdqrAThiRovi8.
+
+
isP2SH(Script) - Static method in class org.bitcoinj.script.ScriptPattern
+
+
+ Whether or not this is a scriptPubKey representing a P2SH output.
+
+
isP2TR(Script) - Static method in class org.bitcoinj.script.ScriptPattern
+
+
Returns true if this script is of the form OP_1 <pubkey>.
+
+
isP2WH(Script) - Static method in class org.bitcoinj.script.ScriptPattern
+
+
Returns true if this script is of the form OP_0 <hash>.
+
+
isP2WPKH(Script) - Static method in class org.bitcoinj.script.ScriptPattern
+
+
Returns true if this script is of the form OP_0 <hash> and hash is 20 bytes long.
+
+
isP2WSH(Script) - Static method in class org.bitcoinj.script.ScriptPattern
+
+
Returns true if this script is of the form OP_0 <hash> and hash is 32 bytes long.
+
+
isPayToScriptHashMine(byte[]) - Method in interface org.bitcoinj.core.TransactionBag
+
+
Returns true if this wallet knows the script corresponding to the given hash.
+
+
isPayToScriptHashMine(byte[]) - Method in class org.bitcoinj.wallet.Wallet
+
 
+
isPending() - Method in class org.bitcoinj.core.Transaction
+
+
Convenience wrapper around getConfidence().getConfidenceType()
+
+
isPendingTransactionRelevant(Transaction) - Method in class org.bitcoinj.wallet.Wallet
+
+
This method is used by a Peer to find out if a transaction that has been announced is interesting, + that is, whether we should bother downloading its dependencies and exploring the transaction to decide how + risky it is.
+
+
isPingPongSupported() - Method in class org.bitcoinj.core.VersionMessage
+
+
Deprecated. +
just assume Ping and Pong are supported
+
+
+
isPositive() - Method in class org.bitcoinj.base.Coin
+
+
Returns true if and only if this instance represents a monetary value greater than zero, + otherwise false.
+
+
isPositive() - Method in class org.bitcoinj.base.utils.Fiat
+
+
Returns true if and only if this instance represents a monetary value greater than zero, otherwise false.
+
+
isPubKeyCanonical(byte[]) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Returns true if the given pubkey is canonical, i.e.
+
+
isPubKeyCompressed() - Method in class org.bitcoinj.crypto.DumpedPrivateKey
+
+
Returns true if the public key corresponding to this private key is compressed.
+
+
isPubKeyCompressed(byte[]) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Returns true if the given pubkey is in its compressed form.
+
+
isPubKeyHashMine(byte[], ScriptType) - Method in interface org.bitcoinj.core.TransactionBag
+
+
Look for a public key which hashes to the given hash and (optionally) is used for a specific script type.
+
+
isPubKeyHashMine(byte[], ScriptType) - Method in class org.bitcoinj.wallet.Wallet
+
 
+
isPubKeyMine(byte[]) - Method in interface org.bitcoinj.core.TransactionBag
+
+
Returns true if this wallet contains a keypair with the given public key.
+
+
isPubKeyMine(byte[]) - Method in class org.bitcoinj.wallet.Wallet
+
 
+
isPubKeyOnly() - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
A deterministic key is considered to be 'public key only' if it hasn't got a private key part and it cannot be + rederived.
+
+
isPubKeyOnly() - Method in class org.bitcoinj.crypto.ECKey
+
+
Returns true if this key doesn't have unencrypted access to private key bytes.
+
+
isPushData() - Method in class org.bitcoinj.script.ScriptChunk
+
+
Returns true if this chunk is pushdata content, including the single-byte pushdatas.
+
+
isReady() - Method in class org.bitcoinj.signers.CustomTransactionSigner
+
 
+
isReady() - Method in class org.bitcoinj.signers.LocalTransactionSigner
+
 
+
isReady() - Method in class org.bitcoinj.signers.MissingSigResolutionSigner
+
 
+
isReady() - Method in interface org.bitcoinj.signers.TransactionSigner
+
+
Returns true if this signer is ready to be used.
+
+
isRelaxProofOfWork() - Method in class org.bitcoinj.core.Context
+
+
If this is set to true, proof of work is not enforced.
+
+
isRequiringUpdateAllBloomFilter() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
 
+
isRewardHalvingPoint(int) - Method in class org.bitcoinj.params.BitcoinNetworkParams
+
+
Checks if we are at a reward halving point.
+
+
isRunning() - Method in class org.bitcoinj.base.internal.Stopwatch
+
+
Returns true if the stopwatch is running.
+
+
isRunning() - Method in class org.bitcoinj.core.PeerGroup
+
 
+
isSelectable(Transaction, Network) - Static method in class org.bitcoinj.wallet.DefaultCoinSelector
+
+
Helper to determine if this selector would select a given transaction.
+
+
isSentToMultisig(Script) - Static method in class org.bitcoinj.script.ScriptPattern
+
+
Returns whether this script matches the format used for m-of-n multisig outputs: + [m] [keys...] [n] CHECKMULTISIG
+
+
isSet() - Method in class org.bitcoinj.core.LockTime
+
+
The lock time is considered to be set only if its raw value is greater than zero.
+
+
isShortestPossiblePushData() - Method in class org.bitcoinj.script.ScriptChunk
+
+
Called on a pushdata chunk, returns true if it uses the smallest possible way (according to BIP62) to push the data.
+
+
isStandard() - Method in class org.bitcoinj.core.TransactionInput
+
+
Returns either RuleViolation.NONE if the input is standard, or which rule makes it non-standard if so.
+
+
isStandard(Transaction) - Static method in class org.bitcoinj.wallet.DefaultRiskAnalysis
+
+
Checks if a transaction is considered "standard" by Bitcoin Core's IsStandardTx and AreInputsStandard + functions.
+
+
isSupportsDeterministicChains() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+ +
+
isTimeLocked() - Method in class org.bitcoinj.core.Transaction
+
+
A transaction is time-locked if at least one of its inputs is non-final and it has a lock time.
+
+
isTransactionMature(Transaction) - Method in class org.bitcoinj.wallet.Wallet
+
+
Determine if a transaction is mature.
+
+
isTransactionRelevant(Transaction) - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns true if the given transaction sends coins to any of our keys, or has inputs spending any of our outputs, + and also returns true if tx has inputs that are spending outputs which are + not ours but which are spent by pending transactions.
+
+
isTransactionRisky(Transaction, List<Transaction>) - Method in class org.bitcoinj.wallet.Wallet
+
+
Given a transaction and an optional list of dependencies (recursive/flattened), returns true if the given + transaction would be rejected by the analyzer, or false otherwise.
+
+
isValid() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
isValidAddress(Address) - Method in enum class org.bitcoinj.base.BitcoinNetwork
+
+
Is address valid for this network.
+
+
isWallet(InputStream) - Static method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
+
Cheap test to see if input stream is a wallet.
+
+
isWalletExtensionMandatory() - Method in interface org.bitcoinj.wallet.WalletExtension
+
+
If this returns true, the mandatory flag is set when the wallet is serialized and attempts to load it without + the extension being in the wallet will throw an exception.
+
+
isWatched(TransactionBag) - Method in class org.bitcoinj.core.TransactionOutput
+
+
Returns true if this output is to a key, or an address we have the keys for, in the wallet.
+
+
isWatchedScript(Script) - Method in interface org.bitcoinj.core.TransactionBag
+
+
Returns true if this wallet is watching transactions for outputs with the script.
+
+
isWatchedScript(Script) - Method in class org.bitcoinj.wallet.Wallet
+
 
+
isWatching() - Method in class org.bitcoinj.crypto.ECKey
+
+
Returns true if this key is watch only, meaning it has a public key but no private key.
+
+
isWatching() - Method in class org.bitcoinj.wallet.BasicKeyChain
+
+
Returns whether this chain consists of pubkey only (watching) keys, regular keys (usable for signing), or + has no keys in it yet at all (thus we cannot tell).
+
+
isWatching() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns true if this chain is watch only, meaning it has public keys but no private key.
+
+
isWatching() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Returns whether this chain has only watching keys (unencrypted keys with no private part).
+
+
isWatching() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns whether this wallet consists entirely of watching keys (unencrypted keys with no private part).
+
+
isWindows() - Static method in class org.bitcoinj.base.internal.PlatformUtils
+
 
+
isWitnessCommitment(Script) - Static method in class org.bitcoinj.script.ScriptPattern
+
+
Returns whether this script matches the pattern for a segwit commitment (in an output of the coinbase + transaction).
+
+
isZero() - Method in class org.bitcoinj.base.Coin
+
+
Returns true if and only if this instance represents zero monetary value, + otherwise false.
+
+
isZero() - Method in class org.bitcoinj.base.utils.Fiat
+
+
Returns true if and only if this instance represents zero monetary value, otherwise false.
+
+
items - Variable in class org.bitcoinj.core.ListMessage
+
 
+
iterator() - Method in class org.bitcoinj.utils.BlockFileLoader
+
 
+
+

J

+
+
join(List<?>) - Method in interface org.bitcoinj.base.internal.InternalUtils.Joiner
+
 
+
joiner(String) - Static method in class org.bitcoinj.base.internal.InternalUtils
+
+
Return a lambda for joining Strings or Objects via Object.toString().
+
+
+

K

+
+
KEY_LENGTH - Static variable in class org.bitcoinj.crypto.KeyCrypterScrypt
+
+
Key length in bytes.
+
+
KEY_ROTATION - Enum constant in enum class org.bitcoinj.core.Transaction.Purpose
+
+
Transaction automatically created and broadcast in order to reallocate money from old to new keys.
+
+
KeyBag - Interface in org.bitcoinj.wallet
+
+
A KeyBag is simply an object that can map public keys, their 160-bit hashes and script hashes to ECKey + and RedeemData objects.
+
+
keyBytes - Variable in class org.bitcoinj.crypto.HDKeyDerivation.RawKeyBytes
+
 
+
KeyChain - Interface in org.bitcoinj.wallet
+
+
A KeyChain is a class that stores a collection of keys for a Wallet.
+
+
KeyChain.KeyPurpose - Enum Class in org.bitcoinj.wallet
+
 
+
KeyChainEventListener - Interface in org.bitcoinj.wallet.listeners
+
 
+
KeyChainFactory - Interface in org.bitcoinj.wallet
+
+
Factory interface for creation keychains while de-serializing a wallet.
+
+
KeyChainGroup - Class in org.bitcoinj.wallet
+
+
A KeyChainGroup is used by the Wallet and manages: a BasicKeyChain object + (which will normally be empty), and zero or more DeterministicKeyChains.
+
+
KeyChainGroup.Builder - Class in org.bitcoinj.wallet
+
+
Builder for KeyChainGroup.
+
+
keyChainGroupLock - Variable in class org.bitcoinj.wallet.Wallet
+
 
+
KeyChainGroupStructure - Interface in org.bitcoinj.wallet
+
+
Defines a structure for hierarchical deterministic wallets.
+
+
keyCrypter - Variable in class org.bitcoinj.crypto.ECKey
+
 
+
KeyCrypter - Interface in org.bitcoinj.crypto
+
+
A KeyCrypter can be used to encrypt and decrypt a message.
+
+
KeyCrypterException - Exception in org.bitcoinj.crypto
+
+
Exception to provide the following:
+
+
KeyCrypterException(String) - Constructor for exception org.bitcoinj.crypto.KeyCrypterException
+
 
+
KeyCrypterException(String, Throwable) - Constructor for exception org.bitcoinj.crypto.KeyCrypterException
+
 
+
KeyCrypterException.InvalidCipherText - Exception in org.bitcoinj.crypto
+
+
This exception is thrown when a private key or seed is decrypted, the decrypted message is damaged + (e.g.
+
+
KeyCrypterException.PublicPrivateMismatch - Exception in org.bitcoinj.crypto
+
+
This exception is thrown when a private key or seed is decrypted, it doesn't match its public key any + more.
+
+
KeyCrypterScrypt - Class in org.bitcoinj.crypto
+
+
This class encrypts and decrypts byte arrays and strings using scrypt as the + key derivation function and AES for the encryption.
+
+
KeyCrypterScrypt() - Constructor for class org.bitcoinj.crypto.KeyCrypterScrypt
+
+
Encryption/Decryption using default parameters and a random salt.
+
+
KeyCrypterScrypt(int) - Constructor for class org.bitcoinj.crypto.KeyCrypterScrypt
+
+
Encryption/Decryption using custom number of iterations parameters and a random salt.
+
+
KeyCrypterScrypt(Protos.ScryptParameters) - Constructor for class org.bitcoinj.crypto.KeyCrypterScrypt
+
+
Encryption/ Decryption using specified Scrypt parameters.
+
+
KeyIsEncryptedException() - Constructor for exception org.bitcoinj.crypto.ECKey.KeyIsEncryptedException
+
 
+
keyPaths - Variable in class org.bitcoinj.signers.TransactionSigner.ProposedTransaction
+
+
HD key paths used for each input to derive a signing key.
+
+
keyRotationTime() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns the key rotation time, or empty if unconfigured.
+
+
keys - Variable in class org.bitcoinj.wallet.RedeemData
+
 
+
KeyTimeCoinSelector - Class in org.bitcoinj.wallet
+
+
A coin selector that takes all coins assigned to keys created before the given timestamp.
+
+
KeyTimeCoinSelector(Wallet, long, boolean) - Constructor for class org.bitcoinj.wallet.KeyTimeCoinSelector
+
+ +
+
KeyTimeCoinSelector(Wallet, Instant, boolean) - Constructor for class org.bitcoinj.wallet.KeyTimeCoinSelector
+
 
+
+

L

+
+
LargerThanMaxBlockSize() - Constructor for exception org.bitcoinj.core.VerificationException.LargerThanMaxBlockSize
+
 
+
lastBlockSeenTime() - Method in class org.bitcoinj.wallet.Wallet
+
+
Returns time extracted from the last best seen block header, or empty.
+
+
lastChainHead - Variable in class org.bitcoinj.store.SPVBlockStore
+
 
+
lastPingInterval() - Method in class org.bitcoinj.core.Peer
+
+
Returns the elapsed time of the last ping/pong cycle.
+
+
later(Instant, Instant) - Static method in class org.bitcoinj.base.internal.TimeUtils
+
+
Determines the later of two instants.
+
+
launch(BitcoinNetwork, File, String) - Static method in class org.bitcoinj.kits.WalletAppKit
+
+
Launch an instance of WalletAppKit with asynchronous startup.
+
+
launch(BitcoinNetwork, File, String, int) - Static method in class org.bitcoinj.kits.WalletAppKit
+
+
Launch an instance of WalletAppKit with asynchronous startup.
+
+
launch(BitcoinNetwork, File, String, Consumer<WalletAppKit>) - Static method in class org.bitcoinj.kits.WalletAppKit
+
+
Launch an instance of WalletAppKit with asynchronous startup.
+
+
launch(BitcoinNetwork, File, String, Consumer<WalletAppKit>, int) - Static method in class org.bitcoinj.kits.WalletAppKit
+
+
Launch an instance of WalletAppKit with asynchronous startup.
+
+
LazyECPoint - Class in org.bitcoinj.crypto
+
+
A wrapper around a SECP256K1 ECPoint that delays decoding of the point for as long as possible.
+
+
LazyECPoint(byte[]) - Constructor for class org.bitcoinj.crypto.LazyECPoint
+
+
Construct a LazyECPoint from a public key.
+
+
LazyECPoint(ECCurve, byte[]) - Constructor for class org.bitcoinj.crypto.LazyECPoint
+
+
Deprecated. + +
+
+
LazyECPoint(ECPoint, boolean) - Constructor for class org.bitcoinj.crypto.LazyECPoint
+
+
Construct a LazyECPoint from an already decoded point.
+
+
LegacyAddress - Class in org.bitcoinj.base
+
+
A Bitcoin address looks like 1MsScoe2fTJoq4ZPdQgqyhgWeoNamYPevy and is derived from an elliptic curve public key + plus a set of network parameters.
+
+
LegacyAddress.AddressHeader - Enum Class in org.bitcoinj.base
+
+
Address header of legacy P2PKH addresses for standard Bitcoin networks.
+
+
LegacyAddress.P2SHHeader - Enum Class in org.bitcoinj.base
+
+
Address header of legacy P2SH addresses for standard Bitcoin networks.
+
+
legacyAddressHeader() - Method in enum class org.bitcoinj.base.BitcoinNetwork
+
+
Header byte of base58 encoded legacy P2PKH addresses for this network.
+
+
legacyAddressHeader() - Method in interface org.bitcoinj.base.Network
+
+
Header byte of base58 encoded legacy P2PKH addresses for this network.
+
+
legacyAddressHeader() - Method in class org.bitcoinj.testing.MockAltNetwork
+
 
+
legacyP2SHHeader() - Method in enum class org.bitcoinj.base.BitcoinNetwork
+
+
Header byte of base58 encoded legacy P2SH addresses for this network.
+
+
legacyP2SHHeader() - Method in interface org.bitcoinj.base.Network
+
+
Header byte of base58 encoded legacy P2SH addresses for this network.
+
+
legacyP2SHHeader() - Method in class org.bitcoinj.testing.MockAltNetwork
+
 
+
LENGTH - Static variable in class org.bitcoinj.base.LegacyAddress
+
+
An address is a RIPEMD160 hash of a public key, therefore is always 160 bits or 20 bytes.
+
+
LENGTH - Static variable in class org.bitcoinj.base.Sha256Hash
+
 
+
LIBRARY_SUBVER - Static variable in class org.bitcoinj.core.VersionMessage
+
+
The value that is prepended to the subVer field of this application.
+
+
LINUX - Enum constant in enum class org.bitcoinj.base.internal.PlatformUtils.OS
+
 
+
LinuxSecureRandom - Class in org.bitcoinj.crypto
+
+
A SecureRandom implementation that is able to override the standard JVM provided implementation, and which simply + serves random numbers by reading /dev/urandom.
+
+
LinuxSecureRandom() - Constructor for class org.bitcoinj.crypto.LinuxSecureRandom
+
 
+
list() - Method in class org.bitcoinj.crypto.HDPath
+
+
Return a simple list of ChildNumber
+
+
ListenableCompletableFuture<V> - Class in org.bitcoinj.utils
+
+
A CompletableFuture that is also a ListenableFuture for migration + from Guava ListenableFuture to CompletableFuture.
+
+
ListenableCompletableFuture() - Constructor for class org.bitcoinj.utils.ListenableCompletableFuture
+
 
+
ListenableCompletionStage<V> - Interface in org.bitcoinj.utils
+
+
A CompletionStage with a ListenableFuture-compatible interface to smooth migration + from Guava ListenableFuture to CompletableFuture/CompletionStage.
+
+
listener - Variable in class org.bitcoinj.utils.ListenerRegistration
+
 
+
ListenerRegistration<T> - Class in org.bitcoinj.utils
+
+
A simple wrapper around a listener and an executor, with some utility methods.
+
+
ListenerRegistration(T, Executor) - Constructor for class org.bitcoinj.utils.ListenerRegistration
+
 
+
ListMessage - Class in org.bitcoinj.core
+
+
Abstract superclass of classes with list based payload, ie InventoryMessage and GetDataMessage.
+
+
ListMessage() - Constructor for class org.bitcoinj.core.ListMessage
+
+
Deprecated.
+
+
ListMessage(List<InventoryItem>) - Constructor for class org.bitcoinj.core.ListMessage
+
 
+
loadFromFile(File, WalletExtension...) - Static method in class org.bitcoinj.wallet.Wallet
+
+
Returns a wallet deserialized from the given file.
+
+
loadFromFile(File, WalletProtobufSerializer.WalletFactory, boolean, boolean, WalletExtension...) - Static method in class org.bitcoinj.wallet.Wallet
+
+
Returns a wallet deserialized from the given file.
+
+
loadFromFileStream(InputStream, WalletExtension...) - Static method in class org.bitcoinj.wallet.Wallet
+
+
Returns a wallet deserialized from the given input stream and wallet extensions.
+
+
loadFromFileStream(InputStream, WalletProtobufSerializer.WalletFactory, boolean, boolean, WalletExtension...) - Static method in class org.bitcoinj.wallet.Wallet
+
+
Returns a wallet deserialized from the given input stream and wallet extensions.
+
+
loadKeyStore(String, String, InputStream) - Static method in class org.bitcoinj.crypto.X509Utils
+
+
Returns a key store loaded from the given stream.
+
+
locale(Locale) - Method in class org.bitcoinj.utils.BtcFormat.Builder
+
+
Specify the Locale for formatting and parsing.
+
+
localhost(NetworkParameters) - Static method in class org.bitcoinj.core.PeerAddress
+
 
+
localizedPattern(String) - Method in class org.bitcoinj.utils.BtcFormat.Builder
+
+
Use the given localized-pattern for formatting and parsing.
+
+
localServices - Variable in class org.bitcoinj.core.VersionMessage
+
+
Flags defining what optional services are supported.
+
+
LocalTransactionSigner - Class in org.bitcoinj.signers
+
+
TransactionSigner implementation for signing inputs using keys from provided KeyBag.
+
+
LocalTransactionSigner() - Constructor for class org.bitcoinj.signers.LocalTransactionSigner
+
 
+
locator - Variable in class org.bitcoinj.core.GetBlocksMessage
+
 
+
lock - Variable in class org.bitcoinj.core.AbstractBlockChain
+
+
synchronization lock
+
+
lock - Variable in class org.bitcoinj.core.Peer
+
 
+
lock - Variable in class org.bitcoinj.core.PeerGroup
+
 
+
lock - Variable in class org.bitcoinj.core.TxConfidenceTable
+
 
+
lock - Variable in class org.bitcoinj.store.SPVBlockStore
+
 
+
lock - Variable in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
lock - Variable in class org.bitcoinj.wallet.Wallet
+
 
+
lock(Class) - Static method in class org.bitcoinj.utils.Threading
+
 
+
lock(String) - Static method in class org.bitcoinj.utils.Threading
+
 
+
lockTime() - Method in class org.bitcoinj.core.Transaction
+
+
Transactions can have an associated lock time, specified either as a block height or as a timestamp (in seconds + since epoch).
+
+
LockTime - Class in org.bitcoinj.core
+
+
Wrapper for transaction lock time, specified either as a block height LockTime.HeightLock or as a timestamp + LockTime.TimeLock (in seconds since epoch).
+
+
LOCKTIME_THRESHOLD - Static variable in class org.bitcoinj.core.Transaction
+
+
Deprecated. +
use LockTime.THRESHOLD or + lockTime instanceof HeightLock or + lockTime instanceof TimeLock
+
+
+
LockTime.HeightLock - Class in org.bitcoinj.core
+
+
A LockTime instance that contains a block height.
+
+
LockTime.TimeLock - Class in org.bitcoinj.core
+
+
A LockTime instance that contains a timestamp.
+
+
log - Static variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
longest(Duration, Duration) - Static method in class org.bitcoinj.base.internal.TimeUtils
+
+
Determines the longest of two durations.
+
+
longValue() - Method in class org.bitcoinj.base.Coin
+
+
Returns the number of satoshis of this monetary value.
+
+
longValue() - Method in class org.bitcoinj.base.utils.Fiat
+
+
Returns the number of "smallest units" of this monetary value.
+
+
longValue() - Method in class org.bitcoinj.base.VarInt
+
+
Gets the value as a long.
+
+
lookaheadSize - Variable in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
lookaheadSize(int) - Method in class org.bitcoinj.wallet.KeyChainGroup.Builder
+
+
Set a custom lookahead size for all deterministic chains
+
+
lookaheadThreshold - Variable in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
lookaheadThreshold(int) - Method in class org.bitcoinj.wallet.KeyChainGroup.Builder
+
+
Set a custom lookahead threshold for all deterministic chains
+
+
LOW_S - Enum constant in enum class org.bitcoinj.script.Script.VerifyFlag
+
 
+
+

M

+
+
m() - Static method in class org.bitcoinj.crypto.HDPath
+
+
Returns an empty path for a private key.
+
+
m(List<ChildNumber>) - Static method in class org.bitcoinj.crypto.HDPath
+
+
Returns a path for a private key.
+
+
m(ChildNumber) - Static method in class org.bitcoinj.crypto.HDPath
+
+
Returns a path for a private key.
+
+
m(ChildNumber...) - Static method in class org.bitcoinj.crypto.HDPath
+
+
Returns a path for a private key.
+
+
M() - Static method in class org.bitcoinj.crypto.HDPath
+
+
Returns an empty path for a public key.
+
+
M(List<ChildNumber>) - Static method in class org.bitcoinj.crypto.HDPath
+
+
Returns a path for a public key.
+
+
M(ChildNumber) - Static method in class org.bitcoinj.crypto.HDPath
+
+
Returns a path for a public key.
+
+
M(ChildNumber...) - Static method in class org.bitcoinj.crypto.HDPath
+
+
Returns a path for a public key.
+
+
MAC_OS - Enum constant in enum class org.bitcoinj.base.internal.PlatformUtils.OS
+
 
+
MAINNET - Enum constant in enum class org.bitcoinj.base.BitcoinNetwork
+
+
The main Bitcoin network, known as "mainnet", with id string "org.bitcoin.production"
+
+
MAINNET_MAJORITY_ENFORCE_BLOCK_UPGRADE - Static variable in class org.bitcoinj.params.MainNetParams
+
 
+
MAINNET_MAJORITY_REJECT_BLOCK_OUTDATED - Static variable in class org.bitcoinj.params.MainNetParams
+
 
+
MAINNET_MAJORITY_WINDOW - Static variable in class org.bitcoinj.params.MainNetParams
+
 
+
MainNetParams - Class in org.bitcoinj.params
+
+
Parameters for the main production network on which people trade goods and services.
+
+
MainNetParams() - Constructor for class org.bitcoinj.params.MainNetParams
+
 
+
majorityEnforceBlockUpgrade - Variable in class org.bitcoinj.core.NetworkParameters
+
+
Used to check majorities for block version upgrade
+
+
majorityRejectBlockOutdated - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
majorityWindow - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
makeAddressV1Message(ByteBuffer) - Method in class org.bitcoinj.core.BitcoinSerializer
+
+
Make an address message from the payload.
+
+
makeAddressV1Message(ByteBuffer) - Method in class org.bitcoinj.core.MessageSerializer
+
+
Make an address message from the payload.
+
+
makeAddressV2Message(ByteBuffer) - Method in class org.bitcoinj.core.BitcoinSerializer
+
+
Make an address message from the payload.
+
+
makeAddressV2Message(ByteBuffer) - Method in class org.bitcoinj.core.MessageSerializer
+
+
Make an address message from the payload.
+
+
makeBlock(ByteBuffer) - Method in class org.bitcoinj.core.BitcoinSerializer
+
+
Make a block from the payload.
+
+
makeBlock(ByteBuffer) - Method in class org.bitcoinj.core.MessageSerializer
+
+
Make a block from the payload.
+
+
makeBloomFilter(ByteBuffer) - Method in class org.bitcoinj.core.BitcoinSerializer
+
+
Make an filter message from the payload.
+
+
makeBloomFilter(ByteBuffer) - Method in class org.bitcoinj.core.MessageSerializer
+
+
Make an filter message from the payload.
+
+
makeFilteredBlock(ByteBuffer) - Method in class org.bitcoinj.core.BitcoinSerializer
+
+
Make a filtered block from the payload.
+
+
makeFilteredBlock(ByteBuffer) - Method in class org.bitcoinj.core.MessageSerializer
+
+
Make a filtered block from the payload.
+
+
makeInventoryMessage(ByteBuffer) - Method in class org.bitcoinj.core.BitcoinSerializer
+
+
Make an inventory message from the payload.
+
+
makeInventoryMessage(ByteBuffer) - Method in class org.bitcoinj.core.MessageSerializer
+
+
Make an inventory message from the payload.
+
+
makeKeyChain(DeterministicSeed, KeyCrypter, boolean, ScriptType, List<ChildNumber>) - Method in interface org.bitcoinj.wallet.KeyChainFactory
+
+ +
+
makeKeyChain(DeterministicSeed, KeyCrypter, ScriptType, List<ChildNumber>) - Method in class org.bitcoinj.wallet.DefaultKeyChainFactory
+
 
+
makeKeyChain(DeterministicSeed, KeyCrypter, ScriptType, List<ChildNumber>) - Method in interface org.bitcoinj.wallet.KeyChainFactory
+
+
Make a keychain (but not a watching one) with the specified account path
+
+
makeKeyChainFromSeed(DeterministicSeed, List<ChildNumber>, ScriptType) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Factory method to create a key chain from a seed.
+
+
makeSolvedTestBlock(Block, Address, Transaction...) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
 
+
makeSolvedTestBlock(Block, Transaction...) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
 
+
makeSolvedTestBlock(BlockStore, Address) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
 
+
makeSpendingKeyChain(DeterministicKey, boolean, ScriptType) - Method in interface org.bitcoinj.wallet.KeyChainFactory
+
+ +
+
makeSpendingKeyChain(DeterministicKey, ScriptType) - Method in class org.bitcoinj.wallet.DefaultKeyChainFactory
+
 
+
makeSpendingKeyChain(DeterministicKey, ScriptType) - Method in interface org.bitcoinj.wallet.KeyChainFactory
+
+
Make a spending keychain.
+
+
makeTransaction(ByteBuffer) - Method in class org.bitcoinj.core.BitcoinSerializer
+
+
Make a transaction from the payload.
+
+
makeTransaction(ByteBuffer) - Method in class org.bitcoinj.core.MessageSerializer
+
+
Make a transaction from the payload.
+
+
makeWatchingKeyChain(DeterministicKey, boolean, boolean, ScriptType) - Method in interface org.bitcoinj.wallet.KeyChainFactory
+
+ +
+
makeWatchingKeyChain(DeterministicKey, ScriptType) - Method in class org.bitcoinj.wallet.DefaultKeyChainFactory
+
 
+
makeWatchingKeyChain(DeterministicKey, ScriptType) - Method in interface org.bitcoinj.wallet.KeyChainFactory
+
+
Make a watching keychain.
+
+
MALFORMED - Enum constant in enum class org.bitcoinj.core.RejectMessage.RejectCode
+
+
The message was not able to be parsed
+
+
mapIntoIPv6(byte[]) - Static method in class org.bitcoinj.core.PeerAddress
+
+
Map given IPv4 address into IPv6 space.
+
+
markAsSpent(TransactionInput) - Method in class org.bitcoinj.core.TransactionOutput
+
+
Sets this objects availableForSpending flag to false and the spentBy pointer to the given input.
+
+
markAsUnspent() - Method in class org.bitcoinj.core.TransactionOutput
+
+
Resets the spent pointer / availableForSpending flag to null.
+
+
markBroadcastBy(PeerAddress) - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Called by a Peer when a transaction is pending and announced by a peer.
+
+
markKeyAsUsed(DeterministicKey) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Mark the DeterministicKey as used.
+
+
markP2SHAddressAsUsed(LegacyAddress) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
 
+
markPubHashAsUsed(byte[]) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Mark the DeterministicKeys as used, if they match the pubkeyHash + See DeterministicKeyChain.markKeyAsUsed(DeterministicKey) for more info on this.
+
+
markPubKeyAsUsed(byte[]) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Mark the DeterministicKeys as used, if they match the pubkey + See DeterministicKeyChain.markKeyAsUsed(DeterministicKey) for more info on this.
+
+
markPubKeyAsUsed(byte[]) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Mark the DeterministicKeys as used, if they match the pubkey + See DeterministicKeyChain.markKeyAsUsed(DeterministicKey) for more info on this.
+
+
markPubKeyHashAsUsed(byte[]) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Mark the DeterministicKeys as used, if they match the pubKeyHash + See DeterministicKeyChain.markKeyAsUsed(DeterministicKey) for more info on this.
+
+
matchesAll() - Method in class org.bitcoinj.core.BloomFilter
+
+
Returns true if this filter will match anything.
+
+
MAX_ADDRESSES - Static variable in class org.bitcoinj.core.AddressMessage
+
 
+
MAX_ADDRESSES_PER_ADDR_MESSAGE - Static variable in class org.bitcoinj.core.PeerGroup
+
 
+
MAX_BLOCK_SIGOPS - Static variable in class org.bitcoinj.core.Block
+
+
A "sigop" is a signature verification operation.
+
+
MAX_BLOCK_SIZE - Static variable in class org.bitcoinj.core.Block
+
+
A constant shared by the entire network: how large in bytes a block is allowed to be.
+
+
MAX_CHILD_DERIVATION_ATTEMPTS - Static variable in class org.bitcoinj.crypto.HDKeyDerivation
+
+
Child derivation may fail (although with extremely low probability); in such case it is re-attempted.
+
+
MAX_COINS - Static variable in class org.bitcoinj.core.NetworkParameters
+
+
Deprecated. + +
+
+
MAX_DECIMALS - Static variable in class org.bitcoinj.base.utils.MonetaryFormat
+
 
+
MAX_FP_RATE_INCREASE - Static variable in class org.bitcoinj.core.PeerGroup
+
+
Maximum increase in FP rate before forced refresh of the bloom filter
+
+
MAX_HEADERS - Static variable in class org.bitcoinj.core.HeadersMessage
+
 
+
MAX_INITIAL_ARRAY_LENGTH - Static variable in class org.bitcoinj.core.Utils
+
+
Max initial size of variable length arrays and ArrayLists that could be attacked.
+
+
MAX_INV_SIZE - Static variable in class org.bitcoinj.core.InventoryMessage
+
+
A hard coded constant in the protocol.
+
+
MAX_INVENTORY_ITEMS - Static variable in class org.bitcoinj.core.ListMessage
+
 
+
MAX_MONEY - Static variable in enum class org.bitcoinj.base.BitcoinNetwork
+
+
The maximum money to be generated
+
+
MAX_MONEY - Static variable in class org.bitcoinj.core.NetworkParameters
+
+
Deprecated. + +
+
+
MAX_P2SH_SIGOPS - Static variable in class org.bitcoinj.script.Script
+
+
Max number of sigops allowed in a standard p2sh redeem script
+
+
MAX_SCRIPT_ELEMENT_SIZE - Static variable in class org.bitcoinj.script.Script
+
 
+
MAX_SEED_ENTROPY_BITS - Static variable in class org.bitcoinj.wallet.DeterministicSeed
+
 
+
MAX_SIMULTANEOUS_INPUTS - Static variable in class org.bitcoinj.wallet.KeyTimeCoinSelector
+
+
A number of inputs chosen to avoid hitting Transaction.MAX_STANDARD_TX_SIZE
+
+
MAX_SIZE - Static variable in interface org.bitcoinj.core.Message
+
+
Maximum size of a Bitcoin P2P Message (32 MB)
+
+
MAX_SIZE - Static variable in class org.bitcoinj.core.TxConfidenceTable
+
+
The max size of a table created with the no-args constructor.
+
+
MAX_STANDARD_TX_SIZE - Static variable in class org.bitcoinj.core.Transaction
+
+
How many bytes a transaction can be before it won't be relayed anymore.
+
+
MAX_UNSIGNED_INTEGER - Static variable in class org.bitcoinj.base.internal.ByteUtils
+
+
Maximum unsigned value that can be expressed by 32 bits.
+
+
MAX_UNSIGNED_SHORT - Static variable in class org.bitcoinj.base.internal.ByteUtils
+
+
Maximum unsigned value that can be expressed by 16 bits.
+
+
maxMoney() - Method in enum class org.bitcoinj.base.BitcoinNetwork
+
 
+
maxMoney() - Method in interface org.bitcoinj.base.Network
+
+
Maximum number of coins for this network as a Monetary value.
+
+
maxMoney() - Method in class org.bitcoinj.testing.MockAltNetwork
+
 
+
maxTarget - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
maybeCommitTx(Transaction) - Method in class org.bitcoinj.wallet.Wallet
+
+
Updates the wallet with the given transaction: puts it into the pending pool, sets the spent flags and runs + the onCoinsSent/onCoinsReceived event listener.
+
+
maybeDecrypt(AesKey) - Method in class org.bitcoinj.crypto.ECKey
+
+
Creates decrypted private key if needed.
+
+
maybeGetTag(String) - Method in class org.bitcoinj.utils.BaseTaggableObject
+
+
Deprecated.
+
+
maybeGetTag(String) - Method in interface org.bitcoinj.utils.TaggableObject
+
+
Deprecated.
+
+
maybeLookAhead() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Pre-generate enough keys to reach the lookahead size.
+
+
maybeLookAheadScripts() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Housekeeping call to call when lookahead might be needed.
+
+
maybeQueueOnWalletChanged() - Method in class org.bitcoinj.wallet.Wallet
+
 
+
maybeSetSourceToNetwork() - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Called when we receive a transaction from the network.
+
+
MBTC - Static variable in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Standard format for the mBTC denomination.
+
+
memo - Variable in class org.bitcoinj.wallet.SendRequest
+
+
If not null, this memo is recorded with the transaction during completion.
+
+
MemoryBlockStore - Class in org.bitcoinj.store
+
+
Keeps StoredBlocks in memory.
+
+
MemoryBlockStore(Block) - Constructor for class org.bitcoinj.store.MemoryBlockStore
+
 
+
MemoryFullPrunedBlockStore - Class in org.bitcoinj.store
+
+
Keeps StoredBlocks, StoredUndoableBlocks and UTXOs in memory.
+
+
MemoryFullPrunedBlockStore(NetworkParameters, int) - Constructor for class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
+
Set up the MemoryFullPrunedBlockStore
+
+
MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag - Class in org.bitcoinj.store
+
 
+
MemoryPoolMessage - Class in org.bitcoinj.core
+
+
The "mempool" message asks a remote peer to announce all transactions in its memory pool, possibly restricted by + any Bloom filter set on the connection.
+
+
MemoryPoolMessage() - Constructor for class org.bitcoinj.core.MemoryPoolMessage
+
 
+
merchantSigningKey - Variable in class org.bitcoinj.protocols.payments.PaymentProtocol.PkiVerificationData
+
+
SSL public key that was used to sign.
+
+
merge(BloomFilter) - Method in class org.bitcoinj.core.BloomFilter
+
+
Copies filter into this.
+
+
mergeActiveKeyChains(KeyChainGroup, long) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+ +
+
mergeActiveKeyChains(KeyChainGroup, Instant) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Merge all active chains from the given keychain group into this keychain group.
+
+
Message - Interface in org.bitcoinj.core
+
+
A Message is a data structure that can be serialized/deserialized using the Bitcoin serialization format.
+
+
MessageSerializer - Class in org.bitcoinj.core
+
+
Generic interface for classes which serialize/deserialize messages.
+
+
MessageSerializer() - Constructor for class org.bitcoinj.core.MessageSerializer
+
 
+
messageSize() - Method in class org.bitcoinj.core.BaseMessage
+
+
Return the size of the serialized message.
+
+
messageSize() - Method in class org.bitcoinj.core.Block
+
 
+
messageSize() - Method in class org.bitcoinj.core.EmptyMessage
+
 
+
messageSize() - Method in interface org.bitcoinj.core.Message
+
+
Return the size of the serialized message.
+
+
messageSize() - Method in class org.bitcoinj.core.PartialMerkleTree
+
+
Return the size of the serialized message.
+
+
messageSize() - Method in class org.bitcoinj.core.Transaction
+
 
+
messageSize() - Method in class org.bitcoinj.core.TransactionInput
+
+
Return the size of the serialized message.
+
+
messageSize() - Method in class org.bitcoinj.core.TransactionOutput
+
+
Return the size of the serialized message.
+
+
messageSize() - Method in class org.bitcoinj.core.TransactionWitness
+
+
Return the size of the serialized message.
+
+
MessageVerifyUtils - Class in org.bitcoinj.crypto.utils
+
+
Small utility class for verifying signatures of text messages created with + Bitcoin addresses (more precisely: with the private key of Bitcoin addresses).
+
+
MessageWriteTarget - Interface in org.bitcoinj.net
+
+
A target to which messages can be written/connection can be closed
+
+
MICROCOIN - Static variable in class org.bitcoinj.base.Coin
+
+
0.000001 Bitcoins, also known as 1 µBTC or 1 uBTC.
+
+
MICROCOIN_SCALE - Static variable in class org.bitcoinj.utils.BtcFormat
+
+
A constant useful for specifying a denomination of microbitcoins, the int + value 6.
+
+
MILLICOIN - Static variable in class org.bitcoinj.base.Coin
+
+
0.001 Bitcoins, also known as 1 mBTC.
+
+
MILLICOIN_SCALE - Static variable in class org.bitcoinj.utils.BtcFormat
+
+
A constant useful for specifying a denomination of millibitcoins, the int + value 3.
+
+
MIMETYPE_PAYMENT - Static variable in class org.bitcoinj.protocols.payments.PaymentProtocol
+
 
+
MIMETYPE_PAYMENTACK - Static variable in class org.bitcoinj.protocols.payments.PaymentProtocol
+
 
+
MIMETYPE_PAYMENTREQUEST - Static variable in class org.bitcoinj.protocols.payments.PaymentProtocol
+
 
+
MIN_PROTOCOL_VERSION - Static variable in class org.bitcoinj.core.NotFoundMessage
+
 
+
minDecimals(int) - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Set minimum number of decimals to use for formatting.
+
+
MINIMALDATA - Enum constant in enum class org.bitcoinj.script.Script.VerifyFlag
+
 
+
MINIMUM - Enum constant in enum class org.bitcoinj.core.ProtocolVersion
+
 
+
minimumFractionDigits - Variable in class org.bitcoinj.utils.BtcFormat
+
 
+
minimumFractionDigits(int) - Method in class org.bitcoinj.utils.BtcFormat.Builder
+
+
Specify the minimum number of decimal places in the fraction part of formatted values.
+
+
minus(Coin) - Method in class org.bitcoinj.base.Coin
+
+
Alias for subtract
+
+
missing - Variable in exception org.bitcoinj.core.InsufficientMoneyException
+
+
Contains the number of satoshis that would have been required to complete the operation.
+
+
MissingPrivateKeyException() - Constructor for exception org.bitcoinj.crypto.ECKey.MissingPrivateKeyException
+
 
+
MissingSignatureException() - Constructor for exception org.bitcoinj.signers.TransactionSigner.MissingSignatureException
+
 
+
MissingSigResolutionSigner - Class in org.bitcoinj.signers
+
+
This transaction signer resolves missing signatures in accordance with the given Wallet.MissingSigsMode.
+
+
MissingSigResolutionSigner() - Constructor for class org.bitcoinj.signers.MissingSigResolutionSigner
+
 
+
MissingSigResolutionSigner(Wallet.MissingSigsMode) - Constructor for class org.bitcoinj.signers.MissingSigResolutionSigner
+
 
+
missingSigsMode - Variable in class org.bitcoinj.wallet.SendRequest
+
+
Specifies what to do with missing signatures left after completing this request.
+
+
MnemonicChecksumException() - Constructor for exception org.bitcoinj.crypto.MnemonicException.MnemonicChecksumException
+
 
+
MnemonicCode - Class in org.bitcoinj.crypto
+
+
A MnemonicCode object may be used to convert between binary seed values and + lists of words per the BIP 39 + specification
+
+
MnemonicCode() - Constructor for class org.bitcoinj.crypto.MnemonicCode
+
+
Initialise from the included word list.
+
+
MnemonicCode(InputStream, String) - Constructor for class org.bitcoinj.crypto.MnemonicCode
+
+
Creates an MnemonicCode object, initializing with words read from the supplied input stream.
+
+
MnemonicException - Exception in org.bitcoinj.crypto
+
+
Exceptions thrown by the MnemonicCode module.
+
+
MnemonicException() - Constructor for exception org.bitcoinj.crypto.MnemonicException
+
 
+
MnemonicException(String) - Constructor for exception org.bitcoinj.crypto.MnemonicException
+
 
+
MnemonicException.MnemonicChecksumException - Exception in org.bitcoinj.crypto
+
+
Thrown when a list of MnemonicCode words fails the checksum check.
+
+
MnemonicException.MnemonicLengthException - Exception in org.bitcoinj.crypto
+
+
Thrown when an argument to MnemonicCode is the wrong length.
+
+
MnemonicException.MnemonicWordException - Exception in org.bitcoinj.crypto
+
+
Thrown when a word is encountered which is not in the MnemonicCode's word list.
+
+
MnemonicLengthException(String) - Constructor for exception org.bitcoinj.crypto.MnemonicException.MnemonicLengthException
+
 
+
MnemonicWordException(String) - Constructor for exception org.bitcoinj.crypto.MnemonicException.MnemonicWordException
+
 
+
MockAltNetwork - Class in org.bitcoinj.testing
+
+
Mock Alt-net implementation of Network for unit tests.
+
+
MockAltNetwork() - Constructor for class org.bitcoinj.testing.MockAltNetwork
+
 
+
MockAltNetworkParams - Class in org.bitcoinj.testing
+
+
Mock Alt-net subclass of NetworkParameters for unit tests.
+
+
MockAltNetworkParams() - Constructor for class org.bitcoinj.testing.MockAltNetworkParams
+
 
+
MOCKNET_GOOD_ADDRESS - Static variable in class org.bitcoinj.testing.MockAltNetworkParams
+
 
+
Monetary - Interface in org.bitcoinj.base
+
+
Classes implementing this interface represent a monetary value, such as a Bitcoin or fiat amount.
+
+
MonetaryFormat - Class in org.bitcoinj.base.utils
+
+
+ Utility for formatting and parsing coin values to and from human-readable form.
+
+
MonetaryFormat() - Constructor for class org.bitcoinj.base.utils.MonetaryFormat
+
+
Construct a MonetaryFormat with the default configuration.
+
+
MonetaryFormat(boolean) - Constructor for class org.bitcoinj.base.utils.MonetaryFormat
+
+
Construct a MonetaryFormat with the default configuration.
+
+
moreWorkThan(StoredBlock) - Method in class org.bitcoinj.core.StoredBlock
+
+
Returns true if this objects chainWork is higher than the others.
+
+
MultipleOpReturnRequested() - Constructor for exception org.bitcoinj.wallet.Wallet.MultipleOpReturnRequested
+
 
+
MultiplexingDiscovery - Class in org.bitcoinj.net.discovery
+
+
MultiplexingDiscovery queries multiple PeerDiscovery objects, optionally shuffles their responses and then returns the results, + thus selecting randomly between them and reducing the influence of any particular seed.
+
+
MultiplexingDiscovery(Network, List<PeerDiscovery>) - Constructor for class org.bitcoinj.net.discovery.MultiplexingDiscovery
+
+
Will query the given seeds in parallel before producing a merged response.
+
+
MultiplexingDiscovery(NetworkParameters, List<PeerDiscovery>) - Constructor for class org.bitcoinj.net.discovery.MultiplexingDiscovery
+
+ +
+
multiply(long) - Method in class org.bitcoinj.base.Coin
+
 
+
multiply(long) - Method in class org.bitcoinj.base.utils.Fiat
+
 
+
multiply(BigInteger) - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
murmurHash3(byte[], long, int, byte[]) - Static method in class org.bitcoinj.core.BloomFilter
+
+
Applies the MurmurHash3 (x86_32) algorithm to the given data.
+
+
myUnspents - Variable in class org.bitcoinj.wallet.Wallet
+
 
+
+

N

+
+
NativeBlockChainListener - Class in org.bitcoinj.jni
+
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
+
NativeBlockChainListener() - Constructor for class org.bitcoinj.jni.NativeBlockChainListener
+
+
Deprecated.
+
NativeFutureCallback - Class in org.bitcoinj.jni
+
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
+
NativeFutureCallback() - Constructor for class org.bitcoinj.jni.NativeFutureCallback
+
+
Deprecated.
+
NativeKeyChainEventListener - Class in org.bitcoinj.jni
+
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
+
NativeKeyChainEventListener() - Constructor for class org.bitcoinj.jni.NativeKeyChainEventListener
+
+
Deprecated.
+
NativeScriptsChangeEventListener - Class in org.bitcoinj.jni
+
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
+
NativeScriptsChangeEventListener() - Constructor for class org.bitcoinj.jni.NativeScriptsChangeEventListener
+
+
Deprecated.
+
NativeTransactionConfidenceEventListener - Class in org.bitcoinj.jni
+
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
+
NativeTransactionConfidenceEventListener() - Constructor for class org.bitcoinj.jni.NativeTransactionConfidenceEventListener
+
+
Deprecated.
+
NativeTransactionConfidenceListener - Class in org.bitcoinj.jni
+
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
+
NativeTransactionConfidenceListener() - Constructor for class org.bitcoinj.jni.NativeTransactionConfidenceListener
+
+
Deprecated.
+
NativeWalletChangeEventListener - Class in org.bitcoinj.jni
+
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
+
NativeWalletChangeEventListener() - Constructor for class org.bitcoinj.jni.NativeWalletChangeEventListener
+
+
Deprecated.
+
NativeWalletCoinsReceivedEventListener - Class in org.bitcoinj.jni
+
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
+
NativeWalletCoinsReceivedEventListener() - Constructor for class org.bitcoinj.jni.NativeWalletCoinsReceivedEventListener
+
+
Deprecated.
+
NativeWalletCoinsSentEventListener - Class in org.bitcoinj.jni
+
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
+
NativeWalletCoinsSentEventListener() - Constructor for class org.bitcoinj.jni.NativeWalletCoinsSentEventListener
+
+
Deprecated.
+
NativeWalletReorganizeEventListener - Class in org.bitcoinj.jni
+
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
+
NativeWalletReorganizeEventListener() - Constructor for class org.bitcoinj.jni.NativeWalletReorganizeEventListener
+
+
Deprecated.
+
negate() - Method in class org.bitcoinj.base.Coin
+
 
+
negate() - Method in class org.bitcoinj.base.utils.Fiat
+
 
+
negate() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
NEGATIVE_SATOSHI - Static variable in class org.bitcoinj.base.Coin
+
+
Represents a monetary value of minus one satoshi.
+
+
negativeSign(char) - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Set character to prefix negative values.
+
+
NegativeValueOutput() - Constructor for exception org.bitcoinj.core.VerificationException.NegativeValueOutput
+
 
+
negify(String) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Guarantee a formatting pattern has a subpattern for negative values.
+
+
netParams - Variable in class org.bitcoinj.net.discovery.MultiplexingDiscovery
+
+
Deprecated.
+
+
network - Variable in class org.bitcoinj.base.LegacyAddress
+
 
+
network - Variable in class org.bitcoinj.base.SegwitAddress
+
 
+
network - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
network - Variable in class org.bitcoinj.crypto.EncodedPrivateKey
+
 
+
network - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
network - Variable in class org.bitcoinj.wallet.Wallet
+
 
+
network() - Method in interface org.bitcoinj.base.Address
+
+
Get the network this address is used on.
+
+
network() - Method in class org.bitcoinj.base.LegacyAddress
+
+
Get the network this address works on.
+
+
network() - Method in class org.bitcoinj.base.SegwitAddress
+
+
Get the network this address works on.
+
+
network() - Method in class org.bitcoinj.core.NetworkParameters
+
 
+
network() - Method in interface org.bitcoinj.core.UTXOProvider
+
+
The Network of this provider.
+
+
network() - Method in class org.bitcoinj.crypto.EncodedPrivateKey
+
+
Get the network this data is prefixed with.
+
+
network() - Method in class org.bitcoinj.kits.WalletAppKit
+
 
+
network() - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
network() - Method in class org.bitcoinj.wallet.Wallet
+
 
+
Network - Interface in org.bitcoinj.base
+
+
Interface for a generic Bitcoin-like cryptocurrency network.
+
+
NETWORK - Enum constant in enum class org.bitcoinj.core.TransactionConfidence.Source
+
+
We got this transaction from a network peer.
+
+
NetworkParameters - Class in org.bitcoinj.core
+
+
NetworkParameters contains the data needed for working with an instantiation of a Bitcoin chain.
+
+
NetworkParameters(Network) - Constructor for class org.bitcoinj.core.NetworkParameters
+
 
+
Networks - Class in org.bitcoinj.params
+
+
Utility class that holds all the registered NetworkParameters types used for address auto discovery.
+
+
Networks() - Constructor for class org.bitcoinj.params.Networks
+
 
+
NewBestBlockListener - Interface in org.bitcoinj.core.listeners
+
+
Listener interface for when a new block on the best chain is seen.
+
+
newDigest() - Static method in class org.bitcoinj.base.Sha256Hash
+
+
Returns a new SHA-256 MessageDigest instance.
+
+
newThread(Runnable) - Method in class org.bitcoinj.utils.ContextPropagatingThreadFactory
+
 
+
newThread(Runnable) - Method in class org.bitcoinj.utils.DaemonThreadFactory
+
 
+
next() - Method in class org.bitcoinj.utils.BlockFileLoader.BlockFileIterator
+
 
+
NioClient - Class in org.bitcoinj.net
+
+
Creates a simple connection to a server using a StreamConnection to process data.
+
+
NioClient(SocketAddress, StreamConnection, Duration) - Constructor for class org.bitcoinj.net.NioClient
+
+
Creates a new client to the given server address using the given StreamConnection to decode the data.
+
+
NioClientManager - Class in org.bitcoinj.net
+
+
A class which manages a set of client connections.
+
+
NioClientManager() - Constructor for class org.bitcoinj.net.NioClientManager
+
+
Creates a new client manager which uses Java NIO for socket management.
+
+
NioServer - Class in org.bitcoinj.net
+
+
Creates a simple server listener which listens for incoming client connections and uses a StreamConnection to + process data.
+
+
NioServer(StreamConnectionFactory, InetSocketAddress) - Constructor for class org.bitcoinj.net.NioServer
+
+
Creates a new server which is capable of listening for incoming connections and processing client provided data + using StreamConnections created by the given StreamConnectionFactory
+
+
NO_SEQUENCE - Static variable in class org.bitcoinj.core.TransactionInput
+
+
Magic sequence number that indicates there is no sequence number.
+
+
NO_SUCH_TX - Enum constant in enum class org.bitcoinj.core.TransactionInput.ConnectionResult
+
 
+
noCode() - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Don't display currency code when formatting.
+
+
NODE_BITCOIN_CASH - Static variable in class org.bitcoinj.core.Services
+
+
A service bit used by Bitcoin-ABC to announce Bitcoin Cash nodes.
+
+
NODE_BITCOIN_CASH - Static variable in class org.bitcoinj.core.VersionMessage
+
+
Deprecated. + +
+
+
NODE_BLOOM - Static variable in class org.bitcoinj.core.Services
+
+
A service bit that denotes whether the peer supports BIP37 bloom filters or not.
+
+
NODE_BLOOM - Static variable in class org.bitcoinj.core.VersionMessage
+
+
Deprecated. + +
+
+
NODE_COMPACT_FILTERS - Static variable in class org.bitcoinj.core.Services
+
+
Indicates the node will service basic block filter requests (BIP157, BIP158).
+
+
NODE_NETWORK - Static variable in class org.bitcoinj.core.Services
+
+
A service bit that denotes whether the peer has a full copy of the block chain or not.
+
+
NODE_NETWORK - Static variable in class org.bitcoinj.core.VersionMessage
+
+
Deprecated. + +
+
+
NODE_NETWORK_LIMITED - Static variable in class org.bitcoinj.core.Services
+
+
A service bit that denotes whether the peer has at least the last two days worth of blockchain (BIP159).
+
+
NODE_NETWORK_LIMITED - Static variable in class org.bitcoinj.core.VersionMessage
+
+ +
+
NODE_P2P_V2 - Static variable in class org.bitcoinj.core.Services
+
+
Indicates the node supports BIP324 transport.
+
+
NODE_WITNESS - Static variable in class org.bitcoinj.core.Services
+
+
Indicates that a node can be asked for blocks and transactions including witness data.
+
+
NODE_WITNESS - Static variable in class org.bitcoinj.core.VersionMessage
+
+
Deprecated. + +
+
+
NON_FINAL - Enum constant in enum class org.bitcoinj.wallet.RiskAnalysis.Result
+
 
+
NON_STANDARD - Enum constant in enum class org.bitcoinj.wallet.RiskAnalysis.Result
+
 
+
NoncanonicalSignature() - Constructor for exception org.bitcoinj.core.VerificationException.NoncanonicalSignature
+
 
+
nonce() - Method in class org.bitcoinj.core.Ping
+
 
+
nonce() - Method in class org.bitcoinj.core.Pong
+
+
Returns the nonce sent by the remote peer.
+
+
none() - Static method in class org.bitcoinj.core.Services
+
+
Constructs a services bitfield representing "no node services".
+
+
NONE - Enum constant in enum class org.bitcoinj.core.Transaction.SigHash
+
 
+
NONE - Enum constant in enum class org.bitcoinj.wallet.DefaultRiskAnalysis.RuleViolation
+
 
+
NONEMPTY_STACK - Enum constant in enum class org.bitcoinj.wallet.DefaultRiskAnalysis.RuleViolation
+
 
+
nonFinal - Variable in class org.bitcoinj.wallet.DefaultRiskAnalysis
+
 
+
NONSTANDARD - Enum constant in enum class org.bitcoinj.core.RejectMessage.RejectCode
+
+
The message described an object was not standard and was thus not accepted.
+
+
NORMAL - Enum constant in enum class org.bitcoinj.crypto.HDKeyDerivation.PublicDeriveMode
+
 
+
normalize() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
notFoundCache - Variable in class org.bitcoinj.store.SPVBlockStore
+
 
+
NotFoundMessage - Class in org.bitcoinj.core
+
+
Sent by a peer when a getdata request doesn't find the requested data in the mempool.
+
+
NotFoundMessage() - Constructor for class org.bitcoinj.core.NotFoundMessage
+
+
Deprecated.
+
+
NotFoundMessage(List<InventoryItem>) - Constructor for class org.bitcoinj.core.NotFoundMessage
+
 
+
notifyNewBestBlock(StoredBlock) - Method in interface org.bitcoinj.core.listeners.NewBestBlockListener
+
+ +
+
notifyNewBestBlock(StoredBlock) - Method in class org.bitcoinj.jni.NativeBlockChainListener
+
+
Deprecated.
+
notifyNewBestBlock(StoredBlock) - Method in class org.bitcoinj.wallet.Wallet
+
+
Called by the BlockChain when a new block on the best chain is seen, AFTER relevant wallet + transactions are extracted and sent to us UNLESS the new block caused a re-org, in which case this will + not be called (the Wallet.reorganize(StoredBlock, List, List) method will + call this one in that case).
+
+
notifyTransactionIsInBlock(Sha256Hash, StoredBlock, AbstractBlockChain.NewBlockType, int) - Method in interface org.bitcoinj.core.listeners.TransactionReceivedInBlockListener
+
+
Called by the BlockChain when we receive a new FilteredBlock that contains the given + transaction hash in its merkle tree.
+
+
notifyTransactionIsInBlock(Sha256Hash, StoredBlock, AbstractBlockChain.NewBlockType, int) - Method in class org.bitcoinj.jni.NativeBlockChainListener
+
+
Deprecated.
+
notifyTransactionIsInBlock(Sha256Hash, StoredBlock, AbstractBlockChain.NewBlockType, int) - Method in class org.bitcoinj.wallet.Wallet
+
+
Called by the BlockChain when we receive a new filtered block that contains a transactions previously + received by a call to Wallet.receivePending(org.bitcoinj.core.Transaction, java.util.List<org.bitcoinj.core.Transaction>, boolean).
+
+
notSettingChainHead() - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Called if we (possibly) previously called disconnectTransaction/connectTransactions, + but will not be calling preSetChainHead as a block failed verification.
+
+
notSettingChainHead() - Method in class org.bitcoinj.core.BlockChain
+
 
+
notSettingChainHead() - Method in class org.bitcoinj.core.FullPrunedBlockChain
+
 
+
NULLDUMMY - Enum constant in enum class org.bitcoinj.script.Script.VerifyFlag
+
 
+
num() - Method in class org.bitcoinj.crypto.ChildNumber
+
+
Returns the child number without the hardening bit set (i.e.
+
+
number(int, long) - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Adds the given number to the given index in the program.
+
+
number(long) - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Adds the given number to the end of the program.
+
+
numberFormat - Variable in class org.bitcoinj.utils.BtcFormat
+
 
+
numBloomFilterEntries() - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
numBloomFilterEntries() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
numBloomFilterEntries() - Method in interface org.bitcoinj.wallet.KeyChain
+
+
Returns the number of elements this chain wishes to insert into the Bloom filter.
+
+
numBroadcastPeers() - Method in class org.bitcoinj.core.TransactionConfidence
+
+ +
+
numBroadcastPeers(Sha256Hash) - Method in class org.bitcoinj.core.TxConfidenceTable
+
+
Returns the number of peers that have seen the given hash recently.
+
+
numCheckpoints() - Method in class org.bitcoinj.core.CheckpointManager
+
+
Returns the number of checkpoints that were loaded.
+
+
numConnectedPeers() - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns the number of currently connected peers.
+
+
numericId() - Method in enum class org.bitcoinj.base.ScriptType
+
+
Deprecated. +
Using ScriptType.id() to get a script identifier string is preferred.
+
+
+
numKeys() - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
numKeys() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
numKeys() - Method in interface org.bitcoinj.wallet.KeyChain
+
+
Returns the number of keys this key chain manages.
+
+
numKeys() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Returns the number of keys managed by this group, including the lookahead buffers.
+
+
numLeafKeysIssued() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Returns number of leaf keys used including both internal and external paths.
+
+
+

O

+
+
OBSOLETE - Enum constant in enum class org.bitcoinj.core.RejectMessage.RejectCode
+
+
The message was obsolete or described an object which is obsolete (e.g.
+
+
of(byte[]) - Static method in class org.bitcoinj.base.Sha256Hash
+
+
Creates a new instance containing the calculated (one-time) hash of the given bytes.
+
+
of(byte[]...) - Static method in class org.bitcoinj.core.TransactionWitness
+
+
Construct a transaction witness from a given list of arbitrary pushes.
+
+
of(long) - Static method in class org.bitcoinj.base.VarInt
+
+
Constructs a new VarInt with the given unsigned long value.
+
+
of(long) - Static method in class org.bitcoinj.core.LockTime
+
+
Wrap a raw value (as used in the Bitcoin protocol) into a lock time.
+
+
of(long) - Static method in class org.bitcoinj.core.Ping
+
+
Create a ping with a nonce value.
+
+
of(long) - Static method in class org.bitcoinj.core.Pong
+
+
Create a pong with a nonce value.
+
+
of(long) - Static method in class org.bitcoinj.core.Services
+
+
Wrap 64 bits, each representing a node service.
+
+
of(File) - Static method in class org.bitcoinj.base.Sha256Hash
+
+
Creates a new instance containing the calculated (one-time) hash of the given file's contents.
+
+
of(String) - Static method in enum class org.bitcoinj.base.ScriptType
+
+
Use this method to create a ScriptType from a known good script identifier string.
+
+
of(String) - Static method in enum class org.bitcoinj.base.SegwitAddress.SegwitHrp
+
 
+
of(String) - Static method in class org.bitcoinj.uri.BitcoinURI
+
+
Constructs a new BitcoinURI from the given string.
+
+
of(String, Network) - Static method in class org.bitcoinj.uri.BitcoinURI
+
+
Constructs a new object by trying to parse the input as a valid Bitcoin URI.
+
+
of(CompletableFuture<T>) - Static method in class org.bitcoinj.utils.ListenableCompletableFuture
+
+
Deprecated. +
Don't convert to ListenableCompletableFuture, use CompletableFuture directly.
+
+
+
of(List<byte[]>) - Static method in class org.bitcoinj.core.TransactionWitness
+
+
Construct a transaction witness from a given list of arbitrary pushes.
+
+
of(List<ECKey>, Script) - Static method in class org.bitcoinj.wallet.RedeemData
+
 
+
of(List<ScriptChunk>) - Static method in class org.bitcoinj.script.Script
+
+
Wraps given script chunks.
+
+
of(List<ScriptChunk>, Instant) - Static method in class org.bitcoinj.script.Script
+
+
Wraps given script chunks.
+
+
of(BitcoinNetwork) - Static method in class org.bitcoinj.params.BitcoinNetworkParams
+
+
Return network parameters for a BitcoinNetwork enum
+
+
of(Coin) - Static method in class org.bitcoinj.core.FeeFilterMessage
+
+
Create a fee filter message with a given fee rate.
+
+
of(Network) - Static method in class org.bitcoinj.core.NetworkParameters
+
+
Return network parameters for a Network.
+
+
of(ECKey, Script) - Static method in class org.bitcoinj.wallet.RedeemData
+
+
Creates RedeemData for P2PKH, P2WPKH or P2PK input.
+
+
ofBlock(Sha256Hash, boolean) - Static method in class org.bitcoinj.core.GetDataMessage
+
 
+
ofBlockHeight(int) - Static method in class org.bitcoinj.core.LockTime
+
+
Wrap a block height into a lock time.
+
+
ofBlocks(List<Block>) - Static method in class org.bitcoinj.core.InventoryMessage
+
 
+
ofBlocks(Block...) - Static method in class org.bitcoinj.core.InventoryMessage
+
 
+
ofBtc(BigDecimal) - Static method in class org.bitcoinj.base.Coin
+
+
Create a Coin from a decimal amount of BTC.
+
+
ofBytes(byte[], int) - Static method in class org.bitcoinj.base.VarInt
+
+
Constructs a new VarInt with the value parsed from the specified offset of the given buffer.
+
+
ofCode(int) - Static method in enum class org.bitcoinj.core.InventoryItem.Type
+
 
+
ofEntropy(byte[], String) - Static method in class org.bitcoinj.wallet.DeterministicSeed
+
+
Constructs a BIP 39 mnemonic code and a seed from a given entropy.
+
+
ofEntropy(byte[], String, Instant) - Static method in class org.bitcoinj.wallet.DeterministicSeed
+
+
Constructs a BIP 39 mnemonic code and a seed from a given entropy.
+
+
ofKeyParameter(KeyParameter) - Static method in class org.bitcoinj.crypto.AesKey
+
+
Deprecated. +
Use new AesKey(keyParameter.bytes())
+
+
+
ofMnemonic(String, String) - Static method in class org.bitcoinj.wallet.DeterministicSeed
+
+
Constructs a seed from a BIP 39 mnemonic code.
+
+
ofMnemonic(String, String, Instant) - Static method in class org.bitcoinj.wallet.DeterministicSeed
+
+
Constructs a seed from a BIP 39 mnemonic code.
+
+
ofMnemonic(List<String>, String) - Static method in class org.bitcoinj.wallet.DeterministicSeed
+
+
Constructs a seed from a BIP 39 mnemonic code.
+
+
ofMnemonic(List<String>, String, Instant) - Static method in class org.bitcoinj.wallet.DeterministicSeed
+
+
Constructs a seed from a BIP 39 mnemonic code.
+
+
ofNetwork(BitcoinNetwork) - Static method in enum class org.bitcoinj.base.LegacyAddress.AddressHeader
+
 
+
ofNetwork(BitcoinNetwork) - Static method in enum class org.bitcoinj.base.LegacyAddress.P2SHHeader
+
 
+
ofNetwork(BitcoinNetwork) - Static method in enum class org.bitcoinj.base.SegwitAddress.SegwitHrp
+
 
+
ofRandom(SecureRandom, int, String) - Static method in class org.bitcoinj.wallet.DeterministicSeed
+
+
Constructs a BIP 39 mnemonic code and a seed randomly.
+
+
ofSat(long) - Static method in class org.bitcoinj.base.Coin
+
+
Create a Coin from a long integer number of satoshis.
+
+
ofTimestamp(Instant) - Static method in class org.bitcoinj.core.LockTime
+
+
Wrap a timestamp into a lock time.
+
+
ofTransaction(Sha256Hash, boolean) - Static method in class org.bitcoinj.core.GetDataMessage
+
 
+
ofTransactions(List<Transaction>) - Static method in class org.bitcoinj.core.InventoryMessage
+
 
+
ofTransactions(Transaction...) - Static method in class org.bitcoinj.core.InventoryMessage
+
 
+
OK - Enum constant in enum class org.bitcoinj.wallet.RiskAnalysis.Result
+
 
+
onAddr(Peer, AddressMessage) - Method in interface org.bitcoinj.core.listeners.AddressEventListener
+
+
Called when a peer receives an addr or addrv2 message, usually in response to a + getaddr message.
+
+
onAfterAutoSave(File) - Method in interface org.bitcoinj.wallet.WalletFiles.Listener
+
+
Called on the auto-save thread after the newly created temporary file has been filled with data and renamed.
+
+
onBeforeAutoSave(File) - Method in interface org.bitcoinj.wallet.WalletFiles.Listener
+
+
Called on the auto-save thread when a new temporary file is created but before the wallet data is saved + to it.
+
+
onBlocksDownloaded(Peer, Block, FilteredBlock, int) - Method in interface org.bitcoinj.core.listeners.BlocksDownloadedEventListener
+
+
Called on a Peer thread when a block is received.
+
+
onBlocksDownloaded(Peer, Block, FilteredBlock, int) - Method in class org.bitcoinj.core.listeners.DownloadProgressTracker
+
 
+
onBroadcastProgress(double) - Method in interface org.bitcoinj.core.TransactionBroadcast.ProgressCallback
+
+
onBroadcastProgress will be invoked on the provided executor when the progress of the transaction + broadcast has changed, because the transaction has been announced by another peer or because the transaction + was found inside a mined block (in this case progress will go to 1.0 immediately).
+
+
onChainDownloadStarted(Peer, int) - Method in interface org.bitcoinj.core.listeners.ChainDownloadStartedEventListener
+
+
Called when a download is started with the initial number of blocks to be downloaded.
+
+
onChainDownloadStarted(Peer, int) - Method in class org.bitcoinj.core.listeners.DownloadProgressTracker
+
 
+
onCoinsReceived(Wallet, Transaction, Coin, Coin) - Method in class org.bitcoinj.jni.NativeWalletCoinsReceivedEventListener
+
+
Deprecated.
+
onCoinsReceived(Wallet, Transaction, Coin, Coin) - Method in interface org.bitcoinj.wallet.listeners.WalletCoinsReceivedEventListener
+
+
This is called when a transaction is seen that sends coins to this wallet, either because it + was broadcast across the network or because a block was received.
+
+
onCoinsSent(Wallet, Transaction, Coin, Coin) - Method in class org.bitcoinj.jni.NativeWalletCoinsSentEventListener
+
+
Deprecated.
+
onCoinsSent(Wallet, Transaction, Coin, Coin) - Method in interface org.bitcoinj.wallet.listeners.WalletCoinsSentEventListener
+
+
This is called when a transaction is seen that sends coins from this wallet, either + because it was broadcast across the network or because a block was received.
+
+
onConfidenceChanged(TransactionConfidence, TransactionConfidence.Listener.ChangeReason) - Method in interface org.bitcoinj.core.TransactionConfidence.Listener
+
 
+
onConfidenceChanged(TransactionConfidence, TransactionConfidence.Listener.ChangeReason) - Method in class org.bitcoinj.jni.NativeTransactionConfidenceListener
+
+
Deprecated.
+
onCurrentKeyChanged() - Method in interface org.bitcoinj.wallet.listeners.CurrentKeyChangeEventListener
+
+
Called by KeyChainGroup whenever a current key and/or address changes.
+
+
ONE - Static variable in class org.bitcoinj.crypto.ChildNumber
+
 
+
ONE_HARDENED - Static variable in class org.bitcoinj.crypto.ChildNumber
+
 
+
onFailure(Throwable) - Method in class org.bitcoinj.jni.NativeFutureCallback
+
+
Deprecated.
+
onKeysAdded(List<ECKey>) - Method in class org.bitcoinj.jni.NativeKeyChainEventListener
+
+
Deprecated.
+
onKeysAdded(List<ECKey>) - Method in class org.bitcoinj.wallet.listeners.AbstractKeyChainEventListener
+
 
+
onKeysAdded(List<ECKey>) - Method in interface org.bitcoinj.wallet.listeners.KeyChainEventListener
+
+
Called whenever a new key is added to the key chain, whether that be via an explicit addition or due to some + other automatic derivation.
+
+
onPeerConnected(Peer, int) - Method in interface org.bitcoinj.core.listeners.PeerConnectedEventListener
+
+
Called when a peer is connected.
+
+
onPeerDisconnected(Peer, int) - Method in interface org.bitcoinj.core.listeners.PeerDisconnectedEventListener
+
+
Called when a peer is disconnected.
+
+
onPeersDiscovered(Set<PeerAddress>) - Method in interface org.bitcoinj.core.listeners.PeerDiscoveredEventListener
+
+
Called when peers are discovered, this happens at startup of PeerGroup or if we run out of + suitable Peers to connect to.
+
+
onPreMessageReceived(Peer, Message) - Method in interface org.bitcoinj.core.listeners.PreMessageReceivedEventListener
+
+
Called when a message is received by a peer, before the message is processed.
+
+
onReorganize(Wallet) - Method in class org.bitcoinj.jni.NativeWalletReorganizeEventListener
+
+
Deprecated.
+
onReorganize(Wallet) - Method in interface org.bitcoinj.wallet.listeners.WalletReorganizeEventListener
+
+
This is called when a block is received that triggers a block chain re-organization.
+
+
onScriptsChanged(Wallet, List<Script>, boolean) - Method in class org.bitcoinj.jni.NativeScriptsChangeEventListener
+
+
Deprecated.
+
onScriptsChanged(Wallet, List<Script>, boolean) - Method in interface org.bitcoinj.wallet.listeners.ScriptsChangeEventListener
+
+
Called whenever a new watched script is added to the wallet.
+
+
onSetupCompleted() - Method in class org.bitcoinj.kits.WalletAppKit
+
+
This method is invoked on a background thread after all objects are initialised, but before the peer group + or block chain download is started.
+
+
onSuccess(Object) - Method in class org.bitcoinj.jni.NativeFutureCallback
+
+
Deprecated.
+
onTransaction(Peer, Transaction) - Method in interface org.bitcoinj.core.listeners.OnTransactionBroadcastListener
+
+
Called when a new transaction is broadcast over the network.
+
+
OnTransactionBroadcastListener - Interface in org.bitcoinj.core.listeners
+
+
Called when a new transaction is broadcast over the network.
+
+
onTransactionConfidenceChanged(Wallet, Transaction) - Method in interface org.bitcoinj.core.listeners.TransactionConfidenceEventListener
+
+
Called when a transaction changes its confidence level.
+
+
onTransactionConfidenceChanged(Wallet, Transaction) - Method in class org.bitcoinj.jni.NativeTransactionConfidenceEventListener
+
+
Deprecated.
+
onWalletChanged(Wallet) - Method in class org.bitcoinj.jni.NativeWalletChangeEventListener
+
+
Deprecated.
+
onWalletChanged(Wallet) - Method in interface org.bitcoinj.wallet.listeners.WalletChangeEventListener
+
+
Designed for GUI applications to refresh their transaction lists.
+
+
op(int) - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Adds the given opcode to the end of the program.
+
+
op(int, int) - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Adds the given opcode to the given index in the program
+
+
OP_0 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_0NOTEQUAL - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_1 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_10 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_11 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_12 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_13 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_14 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_15 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_16 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_1ADD - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_1NEGATE - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_1SUB - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_2 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_2DIV - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_2DROP - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_2DUP - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_2MUL - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_2OVER - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_2ROT - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_2SWAP - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_3 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_3DUP - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_4 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_5 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_6 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_7 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_8 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_9 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_ABS - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_ADD - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_AND - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_BOOLAND - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_BOOLOR - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_CAT - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_CHECKLOCKTIMEVERIFY - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
+
Check lock time of the block.
+
+
OP_CHECKMULTISIG - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_CHECKMULTISIGVERIFY - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_CHECKSEQUENCEVERIFY - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_CHECKSIG - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_CHECKSIGVERIFY - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_CODESEPARATOR - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_DEPTH - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_DIV - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_DROP - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_DUP - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_ELSE - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_ENDIF - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_EQUAL - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_EQUALVERIFY - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_FALSE - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_FROMALTSTACK - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_GREATERTHAN - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_GREATERTHANOREQUAL - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_HASH160 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_HASH256 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_IF - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_IFDUP - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_INVALIDOPCODE - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_INVERT - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_LEFT - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_LESSTHAN - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_LESSTHANOREQUAL - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_LSHIFT - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_MAX - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_MIN - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_MOD - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_MUL - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_NEGATE - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_NIP - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_NOP - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_NOP1 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_NOP10 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_NOP2 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
+
Deprecated.
+
+
OP_NOP3 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
+
Deprecated.
+
+
OP_NOP4 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_NOP5 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_NOP6 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_NOP7 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_NOP8 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_NOP9 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_NOT - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_NOTIF - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_NUMEQUAL - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_NUMEQUALVERIFY - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_NUMNOTEQUAL - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_OR - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_OVER - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_PICK - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_PUSHDATA1 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_PUSHDATA2 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_PUSHDATA4 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_RESERVED - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_RESERVED1 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_RESERVED2 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_RETURN - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_RIGHT - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_RIPEMD160 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_ROLL - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_ROT - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_RSHIFT - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_SHA1 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_SHA256 - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_SIZE - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_SUB - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_SUBSTR - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_SWAP - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_TOALTSTACK - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_TRUE - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_TUCK - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_VER - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_VERIF - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_VERIFY - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_VERNOTIF - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_WITHIN - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
OP_XOR - Static variable in class org.bitcoinj.script.ScriptOpCodes
+
 
+
opcode - Variable in class org.bitcoinj.script.ScriptChunk
+
+
Operation to be executed.
+
+
openConnection(SocketAddress, StreamConnection) - Method in class org.bitcoinj.net.BlockingClientManager
+
 
+
openConnection(SocketAddress, StreamConnection) - Method in interface org.bitcoinj.net.ClientConnectionManager
+
+
Creates a new connection to the given address, with the given connection used to handle incoming data.
+
+
openConnection(SocketAddress, StreamConnection) - Method in class org.bitcoinj.net.NioClientManager
+
 
+
OPENJDK - Enum constant in enum class org.bitcoinj.base.internal.PlatformUtils.Runtime
+
 
+
openStream(NetworkParameters) - Static method in class org.bitcoinj.core.CheckpointManager
+
+
Returns a checkpoints stream pointing to inside the bitcoinj JAR
+
+
opFalse() - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Adds false to the end of the program.
+
+
opFalse(int) - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Adds false to the given index in the program.
+
+
optionalDecimals(int...) - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
+ Set additional groups of decimals to use after the minimum decimals, if they are useful for expressing precision.
+
+
OptionalFieldValidationException - Exception in org.bitcoinj.uri
+
+
Exception to provide the following to BitcoinURI:
+
+
OptionalFieldValidationException(String) - Constructor for exception org.bitcoinj.uri.OptionalFieldValidationException
+
 
+
OptionalFieldValidationException(String, Throwable) - Constructor for exception org.bitcoinj.uri.OptionalFieldValidationException
+
 
+
opTrue() - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Adds true to the end of the program.
+
+
opTrue(int) - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Adds true to the given index in the program.
+
+
ORACLE_JAVA - Enum constant in enum class org.bitcoinj.base.internal.PlatformUtils.Runtime
+
 
+
org.bitcoinj.base - package org.bitcoinj.base
+
+
The base package provides foundational types for bitcoinj.
+
+
org.bitcoinj.base.exceptions - package org.bitcoinj.base.exceptions
+
 
+
org.bitcoinj.base.internal - package org.bitcoinj.base.internal
+
 
+
org.bitcoinj.base.utils - package org.bitcoinj.base.utils
+
 
+
org.bitcoinj.core - package org.bitcoinj.core
+
+
The core package contains classes for network messages like Block and + Transaction, peer connectivity via PeerGroup, + and block chain management.
+
+
org.bitcoinj.core.internal - package org.bitcoinj.core.internal
+
 
+
org.bitcoinj.core.listeners - package org.bitcoinj.core.listeners
+
 
+
org.bitcoinj.crypto - package org.bitcoinj.crypto
+
+
The crypto package contains classes that work with key derivation algorithms like scrypt (passwords to AES keys), + BIP 32 hierarchies (chains of keys from a root seed), X.509 utilities for the payment protocol and other general + cryptography tasks.
+
+
org.bitcoinj.crypto.internal - package org.bitcoinj.crypto.internal
+
 
+
org.bitcoinj.crypto.utils - package org.bitcoinj.crypto.utils
+
 
+
org.bitcoinj.jni - package org.bitcoinj.jni
+
 
+
org.bitcoinj.kits - package org.bitcoinj.kits
+
+
High level wrapper APIs around the bitcoinj building blocks.
+
+
org.bitcoinj.net - package org.bitcoinj.net
+
+
Classes handling low level network management using either NIO (async io) or older style blocking sockets (useful for + using SOCKS proxies, Tor, SSL etc).
+
+
org.bitcoinj.net.discovery - package org.bitcoinj.net.discovery
+
+
Classes that know how to discover peers in the P2P network using DNS or HTTP.
+
+
org.bitcoinj.params - package org.bitcoinj.params
+
+
Network parameters encapsulate some of the differences between different Bitcoin networks such as the main + network, the testnet, regtest mode, unit testing params and so on.
+
+
org.bitcoinj.protocols.payments - package org.bitcoinj.protocols.payments
+
+
The BIP70 payment protocol wraps Bitcoin transactions and adds various useful features like memos, refund addresses + and authentication.
+
+
org.bitcoinj.script - package org.bitcoinj.script
+
+
Classes for working with and executing Bitcoin script programs, as embedded in inputs and outputs.
+
+
org.bitcoinj.signers - package org.bitcoinj.signers
+
+
Transaction signers know how to calculate signatures over transactions in different contexts, for example, using + local private keys or fetching them from remote servers.
+
+
org.bitcoinj.store - package org.bitcoinj.store
+
+
Block stores persist blockchain data downloaded from remote peers.
+
+
org.bitcoinj.testing - package org.bitcoinj.testing
+
 
+
org.bitcoinj.uri - package org.bitcoinj.uri
+
+
Parsing and handling of bitcoin: textual URIs as found in qr codes and web links.
+
+
org.bitcoinj.utils - package org.bitcoinj.utils
+
+
Formatting monetary amounts, representing exchange rates, a program for loading Bitcoin Core saved block files, + a class to control how bitcoinj uses threads and misc other utility classes that don't fit anywhere else.
+
+
org.bitcoinj.wallet - package org.bitcoinj.wallet
+
+
Classes that support the Wallet, which knows how to find and save transactions relevant to + a set of keys or scripts, calculate balances, and spend money: the wallet has many features and can be extended + in various ways, please refer to the website for documentation on how to use it.
+
+
org.bitcoinj.wallet.listeners - package org.bitcoinj.wallet.listeners
+
 
+
os - Static variable in class org.bitcoinj.base.internal.PlatformUtils
+
 
+
OTHER - Enum constant in enum class org.bitcoinj.core.RejectMessage.RejectCode
+
 
+
Output(Coin, byte[]) - Constructor for class org.bitcoinj.protocols.payments.PaymentProtocol.Output
+
 
+
outputs() - Method in class org.bitcoinj.wallet.CoinSelection
+
 
+
outputScriptType - Variable in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
 
+
outputScriptType(ScriptType) - Method in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
 
+
+

P

+
+
P2PK - Enum constant in enum class org.bitcoinj.base.ScriptType
+
 
+
P2PKH - Enum constant in enum class org.bitcoinj.base.ScriptType
+
 
+
p2sh - Variable in class org.bitcoinj.base.LegacyAddress
+
+
True if P2SH, false if P2PKH.
+
+
P2SH - Enum constant in enum class org.bitcoinj.base.ScriptType
+
 
+
P2SH - Enum constant in enum class org.bitcoinj.script.Script.VerifyFlag
+
 
+
p2shHeader - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
P2TR - Enum constant in enum class org.bitcoinj.base.ScriptType
+
 
+
P2WPKH - Enum constant in enum class org.bitcoinj.base.ScriptType
+
 
+
P2WSH - Enum constant in enum class org.bitcoinj.base.ScriptType
+
 
+
packetMagic - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
params - Variable in class org.bitcoinj.core.AbstractBlockChain
+
+
network parameters for this chain
+
+
params - Variable in class org.bitcoinj.core.CheckpointManager
+
 
+
params - Variable in class org.bitcoinj.core.PeerGroup
+
 
+
params - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
params - Variable in class org.bitcoinj.store.SPVBlockStore
+
 
+
params - Variable in class org.bitcoinj.wallet.Wallet
+
 
+
params() - Method in class org.bitcoinj.kits.WalletAppKit
+
 
+
Params() - Constructor for class org.bitcoinj.utils.ExponentialBackoff.Params
+
+
Construct params with default values.
+
+
Params(Duration, float, Duration) - Constructor for class org.bitcoinj.utils.ExponentialBackoff.Params
+
 
+
paramsFromPmtProtocolID(String) - Static method in class org.bitcoinj.protocols.payments.PaymentProtocol
+
+
Return network parameters for a paymentProtocol ID string
+
+
parent - Variable in class org.bitcoinj.core.TransactionOutput
+
 
+
parent() - Method in class org.bitcoinj.crypto.HDPath
+
+
Return the parent path.
+
+
parse(byte[]) - Static method in class org.bitcoinj.script.Script
+
+
Construct a script that copies and wraps a given program.
+
+
parse(byte[], Instant) - Static method in class org.bitcoinj.script.Script
+
+
Construct a script that copies and wraps a given program.
+
+
parse(String) - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Parse a human-readable coin value to a Coin instance.
+
+
parse(String) - Method in class org.bitcoinj.utils.BtcFormat
+
+
Parse a String representation of a Bitcoin monetary value.
+
+
parse(String, ParsePosition) - Method in class org.bitcoinj.utils.BtcFormat
+
+
Parse a String representation of a Bitcoin monetary value.
+
+
parseAddress(String) - Method in interface org.bitcoinj.base.AddressParser
+
+
Parse an address for a configured set of Networks.
+
+
parseAddress(String) - Method in class org.bitcoinj.wallet.Wallet
+
+
Parse an address string using all formats this wallet knows about for the wallet's network type
+
+
parseCoin(String) - Static method in class org.bitcoinj.base.Coin
+
+
Create a Coin by parsing a String amount expressed in "the way humans are used to".
+
+
parseCoinInexact(String) - Static method in class org.bitcoinj.base.Coin
+
+
Create a Coin by parsing a String amount expressed in "the way humans are used to".
+
+
parseFiat(String, String) - Static method in class org.bitcoinj.base.utils.Fiat
+
+
Parses an amount expressed in the way humans are used to.
+
+
parseFiat(String, String) - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Parse a human-readable fiat value to a Fiat instance.
+
+
parseFiatInexact(String, String) - Static method in class org.bitcoinj.base.utils.Fiat
+
+
Parses an amount expressed in the way humans are used to.
+
+
parseHex(String) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
 
+
parseHex(String) - Method in class org.bitcoinj.base.internal.HexFormat
+
 
+
parseObject(String, ParsePosition) - Method in class org.bitcoinj.utils.BtcFormat
+
+
Parse a String representation of a Bitcoin monetary value.
+
+
parsePath(String) - Static method in class org.bitcoinj.crypto.HDPath
+
+
Create an HDPath from a path string.
+
+
parsePaymentAck(Protos.PaymentACK) - Static method in class org.bitcoinj.protocols.payments.PaymentProtocol
+
+
Parse payment ack into an object.
+
+
parsePaymentRequest(Protos.PaymentRequest) - Static method in class org.bitcoinj.protocols.payments.PaymentProtocol
+
+
Parse a payment request.
+
+
parseToProto(InputStream) - Static method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
+
Returns the loaded protocol buffer from the given byte stream.
+
+
parseTransactionsFromPaymentMessage(NetworkParameters, Protos.Payment) - Static method in class org.bitcoinj.protocols.payments.PaymentProtocol
+
+
Parse transactions from payment message.
+
+
PARTIAL_ADDRESS_COMPARATOR - Static variable in interface org.bitcoinj.base.Address
+
+
Comparator for the first two comparison fields in Address comparisons, see Address.compareTo(Address).
+
+
PartialMerkleTree - Class in org.bitcoinj.core
+
+
A data structure that contains proofs of block inclusion for one or more transactions, in an efficient manner.
+
+
PartialMerkleTree(int, List<Sha256Hash>, byte[]) - Constructor for class org.bitcoinj.core.PartialMerkleTree
+
+
Constructs a new PMT with the given bit set (little endian) and the raw list of hashes including internal hashes, + taking ownership of the list.
+
+
partialTx - Variable in class org.bitcoinj.signers.TransactionSigner.ProposedTransaction
+
 
+
passesCheckpoint(int, Sha256Hash) - Method in class org.bitcoinj.core.NetworkParameters
+
+
Validate the hash for a given block height against checkpoints
+
+
passphrase - Variable in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
 
+
passphrase(String) - Method in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
+
The passphrase to use with the generated mnemonic, or null if you would like to use the default empty string.
+
+
pattern() - Method in class org.bitcoinj.utils.BtcFormat
+
+
Return a representation of the pattern used by this instance for formatting and + parsing.
+
+
pattern(String) - Method in class org.bitcoinj.utils.BtcFormat.Builder
+
+
Use the given pattern when formatting and parsing.
+
+
PAYMENT_PROTOCOL_ID_MAINNET - Static variable in class org.bitcoinj.core.NetworkParameters
+
+
Deprecated.
+
+
PAYMENT_PROTOCOL_ID_MAINNET - Static variable in class org.bitcoinj.protocols.payments.PaymentProtocol
+
+
The string used by the payment protocol to represent the main net.
+
+
PAYMENT_PROTOCOL_ID_REGTEST - Static variable in class org.bitcoinj.core.NetworkParameters
+
+
Deprecated.
+
+
PAYMENT_PROTOCOL_ID_REGTEST - Static variable in class org.bitcoinj.protocols.payments.PaymentProtocol
+
 
+
PAYMENT_PROTOCOL_ID_SIGNET - Static variable in class org.bitcoinj.core.NetworkParameters
+
+
Deprecated.
+
+
PAYMENT_PROTOCOL_ID_SIGNET - Static variable in class org.bitcoinj.protocols.payments.PaymentProtocol
+
+
The string used by the payment protocol to represent signet (note that this is non-standard).
+
+
PAYMENT_PROTOCOL_ID_TESTNET - Static variable in class org.bitcoinj.core.NetworkParameters
+
+
Deprecated.
+
+
PAYMENT_PROTOCOL_ID_TESTNET - Static variable in class org.bitcoinj.protocols.payments.PaymentProtocol
+
+
The string used by the payment protocol to represent the test net.
+
+
PAYMENT_PROTOCOL_ID_UNIT_TESTS - Static variable in class org.bitcoinj.core.NetworkParameters
+
+
Deprecated.
+
+
PAYMENT_PROTOCOL_ID_UNIT_TESTS - Static variable in class org.bitcoinj.protocols.payments.PaymentProtocol
+
+
The string used by the payment protocol to represent unit testing (note that this is non-standard).
+
+
PaymentProtocol - Class in org.bitcoinj.protocols.payments
+
+
Utility methods and constants for working with + BIP 70 aka the payment protocol.
+
+
PaymentProtocol() - Constructor for class org.bitcoinj.protocols.payments.PaymentProtocol
+
 
+
PaymentProtocol.Ack - Class in org.bitcoinj.protocols.payments
+
+
Message returned by the merchant in response to a Payment message.
+
+
PaymentProtocol.Output - Class in org.bitcoinj.protocols.payments
+
+
Value object to hold amount/script pairs.
+
+
PaymentProtocol.PkiVerificationData - Class in org.bitcoinj.protocols.payments
+
+
Information about the X.509 signature's issuer and subject.
+
+
PaymentProtocolException - Exception in org.bitcoinj.protocols.payments
+
 
+
PaymentProtocolException(Exception) - Constructor for exception org.bitcoinj.protocols.payments.PaymentProtocolException
+
 
+
PaymentProtocolException(String) - Constructor for exception org.bitcoinj.protocols.payments.PaymentProtocolException
+
 
+
PaymentProtocolException.Expired - Exception in org.bitcoinj.protocols.payments
+
 
+
PaymentProtocolException.InvalidNetwork - Exception in org.bitcoinj.protocols.payments
+
 
+
PaymentProtocolException.InvalidOutputs - Exception in org.bitcoinj.protocols.payments
+
 
+
PaymentProtocolException.InvalidPaymentRequestURL - Exception in org.bitcoinj.protocols.payments
+
 
+
PaymentProtocolException.InvalidPaymentURL - Exception in org.bitcoinj.protocols.payments
+
 
+
PaymentProtocolException.InvalidPkiData - Exception in org.bitcoinj.protocols.payments
+
 
+
PaymentProtocolException.InvalidPkiType - Exception in org.bitcoinj.protocols.payments
+
 
+
PaymentProtocolException.InvalidVersion - Exception in org.bitcoinj.protocols.payments
+
 
+
PaymentProtocolException.PkiVerificationException - Exception in org.bitcoinj.protocols.payments
+
 
+
PaymentSession - Class in org.bitcoinj.protocols.payments
+
+
Provides a standard implementation of the Payment Protocol (BIP 0070)
+
+
PaymentSession(Protos.PaymentRequest) - Constructor for class org.bitcoinj.protocols.payments.PaymentSession
+
+
Creates a PaymentSession from the provided Protos.PaymentRequest.
+
+
PaymentSession(Protos.PaymentRequest, boolean) - Constructor for class org.bitcoinj.protocols.payments.PaymentSession
+
+
Creates a PaymentSession from the provided Protos.PaymentRequest.
+
+
PaymentSession(Protos.PaymentRequest, boolean, TrustStoreLoader) - Constructor for class org.bitcoinj.protocols.payments.PaymentSession
+
+
Creates a PaymentSession from the provided Protos.PaymentRequest.
+
+
PBKDF2SHA512 - Class in org.bitcoinj.crypto
+
+
This is a clean-room implementation of PBKDF2 using RFC 2898 as a reference.
+
+
PBKDF2SHA512() - Constructor for class org.bitcoinj.crypto.PBKDF2SHA512
+
 
+
Peer - Class in org.bitcoinj.core
+
+
A Peer handles the high level communication with a Bitcoin node, extending a PeerSocketHandler which + handles low-level message (de)serialization.
+
+
Peer(NetworkParameters, AbstractBlockChain, PeerAddress, String, String) - Constructor for class org.bitcoinj.core.Peer
+
+
Construct a peer that reads/writes from the given chain.
+
+
Peer(NetworkParameters, VersionMessage, AbstractBlockChain, PeerAddress) - Constructor for class org.bitcoinj.core.Peer
+
+ +
+
Peer(NetworkParameters, VersionMessage, PeerAddress, AbstractBlockChain) - Constructor for class org.bitcoinj.core.Peer
+
+
Construct a peer that reads/writes from the given block chain.
+
+
Peer(NetworkParameters, VersionMessage, PeerAddress, AbstractBlockChain, long, int) - Constructor for class org.bitcoinj.core.Peer
+
+
Construct a peer that reads/writes from the given block chain.
+
+
peerAddress - Variable in class org.bitcoinj.core.PeerSocketHandler
+
 
+
PeerAddress - Class in org.bitcoinj.core
+
+
A PeerAddress holds an IP address and port number representing the network location of + a peer in the Bitcoin P2P network.
+
+
peerAddresses - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
PeerConnectedEventListener - Interface in org.bitcoinj.core.listeners
+
+
Implementors can listen to events indicating a new peer connecting.
+
+
peerConnectedEventListeners - Variable in class org.bitcoinj.core.PeerGroup
+
+
Callbacks for events related to peers connecting
+
+
PeerDataEventListener - Interface in org.bitcoinj.core.listeners
+
+ +
+
PeerDisconnectedEventListener - Interface in org.bitcoinj.core.listeners
+
+
Implementors can listen to events indicating a peer disconnecting.
+
+
peerDisconnectedEventListeners - Variable in class org.bitcoinj.core.PeerGroup
+
+
Callbacks for events related to peers disconnecting
+
+
PeerDiscoveredEventListener - Interface in org.bitcoinj.core.listeners
+
+
Implementors can listen to events for peers being discovered.
+
+
peerDiscoveredEventListeners - Variable in class org.bitcoinj.core.PeerGroup
+
+
Callbacks for events related to peer connection/disconnection
+
+
PeerDiscovery - Interface in org.bitcoinj.net.discovery
+
+
A PeerDiscovery object is responsible for finding addresses of other nodes in the Bitcoin P2P network.
+
+
PeerDiscoveryException - Exception in org.bitcoinj.net.discovery
+
 
+
PeerDiscoveryException() - Constructor for exception org.bitcoinj.net.discovery.PeerDiscoveryException
+
 
+
PeerDiscoveryException(String) - Constructor for exception org.bitcoinj.net.discovery.PeerDiscoveryException
+
 
+
PeerDiscoveryException(String, Throwable) - Constructor for exception org.bitcoinj.net.discovery.PeerDiscoveryException
+
 
+
PeerDiscoveryException(Throwable) - Constructor for exception org.bitcoinj.net.discovery.PeerDiscoveryException
+
 
+
PeerException - Exception in org.bitcoinj.core
+
+
Thrown when a problem occurs in communicating with a peer, and we should + retry.
+
+
PeerException(Exception) - Constructor for exception org.bitcoinj.core.PeerException
+
 
+
PeerException(String) - Constructor for exception org.bitcoinj.core.PeerException
+
 
+
PeerException(String, Exception) - Constructor for exception org.bitcoinj.core.PeerException
+
 
+
PeerFilterProvider - Interface in org.bitcoinj.core
+
+
An interface which provides the information required to properly filter data downloaded from Peers.
+
+
peerGroup() - Method in class org.bitcoinj.kits.WalletAppKit
+
 
+
PeerGroup - Class in org.bitcoinj.core
+
+
Runs a set of connections to the P2P network, brings up connections to replace disconnected nodes and manages + the interaction between them all.
+
+
PeerGroup(Network) - Constructor for class org.bitcoinj.core.PeerGroup
+
+
Creates a PeerGroup for the given network.
+
+
PeerGroup(Network, AbstractBlockChain) - Constructor for class org.bitcoinj.core.PeerGroup
+
+
Creates a PeerGroup for the given network and chain.
+
+
PeerGroup(Network, AbstractBlockChain, ClientConnectionManager) - Constructor for class org.bitcoinj.core.PeerGroup
+
+
Create a PeerGroup for the given network, chain and connection manager.
+
+
PeerGroup(Network, AbstractBlockChain, ClientConnectionManager, double) - Constructor for class org.bitcoinj.core.PeerGroup
+
+
Create a PeerGroup for the given network, chain and connection manager.
+
+
PeerGroup(NetworkParameters) - Constructor for class org.bitcoinj.core.PeerGroup
+
+
Deprecated. + +
+
+
PeerGroup(NetworkParameters, AbstractBlockChain) - Constructor for class org.bitcoinj.core.PeerGroup
+
+ +
+
PeerGroup(NetworkParameters, AbstractBlockChain, ClientConnectionManager, double) - Constructor for class org.bitcoinj.core.PeerGroup
+
+
Create a PeerGroup for the given network, chain and connection manager.
+
+
PeerGroup.FilterRecalculateMode - Enum Class in org.bitcoinj.core
+
 
+
PeerSocketHandler - Class in org.bitcoinj.core
+
+
Handles high-level message (de)serialization for peers, acting as the bridge between the + org.bitcoinj.net classes and Peer.
+
+
PeerSocketHandler(NetworkParameters, InetSocketAddress) - Constructor for class org.bitcoinj.core.PeerSocketHandler
+
 
+
PeerSocketHandler(NetworkParameters, PeerAddress) - Constructor for class org.bitcoinj.core.PeerSocketHandler
+
 
+
peersTransactionBroadastEventListeners - Variable in class org.bitcoinj.core.PeerGroup
+
 
+
PENDING - Enum constant in enum class org.bitcoinj.core.TransactionConfidence.ConfidenceType
+
+
If PENDING, then the transaction is unconfirmed and should be included shortly, as long as it is being + announced and is considered valid by the network.
+
+
PENDING - Enum constant in enum class org.bitcoinj.wallet.WalletTransaction.Pool
+
 
+
ping() - Method in class org.bitcoinj.core.Peer
+
+
Deprecated. + +
+
+
Ping - Class in org.bitcoinj.core
+
+
See BIP31 for details.
+
+
pingInterval() - Method in class org.bitcoinj.core.Peer
+
+
Returns a moving average of the last N ping/pong cycles.
+
+
pkiVerificationData - Variable in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Stores the calculated PKI verification data, or null if none is available.
+
+
PkiVerificationException(Exception) - Constructor for exception org.bitcoinj.protocols.payments.PaymentProtocolException.PkiVerificationException
+
 
+
PkiVerificationException(Exception, List<X509Certificate>) - Constructor for exception org.bitcoinj.protocols.payments.PaymentProtocolException.PkiVerificationException
+
 
+
PkiVerificationException(String) - Constructor for exception org.bitcoinj.protocols.payments.PaymentProtocolException.PkiVerificationException
+
 
+
PlatformUtils - Class in org.bitcoinj.base.internal
+
+
Utilities for determining platform information (OS and runtime)
+
+
PlatformUtils() - Constructor for class org.bitcoinj.base.internal.PlatformUtils
+
 
+
PlatformUtils.OS - Enum Class in org.bitcoinj.base.internal
+
 
+
PlatformUtils.Runtime - Enum Class in org.bitcoinj.base.internal
+
 
+
plus(Coin) - Method in class org.bitcoinj.base.Coin
+
+
Alias for add
+
+
pong() - Method in class org.bitcoinj.core.Ping
+
+
Create a Pong reply to this ping.
+
+
Pong - Class in org.bitcoinj.core
+
+
See BIP31 for details.
+
+
PONG - Enum constant in enum class org.bitcoinj.core.ProtocolVersion
+
+
Deprecated.
+
+
poolContainsTxHash(WalletTransaction.Pool, Sha256Hash) - Method in class org.bitcoinj.wallet.Wallet
+
 
+
port - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
position - Variable in exception org.bitcoinj.base.exceptions.AddressFormatException.InvalidCharacter
+
 
+
positiveSign(char) - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Set character to prefix positive values.
+
+
postfixCode() - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Postfix formatted output with currency code.
+
+
Preconditions - Class in org.bitcoinj.base.internal
+
 
+
Preconditions() - Constructor for class org.bitcoinj.base.internal.Preconditions
+
 
+
preferredOutputScriptType - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
prefixCode() - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Prefix formatted output by currency code.
+
+
prefixCode(String, int) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
END OF PARSING STUFF
+
+
prefixSymbol(String, int) - Static method in class org.bitcoinj.utils.BtcFormat
+
 
+
prefixUnitsIndicator(DecimalFormat, int) - Static method in class org.bitcoinj.utils.BtcFormat
+
+
Set both the currency symbol and code of the underlying, mutable NumberFormat object + according to the given denominational units scale factor.
+
+
PreMessageReceivedEventListener - Interface in org.bitcoinj.core.listeners
+
+
Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, + they can pre-filter messages before they are processed by a Peer or PeerGroup, and they can + provide transactions to remote peers when they ask for them.
+
+
prevTx - Variable in class org.bitcoinj.testing.FakeTxBuilder.DoubleSpends
+
 
+
priv - Variable in class org.bitcoinj.crypto.ECKey
+
 
+
processBlock(Block) - Method in class org.bitcoinj.core.Peer
+
 
+
processGetData(GetDataMessage) - Method in class org.bitcoinj.core.Peer
+
 
+
processHeaders(HeadersMessage) - Method in class org.bitcoinj.core.Peer
+
 
+
processInv(InventoryMessage) - Method in class org.bitcoinj.core.Peer
+
 
+
processMessage(Message) - Method in class org.bitcoinj.core.Peer
+
 
+
processMessage(Message) - Method in class org.bitcoinj.core.PeerSocketHandler
+
+
Called every time a message is received from the network
+
+
processNotFoundMessage(NotFoundMessage) - Method in class org.bitcoinj.core.Peer
+
 
+
processPong(Pong) - Method in class org.bitcoinj.core.Peer
+
 
+
processTransaction(Transaction) - Method in class org.bitcoinj.core.Peer
+
 
+
program() - Method in class org.bitcoinj.script.Script
+
+
Gets the serialized program as a newly created byte array.
+
+
progress(double, int, Instant) - Method in class org.bitcoinj.core.listeners.DownloadProgressTracker
+
+
Called when download progress is made.
+
+
propagate(Context) - Static method in class org.bitcoinj.core.Context
+
+
Sets the given context as the current thread context.
+
+
ProposedTransaction(Transaction) - Constructor for class org.bitcoinj.signers.TransactionSigner.ProposedTransaction
+
 
+
ProtocolException - Exception in org.bitcoinj.core
+
 
+
ProtocolException() - Constructor for exception org.bitcoinj.core.ProtocolException
+
 
+
ProtocolException(Exception) - Constructor for exception org.bitcoinj.core.ProtocolException
+
 
+
ProtocolException(String) - Constructor for exception org.bitcoinj.core.ProtocolException
+
 
+
ProtocolException(String, Exception) - Constructor for exception org.bitcoinj.core.ProtocolException
+
 
+
protocolIdFromParams(NetworkParameters) - Static method in class org.bitcoinj.protocols.payments.PaymentProtocol
+
 
+
ProtocolVersion - Enum Class in org.bitcoinj.core
+
+
Define important versions of the Bitcoin Protocol
+
+
provideTransaction(Transaction) - Method in class org.bitcoinj.core.FilteredBlock
+
+
Provide this FilteredBlock with a transaction which is in its Merkle tree.
+
+
provideWalletExtensions() - Method in class org.bitcoinj.kits.WalletAppKit
+
+
Override this to return wallet extensions if any are necessary.
+
+
PrunedException - Exception in org.bitcoinj.core
+
+
PrunedException is thrown in cases where a fully verifying node has deleted (pruned) old block data that turned + out to be necessary for handling a re-org.
+
+
PrunedException(Sha256Hash) - Constructor for exception org.bitcoinj.core.PrunedException
+
 
+
ptr - Variable in class org.bitcoinj.jni.NativeBlockChainListener
+
+
Deprecated.
+
ptr - Variable in class org.bitcoinj.jni.NativeFutureCallback
+
+
Deprecated.
+
ptr - Variable in class org.bitcoinj.jni.NativeKeyChainEventListener
+
+
Deprecated.
+
ptr - Variable in class org.bitcoinj.jni.NativeScriptsChangeEventListener
+
+
Deprecated.
+
ptr - Variable in class org.bitcoinj.jni.NativeTransactionConfidenceEventListener
+
+
Deprecated.
+
ptr - Variable in class org.bitcoinj.jni.NativeTransactionConfidenceListener
+
+
Deprecated.
+
ptr - Variable in class org.bitcoinj.jni.NativeWalletChangeEventListener
+
+
Deprecated.
+
ptr - Variable in class org.bitcoinj.jni.NativeWalletCoinsReceivedEventListener
+
+
Deprecated.
+
ptr - Variable in class org.bitcoinj.jni.NativeWalletCoinsSentEventListener
+
+
Deprecated.
+
ptr - Variable in class org.bitcoinj.jni.NativeWalletReorganizeEventListener
+
+
Deprecated.
+
pub - Variable in class org.bitcoinj.crypto.ECKey
+
 
+
pubKey - Variable in class org.bitcoinj.signers.CustomTransactionSigner.SignatureAndKey
+
 
+
PUBKEY_COMPARATOR - Static variable in class org.bitcoinj.crypto.ECKey
+
+
Compares by extracting pub key as a byte[] and using a lexicographic comparator
+
+
publicKeyFromPrivate(BigInteger, boolean) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Returns public key bytes from the given private key.
+
+
publicPointFromPrivate(BigInteger) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Returns public key point from the given private key.
+
+
PublicPrivateMismatch(String) - Constructor for exception org.bitcoinj.crypto.KeyCrypterException.PublicPrivateMismatch
+
 
+
PublicPrivateMismatch(String, Throwable) - Constructor for exception org.bitcoinj.crypto.KeyCrypterException.PublicPrivateMismatch
+
 
+
purpose(ScriptType) - Static method in interface org.bitcoinj.wallet.KeyChainGroupStructure
+
+
Return the (root) path containing "purpose" for the specified scriptType
+
+
PURPOSE_BIP44 - Static variable in class org.bitcoinj.crypto.ChildNumber
+
 
+
PURPOSE_BIP49 - Static variable in class org.bitcoinj.crypto.ChildNumber
+
 
+
PURPOSE_BIP84 - Static variable in class org.bitcoinj.crypto.ChildNumber
+
 
+
PURPOSE_BIP86 - Static variable in class org.bitcoinj.crypto.ChildNumber
+
 
+
put(StoredBlock) - Method in interface org.bitcoinj.store.BlockStore
+
+
Saves the given block header+extra data.
+
+
put(StoredBlock) - Method in class org.bitcoinj.store.MemoryBlockStore
+
 
+
put(StoredBlock) - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
put(StoredBlock) - Method in class org.bitcoinj.store.SPVBlockStore
+
 
+
put(StoredBlock, StoredUndoableBlock) - Method in interface org.bitcoinj.store.FullPrunedBlockStore
+
+
Saves the given StoredUndoableBlock and StoredBlock.
+
+
put(StoredBlock, StoredUndoableBlock) - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
putKey(DeterministicKey) - Method in class org.bitcoinj.crypto.DeterministicHierarchy
+
+
Inserts a key into the hierarchy.
+
+
putKeys(List<DeterministicKey>) - Method in class org.bitcoinj.crypto.DeterministicHierarchy
+
+
Inserts a list of keys into the hierarchy
+
+
+

Q

+
+
queueListeners(TransactionConfidence.Listener.ChangeReason) - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Call this after adjusting the confidence, for cases where listeners should be notified.
+
+
queueOnCoinsReceived(Transaction, Coin, Coin) - Method in class org.bitcoinj.wallet.Wallet
+
 
+
queueOnCoinsSent(Transaction, Coin, Coin) - Method in class org.bitcoinj.wallet.Wallet
+
 
+
queueOnReorganize() - Method in class org.bitcoinj.wallet.Wallet
+
 
+
queueOnScriptsChanged(List<Script>, boolean) - Method in class org.bitcoinj.wallet.Wallet
+
 
+
+

R

+
+
r - Variable in class org.bitcoinj.crypto.ECKey.ECDSASignature
+
+
The two components of the signature.
+
+
RAISE_FEE - Enum constant in enum class org.bitcoinj.core.Transaction.Purpose
+
+
Raise fee, e.g.
+
+
random - Static variable in class org.bitcoinj.core.TransactionBroadcast
+
+
Used for shuffling the peers before broadcast: unit tests can replace this to make themselves deterministic.
+
+
random - Variable in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
 
+
random() - Static method in class org.bitcoinj.core.Ping
+
+
Create a ping with a random nonce value.
+
+
random(SecureRandom) - Method in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
+
Generates a new key chain with 128 bits of entropy selected randomly from the given SecureRandom + object.
+
+
random(SecureRandom, int) - Method in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
+
Generates a new key chain with entropy selected randomly from the given SecureRandom + object and of the requested size in bits.
+
+
randomAccessFile - Variable in class org.bitcoinj.store.SPVBlockStore
+
 
+
randomSalt() - Static method in class org.bitcoinj.crypto.KeyCrypterScrypt
+
+
Returns SALT_LENGTH (8) bytes of random data
+
+
RawKeyBytes(byte[], byte[]) - Constructor for class org.bitcoinj.crypto.HDKeyDerivation.RawKeyBytes
+
 
+
rawValue() - Method in class org.bitcoinj.core.LockTime
+
+
Gets the raw value as used in the Bitcoin protocol
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.base.Coin
+
+
Read a Coin amount from the given buffer as 8 bytes in little-endian order.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.base.Sha256Hash
+
+
Create a new instance by reading from the given buffer.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.base.VarInt
+
+
Constructs a new VarInt by reading from the given buffer.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.AddressV1Message
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.AddressV2Message
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.Block
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.BloomFilter
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.FeeFilterMessage
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.FilteredBlock
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.GetBlocksMessage
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.GetDataMessage
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.GetHeadersMessage
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.HeadersMessage
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.InventoryMessage
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.NotFoundMessage
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.PartialMerkleTree
+
+
Deserialize a partial merkle tree from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.Ping
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.Pong
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.RejectMessage
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.Services
+
+
Construct a services bitfield by reading from the given buffer.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.Transaction
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.TransactionOutPoint
+
+
Deserialize this transaction outpoint from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.TransactionWitness
+
+
Deserialize this transaction witness from a given payload.
+
+
read(ByteBuffer) - Static method in class org.bitcoinj.core.VersionMessage
+
+
Deserialize this message from a given payload.
+
+
read(ByteBuffer, int) - Static method in class org.bitcoinj.core.PeerAddress
+
+
Deserialize this peer address from a given payload, using a given protocol variant.
+
+
read(ByteBuffer, int) - Static method in class org.bitcoinj.core.Transaction
+
+
Deserialize this message from a given payload, according to + BIP144 or the + classic format, depending on if the + transaction is segwit or not.
+
+
read(ByteBuffer, Transaction) - Static method in class org.bitcoinj.core.TransactionInput
+
+
Deserialize this transaction input from a given payload.
+
+
read(ByteBuffer, Transaction) - Static method in class org.bitcoinj.core.TransactionOutput
+
+
Deserialize this transaction output from a given payload.
+
+
readAddresses(ByteBuffer, int) - Static method in class org.bitcoinj.core.AddressMessage
+
 
+
readBytes(ByteBuffer, int) - Static method in class org.bitcoinj.base.internal.Buffers
+
+
Read given number of bytes from the buffer.
+
+
readInt32(ByteBuffer) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Read 4 bytes from the byte array (starting at the offset) as signed 32-bit integer in little endian format.
+
+
readInt64(byte[], int) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Read 8 bytes from the byte array (starting at the offset) as signed 64-bit integer in little endian format.
+
+
readInt64(ByteBuffer) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Read 8 bytes from the buffer as signed 64-bit integer in little endian format.
+
+
readItems(ByteBuffer) - Static method in class org.bitcoinj.core.ListMessage
+
 
+
readLengthPrefixedBytes(ByteBuffer) - Static method in class org.bitcoinj.base.internal.Buffers
+
+
First read a VarInt from the buffer and use it to determine the number of bytes to be read.
+
+
readLengthPrefixedString(ByteBuffer) - Static method in class org.bitcoinj.base.internal.Buffers
+
+
First read a VarInt from the buffer and use it to determine the number of bytes to read.
+
+
readUint16(byte[], int) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Read 2 bytes from the byte array (starting at the offset) as unsigned 16-bit integer in little endian format.
+
+
readUint16(InputStream) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Read 2 bytes from the stream as unsigned 16-bit integer in little endian format.
+
+
readUint16(ByteBuffer) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Read 2 bytes from the buffer as unsigned 16-bit integer in little endian format.
+
+
readUint16BE(byte[], int) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Read 2 bytes from the byte array (starting at the offset) as unsigned 16-bit integer in big endian format.
+
+
readUint16BE(ByteBuffer) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Read 2 bytes from the buffer as unsigned 16-bit integer in big endian format.
+
+
readUint32(byte[], int) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Read 4 bytes from the byte array (starting at the offset) as unsigned 32-bit integer in little endian format.
+
+
readUint32(InputStream) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Read 4 bytes from the stream as unsigned 32-bit integer in little endian format.
+
+
readUint32(ByteBuffer) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Read 4 bytes from the buffer as unsigned 32-bit integer in little endian format.
+
+
readUint32BE(byte[], int) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Read 4 bytes from the byte array (starting at the offset) as unsigned 32-bit integer in big endian format.
+
+
readUint32BE(ByteBuffer) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Read 4 bytes from the buffer as unsigned 32-bit integer in big endian format.
+
+
readWallet(InputStream, boolean, WalletExtension[]) - Method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
+
Loads wallet data from the given protocol buffer and inserts it into the given Wallet object.
+
+
readWallet(InputStream, WalletExtension...) - Method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
+
Loads wallet data from the given protocol buffer and inserts it into the given Wallet object.
+
+
readWallet(Network, WalletExtension[], Protos.Wallet) - Method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
+
Loads wallet data from the given protocol buffer and inserts it into the given Wallet object.
+
+
readWallet(Network, WalletExtension[], Protos.Wallet, boolean) - Method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
+
Loads wallet data from the given protocol buffer and inserts it into the given Wallet object.
+
+
readWallet(NetworkParameters, WalletExtension[], Protos.Wallet) - Method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
+ +
+
readWallet(NetworkParameters, WalletExtension[], Protos.Wallet, boolean) - Method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
+ +
+
reason() - Method in class org.bitcoinj.core.RejectMessage
+
+
The reason message given for rejection.
+
+
recalculateFastCatchupAndFilter(PeerGroup.FilterRecalculateMode) - Method in class org.bitcoinj.core.PeerGroup
+
+
Recalculates the bloom filter given to peers as well as the timestamp after which full blocks are downloaded + (instead of only headers).
+
+
RECEIVE_FUNDS - Enum constant in enum class org.bitcoinj.wallet.KeyChain.KeyPurpose
+
 
+
receiveBytes(ByteBuffer) - Method in class org.bitcoinj.core.PeerSocketHandler
+
 
+
receiveBytes(ByteBuffer) - Method in interface org.bitcoinj.net.StreamConnection
+
+
Called when new bytes are available from the remote end.
+
+
receiveFromBlock(Transaction, StoredBlock, AbstractBlockChain.NewBlockType, int) - Method in interface org.bitcoinj.core.listeners.TransactionReceivedInBlockListener
+
+
Called by the BlockChain when we receive a new block that contains a relevant transaction.
+
+
receiveFromBlock(Transaction, StoredBlock, AbstractBlockChain.NewBlockType, int) - Method in class org.bitcoinj.jni.NativeBlockChainListener
+
+
Deprecated.
+
receiveFromBlock(Transaction, StoredBlock, AbstractBlockChain.NewBlockType, int) - Method in class org.bitcoinj.wallet.Wallet
+
+
Called by the BlockChain when we receive a new block that sends coins to one of our addresses or + spends coins from one of our addresses (note that a single transaction can do both).
+
+
receivePending(Transaction, List<Transaction>) - Method in class org.bitcoinj.wallet.Wallet
+
+
Called when we have found a transaction (via network broadcast or otherwise) that is relevant to this wallet + and want to record it.
+
+
receivePending(Transaction, List<Transaction>, boolean) - Method in class org.bitcoinj.wallet.Wallet
+
+
Called when we have found a transaction (via network broadcast or otherwise) that is relevant to this wallet + and want to record it.
+
+
receivingAddr - Variable in class org.bitcoinj.core.VersionMessage
+
+
The network address of the receiving node as perceived by the transmitting node
+
+
receivingServices - Variable in class org.bitcoinj.core.VersionMessage
+
+
The services supported by the receiving node as perceived by the transmitting node.
+
+
recipientsPayFees - Variable in class org.bitcoinj.wallet.SendRequest
+
+
If false (default value), tx fee is paid by the sender If true, tx fee is paid by the recipient/s.
+
+
recoverFromSignature(int, ECKey.ECDSASignature, Sha256Hash, boolean) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Given the components of a signature and a selector value, recover and return the public key + that generated the signature according to the algorithm in SEC1v2 section 4.1.6.
+
+
RedeemData - Class in org.bitcoinj.wallet
+
+
This class aggregates data required to spend transaction output.
+
+
redeemP2WPKH(TransactionSignature, ECKey) - Static method in class org.bitcoinj.core.TransactionWitness
+
+
Creates the stack pushes necessary to redeem a P2WPKH output.
+
+
redeemP2WSH(Script, TransactionSignature...) - Static method in class org.bitcoinj.core.TransactionWitness
+
+
Creates the stack pushes necessary to redeem a P2WSH output.
+
+
redeemScript - Variable in class org.bitcoinj.wallet.RedeemData
+
 
+
REFERENCE_DEFAULT_MIN_TX_FEE - Static variable in class org.bitcoinj.core.Transaction
+
+
If feePerKb is lower than this, Bitcoin Core will treat it as if there were no fee.
+
+
REFUND - Enum constant in enum class org.bitcoinj.wallet.KeyChain.KeyPurpose
+
 
+
register(Collection<NetworkParameters>) - Static method in class org.bitcoinj.params.Networks
+
+
Register a collection of additional network types by adding them + to the Set.
+
+
register(NetworkParameters) - Static method in class org.bitcoinj.params.Networks
+
+
Register a single network type by adding it to the Set.
+
+
REGTEST - Enum constant in enum class org.bitcoinj.base.BitcoinNetwork
+
+
A local Bitcoin regression test network, known as "regtest", with id string "org.bitcoin.regtest"
+
+
RegTestParams - Class in org.bitcoinj.params
+
+
Network parameters for the regression test mode of bitcoind in which all blocks are trivially solvable.
+
+
RegTestParams() - Constructor for class org.bitcoinj.params.RegTestParams
+
 
+
REGULAR - Enum constant in enum class org.bitcoinj.wallet.BasicKeyChain.State
+
 
+
rejectedMessage() - Method in class org.bitcoinj.core.RejectMessage
+
+
Provides the type of message which was rejected by the peer.
+
+
rejectedMessageHash() - Method in class org.bitcoinj.core.RejectMessage
+
+
Provides the hash of the rejected object (if getRejectedMessage() is either "tx" or "block"), otherwise null.
+
+
RejectedTransactionException - Exception in org.bitcoinj.core
+
+
This exception is used by the TransactionBroadcast class to indicate that a broadcast + Transaction has been rejected by the network, for example because it violates a + protocol rule.
+
+
RejectedTransactionException(Transaction, RejectMessage) - Constructor for exception org.bitcoinj.core.RejectedTransactionException
+
 
+
RejectMessage - Class in org.bitcoinj.core
+
+
A message sent by nodes when a message we sent was rejected (ie a transaction had too little fee/was invalid/etc).
+
+
RejectMessage(RejectMessage.RejectCode, Sha256Hash, String, String) - Constructor for class org.bitcoinj.core.RejectMessage
+
+
Constructs a reject message that fingers the object with the given hash as rejected for the given reason.
+
+
RejectMessage.RejectCode - Enum Class in org.bitcoinj.core
+
 
+
relayTxesBeforeFilter - Variable in class org.bitcoinj.core.VersionMessage
+
+
Whether or not to relay tx invs before a filter is received.
+
+
remove() - Method in class org.bitcoinj.utils.BlockFileLoader.BlockFileIterator
+
 
+
removeAddress(int) - Method in class org.bitcoinj.core.AddressMessage
+
 
+
removeAddressEventListener(AddressEventListener) - Method in class org.bitcoinj.core.Peer
+
 
+
removeAllInstancesOf(byte[], byte[]) - Static method in class org.bitcoinj.script.Script
+
+
Returns the script bytes of inputScript with all instances of the specified script object removed
+
+
removeAllInstancesOfOp(byte[], int) - Static method in class org.bitcoinj.script.Script
+
+
Returns the script bytes of inputScript with all instances of the given op code removed
+
+
removeBlocksDownloadedEventListener(BlocksDownloadedEventListener) - Method in class org.bitcoinj.core.Peer
+
 
+
removeBlocksDownloadedEventListener(BlocksDownloadedEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
 
+
removeChainDownloadStartedEventListener(ChainDownloadStartedEventListener) - Method in class org.bitcoinj.core.Peer
+
 
+
removeChainDownloadStartedEventListener(ChainDownloadStartedEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
 
+
removeChangeEventListener(WalletChangeEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Removes the given event listener object.
+
+
removeCoinsReceivedEventListener(WalletCoinsReceivedEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Removes the given event listener object.
+
+
removeCoinsSentEventListener(WalletCoinsSentEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Removes the given event listener object.
+
+
removeConnectedEventListener(PeerConnectedEventListener) - Method in class org.bitcoinj.core.Peer
+
 
+
removeConnectedEventListener(PeerConnectedEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+
The given event listener will no longer be called with events.
+
+
removeCurrentKeyChangeEventListener(CurrentKeyChangeEventListener) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Removes a listener for events that are run when a current key and/or address changes.
+
+
removeCurrentKeyChangeEventListener(CurrentKeyChangeEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Removes the given event listener object.
+
+
removeDisconnectedEventListener(PeerDisconnectedEventListener) - Method in class org.bitcoinj.core.Peer
+
 
+
removeDisconnectedEventListener(PeerDisconnectedEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+
The given event listener will no longer be called with events.
+
+
removeDiscoveredEventListener(PeerDiscoveredEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+
The given event listener will no longer be called with events.
+
+
removeEventListener(TransactionConfidence.Listener) - Method in class org.bitcoinj.core.TransactionConfidence
+
 
+
removeEventListener(KeyChainEventListener) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
removeEventListener(KeyChainEventListener) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
removeEventListener(KeyChainEventListener) - Method in interface org.bitcoinj.wallet.KeyChain
+
+
Removes a listener for events that are run when keys are added.
+
+
removeEventListener(KeyChainEventListener) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Removes a listener for events that are run when keys are added.
+
+
removeFromList(T, List<? extends ListenerRegistration<T>>) - Static method in class org.bitcoinj.utils.ListenerRegistration
+
+
Remove wrapped listener
+
+
removeGetDataEventListener(GetDataEventListener) - Method in class org.bitcoinj.core.Peer
+
 
+
removeGetDataEventListener(GetDataEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+
The given event listener will no longer be called with events.
+
+
removeImportedKey(ECKey) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Removes a key that was imported into the basic key chain.
+
+
removeItem(int) - Method in class org.bitcoinj.core.ListMessage
+
+
Deprecated.
+
+
removeKey(ECKey) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
+
Removes the given key from the keychain.
+
+
removeKey(ECKey) - Method in class org.bitcoinj.wallet.Wallet
+
+
Removes the given key from the basicKeyChain.
+
+
removeKeyChainEventListener(KeyChainEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Removes the given event listener object.
+
+
removeNewBestBlockListener(NewBestBlockListener) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Removes the given NewBestBlockListener from the chain.
+
+
removeOnTransactionBroadcastListener(OnTransactionBroadcastListener) - Method in class org.bitcoinj.core.Peer
+
 
+
removeOnTransactionBroadcastListener(OnTransactionBroadcastListener) - Method in class org.bitcoinj.core.PeerGroup
+
+
The given event listener will no longer be called with events.
+
+
removePeerFilterProvider(PeerFilterProvider) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
removePreMessageReceivedEventListener(PreMessageReceivedEventListener) - Method in class org.bitcoinj.core.Peer
+
 
+
removePreMessageReceivedEventListener(PreMessageReceivedEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
 
+
removeReorganizeEventListener(WalletReorganizeEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Removes the given event listener object.
+
+
removeReorganizeListener(ReorganizeListener) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Removes the given ReorganizeListener from the chain.
+
+
removeScriptsChangeEventListener(ScriptsChangeEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Removes the given event listener object.
+
+
removeTransactionConfidenceEventListener(TransactionConfidenceEventListener) - Method in class org.bitcoinj.wallet.Wallet
+
+
Removes the given event listener object.
+
+
removeTransactionReceivedListener(TransactionReceivedInBlockListener) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Removes the given TransactionReceivedInBlockListener from the chain.
+
+
removeUnspentTransactionOutput(UTXO) - Method in interface org.bitcoinj.store.FullPrunedBlockStore
+
+
Removes a UTXO from the list of unspent TransactionOutputs + Note that the coinbase of the genesis block should NEVER be spendable and thus never in the list.
+
+
removeUnspentTransactionOutput(UTXO) - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
removeWallet(Wallet) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Remove a wallet from the chain.
+
+
removeWallet(Wallet) - Method in class org.bitcoinj.core.Peer
+
+
Unlinks the given wallet from peer.
+
+
removeWallet(Wallet) - Method in class org.bitcoinj.core.PeerGroup
+
+
Unlinks the given wallet so it no longer receives broadcast transactions or has its transactions announced.
+
+
removeWatchedAddress(Address) - Method in class org.bitcoinj.wallet.Wallet
+
+
Removes the given output scripts from the wallet that were being watched.
+
+
removeWatchedAddresses(List<Address>) - Method in class org.bitcoinj.wallet.Wallet
+
+
Removes the given output scripts from the wallet that were being watched.
+
+
removeWatchedScripts(List<Script>) - Method in class org.bitcoinj.wallet.Wallet
+
+
Removes the given output scripts from the wallet that were being watched.
+
+
reorganize(StoredBlock, List<StoredBlock>, List<StoredBlock>) - Method in interface org.bitcoinj.core.listeners.ReorganizeListener
+
+
Called by the BlockChain when the best chain + (representing total work done) has changed.
+
+
reorganize(StoredBlock, List<StoredBlock>, List<StoredBlock>) - Method in class org.bitcoinj.jni.NativeBlockChainListener
+
+
Deprecated.
+
reorganize(StoredBlock, List<StoredBlock>, List<StoredBlock>) - Method in class org.bitcoinj.wallet.Wallet
+
+
Don't call this directly.
+
+
ReorganizeListener - Interface in org.bitcoinj.core.listeners
+
+
Listener interface for when the best chain has changed.
+
+
REPEATING_DOUBLETS - Static variable in class org.bitcoinj.utils.BtcFixedFormat
+
+
A constant specifying the use of as many optional groups of two + decimal places in the fraction part of a formatted number as are useful for expressing + precision.
+
+
REPEATING_PLACES - Static variable in class org.bitcoinj.utils.BtcFixedFormat
+
+
A constant specifying the use of as many optional decimal places in the fraction part + of a formatted number as are useful for expressing precision.
+
+
REPEATING_TRIPLETS - Static variable in class org.bitcoinj.utils.BtcFixedFormat
+
+
A constant specifying the use of as many optional groups of three + decimal places in the fraction part of a formatted number as are useful for expressing + precision.
+
+
repeatOptionalDecimals(int, int) - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
+ Set repeated additional groups of decimals to use after the minimum decimals, if they are useful for expressing + precision.
+
+
RequiredFieldValidationException - Exception in org.bitcoinj.uri
+
+
Exception to provide the following to BitcoinURI:
+
+
RequiredFieldValidationException(String) - Constructor for exception org.bitcoinj.uri.RequiredFieldValidationException
+
 
+
RequiredFieldValidationException(String, Throwable) - Constructor for exception org.bitcoinj.uri.RequiredFieldValidationException
+
 
+
reset() - Method in class org.bitcoinj.wallet.Wallet
+
+
Prepares the wallet for a blockchain replay.
+
+
resetFalsePositiveEstimate() - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Resets estimates of false positives.
+
+
resetTimeout() - Method in class org.bitcoinj.net.AbstractTimeoutHandler
+
+
Deprecated.
+
Resets the current progress towards timeout to 0.
+
+
restoreFromKey - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
restoreFromSeed - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
restoreWalletFromKey(DeterministicKey) - Method in class org.bitcoinj.kits.WalletAppKit
+
+
If an account key is set here then any existing wallet that matches the file name will be renamed to a backup name, + the chain file will be deleted, and the wallet object will be instantiated with the given key instead of + a fresh seed being created.
+
+
restoreWalletFromSeed(DeterministicSeed) - Method in class org.bitcoinj.kits.WalletAppKit
+
+
If a seed is set here then any existing wallet that matches the file name will be renamed to a backup name, + the chain file will be deleted, and the wallet object will be instantiated with the given seed instead of + a fresh one being created.
+
+
Result() - Constructor for class org.bitcoinj.net.FilterMerger.Result
+
 
+
retryTime() - Method in class org.bitcoinj.utils.ExponentialBackoff
+
+
Get the next time to retry
+
+
reverseBytes(byte[]) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Returns a copy of the given byte array in reverse order.
+
+
REWARD_HALVING_INTERVAL - Static variable in class org.bitcoinj.params.BitcoinNetworkParams
+
+
Block reward halving interval (number of blocks)
+
+
RiskAnalysis - Interface in org.bitcoinj.wallet
+
+
A RiskAnalysis represents an analysis of how likely it is that a transaction (and its dependencies) represents a + possible double spending attack.
+
+
RiskAnalysis.Analyzer - Interface in org.bitcoinj.wallet
+
 
+
RiskAnalysis.Result - Enum Class in org.bitcoinj.wallet
+
 
+
rollbackBlockStore(int) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Rollback the block store to a given height.
+
+
rollbackBlockStore(int) - Method in class org.bitcoinj.core.BlockChain
+
 
+
rollbackBlockStore(int) - Method in class org.bitcoinj.core.FullPrunedBlockChain
+
 
+
rollMockClock(Duration) - Static method in class org.bitcoinj.base.internal.TimeUtils
+
+
Rolls an already set mock clock by the given duration.
+
+
rootAuthority - Variable in class org.bitcoinj.protocols.payments.PaymentProtocol.PkiVerificationData
+
+
Object representing the CA that verified the merchant's ID
+
+
rootAuthorityName - Variable in class org.bitcoinj.protocols.payments.PaymentProtocol.PkiVerificationData
+
+
String representing the display name of the CA that verified the merchant's ID
+
+
roundingMode(RoundingMode) - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Set rounding mode to use when it becomes necessary.
+
+
roundTripTransaction(Transaction) - Static method in class org.bitcoinj.testing.FakeTxBuilder
+
+
Roundtrip a transaction so that it appears as if it has just come from the wire
+
+
run() - Method in class org.bitcoinj.net.NioClientManager
+
 
+
run() - Method in class org.bitcoinj.net.NioServer
+
 
+
run() - Method in class org.bitcoinj.utils.Threading.UserThread
+
 
+
runReadLoop(InputStream, StreamConnection) - Static method in class org.bitcoinj.net.BlockingClient
+
+
A blocking call that never returns, except by throwing an exception.
+
+
runtime - Static variable in class org.bitcoinj.base.internal.PlatformUtils
+
 
+
+

S

+
+
s - Variable in class org.bitcoinj.crypto.ECKey.ECDSASignature
+
+
The two components of the signature.
+
+
SALT_LENGTH - Static variable in class org.bitcoinj.crypto.KeyCrypterScrypt
+
+
The length of the salt used.
+
+
SAME_THREAD - Static variable in class org.bitcoinj.utils.Threading
+
+
A dummy executor that just invokes the runnable immediately.
+
+
SAT - Static variable in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Standard format for the satoshi denomination.
+
+
SATOSHI - Static variable in class org.bitcoinj.base.Coin
+
+
A satoshi is the smallest unit that can be transferred.
+
+
satoshiToBtc(long) - Static method in class org.bitcoinj.base.Coin
+
+
Convert an amount in satoshis to an amount in BTC.
+
+
saveLater() - Method in class org.bitcoinj.wallet.Wallet
+
+
Requests an asynchronous save on a background thread
+
+
saveLater() - Method in class org.bitcoinj.wallet.WalletFiles
+
+
Queues up a save in the background.
+
+
saveNow() - Method in class org.bitcoinj.wallet.Wallet
+
+
If auto saving is enabled, do an immediate sync write to disk ignoring any delays.
+
+
saveNow() - Method in class org.bitcoinj.wallet.WalletFiles
+
+
Actually write the wallet file to disk, using an atomic rename when possible.
+
+
saveToFile(File) - Method in class org.bitcoinj.wallet.Wallet
+
+
Uses protobuf serialization to save the wallet to the given file.
+
+
saveToFile(File, File) - Method in class org.bitcoinj.wallet.Wallet
+
+
Saves the wallet first to the given temporary file, then renames to the destination file.
+
+
saveToFileStream(OutputStream) - Method in class org.bitcoinj.wallet.Wallet
+
+
Uses protobuf serialization to save the wallet to the given file stream.
+
+
scale() - Method in class org.bitcoinj.utils.BtcAutoFormat
+
+
Returns the int value indicating coin denomination.
+
+
scale() - Method in class org.bitcoinj.utils.BtcFixedFormat
+
+
Return the decimal-place shift for this object's fixed unit-denomination.
+
+
scale() - Method in class org.bitcoinj.utils.BtcFormat
+
+
Return the denomination of this object.
+
+
scale(int) - Method in class org.bitcoinj.utils.BtcFormat.Builder
+
+
Specify a fixed-denomination of units to use when formatting and parsing values.
+
+
scale(BigInteger, int) - Method in class org.bitcoinj.utils.BtcAutoFormat
+
+
Calculate the appropriate denomination for the given Bitcoin monetary value.
+
+
scale(BigInteger, int) - Method in class org.bitcoinj.utils.BtcFixedFormat
+
+
Return the decimal-place shift for this object's unit-denomination.
+
+
scale(BigInteger, int) - Method in class org.bitcoinj.utils.BtcFormat
+
+
Return the denomination for formatting the given value.
+
+
scaleX(ECFieldElement) - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
scaleY(ECFieldElement) - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
Script - Class in org.bitcoinj.script
+
+
Programs embedded inside transactions that control redemption of payments.
+
+
Script(byte[]) - Constructor for class org.bitcoinj.script.Script
+
+
Deprecated. + +
+
+
Script(byte[], long) - Constructor for class org.bitcoinj.script.Script
+
+ +
+
SCRIPT_ERR_BAD_OPCODE - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_CHECKMULTISIGVERIFY - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_CHECKSIGVERIFY - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_CLEANSTACK - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_DISABLED_OPCODE - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_EQUALVERIFY - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_ERROR_COUNT - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_EVAL_FALSE - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_INVALID_ALTSTACK_OPERATION - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_INVALID_STACK_OPERATION - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_MINIMALDATA - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_MINIMALIF - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_NEGATIVE_LOCKTIME - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_NUMEQUALVERIFY - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_OK - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_OP_COUNT - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_OP_RETURN - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_PUBKEY_COUNT - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_PUBKEYTYPE - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_PUSH_SIZE - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_SCRIPT_SIZE - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_SIG_COUNT - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_SIG_DER - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_SIG_HASHTYPE - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_SIG_HIGH_S - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_SIG_NULLDUMMY - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_SIG_NULLFAIL - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_SIG_PUSHONLY - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_STACK_SIZE - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_UNBALANCED_CONDITIONAL - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_UNKNOWN_ERROR - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_UNSATISFIED_LOCKTIME - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_VERIFY - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_WITNESS_MALLEATED - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_WITNESS_MALLEATED_P2SH - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_WITNESS_PUBKEYTYPE - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
SCRIPT_ERR_WITNESS_UNEXPECTED - Enum constant in enum class org.bitcoinj.script.ScriptError
+
 
+
Script.VerifyFlag - Enum Class in org.bitcoinj.script
+
+ +
+
ScriptBuilder - Class in org.bitcoinj.script
+
+
Tools for the construction of commonly used script types.
+
+
ScriptBuilder() - Constructor for class org.bitcoinj.script.ScriptBuilder
+
+
Creates a fresh ScriptBuilder with an empty program.
+
+
ScriptBuilder(Script) - Constructor for class org.bitcoinj.script.ScriptBuilder
+
+
Creates a fresh ScriptBuilder with the given program as the starting point.
+
+
ScriptChunk - Class in org.bitcoinj.script
+
+
A script element that is either a data push (signature, pubkey, etc) or a non-push (logic, numeric, etc) operation.
+
+
ScriptChunk(int, byte[]) - Constructor for class org.bitcoinj.script.ScriptChunk
+
 
+
scriptData - Variable in class org.bitcoinj.protocols.payments.PaymentProtocol.Output
+
 
+
ScriptError - Enum Class in org.bitcoinj.script
+
 
+
ScriptException - Exception in org.bitcoinj.script
+
 
+
ScriptException(ScriptError, String) - Constructor for exception org.bitcoinj.script.ScriptException
+
 
+
ScriptException(ScriptError, String, Exception) - Constructor for exception org.bitcoinj.script.ScriptException
+
 
+
ScriptOpCodes - Class in org.bitcoinj.script
+
+
Various constants that define the assembly-like scripting language that forms part of the Bitcoin protocol.
+
+
ScriptOpCodes() - Constructor for class org.bitcoinj.script.ScriptOpCodes
+
 
+
ScriptPattern - Class in org.bitcoinj.script
+
+
This is a Script pattern matcher with some typical script patterns
+
+
ScriptPattern() - Constructor for class org.bitcoinj.script.ScriptPattern
+
 
+
ScriptsChangeEventListener - Interface in org.bitcoinj.wallet.listeners
+
+
Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money + or a block chain re-organize.
+
+
ScriptType - Enum Class in org.bitcoinj.base
+
+
Supported Bitcoin script types and their script identifier strings.
+
+
seed - Variable in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
 
+
seed(DeterministicSeed) - Method in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
+
Creates a deterministic key chain starting from the given seed.
+
+
SeedPeers - Class in org.bitcoinj.net.discovery
+
+
SeedPeers stores a pre-determined list of Bitcoin node addresses.
+
+
SeedPeers(int[], NetworkParameters) - Constructor for class org.bitcoinj.net.discovery.SeedPeers
+
+ +
+
SeedPeers(InetSocketAddress[]) - Constructor for class org.bitcoinj.net.discovery.SeedPeers
+
+
Supports finding peers by IP addresses/ports
+
+
SeedPeers(NetworkParameters) - Constructor for class org.bitcoinj.net.discovery.SeedPeers
+
+ +
+
seeds - Variable in class org.bitcoinj.net.discovery.MultiplexingDiscovery
+
 
+
seekPastMagicBytes(ByteBuffer) - Method in class org.bitcoinj.core.BitcoinSerializer
+
 
+
seekPastMagicBytes(ByteBuffer) - Method in class org.bitcoinj.core.MessageSerializer
+
 
+
seen(Sha256Hash, PeerAddress) - Method in class org.bitcoinj.core.TxConfidenceTable
+
+
Called by peers when they see a transaction advertised in an "inv" message.
+
+
SEEN_PEERS - Enum constant in enum class org.bitcoinj.core.TransactionConfidence.Listener.ChangeReason
+
+
Occurs when a pending transaction (not in the chain) was announced by another connected peers.
+
+
SegwitAddress - Class in org.bitcoinj.base
+
+
Implementation of native segwit addresses.
+
+
SegwitAddress.SegwitHrp - Enum Class in org.bitcoinj.base
+
+
Human-readable part (HRP) of Segwit addresses for standard Bitcoin networks.
+
+
segwitAddressHrp - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
segwitAddressHrp() - Method in enum class org.bitcoinj.base.BitcoinNetwork
+
+
Return the standard Bech32 SegwitAddress.SegwitHrp (as a String) for + this network.
+
+
segwitAddressHrp() - Method in interface org.bitcoinj.base.Network
+
+
Human-readable part (HRP) of bech32 encoded segwit addresses for this network.
+
+
segwitAddressHrp() - Method in class org.bitcoinj.testing.MockAltNetwork
+
 
+
select(Coin, List<TransactionOutput>) - Method in interface org.bitcoinj.wallet.CoinSelector
+
+
Creates a CoinSelection that tries to meet the target amount of value.
+
+
select(Coin, List<TransactionOutput>) - Method in class org.bitcoinj.wallet.DefaultCoinSelector
+
 
+
select(Coin, List<TransactionOutput>) - Method in class org.bitcoinj.wallet.FilteringCoinSelector
+
 
+
select(Coin, List<TransactionOutput>) - Method in class org.bitcoinj.wallet.KeyTimeCoinSelector
+
 
+
selectDownloadPeer(List<Peer>) - Method in class org.bitcoinj.core.PeerGroup
+
+
Given a list of Peers, return a Peer to be used as the download peer.
+
+
self() - Method in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
 
+
SELF - Enum constant in enum class org.bitcoinj.core.TransactionConfidence.Source
+
+
This transaction was created by our own wallet, so we know it's not a double spend.
+
+
SEND_IF_CHANGED - Enum constant in enum class org.bitcoinj.core.PeerGroup.FilterRecalculateMode
+
 
+
SendAddrV2Message - Class in org.bitcoinj.core
+
+
Represents the sendaddrv2 P2P protocol message, which indicates that a node can understand and prefers + to receive addrv2 messages instead of addr messages.
+
+
SendAddrV2Message() - Constructor for class org.bitcoinj.core.SendAddrV2Message
+
 
+
sendCoins(Peer, SendRequest) - Method in class org.bitcoinj.wallet.Wallet
+
+
Sends coins to the given address, via the given Peer.
+
+
sendCoins(TransactionBroadcaster, Address, Coin) - Method in class org.bitcoinj.wallet.Wallet
+
+
Sends coins to the given address, via the given PeerGroup.
+
+
sendCoins(TransactionBroadcaster, SendRequest) - Method in class org.bitcoinj.wallet.Wallet
+
+
Sends coins according to the given request, via the given TransactionBroadcaster.
+
+
sendCoins(SendRequest) - Method in class org.bitcoinj.wallet.Wallet
+
+
Satisfies the given SendRequest using the default transaction broadcaster configured either via + PeerGroup.addWallet(Wallet) or directly with Wallet.setTransactionBroadcaster(TransactionBroadcaster).
+
+
sendCoinsOffline(SendRequest) - Method in class org.bitcoinj.wallet.Wallet
+
+
Sends coins to the given address but does not broadcast the resulting pending transaction.
+
+
SendHeadersMessage - Class in org.bitcoinj.core
+
+
+ A new message, "sendheaders", which indicates that a node prefers to receive new block announcements via a "headers" + message rather than an "inv".
+
+
SendHeadersMessage() - Constructor for class org.bitcoinj.core.SendHeadersMessage
+
 
+
sendMessage(Message) - Method in class org.bitcoinj.core.PeerSocketHandler
+
+
Sends the given message to the peer.
+
+
sendPayment(URL, Protos.Payment) - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
 
+
sendPayment(List<Transaction>, Address, String) - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Generates a Payment message and sends the payment to the merchant who sent the PaymentRequest.
+
+
sendPing() - Method in class org.bitcoinj.core.Peer
+
+
Sends the peer a ping message and returns a future that will be completed when the pong is received back.
+
+
sendPing(long) - Method in class org.bitcoinj.core.Peer
+
 
+
SendRequest - Class in org.bitcoinj.wallet
+
+
A SendRequest gives the wallet information about precisely how to send money to a recipient or set of recipients.
+
+
SendResult(TransactionBroadcast) - Constructor for class org.bitcoinj.wallet.Wallet.SendResult
+
 
+
SendResult(Transaction, TransactionBroadcast) - Constructor for class org.bitcoinj.wallet.Wallet.SendResult
+
+ +
+
sendTransaction(SendRequest) - Method in class org.bitcoinj.wallet.Wallet
+
+
Initiate sending the transaction in a SendRequest.
+
+
SEQUENCE_LOCKTIME_DISABLE_FLAG - Static variable in class org.bitcoinj.core.TransactionInput
+
+
BIP68: If this flag set, sequence is NOT interpreted as a relative lock-time.
+
+
SEQUENCE_LOCKTIME_MASK - Static variable in class org.bitcoinj.core.TransactionInput
+
+
BIP68: If sequence encodes a relative lock-time, this mask is applied to extract that lock-time from the sequence + field.
+
+
SEQUENCE_LOCKTIME_TYPE_FLAG - Static variable in class org.bitcoinj.core.TransactionInput
+
+
BIP68: If sequence encodes a relative lock-time and this flag is set, the relative lock-time has units of 512 + seconds, otherwise it specifies blocks with a granularity of 1.
+
+
serialize() - Method in class org.bitcoinj.base.Coin
+
+
Allocates a byte array and serializes the amount.
+
+
serialize() - Method in class org.bitcoinj.base.Sha256Hash
+
+
Allocates a byte array and writes the hash into it, in reversed order.
+
+
serialize() - Method in class org.bitcoinj.base.VarInt
+
+
Allocates a byte array and serializes the value into its minimal representation.
+
+
serialize() - Method in class org.bitcoinj.core.BaseMessage
+
+
Serialize this message to a byte array that conforms to the bitcoin wire protocol.
+
+
serialize() - Method in interface org.bitcoinj.core.Message
+
+
Serialize this message to a byte array that conforms to the Bitcoin wire protocol.
+
+
serialize() - Method in class org.bitcoinj.core.PartialMerkleTree
+
+
Allocates a byte array and writes this partial merkle tree into it.
+
+
serialize() - Method in class org.bitcoinj.core.Services
+
+
Allocates a byte array and writes the node service bits into it.
+
+
serialize() - Method in class org.bitcoinj.core.TransactionInput
+
+
Allocates a byte array and writes this transaction input into it.
+
+
serialize() - Method in class org.bitcoinj.core.TransactionOutPoint
+
+
Allocates a byte array and writes this transaction outpoint into it.
+
+
serialize() - Method in class org.bitcoinj.core.TransactionOutput
+
+
Allocates a byte array and writes this transaction output into it.
+
+
serialize() - Method in class org.bitcoinj.core.TransactionWitness
+
+
Allocates a byte array and writes this transaction witness into it.
+
+
serialize(int) - Method in class org.bitcoinj.core.PeerAddress
+
+
Allocates a byte array and writes this peer address into it, using a given protocol variant.
+
+
serialize(String, byte[], OutputStream) - Method in class org.bitcoinj.core.BitcoinSerializer
+
+
Writes message to the output stream.
+
+
serialize(String, byte[], OutputStream) - Method in class org.bitcoinj.core.MessageSerializer
+
+
Writes message to the output stream.
+
+
serialize(Message, OutputStream) - Method in class org.bitcoinj.core.BitcoinSerializer
+
+
Writes message to the output stream.
+
+
serialize(Message, OutputStream) - Method in class org.bitcoinj.core.MessageSerializer
+
+
Writes message to the output stream.
+
+
SERIALIZE_TRANSACTION_NO_WITNESS - Static variable in class org.bitcoinj.core.Transaction
+
+
When this bit is set in protocolVersion, do not include witness.
+
+
serializeCompact(ByteBuffer) - Method in class org.bitcoinj.core.StoredBlock
+
+
Serializes the stored block to a custom packed format.
+
+
serializeCompactV2(ByteBuffer) - Method in class org.bitcoinj.core.StoredBlock
+
+
Serializes the stored block to a custom packed format.
+
+
serializeKeyChainGroupToProtobuf() - Method in class org.bitcoinj.wallet.Wallet
+
+
Deprecated.
+
+
serializeMyselfToProtobuf() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Serialize to a list of keys.
+
+
serializePrivB58(Network) - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Serialize private key to Base58 (either "xprv" or "tprv")
+
+
serializePrivB58(Network, ScriptType) - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Deprecated. +
Use a DeterministicKey.serializePrivB58(Network) or a descriptor if you need output type information
+
+
+
serializePrivB58(NetworkParameters) - Method in class org.bitcoinj.crypto.DeterministicKey
+
+ +
+
serializePrivB58(NetworkParameters, ScriptType) - Method in class org.bitcoinj.crypto.DeterministicKey
+
+ +
+
serializePubB58(Network) - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Serialize public key to Base58 (either "xpub" or "tpub")
+
+
serializePubB58(Network, ScriptType) - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
Deprecated. +
Use a DeterministicKey.serializePubB58(Network) or a descriptor if you need output type information
+
+
+
serializePubB58(NetworkParameters) - Method in class org.bitcoinj.crypto.DeterministicKey
+
+ +
+
serializePubB58(NetworkParameters, ScriptType) - Method in class org.bitcoinj.crypto.DeterministicKey
+
+ +
+
serializeToProtobuf() - Method in class org.bitcoinj.wallet.BasicKeyChain
+
+
Serialize to a list of keys
+
+
serializeToProtobuf() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Serialize to a list of keys
+
+
serializeToProtobuf() - Method in interface org.bitcoinj.wallet.KeyChain
+
+
Return a list of keys serialized to the bitcoinj protobuf format.
+
+
serializeToProtobuf() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Return a list of key protobufs obtained by merging the chains.
+
+
serializeWalletExtension() - Method in interface org.bitcoinj.wallet.WalletExtension
+
+
Returns bytes that will be saved in the wallet.
+
+
services() - Method in class org.bitcoinj.core.VersionMessage
+
+
Get the service bitfield that represents the node services being provided.
+
+
Services - Class in org.bitcoinj.core
+
+
Wrapper for services bitfield used in various messages of the Bitcoin protocol.
+
+
setAcceptRiskyTransactions(boolean) - Method in class org.bitcoinj.wallet.Wallet
+
+
Whether or not the wallet will ignore pending transactions that fail the selected + RiskAnalysis.
+
+
setAppearedAtChainHeight(int) - Method in class org.bitcoinj.core.TransactionConfidence
+
+
The chain height at which the transaction appeared, if it has been seen in the best chain.
+
+
setAutoSave(boolean) - Method in class org.bitcoinj.kits.WalletAppKit
+
+
If true, the wallet will save itself to disk automatically whenever it changes.
+
+
setAutoStop(boolean) - Method in class org.bitcoinj.kits.WalletAppKit
+
+
If true, will register a shutdown hook to stop the library.
+
+
setBitLE(byte[], int) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Sets the given bit in data to one, using little endian (not the same as Java native big endian)
+
+
setBlockAppearance(StoredBlock, boolean, int) - Method in class org.bitcoinj.core.Transaction
+
+
Puts the given block in the internal set of blocks in which this transaction appears.
+
+
setBlockingStartup(boolean) - Method in class org.bitcoinj.kits.WalletAppKit
+
+
If true (the default) then the startup of this service won't be considered complete until the network has been + brought up, peer connections established and the block chain synchronised.
+
+
setBloomFilter(BloomFilter) - Method in class org.bitcoinj.core.Peer
+
+
Sets a Bloom filter on this connection.
+
+
setBloomFilter(BloomFilter, boolean) - Method in class org.bitcoinj.core.Peer
+
+
Sets a Bloom filter on this connection.
+
+
setBloomFilterFalsePositiveRate(double) - Method in class org.bitcoinj.core.PeerGroup
+
+
Deprecated.
+
+
setBloomFilterFPRate(double) - Method in class org.bitcoinj.net.FilterMerger
+
+
Deprecated.
+
+
setBloomFilteringEnabled(boolean) - Method in class org.bitcoinj.core.PeerGroup
+
+
Can be used to disable Bloom filtering entirely, even in SPV mode.
+
+
setChainHead(StoredBlock) - Method in class org.bitcoinj.core.AbstractBlockChain
+
 
+
setChainHead(StoredBlock) - Method in interface org.bitcoinj.store.BlockStore
+
+
Sets the StoredBlock that represents the top of the chain of greatest total work.
+
+
setChainHead(StoredBlock) - Method in class org.bitcoinj.store.MemoryBlockStore
+
 
+
setChainHead(StoredBlock) - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
setChainHead(StoredBlock) - Method in class org.bitcoinj.store.SPVBlockStore
+
 
+
setCheckpoints(InputStream) - Method in class org.bitcoinj.kits.WalletAppKit
+
+
If set, the file is expected to contain a checkpoints file calculated with BuildCheckpoints.
+
+
setConfidenceType(TransactionConfidence.ConfidenceType) - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Called by other objects in the system, like a Wallet, when new information about the confidence of a + transaction becomes available.
+
+
setConnectTimeout(Duration) - Method in class org.bitcoinj.core.PeerGroup
+
+
Sets the timeout between when a connection attempt to a peer begins and when the version message exchange + completes.
+
+
setConnectTimeout(Duration) - Method in class org.bitcoinj.net.BlockingClientManager
+
+
Sets the number of milliseconds to wait before giving up on a connect attempt
+
+
setConnectTimeoutMillis(int) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
setConnectTimeoutMillis(int) - Method in class org.bitcoinj.net.BlockingClientManager
+
+ +
+
setCreationTime(Instant) - Method in class org.bitcoinj.crypto.DeterministicKey
+
+
The creation time of a deterministic key is equal to that of its parent, unless this key is the root of a tree.
+
+
setCreationTime(Instant) - Method in class org.bitcoinj.crypto.ECKey
+
+
Sets the creation time of this key.
+
+
setCreationTime(Instant) - Method in class org.bitcoinj.wallet.DeterministicSeed
+
+
Sets the creation time of this seed.
+
+
setCreationTimeSeconds(long) - Method in class org.bitcoinj.crypto.DeterministicKey
+
+ +
+
setCreationTimeSeconds(long) - Method in class org.bitcoinj.crypto.ECKey
+
+ +
+
setCreationTimeSeconds(long) - Method in class org.bitcoinj.wallet.DeterministicSeed
+
+ +
+
setDepthInBlocks(int) - Method in class org.bitcoinj.core.TransactionConfidence
+
 
+
setDescription(String) - Method in class org.bitcoinj.wallet.Wallet
+
+
Set the description of the wallet.
+
+
setDiscoverPeersViaP2P(boolean) - Method in class org.bitcoinj.core.PeerGroup
+
+
Setting this to true will add addresses discovered via P2P addr and addrv2 messages to + the list of potential peers to connect to.
+
+
setDiscovery(PeerDiscovery) - Method in class org.bitcoinj.kits.WalletAppKit
+
+
Sets the peer discovery class to use.
+
+
setDownloadData(boolean) - Method in class org.bitcoinj.core.Peer
+
+
If set to false, the peer won't try and fetch blocks and transactions it hears about.
+
+
setDownloadListener(DownloadProgressTracker) - Method in class org.bitcoinj.kits.WalletAppKit
+
+
If you want to learn about the sync process, you can provide a listener here.
+
+
setDownloadParameters(boolean) - Method in class org.bitcoinj.core.Peer
+
+
Always download full blocks.
+
+
setDownloadParameters(long, boolean) - Method in class org.bitcoinj.core.Peer
+
+ +
+
setDownloadTxDependencies(boolean) - Method in class org.bitcoinj.core.Peer
+
+
Sets if this peer will use getdata/notfound messages to walk backwards through transaction dependencies + before handing the transaction off to the wallet.
+
+
setDownloadTxDependencies(int) - Method in class org.bitcoinj.core.Peer
+
+
Sets if this peer will use getdata/notfound messages to walk backwards through transaction dependencies + before handing the transaction off to the wallet.
+
+
setDownloadTxDependencies(int) - Method in class org.bitcoinj.core.PeerGroup
+
+
Configure download of pending transaction dependencies.
+
+
setDropPeersAfterBroadcast(boolean) - Method in class org.bitcoinj.core.TransactionBroadcast
+
 
+
setExchangeRate(ExchangeRate) - Method in class org.bitcoinj.core.Transaction
+
+
Setter for Transaction.exchangeRate.
+
+
setFastCatchupTime(Instant) - Method in class org.bitcoinj.core.PeerGroup
+
+
Tells the PeerGroup to download only block headers before a certain time and bodies after that.
+
+
setFastCatchupTimeSecs(long) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
setFastDownloadParameters(boolean, Instant) - Method in class org.bitcoinj.core.Peer
+
+
When downloading the block chain, the bodies will be skipped for blocks created before the given date.
+
+
setFeePerVkb(Coin) - Method in class org.bitcoinj.wallet.SendRequest
+
 
+
setKeyChainFactory(KeyChainFactory) - Method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
 
+
setKeyRotationTime(long) - Method in class org.bitcoinj.wallet.Wallet
+
+ +
+
setKeyRotationTime(Instant) - Method in class org.bitcoinj.wallet.Wallet
+
+
+ When a key rotation time is set, any money controlled by keys created before the given timestamp T will be + respent to any key that was created after T.
+
+
setKeyRotationTime(Date) - Method in class org.bitcoinj.wallet.Wallet
+
+ +
+
setLastBlockSeenHash(Sha256Hash) - Method in class org.bitcoinj.wallet.Wallet
+
 
+
setLastBlockSeenHeight(int) - Method in class org.bitcoinj.wallet.Wallet
+
 
+
setLastBlockSeenTime(Instant) - Method in class org.bitcoinj.wallet.Wallet
+
 
+
setLastBlockSeenTimeSecs(long) - Method in class org.bitcoinj.wallet.Wallet
+
+ +
+
setLastBroadcastedAt(Date) - Method in class org.bitcoinj.core.TransactionConfidence
+
+ +
+
setLastBroadcastTime(Instant) - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Set the time the transaction was last announced to us.
+
+
setListener(WalletFiles.Listener) - Method in class org.bitcoinj.wallet.WalletFiles
+
+
The given listener will be called on the autosave thread before and after the wallet is saved to disk.
+
+
setLockTime(long) - Method in class org.bitcoinj.core.Transaction
+
+
Transactions can have an associated lock time, specified either as a block height or as a timestamp (in seconds + since epoch).
+
+
setLookaheadSize(int) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Sets a new lookahead size.
+
+
setLookaheadThreshold(int) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
Sets the threshold for the key pre-generation.
+
+
setMatchAll() - Method in class org.bitcoinj.core.BloomFilter
+
+
Sets this filter to match all objects.
+
+
setMaxConnections(int) - Method in class org.bitcoinj.core.PeerGroup
+
+
Adjusts the desired number of connections that we will create to peers.
+
+
setMaxPeersToDiscoverCount(int) - Method in class org.bitcoinj.core.PeerGroup
+
+
Sets the maximum number of Peers to discover.
+
+
setMemo(String) - Method in class org.bitcoinj.core.Transaction
+
+
Set the transaction Transaction.memo.
+
+
setMinBroadcastConnections(int) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
setMinConnections(int) - Method in class org.bitcoinj.core.TransactionBroadcast
+
 
+
setMinProtocolVersion(int) - Method in class org.bitcoinj.core.Peer
+
+
The minimum P2P protocol version that is accepted.
+
+
setMinRequiredProtocolVersion(int) - Method in class org.bitcoinj.core.PeerGroup
+
+
If a peer is connected to that claims to speak a protocol version lower than the given version, it will + be disconnected and another one will be tried instead.
+
+
setMockClock() - Static method in class org.bitcoinj.base.internal.TimeUtils
+
+
Sets the mock clock to the current time as a fixed instant.
+
+
setMockClock(Instant) - Static method in class org.bitcoinj.base.internal.TimeUtils
+
+
Sets the mock clock to a fixed instant.
+
+
setOverridingTransaction(Transaction) - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Deprecated. +
Use TransactionConfidence.getOverridingTxId() (and null is no-longer allowed)
+
+
+
setOverridingTxId(Sha256Hash) - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Called when the transaction becomes newly dead, that is, we learn that one of its inputs has already been spent + in such a way that the double-spending transaction takes precedence over this one.
+
+
setParent(Transaction) - Method in class org.bitcoinj.core.TransactionInput
+
 
+
setParent(Transaction) - Method in class org.bitcoinj.core.TransactionOutput
+
 
+
setPeerDiscoveryTimeout(Duration) - Method in class org.bitcoinj.core.PeerGroup
+
+
This is how long we wait for peer discoveries to return their results.
+
+
setPeerDiscoveryTimeoutMillis(long) - Method in class org.bitcoinj.core.PeerGroup
+
+ +
+
setPeerNodes(PeerAddress...) - Method in class org.bitcoinj.kits.WalletAppKit
+
+
Will only connect to the given addresses.
+
+
setPingIntervalMsec(long) - Method in class org.bitcoinj.core.PeerGroup
+
+
Sets the period between pings for an individual peer.
+
+
setPolicy(CycleDetectingLockFactory.Policy) - Static method in class org.bitcoinj.utils.Threading
+
 
+
setProgressCallback(TransactionBroadcast.ProgressCallback) - Method in class org.bitcoinj.core.TransactionBroadcast
+
+
Sets the given callback for receiving progress values, which will run on the user thread.
+
+
setProgressCallback(TransactionBroadcast.ProgressCallback, Executor) - Method in class org.bitcoinj.core.TransactionBroadcast
+
+
Sets the given callback for receiving progress values, which will run on the given executor.
+
+
setPurpose(Transaction.Purpose) - Method in class org.bitcoinj.core.Transaction
+
+
Marks the transaction as being created for the given purpose.
+
+
setRequireAllExtensionsKnown(boolean) - Method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
+
If this property is set to true, the wallet will fail to load if any found extensions are unknown..
+
+
setRequiredServices(long) - Method in class org.bitcoinj.core.PeerGroup
+
+
Convenience for connecting only to peers that can serve specific services.
+
+
setRequireMandatoryExtensions(boolean) - Method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
+
If this property is set to false, then unknown mandatory extensions will be ignored instead of causing load + errors.
+
+
setRiskAnalyzer(RiskAnalysis.Analyzer) - Method in class org.bitcoinj.wallet.Wallet
+
+
Sets the RiskAnalysis implementation to use for deciding whether received pending transactions are risky + or not.
+
+
setRunScripts(boolean) - Method in class org.bitcoinj.core.FullPrunedBlockChain
+
+
Whether or not to run scripts whilst accepting blocks (i.e.
+
+
setScriptSig(Script) - Method in class org.bitcoinj.core.TransactionInput
+
+
Set the given program as the scriptSig that is supposed to satisfy the connected output script.
+
+
setSequenceNumber(long) - Method in class org.bitcoinj.core.TransactionInput
+
+
Sequence numbers allow participants in a multi-party transaction signing protocol to create new versions of the + transaction independently of each other.
+
+
setSigsRequiredToSpend(int) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+
The number of signatures required to spend coins received by this keychain.
+
+
setSocketTimeout(Duration) - Method in class org.bitcoinj.core.PeerSocketHandler
+
 
+
setSocketTimeout(Duration) - Method in class org.bitcoinj.net.AbstractTimeoutHandler
+
+
Deprecated.
+
Sets the receive timeout, automatically killing the connection if no + messages are received for this long
+
+
setSocketTimeout(Duration) - Method in class org.bitcoinj.net.SocketTimeoutTask
+
+
Sets the receive timeout, automatically killing the connection if no + messages are received for this long
+
+
setSocketTimeout(Duration) - Method in interface org.bitcoinj.net.TimeoutHandler
+
+
Sets the receive timeout, automatically killing the connection if no + messages are received for this long
+
+
setSource(TransactionConfidence.Source) - Method in class org.bitcoinj.core.TransactionConfidence
+
+
The source of a transaction tries to identify where it came from originally.
+
+
setStallThreshold(int, int) - Method in class org.bitcoinj.core.PeerGroup
+
+
Configures the stall speed: the speed at which a peer is considered to be serving us the block chain + unacceptably slowly.
+
+
setTag(String, ByteString) - Method in class org.bitcoinj.utils.BaseTaggableObject
+
+
Deprecated.
+
+
setTag(String, ByteString) - Method in interface org.bitcoinj.utils.TaggableObject
+
+
Deprecated.
+
+
setTag(String, ByteString) - Method in class org.bitcoinj.wallet.Wallet
+
+
Deprecated. +
Applications should use another mechanism to persist application state information
+
+
+
setTimeoutEnabled(boolean) - Method in class org.bitcoinj.core.PeerSocketHandler
+
 
+
setTimeoutEnabled(boolean) - Method in class org.bitcoinj.net.AbstractTimeoutHandler
+
+
Deprecated.
+
Enables or disables the timeout entirely.
+
+
setTimeoutEnabled(boolean) - Method in class org.bitcoinj.net.SocketTimeoutTask
+
+
Enables or disables the timeout entirely.
+
+
setTimeoutEnabled(boolean) - Method in interface org.bitcoinj.net.TimeoutHandler
+
+
Enables or disables the timeout entirely.
+
+
setTransactionBroadcaster(TransactionBroadcaster) - Method in class org.bitcoinj.wallet.Wallet
+
+
Specifies that the given TransactionBroadcaster, typically a PeerGroup, should be used for + sending transactions to the Bitcoin network by default.
+
+
setupAutoSave(Wallet) - Method in class org.bitcoinj.kits.WalletAppKit
+
 
+
setUpdateTime(Instant) - Method in class org.bitcoinj.core.Transaction
+
+
Sets the update time of this transaction.
+
+
setUpdateTime(Date) - Method in class org.bitcoinj.core.Transaction
+
+ +
+
setUseLocalhostPeerWhenPossible(boolean) - Method in class org.bitcoinj.core.PeerGroup
+
+
When true (the default), PeerGroup will attempt to connect to a Bitcoin node running on localhost before + attempting to use the P2P network.
+
+
setUserAgent(String, String) - Method in class org.bitcoinj.core.PeerGroup
+
+
Sets information that identifies this software to remote nodes.
+
+
setUserAgent(String, String) - Method in class org.bitcoinj.kits.WalletAppKit
+
+
Sets the string that will appear in the subver field of the version message.
+
+
setUserAgent(String, String, String) - Method in class org.bitcoinj.core.PeerGroup
+
+
Sets information that identifies this software to remote nodes.
+
+
setUTXOProvider(UTXOProvider) - Method in class org.bitcoinj.wallet.Wallet
+
+
Set the UTXOProvider.
+
+
setValue(Coin) - Method in class org.bitcoinj.core.TransactionOutput
+
+
Sets the value of this output.
+
+
setVerifiedChainHead(StoredBlock) - Method in interface org.bitcoinj.store.FullPrunedBlockStore
+
+
Sets the StoredBlock that represents the top of the chain of greatest total work that has been + fully verified.
+
+
setVerifiedChainHead(StoredBlock) - Method in class org.bitcoinj.store.MemoryFullPrunedBlockStore
+
 
+
setVersion(int) - Method in class org.bitcoinj.core.Transaction
+
 
+
setVersion(int) - Method in class org.bitcoinj.wallet.Wallet
+
+
Set the version number of the wallet.
+
+
setVersionMessage(VersionMessage) - Method in class org.bitcoinj.core.PeerGroup
+
+
Sets the VersionMessage that will be announced on newly created connections.
+
+
setWalletFactory(WalletProtobufSerializer.WalletFactory) - Method in class org.bitcoinj.kits.WalletAppKit
+
+
Sets a wallet factory which will be used when the kit creates a new wallet.
+
+
setWalletWriteBufferSize(int) - Method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
+
Change buffer size for writing wallet to output stream.
+
+
setWitness(TransactionWitness) - Method in class org.bitcoinj.core.TransactionInput
+
+
Set the transaction witness of an input.
+
+
setWriteTarget(MessageWriteTarget) - Method in class org.bitcoinj.core.PeerSocketHandler
+
+
Sets the MessageWriteTarget used to write messages to the peer.
+
+
setWriteTarget(MessageWriteTarget) - Method in interface org.bitcoinj.net.StreamConnection
+
+
Called when this connection is attached to an upstream write target (ie a low-level connection handler).
+
+
Sha256Hash - Class in org.bitcoinj.base
+
+
A Sha256Hash wraps a byte[] so that Sha256Hash.equals(java.lang.Object) and Sha256Hash.hashCode() work correctly, allowing it to be used as a key in a + map.
+
+
sha256hash160(byte[]) - Static method in class org.bitcoinj.crypto.internal.CryptoUtils
+
+
Calculate RIPEMD160(SHA256(input)).
+
+
shift(int) - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Set number of digits to shift the decimal separator to the right, coming from the standard BTC notation that was + common pre-2014.
+
+
shiftLeft(int) - Method in class org.bitcoinj.base.Coin
+
 
+
shiftRight(int) - Method in class org.bitcoinj.base.Coin
+
 
+
SHORTEST_POSSIBLE_PUSHDATA - Enum constant in enum class org.bitcoinj.wallet.DefaultRiskAnalysis.RuleViolation
+
 
+
shouldSelect(Transaction) - Method in class org.bitcoinj.wallet.AllowUnconfirmedCoinSelector
+
 
+
shouldSelect(Transaction) - Method in class org.bitcoinj.wallet.DefaultCoinSelector
+
+
Sub-classes can override this to just customize whether transactions are usable, but keep age sorting.
+
+
shouldVerifyTransactions() - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
Whether or not we are maintaining a set of unspent outputs and are verifying all transactions.
+
+
shouldVerifyTransactions() - Method in class org.bitcoinj.core.BlockChain
+
 
+
shouldVerifyTransactions() - Method in class org.bitcoinj.core.FullPrunedBlockChain
+
 
+
shuffleOutputs - Variable in class org.bitcoinj.wallet.SendRequest
+
+
If true (the default), the outputs will be shuffled during completion to randomize the location of the change + output, if any.
+
+
shuffleOutputs() - Method in class org.bitcoinj.core.Transaction
+
+
Randomly re-orders the transaction outputs: good for privacy
+
+
shutdown() - Method in class org.bitcoinj.net.discovery.DnsDiscovery.DnsSeedDiscovery
+
 
+
shutdown() - Method in class org.bitcoinj.net.discovery.MultiplexingDiscovery
+
 
+
shutdown() - Method in interface org.bitcoinj.net.discovery.PeerDiscovery
+
+
Stops any discovery in progress when we want to shut down quickly.
+
+
shutdown() - Method in class org.bitcoinj.net.discovery.SeedPeers
+
 
+
shutDown() - Method in class org.bitcoinj.kits.WalletAppKit
+
 
+
shutDown() - Method in class org.bitcoinj.net.BlockingClientManager
+
 
+
shutdownAndWait() - Method in class org.bitcoinj.wallet.WalletFiles
+
+
Shut down auto-saving.
+
+
shutdownAutosaveAndWait() - Method in class org.bitcoinj.wallet.Wallet
+
+
+ Disables auto-saving, after it had been enabled with + Wallet.autosaveToFile(File, Duration, WalletFiles.Listener) + before.
+
+
SIDE_CHAIN - Enum constant in enum class org.bitcoinj.core.AbstractBlockChain.NewBlockType
+
+
New block is on a side chain
+
+
sig - Variable in class org.bitcoinj.signers.CustomTransactionSigner.SignatureAndKey
+
 
+
SIG_SIZE - Static variable in class org.bitcoinj.script.Script
+
 
+
SIGHASH_ANYONECANPAY_VALUE - Static variable in class org.bitcoinj.core.Transaction
+
+
Deprecated. +
Instead use SigHash.ANYONECANPAY.value or SigHash.ANYONECANPAY.byteValue() as appropriate.
+
+
+
sighashFlags - Variable in class org.bitcoinj.crypto.TransactionSignature
+
+
A byte that controls which parts of a transaction are signed.
+
+
sigHashMode() - Method in class org.bitcoinj.crypto.TransactionSignature
+
 
+
sign(Sha256Hash) - Method in class org.bitcoinj.crypto.ECKey
+
+
Signs the given hash and returns the R and S components as BigIntegers.
+
+
sign(Sha256Hash, AesKey) - Method in class org.bitcoinj.crypto.DeterministicKey
+
 
+
sign(Sha256Hash, AesKey) - Method in class org.bitcoinj.crypto.ECKey
+
+
Signs the given hash and returns the R and S components as BigIntegers.
+
+
SIGNATURE_CANONICAL_ENCODING - Enum constant in enum class org.bitcoinj.wallet.DefaultRiskAnalysis.RuleViolation
+
 
+
SIGNATURE_FAILED_ERROR_MESSAGE - Static variable in class org.bitcoinj.crypto.utils.MessageVerifyUtils
+
 
+
SignatureAndKey(ECKey.ECDSASignature, ECKey) - Constructor for class org.bitcoinj.signers.CustomTransactionSigner.SignatureAndKey
+
 
+
SignatureDecodeException - Exception in org.bitcoinj.crypto
+
 
+
SignatureDecodeException() - Constructor for exception org.bitcoinj.crypto.SignatureDecodeException
+
 
+
SignatureDecodeException(String) - Constructor for exception org.bitcoinj.crypto.SignatureDecodeException
+
 
+
SignatureDecodeException(String, Throwable) - Constructor for exception org.bitcoinj.crypto.SignatureDecodeException
+
 
+
SignatureDecodeException(Throwable) - Constructor for exception org.bitcoinj.crypto.SignatureDecodeException
+
 
+
signedMessageToKey(String, String) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Given an arbitrary piece of text and a Bitcoin-format message signature encoded in base64, returns an ECKey + containing the public key that was used to sign it.
+
+
SIGNET - Enum constant in enum class org.bitcoinj.base.BitcoinNetwork
+
+
The Bitcoin signature-based test network, known as "signet", with id string "org.bitcoin.signet"
+
+
SigNetParams - Class in org.bitcoinj.params
+
+
Parameters for the signet, a separate public instance of Bitcoin that has relaxed rules suitable for development + and testing of applications and new Bitcoin versions.
+
+
SigNetParams() - Constructor for class org.bitcoinj.params.SigNetParams
+
 
+
signInputs - Variable in class org.bitcoinj.wallet.SendRequest
+
+
If true (the default), the inputs will be signed.
+
+
signInputs(TransactionSigner.ProposedTransaction, KeyBag) - Method in class org.bitcoinj.signers.CustomTransactionSigner
+
 
+
signInputs(TransactionSigner.ProposedTransaction, KeyBag) - Method in class org.bitcoinj.signers.LocalTransactionSigner
+
 
+
signInputs(TransactionSigner.ProposedTransaction, KeyBag) - Method in class org.bitcoinj.signers.MissingSigResolutionSigner
+
 
+
signInputs(TransactionSigner.ProposedTransaction, KeyBag) - Method in interface org.bitcoinj.signers.TransactionSigner
+
+
Signs given transaction's inputs.
+
+
signMessage(String) - Method in class org.bitcoinj.crypto.ECKey
+
+
Deprecated. +
use ECKey.signMessage(String, ScriptType) instead and specify the correct script type
+
+
+
signMessage(String, ScriptType) - Method in class org.bitcoinj.crypto.ECKey
+
+
Signs a text message using the standard Bitcoin messaging signing format and returns the signature as a base64 + encoded string.
+
+
signMessage(String, AesKey) - Method in class org.bitcoinj.crypto.ECKey
+
+
Deprecated. +
use ECKey.signMessage(String, AesKey, ScriptType) instead and specify the correct script type
+
+
+
signMessage(String, AesKey, ScriptType) - Method in class org.bitcoinj.crypto.ECKey
+
+
Signs a text message using the standard Bitcoin messaging signing format and returns the signature as a base64 + encoded string.
+
+
signPaymentRequest(Protos.PaymentRequest.Builder, X509Certificate[], PrivateKey) - Static method in class org.bitcoinj.protocols.payments.PaymentProtocol
+
+
Sign the provided payment request.
+
+
signTransaction(SendRequest) - Method in class org.bitcoinj.wallet.Wallet
+
+
Given a send request containing transaction, attempts to sign it's inputs.
+
+
signum() - Method in class org.bitcoinj.base.Coin
+
 
+
signum() - Method in interface org.bitcoinj.base.Monetary
+
 
+
signum() - Method in class org.bitcoinj.base.utils.Fiat
+
 
+
SIGPUSHONLY - Enum constant in enum class org.bitcoinj.script.Script.VerifyFlag
+
 
+
simple(InetAddress, int) - Static method in class org.bitcoinj.core.PeerAddress
+
+
Constructs a simple peer address from the given IP address and port, but without services.
+
+
simple(InetSocketAddress) - Static method in class org.bitcoinj.core.PeerAddress
+
+
Constructs a simple peer address from the given socket address, but without services.
+
+
SINGLE - Enum constant in enum class org.bitcoinj.core.Transaction.SigHash
+
 
+
size - Variable in class org.bitcoinj.core.BitcoinSerializer.BitcoinPacketHeader
+
 
+
size() - Method in class org.bitcoinj.core.BlockLocator
+
+
Returns the number of hashes in this block locator.
+
+
size() - Method in class org.bitcoinj.crypto.HDPath
+
 
+
size() - Method in class org.bitcoinj.script.ScriptChunk
+
 
+
size() - Method in class org.bitcoinj.utils.VersionTally
+
+
Get the size of the version window.
+
+
sizeOf(long) - Static method in class org.bitcoinj.base.VarInt
+
+
Returns the minimum encoded size of the given unsigned long value.
+
+
skipBytes(ByteBuffer, int) - Static method in class org.bitcoinj.base.internal.Buffers
+
+
Advance buffer position by a given number of bytes.
+
+
SMALLEST_UNIT_EXPONENT - Static variable in class org.bitcoinj.base.Coin
+
+
Number of decimals for one Bitcoin.
+
+
SMALLEST_UNIT_EXPONENT - Static variable in class org.bitcoinj.base.utils.Fiat
+
+
The absolute value of exponent of the value of a "smallest unit" in scientific notation.
+
+
smallestUnitExponent() - Method in class org.bitcoinj.base.Coin
+
 
+
smallestUnitExponent() - Method in interface org.bitcoinj.base.Monetary
+
+
Returns the absolute value of exponent of the value of a "smallest unit" in scientific notation.
+
+
smallestUnitExponent() - Method in class org.bitcoinj.base.utils.Fiat
+
 
+
smallNum(int) - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Adds the given number as a OP_N opcode to the end of the program.
+
+
smallNum(int, int) - Method in class org.bitcoinj.script.ScriptBuilder
+
+
Adds the given number as a OP_N opcode to the given index in the program.
+
+
SocketTimeoutTask - Class in org.bitcoinj.net
+
+
Component that implements the timeout capability of TimeoutHandler.
+
+
SocketTimeoutTask(Runnable) - Constructor for class org.bitcoinj.net.SocketTimeoutTask
+
 
+
solve() - Method in class org.bitcoinj.core.Block
+
+
Finds a value of nonce that makes the blocks hash lower than the difficulty target.
+
+
SORT_TX_BY_HEIGHT - Static variable in class org.bitcoinj.core.Transaction
+
+
A comparator that can be used to sort transactions by their chain height.
+
+
SORT_TX_BY_UPDATE_TIME - Static variable in class org.bitcoinj.core.Transaction
+
+
A comparator that can be used to sort transactions by their updateTime field.
+
+
SPACE_JOINER - Static variable in class org.bitcoinj.base.internal.InternalUtils
+
+
A InternalUtils.Joiner for joining strings into a single string delimited by a space character.
+
+
SPACE_JOINER - Static variable in class org.bitcoinj.core.Utils
+
+
Deprecated. +
Use @link java.util.StringJoiner} or a direct Guava dependency
+
+
+
spend(DeterministicKey) - Method in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
+
Creates a key chain that can spend from the given account key.
+
+
spendableCoinbaseDepth - Variable in class org.bitcoinj.core.NetworkParameters
+
+
The depth of blocks required for a coinbase transaction to be spendable.
+
+
spendingKey - Variable in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
 
+
spent - Variable in class org.bitcoinj.wallet.FilteringCoinSelector
+
 
+
SPENT - Enum constant in enum class org.bitcoinj.wallet.WalletTransaction.Pool
+
 
+
splitter(String) - Static method in class org.bitcoinj.base.internal.InternalUtils
+
+
Return a lambda for splitting a string into components
+
+
splitToList(String) - Method in interface org.bitcoinj.base.internal.InternalUtils.Splitter
+
 
+
SPVBlockStore - Class in org.bitcoinj.store
+
+
An SPVBlockStore holds a limited number of block headers in a memory mapped ring buffer.
+
+
SPVBlockStore(NetworkParameters, File) - Constructor for class org.bitcoinj.store.SPVBlockStore
+
+
Creates and initializes an SPV block store that can hold SPVBlockStore.DEFAULT_CAPACITY block headers.
+
+
SPVBlockStore(NetworkParameters, File, int, boolean) - Constructor for class org.bitcoinj.store.SPVBlockStore
+
+
Creates and initializes an SPV block store that can hold a given amount of blocks.
+
+
STANDARD_MAX_DIFFICULTY_TARGET - Static variable in class org.bitcoinj.core.Block
+
+
Standard maximum value for difficultyTarget (nBits) (Bitcoin MainNet and TestNet)
+
+
start() - Static method in class org.bitcoinj.base.internal.Stopwatch
+
+
Start a newly created stopwatch.
+
+
start() - Method in class org.bitcoinj.core.PeerGroup
+
+
Does a blocking startup.
+
+
startAsync() - Method in class org.bitcoinj.core.PeerGroup
+
+
Starts the PeerGroup and begins network activity.
+
+
startBlockChainDownload() - Method in class org.bitcoinj.core.Peer
+
+
Starts an asynchronous download of the block chain.
+
+
startBlockChainDownload(BlockchainDownloadEventListener) - Method in class org.bitcoinj.core.PeerGroup
+
+
Start downloading the blockchain.
+
+
startDownload(int) - Method in class org.bitcoinj.core.listeners.DownloadProgressTracker
+
+
Called when download is initiated.
+
+
startFilteredBlock(FilteredBlock) - Method in class org.bitcoinj.core.Peer
+
 
+
startUp() - Method in class org.bitcoinj.kits.WalletAppKit
+
 
+
startUp() - Method in class org.bitcoinj.net.BlockingClientManager
+
 
+
stop() - Method in class org.bitcoinj.base.internal.Stopwatch
+
+
Stops the stopwatch, if it is running.
+
+
stop() - Method in class org.bitcoinj.core.PeerGroup
+
+
Does a blocking stop
+
+
stopAsync() - Method in class org.bitcoinj.core.PeerGroup
+
 
+
stopHash - Variable in class org.bitcoinj.core.GetBlocksMessage
+
 
+
Stopwatch - Class in org.bitcoinj.base.internal
+
+
A tool for measuring time, mainly for log messages.
+
+
store() - Method in class org.bitcoinj.kits.WalletAppKit
+
 
+
storedBlock - Variable in class org.bitcoinj.testing.FakeTxBuilder.BlockPair
+
 
+
StoredBlock - Class in org.bitcoinj.core
+
+
Wraps a Block object with extra data that can be derived from the block chain but is slow or inconvenient to + calculate.
+
+
StoredBlock(Block, BigInteger, int) - Constructor for class org.bitcoinj.core.StoredBlock
+
+
Create a StoredBlock from a (header-only) Block, chain work value, and block height
+
+
StoredBlockAndWasUndoableFlag(StoredBlock, boolean) - Constructor for class org.bitcoinj.store.MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag
+
 
+
StoredUndoableBlock - Class in org.bitcoinj.core
+
+
Contains minimal data necessary to disconnect/connect the transactions + in the stored block at will.
+
+
StoredUndoableBlock(Sha256Hash, List<Transaction>) - Constructor for class org.bitcoinj.core.StoredUndoableBlock
+
 
+
StoredUndoableBlock(Sha256Hash, TransactionOutputChanges) - Constructor for class org.bitcoinj.core.StoredUndoableBlock
+
 
+
stream() - Method in class org.bitcoinj.utils.BlockFileLoader
+
 
+
streamBuffers() - Method in class org.bitcoinj.utils.BlockFileLoader
+
 
+
StreamConnection - Interface in org.bitcoinj.net
+
+
A generic handler which is used in NioServer, NioClient and BlockingClient to handle incoming + data streams.
+
+
StreamConnectionFactory - Interface in org.bitcoinj.net
+
+
A factory which generates new StreamConnections when a new connection is opened.
+
+
StreamUtils - Class in org.bitcoinj.base.internal
+
+
Stream Utilities.
+
+
StreamUtils() - Constructor for class org.bitcoinj.base.internal.StreamUtils
+
 
+
STRICTENC - Enum constant in enum class org.bitcoinj.script.Script.VerifyFlag
+
 
+
strings() - Static method in enum class org.bitcoinj.base.BitcoinNetwork
+
 
+
structure - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
style(BtcAutoFormat.Style) - Method in class org.bitcoinj.utils.BtcFormat.Builder
+
+
Specify the new BtcFormat is to be automatically-denominating.
+
+
subsidyDecreaseBlockCount - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
subtract(Coin) - Method in class org.bitcoinj.base.Coin
+
 
+
subtract(Fiat) - Method in class org.bitcoinj.base.utils.Fiat
+
 
+
subtract(ECPoint) - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
subtractFrom(Temporal) - Method in class org.bitcoinj.base.internal.Stopwatch
+
 
+
subVer - Variable in class org.bitcoinj.core.VersionMessage
+
+
User-Agent as defined in BIP 14.
+
+
SUCCESS - Enum constant in enum class org.bitcoinj.core.TransactionInput.ConnectionResult
+
 
+
successfulAsList(List<? extends CompletionStage<? extends T>>) - Static method in class org.bitcoinj.base.internal.FutureUtils
+
+
Note: When the migration to CompletableFuture is complete this routine will + either be removed or changed to return a generic CompletableFuture.
+
+
supportsDeterministicChains() - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
Are any deterministic keychains supported?
+
+
symbol() - Method in class org.bitcoinj.utils.BtcFixedFormat
+
+
Return the currency symbol that identifies the units in which values formatted by this + instance are denominated.
+
+
symbol(String) - Method in class org.bitcoinj.utils.BtcFormat.Builder
+
+
Specify a currency symbol to be used in the denomination-unit indicators + of formatted values.
+
+
SYMBOL - Enum constant in enum class org.bitcoinj.utils.BtcAutoFormat.Style
+
+
Constant for the formatting style that uses a currency symbol, e.g., "฿".
+
+
SYMBOL_BTC - Static variable in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Currency symbol for base 1 Bitcoin.
+
+
SYMBOL_MBTC - Static variable in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Currency symbol for base 1/1000 Bitcoin.
+
+
SYMBOL_SAT - Static variable in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Currency symbol for base 1 satoshi.
+
+
SYMBOL_UBTC - Static variable in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Currency symbol for base 1/1000000 Bitcoin.
+
+
symbols() - Method in class org.bitcoinj.utils.BtcFormat
+
+
Return a copy of the localized symbols used by this instance for formatting and parsing.
+
+
+

T

+
+
t1 - Variable in class org.bitcoinj.testing.FakeTxBuilder.DoubleSpends
+
 
+
t2 - Variable in class org.bitcoinj.testing.FakeTxBuilder.DoubleSpends
+
 
+
TaggableObject - Interface in org.bitcoinj.utils
+
+
Deprecated. +
Applications should use another mechanism to persist application state data
+
+
+
tags - Variable in class org.bitcoinj.utils.BaseTaggableObject
+
+
Deprecated.
+
target - Variable in class org.bitcoinj.wallet.DecryptingKeyBag
+
 
+
TARGET_SPACING - Static variable in class org.bitcoinj.core.NetworkParameters
+
 
+
TARGET_TIMESPAN - Static variable in class org.bitcoinj.core.NetworkParameters
+
 
+
targetTimespan - Variable in class org.bitcoinj.core.NetworkParameters
+
 
+
TB - Enum constant in enum class org.bitcoinj.base.SegwitAddress.SegwitHrp
+
 
+
TESTNET - Enum constant in enum class org.bitcoinj.base.BitcoinNetwork
+
+
The Bitcoin test network, known as "testnet", with id string "org.bitcoin.test"
+
+
TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE - Static variable in class org.bitcoinj.params.SigNetParams
+
 
+
TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE - Static variable in class org.bitcoinj.params.TestNet3Params
+
 
+
TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE - Static variable in class org.bitcoinj.params.UnitTestParams
+
 
+
TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED - Static variable in class org.bitcoinj.params.SigNetParams
+
 
+
TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED - Static variable in class org.bitcoinj.params.TestNet3Params
+
 
+
TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED - Static variable in class org.bitcoinj.params.UnitTestParams
+
 
+
TESTNET_MAJORITY_WINDOW - Static variable in class org.bitcoinj.params.SigNetParams
+
 
+
TESTNET_MAJORITY_WINDOW - Static variable in class org.bitcoinj.params.TestNet3Params
+
 
+
TestNet3Params - Class in org.bitcoinj.params
+
+
Parameters for the testnet, a separate public instance of Bitcoin that has relaxed rules suitable for development + and testing of applications and new Bitcoin versions.
+
+
TestNet3Params() - Constructor for class org.bitcoinj.params.TestNet3Params
+
 
+
THREAD_POOL - Static variable in class org.bitcoinj.utils.Threading
+
+
A caching thread pool that creates daemon threads, which won't keep the JVM alive waiting for more work.
+
+
Threading - Class in org.bitcoinj.utils
+
+
Various threading related utilities.
+
+
Threading() - Constructor for class org.bitcoinj.utils.Threading
+
 
+
Threading.UserThread - Class in org.bitcoinj.utils
+
 
+
threeTimes() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
THRESHOLD - Static variable in class org.bitcoinj.core.LockTime
+
+
Raw values below this threshold specify a block height, otherwise a timestamp in seconds since epoch.
+
+
THROW - Enum constant in enum class org.bitcoinj.wallet.Wallet.MissingSigsMode
+
+
If signature is missing, TransactionSigner.MissingSignatureException + will be thrown for P2SH and ECKey.MissingPrivateKeyException for other tx types.
+
+
throwOnLockCycles() - Static method in class org.bitcoinj.utils.Threading
+
 
+
time - Variable in class org.bitcoinj.core.VersionMessage
+
+
What the other side believes the current time to be.
+
+
time() - Method in class org.bitcoinj.core.Block
+
+
Returns the time at which the block was solved and broadcast, according to the clock of the solving node.
+
+
time() - Method in class org.bitcoinj.core.PeerAddress
+
+
Gets the time that the node was last seen as connected to the network.
+
+
time() - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns the time that the payment request was generated.
+
+
TimeoutHandler - Interface in org.bitcoinj.net
+
+
Provides basic support for socket timeouts.
+
+
timeoutOccurred() - Method in class org.bitcoinj.core.Peer
+
 
+
timeoutOccurred() - Method in class org.bitcoinj.core.PeerSocketHandler
+
 
+
timeoutOccurred() - Method in class org.bitcoinj.net.AbstractTimeoutHandler
+
+
Deprecated.
+
times(int) - Method in class org.bitcoinj.base.Coin
+
+
Alias for multiply
+
+
times(long) - Method in class org.bitcoinj.base.Coin
+
+
Alias for multiply
+
+
timesPow2(int) - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
timestamp() - Method in class org.bitcoinj.core.LockTime.TimeLock
+
 
+
TimeUtils - Class in org.bitcoinj.base.internal
+
+
Utilities for time and mock time.
+
+
TimeUtils() - Constructor for class org.bitcoinj.base.internal.TimeUtils
+
 
+
to(Address, Coin) - Static method in class org.bitcoinj.wallet.SendRequest
+
+
Creates a new SendRequest to the given address for the given value.
+
+
to(NetworkParameters, ECKey, Coin) - Static method in class org.bitcoinj.wallet.SendRequest
+
+
Deprecated. + +
+
+
to(ECKey, Coin) - Static method in class org.bitcoinj.wallet.SendRequest
+
+
Creates a new SendRequest to the given pubkey for the given value.
+
+
toAddress(ScriptType, Network) - Method in class org.bitcoinj.crypto.ECKey
+
 
+
toASN1() - Method in class org.bitcoinj.crypto.ECKey
+
+
Output this ECKey as an ASN.1 encoded private key, as understood by OpenSSL or used by Bitcoin Core + in its wallet storage format.
+
+
toBase58() - Method in class org.bitcoinj.base.LegacyAddress
+
+
Returns the base58-encoded textual form, including version and checksum bytes.
+
+
toBase58() - Method in class org.bitcoinj.crypto.BIP38PrivateKey
+
+
Returns the base58-encoded textual form, including version and checksum bytes.
+
+
toBase58() - Method in class org.bitcoinj.crypto.DumpedPrivateKey
+
+
Returns the base58-encoded textual form, including version and checksum bytes.
+
+
toBech32() - Method in class org.bitcoinj.base.SegwitAddress
+
+
Returns the textual form of the address.
+
+
toBigInteger() - Method in class org.bitcoinj.base.Sha256Hash
+
+
Returns the bytes interpreted as a positive integer.
+
+
toBtc() - Method in class org.bitcoinj.base.Coin
+
+
Convert to number of bitcoin (in BTC)
+
+
toByteArray() - Method in class org.bitcoinj.script.ScriptChunk
+
 
+
toCanonicalised() - Method in class org.bitcoinj.crypto.ECKey.ECDSASignature
+
+
Will automatically adjust the S component to be less than or equal to half the curve order, if necessary.
+
+
toCanonicalised() - Method in class org.bitcoinj.crypto.TransactionSignature
+
 
+
toDecrypted(CharSequence) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
toDecrypted(CharSequence) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
toDecrypted(CharSequence) - Method in interface org.bitcoinj.wallet.EncryptableKeyChain
+
+
Decrypts the key chain with the given password.
+
+
toDecrypted(AesKey) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
toDecrypted(AesKey) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
toDecrypted(AesKey) - Method in interface org.bitcoinj.wallet.EncryptableKeyChain
+
+
Decrypt the key chain with the given AES key and whatever KeyCrypter is already set.
+
+
toEncrypted(CharSequence) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
+
Convenience wrapper around BasicKeyChain.toEncrypted(KeyCrypter, AesKey) which uses the default Scrypt key derivation algorithm and + parameters, derives a key from the given password and returns the created key.
+
+
toEncrypted(CharSequence) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
toEncrypted(CharSequence) - Method in interface org.bitcoinj.wallet.EncryptableKeyChain
+
+
Takes the given password, which should be strong, derives a key from it and then invokes + EncryptableKeyChain.toEncrypted(KeyCrypter, AesKey) with + KeyCrypterScrypt as the crypter.
+
+
toEncrypted(KeyCrypter, AesKey) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
+
Encrypt the wallet using the KeyCrypter and the AES key.
+
+
toEncrypted(KeyCrypter, AesKey) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
toEncrypted(KeyCrypter, AesKey) - Method in interface org.bitcoinj.wallet.EncryptableKeyChain
+
+
Returns a new keychain holding identical/cloned keys to this chain, but encrypted under the given key.
+
+
toEntropy(List<String>) - Method in class org.bitcoinj.crypto.MnemonicCode
+
+
Convert mnemonic word list to original entropy value.
+
+
toFriendlyString() - Method in class org.bitcoinj.base.Coin
+
+
Returns the value as a 0.12 type string.
+
+
toFriendlyString() - Method in class org.bitcoinj.base.utils.Fiat
+
+
Returns the value as a 0.12 type string.
+
+
toHexString() - Method in class org.bitcoinj.wallet.DeterministicSeed
+
+
Returns the seed as hex or null if encrypted.
+
+
toKeyParameter() - Method in class org.bitcoinj.crypto.AesKey
+
+
Deprecated. +
Use new KeyParameter(key.bytes)
+
+
+
toMnemonic(byte[]) - Method in class org.bitcoinj.crypto.MnemonicCode
+
+
Convert entropy data to mnemonic word list.
+
+
toPlainString() - Method in class org.bitcoinj.base.Coin
+
+
+ Returns the value as a plain string denominated in BTC.
+
+
toPlainString() - Method in class org.bitcoinj.base.utils.Fiat
+
+
+ Returns the value as a plain string.
+
+
TorUtils - Class in org.bitcoinj.core.internal
+
+
Utilities for encoding and decoding Onion addresses.
+
+
TorUtils() - Constructor for class org.bitcoinj.core.internal.TorUtils
+
 
+
toSat() - Method in class org.bitcoinj.base.Coin
+
+
Convert to number of satoshis
+
+
toSeed(List<String>, String) - Static method in class org.bitcoinj.crypto.MnemonicCode
+
+
Convert mnemonic word list to seed.
+
+
toSocketAddress() - Method in class org.bitcoinj.core.PeerAddress
+
 
+
toString() - Method in enum class org.bitcoinj.base.BitcoinNetwork
+
+
Return the canonical, lowercase, user-facing String for an enum.
+
+
toString() - Method in class org.bitcoinj.base.Coin
+
 
+
toString() - Method in class org.bitcoinj.base.internal.Stopwatch
+
 
+
toString() - Method in class org.bitcoinj.base.LegacyAddress
+
 
+
toString() - Method in enum class org.bitcoinj.base.SegwitAddress.SegwitHrp
+
+
Get the HRP in lowercase.
+
+
toString() - Method in class org.bitcoinj.base.SegwitAddress
+
 
+
toString() - Method in class org.bitcoinj.base.Sha256Hash
+
 
+
toString() - Method in class org.bitcoinj.base.utils.Fiat
+
 
+
toString() - Method in class org.bitcoinj.base.VarInt
+
 
+
toString() - Method in class org.bitcoinj.core.AddressV1Message
+
 
+
toString() - Method in class org.bitcoinj.core.AddressV2Message
+
 
+
toString() - Method in class org.bitcoinj.core.Block
+
+
Returns a multi-line string containing a description of the contents of + the block.
+
+
toString() - Method in class org.bitcoinj.core.BlockLocator
+
 
+
toString() - Method in class org.bitcoinj.core.BloomFilter
+
 
+
toString() - Method in class org.bitcoinj.core.FeeFilterMessage
+
 
+
toString() - Method in class org.bitcoinj.core.FilteredBlock
+
 
+
toString() - Method in class org.bitcoinj.core.GetBlocksMessage
+
 
+
toString() - Method in class org.bitcoinj.core.GetHeadersMessage
+
 
+
toString() - Method in class org.bitcoinj.core.InventoryItem
+
 
+
toString() - Method in class org.bitcoinj.core.ListMessage
+
 
+
toString() - Method in class org.bitcoinj.core.LockTime
+
 
+
toString() - Method in class org.bitcoinj.core.PartialMerkleTree
+
 
+
toString() - Method in class org.bitcoinj.core.Peer
+
 
+
toString() - Method in class org.bitcoinj.core.PeerAddress
+
 
+
toString() - Method in class org.bitcoinj.core.RejectMessage
+
+
A String representation of the relevant details of this reject message.
+
+
toString() - Method in class org.bitcoinj.core.Services
+
 
+
toString() - Method in class org.bitcoinj.core.StoredBlock
+
 
+
toString() - Method in class org.bitcoinj.core.StoredUndoableBlock
+
 
+
toString() - Method in class org.bitcoinj.core.Transaction
+
 
+
toString() - Method in class org.bitcoinj.core.TransactionConfidence
+
 
+
toString() - Method in class org.bitcoinj.core.TransactionInput
+
+
Returns a human-readable debug string.
+
+
toString() - Method in class org.bitcoinj.core.TransactionOutPoint
+
 
+
toString() - Method in class org.bitcoinj.core.TransactionOutput
+
+
Returns a human-readable debug string.
+
+
toString() - Method in class org.bitcoinj.core.TransactionWitness
+
 
+
toString() - Method in class org.bitcoinj.core.UnknownMessage
+
 
+
toString() - Method in class org.bitcoinj.core.UTXO
+
 
+
toString() - Method in class org.bitcoinj.core.VersionMessage
+
 
+
toString() - Method in class org.bitcoinj.crypto.BIP38PrivateKey
+
 
+
toString() - Method in class org.bitcoinj.crypto.ChildNumber
+
 
+
toString() - Method in class org.bitcoinj.crypto.DeterministicKey
+
 
+
toString() - Method in class org.bitcoinj.crypto.DumpedPrivateKey
+
 
+
toString() - Method in class org.bitcoinj.crypto.ECKey
+
 
+
toString() - Method in class org.bitcoinj.crypto.EncryptedData
+
 
+
toString() - Method in class org.bitcoinj.crypto.HDPath
+
 
+
toString() - Method in class org.bitcoinj.crypto.KeyCrypterScrypt
+
 
+
toString() - Method in class org.bitcoinj.net.discovery.DnsDiscovery.DnsSeedDiscovery
+
 
+
toString() - Method in class org.bitcoinj.protocols.payments.PaymentProtocol.PkiVerificationData
+
 
+
toString() - Method in class org.bitcoinj.script.Script
+
+
Returns the program opcodes as a string, for example "[1234] DUP HASH160", or "<empty>".
+
+
toString() - Method in class org.bitcoinj.script.ScriptChunk
+
 
+
toString() - Method in class org.bitcoinj.uri.BitcoinURI
+
 
+
toString() - Method in class org.bitcoinj.utils.BtcAutoFormat
+
+
Return a brief description of this formatter.
+
+
toString() - Method in class org.bitcoinj.utils.BtcFixedFormat
+
+
Returns a brief description of this formatter.
+
+
toString() - Method in class org.bitcoinj.utils.ExponentialBackoff
+
 
+
toString() - Method in class org.bitcoinj.wallet.DefaultRiskAnalysis
+
 
+
toString() - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
toString() - Method in class org.bitcoinj.wallet.DeterministicSeed
+
 
+
toString() - Method in class org.bitcoinj.wallet.RedeemData
+
 
+
toString() - Method in class org.bitcoinj.wallet.SendRequest
+
 
+
toString() - Method in class org.bitcoinj.wallet.Wallet
+
 
+
toString(boolean) - Method in class org.bitcoinj.wallet.DeterministicSeed
+
 
+
toString(boolean, boolean, AesKey) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
 
+
toString(boolean, boolean, AesKey, boolean, boolean, AbstractBlockChain) - Method in class org.bitcoinj.wallet.Wallet
+
+
Formats the wallet as a human-readable piece of text.
+
+
toString(boolean, boolean, AesKey, Network) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
 
+
toString(boolean, boolean, AesKey, NetworkParameters) - Method in class org.bitcoinj.wallet.DeterministicKeyChain
+
+ +
+
toString(boolean, AesKey, Network) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
 
+
toString(boolean, AesKey, NetworkParameters) - Method in class org.bitcoinj.wallet.BasicKeyChain
+
+ +
+
toString(List<byte[]>) - Static method in class org.bitcoinj.core.Utils
+
 
+
toString(Network) - Method in class org.bitcoinj.core.TransactionOutput
+
+
Returns a human-readable debug string.
+
+
toString(AbstractBlockChain, Network) - Method in class org.bitcoinj.core.Transaction
+
+
A human-readable version of the transaction useful for debugging.
+
+
toString(AbstractBlockChain, Network, CharSequence) - Method in class org.bitcoinj.core.Transaction
+
+
A human-readable version of the transaction useful for debugging.
+
+
toStringServices(long) - Static method in class org.bitcoinj.core.VersionMessage
+
+
Deprecated. + +
+
+
toStringWithPrivate(AesKey, Network) - Method in class org.bitcoinj.crypto.ECKey
+
+
Produce a string rendering of the ECKey INCLUDING the private key.
+
+
toStringWithPrivate(AesKey, NetworkParameters) - Method in class org.bitcoinj.crypto.ECKey
+
+ +
+
totalValue() - Method in class org.bitcoinj.wallet.CoinSelection
+
 
+
toUnmodifiableList() - Static method in class org.bitcoinj.base.internal.StreamUtils
+
+
Return a collector that collects a Stream into an unmodifiable list.
+
+
trackFailure() - Method in class org.bitcoinj.utils.ExponentialBackoff
+
+
Track a failure - multiply the back off interval by the multiplier
+
+
trackFilteredTransactions(int) - Method in class org.bitcoinj.core.AbstractBlockChain
+
+
We completed handling of a filtered block.
+
+
trackSuccess() - Method in class org.bitcoinj.utils.ExponentialBackoff
+
+
Track a success - reset back off interval to the initial value
+
+
transaction() - Method in class org.bitcoinj.core.TransactionBroadcast
+
 
+
transaction() - Method in class org.bitcoinj.wallet.Wallet.SendResult
+
 
+
Transaction - Class in org.bitcoinj.core
+
+
A transaction represents the movement of coins from some addresses to some other addresses.
+
+
Transaction() - Constructor for class org.bitcoinj.core.Transaction
+
 
+
Transaction(NetworkParameters) - Constructor for class org.bitcoinj.core.Transaction
+
+
Deprecated. + +
+
+
TRANSACTION - Enum constant in enum class org.bitcoinj.core.InventoryItem.Type
+
 
+
Transaction.Purpose - Enum Class in org.bitcoinj.core
+
+
This enum describes the underlying reason the transaction was created.
+
+
Transaction.SigHash - Enum Class in org.bitcoinj.core
+
+
These constants are a part of a scriptSig signature on the inputs.
+
+
TransactionBag - Interface in org.bitcoinj.core
+
+
This interface is used to abstract the Wallet and the Transaction
+
+
TransactionBroadcast - Class in org.bitcoinj.core
+
+
Represents a single transaction broadcast that we are performing.
+
+
TransactionBroadcast.ProgressCallback - Interface in org.bitcoinj.core
+
+
An interface for receiving progress information on the propagation of the tx, from 0.0 to 1.0
+
+
TransactionBroadcaster - Interface in org.bitcoinj.core
+
+
A general interface which declares the ability to broadcast transactions.
+
+
TransactionConfidence - Class in org.bitcoinj.core
+
+
A TransactionConfidence object tracks data you can use to make a confidence decision about a transaction.
+
+
TransactionConfidence(Sha256Hash) - Constructor for class org.bitcoinj.core.TransactionConfidence
+
 
+
TransactionConfidence.ConfidenceType - Enum Class in org.bitcoinj.core
+
+
Describes the state of the transaction in general terms.
+
+
TransactionConfidence.Listener - Interface in org.bitcoinj.core
+
+
A confidence listener is informed when the level of TransactionConfidence is updated by something, like + for example a Wallet.
+
+
TransactionConfidence.Listener.ChangeReason - Enum Class in org.bitcoinj.core
+
+
An enum that describes why a transaction confidence listener is being invoked (i.e.
+
+
TransactionConfidence.Source - Enum Class in org.bitcoinj.core
+
+
Information about where the transaction was first seen (network, sent direct from peer, created by ourselves).
+
+
TransactionConfidenceEventListener - Interface in org.bitcoinj.core.listeners
+
+
Implementors are called when confidence of a transaction changes.
+
+
TransactionInput - Class in org.bitcoinj.core
+
+
A transfer of coins from one address to another creates a transaction in which the outputs + can be claimed by the recipient in the input of another transaction.
+
+
TransactionInput(Transaction, byte[], TransactionOutPoint) - Constructor for class org.bitcoinj.core.TransactionInput
+
 
+
TransactionInput(Transaction, byte[], TransactionOutPoint, Coin) - Constructor for class org.bitcoinj.core.TransactionInput
+
 
+
TransactionInput.ConnectionResult - Enum Class in org.bitcoinj.core
+
 
+
TransactionInput.ConnectMode - Enum Class in org.bitcoinj.core
+
 
+
TransactionOutPoint - Class in org.bitcoinj.core
+
+
This message is a reference or pointer to an output of a different transaction.
+
+
TransactionOutPoint(long, Sha256Hash) - Constructor for class org.bitcoinj.core.TransactionOutPoint
+
 
+
TransactionOutPoint(long, Transaction) - Constructor for class org.bitcoinj.core.TransactionOutPoint
+
 
+
TransactionOutPoint(TransactionOutput) - Constructor for class org.bitcoinj.core.TransactionOutPoint
+
 
+
TransactionOutput - Class in org.bitcoinj.core
+
+
A TransactionOutput message contains a scriptPubKey that controls who is able to spend its value.
+
+
TransactionOutput(NetworkParameters, Transaction, Coin, byte[]) - Constructor for class org.bitcoinj.core.TransactionOutput
+
+ +
+
TransactionOutput(Transaction, Coin, byte[]) - Constructor for class org.bitcoinj.core.TransactionOutput
+
 
+
TransactionOutput(Transaction, Coin, Address) - Constructor for class org.bitcoinj.core.TransactionOutput
+
+
Creates an output that sends 'value' to the given address (public key hash).
+
+
TransactionOutput(Transaction, Coin, ECKey) - Constructor for class org.bitcoinj.core.TransactionOutput
+
+
Creates an output that sends 'value' to the given public key using a simple CHECKSIG script (no addresses).
+
+
TransactionOutputChanges - Class in org.bitcoinj.core
+
+
TransactionOutputChanges represents a delta to the set of unspent outputs.
+
+
TransactionOutputChanges(List<UTXO>, List<UTXO>) - Constructor for class org.bitcoinj.core.TransactionOutputChanges
+
 
+
TransactionReceivedInBlockListener - Interface in org.bitcoinj.core.listeners
+
+
Listener interface for when we receive a new block that contains a relevant + transaction.
+
+
transactions - Variable in class org.bitcoinj.wallet.Wallet
+
 
+
TransactionSignature - Class in org.bitcoinj.crypto
+
+
A TransactionSignature wraps an ECKey.ECDSASignature and adds methods for handling + the additional SIGHASH mode byte that is used.
+
+
TransactionSignature(BigInteger, BigInteger) - Constructor for class org.bitcoinj.crypto.TransactionSignature
+
+
Constructs a signature with the given components and SIGHASH_ALL.
+
+
TransactionSignature(BigInteger, BigInteger, int) - Constructor for class org.bitcoinj.crypto.TransactionSignature
+
+
Constructs a signature with the given components and raw sighash flag bytes (needed for rule compatibility).
+
+
TransactionSignature(ECKey.ECDSASignature, Transaction.SigHash, boolean) - Constructor for class org.bitcoinj.crypto.TransactionSignature
+
+
Constructs a transaction signature based on the ECDSA signature.
+
+
TransactionSigner - Interface in org.bitcoinj.signers
+
+
Implementations of this interface are intended to sign inputs of the given transaction.
+
+
TransactionSigner.MissingSignatureException - Exception in org.bitcoinj.signers
+
 
+
TransactionSigner.ProposedTransaction - Class in org.bitcoinj.signers
+
+
This class wraps transaction proposed to complete keeping a metadata that may be updated, used and effectively + shared by transaction signers.
+
+
TransactionWitness - Class in org.bitcoinj.core
+
 
+
triggerShutdown() - Method in class org.bitcoinj.net.NioClientManager
+
 
+
triggerShutdown() - Method in class org.bitcoinj.net.NioServer
+
+
Invoked by the Execution service when it's time to stop.
+
+
TrustStoreLoader - Interface in org.bitcoinj.crypto
+
+
An implementation of TrustStoreLoader handles fetching a KeyStore from the operating system, a file, etc.
+
+
TrustStoreLoader.DefaultTrustStoreLoader - Class in org.bitcoinj.crypto
+
 
+
TrustStoreLoader.FileTrustStoreLoader - Class in org.bitcoinj.crypto
+
 
+
twice() - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
twiceOf(byte[]) - Static method in class org.bitcoinj.base.Sha256Hash
+
+
Creates a new instance containing the hash of the calculated hash of the given bytes.
+
+
twiceOf(byte[], byte[]) - Static method in class org.bitcoinj.base.Sha256Hash
+
+
Creates a new instance containing the hash of the calculated hash of the given bytes.
+
+
twicePlus(ECPoint) - Method in class org.bitcoinj.crypto.LazyECPoint
+
 
+
tx - Variable in class org.bitcoinj.wallet.DefaultRiskAnalysis
+
 
+
tx - Variable in class org.bitcoinj.wallet.SendRequest
+
+
A transaction, probably incomplete, that describes the outline of what you want to do.
+
+
tx - Variable in class org.bitcoinj.wallet.Wallet.SendResult
+
+ +
+
TxConfidenceTable - Class in org.bitcoinj.core
+
+
Tracks transactions that are being announced across the network.
+
+
TxConfidenceTable() - Constructor for class org.bitcoinj.core.TxConfidenceTable
+
+
Creates a table that will track at most TxConfidenceTable.MAX_SIZE entries.
+
+
TxConfidenceTable(int) - Constructor for class org.bitcoinj.core.TxConfidenceTable
+
+
Creates a table that will track at most the given number of transactions (allowing you to bound memory + usage).
+
+
txMap - Variable in class org.bitcoinj.wallet.WalletProtobufSerializer
+
 
+
txOutsCreated - Variable in class org.bitcoinj.core.TransactionOutputChanges
+
 
+
txOutsSpent - Variable in class org.bitcoinj.core.TransactionOutputChanges
+
 
+
type - Variable in class org.bitcoinj.core.InventoryItem
+
 
+
TYPE - Enum constant in enum class org.bitcoinj.core.TransactionConfidence.Listener.ChangeReason
+
+
Occurs when the type returned by TransactionConfidence.getConfidenceType() + has changed.
+
+
+

U

+
+
UBTC - Static variable in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Standard format for the µBTC denomination.
+
+
unCache() - Method in class org.bitcoinj.core.Block
+
 
+
uncaughtExceptionHandler - Static variable in class org.bitcoinj.utils.Threading
+
+
An exception handler that will be invoked for any exceptions that occur in the user thread, and + any unhandled exceptions that are caught whilst the framework is processing network traffic or doing other + background tasks.
+
+
UNCONNECTED - Static variable in class org.bitcoinj.core.TransactionOutPoint
+
+
Special outpoint that normally marks a coinbase input.
+
+
UnexpectedCoinbaseInput() - Constructor for exception org.bitcoinj.core.VerificationException.UnexpectedCoinbaseInput
+
 
+
UnexpectedWitnessVersion() - Constructor for exception org.bitcoinj.base.exceptions.AddressFormatException.UnexpectedWitnessVersion
+
 
+
UnexpectedWitnessVersion(String) - Constructor for exception org.bitcoinj.base.exceptions.AddressFormatException.UnexpectedWitnessVersion
+
 
+
UNITNET_MAJORITY_WINDOW - Static variable in class org.bitcoinj.params.UnitTestParams
+
 
+
UnitTestParams - Class in org.bitcoinj.params
+
+
Network parameters used by the bitcoinj unit tests (and potentially your own).
+
+
UnitTestParams() - Constructor for class org.bitcoinj.params.UnitTestParams
+
 
+
UNKNOWN - Enum constant in enum class org.bitcoinj.core.Transaction.Purpose
+
+
Used when the purpose of a transaction is genuinely unknown.
+
+
UNKNOWN - Enum constant in enum class org.bitcoinj.core.TransactionConfidence.ConfidenceType
+
+
If a transaction hasn't been broadcast yet, or there's no record of it, its confidence is UNKNOWN.
+
+
UNKNOWN - Enum constant in enum class org.bitcoinj.core.TransactionConfidence.Source
+
+
We don't know where the transaction came from.
+
+
UnknownMessage - Class in org.bitcoinj.core
+
+
Instances of this class are not safe for use by multiple threads.
+
+
UnknownMessage(String) - Constructor for class org.bitcoinj.core.UnknownMessage
+
 
+
unmodifiableList - Variable in class org.bitcoinj.crypto.HDPath
+
 
+
UnreadableWalletException - Exception in org.bitcoinj.wallet
+
+
Thrown by the WalletProtobufSerializer when the serialized protocol buffer is either corrupted, + internally inconsistent or appears to be from the future.
+
+
UnreadableWalletException(String) - Constructor for exception org.bitcoinj.wallet.UnreadableWalletException
+
 
+
UnreadableWalletException(String, Throwable) - Constructor for exception org.bitcoinj.wallet.UnreadableWalletException
+
 
+
UnreadableWalletException.BadPassword - Exception in org.bitcoinj.wallet
+
 
+
UnreadableWalletException.FutureVersion - Exception in org.bitcoinj.wallet
+
 
+
UnreadableWalletException.WrongNetwork - Exception in org.bitcoinj.wallet
+
 
+
unregister(NetworkParameters) - Static method in class org.bitcoinj.params.Networks
+
+
Unregister a network type.
+
+
unsafeBitcoinSerialize() - Method in interface org.bitcoinj.core.Message
+
+
Deprecated. + +
+
+
unset() - Static method in class org.bitcoinj.core.LockTime
+
+
Construct an unset lock time.
+
+
UNSET - Enum constant in enum class org.bitcoinj.core.Transaction.SigHash
+
 
+
UNSPENT - Enum constant in enum class org.bitcoinj.wallet.WalletTransaction.Pool
+
 
+
UPDATE_ALL - Enum constant in enum class org.bitcoinj.core.BloomFilter.BloomUpdate
+
 
+
UPDATE_NONE - Enum constant in enum class org.bitcoinj.core.BloomFilter.BloomUpdate
+
 
+
UPDATE_P2PUBKEY_ONLY - Enum constant in enum class org.bitcoinj.core.BloomFilter.BloomUpdate
+
+
Only adds outpoints to the filter if the output is a P2PK/pay-to-multisig script
+
+
updateScriptWithSignature(Script, byte[], int, int, int) - Static method in class org.bitcoinj.script.ScriptBuilder
+
+
Returns a copy of the given scriptSig with the signature inserted in the given position.
+
+
updateTime() - Method in class org.bitcoinj.core.Transaction
+
+
Returns the earliest time at which the transaction was seen (broadcast or included into the chain), + or empty if that information isn't available.
+
+
upgradeToDeterministic(ScriptType, AesKey) - Method in class org.bitcoinj.wallet.Wallet
+
+
Upgrades the wallet to be deterministic (BIP32).
+
+
upgradeToDeterministic(ScriptType, KeyChainGroupStructure, long, AesKey) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+ +
+
upgradeToDeterministic(ScriptType, KeyChainGroupStructure, Instant, AesKey) - Method in class org.bitcoinj.wallet.KeyChainGroup
+
+
This method will upgrade the wallet along the following path: Basic --> P2PKH --> P2WPKH
+
+
upgradeToDeterministic(ScriptType, KeyChainGroupStructure, AesKey) - Method in class org.bitcoinj.wallet.Wallet
+
+
Upgrades the wallet to be deterministic (BIP32).
+
+
uriScheme() - Method in enum class org.bitcoinj.base.BitcoinNetwork
+
+
The URI scheme for Bitcoin.
+
+
uriScheme() - Method in interface org.bitcoinj.base.Network
+
+
The URI scheme for this network.
+
+
uriScheme() - Method in class org.bitcoinj.testing.MockAltNetwork
+
 
+
USE_DUMMY_SIG - Enum constant in enum class org.bitcoinj.wallet.Wallet.MissingSigsMode
+
+
Missing signatures will be replaced by dummy sigs.
+
+
USE_OP_ZERO - Enum constant in enum class org.bitcoinj.wallet.Wallet.MissingSigsMode
+
+
Input script will have OP_0 instead of missing signatures
+
+
useAutoSave - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
USER_PAYMENT - Enum constant in enum class org.bitcoinj.core.Transaction.Purpose
+
+
Transaction created to satisfy a user payment request.
+
+
USER_THREAD - Static variable in class org.bitcoinj.utils.Threading
+
+
An executor with one thread that is intended for running event listeners on.
+
+
userAgent - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
UserThread() - Constructor for class org.bitcoinj.utils.Threading.UserThread
+
 
+
Utils - Class in org.bitcoinj.core
+
+
A collection of various utility methods that are helpful for working with the Bitcoin protocol.
+
+
Utils() - Constructor for class org.bitcoinj.core.Utils
+
 
+
UTXO - Class in org.bitcoinj.core
+
+
A UTXO message contains the information necessary to check a spending transaction.
+
+
UTXO(Sha256Hash, long, Coin, int, boolean, Script) - Constructor for class org.bitcoinj.core.UTXO
+
+
Creates a stored transaction output.
+
+
UTXO(Sha256Hash, long, Coin, int, boolean, Script, String) - Constructor for class org.bitcoinj.core.UTXO
+
+
Creates a stored transaction output.
+
+
UTXOProvider - Interface in org.bitcoinj.core
+
+
A UTXOProvider encapsulates functionality for returning unspent transaction outputs, + for use by the wallet or other code that crafts spends.
+
+
UTXOProviderException - Exception in org.bitcoinj.core
+
 
+
UTXOProviderException() - Constructor for exception org.bitcoinj.core.UTXOProviderException
+
 
+
UTXOProviderException(String) - Constructor for exception org.bitcoinj.core.UTXOProviderException
+
 
+
UTXOProviderException(String, Throwable) - Constructor for exception org.bitcoinj.core.UTXOProviderException
+
 
+
UTXOProviderException(Throwable) - Constructor for exception org.bitcoinj.core.UTXOProviderException
+
 
+
+

V

+
+
value - Variable in class org.bitcoinj.base.Coin
+
+
The number of satoshis of this monetary value.
+
+
value - Variable in class org.bitcoinj.base.utils.Fiat
+
+
The number of smallest units of this monetary value.
+
+
value - Variable in class org.bitcoinj.core.LockTime
+
 
+
value - Variable in enum class org.bitcoinj.core.Transaction.SigHash
+
 
+
valueGathered - Variable in class org.bitcoinj.wallet.CoinSelection
+
+
Deprecated. + +
+
+
valueOf(int, int) - Static method in class org.bitcoinj.base.Coin
+
+
Create a Coin from an amount expressed in "the way humans are used to".
+
+
valueOf(long) - Static method in class org.bitcoinj.base.Coin
+
+
Create a Coin from a long integer number of satoshis.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.base.Bech32.Encoding
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.base.BitcoinNetwork
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.base.internal.PlatformUtils.OS
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.base.internal.PlatformUtils.Runtime
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.base.LegacyAddress.AddressHeader
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.base.LegacyAddress.P2SHHeader
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.base.ScriptType
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.base.SegwitAddress.SegwitHrp
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.core.AbstractBlockChain.NewBlockType
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.core.Block.VerifyFlag
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.core.BloomFilter.BloomUpdate
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.core.InventoryItem.Type
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.core.PeerGroup.FilterRecalculateMode
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.core.ProtocolVersion
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.core.RejectMessage.RejectCode
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.core.Transaction.Purpose
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.core.Transaction.SigHash
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.core.TransactionConfidence.ConfidenceType
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.core.TransactionConfidence.Listener.ChangeReason
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.core.TransactionConfidence.Source
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.core.TransactionInput.ConnectionResult
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.core.TransactionInput.ConnectMode
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.crypto.HDKeyDerivation.PublicDeriveMode
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.script.Script.VerifyFlag
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.script.ScriptError
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.utils.BtcAutoFormat.Style
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.wallet.BasicKeyChain.State
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.wallet.DefaultRiskAnalysis.RuleViolation
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.wallet.KeyChain.KeyPurpose
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.wallet.RiskAnalysis.Result
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.wallet.Wallet.BalanceType
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.wallet.Wallet.MissingSigsMode
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String) - Static method in enum class org.bitcoinj.wallet.WalletTransaction.Pool
+
+
Returns the enum constant of this class with the specified name.
+
+
valueOf(String, long) - Static method in class org.bitcoinj.base.utils.Fiat
+
 
+
values() - Static method in enum class org.bitcoinj.base.Bech32.Encoding
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.base.BitcoinNetwork
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.base.internal.PlatformUtils.OS
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.base.internal.PlatformUtils.Runtime
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.base.LegacyAddress.AddressHeader
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.base.LegacyAddress.P2SHHeader
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.base.ScriptType
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.base.SegwitAddress.SegwitHrp
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.core.AbstractBlockChain.NewBlockType
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.core.Block.VerifyFlag
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.core.BloomFilter.BloomUpdate
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.core.InventoryItem.Type
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.core.PeerGroup.FilterRecalculateMode
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.core.ProtocolVersion
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.core.RejectMessage.RejectCode
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.core.Transaction.Purpose
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.core.Transaction.SigHash
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.core.TransactionConfidence.ConfidenceType
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.core.TransactionConfidence.Listener.ChangeReason
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.core.TransactionConfidence.Source
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.core.TransactionInput.ConnectionResult
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.core.TransactionInput.ConnectMode
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.crypto.HDKeyDerivation.PublicDeriveMode
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.script.Script.VerifyFlag
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.script.ScriptError
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.utils.BtcAutoFormat.Style
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.wallet.BasicKeyChain.State
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.wallet.DefaultRiskAnalysis.RuleViolation
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.wallet.KeyChain.KeyPurpose
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.wallet.RiskAnalysis.Result
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.wallet.Wallet.BalanceType
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.wallet.Wallet.MissingSigsMode
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
values() - Static method in enum class org.bitcoinj.wallet.WalletTransaction.Pool
+
+
Returns an array containing the constants of this enum class, in +the order they are declared.
+
+
VarInt - Class in org.bitcoinj.base
+
+
A variable-length encoded unsigned integer using Satoshi's encoding (a.k.a.
+
+
VarInt(byte[], int) - Constructor for class org.bitcoinj.base.VarInt
+
+
Deprecated. + +
+
+
VarInt(long) - Constructor for class org.bitcoinj.base.VarInt
+
+
Deprecated. + +
+
+
vChain - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
VerificationException - Exception in org.bitcoinj.core
+
 
+
VerificationException() - Constructor for exception org.bitcoinj.core.VerificationException
+
 
+
VerificationException(Exception) - Constructor for exception org.bitcoinj.core.VerificationException
+
 
+
VerificationException(String) - Constructor for exception org.bitcoinj.core.VerificationException
+
 
+
VerificationException(String, Throwable) - Constructor for exception org.bitcoinj.core.VerificationException
+
 
+
VerificationException.BlockVersionOutOfDate - Exception in org.bitcoinj.core
+
 
+
VerificationException.CoinbaseHeightMismatch - Exception in org.bitcoinj.core
+
 
+
VerificationException.CoinbaseScriptSizeOutOfRange - Exception in org.bitcoinj.core
+
 
+
VerificationException.DuplicatedOutPoint - Exception in org.bitcoinj.core
+
 
+
VerificationException.EmptyInputsOrOutputs - Exception in org.bitcoinj.core
+
 
+
VerificationException.ExcessiveValue - Exception in org.bitcoinj.core
+
 
+
VerificationException.LargerThanMaxBlockSize - Exception in org.bitcoinj.core
+
 
+
VerificationException.NegativeValueOutput - Exception in org.bitcoinj.core
+
 
+
VerificationException.NoncanonicalSignature - Exception in org.bitcoinj.core
+
 
+
VerificationException.UnexpectedCoinbaseInput - Exception in org.bitcoinj.core
+
 
+
verify() - Method in class org.bitcoinj.core.TransactionInput
+
+
For a connected transaction, runs the script against the connected pubkey and verifies they are correct.
+
+
verify(byte[], byte[]) - Method in class org.bitcoinj.crypto.ECKey
+
+
Verifies the given ASN.1 encoded ECDSA signature against a hash using the public key.
+
+
verify(byte[], byte[], byte[]) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Verifies the given ASN.1 encoded ECDSA signature against a hash using the public key.
+
+
verify(byte[], ECKey.ECDSASignature, byte[]) - Static method in class org.bitcoinj.crypto.ECKey
+
+
Verifies the given ECDSA signature against the message bytes using the public key bytes.
+
+
verify(Network, Transaction) - Static method in class org.bitcoinj.core.Transaction
+
+
Checks the transaction contents for sanity, in ways that can be done in a standalone manner.
+
+
verify(Sha256Hash, ECKey.ECDSASignature) - Method in class org.bitcoinj.crypto.ECKey
+
+
Verifies the given R/S pair (signature) against a hash using the public key.
+
+
verify(NetworkParameters, Block, int, EnumSet<Block.VerifyFlag>) - Static method in class org.bitcoinj.core.Block
+
+
Verifies both the header and that the transactions hash to the merkle root.
+
+
verify(NetworkParameters, Transaction) - Static method in class org.bitcoinj.core.Transaction
+
+ +
+
verify(TransactionOutput) - Method in class org.bitcoinj.core.TransactionInput
+
+
Verifies that this input can spend the given output.
+
+
verifyHeader(Block) - Static method in class org.bitcoinj.core.Block
+
+
Checks the block data to ensure it follows the rules laid out in the network parameters.
+
+
verifyMessage(String, String) - Method in class org.bitcoinj.crypto.ECKey
+
+
Deprecated. +
Use MessageVerifyUtils.verifyMessage(Address, String, String) instead, + which works with different address types, which works also with legacy segwit (P2SH-P2WPKH, 3…) + and native segwit addresses (P2WPKH, bc1…).
+
+
+
verifyMessage(Address, String, String) - Static method in class org.bitcoinj.crypto.utils.MessageVerifyUtils
+
+
Verifies messages signed with private keys of Bitcoin addresses.
+
+
verifyOrThrow(byte[], byte[]) - Method in class org.bitcoinj.crypto.ECKey
+
+
Verifies the given ASN.1 encoded ECDSA signature against a hash using the public key, and throws an exception + if the signature doesn't match
+
+
verifyOrThrow(Sha256Hash, ECKey.ECDSASignature) - Method in class org.bitcoinj.crypto.ECKey
+
+
Verifies the given R/S pair (signature) against a hash using the public key, and throws an exception + if the signature doesn't match
+
+
verifyPaymentRequestPki(Protos.PaymentRequest, KeyStore) - Static method in class org.bitcoinj.protocols.payments.PaymentProtocol
+
+
Uses the provided PKI method to find the corresponding public key and verify the provided signature.
+
+
verifyPki() - Method in class org.bitcoinj.protocols.payments.PaymentSession
+
+
Returns the value of pkiVerificationData or null if it wasn't verified at construction time.
+
+
verifyTransactions(NetworkParameters, Block, int, EnumSet<Block.VerifyFlag>) - Static method in class org.bitcoinj.core.Block
+
+
Checks the block contents
+
+
version - Variable in class org.bitcoinj.core.GetBlocksMessage
+
 
+
version - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
VERSION - Enum constant in enum class org.bitcoinj.wallet.DefaultRiskAnalysis.RuleViolation
+
 
+
VersionAck - Class in org.bitcoinj.core
+
+
The verack message, sent by a client accepting the version message they + received from their peer.
+
+
VersionAck() - Constructor for class org.bitcoinj.core.VersionAck
+
 
+
VersionMessage - Class in org.bitcoinj.core
+
+
A VersionMessage holds information exchanged during connection setup with another peer.
+
+
VersionMessage(NetworkParameters, int) - Constructor for class org.bitcoinj.core.VersionMessage
+
+
Construct own version message from given NetworkParameters and our best height of the chain.
+
+
VersionTally - Class in org.bitcoinj.utils
+
+
Caching counter for the block versions within a moving window.
+
+
VersionTally(NetworkParameters) - Constructor for class org.bitcoinj.utils.VersionTally
+
 
+
vFileManager - Variable in class org.bitcoinj.wallet.Wallet
+
 
+
vPeerGroup - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
vStore - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
vTransactionBroadcaster - Variable in class org.bitcoinj.wallet.Wallet
+
 
+
vWallet - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
vWalletFile - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
+

W

+
+
waitForConfirmation(Transaction) - Method in class org.bitcoinj.wallet.Wallet
+
+
Wait for at least 1 confirmation on a transaction.
+
+
waitForConfirmations(Transaction, int) - Method in class org.bitcoinj.wallet.Wallet
+
+
Wait for a required number of confirmations on a transaction.
+
+
waitForPeers(int) - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns a future that is triggered when the number of connected peers is equal to the given number of + peers.
+
+
waitForPeersOfVersion(int, long) - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns a future that is triggered when there are at least the requested number of connected peers that support + the given protocol version or higher.
+
+
waitForPeersWithServiceMask(int, int) - Method in class org.bitcoinj.core.PeerGroup
+
+
Returns a future that is triggered when there are at least the requested number of connected peers that support + the given protocol version or higher.
+
+
waitForUserCode() - Static method in class org.bitcoinj.utils.Threading
+
+
Put a dummy task into the queue and wait for it to be run.
+
+
wallet - Variable in class org.bitcoinj.wallet.DefaultRiskAnalysis
+
 
+
wallet() - Method in class org.bitcoinj.kits.WalletAppKit
+
 
+
Wallet - Class in org.bitcoinj.wallet
+
+
A Wallet stores keys and a record of transactions that send and receive value from those keys.
+
+
Wallet(Network, KeyChainGroup) - Constructor for class org.bitcoinj.wallet.Wallet
+
+
Creates a new, empty wallet with no transactions.
+
+
Wallet(NetworkParameters, KeyChainGroup) - Constructor for class org.bitcoinj.wallet.Wallet
+
+ +
+
Wallet.BadWalletEncryptionKeyException - Exception in org.bitcoinj.wallet
+
+
Thrown if the private keys and seed of this wallet cannot be decrypted due to the supplied encryption + key or password being wrong.
+
+
Wallet.BalanceType - Enum Class in org.bitcoinj.wallet
+
+
It's possible to calculate a wallets balance from multiple points of view.
+
+
Wallet.CompletionException - Exception in org.bitcoinj.wallet
+
+
Class of exceptions thrown in Wallet.completeTx(SendRequest).
+
+
Wallet.CouldNotAdjustDownwards - Exception in org.bitcoinj.wallet
+
+
Thrown when we were trying to empty the wallet, and the total amount of money we were trying to empty after + being reduced for the fee was smaller than the min payment.
+
+
Wallet.DustySendRequested - Exception in org.bitcoinj.wallet
+
+
Thrown if the resultant transaction would violate the dust rules (an output that's too small to be worthwhile).
+
+
Wallet.ExceededMaxTransactionSize - Exception in org.bitcoinj.wallet
+
+
Thrown if the resultant transaction is too big for Bitcoin to process.
+
+
Wallet.MissingSigsMode - Enum Class in org.bitcoinj.wallet
+
+
Enumerates possible resolutions for missing signatures.
+
+
Wallet.MultipleOpReturnRequested - Exception in org.bitcoinj.wallet
+
+
Thrown if there is more than one OP_RETURN output for the resultant transaction.
+
+
Wallet.SendResult - Class in org.bitcoinj.wallet
+
+
A SendResult is returned to you as part of sending coins to a recipient.
+
+
WalletAppKit - Class in org.bitcoinj.kits
+
+
Utility class that wraps the boilerplate needed to set up a new SPV bitcoinj app.
+
+
WalletAppKit(BitcoinNetwork, ScriptType, KeyChainGroupStructure, File, String) - Constructor for class org.bitcoinj.kits.WalletAppKit
+
+
Creates a new WalletAppKit, on the specified BitcoinNetwork.
+
+
WalletAppKit(NetworkParameters, File, String) - Constructor for class org.bitcoinj.kits.WalletAppKit
+
+ +
+
WalletAppKit(NetworkParameters, ScriptType, KeyChainGroupStructure, File, String) - Constructor for class org.bitcoinj.kits.WalletAppKit
+
+ +
+
WalletChangeEventListener - Interface in org.bitcoinj.wallet.listeners
+
+
Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money + or a block chain re-organize.
+
+
WalletCoinsReceivedEventListener - Interface in org.bitcoinj.wallet.listeners
+
+
Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money + or a block chain re-organize.
+
+
WalletCoinsSentEventListener - Interface in org.bitcoinj.wallet.listeners
+
+
Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money + or a block chain re-organize.
+
+
WalletExtension - Interface in org.bitcoinj.wallet
+
+
An object implementing this interface can be added to a Wallet and provide arbitrary byte arrays that will + be serialized alongside the wallet.
+
+
walletFactory - Variable in class org.bitcoinj.kits.WalletAppKit
+
 
+
WalletFiles - Class in org.bitcoinj.wallet
+
+
A class that handles atomic and optionally delayed writing of the wallet file to disk.
+
+
WalletFiles(Wallet, File, long, TimeUnit) - Constructor for class org.bitcoinj.wallet.WalletFiles
+
+ +
+
WalletFiles(Wallet, File, Duration) - Constructor for class org.bitcoinj.wallet.WalletFiles
+
+
Initialize atomic and optionally delayed writing of the wallet file to disk.
+
+
WalletFiles.Listener - Interface in org.bitcoinj.wallet
+
+
Implementors can do pre/post treatment of the wallet file.
+
+
WalletProtobufSerializer - Class in org.bitcoinj.wallet
+
+
Serialize and de-serialize a wallet to a byte stream containing a + protocol buffer.
+
+
WalletProtobufSerializer() - Constructor for class org.bitcoinj.wallet.WalletProtobufSerializer
+
 
+
WalletProtobufSerializer(WalletProtobufSerializer.WalletFactory) - Constructor for class org.bitcoinj.wallet.WalletProtobufSerializer
+
 
+
WalletProtobufSerializer.WalletFactory - Interface in org.bitcoinj.wallet
+
 
+
WalletReorganizeEventListener - Interface in org.bitcoinj.wallet.listeners
+
+
Implementors are called when the wallet is reorganized.
+
+
walletToProto(Wallet) - Method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
+
Converts the given wallet to the object representation of the protocol buffers.
+
+
walletToText(Wallet) - Method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
+
Returns the given wallet formatted as text.
+
+
WalletTransaction - Class in org.bitcoinj.wallet
+
+
Stores data about a transaction that is only relevant to the Wallet class.
+
+
WalletTransaction(WalletTransaction.Pool, Transaction) - Constructor for class org.bitcoinj.wallet.WalletTransaction
+
 
+
WalletTransaction.Pool - Enum Class in org.bitcoinj.wallet
+
 
+
WARNING_THRESHOLD - Static variable in class org.bitcoinj.utils.Threading.UserThread
+
 
+
warnOnLockCycles() - Static method in class org.bitcoinj.utils.Threading
+
 
+
wasBroadcastBy(PeerAddress) - Method in class org.bitcoinj.core.TransactionConfidence
+
+
Returns true if the given address has been seen via markBroadcastBy()
+
+
wasUndoable - Variable in class org.bitcoinj.store.MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag
+
 
+
watch(DeterministicKey) - Method in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
+
Creates a key chain that watches the given account key.
+
+
WATCHING - Enum constant in enum class org.bitcoinj.wallet.BasicKeyChain.State
+
 
+
watchingKey - Variable in class org.bitcoinj.wallet.DeterministicKeyChain.Builder
+
 
+
WHITESPACE_SPLITTER - Static variable in class org.bitcoinj.base.internal.InternalUtils
+
+
A InternalUtils.Splitter for splitting a string into components by whitespace.
+
+
WHITESPACE_SPLITTER - Static variable in class org.bitcoinj.core.Utils
+
+
Deprecated. +
Use String.split(String) or a direct Guava dependency
+
+
+
WINDOWS - Enum constant in enum class org.bitcoinj.base.internal.PlatformUtils.OS
+
 
+
with(Transaction...) - Static method in class org.bitcoinj.core.InventoryMessage
+
+ +
+
WITH_INVERSION - Enum constant in enum class org.bitcoinj.crypto.HDKeyDerivation.PublicDeriveMode
+
 
+
withLocale(Locale) - Method in class org.bitcoinj.base.utils.MonetaryFormat
+
+
Configure this instance with values from a Locale.
+
+
withProtocolVersion(int) - Method in class org.bitcoinj.core.BitcoinSerializer
+
 
+
withProtocolVersion(int) - Method in class org.bitcoinj.core.MessageSerializer
+
+
Create a new serializer with a specific protocol version.
+
+
WITNESS_BLOCK - Enum constant in enum class org.bitcoinj.core.InventoryItem.Type
+
 
+
WITNESS_FILTERED_BLOCK - Enum constant in enum class org.bitcoinj.core.InventoryItem.Type
+
 
+
WITNESS_PROGRAM_LENGTH_PKH - Static variable in class org.bitcoinj.base.SegwitAddress
+
 
+
WITNESS_PROGRAM_LENGTH_SH - Static variable in class org.bitcoinj.base.SegwitAddress
+
 
+
WITNESS_PROGRAM_LENGTH_TR - Static variable in class org.bitcoinj.base.SegwitAddress
+
 
+
WITNESS_PROGRAM_MAX_LENGTH - Static variable in class org.bitcoinj.base.SegwitAddress
+
 
+
WITNESS_PROGRAM_MIN_LENGTH - Static variable in class org.bitcoinj.base.SegwitAddress
+
 
+
WITNESS_TRANSACTION - Enum constant in enum class org.bitcoinj.core.InventoryItem.Type
+
 
+
WITNESS_VERSION - Enum constant in enum class org.bitcoinj.core.ProtocolVersion
+
 
+
witnessProgram - Variable in class org.bitcoinj.base.SegwitAddress
+
 
+
witnessVersion - Variable in class org.bitcoinj.base.SegwitAddress
+
 
+
wrap(byte[]) - Static method in class org.bitcoinj.base.Sha256Hash
+
+
Creates a new instance that wraps the given hash value.
+
+
wrap(String) - Static method in class org.bitcoinj.base.Sha256Hash
+
+
Creates a new instance that wraps the given hash value (represented as a hex string).
+
+
wrapReversed(byte[]) - Static method in class org.bitcoinj.base.Sha256Hash
+
+
Creates a new instance that wraps the given hash value, but with byte order reversed.
+
+
write(OutputStream) - Method in class org.bitcoinj.script.ScriptChunk
+
+
Deprecated. + +
+
+
write(ByteBuffer) - Method in class org.bitcoinj.base.Coin
+
+
Write the amount into the given buffer as 8 bytes in little-endian order.
+
+
write(ByteBuffer) - Method in class org.bitcoinj.base.Sha256Hash
+
+
Write hash into the given buffer.
+
+
write(ByteBuffer) - Method in class org.bitcoinj.base.VarInt
+
+
Write encoded value into the given buffer.
+
+
write(ByteBuffer) - Method in class org.bitcoinj.core.PartialMerkleTree
+
+
Write this partial merkle tree into the given buffer.
+
+
write(ByteBuffer) - Method in class org.bitcoinj.core.Services
+
+
Write the node service bits into the given buffer.
+
+
write(ByteBuffer) - Method in class org.bitcoinj.core.TransactionInput
+
+
Write this transaction input into the given buffer.
+
+
write(ByteBuffer) - Method in class org.bitcoinj.core.TransactionOutPoint
+
+
Write this transaction outpoint into the given buffer.
+
+
write(ByteBuffer) - Method in class org.bitcoinj.core.TransactionOutput
+
+
Write this transaction output into the given buffer.
+
+
write(ByteBuffer) - Method in class org.bitcoinj.core.TransactionWitness
+
+
Write this transaction witness into the given buffer.
+
+
write(ByteBuffer, int) - Method in class org.bitcoinj.core.PeerAddress
+
+
Write this peer address into the given buffer, using a given protocol variant.
+
+
writeBytes(byte[]) - Method in class org.bitcoinj.net.BlockingClient
+
 
+
writeBytes(byte[]) - Method in interface org.bitcoinj.net.MessageWriteTarget
+
+
Writes the given bytes to the remote server.
+
+
writeBytes(byte[]) - Method in class org.bitcoinj.net.NioClient
+
 
+
writeBytes(OutputStream, byte[]) - Static method in class org.bitcoinj.script.Script
+
+
Writes out the given byte buffer to the output stream with the correct opcode prefix + To write an integer call writeBytes(out, Utils.reverseBytes(Utils.encodeMPI(val, false)));
+
+
writeInt16BE(int, OutputStream) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 16-bit integer to a given output stream in big-endian format.
+
+
writeInt16BE(int, ByteBuffer) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 16-bit integer to a given buffer in big-endian format.
+
+
writeInt16LE(int, OutputStream) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 16-bit integer to a given output stream in little-endian format.
+
+
writeInt16LE(int, ByteBuffer) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 16-bit integer to a given buffer in little-endian format.
+
+
writeInt32BE(int, byte[], int) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 32-bit integer to a given byte array in big-endian format, starting at a given offset.
+
+
writeInt32BE(int, OutputStream) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 32-bit integer to a given output stream in big-endian format.
+
+
writeInt32BE(int, ByteBuffer) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 32-bit integer to a given buffer in big-endian format.
+
+
writeInt32LE(int, OutputStream) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 32-bit integer to a given output stream in little-endian format.
+
+
writeInt32LE(int, ByteBuffer) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 32-bit integer to a given buffer in little-endian format.
+
+
writeInt32LE(long, byte[], int) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 32-bit integer to a given byte array in little-endian format, starting at a given offset.
+
+
writeInt32LE(long, OutputStream) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 32-bit integer to a given output stream in little-endian format.
+
+
writeInt32LE(long, ByteBuffer) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 32-bit integer to a given buffer in little-endian format.
+
+
writeInt64LE(long, byte[], int) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 64-bit integer to a given byte array in little-endian format, starting at a given offset.
+
+
writeInt64LE(long, OutputStream) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 64-bit integer to a given output stream in little-endian format.
+
+
writeInt64LE(long, ByteBuffer) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 64-bit integer to a given buffer in little-endian format.
+
+
writeInt64LE(BigInteger, OutputStream) - Static method in class org.bitcoinj.base.internal.ByteUtils
+
+
Write a 64-bit integer to a given output stream in little-endian format.
+
+
writeLengthPrefixedBytes(ByteBuffer, byte[]) - Static method in class org.bitcoinj.base.internal.Buffers
+
+
First write the length of the byte array as a VarInt.
+
+
writeLengthPrefixedString(ByteBuffer, String) - Static method in class org.bitcoinj.base.internal.Buffers
+
+
Encode a given string using UTF-8.
+
+
writeTarget - Variable in class org.bitcoinj.core.PeerSocketHandler
+
 
+
writeWallet(Wallet, OutputStream) - Method in class org.bitcoinj.wallet.WalletProtobufSerializer
+
+
Formats the given wallet (transactions and keys) to the given output stream in protocol buffer format.
+
+
WrongNetwork() - Constructor for exception org.bitcoinj.wallet.UnreadableWalletException.WrongNetwork
+
 
+
WrongNetwork(int) - Constructor for exception org.bitcoinj.base.exceptions.AddressFormatException.WrongNetwork
+
 
+
WrongNetwork(String) - Constructor for exception org.bitcoinj.base.exceptions.AddressFormatException.WrongNetwork
+
 
+
+

X

+
+
X0 - Enum constant in enum class org.bitcoinj.base.LegacyAddress.AddressHeader
+
 
+
X111 - Enum constant in enum class org.bitcoinj.base.LegacyAddress.AddressHeader
+
 
+
X196 - Enum constant in enum class org.bitcoinj.base.LegacyAddress.P2SHHeader
+
 
+
X5 - Enum constant in enum class org.bitcoinj.base.LegacyAddress.P2SHHeader
+
 
+
X509Utils - Class in org.bitcoinj.crypto
+
+
X509Utils provides tools for working with X.509 certificates and keystores, as used in the BIP 70 payment protocol.
+
+
X509Utils() - Constructor for class org.bitcoinj.crypto.X509Utils
+
 
+
X6F - Enum constant in enum class org.bitcoinj.base.LegacyAddress.AddressHeader
+
 
+
+

Z

+
+
ZERO - Static variable in class org.bitcoinj.base.Coin
+
+
Zero Bitcoins.
+
+
ZERO - Static variable in class org.bitcoinj.crypto.ChildNumber
+
 
+
ZERO_HARDENED - Static variable in class org.bitcoinj.crypto.ChildNumber
+
 
+
ZERO_HASH - Static variable in class org.bitcoinj.base.Sha256Hash
+
 
+
+A B C D E F G H I J K L M N O P Q R S T U V W X Z 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
+
+
+ + diff --git a/javadoc/0.17-rc1/index.html b/javadoc/0.17-rc1/index.html new file mode 100644 index 000000000..a00ba4703 --- /dev/null +++ b/javadoc/0.17-rc1/index.html @@ -0,0 +1,151 @@ + + + + +Overview (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

bitcoinj-core 0.17-rc1 API

+
+
+
Packages
+
+
Package
+
Description
+ +
+
The base package provides foundational types for bitcoinj.
+
+ +
 
+ +
 
+ +
 
+ +
+
The core package contains classes for network messages like Block and + Transaction, peer connectivity via PeerGroup, + and block chain management.
+
+ +
 
+ +
 
+ +
+
The crypto package contains classes that work with key derivation algorithms like scrypt (passwords to AES keys), + BIP 32 hierarchies (chains of keys from a root seed), X.509 utilities for the payment protocol and other general + cryptography tasks.
+
+ +
 
+ +
 
+ +
 
+ +
+
High level wrapper APIs around the bitcoinj building blocks.
+
+ +
+
Classes handling low level network management using either NIO (async io) or older style blocking sockets (useful for + using SOCKS proxies, Tor, SSL etc).
+
+ +
+
Classes that know how to discover peers in the P2P network using DNS or HTTP.
+
+ +
+
Network parameters encapsulate some of the differences between different Bitcoin networks such as the main + network, the testnet, regtest mode, unit testing params and so on.
+
+ +
+
The BIP70 payment protocol wraps Bitcoin transactions and adds various useful features like memos, refund addresses + and authentication.
+
+ +
+
Classes for working with and executing Bitcoin script programs, as embedded in inputs and outputs.
+
+ +
+
Transaction signers know how to calculate signatures over transactions in different contexts, for example, using + local private keys or fetching them from remote servers.
+
+ +
+
Block stores persist blockchain data downloaded from remote peers.
+
+ +
 
+ +
+
Parsing and handling of bitcoin: textual URIs as found in qr codes and web links.
+
+ +
+
Formatting monetary amounts, representing exchange rates, a program for loading Bitcoin Core saved block files, + a class to control how bitcoinj uses threads and misc other utility classes that don't fit anywhere else.
+
+ +
+
Classes that support the Wallet, which knows how to find and save transactions relevant to + a set of keys or scripts, calculate balances, and spend money: the wallet has many features and can be extended + in various ways, please refer to the website for documentation on how to use it.
+
+ +
 
+
+
+
+
+
+ + diff --git a/javadoc/0.17-rc1/jquery-ui.overrides.css b/javadoc/0.17-rc1/jquery-ui.overrides.css new file mode 100644 index 000000000..facf852c2 --- /dev/null +++ b/javadoc/0.17-rc1/jquery-ui.overrides.css @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + /* Overrides the color of selection used in jQuery UI */ + background: #F8981D; + border: 1px solid #F8981D; +} diff --git a/javadoc/0.17-rc1/legal/ASSEMBLY_EXCEPTION b/javadoc/0.17-rc1/legal/ASSEMBLY_EXCEPTION new file mode 100644 index 000000000..065b8d902 --- /dev/null +++ b/javadoc/0.17-rc1/legal/ASSEMBLY_EXCEPTION @@ -0,0 +1,27 @@ + +OPENJDK ASSEMBLY EXCEPTION + +The OpenJDK source code made available by Oracle America, Inc. (Oracle) at +openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU +General Public License version 2 +only ("GPL2"), with the following clarification and special exception. + + Linking this OpenJDK Code statically or dynamically with other code + is making a combined work based on this library. Thus, the terms + and conditions of GPL2 cover the whole combination. + + As a special exception, Oracle gives you permission to link this + OpenJDK Code with certain code licensed by Oracle as indicated at + http://openjdk.java.net/legal/exception-modules-2007-05-08.html + ("Designated Exception Modules") to produce an executable, + regardless of the license terms of the Designated Exception Modules, + and to copy and distribute the resulting executable under GPL2, + provided that the Designated Exception Modules continue to be + governed by the licenses under which they were offered by Oracle. + +As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code +to build an executable that includes those portions of necessary code that +Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 +with the Classpath exception). If you modify or add to the OpenJDK code, +that new GPL2 code may still be combined with Designated Exception Modules +if the new code is made subject to this exception by its copyright holder. diff --git a/javadoc/0.17-rc1/legal/jquery.md b/javadoc/0.17-rc1/legal/jquery.md new file mode 100644 index 000000000..a763ec6f1 --- /dev/null +++ b/javadoc/0.17-rc1/legal/jquery.md @@ -0,0 +1,26 @@ +## jQuery v3.7.1 + +### jQuery License +``` +jQuery v 3.7.1 +Copyright OpenJS Foundation and other contributors, https://openjsf.org/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +``` diff --git a/javadoc/0.17-rc1/legal/jqueryUI.md b/javadoc/0.17-rc1/legal/jqueryUI.md new file mode 100644 index 000000000..8bda9d7a8 --- /dev/null +++ b/javadoc/0.17-rc1/legal/jqueryUI.md @@ -0,0 +1,49 @@ +## jQuery UI v1.13.2 + +### jQuery UI License +``` +Copyright jQuery Foundation and other contributors, https://jquery.org/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/jquery-ui + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code contained within the demos directory. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +``` diff --git a/javadoc/0.17-rc1/member-search-index.js b/javadoc/0.17-rc1/member-search-index.js new file mode 100644 index 000000000..83aad1bc2 --- /dev/null +++ b/javadoc/0.17-rc1/member-search-index.js @@ -0,0 +1 @@ +memberSearchIndex = [{"p":"org.bitcoinj.core","c":"TransactionInput.ConnectMode","l":"ABORT_ON_CONFLICT"},{"p":"org.bitcoinj.store","c":"FullPrunedBlockStore","l":"abortDatabaseBatchWrite()"},{"p":"org.bitcoinj.store","c":"MemoryFullPrunedBlockStore","l":"abortDatabaseBatchWrite()"},{"p":"org.bitcoinj.core","c":"AbstractBlockChain","l":"AbstractBlockChain(Network, List, BlockStore)","u":"%3Cinit%3E(org.bitcoinj.base.Network,java.util.List,org.bitcoinj.store.BlockStore)"},{"p":"org.bitcoinj.core","c":"AbstractBlockChain","l":"AbstractBlockChain(NetworkParameters, List, BlockStore)","u":"%3Cinit%3E(org.bitcoinj.core.NetworkParameters,java.util.List,org.bitcoinj.store.BlockStore)"},{"p":"org.bitcoinj.wallet.listeners","c":"AbstractKeyChainEventListener","l":"AbstractKeyChainEventListener()","u":"%3Cinit%3E()"},{"p":"org.bitcoinj.net","c":"AbstractTimeoutHandler","l":"AbstractTimeoutHandler()","u":"%3Cinit%3E()"},{"p":"org.bitcoinj.wallet","c":"DeterministicKeyChain","l":"ACCOUNT_ONE_PATH"},{"p":"org.bitcoinj.wallet","c":"DeterministicKeyChain","l":"ACCOUNT_ZERO_PATH"},{"p":"org.bitcoinj.wallet","c":"KeyChainGroupStructure","l":"account(int)"},{"p":"org.bitcoinj.wallet","c":"DeterministicKeyChain.Builder","l":"accountPath"},{"p":"org.bitcoinj.wallet","c":"DeterministicKeyChain.Builder","l":"accountPath(List)","u":"accountPath(java.util.List)"},{"p":"org.bitcoinj.wallet","c":"KeyChainGroupStructure","l":"accountPathFor(ScriptType)","u":"accountPathFor(org.bitcoinj.base.ScriptType)"},{"p":"org.bitcoinj.wallet","c":"KeyChainGroupStructure","l":"accountPathFor(ScriptType, Network)","u":"accountPathFor(org.bitcoinj.base.ScriptType,org.bitcoinj.base.Network)"},{"p":"org.bitcoinj.wallet","c":"KeyChainGroupStructure","l":"accountPathFor(ScriptType, NetworkParameters)","u":"accountPathFor(org.bitcoinj.base.ScriptType,org.bitcoinj.core.NetworkParameters)"},{"p":"org.bitcoinj.core","c":"AbstractBlockChain","l":"add(Block)","u":"add(org.bitcoinj.core.Block)"},{"p":"org.bitcoinj.base","c":"Coin","l":"add(Coin)","u":"add(org.bitcoinj.base.Coin)"},{"p":"org.bitcoinj.crypto","c":"LazyECPoint","l":"add(ECPoint)","u":"add(org.bouncycastle.math.ec.ECPoint)"},{"p":"org.bitcoinj.base.utils","c":"Fiat","l":"add(Fiat)","u":"add(org.bitcoinj.base.utils.Fiat)"},{"p":"org.bitcoinj.core","c":"AbstractBlockChain","l":"add(FilteredBlock)","u":"add(org.bitcoinj.core.FilteredBlock)"},{"p":"org.bitcoinj.core","c":"BlockChain","l":"add(FilteredBlock)","u":"add(org.bitcoinj.core.FilteredBlock)"},{"p":"org.bitcoinj.utils","c":"VersionTally","l":"add(long)"},{"p":"org.bitcoinj.core","c":"BlockLocator","l":"add(Sha256Hash)","u":"add(org.bitcoinj.base.Sha256Hash)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addAddress(InetAddress)","u":"addAddress(java.net.InetAddress)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addAddress(InetAddress, int)","u":"addAddress(java.net.InetAddress,int)"},{"p":"org.bitcoinj.core","c":"AddressMessage","l":"addAddress(PeerAddress)","u":"addAddress(org.bitcoinj.core.PeerAddress)"},{"p":"org.bitcoinj.core","c":"AddressV1Message","l":"addAddress(PeerAddress)","u":"addAddress(org.bitcoinj.core.PeerAddress)"},{"p":"org.bitcoinj.core","c":"AddressV2Message","l":"addAddress(PeerAddress)","u":"addAddress(org.bitcoinj.core.PeerAddress)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addAddress(PeerAddress)","u":"addAddress(org.bitcoinj.core.PeerAddress)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addAddress(PeerAddress, int)","u":"addAddress(org.bitcoinj.core.PeerAddress,int)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addAddressEventListener(AddressEventListener)","u":"addAddressEventListener(org.bitcoinj.core.listeners.AddressEventListener)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addAddressEventListener(Executor, AddressEventListener)","u":"addAddressEventListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.AddressEventListener)"},{"p":"org.bitcoinj.wallet","c":"KeyChainGroup","l":"addAndActivateHDChain(DeterministicKeyChain)","u":"addAndActivateHDChain(org.bitcoinj.wallet.DeterministicKeyChain)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addAndActivateHDChain(DeterministicKeyChain)","u":"addAndActivateHDChain(org.bitcoinj.wallet.DeterministicKeyChain)"},{"p":"org.bitcoinj.core","c":"InventoryMessage","l":"addBlock(Block)","u":"addBlock(org.bitcoinj.core.Block)"},{"p":"org.bitcoinj.core","c":"GetDataMessage","l":"addBlock(Sha256Hash, boolean)","u":"addBlock(org.bitcoinj.base.Sha256Hash,boolean)"},{"p":"org.bitcoinj.core","c":"Transaction","l":"addBlockAppearance(Sha256Hash, int)","u":"addBlockAppearance(org.bitcoinj.base.Sha256Hash,int)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addBlocksDownloadedEventListener(BlocksDownloadedEventListener)","u":"addBlocksDownloadedEventListener(org.bitcoinj.core.listeners.BlocksDownloadedEventListener)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addBlocksDownloadedEventListener(BlocksDownloadedEventListener)","u":"addBlocksDownloadedEventListener(org.bitcoinj.core.listeners.BlocksDownloadedEventListener)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addBlocksDownloadedEventListener(Executor, BlocksDownloadedEventListener)","u":"addBlocksDownloadedEventListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.BlocksDownloadedEventListener)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addBlocksDownloadedEventListener(Executor, BlocksDownloadedEventListener)","u":"addBlocksDownloadedEventListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.BlocksDownloadedEventListener)"},{"p":"org.bitcoinj.wallet","c":"KeyChainGroup.Builder","l":"addChain(DeterministicKeyChain)","u":"addChain(org.bitcoinj.wallet.DeterministicKeyChain)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addChainDownloadStartedEventListener(ChainDownloadStartedEventListener)","u":"addChainDownloadStartedEventListener(org.bitcoinj.core.listeners.ChainDownloadStartedEventListener)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addChainDownloadStartedEventListener(ChainDownloadStartedEventListener)","u":"addChainDownloadStartedEventListener(org.bitcoinj.core.listeners.ChainDownloadStartedEventListener)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addChainDownloadStartedEventListener(Executor, ChainDownloadStartedEventListener)","u":"addChainDownloadStartedEventListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.ChainDownloadStartedEventListener)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addChainDownloadStartedEventListener(Executor, ChainDownloadStartedEventListener)","u":"addChainDownloadStartedEventListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.ChainDownloadStartedEventListener)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addChangeEventListener(Executor, WalletChangeEventListener)","u":"addChangeEventListener(java.util.concurrent.Executor,org.bitcoinj.wallet.listeners.WalletChangeEventListener)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addChangeEventListener(WalletChangeEventListener)","u":"addChangeEventListener(org.bitcoinj.wallet.listeners.WalletChangeEventListener)"},{"p":"org.bitcoinj.script","c":"ScriptBuilder","l":"addChunk(int, ScriptChunk)","u":"addChunk(int,org.bitcoinj.script.ScriptChunk)"},{"p":"org.bitcoinj.script","c":"ScriptBuilder","l":"addChunk(ScriptChunk)","u":"addChunk(org.bitcoinj.script.ScriptChunk)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addCoinsReceivedEventListener(Executor, WalletCoinsReceivedEventListener)","u":"addCoinsReceivedEventListener(java.util.concurrent.Executor,org.bitcoinj.wallet.listeners.WalletCoinsReceivedEventListener)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addCoinsReceivedEventListener(WalletCoinsReceivedEventListener)","u":"addCoinsReceivedEventListener(org.bitcoinj.wallet.listeners.WalletCoinsReceivedEventListener)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addCoinsSentEventListener(Executor, WalletCoinsSentEventListener)","u":"addCoinsSentEventListener(java.util.concurrent.Executor,org.bitcoinj.wallet.listeners.WalletCoinsSentEventListener)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addCoinsSentEventListener(WalletCoinsSentEventListener)","u":"addCoinsSentEventListener(org.bitcoinj.wallet.listeners.WalletCoinsSentEventListener)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addConnectedEventListener(Executor, PeerConnectedEventListener)","u":"addConnectedEventListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.PeerConnectedEventListener)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addConnectedEventListener(Executor, PeerConnectedEventListener)","u":"addConnectedEventListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.PeerConnectedEventListener)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addConnectedEventListener(PeerConnectedEventListener)","u":"addConnectedEventListener(org.bitcoinj.core.listeners.PeerConnectedEventListener)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addConnectedEventListener(PeerConnectedEventListener)","u":"addConnectedEventListener(org.bitcoinj.core.listeners.PeerConnectedEventListener)"},{"p":"org.bitcoinj.wallet","c":"KeyChainGroup","l":"addCurrentKeyChangeEventListener(CurrentKeyChangeEventListener)","u":"addCurrentKeyChangeEventListener(org.bitcoinj.wallet.listeners.CurrentKeyChangeEventListener)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addCurrentKeyChangeEventListener(CurrentKeyChangeEventListener)","u":"addCurrentKeyChangeEventListener(org.bitcoinj.wallet.listeners.CurrentKeyChangeEventListener)"},{"p":"org.bitcoinj.wallet","c":"KeyChainGroup","l":"addCurrentKeyChangeEventListener(CurrentKeyChangeEventListener, Executor)","u":"addCurrentKeyChangeEventListener(org.bitcoinj.wallet.listeners.CurrentKeyChangeEventListener,java.util.concurrent.Executor)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addCurrentKeyChangeEventListener(Executor, CurrentKeyChangeEventListener)","u":"addCurrentKeyChangeEventListener(java.util.concurrent.Executor,org.bitcoinj.wallet.listeners.CurrentKeyChangeEventListener)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addDisconnectedEventListener(Executor, PeerDisconnectedEventListener)","u":"addDisconnectedEventListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.PeerDisconnectedEventListener)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addDisconnectedEventListener(Executor, PeerDisconnectedEventListener)","u":"addDisconnectedEventListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.PeerDisconnectedEventListener)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addDisconnectedEventListener(PeerDisconnectedEventListener)","u":"addDisconnectedEventListener(org.bitcoinj.core.listeners.PeerDisconnectedEventListener)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addDisconnectedEventListener(PeerDisconnectedEventListener)","u":"addDisconnectedEventListener(org.bitcoinj.core.listeners.PeerDisconnectedEventListener)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addDiscoveredEventListener(Executor, PeerDiscoveredEventListener)","u":"addDiscoveredEventListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.PeerDiscoveredEventListener)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addDiscoveredEventListener(PeerDiscoveredEventListener)","u":"addDiscoveredEventListener(org.bitcoinj.core.listeners.PeerDiscoveredEventListener)"},{"p":"org.bitcoinj.core","c":"TransactionConfidence","l":"addEventListener(Executor, TransactionConfidence.Listener)","u":"addEventListener(java.util.concurrent.Executor,org.bitcoinj.core.TransactionConfidence.Listener)"},{"p":"org.bitcoinj.wallet","c":"BasicKeyChain","l":"addEventListener(KeyChainEventListener)","u":"addEventListener(org.bitcoinj.wallet.listeners.KeyChainEventListener)"},{"p":"org.bitcoinj.wallet","c":"DeterministicKeyChain","l":"addEventListener(KeyChainEventListener)","u":"addEventListener(org.bitcoinj.wallet.listeners.KeyChainEventListener)"},{"p":"org.bitcoinj.wallet","c":"KeyChain","l":"addEventListener(KeyChainEventListener)","u":"addEventListener(org.bitcoinj.wallet.listeners.KeyChainEventListener)"},{"p":"org.bitcoinj.wallet","c":"KeyChainGroup","l":"addEventListener(KeyChainEventListener)","u":"addEventListener(org.bitcoinj.wallet.listeners.KeyChainEventListener)"},{"p":"org.bitcoinj.wallet","c":"BasicKeyChain","l":"addEventListener(KeyChainEventListener, Executor)","u":"addEventListener(org.bitcoinj.wallet.listeners.KeyChainEventListener,java.util.concurrent.Executor)"},{"p":"org.bitcoinj.wallet","c":"DeterministicKeyChain","l":"addEventListener(KeyChainEventListener, Executor)","u":"addEventListener(org.bitcoinj.wallet.listeners.KeyChainEventListener,java.util.concurrent.Executor)"},{"p":"org.bitcoinj.wallet","c":"KeyChain","l":"addEventListener(KeyChainEventListener, Executor)","u":"addEventListener(org.bitcoinj.wallet.listeners.KeyChainEventListener,java.util.concurrent.Executor)"},{"p":"org.bitcoinj.wallet","c":"KeyChainGroup","l":"addEventListener(KeyChainEventListener, Executor)","u":"addEventListener(org.bitcoinj.wallet.listeners.KeyChainEventListener,java.util.concurrent.Executor)"},{"p":"org.bitcoinj.core","c":"TransactionConfidence","l":"addEventListener(TransactionConfidence.Listener)","u":"addEventListener(org.bitcoinj.core.TransactionConfidence.Listener)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addExtension(WalletExtension)","u":"addExtension(org.bitcoinj.wallet.WalletExtension)"},{"p":"org.bitcoinj.core","c":"GetDataMessage","l":"addFilteredBlock(Sha256Hash)","u":"addFilteredBlock(org.bitcoinj.base.Sha256Hash)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addGetDataEventListener(Executor, GetDataEventListener)","u":"addGetDataEventListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.GetDataEventListener)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addGetDataEventListener(Executor, GetDataEventListener)","u":"addGetDataEventListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.GetDataEventListener)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addGetDataEventListener(GetDataEventListener)","u":"addGetDataEventListener(org.bitcoinj.core.listeners.GetDataEventListener)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addGetDataEventListener(GetDataEventListener)","u":"addGetDataEventListener(org.bitcoinj.core.listeners.GetDataEventListener)"},{"p":"org.bitcoinj.core","c":"Transaction","l":"addInput(Sha256Hash, long, Script)","u":"addInput(org.bitcoinj.base.Sha256Hash,long,org.bitcoinj.script.Script)"},{"p":"org.bitcoinj.core","c":"Transaction","l":"addInput(TransactionInput)","u":"addInput(org.bitcoinj.core.TransactionInput)"},{"p":"org.bitcoinj.core","c":"Transaction","l":"addInput(TransactionOutput)","u":"addInput(org.bitcoinj.core.TransactionOutput)"},{"p":"org.bitcoinj.core","c":"ListMessage","l":"addItem(InventoryItem)","u":"addItem(org.bitcoinj.core.InventoryItem)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addKeyChainEventListener(Executor, KeyChainEventListener)","u":"addKeyChainEventListener(java.util.concurrent.Executor,org.bitcoinj.wallet.listeners.KeyChainEventListener)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addKeyChainEventListener(KeyChainEventListener)","u":"addKeyChainEventListener(org.bitcoinj.wallet.listeners.KeyChainEventListener)"},{"p":"org.bitcoinj.utils","c":"ListenableCompletionStage","l":"addListener(Runnable, Executor)","u":"addListener(java.lang.Runnable,java.util.concurrent.Executor)"},{"p":"org.bitcoinj.core","c":"AbstractBlockChain","l":"addNewBestBlockListener(Executor, NewBestBlockListener)","u":"addNewBestBlockListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.NewBestBlockListener)"},{"p":"org.bitcoinj.core","c":"AbstractBlockChain","l":"addNewBestBlockListener(NewBestBlockListener)","u":"addNewBestBlockListener(org.bitcoinj.core.listeners.NewBestBlockListener)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addOnTransactionBroadcastListener(Executor, OnTransactionBroadcastListener)","u":"addOnTransactionBroadcastListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.OnTransactionBroadcastListener)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addOnTransactionBroadcastListener(Executor, OnTransactionBroadcastListener)","u":"addOnTransactionBroadcastListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.OnTransactionBroadcastListener)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addOnTransactionBroadcastListener(OnTransactionBroadcastListener)","u":"addOnTransactionBroadcastListener(org.bitcoinj.core.listeners.OnTransactionBroadcastListener)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addOnTransactionBroadcastListener(OnTransactionBroadcastListener)","u":"addOnTransactionBroadcastListener(org.bitcoinj.core.listeners.OnTransactionBroadcastListener)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addOrGetExistingExtension(WalletExtension)","u":"addOrGetExistingExtension(org.bitcoinj.wallet.WalletExtension)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addOrUpdateExtension(WalletExtension)","u":"addOrUpdateExtension(org.bitcoinj.wallet.WalletExtension)"},{"p":"org.bitcoinj.core","c":"Transaction","l":"addOutput(Coin, Address)","u":"addOutput(org.bitcoinj.base.Coin,org.bitcoinj.base.Address)"},{"p":"org.bitcoinj.core","c":"Transaction","l":"addOutput(Coin, ECKey)","u":"addOutput(org.bitcoinj.base.Coin,org.bitcoinj.crypto.ECKey)"},{"p":"org.bitcoinj.core","c":"Transaction","l":"addOutput(Coin, Script)","u":"addOutput(org.bitcoinj.base.Coin,org.bitcoinj.script.Script)"},{"p":"org.bitcoinj.core","c":"Transaction","l":"addOutput(TransactionOutput)","u":"addOutput(org.bitcoinj.core.TransactionOutput)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addPeerDiscovery(PeerDiscovery)","u":"addPeerDiscovery(org.bitcoinj.net.discovery.PeerDiscovery)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addPeerFilterProvider(PeerFilterProvider)","u":"addPeerFilterProvider(org.bitcoinj.core.PeerFilterProvider)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addPreMessageReceivedEventListener(Executor, PreMessageReceivedEventListener)","u":"addPreMessageReceivedEventListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.PreMessageReceivedEventListener)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addPreMessageReceivedEventListener(Executor, PreMessageReceivedEventListener)","u":"addPreMessageReceivedEventListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.PreMessageReceivedEventListener)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addPreMessageReceivedEventListener(PreMessageReceivedEventListener)","u":"addPreMessageReceivedEventListener(org.bitcoinj.core.listeners.PreMessageReceivedEventListener)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addPreMessageReceivedEventListener(PreMessageReceivedEventListener)","u":"addPreMessageReceivedEventListener(org.bitcoinj.core.listeners.PreMessageReceivedEventListener)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addReorganizeEventListener(Executor, WalletReorganizeEventListener)","u":"addReorganizeEventListener(java.util.concurrent.Executor,org.bitcoinj.wallet.listeners.WalletReorganizeEventListener)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addReorganizeEventListener(WalletReorganizeEventListener)","u":"addReorganizeEventListener(org.bitcoinj.wallet.listeners.WalletReorganizeEventListener)"},{"p":"org.bitcoinj.core","c":"AbstractBlockChain","l":"addReorganizeListener(Executor, ReorganizeListener)","u":"addReorganizeListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.ReorganizeListener)"},{"p":"org.bitcoinj.core","c":"AbstractBlockChain","l":"addReorganizeListener(ReorganizeListener)","u":"addReorganizeListener(org.bitcoinj.core.listeners.ReorganizeListener)"},{"p":"org.bitcoinj.core","c":"AddressMessage","l":"addresses"},{"p":"org.bitcoinj.base.exceptions","c":"AddressFormatException","l":"AddressFormatException()","u":"%3Cinit%3E()"},{"p":"org.bitcoinj.base.exceptions","c":"AddressFormatException","l":"AddressFormatException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"org.bitcoinj.crypto","c":"BIP38PrivateKey","l":"addressHash"},{"p":"org.bitcoinj.core","c":"NetworkParameters","l":"addressHeader"},{"p":"org.bitcoinj.core","c":"AddressMessage","l":"AddressMessage(List)","u":"%3Cinit%3E(java.util.List)"},{"p":"org.bitcoinj.core","c":"NetworkParameters","l":"addrSeeds"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addScriptsChangeEventListener(Executor, ScriptsChangeEventListener)","u":"addScriptsChangeEventListener(java.util.concurrent.Executor,org.bitcoinj.wallet.listeners.ScriptsChangeEventListener)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addScriptsChangeEventListener(ScriptsChangeEventListener)","u":"addScriptsChangeEventListener(org.bitcoinj.wallet.listeners.ScriptsChangeEventListener)"},{"p":"org.bitcoinj.core","c":"Transaction","l":"addSignedInput(TransactionOutPoint, Script, Coin, ECKey)","u":"addSignedInput(org.bitcoinj.core.TransactionOutPoint,org.bitcoinj.script.Script,org.bitcoinj.base.Coin,org.bitcoinj.crypto.ECKey)"},{"p":"org.bitcoinj.core","c":"Transaction","l":"addSignedInput(TransactionOutPoint, Script, Coin, ECKey, Transaction.SigHash, boolean)","u":"addSignedInput(org.bitcoinj.core.TransactionOutPoint,org.bitcoinj.script.Script,org.bitcoinj.base.Coin,org.bitcoinj.crypto.ECKey,org.bitcoinj.core.Transaction.SigHash,boolean)"},{"p":"org.bitcoinj.core","c":"Transaction","l":"addSignedInput(TransactionOutPoint, Script, ECKey)","u":"addSignedInput(org.bitcoinj.core.TransactionOutPoint,org.bitcoinj.script.Script,org.bitcoinj.crypto.ECKey)"},{"p":"org.bitcoinj.core","c":"Transaction","l":"addSignedInput(TransactionOutPoint, Script, ECKey, Transaction.SigHash, boolean)","u":"addSignedInput(org.bitcoinj.core.TransactionOutPoint,org.bitcoinj.script.Script,org.bitcoinj.crypto.ECKey,org.bitcoinj.core.Transaction.SigHash,boolean)"},{"p":"org.bitcoinj.core","c":"Transaction","l":"addSignedInput(TransactionOutput, ECKey)","u":"addSignedInput(org.bitcoinj.core.TransactionOutput,org.bitcoinj.crypto.ECKey)"},{"p":"org.bitcoinj.core","c":"Transaction","l":"addSignedInput(TransactionOutput, ECKey, Transaction.SigHash, boolean)","u":"addSignedInput(org.bitcoinj.core.TransactionOutput,org.bitcoinj.crypto.ECKey,org.bitcoinj.core.Transaction.SigHash,boolean)"},{"p":"org.bitcoinj.base.internal","c":"Stopwatch","l":"addTo(Temporal)","u":"addTo(java.time.temporal.Temporal)"},{"p":"org.bitcoinj.core","c":"AbstractBlockChain","l":"addToBlockStore(StoredBlock, Block)","u":"addToBlockStore(org.bitcoinj.core.StoredBlock,org.bitcoinj.core.Block)"},{"p":"org.bitcoinj.core","c":"BlockChain","l":"addToBlockStore(StoredBlock, Block)","u":"addToBlockStore(org.bitcoinj.core.StoredBlock,org.bitcoinj.core.Block)"},{"p":"org.bitcoinj.core","c":"FullPrunedBlockChain","l":"addToBlockStore(StoredBlock, Block)","u":"addToBlockStore(org.bitcoinj.core.StoredBlock,org.bitcoinj.core.Block)"},{"p":"org.bitcoinj.core","c":"AbstractBlockChain","l":"addToBlockStore(StoredBlock, Block, TransactionOutputChanges)","u":"addToBlockStore(org.bitcoinj.core.StoredBlock,org.bitcoinj.core.Block,org.bitcoinj.core.TransactionOutputChanges)"},{"p":"org.bitcoinj.core","c":"BlockChain","l":"addToBlockStore(StoredBlock, Block, TransactionOutputChanges)","u":"addToBlockStore(org.bitcoinj.core.StoredBlock,org.bitcoinj.core.Block,org.bitcoinj.core.TransactionOutputChanges)"},{"p":"org.bitcoinj.core","c":"FullPrunedBlockChain","l":"addToBlockStore(StoredBlock, Block, TransactionOutputChanges)","u":"addToBlockStore(org.bitcoinj.core.StoredBlock,org.bitcoinj.core.Block,org.bitcoinj.core.TransactionOutputChanges)"},{"p":"org.bitcoinj.core","c":"GetDataMessage","l":"addTransaction(Sha256Hash, boolean)","u":"addTransaction(org.bitcoinj.base.Sha256Hash,boolean)"},{"p":"org.bitcoinj.core","c":"Block","l":"addTransaction(Transaction)","u":"addTransaction(org.bitcoinj.core.Transaction)"},{"p":"org.bitcoinj.core","c":"InventoryMessage","l":"addTransaction(Transaction)","u":"addTransaction(org.bitcoinj.core.Transaction)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addTransactionConfidenceEventListener(Executor, TransactionConfidenceEventListener)","u":"addTransactionConfidenceEventListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.TransactionConfidenceEventListener)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addTransactionConfidenceEventListener(TransactionConfidenceEventListener)","u":"addTransactionConfidenceEventListener(org.bitcoinj.core.listeners.TransactionConfidenceEventListener)"},{"p":"org.bitcoinj.core","c":"AbstractBlockChain","l":"addTransactionReceivedListener(Executor, TransactionReceivedInBlockListener)","u":"addTransactionReceivedListener(java.util.concurrent.Executor,org.bitcoinj.core.listeners.TransactionReceivedInBlockListener)"},{"p":"org.bitcoinj.core","c":"AbstractBlockChain","l":"addTransactionReceivedListener(TransactionReceivedInBlockListener)","u":"addTransactionReceivedListener(org.bitcoinj.core.listeners.TransactionReceivedInBlockListener)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addTransactionSigner(TransactionSigner)","u":"addTransactionSigner(org.bitcoinj.signers.TransactionSigner)"},{"p":"org.bitcoinj.store","c":"FullPrunedBlockStore","l":"addUnspentTransactionOutput(UTXO)","u":"addUnspentTransactionOutput(org.bitcoinj.core.UTXO)"},{"p":"org.bitcoinj.store","c":"MemoryFullPrunedBlockStore","l":"addUnspentTransactionOutput(UTXO)","u":"addUnspentTransactionOutput(org.bitcoinj.core.UTXO)"},{"p":"org.bitcoinj.core","c":"AbstractBlockChain","l":"addWallet(Wallet)","u":"addWallet(org.bitcoinj.wallet.Wallet)"},{"p":"org.bitcoinj.core","c":"Peer","l":"addWallet(Wallet)","u":"addWallet(org.bitcoinj.wallet.Wallet)"},{"p":"org.bitcoinj.core","c":"PeerGroup","l":"addWallet(Wallet)","u":"addWallet(org.bitcoinj.wallet.Wallet)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addWalletTransaction(WalletTransaction)","u":"addWalletTransaction(org.bitcoinj.wallet.WalletTransaction)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addWatchedAddress(Address)","u":"addWatchedAddress(org.bitcoinj.base.Address)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addWatchedAddress(Address, Instant)","u":"addWatchedAddress(org.bitcoinj.base.Address,java.time.Instant)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addWatchedAddress(Address, long)","u":"addWatchedAddress(org.bitcoinj.base.Address,long)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addWatchedAddresses(List
)","u":"addWatchedAddresses(java.util.List)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addWatchedAddresses(List
, Instant)","u":"addWatchedAddresses(java.util.List,java.time.Instant)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addWatchedAddresses(List
, long)","u":"addWatchedAddresses(java.util.List,long)"},{"p":"org.bitcoinj.wallet","c":"Wallet","l":"addWatchedScripts(List + + + + + + +
+ +
+
+ +
+ +

Interface Address

+
+
+
+
All Superinterfaces:
+
Comparable<Address>
+
+
+
All Known Implementing Classes:
+
LegacyAddress, SegwitAddress
+
+
+
public interface Address +extends Comparable<Address>
+
Interface for addresses, e.g. native segwit addresses (SegwitAddress) or legacy addresses (LegacyAddress). +

+ Use AddressParser to construct any kind of address from its textual form.

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/AddressParser.AddressParserProvider.html b/javadoc/0.17-rc1/org/bitcoinj/base/AddressParser.AddressParserProvider.html new file mode 100644 index 000000000..6292fe08a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/AddressParser.AddressParserProvider.html @@ -0,0 +1,154 @@ + + + + +AddressParser.AddressParserProvider (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface AddressParser.AddressParserProvider

+
+
+
+
Enclosing interface:
+
AddressParser
+
+
+
public static interface AddressParser.AddressParserProvider
+
Interface implemented by custom address parser providers.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Return a parser that will parse valid addresses for all networks (Network) known by this provider.
    +
    + + +
    +
    Return a parser that will parse valid addresses for a given Network.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      forKnownNetworks

      +
      AddressParser forKnownNetworks()
      +
      Return a parser that will parse valid addresses for all networks (Network) known by this provider.
      +
      +
      Returns:
      +
      a parser for all networks known by this provider
      +
      +
      +
    • +
    • +
      +

      forNetwork

      +
      AddressParser forNetwork(Network network)
      +
      Return a parser that will parse valid addresses for a given Network.
      +
      +
      Parameters:
      +
      network - network to parse and validate addresses for
      +
      Returns:
      +
      a parser for the specified network
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/AddressParser.html b/javadoc/0.17-rc1/org/bitcoinj/base/AddressParser.html new file mode 100644 index 000000000..7ce698831 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/AddressParser.html @@ -0,0 +1,258 @@ + + + + +AddressParser (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface AddressParser

+
+
+
+
All Known Implementing Classes:
+
Wallet
+
+
+
Functional Interface:
+
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
+
+
+
@FunctionalInterface +public interface AddressParser
+
Functional interface for parsing an Address. It takes a String parameter and will parse address + strings for a configured set of Networks. For example, if the parser was created with (getDefault(Network) + it will only parse addresses for the provided value of Network. If created with getDefault() it will parse + addresses matching any known network. The default set of known networks is defined by BitcoinNetwork. +

+ Note: Be aware that the value returned by Address.network() will be normalized. See Address.network() for details.

+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      parseAddress

      +
      Address parseAddress(String addressString) + throws AddressFormatException
      +
      Parse an address for a configured set of Networks.
      +
      +
      Parameters:
      +
      addressString - string representation of an address
      +
      Returns:
      +
      A validated address object
      +
      Throws:
      +
      AddressFormatException - invalid address string
      +
      +
      +
    • +
    • +
      +

      getDefault

      +
      static AddressParser getDefault()
      +
      +
      Returns:
      +
      The default parser for address and networks types built-in to bitcoinj.
      +
      +
      +
    • +
    • +
      +

      getDefault

      +
      static AddressParser getDefault(Network network)
      +
      +
      Parameters:
      +
      network - the network to parse for
      +
      Returns:
      +
      The default (built-in) parser for network
      +
      +
      +
    • +
    • +
      +

      getLegacy

      +
      @Deprecated +static AddressParser getLegacy()
      +
      Deprecated.
      +
      Get a legacy address parser that knows about networks that have been + dynamically added to the list maintained by Networks.
      +
      +
      Returns:
      +
      A parser for all known networks
      +
      +
      +
    • +
    • +
      +

      getLegacy

      +
      @Deprecated +static AddressParser getLegacy(Network network)
      +
      Deprecated.
      +
      Get a legacy address parser that knows about networks that have been + dynamically added to the list maintained by Networks.
      +
      +
      Parameters:
      +
      network - the network to parse for
      +
      Returns:
      +
      A parser that will throw for strings that are not valid for network.
      +
      +
      +
    • +
    • +
      +

      getLegacy

      +
      @Deprecated +static AddressParser getLegacy(@Nullable + NetworkParameters params)
      +
      Deprecated.
      +
      Get a legacy address parser that knows about networks that have been + dynamically added to the list maintained by Networks.
      +
      +
      Parameters:
      +
      params - the network to parser for, or null for all networks.
      +
      Returns:
      +
      A parser that will throw for strings that are not valid for network.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/Base58.html b/javadoc/0.17-rc1/org/bitcoinj/base/Base58.html new file mode 100644 index 000000000..e705e2811 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/Base58.html @@ -0,0 +1,296 @@ + + + + +Base58 (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Base58

+
+
java.lang.Object +
org.bitcoinj.base.Base58
+
+
+
+
public class Base58 +extends Object
+
Base58 is a way to encode Bitcoin addresses (or arbitrary data) as alphanumeric strings. +

+ Note that this is not the same base58 as used by Flickr, which you may find referenced around the Internet. +

+ You may want to consider working with org.bitcoinj.core.EncodedPrivateKey instead, which + adds support for testing the prefix and suffix bytes commonly found in addresses. +

+ Satoshi explains: why base-58 instead of standard base-64 encoding? +

    +
  • Don't want 0OIl characters that look the same in some fonts and + could be used to create visually identical looking account numbers.
  • +
  • A string with non-alphanumeric characters is not as easily accepted as an account number.
  • +
  • E-mail usually won't line-break if there's no punctuation to break at.
  • +
  • Doubleclicking selects the whole number as one word if it's all alphanumeric.
  • +
+

+ However, note that the encoding/decoding runs in O(n²) time, so it is not useful for large data. +

+ The basic idea of the encoding is to treat the data bytes as a large number represented using + base-256 digits, convert the number to be represented using base-58 digits, preserve the exact + number of leading zeros (which are otherwise lost during the mathematical operations on the + numbers), and finally represent the resulting base-58 digits as alphanumeric ASCII characters.

+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static final char[]
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static byte[]
    +
    decode(String input)
    +
    +
    Decodes the given base58 string into the original data bytes.
    +
    +
    static byte[]
    + +
    +
    Decodes the given base58 string into the original data bytes, using the checksum in the + last 4 bytes of the decoded data to verify that the rest are correct.
    +
    +
    static BigInteger
    + +
     
    +
    static String
    +
    encode(byte[] input)
    +
    +
    Encodes the given bytes as a base58 string (no checksum is appended).
    +
    +
    static String
    +
    encodeChecked(int version, + byte[] payload)
    +
    +
    Encodes the given version and bytes as a base58 string.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      ALPHABET

      +
      public static final char[] ALPHABET
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Base58

      +
      public Base58()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      encode

      +
      public static String encode(byte[] input)
      +
      Encodes the given bytes as a base58 string (no checksum is appended).
      +
      +
      Parameters:
      +
      input - the bytes to encode
      +
      Returns:
      +
      the base58-encoded string
      +
      +
      +
    • +
    • +
      +

      encodeChecked

      +
      public static String encodeChecked(int version, + byte[] payload)
      +
      Encodes the given version and bytes as a base58 string. A checksum is appended.
      +
      +
      Parameters:
      +
      version - the version to encode
      +
      payload - the bytes to encode, e.g. pubkey hash
      +
      Returns:
      +
      the base58-encoded string
      +
      +
      +
    • +
    • +
      +

      decode

      +
      public static byte[] decode(String input) + throws AddressFormatException
      +
      Decodes the given base58 string into the original data bytes.
      +
      +
      Parameters:
      +
      input - the base58-encoded string to decode
      +
      Returns:
      +
      the decoded data bytes
      +
      Throws:
      +
      AddressFormatException - if the given string is not a valid base58 string
      +
      +
      +
    • +
    • +
      +

      decodeToBigInteger

      +
      public static BigInteger decodeToBigInteger(String input) + throws AddressFormatException
      +
      +
      Throws:
      +
      AddressFormatException
      +
      +
      +
    • +
    • +
      +

      decodeChecked

      +
      public static byte[] decodeChecked(String input) + throws AddressFormatException
      +
      Decodes the given base58 string into the original data bytes, using the checksum in the + last 4 bytes of the decoded data to verify that the rest are correct. The checksum is + removed from the returned data.
      +
      +
      Parameters:
      +
      input - the base58-encoded string to decode (which should include the checksum)
      +
      Throws:
      +
      AddressFormatException - if the input is not base 58 or the checksum does not validate.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/Bech32.Bech32Bytes.html b/javadoc/0.17-rc1/org/bitcoinj/base/Bech32.Bech32Bytes.html new file mode 100644 index 000000000..bba910bc8 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/Bech32.Bech32Bytes.html @@ -0,0 +1,201 @@ + + + + +Bech32.Bech32Bytes (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Bech32.Bech32Bytes

+
+
java.lang.Object +
org.bitcoinj.base.internal.ByteArray +
org.bitcoinj.base.Bech32.Bech32Bytes
+
+
+
+
+
All Implemented Interfaces:
+
Comparable<ByteArray>
+
+
+
Direct Known Subclasses:
+
Bech32.Bech32Data
+
+
+
Enclosing class:
+
Bech32
+
+
+
public static class Bech32.Bech32Bytes +extends ByteArray
+
Binary data in 5-bits-per-byte format as used in Bech32 encoding/decoding.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Bech32Bytes

      +
      protected Bech32Bytes(byte[] bytes)
      +
      Wrapper for a byte[] array.
      +
      +
      Parameters:
      +
      bytes - bytes to be copied (5-bits per byte format)
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      decode5to8

      +
      public byte[] decode5to8()
      +
      Return the data, fully-decoded with 8-bits per byte.
      +
      +
      Returns:
      +
      The data, fully-decoded as a byte array.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/Bech32.Bech32Data.html b/javadoc/0.17-rc1/org/bitcoinj/base/Bech32.Bech32Data.html new file mode 100644 index 000000000..e8f44627d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/Bech32.Bech32Data.html @@ -0,0 +1,161 @@ + + + + +Bech32.Bech32Data (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Bech32.Bech32Data

+
+ +
+
+
All Implemented Interfaces:
+
Comparable<ByteArray>
+
+
+
Enclosing class:
+
Bech32
+
+
+
public static class Bech32.Bech32Data +extends Bech32.Bech32Bytes
+
Bech32 data in 5-bit byte format with Bech32.Encoding and human-readable part (HRP) information. + Typically, the result of Bech32.decode(String).
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/Bech32.Encoding.html b/javadoc/0.17-rc1/org/bitcoinj/base/Bech32.Encoding.html new file mode 100644 index 000000000..66798d758 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/Bech32.Encoding.html @@ -0,0 +1,222 @@ + + + + +Bech32.Encoding (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class Bech32.Encoding

+
+
java.lang.Object +
java.lang.Enum<Bech32.Encoding> +
org.bitcoinj.base.Bech32.Encoding
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Bech32.Encoding>, Constable
+
+
+
Enclosing class:
+
Bech32
+
+
+
public static enum Bech32.Encoding +extends Enum<Bech32.Encoding>
+
Enumeration of known Bech32 encoding format types: Bech32 and Bech32m.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Bech32.Encoding[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Bech32.Encoding valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/Bech32.html b/javadoc/0.17-rc1/org/bitcoinj/base/Bech32.html new file mode 100644 index 000000000..0093bb520 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/Bech32.html @@ -0,0 +1,306 @@ + + + + +Bech32 (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Bech32

+
+
java.lang.Object +
org.bitcoinj.base.Bech32
+
+
+
+
public class Bech32 +extends Object
+
Implementation of the Bech32 encoding. Used in the implementation of SegwitAddress and + also provides an API for encoding/decoding arbitrary Bech32 data. To parse Bech32 Bitcoin addresses, + use AddressParser. To encode arbitrary Bech32 data, see encodeBytes(Encoding, String, byte[]). + To decode arbitrary Bech32 strings, see decodeBytes(String, String, Encoding) or decode(String). +

+ Based on the original Coinomi implementation.

+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Bech32

      +
      public Bech32()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      encodeBytes

      +
      public static String encodeBytes(Bech32.Encoding encoding, + String hrp, + byte[] bytes)
      +
      Encode a byte array to a Bech32 string
      +
      +
      Parameters:
      +
      encoding - Desired encoding Bech32 or Bech32m
      +
      hrp - human-readable part to use for encoding
      +
      bytes - Arbitrary binary data (8-bits per byte)
      +
      Returns:
      +
      A Bech32 string
      +
      +
      +
    • +
    • +
      +

      decodeBytes

      +
      public static byte[] decodeBytes(String bech32, + String expectedHrp, + Bech32.Encoding expectedEncoding)
      +
      Decode a Bech32 string to a byte array.
      +
      +
      Parameters:
      +
      bech32 - A Bech32 format string
      +
      expectedHrp - Expected value for the human-readable part
      +
      expectedEncoding - Expected encoding
      +
      Returns:
      +
      Decoded value as byte array (8-bits per byte)
      +
      Throws:
      +
      AddressFormatException - if unexpected hrp or encoding
      +
      +
      +
    • +
    • +
      +

      encode

      +
      public static String encode(Bech32.Bech32Data bech32)
      +
      Encode a Bech32 string.
      +
      +
      Parameters:
      +
      bech32 - Contains 5-bits/byte data, desired encoding and human-readable part
      +
      Returns:
      +
      A string containing the Bech32-encoded data
      +
      +
      +
    • +
    • +
      +

      encode

      +
      public static String encode(Bech32.Encoding encoding, + String hrp, + Bech32.Bech32Bytes values)
      +
      Encode a Bech32 string.
      +
      +
      Parameters:
      +
      encoding - The requested encoding
      +
      hrp - The requested human-readable part
      +
      values - Binary data in 5-bit per byte format
      +
      Returns:
      +
      A string containing the Bech32-encoded data
      +
      +
      +
    • +
    • +
      +

      decode

      +
      public static Bech32.Bech32Data decode(String str) + throws AddressFormatException
      +
      Decode a Bech32 string. +

      + To get the fully-decoded data, call Bech32.Bech32Bytes.decode5to8() on the returned Bech32Data.

      +
      +
      Parameters:
      +
      str - A string containing Bech32-encoded data
      +
      Returns:
      +
      An object with the detected encoding, hrp, and decoded data (in 5-bit per byte format)
      +
      Throws:
      +
      AddressFormatException - if the string is invalid
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/BitcoinNetwork.html b/javadoc/0.17-rc1/org/bitcoinj/base/BitcoinNetwork.html new file mode 100644 index 000000000..d4102a5c8 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/BitcoinNetwork.html @@ -0,0 +1,668 @@ + + + + +BitcoinNetwork (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class BitcoinNetwork

+
+
java.lang.Object +
java.lang.Enum<BitcoinNetwork> +
org.bitcoinj.base.BitcoinNetwork
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<BitcoinNetwork>, Constable, Network
+
+
+
public enum BitcoinNetwork +extends Enum<BitcoinNetwork> +implements Network
+
A convenient enum representation of a Bitcoin network. +

+ Note that the name of each enum constant is defined in uppercase as is the convention in Java. + However, the canonical representation in bitcoinj for user-facing display and input + of Bitcoin network names is lowercase (e.g. as a command-line parameter.) + Implementations should use the toString() method for output and the fromString(String) + method for input of network values.

+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      MAINNET

      +
      public static final BitcoinNetwork MAINNET
      +
      The main Bitcoin network, known as "mainnet", with id string "org.bitcoin.production"
      +
      +
    • +
    • +
      +

      TESTNET

      +
      public static final BitcoinNetwork TESTNET
      +
      The Bitcoin test network, known as "testnet", with id string "org.bitcoin.test"
      +
      +
    • +
    • +
      +

      SIGNET

      +
      public static final BitcoinNetwork SIGNET
      +
      The Bitcoin signature-based test network, known as "signet", with id string "org.bitcoin.signet"
      +
      +
    • +
    • +
      +

      REGTEST

      +
      public static final BitcoinNetwork REGTEST
      +
      A local Bitcoin regression test network, known as "regtest", with id string "org.bitcoin.regtest"
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      BITCOIN_SCHEME

      +
      public static final String BITCOIN_SCHEME
      +
      Scheme part for Bitcoin URIs.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      MAX_MONEY

      +
      public static final Coin MAX_MONEY
      +
      The maximum money to be generated
      +
      +
    • +
    • +
      +

      ID_MAINNET

      +
      public static final String ID_MAINNET
      +
      The ID string for the main, production network where people trade things.
      +
      +
    • +
    • +
      +

      ID_TESTNET

      +
      public static final String ID_TESTNET
      +
      The ID string for the testnet.
      +
      +
    • +
    • +
      +

      ID_SIGNET

      +
      public static final String ID_SIGNET
      +
      The ID string for the signet.
      +
      +
    • +
    • +
      +

      ID_REGTEST

      +
      public static final String ID_REGTEST
      +
      The ID string for regtest mode.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static BitcoinNetwork[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static BitcoinNetwork valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      Return the canonical, lowercase, user-facing String for an enum. + It is the lowercase value of Enum.name() and can be displayed to the user, used + as a command-line parameter, etc. +
      +
      MAINNET
      +
      mainnet
      +
      TESTNET
      +
      testnet
      +
      SIGNET
      +
      signet
      +
      REGTEST
      +
      regtest
      +
      +
      +
      Overrides:
      +
      toString in class Enum<BitcoinNetwork>
      +
      Returns:
      +
      canonical lowercase name for this Bitcoin network
      +
      +
      +
    • +
    • +
      +

      id

      +
      public String id()
      +
      Return the network ID string as defined by (these were previously defined in NetworkParameters) +
      +
      MAINNET
      +
      org.bitcoin.production
      +
      TESTNET
      +
      org.bitcoin.test
      +
      SIGNET
      +
      org.bitcoin.signet
      +
      REGTEST
      +
      org.bitcoin.regtest
      +
      +
      +
      Specified by:
      +
      id in interface Network
      +
      Returns:
      +
      The network ID string
      +
      +
      +
    • +
    • +
      +

      legacyAddressHeader

      +
      public int legacyAddressHeader()
      +
      Header byte of base58 encoded legacy P2PKH addresses for this network.
      +
      +
      Specified by:
      +
      legacyAddressHeader in interface Network
      +
      Returns:
      +
      header byte as an int.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      legacyP2SHHeader

      +
      public int legacyP2SHHeader()
      +
      Header byte of base58 encoded legacy P2SH addresses for this network.
      +
      +
      Specified by:
      +
      legacyP2SHHeader in interface Network
      +
      Returns:
      +
      header byte as an int.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      segwitAddressHrp

      +
      public String segwitAddressHrp()
      +
      Return the standard Bech32 SegwitAddress.SegwitHrp (as a String) for + this network.
      +
      +
      Specified by:
      +
      segwitAddressHrp in interface Network
      +
      Returns:
      +
      The HRP as a (lowercase) string.
      +
      +
      +
    • +
    • +
      +

      uriScheme

      +
      public String uriScheme()
      +
      The URI scheme for Bitcoin.
      +
      +
      Specified by:
      +
      uriScheme in interface Network
      +
      Returns:
      +
      string containing the URI scheme
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      hasMaxMoney

      +
      public boolean hasMaxMoney()
      +
      Description copied from interface: Network
      +
      Does this network have a fixed maximum number of coins
      +
      +
      Specified by:
      +
      hasMaxMoney in interface Network
      +
      Returns:
      +
      true if this network has a fixed maximum number of coins
      +
      +
      +
    • +
    • +
      +

      maxMoney

      +
      public Coin maxMoney()
      +
      Description copied from interface: Network
      +
      Maximum number of coins for this network as a Monetary value. + Where not applicable, a very large number of coins is returned instead (e.g. the main coin issue for Dogecoin).
      +
      +
      Specified by:
      +
      maxMoney in interface Network
      +
      Returns:
      +
      Maximum number of coins for this network
      +
      +
      +
    • +
    • +
      +

      exceedsMaxMoney

      +
      public boolean exceedsMaxMoney(Monetary amount)
      +
      Description copied from interface: Network
      +
      Check if an amount exceeds the maximum allowed for a network (if the network has one)
      +
      +
      Specified by:
      +
      exceedsMaxMoney in interface Network
      +
      Parameters:
      +
      amount - A monetary amount
      +
      Returns:
      +
      true if too big, false if an allowed amount
      +
      +
      +
    • +
    • +
      +

      checkAddress

      +
      public Address checkAddress(Address address) + throws IllegalArgumentException
      +
      Check if an address is valid on this network. + This is meant to be used as a precondition for a method or function that expects a valid address. If + you are validating addresses provided externally, you probably want to use + isValidAddress(Address) to handle errors more gracefully. This method uses isValidAddress(Address) + internally which properly accounts for address normalization.
      +
      +
      Parameters:
      +
      address - Address to validate
      +
      Returns:
      +
      The unmodified address if valid on this network
      +
      Throws:
      +
      IllegalArgumentException - if address not valid on this network
      +
      +
      +
    • +
    • +
      +

      isValidAddress

      +
      public boolean isValidAddress(Address address)
      +
      Is address valid for this network. Because we normalize the network() value in the Address + type (see the JavaDoc for Address.network()) this method should be used in preference to simply + verifying that address.network() returns the desired network type.
      +
      +
      Parameters:
      +
      address - Address to validate
      +
      Returns:
      +
      true if valid on this network, false otherwise
      +
      +
      +
    • +
    • +
      +

      fromString

      +
      public static Optional<BitcoinNetwork> fromString(String nameString)
      +
      Find the BitcoinNetwork from a name string, e.g. "mainnet", "testnet" or "signet". + A number of common alternate names are allowed too, e.g. "main" or "prod".
      +
      +
      Parameters:
      +
      nameString - A name string
      +
      Returns:
      +
      An Optional containing the matching enum or empty
      +
      +
      +
    • +
    • +
      +

      fromIdString

      +
      public static Optional<BitcoinNetwork> fromIdString(String idString)
      +
      Find the BitcoinNetwork from an ID String
      +
      +
      Parameters:
      +
      idString - specifies the network
      +
      Returns:
      +
      An Optional containing the matching enum or empty
      +
      +
      +
    • +
    • +
      +

      strings

      +
      public static List<String> strings()
      +
      +
      Returns:
      +
      list of the names of all instances of this enum
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/Coin.html b/javadoc/0.17-rc1/org/bitcoinj/base/Coin.html new file mode 100644 index 000000000..51a8abf94 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/Coin.html @@ -0,0 +1,922 @@ + + + + +Coin (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Coin

+
+
java.lang.Object +
org.bitcoinj.base.Coin
+
+
+
+
All Implemented Interfaces:
+
Comparable<Coin>, Monetary
+
+
+
public final class Coin +extends Object +implements Monetary, Comparable<Coin>
+
Represents a monetary Bitcoin value. This class is immutable and should be treated as a Java Value-based class. + We recommend using the Coin class wherever possible to represent Bitcoin monetary values. If you have existing + code that uses other numeric types and need to convert there are conversion methods. +

+ Internally Coin is implemented as a long (see value) that represents a number of satoshis. It + can also be considered a fixed-point number of bitcoins. +

+ To create a Coin from an integer number of satoshis, use ofSat(long). To convert to a long number + of satoshis use toSat(). (You can also use valueOf(long), getValue() or value.) +

+ To create a Coin from a decimal number of bitcoins, use ofBtc(BigDecimal). To convert to a BigDecimal + of bitcoins use toBtc(). (Performing fixed-point conversion, these methods essentially multiply or divide by Coin.COIN.toSat().) +

+ Never ever use float or double to represent monetary values.

+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static final int
    + +
    +
    Number of bytes to store this amount.
    +
    +
    static final Coin
    + +
    +
    0.01 Bitcoins.
    +
    +
    static final Coin
    + +
    +
    One Bitcoin.
    +
    +
    static final Coin
    + +
     
    +
    static final Coin
    + +
    +
    0.000001 Bitcoins, also known as 1 µBTC or 1 uBTC.
    +
    +
    static final Coin
    + +
    +
    0.001 Bitcoins, also known as 1 mBTC.
    +
    +
    static final Coin
    + +
    +
    Represents a monetary value of minus one satoshi.
    +
    +
    static final Coin
    + +
    +
    A satoshi is the smallest unit that can be transferred.
    +
    +
    static final int
    + +
    +
    Number of decimals for one Bitcoin.
    +
    +
    final long
    + +
    +
    The number of satoshis of this monetary value.
    +
    +
    static final Coin
    + +
    +
    Zero Bitcoins.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + +
    add(Coin value)
    +
     
    +
    static long
    + +
    +
    Convert a decimal amount of BTC into satoshis.
    +
    +
    int
    +
    compareTo(Coin other)
    +
     
    + +
    div(int divisor)
    +
    +
    Alias for divide
    +
    + +
    div(long divisor)
    +
    +
    Alias for divide
    +
    + +
    divide(long divisor)
    +
     
    +
    long
    +
    divide(Coin divisor)
    +
     
    + +
    divideAndRemainder(long divisor)
    +
     
    +
    boolean
    + +
     
    +
    long
    + +
    +
    Returns the number of satoshis of this monetary value.
    +
    +
    int
    + +
     
    +
    boolean
    + +
    +
    Returns true if the monetary value represented by this instance is greater than that + of the given other Coin, otherwise false.
    +
    +
    boolean
    + +
    +
    Returns true if the monetary value represented by this instance is less than that + of the given other Coin, otherwise false.
    +
    +
    boolean
    + +
    +
    Returns true if and only if this instance represents a monetary value less than zero, + otherwise false.
    +
    +
    boolean
    + +
    +
    Returns true if and only if this instance represents a monetary value greater than zero, + otherwise false.
    +
    +
    boolean
    + +
    +
    Returns true if and only if this instance represents zero monetary value, + otherwise false.
    +
    +
    long
    + +
    +
    Returns the number of satoshis of this monetary value.
    +
    + +
    minus(Coin value)
    +
    +
    Alias for subtract
    +
    + +
    multiply(long factor)
    +
     
    + + +
     
    +
    static Coin
    + +
    +
    Create a Coin from a decimal amount of BTC.
    +
    +
    static Coin
    +
    ofSat(long satoshis)
    +
    +
    Create a Coin from a long integer number of satoshis.
    +
    +
    static Coin
    + +
    +
    Create a Coin by parsing a String amount expressed in "the way humans are used to".
    +
    +
    static Coin
    + +
    +
    Create a Coin by parsing a String amount expressed in "the way humans are used to".
    +
    + +
    plus(Coin value)
    +
    +
    Alias for add
    +
    +
    static Coin
    + +
    +
    Read a Coin amount from the given buffer as 8 bytes in little-endian order.
    +
    +
    static BigDecimal
    +
    satoshiToBtc(long satoshis)
    +
    +
    Convert an amount in satoshis to an amount in BTC.
    +
    +
    byte[]
    + +
    +
    Allocates a byte array and serializes the amount.
    +
    + +
    shiftLeft(int n)
    +
     
    + +
    shiftRight(int n)
    +
     
    +
    int
    + +
     
    +
    int
    + +
    +
    Returns the absolute value of exponent of the value of a "smallest unit" in scientific notation.
    +
    + +
    subtract(Coin value)
    +
     
    + +
    times(int factor)
    +
    +
    Alias for multiply
    +
    + +
    times(long factor)
    +
    +
    Alias for multiply
    +
    + + +
    +
    Convert to number of bitcoin (in BTC)
    +
    + + +
    +
    Returns the value as a 0.12 type string.
    +
    + + +
    +
    + Returns the value as a plain string denominated in BTC.
    +
    +
    long
    + +
    +
    Convert to number of satoshis
    +
    + + +
     
    +
    static Coin
    +
    valueOf(int coins, + int cents)
    +
    +
    Create a Coin from an amount expressed in "the way humans are used to".
    +
    +
    static Coin
    +
    valueOf(long satoshis)
    +
    +
    Create a Coin from a long integer number of satoshis.
    +
    + + +
    +
    Write the amount into the given buffer as 8 bytes in little-endian order.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      SMALLEST_UNIT_EXPONENT

      +
      public static final int SMALLEST_UNIT_EXPONENT
      +
      Number of decimals for one Bitcoin. This constant is useful for quick adapting to other coins because a lot of + constants derive from it.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      ZERO

      +
      public static final Coin ZERO
      +
      Zero Bitcoins.
      +
      +
    • +
    • +
      +

      COIN

      +
      public static final Coin COIN
      +
      One Bitcoin.
      +
      +
    • +
    • +
      +

      CENT

      +
      public static final Coin CENT
      +
      0.01 Bitcoins. This unit is not really used much.
      +
      +
    • +
    • +
      +

      MILLICOIN

      +
      public static final Coin MILLICOIN
      +
      0.001 Bitcoins, also known as 1 mBTC.
      +
      +
    • +
    • +
      +

      MICROCOIN

      +
      public static final Coin MICROCOIN
      +
      0.000001 Bitcoins, also known as 1 µBTC or 1 uBTC.
      +
      +
    • +
    • +
      +

      SATOSHI

      +
      public static final Coin SATOSHI
      +
      A satoshi is the smallest unit that can be transferred. 100 million of them fit into a Bitcoin.
      +
      +
    • +
    • +
      +

      FIFTY_COINS

      +
      public static final Coin FIFTY_COINS
      +
      +
    • +
    • +
      +

      NEGATIVE_SATOSHI

      +
      public static final Coin NEGATIVE_SATOSHI
      +
      Represents a monetary value of minus one satoshi.
      +
      +
    • +
    • +
      +

      BYTES

      +
      public static final int BYTES
      +
      Number of bytes to store this amount.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      value

      +
      public final long value
      +
      The number of satoshis of this monetary value.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      valueOf

      +
      public static Coin valueOf(long satoshis)
      +
      Create a Coin from a long integer number of satoshis.
      +
      +
      Parameters:
      +
      satoshis - number of satoshis
      +
      Returns:
      +
      Coin object containing value in satoshis
      +
      +
      +
    • +
    • +
      +

      read

      +
      public static Coin read(ByteBuffer buf) + throws BufferUnderflowException
      +
      Read a Coin amount from the given buffer as 8 bytes in little-endian order.
      +
      +
      Parameters:
      +
      buf - buffer to read from
      +
      Returns:
      +
      read amount
      +
      Throws:
      +
      BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      smallestUnitExponent

      +
      public int smallestUnitExponent()
      +
      Description copied from interface: Monetary
      +
      Returns the absolute value of exponent of the value of a "smallest unit" in scientific notation. For Bitcoin, a + satoshi is worth 1E-8 so this would be 8.
      +
      +
      Specified by:
      +
      smallestUnitExponent in interface Monetary
      +
      +
      +
    • +
    • +
      +

      getValue

      +
      public long getValue()
      +
      Returns the number of satoshis of this monetary value.
      +
      +
      Specified by:
      +
      getValue in interface Monetary
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Coin valueOf(int coins, + int cents)
      +
      Create a Coin from an amount expressed in "the way humans are used to".
      +
      +
      Parameters:
      +
      coins - Number of bitcoins
      +
      cents - Number of bitcents (0.01 bitcoin)
      +
      Returns:
      +
      Coin object containing value in satoshis
      +
      +
      +
    • +
    • +
      +

      btcToSatoshi

      +
      public static long btcToSatoshi(BigDecimal coins) + throws ArithmeticException
      +
      Convert a decimal amount of BTC into satoshis.
      +
      +
      Parameters:
      +
      coins - number of coins
      +
      Returns:
      +
      number of satoshis
      +
      Throws:
      +
      ArithmeticException - if value has too much precision or will not fit in a long
      +
      +
      +
    • +
    • +
      +

      satoshiToBtc

      +
      public static BigDecimal satoshiToBtc(long satoshis)
      +
      Convert an amount in satoshis to an amount in BTC.
      +
      +
      Parameters:
      +
      satoshis - number of satoshis
      +
      Returns:
      +
      number of bitcoins (in BTC)
      +
      +
      +
    • +
    • +
      +

      ofBtc

      +
      public static Coin ofBtc(BigDecimal coins) + throws ArithmeticException
      +
      Create a Coin from a decimal amount of BTC.
      +
      +
      Parameters:
      +
      coins - number of coins (in BTC)
      +
      Returns:
      +
      Coin object containing value in satoshis
      +
      Throws:
      +
      ArithmeticException - if value has too much precision or will not fit in a long
      +
      +
      +
    • +
    • +
      +

      ofSat

      +
      public static Coin ofSat(long satoshis)
      +
      Create a Coin from a long integer number of satoshis.
      +
      +
      Parameters:
      +
      satoshis - number of satoshis
      +
      Returns:
      +
      Coin object containing value in satoshis
      +
      +
      +
    • +
    • +
      +

      parseCoin

      +
      public static Coin parseCoin(String str)
      +
      Create a Coin by parsing a String amount expressed in "the way humans are used to".
      +
      +
      Parameters:
      +
      str - string in a format understood by BigDecimal(String), for example "0", "1", "0.10", + * "1.23E3", "1234.5E-5".
      +
      Returns:
      +
      Coin object containing value in satoshis
      +
      Throws:
      +
      IllegalArgumentException - if you try to specify fractional satoshis, or a value out of range.
      +
      +
      +
    • +
    • +
      +

      parseCoinInexact

      +
      public static Coin parseCoinInexact(String str)
      +
      Create a Coin by parsing a String amount expressed in "the way humans are used to". + The amount is cut to satoshi precision.
      +
      +
      Parameters:
      +
      str - string in a format understood by BigDecimal(String), for example "0", "1", "0.10", + * "1.23E3", "1234.5E-5".
      +
      Returns:
      +
      Coin object containing value in satoshis
      +
      Throws:
      +
      IllegalArgumentException - if you try to specify a value out of range.
      +
      +
      +
    • +
    • +
      +

      add

      +
      public Coin add(Coin value)
      +
      +
    • +
    • +
      +

      plus

      +
      public Coin plus(Coin value)
      +
      Alias for add
      +
      +
    • +
    • +
      +

      subtract

      +
      public Coin subtract(Coin value)
      +
      +
    • +
    • +
      +

      minus

      +
      public Coin minus(Coin value)
      +
      Alias for subtract
      +
      +
    • +
    • +
      +

      multiply

      +
      public Coin multiply(long factor)
      +
      +
    • +
    • +
      +

      times

      +
      public Coin times(long factor)
      +
      Alias for multiply
      +
      +
    • +
    • +
      +

      times

      +
      public Coin times(int factor)
      +
      Alias for multiply
      +
      +
    • +
    • +
      +

      divide

      +
      public Coin divide(long divisor)
      +
      +
    • +
    • +
      +

      div

      +
      public Coin div(long divisor)
      +
      Alias for divide
      +
      +
    • +
    • +
      +

      div

      +
      public Coin div(int divisor)
      +
      Alias for divide
      +
      +
    • +
    • +
      +

      divideAndRemainder

      +
      public Coin[] divideAndRemainder(long divisor)
      +
      +
    • +
    • +
      +

      divide

      +
      public long divide(Coin divisor)
      +
      +
    • +
    • +
      +

      isPositive

      +
      public boolean isPositive()
      +
      Returns true if and only if this instance represents a monetary value greater than zero, + otherwise false.
      +
      +
    • +
    • +
      +

      isNegative

      +
      public boolean isNegative()
      +
      Returns true if and only if this instance represents a monetary value less than zero, + otherwise false.
      +
      +
    • +
    • +
      +

      isZero

      +
      public boolean isZero()
      +
      Returns true if and only if this instance represents zero monetary value, + otherwise false.
      +
      +
    • +
    • +
      +

      isGreaterThan

      +
      public boolean isGreaterThan(Coin other)
      +
      Returns true if the monetary value represented by this instance is greater than that + of the given other Coin, otherwise false.
      +
      +
    • +
    • +
      +

      isLessThan

      +
      public boolean isLessThan(Coin other)
      +
      Returns true if the monetary value represented by this instance is less than that + of the given other Coin, otherwise false.
      +
      +
    • +
    • +
      +

      shiftLeft

      +
      public Coin shiftLeft(int n)
      +
      +
    • +
    • +
      +

      shiftRight

      +
      public Coin shiftRight(int n)
      +
      +
    • +
    • +
      +

      signum

      +
      public int signum()
      +
      +
      Specified by:
      +
      signum in interface Monetary
      +
      +
      +
    • +
    • +
      +

      negate

      +
      public Coin negate()
      +
      +
    • +
    • +
      +

      longValue

      +
      public long longValue()
      +
      Returns the number of satoshis of this monetary value. It's deprecated in favour of accessing value + directly.
      +
      +
    • +
    • +
      +

      toSat

      +
      public long toSat()
      +
      Convert to number of satoshis
      +
      +
      Returns:
      +
      decimal number of satoshis
      +
      +
      +
    • +
    • +
      +

      toBtc

      +
      public BigDecimal toBtc()
      +
      Convert to number of bitcoin (in BTC)
      +
      +
      Returns:
      +
      decimal number of bitcoin (in BTC)
      +
      +
      +
    • +
    • +
      +

      write

      +
      public ByteBuffer write(ByteBuffer buf) + throws BufferOverflowException
      +
      Write the amount into the given buffer as 8 bytes in little-endian order.
      +
      +
      Parameters:
      +
      buf - buffer to write into
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the value doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      serialize

      +
      public byte[] serialize()
      +
      Allocates a byte array and serializes the amount.
      +
      +
      Returns:
      +
      serialized amount
      +
      +
      +
    • +
    • +
      +

      toFriendlyString

      +
      public String toFriendlyString()
      +
      Returns the value as a 0.12 type string. More digits after the decimal place will be used + if necessary, but two will always be present.
      +
      +
    • +
    • +
      +

      toPlainString

      +
      public String toPlainString()
      +

      + Returns the value as a plain string denominated in BTC. + The result is unformatted with no trailing zeroes. + For instance, a value of 150000 satoshis gives an output string of "0.0015" BTC +

      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      compareTo

      +
      public int compareTo(Coin other)
      +
      +
      Specified by:
      +
      compareTo in interface Comparable<Coin>
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/LegacyAddress.AddressHeader.html b/javadoc/0.17-rc1/org/bitcoinj/base/LegacyAddress.AddressHeader.html new file mode 100644 index 000000000..6e101e25f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/LegacyAddress.AddressHeader.html @@ -0,0 +1,254 @@ + + + + +LegacyAddress.AddressHeader (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class LegacyAddress.AddressHeader

+
+
java.lang.Object +
java.lang.Enum<LegacyAddress.AddressHeader> +
org.bitcoinj.base.LegacyAddress.AddressHeader
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<LegacyAddress.AddressHeader>, Constable
+
+
+
Enclosing class:
+
LegacyAddress
+
+
+
public static enum LegacyAddress.AddressHeader +extends Enum<LegacyAddress.AddressHeader>
+
Address header of legacy P2PKH addresses for standard Bitcoin networks.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static LegacyAddress.AddressHeader[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static LegacyAddress.AddressHeader valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      ofNetwork

      +
      public static LegacyAddress.AddressHeader ofNetwork(BitcoinNetwork network)
      +
      +
      Parameters:
      +
      network - network to find enum for
      +
      Returns:
      +
      the corresponding enum
      +
      +
      +
    • +
    • +
      +

      headerByte

      +
      public int headerByte()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/LegacyAddress.P2SHHeader.html b/javadoc/0.17-rc1/org/bitcoinj/base/LegacyAddress.P2SHHeader.html new file mode 100644 index 000000000..5c5b7d207 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/LegacyAddress.P2SHHeader.html @@ -0,0 +1,246 @@ + + + + +LegacyAddress.P2SHHeader (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class LegacyAddress.P2SHHeader

+
+
java.lang.Object +
java.lang.Enum<LegacyAddress.P2SHHeader> +
org.bitcoinj.base.LegacyAddress.P2SHHeader
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<LegacyAddress.P2SHHeader>, Constable
+
+
+
Enclosing class:
+
LegacyAddress
+
+
+
public static enum LegacyAddress.P2SHHeader +extends Enum<LegacyAddress.P2SHHeader>
+
Address header of legacy P2SH addresses for standard Bitcoin networks.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static LegacyAddress.P2SHHeader[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static LegacyAddress.P2SHHeader valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      ofNetwork

      +
      public static LegacyAddress.P2SHHeader ofNetwork(BitcoinNetwork network)
      +
      +
      Parameters:
      +
      network - network to find enum for
      +
      Returns:
      +
      the corresponding enum
      +
      +
      +
    • +
    • +
      +

      headerByte

      +
      public int headerByte()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/LegacyAddress.html b/javadoc/0.17-rc1/org/bitcoinj/base/LegacyAddress.html new file mode 100644 index 000000000..bbdd10e95 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/LegacyAddress.html @@ -0,0 +1,612 @@ + + + + +LegacyAddress (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class LegacyAddress

+
+
java.lang.Object +
org.bitcoinj.base.LegacyAddress
+
+
+
+
All Implemented Interfaces:
+
Comparable<Address>, Address
+
+
+
public class LegacyAddress +extends Object +implements Address
+

A Bitcoin address looks like 1MsScoe2fTJoq4ZPdQgqyhgWeoNamYPevy and is derived from an elliptic curve public key + plus a set of network parameters. Not to be confused with a PeerAddress + or AddressMessage which are about network (TCP) addresses.

+ +

A standard address is built by taking the RIPE-MD160 hash of the public key bytes, with a version prefix and a + checksum suffix, then encoding it textually as base58. The version prefix is used to both denote the network for + which the address is valid (see BitcoinNetwork, and also to indicate how the bytes inside the address + should be interpreted. Whilst almost all addresses today are hashes of public keys, another (currently unsupported + type) can contain a hash of a script instead.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      LENGTH

      +
      public static final int LENGTH
      +
      An address is a RIPEMD160 hash of a public key, therefore is always 160 bits or 20 bytes.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      network

      +
      protected final Network network
      +
      +
    • +
    • +
      +

      bytes

      +
      protected final byte[] bytes
      +
      +
    • +
    • +
      +

      p2sh

      +
      public final boolean p2sh
      +
      True if P2SH, false if P2PKH.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/Monetary.html b/javadoc/0.17-rc1/org/bitcoinj/base/Monetary.html new file mode 100644 index 000000000..5efe60b52 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/Monetary.html @@ -0,0 +1,154 @@ + + + + +Monetary (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface Monetary

+
+
+
+
All Known Implementing Classes:
+
Coin, Fiat
+
+
+
public interface Monetary
+
Classes implementing this interface represent a monetary value, such as a Bitcoin or fiat amount.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    long
    + +
    +
    Returns the number of "smallest units" of this monetary value.
    +
    +
    int
    + +
     
    +
    int
    + +
    +
    Returns the absolute value of exponent of the value of a "smallest unit" in scientific notation.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      smallestUnitExponent

      +
      int smallestUnitExponent()
      +
      Returns the absolute value of exponent of the value of a "smallest unit" in scientific notation. For Bitcoin, a + satoshi is worth 1E-8 so this would be 8.
      +
      +
    • +
    • +
      +

      getValue

      +
      long getValue()
      +
      Returns the number of "smallest units" of this monetary value. For Bitcoin, this would be the number of satoshis.
      +
      +
    • +
    • +
      +

      signum

      +
      int signum()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/Network.html b/javadoc/0.17-rc1/org/bitcoinj/base/Network.html new file mode 100644 index 000000000..7b7ecd447 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/Network.html @@ -0,0 +1,263 @@ + + + + +Network (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface Network

+
+
+
+
All Known Implementing Classes:
+
BitcoinNetwork, MockAltNetwork
+
+
+
public interface Network
+
Interface for a generic Bitcoin-like cryptocurrency network. See BitcoinNetwork for the Bitcoin implementation.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    boolean
    + +
    +
    Check if an amount exceeds the maximum allowed for a network (if the network has one)
    +
    +
    boolean
    + +
    +
    Does this network have a fixed maximum number of coins
    +
    + +
    id()
    +
    +
    The dot-seperated string id for this network.
    +
    +
    int
    + +
    +
    Header byte of base58 encoded legacy P2PKH addresses for this network.
    +
    +
    int
    + +
    +
    Header byte of base58 encoded legacy P2SH addresses for this network.
    +
    + + +
    +
    Maximum number of coins for this network as a Monetary value.
    +
    + + +
    +
    Human-readable part (HRP) of bech32 encoded segwit addresses for this network.
    +
    + + +
    +
    The URI scheme for this network.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      id

      +
      String id()
      +
      The dot-seperated string id for this network. For example "org.bitcoin.production"
      +
      +
      Returns:
      +
      String ID for network
      +
      +
      +
    • +
    • +
      +

      legacyAddressHeader

      +
      int legacyAddressHeader()
      +
      Header byte of base58 encoded legacy P2PKH addresses for this network.
      +
      +
      Returns:
      +
      header byte as an int.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      legacyP2SHHeader

      +
      int legacyP2SHHeader()
      +
      Header byte of base58 encoded legacy P2SH addresses for this network.
      +
      +
      Returns:
      +
      header byte as an int.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      segwitAddressHrp

      +
      String segwitAddressHrp()
      +
      Human-readable part (HRP) of bech32 encoded segwit addresses for this network.
      +
      +
      Returns:
      +
      HRP (lowercase)
      +
      +
      +
    • +
    • +
      +

      uriScheme

      +
      String uriScheme()
      +
      The URI scheme for this network. See BitcoinNetwork.uriScheme().
      +
      +
      Returns:
      +
      The URI scheme for this network
      +
      +
      +
    • +
    • +
      +

      hasMaxMoney

      +
      boolean hasMaxMoney()
      +
      Does this network have a fixed maximum number of coins
      +
      +
      Returns:
      +
      true if this network has a fixed maximum number of coins
      +
      +
      +
    • +
    • +
      +

      maxMoney

      +
      Monetary maxMoney()
      +
      Maximum number of coins for this network as a Monetary value. + Where not applicable, a very large number of coins is returned instead (e.g. the main coin issue for Dogecoin).
      +
      +
      Returns:
      +
      Maximum number of coins for this network
      +
      +
      +
    • +
    • +
      +

      exceedsMaxMoney

      +
      boolean exceedsMaxMoney(Monetary monetary)
      +
      Check if an amount exceeds the maximum allowed for a network (if the network has one)
      +
      +
      Parameters:
      +
      monetary - A monetary amount
      +
      Returns:
      +
      true if too big, false if an allowed amount
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/ScriptType.html b/javadoc/0.17-rc1/org/bitcoinj/base/ScriptType.html new file mode 100644 index 000000000..70cef628a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/ScriptType.html @@ -0,0 +1,382 @@ + + + + +ScriptType (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class ScriptType

+
+
java.lang.Object +
java.lang.Enum<ScriptType> +
org.bitcoinj.base.ScriptType
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<ScriptType>, Constable
+
+
+
public enum ScriptType +extends Enum<ScriptType>
+
Supported Bitcoin script types and their script identifier strings. The script identifier string for a ScriptType + is the "human-readable identifier string" of a Script Expression as defined in + BIP 380. + Only the subset of identifier strings defined in + BIP 381 and + BIP 382 map to valid ScriptType instances.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      P2PKH

      +
      public static final ScriptType P2PKH
      +
      +
    • +
    • +
      +

      P2PK

      +
      public static final ScriptType P2PK
      +
      +
    • +
    • +
      +

      P2SH

      +
      public static final ScriptType P2SH
      +
      +
    • +
    • +
      +

      P2WPKH

      +
      public static final ScriptType P2WPKH
      +
      +
    • +
    • +
      +

      P2WSH

      +
      public static final ScriptType P2WSH
      +
      +
    • +
    • +
      +

      P2TR

      +
      public static final ScriptType P2TR
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      id

      +
      @Deprecated +public final int id
      +
      Deprecated. +
      Use numericId() or better yet use id() to get a script identifier string
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static ScriptType[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static ScriptType valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      of

      +
      public static ScriptType of(String id)
      +
      Use this method to create a ScriptType from a known good script identifier string.
      +
      +
      Parameters:
      +
      id - A script identifier string
      +
      Returns:
      +
      the script type
      +
      Throws:
      +
      IllegalArgumentException - if unknown/invalid script identifier string
      +
      +
      +
    • +
    • +
      +

      find

      +
      public static Optional<ScriptType> find(String id)
      +
      Use this method to create a ScriptType from a script identifier string that should be + validated.
      +
      +
      Parameters:
      +
      id - A script identifier string
      +
      Returns:
      +
      A ScriptType-containing Optional or Optional.empty()
      +
      +
      +
    • +
    • +
      +

      id

      +
      public String id()
      +
      Return the script identifier string for this ScriptType. +

      + Be careful: the id() method returns a different type and value than what is in the deprecated id field.

      +
      +
      Returns:
      +
      A script identifier string
      +
      +
      +
    • +
    • +
      +

      numericId

      +
      @Deprecated +public int numericId()
      +
      Deprecated. +
      Using id() to get a script identifier string is preferred.
      +
      +
      This is deprecated. But less deprecated than accessing the id field directly.
      +
      +
      Returns:
      +
      A numeric ID
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/SegwitAddress.SegwitHrp.html b/javadoc/0.17-rc1/org/bitcoinj/base/SegwitAddress.SegwitHrp.html new file mode 100644 index 000000000..24e531586 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/SegwitAddress.SegwitHrp.html @@ -0,0 +1,298 @@ + + + + +SegwitAddress.SegwitHrp (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class SegwitAddress.SegwitHrp

+
+
java.lang.Object +
java.lang.Enum<SegwitAddress.SegwitHrp> +
org.bitcoinj.base.SegwitAddress.SegwitHrp
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<SegwitAddress.SegwitHrp>, Constable
+
+
+
Enclosing class:
+
SegwitAddress
+
+
+
public static enum SegwitAddress.SegwitHrp +extends Enum<SegwitAddress.SegwitHrp>
+
Human-readable part (HRP) of Segwit addresses for standard Bitcoin networks. +

+ See BIP 173 definition of bc and tb HRPs and + Bitcoin Core Issue 1234 - discussion of bcrt HRP for details.

+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static SegwitAddress.SegwitHrp[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static SegwitAddress.SegwitHrp valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      Get the HRP in lowercase. To get uppercase, use Enum.name()
      +
      +
      Overrides:
      +
      toString in class Enum<SegwitAddress.SegwitHrp>
      +
      Returns:
      +
      HRP in lowercase.
      +
      +
      +
    • +
    • +
      +

      of

      +
      public static SegwitAddress.SegwitHrp of(String hrp)
      +
      +
      Parameters:
      +
      hrp - uppercase or lowercase HRP
      +
      Returns:
      +
      the corresponding enum
      +
      Throws:
      +
      IllegalArgumentException - if unknown string
      +
      +
      +
    • +
    • +
      +

      find

      +
      public static Optional<SegwitAddress.SegwitHrp> find(String hrp)
      +
      +
      Parameters:
      +
      hrp - uppercase or lowercase HRP
      +
      Returns:
      +
      Optional containing the corresponding enum or empty if not found
      +
      +
      +
    • +
    • +
      +

      ofNetwork

      +
      public static SegwitAddress.SegwitHrp ofNetwork(BitcoinNetwork network)
      +
      +
      Parameters:
      +
      network - network enum
      +
      Returns:
      +
      the corresponding enum
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/SegwitAddress.html b/javadoc/0.17-rc1/org/bitcoinj/base/SegwitAddress.html new file mode 100644 index 000000000..ef9b9d27d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/SegwitAddress.html @@ -0,0 +1,667 @@ + + + + +SegwitAddress (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SegwitAddress

+
+
java.lang.Object +
org.bitcoinj.base.SegwitAddress
+
+
+
+
All Implemented Interfaces:
+
Comparable<Address>, Address
+
+
+
public class SegwitAddress +extends Object +implements Address
+

Implementation of native segwit addresses. They are composed of two parts:

+ +
    +
  • A human-readable part (HRP) which is a string the specifies the network. See + SegwitAddress.SegwitHrp.
  • +
  • A data part, containing the witness version (encoded as an OP_N operator) and program (encoded by re-arranging + bits into groups of 5).
  • +
+ +

See BIP350 and + BIP173 for details.

+ +

However, you don't need to care about the internals. Use fromBech32(String, Network), + fromHash(org.bitcoinj.base.Network, byte[]) or ECKey.toAddress(ScriptType, Network) + to construct a native segwit address.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      WITNESS_PROGRAM_LENGTH_PKH

      +
      public static final int WITNESS_PROGRAM_LENGTH_PKH
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      WITNESS_PROGRAM_LENGTH_SH

      +
      public static final int WITNESS_PROGRAM_LENGTH_SH
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      WITNESS_PROGRAM_LENGTH_TR

      +
      public static final int WITNESS_PROGRAM_LENGTH_TR
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      WITNESS_PROGRAM_MIN_LENGTH

      +
      public static final int WITNESS_PROGRAM_MIN_LENGTH
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      WITNESS_PROGRAM_MAX_LENGTH

      +
      public static final int WITNESS_PROGRAM_MAX_LENGTH
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      network

      +
      protected final Network network
      +
      +
    • +
    • +
      +

      witnessVersion

      +
      protected final short witnessVersion
      +
      +
    • +
    • +
      +

      witnessProgram

      +
      protected final byte[] witnessProgram
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getWitnessVersion

      +
      public int getWitnessVersion()
      +
      Returns the witness version in decoded form. Only versions 0 and 1 are in use right now.
      +
      +
      Returns:
      +
      witness version, between 0 and 16
      +
      +
      +
    • +
    • +
      +

      getWitnessProgram

      +
      public byte[] getWitnessProgram()
      +
      Returns the witness program in decoded form.
      +
      +
      Returns:
      +
      witness program
      +
      +
      +
    • +
    • +
      +

      getHash

      +
      public byte[] getHash()
      +
      Description copied from interface: Address
      +
      Get either the public key hash or script hash that is encoded in the address.
      +
      +
      Specified by:
      +
      getHash in interface Address
      +
      Returns:
      +
      hash that is encoded in the address
      +
      +
      +
    • +
    • +
      +

      getOutputScriptType

      +
      public ScriptType getOutputScriptType()
      +
      Get the type of output script that will be used for sending to the address. This is either + ScriptType.P2WPKH or ScriptType.P2WSH.
      +
      +
      Specified by:
      +
      getOutputScriptType in interface Address
      +
      Returns:
      +
      type of output script
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      fromBech32

      +
      @Deprecated +public static SegwitAddress fromBech32(@Nullable + NetworkParameters params, + String bech32) + throws AddressFormatException
      +
      Deprecated. + +
      +
      Construct a SegwitAddress from its textual form.
      +
      +
      Parameters:
      +
      params - expected network this address is valid for, or null if the network should be derived from the bech32
      +
      bech32 - bech32-encoded textual form of the address
      +
      Returns:
      +
      constructed address
      +
      Throws:
      +
      AddressFormatException - if something about the given bech32 address isn't right
      +
      +
      +
    • +
    • +
      +

      fromBech32

      +
      public static SegwitAddress fromBech32(String bech32, + @Nonnull + Network network) + throws AddressFormatException
      +
      Construct a SegwitAddress from its textual form.
      +
      +
      Parameters:
      +
      bech32 - bech32-encoded textual form of the address
      +
      network - expected network this address is valid for
      +
      Returns:
      +
      constructed address
      +
      Throws:
      +
      AddressFormatException - if something about the given bech32 address isn't right
      +
      +
      +
    • +
    • +
      +

      fromHash

      +
      @Deprecated +public static SegwitAddress fromHash(NetworkParameters params, + byte[] hash)
      +
      Deprecated. + +
      +
      Construct a SegwitAddress that represents the given hash, which is either a pubkey hash or a script hash. + The resulting address will be either a P2WPKH or a P2WSH type of address.
      +
      +
      Parameters:
      +
      params - network this address is valid for
      +
      hash - 20-byte pubkey hash or 32-byte script hash
      +
      Returns:
      +
      constructed address
      +
      +
      +
    • +
    • +
      +

      fromHash

      +
      public static SegwitAddress fromHash(Network network, + byte[] hash)
      +
      Construct a SegwitAddress that represents the given hash, which is either a pubkey hash or a script hash. + The resulting address will be either a P2WPKH or a P2WSH type of address.
      +
      +
      Parameters:
      +
      network - network this address is valid for
      +
      hash - 20-byte pubkey hash or 32-byte script hash
      +
      Returns:
      +
      constructed address
      +
      +
      +
    • +
    • +
      +

      fromProgram

      +
      @Deprecated +public static SegwitAddress fromProgram(NetworkParameters params, + int witnessVersion, + byte[] witnessProgram)
      + +
      Construct a SegwitAddress that represents the given program, which is either a pubkey, a pubkey hash + or a script hash – depending on the script version. The resulting address will be either a P2WPKH, a P2WSH or + a P2TR type of address.
      +
      +
      Parameters:
      +
      params - network this address is valid for
      +
      witnessVersion - version number between 0 and 16
      +
      witnessProgram - version dependent witness program
      +
      Returns:
      +
      constructed address
      +
      +
      +
    • +
    • +
      +

      fromProgram

      +
      public static SegwitAddress fromProgram(Network network, + int witnessVersion, + byte[] witnessProgram)
      +
      Construct a SegwitAddress that represents the given program, which is either a pubkey, a pubkey hash + or a script hash – depending on the script version. The resulting address will be either a P2WPKH, a P2WSH or + a P2TR type of address.
      +
      +
      Parameters:
      +
      network - network this address is valid for
      +
      witnessVersion - version number between 0 and 16
      +
      witnessProgram - version dependent witness program
      +
      Returns:
      +
      constructed address
      +
      +
      +
    • +
    • +
      +

      fromKey

      +
      @Deprecated +public static SegwitAddress fromKey(NetworkParameters params, + ECKey key)
      + +
      Construct a SegwitAddress that represents the public part of the given ECKey. Note that an + address is derived from a hash of the public key and is not the public key itself.
      +
      +
      Parameters:
      +
      params - network this address is valid for
      +
      key - only the public part is used
      +
      Returns:
      +
      constructed address
      +
      +
      +
    • +
    • +
      +

      network

      +
      public Network network()
      +
      Get the network this address works on. Use of BitcoinNetwork is preferred to use of NetworkParameters + when you need to know what network an address is for.
      +
      +
      Specified by:
      +
      network in interface Address
      +
      Returns:
      +
      the Network.
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      toBech32

      +
      public String toBech32()
      +
      Returns the textual form of the address.
      +
      +
      Returns:
      +
      textual form encoded in bech32
      +
      +
      +
    • +
    • +
      +

      compareTo

      +
      public int compareTo(Address o)
      +
      Comparison field order for addresses is: +
        +
      1. Network.id()
      2. +
      3. Legacy vs. Segwit
      4. +
      5. (Legacy only) Version byte
      6. +
      7. remaining bytes
      8. +
      +

      + Implementations use Address.PARTIAL_ADDRESS_COMPARATOR for tests 1 and 2.

      +
      +
      Specified by:
      +
      compareTo in interface Address
      +
      Specified by:
      +
      compareTo in interface Comparable<Address>
      +
      Parameters:
      +
      o - other Address object
      +
      Returns:
      +
      comparison result
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/Sha256Hash.html b/javadoc/0.17-rc1/org/bitcoinj/base/Sha256Hash.html new file mode 100644 index 000000000..86918cb04 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/Sha256Hash.html @@ -0,0 +1,619 @@ + + + + +Sha256Hash (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Sha256Hash

+
+
java.lang.Object +
org.bitcoinj.base.Sha256Hash
+
+
+
+
All Implemented Interfaces:
+
Comparable<Sha256Hash>
+
+
+
public class Sha256Hash +extends Object +implements Comparable<Sha256Hash>
+
A Sha256Hash wraps a byte[] so that equals(java.lang.Object) and hashCode() work correctly, allowing it to be used as a key in a + map. It also checks that the length is correct (equal to LENGTH) and provides a bit more type safety. +

+ Given that Sha256Hash instances can be created using wrapReversed(byte[]) or twiceOf(byte[]) or by wrapping raw bytes, there is no guarantee that if two Sha256Hash instances are found equal (via equals(Object)) that their preimages would be the same (even in the absence of a hash collision.)

+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static final int
    + +
     
    +
    static final Sha256Hash
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    int
    + +
     
    +
    boolean
    + +
     
    +
    byte[]
    + +
    +
    Returns the internal byte array, without defensively copying.
    +
    +
    byte[]
    + +
    +
    Deprecated. + +
    +
    +
    static byte[]
    +
    hash(byte[] input)
    +
    +
    Calculates the SHA-256 hash of the given bytes.
    +
    +
    static byte[]
    +
    hash(byte[] input, + int offset, + int length)
    +
    +
    Calculates the SHA-256 hash of the given byte range.
    +
    +
    int
    + +
    +
    Returns the last four bytes of the wrapped hash.
    +
    +
    static byte[]
    +
    hashTwice(byte[] input)
    +
    +
    Calculates the SHA-256 hash of the given bytes, + and then hashes the resulting hash again.
    +
    +
    static byte[]
    +
    hashTwice(byte[] input1, + byte[] input2)
    +
    +
    Calculates the hash of hash on the given chunks of bytes.
    +
    +
    static byte[]
    +
    hashTwice(byte[] input, + int offset, + int length)
    +
    +
    Calculates the SHA-256 hash of the given byte range, + and then hashes the resulting hash again.
    +
    +
    static byte[]
    +
    hashTwice(byte[] input1, + int offset1, + int length1, + byte[] input2, + int offset2, + int length2)
    +
    +
    Calculates the hash of hash on the given byte ranges.
    +
    + + +
    +
    Returns a new SHA-256 MessageDigest instance.
    +
    +
    static Sha256Hash
    +
    of(byte[] contents)
    +
    +
    Creates a new instance containing the calculated (one-time) hash of the given bytes.
    +
    +
    static Sha256Hash
    +
    of(File file)
    +
    +
    Creates a new instance containing the calculated (one-time) hash of the given file's contents.
    +
    +
    static Sha256Hash
    + +
    +
    Create a new instance by reading from the given buffer.
    +
    +
    byte[]
    + +
    +
    Allocates a byte array and writes the hash into it, in reversed order.
    +
    + + +
    +
    Returns the bytes interpreted as a positive integer.
    +
    + + +
     
    +
    static Sha256Hash
    +
    twiceOf(byte[] contents)
    +
    +
    Creates a new instance containing the hash of the calculated hash of the given bytes.
    +
    +
    static Sha256Hash
    +
    twiceOf(byte[] content1, + byte[] content2)
    +
    +
    Creates a new instance containing the hash of the calculated hash of the given bytes.
    +
    +
    static Sha256Hash
    +
    wrap(byte[] rawHashBytes)
    +
    +
    Creates a new instance that wraps the given hash value.
    +
    +
    static Sha256Hash
    +
    wrap(String hexString)
    +
    +
    Creates a new instance that wraps the given hash value (represented as a hex string).
    +
    +
    static Sha256Hash
    +
    wrapReversed(byte[] rawHashBytes)
    +
    +
    Creates a new instance that wraps the given hash value, but with byte order reversed.
    +
    + + +
    +
    Write hash into the given buffer.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      LENGTH

      +
      public static final int LENGTH
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      ZERO_HASH

      +
      public static final Sha256Hash ZERO_HASH
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      wrap

      +
      public static Sha256Hash wrap(byte[] rawHashBytes)
      +
      Creates a new instance that wraps the given hash value.
      +
      +
      Parameters:
      +
      rawHashBytes - the raw hash bytes to wrap
      +
      Returns:
      +
      a new instance
      +
      Throws:
      +
      IllegalArgumentException - if the given array length is not exactly 32
      +
      +
      +
    • +
    • +
      +

      wrap

      +
      public static Sha256Hash wrap(String hexString)
      +
      Creates a new instance that wraps the given hash value (represented as a hex string).
      +
      +
      Parameters:
      +
      hexString - a hash value represented as a hex string
      +
      Returns:
      +
      a new instance
      +
      Throws:
      +
      IllegalArgumentException - if the given string is not a valid + hex string, or if it does not represent exactly 32 bytes
      +
      +
      +
    • +
    • +
      +

      wrapReversed

      +
      public static Sha256Hash wrapReversed(byte[] rawHashBytes)
      +
      Creates a new instance that wraps the given hash value, but with byte order reversed.
      +
      +
      Parameters:
      +
      rawHashBytes - the raw hash bytes to wrap
      +
      Returns:
      +
      a new instance
      +
      Throws:
      +
      IllegalArgumentException - if the given array length is not exactly 32
      +
      +
      +
    • +
    • +
      +

      read

      +
      public static Sha256Hash read(ByteBuffer buf) + throws BufferUnderflowException
      +
      Create a new instance by reading from the given buffer.
      +
      +
      Parameters:
      +
      buf - buffer to read from
      +
      Returns:
      +
      a new instance
      +
      Throws:
      +
      BufferUnderflowException - if the read hash extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      of

      +
      public static Sha256Hash of(byte[] contents)
      +
      Creates a new instance containing the calculated (one-time) hash of the given bytes.
      +
      +
      Parameters:
      +
      contents - the bytes on which the hash value is calculated
      +
      Returns:
      +
      a new instance containing the calculated (one-time) hash
      +
      +
      +
    • +
    • +
      +

      twiceOf

      +
      public static Sha256Hash twiceOf(byte[] contents)
      +
      Creates a new instance containing the hash of the calculated hash of the given bytes.
      +
      +
      Parameters:
      +
      contents - the bytes on which the hash value is calculated
      +
      Returns:
      +
      a new instance containing the calculated (two-time) hash
      +
      +
      +
    • +
    • +
      +

      twiceOf

      +
      public static Sha256Hash twiceOf(byte[] content1, + byte[] content2)
      +
      Creates a new instance containing the hash of the calculated hash of the given bytes.
      +
      +
      Parameters:
      +
      content1 - first bytes on which the hash value is calculated
      +
      content2 - second bytes on which the hash value is calculated
      +
      Returns:
      +
      a new instance containing the calculated (two-time) hash
      +
      +
      +
    • +
    • +
      +

      of

      +
      public static Sha256Hash of(File file) + throws IOException
      +
      Creates a new instance containing the calculated (one-time) hash of the given file's contents. + + The file contents are read fully into memory, so this method should only be used with small files.
      +
      +
      Parameters:
      +
      file - the file on which the hash value is calculated
      +
      Returns:
      +
      a new instance containing the calculated (one-time) hash
      +
      Throws:
      +
      IOException - if an error occurs while reading the file
      +
      +
      +
    • +
    • +
      +

      newDigest

      +
      public static MessageDigest newDigest()
      +
      Returns a new SHA-256 MessageDigest instance. + + This is a convenience method which wraps the checked + exception that can never occur with a RuntimeException.
      +
      +
      Returns:
      +
      a new SHA-256 MessageDigest instance
      +
      +
      +
    • +
    • +
      +

      hash

      +
      public static byte[] hash(byte[] input)
      +
      Calculates the SHA-256 hash of the given bytes.
      +
      +
      Parameters:
      +
      input - the bytes to hash
      +
      Returns:
      +
      the hash (in big-endian order)
      +
      +
      +
    • +
    • +
      +

      hash

      +
      public static byte[] hash(byte[] input, + int offset, + int length)
      +
      Calculates the SHA-256 hash of the given byte range.
      +
      +
      Parameters:
      +
      input - the array containing the bytes to hash
      +
      offset - the offset within the array of the bytes to hash
      +
      length - the number of bytes to hash
      +
      Returns:
      +
      the hash (in big-endian order)
      +
      +
      +
    • +
    • +
      +

      hashTwice

      +
      public static byte[] hashTwice(byte[] input)
      +
      Calculates the SHA-256 hash of the given bytes, + and then hashes the resulting hash again.
      +
      +
      Parameters:
      +
      input - the bytes to hash
      +
      Returns:
      +
      the double-hash (in big-endian order)
      +
      +
      +
    • +
    • +
      +

      hashTwice

      +
      public static byte[] hashTwice(byte[] input1, + byte[] input2)
      +
      Calculates the hash of hash on the given chunks of bytes. This is equivalent to concatenating the two + chunks and then passing the result to hashTwice(byte[]).
      +
      +
    • +
    • +
      +

      hashTwice

      +
      public static byte[] hashTwice(byte[] input, + int offset, + int length)
      +
      Calculates the SHA-256 hash of the given byte range, + and then hashes the resulting hash again.
      +
      +
      Parameters:
      +
      input - the array containing the bytes to hash
      +
      offset - the offset within the array of the bytes to hash
      +
      length - the number of bytes to hash
      +
      Returns:
      +
      the double-hash (in big-endian order)
      +
      +
      +
    • +
    • +
      +

      hashTwice

      +
      public static byte[] hashTwice(byte[] input1, + int offset1, + int length1, + byte[] input2, + int offset2, + int length2)
      +
      Calculates the hash of hash on the given byte ranges. This is equivalent to + concatenating the two ranges and then passing the result to hashTwice(byte[]).
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      Returns the last four bytes of the wrapped hash. This should be unique enough to be a suitable hash code even for + blocks, where the goal is to try and get the first bytes to be zeros (i.e. the value as a big integer lower + than the target value).
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      toBigInteger

      +
      public BigInteger toBigInteger()
      +
      Returns the bytes interpreted as a positive integer.
      +
      +
    • +
    • +
      +

      getBytes

      +
      public byte[] getBytes()
      +
      Returns the internal byte array, without defensively copying. Therefore do NOT modify the returned array.
      +
      +
    • +
    • +
      +

      serialize

      +
      public byte[] serialize()
      +
      Allocates a byte array and writes the hash into it, in reversed order.
      +
      +
      Returns:
      +
      byte array containing the hash
      +
      +
      +
    • +
    • +
      +

      getReversedBytes

      +
      @Deprecated +public byte[] getReversedBytes()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      write

      +
      public ByteBuffer write(ByteBuffer buf) + throws BufferOverflowException
      +
      Write hash into the given buffer.
      +
      +
      Parameters:
      +
      buf - buffer to write into
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the hash doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      compareTo

      +
      public int compareTo(Sha256Hash other)
      +
      +
      Specified by:
      +
      compareTo in interface Comparable<Sha256Hash>
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/VarInt.html b/javadoc/0.17-rc1/org/bitcoinj/base/VarInt.html new file mode 100644 index 000000000..3b149a0ea --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/VarInt.html @@ -0,0 +1,405 @@ + + + + +VarInt (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class VarInt

+
+
java.lang.Object +
org.bitcoinj.base.VarInt
+
+
+
+
public class VarInt +extends Object
+
A variable-length encoded unsigned integer using Satoshi's encoding (a.k.a. "CompactSize").
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    VarInt(byte[] buf, + int offset)
    +
    +
    Deprecated. + +
    +
    +
    VarInt(long value)
    +
    +
    Deprecated. + +
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    boolean
    + +
     
    +
    boolean
    + +
    +
    Determine if the value would fit an int, i.e.
    +
    +
    int
    + +
    +
    Returns the original number of bytes used to encode the value if it was + deserialized from a byte array, or the minimum encoded size if it was not.
    +
    +
    final int
    + +
    +
    Returns the minimum encoded size of the value.
    +
    +
    int
    + +
     
    +
    int
    + +
    +
    Gets the value as an unsigned int in the range of 0 to Integer.MAX_VALUE.
    +
    +
    long
    + +
    +
    Gets the value as a long.
    +
    +
    static VarInt
    +
    of(long value)
    +
    +
    Constructs a new VarInt with the given unsigned long value.
    +
    +
    static VarInt
    +
    ofBytes(byte[] buf, + int offset)
    +
    +
    Constructs a new VarInt with the value parsed from the specified offset of the given buffer.
    +
    +
    static VarInt
    + +
    +
    Constructs a new VarInt by reading from the given buffer.
    +
    +
    byte[]
    + +
    +
    Allocates a byte array and serializes the value into its minimal representation.
    +
    +
    static int
    +
    sizeOf(long value)
    +
    +
    Returns the minimum encoded size of the given unsigned long value.
    +
    + + +
     
    + + +
    +
    Write encoded value into the given buffer.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      of

      +
      public static VarInt of(long value)
      +
      Constructs a new VarInt with the given unsigned long value.
      +
      +
      Parameters:
      +
      value - the unsigned long value (beware widening conversion of negatives!)
      +
      +
      +
    • +
    • +
      +

      ofBytes

      +
      public static VarInt ofBytes(byte[] buf, + int offset) + throws ArrayIndexOutOfBoundsException
      +
      Constructs a new VarInt with the value parsed from the specified offset of the given buffer.
      +
      +
      Parameters:
      +
      buf - the buffer containing the value
      +
      offset - the offset of the value
      +
      Throws:
      +
      ArrayIndexOutOfBoundsException - if offset points outside of the buffer, or + if the value doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      read

      +
      public static VarInt read(ByteBuffer buf) + throws BufferUnderflowException
      +
      Constructs a new VarInt by reading from the given buffer.
      +
      +
      Parameters:
      +
      buf - buffer to read from
      +
      Throws:
      +
      BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      longValue

      +
      public long longValue()
      +
      Gets the value as a long. For values greater than Long.MAX_VALUE the returned long + will be negative. It is still to be interpreted as an unsigned value.
      +
      +
      Returns:
      +
      value as a long
      +
      +
      +
    • +
    • +
      +

      fitsInt

      +
      public boolean fitsInt()
      +
      Determine if the value would fit an int, i.e. it is in the range of 0 to Integer.MAX_VALUE. + If this is true, it's safe to call intValue().
      +
      +
      Returns:
      +
      true if the value fits an int, false otherwise
      +
      +
      +
    • +
    • +
      +

      intValue

      +
      public int intValue() + throws ArithmeticException
      +
      Gets the value as an unsigned int in the range of 0 to Integer.MAX_VALUE.
      +
      +
      Returns:
      +
      value as an unsigned int
      +
      Throws:
      +
      ArithmeticException - if the value doesn't fit an int
      +
      +
      +
    • +
    • +
      +

      getOriginalSizeInBytes

      +
      public int getOriginalSizeInBytes()
      +
      Returns the original number of bytes used to encode the value if it was + deserialized from a byte array, or the minimum encoded size if it was not.
      +
      +
    • +
    • +
      +

      getSizeInBytes

      +
      public final int getSizeInBytes()
      +
      Returns the minimum encoded size of the value.
      +
      +
    • +
    • +
      +

      sizeOf

      +
      public static int sizeOf(long value)
      +
      Returns the minimum encoded size of the given unsigned long value.
      +
      +
      Parameters:
      +
      value - the unsigned long value (beware widening conversion of negatives!)
      +
      +
      +
    • +
    • +
      +

      serialize

      +
      public byte[] serialize()
      +
      Allocates a byte array and serializes the value into its minimal representation.
      +
      +
      Returns:
      +
      the minimal encoded bytes of the value
      +
      +
      +
    • +
    • +
      +

      write

      +
      public ByteBuffer write(ByteBuffer buf) + throws BufferOverflowException
      +
      Write encoded value into the given buffer.
      +
      +
      Parameters:
      +
      buf - buffer to write into
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the value doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.InvalidCharacter.html b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.InvalidCharacter.html new file mode 100644 index 000000000..562c53594 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.InvalidCharacter.html @@ -0,0 +1,208 @@ + + + + +AddressFormatException.InvalidCharacter (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AddressFormatException.InvalidCharacter

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
AddressFormatException
+
+
+
public static class AddressFormatException.InvalidCharacter +extends AddressFormatException
+
This exception is thrown by Base58, Bech32 and the EncodedPrivateKey hierarchy of + classes when you try to decode data and a character isn't valid. You shouldn't allow the user to proceed in this + case.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      character

      +
      public final char character
      +
      +
    • +
    • +
      +

      position

      +
      public final int position
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidCharacter

      +
      public InvalidCharacter(char character, + int position)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.InvalidChecksum.html b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.InvalidChecksum.html new file mode 100644 index 000000000..24a067416 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.InvalidChecksum.html @@ -0,0 +1,176 @@ + + + + +AddressFormatException.InvalidChecksum (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AddressFormatException.InvalidChecksum

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
AddressFormatException
+
+
+
public static class AddressFormatException.InvalidChecksum +extends AddressFormatException
+
This exception is thrown by Base58, Bech32 and the EncodedPrivateKey hierarchy of + classes when you try to decode data and the checksum isn't valid. You shouldn't allow the user to proceed in this + case.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidChecksum

      +
      public InvalidChecksum()
      +
      +
    • +
    • +
      +

      InvalidChecksum

      +
      public InvalidChecksum(String message)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.InvalidDataLength.html b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.InvalidDataLength.html new file mode 100644 index 000000000..89fd72539 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.InvalidDataLength.html @@ -0,0 +1,176 @@ + + + + +AddressFormatException.InvalidDataLength (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AddressFormatException.InvalidDataLength

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
AddressFormatException
+
+
+
public static class AddressFormatException.InvalidDataLength +extends AddressFormatException
+
This exception is thrown by Base58, Bech32 and the EncodedPrivateKey hierarchy of + classes when you try to decode data and the data isn't of the right size. You shouldn't allow the user to proceed + in this case.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidDataLength

      +
      public InvalidDataLength()
      +
      +
    • +
    • +
      +

      InvalidDataLength

      +
      public InvalidDataLength(String message)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.InvalidPrefix.html b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.InvalidPrefix.html new file mode 100644 index 000000000..92e4e6097 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.InvalidPrefix.html @@ -0,0 +1,180 @@ + + + + +AddressFormatException.InvalidPrefix (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AddressFormatException.InvalidPrefix

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
AddressFormatException.WrongNetwork
+
+
+
Enclosing class:
+
AddressFormatException
+
+
+
public static class AddressFormatException.InvalidPrefix +extends AddressFormatException
+
This exception is thrown by the EncodedPrivateKey hierarchy of classes when you try and decode an + address or private key with an invalid prefix (version header or human-readable part). You shouldn't allow the + user to proceed in this case.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidPrefix

      +
      public InvalidPrefix()
      +
      +
    • +
    • +
      +

      InvalidPrefix

      +
      public InvalidPrefix(String message)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.UnexpectedWitnessVersion.html b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.UnexpectedWitnessVersion.html new file mode 100644 index 000000000..08cb7d876 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.UnexpectedWitnessVersion.html @@ -0,0 +1,175 @@ + + + + +AddressFormatException.UnexpectedWitnessVersion (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AddressFormatException.UnexpectedWitnessVersion

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
AddressFormatException
+
+
+
public static class AddressFormatException.UnexpectedWitnessVersion +extends AddressFormatException
+
This exception is thrown by SegwitAddress when you try to decode data and the witness version doesn't + match the Bech32 encoding as per BIP350. You shouldn't allow the user to proceed in this case.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      UnexpectedWitnessVersion

      +
      public UnexpectedWitnessVersion()
      +
      +
    • +
    • +
      +

      UnexpectedWitnessVersion

      +
      public UnexpectedWitnessVersion(String message)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.WrongNetwork.html b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.WrongNetwork.html new file mode 100644 index 000000000..e55495c66 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.WrongNetwork.html @@ -0,0 +1,179 @@ + + + + +AddressFormatException.WrongNetwork (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AddressFormatException.WrongNetwork

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
AddressFormatException
+
+
+
public static class AddressFormatException.WrongNetwork +extends AddressFormatException.InvalidPrefix
+
This exception is thrown by the EncodedPrivateKey hierarchy of classes when you try and decode an + address with a prefix (version header or human-readable part) that used by another network (usually: mainnet vs + testnet). You shouldn't allow the user to proceed in this case as they are trying to send money across different + chains, an operation that is guaranteed to destroy the money.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WrongNetwork

      +
      public WrongNetwork(int versionHeader)
      +
      +
    • +
    • +
      +

      WrongNetwork

      +
      public WrongNetwork(String hrp)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.html b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.html new file mode 100644 index 000000000..7cbdfe98d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/AddressFormatException.html @@ -0,0 +1,211 @@ + + + + +AddressFormatException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AddressFormatException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
AddressFormatException.InvalidCharacter, AddressFormatException.InvalidChecksum, AddressFormatException.InvalidDataLength, AddressFormatException.InvalidPrefix, AddressFormatException.UnexpectedWitnessVersion
+
+
+
public class AddressFormatException +extends IllegalArgumentException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AddressFormatException

      +
      public AddressFormatException()
      +
      +
    • +
    • +
      +

      AddressFormatException

      +
      public AddressFormatException(String message)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/package-summary.html new file mode 100644 index 000000000..4d580c199 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/package-summary.html @@ -0,0 +1,130 @@ + + + + +org.bitcoinj.base.exceptions (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.base.exceptions

+
+
+
package org.bitcoinj.base.exceptions
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/package-tree.html new file mode 100644 index 000000000..67846ef10 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/exceptions/package-tree.html @@ -0,0 +1,99 @@ + + + + +org.bitcoinj.base.exceptions Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.base.exceptions

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/Buffers.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/Buffers.html new file mode 100644 index 000000000..7ac4c7d9b --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/Buffers.html @@ -0,0 +1,292 @@ + + + + +Buffers (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Buffers

+
+
java.lang.Object +
org.bitcoinj.base.internal.Buffers
+
+
+
+
public class Buffers +extends Object
+
Utility methods for common operations on Bitcoin P2P message buffers.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Buffers

      +
      public Buffers()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      readBytes

      +
      public static byte[] readBytes(ByteBuffer buf, + int length) + throws BufferUnderflowException
      +
      Read given number of bytes from the buffer.
      +
      +
      Parameters:
      +
      buf - buffer to read from
      +
      length - number of bytes to read
      +
      Returns:
      +
      bytes read
      +
      Throws:
      +
      BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      readLengthPrefixedBytes

      +
      public static byte[] readLengthPrefixedBytes(ByteBuffer buf) + throws BufferUnderflowException
      +
      First read a VarInt from the buffer and use it to determine the number of bytes to be read. Then read + that many bytes into the byte array to be returned. This construct is frequently used by Bitcoin protocols.
      +
      +
      Parameters:
      +
      buf - buffer to read from
      +
      Returns:
      +
      read bytes
      +
      Throws:
      +
      BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      writeLengthPrefixedBytes

      +
      public static ByteBuffer writeLengthPrefixedBytes(ByteBuffer buf, + byte[] bytes) + throws BufferOverflowException
      +
      First write the length of the byte array as a VarInt. Then write the array contents.
      +
      +
      Parameters:
      +
      buf - buffer to write to
      +
      bytes - bytes to write
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the value doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      readLengthPrefixedString

      +
      public static String readLengthPrefixedString(ByteBuffer buf) + throws BufferUnderflowException
      +
      First read a VarInt from the buffer and use it to determine the number of bytes to read. Then read + that many bytes and interpret it as an UTF-8 encoded string to be returned. This construct is frequently used + by Bitcoin protocols.
      +
      +
      Parameters:
      +
      buf - buffer to read from
      +
      Returns:
      +
      read string
      +
      Throws:
      +
      BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      writeLengthPrefixedString

      +
      public static ByteBuffer writeLengthPrefixedString(ByteBuffer buf, + String str) + throws BufferOverflowException
      +
      Encode a given string using UTF-8. Then write the length of the encoded bytes as a VarInt. Then write + the bytes themselves.
      +
      +
      Parameters:
      +
      buf - buffer to write to
      +
      str - string to write
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the value doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      skipBytes

      +
      public static ByteBuffer skipBytes(ByteBuffer buf, + int numBytes) + throws BufferUnderflowException
      +
      Advance buffer position by a given number of bytes.
      +
      +
      Parameters:
      +
      buf - buffer to skip bytes on
      +
      numBytes - number of bytes to skip
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/ByteArray.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/ByteArray.html new file mode 100644 index 000000000..8567185ca --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/ByteArray.html @@ -0,0 +1,269 @@ + + + + +ByteArray (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ByteArray

+
+
java.lang.Object +
org.bitcoinj.base.internal.ByteArray
+
+
+
+
All Implemented Interfaces:
+
Comparable<ByteArray>
+
+
+
Direct Known Subclasses:
+
AesKey, Bech32.Bech32Bytes
+
+
+
public class ByteArray +extends Object +implements Comparable<ByteArray>
+
An effectively-immutable byte array.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      bytes

      +
      protected final byte[] bytes
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ByteArray

      +
      public ByteArray(byte[] bytes)
      +
      Wrapper for a byte[]
      +
      +
      Parameters:
      +
      bytes - byte data to wrap
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      bytes

      +
      public byte[] bytes()
      +
      +
      Returns:
      +
      the key bytes
      +
      +
      +
    • +
    • +
      +

      formatHex

      +
      public String formatHex()
      +
      +
      Returns:
      +
      the bytes as a hex-formatted string
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      Returns:
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      Parameters:
      +
      o -
      +
      Returns:
      +
      +
      +
    • +
    • +
      +

      compareTo

      +
      public int compareTo(ByteArray o)
      +
      +

      For ByteArray this is a byte-by-byte, unsigned comparison.

      +
      +
      Specified by:
      +
      compareTo in interface Comparable<ByteArray>
      +
      Parameters:
      +
      o -
      +
      Returns:
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/ByteUtils.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/ByteUtils.html new file mode 100644 index 000000000..890eb5444 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/ByteUtils.html @@ -0,0 +1,1116 @@ + + + + +ByteUtils (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ByteUtils

+
+
java.lang.Object +
org.bitcoinj.base.internal.ByteUtils
+
+
+
+
public class ByteUtils +extends Object
+
Utility methods for bit, byte, and integer manipulation and conversion. Most of these were moved here + from org.bitcoinj.core.Utils.
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static final com.google.common.io.BaseEncoding
    + +
    +
    Deprecated. +
    Use hexFormat or parseHex(String) or other available + options.
    +
    +
    +
    static final long
    + +
    +
    Maximum unsigned value that can be expressed by 32 bits.
    +
    +
    static final int
    + +
    +
    Maximum unsigned value that can be expressed by 16 bits.
    +
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static Comparator<byte[]>
    + +
    +
    Provides a byte array comparator.
    +
    +
    static byte[]
    +
    bigIntegerToBytes(BigInteger b, + int numBytes)
    +
    +
    + The built-in BigInteger.toByteArray() includes the sign bit of the number and + may result in an extra byte in cases of unsigned data.
    +
    +
    static BigInteger
    +
    bytesToBigInteger(byte[] bytes)
    +
    +
    Converts an array of bytes into a positive BigInteger.
    +
    +
    static boolean
    +
    checkBitLE(byte[] data, + int index)
    +
    +
    Checks if the given bit is set in data, using little endian (not the same as Java native big endian)
    +
    +
    static byte[]
    +
    concat(byte[] b1, + byte[] b2)
    +
    +
    Concatenate two byte arrays
    +
    +
    static BigInteger
    +
    decodeCompactBits(long compact)
    +
    +
    The "compact" format is a representation of a whole number N using an unsigned 32 bit number similar to a + floating point format.
    +
    +
    static BigInteger
    +
    decodeMPI(byte[] mpi, + boolean hasLength)
    +
    +
    MPI encoded numbers are produced by the OpenSSL BN_bn2mpi function.
    +
    +
    static long
    + +
     
    +
    static byte[]
    +
    encodeMPI(BigInteger value, + boolean includeLength)
    +
    +
    MPI encoded numbers are produced by the OpenSSL BN_bn2mpi function.
    +
    +
    static String
    +
    formatHex(byte[] bytes)
    +
     
    +
    static byte[]
    +
    parseHex(String string)
    +
     
    +
    static int
    + +
    +
    Read 4 bytes from the byte array (starting at the offset) as signed 32-bit integer in little endian format.
    +
    +
    static long
    +
    readInt64(byte[] bytes, + int offset)
    +
    +
    Read 8 bytes from the byte array (starting at the offset) as signed 64-bit integer in little endian format.
    +
    +
    static long
    + +
    +
    Read 8 bytes from the buffer as signed 64-bit integer in little endian format.
    +
    +
    static int
    +
    readUint16(byte[] bytes, + int offset)
    +
    +
    Read 2 bytes from the byte array (starting at the offset) as unsigned 16-bit integer in little endian format.
    +
    +
    static int
    + +
    +
    Read 2 bytes from the stream as unsigned 16-bit integer in little endian format.
    +
    +
    static int
    + +
    +
    Read 2 bytes from the buffer as unsigned 16-bit integer in little endian format.
    +
    +
    static int
    +
    readUint16BE(byte[] bytes, + int offset)
    +
    +
    Read 2 bytes from the byte array (starting at the offset) as unsigned 16-bit integer in big endian format.
    +
    +
    static int
    + +
    +
    Read 2 bytes from the buffer as unsigned 16-bit integer in big endian format.
    +
    +
    static long
    +
    readUint32(byte[] bytes, + int offset)
    +
    +
    Read 4 bytes from the byte array (starting at the offset) as unsigned 32-bit integer in little endian format.
    +
    +
    static long
    + +
    +
    Read 4 bytes from the stream as unsigned 32-bit integer in little endian format.
    +
    +
    static long
    + +
    +
    Read 4 bytes from the buffer as unsigned 32-bit integer in little endian format.
    +
    +
    static long
    +
    readUint32BE(byte[] bytes, + int offset)
    +
    +
    Read 4 bytes from the byte array (starting at the offset) as unsigned 32-bit integer in big endian format.
    +
    +
    static long
    + +
    +
    Read 4 bytes from the buffer as unsigned 32-bit integer in big endian format.
    +
    +
    static byte[]
    +
    reverseBytes(byte[] bytes)
    +
    +
    Returns a copy of the given byte array in reverse order.
    +
    +
    static void
    +
    setBitLE(byte[] data, + int index)
    +
    +
    Sets the given bit in data to one, using little endian (not the same as Java native big endian)
    +
    +
    static void
    +
    writeInt16BE(int val, + OutputStream stream)
    +
    +
    Write a 16-bit integer to a given output stream in big-endian format.
    +
    +
    static ByteBuffer
    +
    writeInt16BE(int val, + ByteBuffer buf)
    +
    +
    Write a 16-bit integer to a given buffer in big-endian format.
    +
    +
    static void
    +
    writeInt16LE(int val, + OutputStream stream)
    +
    +
    Write a 16-bit integer to a given output stream in little-endian format.
    +
    +
    static ByteBuffer
    +
    writeInt16LE(int val, + ByteBuffer buf)
    +
    +
    Write a 16-bit integer to a given buffer in little-endian format.
    +
    +
    static void
    +
    writeInt32BE(int val, + byte[] out, + int offset)
    +
    +
    Write a 32-bit integer to a given byte array in big-endian format, starting at a given offset.
    +
    +
    static void
    +
    writeInt32BE(int val, + OutputStream stream)
    +
    +
    Write a 32-bit integer to a given output stream in big-endian format.
    +
    +
    static ByteBuffer
    +
    writeInt32BE(int val, + ByteBuffer buf)
    +
    +
    Write a 32-bit integer to a given buffer in big-endian format.
    +
    +
    static void
    +
    writeInt32LE(int val, + OutputStream stream)
    +
    +
    Write a 32-bit integer to a given output stream in little-endian format.
    +
    +
    static ByteBuffer
    +
    writeInt32LE(int val, + ByteBuffer buf)
    +
    +
    Write a 32-bit integer to a given buffer in little-endian format.
    +
    +
    static void
    +
    writeInt32LE(long val, + byte[] out, + int offset)
    +
    +
    Write a 32-bit integer to a given byte array in little-endian format, starting at a given offset.
    +
    +
    static void
    +
    writeInt32LE(long val, + OutputStream stream)
    +
    +
    Write a 32-bit integer to a given output stream in little-endian format.
    +
    +
    static ByteBuffer
    +
    writeInt32LE(long val, + ByteBuffer buf)
    +
    +
    Write a 32-bit integer to a given buffer in little-endian format.
    +
    +
    static void
    +
    writeInt64LE(long val, + byte[] out, + int offset)
    +
    +
    Write a 64-bit integer to a given byte array in little-endian format, starting at a given offset.
    +
    +
    static void
    +
    writeInt64LE(long val, + OutputStream stream)
    +
    +
    Write a 64-bit integer to a given output stream in little-endian format.
    +
    +
    static ByteBuffer
    +
    writeInt64LE(long val, + ByteBuffer buf)
    +
    +
    Write a 64-bit integer to a given buffer in little-endian format.
    +
    +
    static void
    + +
    +
    Write a 64-bit integer to a given output stream in little-endian format.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      MAX_UNSIGNED_SHORT

      +
      public static final int MAX_UNSIGNED_SHORT
      +
      Maximum unsigned value that can be expressed by 16 bits.
      +
      +
    • +
    • +
      +

      MAX_UNSIGNED_INTEGER

      +
      public static final long MAX_UNSIGNED_INTEGER
      +
      Maximum unsigned value that can be expressed by 32 bits.
      +
      +
    • +
    • +
      +

      HEX

      +
      @Deprecated +public static final com.google.common.io.BaseEncoding HEX
      +
      Deprecated. +
      Use hexFormat or parseHex(String) or other available + options.
      +
      +
      Hex encoding used throughout the framework. Use with ByteUtils.formatHex(byte[]) or ByteUtils.parseHex(CharSequence).
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ByteUtils

      +
      public ByteUtils()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      formatHex

      +
      public static String formatHex(byte[] bytes)
      +
      +
    • +
    • +
      +

      parseHex

      +
      public static byte[] parseHex(String string)
      +
      +
    • +
    • +
      +

      bigIntegerToBytes

      +
      public static byte[] bigIntegerToBytes(BigInteger b, + int numBytes)
      +

      + The built-in BigInteger.toByteArray() includes the sign bit of the number and + may result in an extra byte in cases of unsigned data. This method removes this extra byte. +

      +

      + Assuming only positive numbers, it's possible to tell if an extra byte + was added by checking if the first element of the array is 0 (0000_0000). + Due to the guarantee of a minimal representation provided by BigInteger, we know that the sign bit + will be the least significant bit 0000_0000 of a zero-value first byte. + Otherwise the representation would not be minimal. +

      + This is the inverse of bytesToBigInteger(byte[]).
      +
      +
      Parameters:
      +
      b - the non-negative integer to format into a byte array
      +
      numBytes - the maximum allowed size of the resulting byte array
      +
      Returns:
      +
      byte array of max length numBytes
      +
      +
      +
    • +
    • +
      +

      bytesToBigInteger

      +
      public static BigInteger bytesToBigInteger(byte[] bytes)
      +
      Converts an array of bytes into a positive BigInteger. This is the inverse of + bigIntegerToBytes(BigInteger, int).
      +
      +
      Parameters:
      +
      bytes - to convert into a BigInteger
      +
      Returns:
      +
      the converted BigInteger
      +
      +
      +
    • +
    • +
      +

      writeInt16LE

      +
      public static ByteBuffer writeInt16LE(int val, + ByteBuffer buf) + throws BufferOverflowException
      +
      Write a 16-bit integer to a given buffer in little-endian format. +

      + The value is expected as an unsigned int as per the Java Unsigned Integer API.

      +
      +
      Parameters:
      +
      val - value to be written
      +
      buf - buffer to be written into
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the value doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      writeInt16BE

      +
      public static ByteBuffer writeInt16BE(int val, + ByteBuffer buf) + throws BufferOverflowException
      +
      Write a 16-bit integer to a given buffer in big-endian format. +

      + The value is expected as an unsigned int as per the Java Unsigned Integer API.

      +
      +
      Parameters:
      +
      val - value to be written
      +
      buf - buffer to be written into
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the value doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      writeInt32LE

      +
      public static ByteBuffer writeInt32LE(int val, + ByteBuffer buf) + throws BufferOverflowException
      +
      Write a 32-bit integer to a given buffer in little-endian format. +

      + The value is expected as a signed or unsigned int. If you've got an unsigned long as per the + Java Unsigned Integer API, use writeInt32LE(long, ByteBuffer).

      +
      +
      Parameters:
      +
      val - value to be written
      +
      buf - buffer to be written into
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the value doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      writeInt32LE

      +
      public static ByteBuffer writeInt32LE(long val, + ByteBuffer buf) + throws BufferOverflowException
      +
      Write a 32-bit integer to a given buffer in little-endian format. +

      + The value is expected as an unsigned long as per the Java Unsigned Integer API.

      +
      +
      Parameters:
      +
      val - value to be written
      +
      buf - buffer to be written into
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the value doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      writeInt32LE

      +
      public static void writeInt32LE(long val, + byte[] out, + int offset) + throws ArrayIndexOutOfBoundsException
      +
      Write a 32-bit integer to a given byte array in little-endian format, starting at a given offset. +

      + The value is expected as an unsigned long as per the Java Unsigned Integer API.

      +
      +
      Parameters:
      +
      val - value to be written
      +
      out - buffer to be written into
      +
      offset - offset into the buffer
      +
      Throws:
      +
      ArrayIndexOutOfBoundsException - if offset points outside of the buffer, or + if the value doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      writeInt32BE

      +
      public static ByteBuffer writeInt32BE(int val, + ByteBuffer buf) + throws BufferOverflowException
      +
      Write a 32-bit integer to a given buffer in big-endian format. +

      + The value is expected as a signed or unsigned int.

      +
      +
      Parameters:
      +
      val - value to be written
      +
      buf - buffer to be written into
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the value doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      writeInt32BE

      +
      public static void writeInt32BE(int val, + byte[] out, + int offset) + throws ArrayIndexOutOfBoundsException
      +
      Write a 32-bit integer to a given byte array in big-endian format, starting at a given offset. +

      + The value is expected as a signed or unsigned int.

      +
      +
      Parameters:
      +
      val - value to be written
      +
      out - buffer to be written into
      +
      offset - offset into the buffer
      +
      Throws:
      +
      ArrayIndexOutOfBoundsException - if offset points outside of the buffer, or + if the value doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      writeInt64LE

      +
      public static ByteBuffer writeInt64LE(long val, + ByteBuffer buf) + throws BufferOverflowException
      +
      Write a 64-bit integer to a given buffer in little-endian format. +

      + The value is expected as a signed or unsigned long.

      +
      +
      Parameters:
      +
      val - value to be written
      +
      buf - buffer to be written into
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the value doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      writeInt64LE

      +
      public static void writeInt64LE(long val, + byte[] out, + int offset) + throws ArrayIndexOutOfBoundsException
      +
      Write a 64-bit integer to a given byte array in little-endian format, starting at a given offset. +

      + The value is expected as a signed or unsigned long.

      +
      +
      Parameters:
      +
      val - value to be written
      +
      out - buffer to be written into
      +
      offset - offset into the buffer
      +
      Throws:
      +
      ArrayIndexOutOfBoundsException - if offset points outside of the buffer, or + if the value doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      writeInt16LE

      +
      public static void writeInt16LE(int val, + OutputStream stream) + throws IOException
      +
      Write a 16-bit integer to a given output stream in little-endian format. +

      + The value is expected as an unsigned int as per the Java Unsigned Integer API.

      +
      +
      Parameters:
      +
      val - value to be written
      +
      stream - stream to be written into
      +
      Throws:
      +
      IOException - if an I/O error occurs
      +
      +
      +
    • +
    • +
      +

      writeInt16BE

      +
      public static void writeInt16BE(int val, + OutputStream stream) + throws IOException
      +
      Write a 16-bit integer to a given output stream in big-endian format. +

      + The value is expected as an unsigned int as per the Java Unsigned Integer API.

      +
      +
      Parameters:
      +
      val - value to be written
      +
      stream - stream to be written into
      +
      Throws:
      +
      IOException - if an I/O error occurs
      +
      +
      +
    • +
    • +
      +

      writeInt32LE

      +
      public static void writeInt32LE(int val, + OutputStream stream) + throws IOException
      +
      Write a 32-bit integer to a given output stream in little-endian format. +

      + The value is expected as a signed or unsigned int. If you've got an unsigned long as per the + Java Unsigned Integer API, use writeInt32LE(long, OutputStream).

      +
      +
      Parameters:
      +
      val - value to be written
      +
      stream - stream to be written into
      +
      Throws:
      +
      IOException - if an I/O error occurs
      +
      +
      +
    • +
    • +
      +

      writeInt32LE

      +
      public static void writeInt32LE(long val, + OutputStream stream) + throws IOException
      +
      Write a 32-bit integer to a given output stream in little-endian format. +

      + The value is expected as an unsigned long as per the Java Unsigned Integer API.

      +
      +
      Parameters:
      +
      val - value to be written
      +
      stream - stream to be written into
      +
      Throws:
      +
      IOException - if an I/O error occurs
      +
      +
      +
    • +
    • +
      +

      writeInt32BE

      +
      public static void writeInt32BE(int val, + OutputStream stream) + throws IOException
      +
      Write a 32-bit integer to a given output stream in big-endian format. +

      + The value is expected as a signed or unsigned int.

      +
      +
      Parameters:
      +
      val - value to be written
      +
      stream - stream to be written into
      +
      Throws:
      +
      IOException - if an I/O error occurs
      +
      +
      +
    • +
    • +
      +

      writeInt64LE

      +
      public static void writeInt64LE(long val, + OutputStream stream) + throws IOException
      +
      Write a 64-bit integer to a given output stream in little-endian format. +

      + The value is expected as a signed or unsigned long.

      +
      +
      Parameters:
      +
      val - value to be written
      +
      stream - stream to be written into
      +
      Throws:
      +
      IOException - if an I/O error occurs
      +
      +
      +
    • +
    • +
      +

      writeInt64LE

      +
      public static void writeInt64LE(BigInteger val, + OutputStream stream) + throws IOException
      +
      Write a 64-bit integer to a given output stream in little-endian format. +

      + The value is expected as an unsigned BigInteger.

      +
      +
      Parameters:
      +
      val - value to be written
      +
      stream - stream to be written into
      +
      Throws:
      +
      IOException - if an I/O error occurs
      +
      +
      +
    • +
    • +
      +

      readUint16

      +
      public static int readUint16(ByteBuffer buf) + throws BufferUnderflowException
      +
      Read 2 bytes from the buffer as unsigned 16-bit integer in little endian format.
      +
      +
      Parameters:
      +
      buf - buffer to be read from
      +
      Throws:
      +
      BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      readUint16

      +
      public static int readUint16(byte[] bytes, + int offset) + throws ArrayIndexOutOfBoundsException
      +
      Read 2 bytes from the byte array (starting at the offset) as unsigned 16-bit integer in little endian format.
      +
      +
      Parameters:
      +
      bytes - buffer to be read from
      +
      offset - offset into the buffer
      +
      Throws:
      +
      ArrayIndexOutOfBoundsException - if offset points outside of the buffer, or + if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      readUint16BE

      +
      public static int readUint16BE(ByteBuffer buf) + throws BufferUnderflowException
      +
      Read 2 bytes from the buffer as unsigned 16-bit integer in big endian format.
      +
      +
      Parameters:
      +
      buf - buffer to be read from
      +
      Throws:
      +
      BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      readUint16BE

      +
      public static int readUint16BE(byte[] bytes, + int offset) + throws ArrayIndexOutOfBoundsException
      +
      Read 2 bytes from the byte array (starting at the offset) as unsigned 16-bit integer in big endian format.
      +
      +
      Parameters:
      +
      bytes - buffer to be read from
      +
      offset - offset into the buffer
      +
      Throws:
      +
      ArrayIndexOutOfBoundsException - if offset points outside of the buffer, or + if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      readUint32

      +
      public static long readUint32(ByteBuffer buf) + throws BufferUnderflowException
      +
      Read 4 bytes from the buffer as unsigned 32-bit integer in little endian format.
      +
      +
      Parameters:
      +
      buf - buffer to be read from
      +
      Throws:
      +
      BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      readInt32

      +
      public static int readInt32(ByteBuffer buf) + throws BufferUnderflowException
      +
      Read 4 bytes from the byte array (starting at the offset) as signed 32-bit integer in little endian format.
      +
      +
      Parameters:
      +
      buf - buffer to be read from
      +
      Returns:
      +
      read integer
      +
      Throws:
      +
      BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      readUint32

      +
      public static long readUint32(byte[] bytes, + int offset) + throws ArrayIndexOutOfBoundsException
      +
      Read 4 bytes from the byte array (starting at the offset) as unsigned 32-bit integer in little endian format.
      +
      +
      Parameters:
      +
      bytes - buffer to be read from
      +
      offset - offset into the buffer
      +
      Throws:
      +
      ArrayIndexOutOfBoundsException - if offset points outside of the buffer, or + if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      readUint32BE

      +
      public static long readUint32BE(ByteBuffer buf) + throws BufferUnderflowException
      +
      Read 4 bytes from the buffer as unsigned 32-bit integer in big endian format.
      +
      +
      Parameters:
      +
      buf - buffer to be read from
      +
      Throws:
      +
      BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      readUint32BE

      +
      public static long readUint32BE(byte[] bytes, + int offset) + throws ArrayIndexOutOfBoundsException
      +
      Read 4 bytes from the byte array (starting at the offset) as unsigned 32-bit integer in big endian format.
      +
      +
      Parameters:
      +
      bytes - buffer to be read from
      +
      offset - offset into the buffer
      +
      Throws:
      +
      ArrayIndexOutOfBoundsException - if offset points outside of the buffer, or + if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      readInt64

      +
      public static long readInt64(ByteBuffer buf) + throws BufferUnderflowException
      +
      Read 8 bytes from the buffer as signed 64-bit integer in little endian format.
      +
      +
      Parameters:
      +
      buf - buffer to be read from
      +
      Throws:
      +
      BufferUnderflowException - if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      readInt64

      +
      public static long readInt64(byte[] bytes, + int offset) + throws ArrayIndexOutOfBoundsException
      +
      Read 8 bytes from the byte array (starting at the offset) as signed 64-bit integer in little endian format.
      +
      +
      Parameters:
      +
      bytes - buffer to be read from
      +
      offset - offset into the buffer
      +
      Throws:
      +
      ArrayIndexOutOfBoundsException - if offset points outside of the buffer, or + if the read value extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      readUint16

      +
      public static int readUint16(InputStream is)
      +
      Read 2 bytes from the stream as unsigned 16-bit integer in little endian format.
      +
      +
      Parameters:
      +
      is - stream to be read from
      +
      +
      +
    • +
    • +
      +

      readUint32

      +
      public static long readUint32(InputStream is)
      +
      Read 4 bytes from the stream as unsigned 32-bit integer in little endian format.
      +
      +
      Parameters:
      +
      is - stream to be read from
      +
      +
      +
    • +
    • +
      +

      reverseBytes

      +
      public static byte[] reverseBytes(byte[] bytes)
      +
      Returns a copy of the given byte array in reverse order.
      +
      +
    • +
    • +
      +

      decodeMPI

      +
      public static BigInteger decodeMPI(byte[] mpi, + boolean hasLength)
      +
      MPI encoded numbers are produced by the OpenSSL BN_bn2mpi function. They consist of + a 4 byte big endian length field, followed by the stated number of bytes representing + the number in big endian format (with a sign bit).
      +
      +
      Parameters:
      +
      hasLength - can be set to false if the given array is missing the 4 byte length field
      +
      +
      +
    • +
    • +
      +

      encodeMPI

      +
      public static byte[] encodeMPI(BigInteger value, + boolean includeLength)
      +
      MPI encoded numbers are produced by the OpenSSL BN_bn2mpi function. They consist of + a 4 byte big endian length field, followed by the stated number of bytes representing + the number in big endian format (with a sign bit).
      +
      +
      Parameters:
      +
      includeLength - indicates whether the 4 byte length field should be included
      +
      +
      +
    • +
    • +
      +

      decodeCompactBits

      +
      public static BigInteger decodeCompactBits(long compact)
      +

      The "compact" format is a representation of a whole number N using an unsigned 32 bit number similar to a + floating point format. The most significant 8 bits are the unsigned exponent of base 256. This exponent can + be thought of as "number of bytes of N". The lower 23 bits are the mantissa. Bit number 24 (0x800000) represents + the sign of N. Therefore, N = (-1^sign) * mantissa * 256^(exponent-3).

      + +

      Satoshi's original implementation used BN_bn2mpi() and BN_mpi2bn(). MPI uses the most significant bit of the + first byte as sign. Thus 0x1234560000 is compact 0x05123456 and 0xc0de000000 is compact 0x0600c0de. Compact + 0x05c0de00 would be -0x40de000000.

      + +

      Bitcoin only uses this "compact" format for encoding difficulty targets, which are unsigned 256bit quantities. + Thus, all the complexities of the sign bit and using base 256 are probably an implementation accident.

      +
      +
    • +
    • +
      +

      encodeCompactBits

      +
      public static long encodeCompactBits(BigInteger value)
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      checkBitLE

      +
      public static boolean checkBitLE(byte[] data, + int index)
      +
      Checks if the given bit is set in data, using little endian (not the same as Java native big endian)
      +
      +
    • +
    • +
      +

      setBitLE

      +
      public static void setBitLE(byte[] data, + int index)
      +
      Sets the given bit in data to one, using little endian (not the same as Java native big endian)
      +
      +
    • +
    • +
      +

      arrayUnsignedComparator

      +
      public static Comparator<byte[]> arrayUnsignedComparator()
      +
      Provides a byte array comparator.
      +
      +
      Returns:
      +
      A comparator for byte[]
      +
      +
      +
    • +
    • +
      +

      concat

      +
      public static byte[] concat(byte[] b1, + byte[] b2)
      +
      Concatenate two byte arrays
      +
      +
      Parameters:
      +
      b1 - first byte array
      +
      b2 - second byte array
      +
      Returns:
      +
      new concatenated byte array
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/FutureUtils.ThrowingSupplier.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/FutureUtils.ThrowingSupplier.html new file mode 100644 index 000000000..7ed0e24c6 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/FutureUtils.ThrowingSupplier.html @@ -0,0 +1,176 @@ + + + + +FutureUtils.ThrowingSupplier (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface FutureUtils.ThrowingSupplier<T>

+
+
+
+
Type Parameters:
+
T - the supplied type
+
+
+
All Superinterfaces:
+
Supplier<T>
+
+
+
Enclosing class:
+
FutureUtils
+
+
+
Functional Interface:
+
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
+
+
+
@FunctionalInterface +public static interface FutureUtils.ThrowingSupplier<T> +extends Supplier<T>
+
Subinterface of Supplier for Lambdas which throw exceptions. + Can be used for two purposes: + 1. To cast a lambda that throws an exception to a Supplier and + automatically wrapping any exceptions with RuntimeException. + 2. As a FunctionalInterface where a lambda that throws exceptions is + expected or allowed.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    default T
    +
    get()
    +
    +
    Gets a result wrapping checked Exceptions with RuntimeException
    +
    + + +
    +
    Gets a result.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      get

      +
      default T get()
      +
      Gets a result wrapping checked Exceptions with RuntimeException
      +
      +
      Specified by:
      +
      get in interface Supplier<T>
      +
      Returns:
      +
      a result
      +
      +
      +
    • +
    • +
      +

      getThrows

      +
      T getThrows() + throws Exception
      +
      Gets a result.
      +
      +
      Returns:
      +
      a result
      +
      Throws:
      +
      Exception - Any checked Exception
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/FutureUtils.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/FutureUtils.html new file mode 100644 index 000000000..2767b56c7 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/FutureUtils.html @@ -0,0 +1,234 @@ + + + + +FutureUtils (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FutureUtils

+
+
java.lang.Object +
org.bitcoinj.base.internal.FutureUtils
+
+
+
+
public class FutureUtils +extends Object
+
Utilities for CompletableFuture. +

+ Note: When the bitcoinj migration to CompletableFuture is finished this class will + either be removed or its remaining methods changed to use generic CompletableFutures.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      FutureUtils

      +
      public FutureUtils()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      allAsList

      +
      public static <T> CompletableFuture<List<T>> allAsList(List<? extends CompletionStage<? extends T>> stages)
      +
      Note: When the migration to CompletableFuture is complete this routine will + either be removed or changed to return a generic CompletableFuture.
      +
      +
      Type Parameters:
      +
      T - the result type
      +
      Parameters:
      +
      stages - A list of CompletionStages all returning the same type
      +
      Returns:
      +
      A CompletableFuture that returns a list of result type
      +
      +
      +
    • +
    • +
      +

      successfulAsList

      +
      public static <T> CompletableFuture<List<T>> successfulAsList(List<? extends CompletionStage<? extends T>> stages)
      +
      Note: When the migration to CompletableFuture is complete this routine will + either be removed or changed to return a generic CompletableFuture.
      +
      +
      Type Parameters:
      +
      T - the result type
      +
      Parameters:
      +
      stages - A list of CompletionStages all returning the same type
      +
      Returns:
      +
      A CompletableFuture that returns a list of result type
      +
      +
      +
    • +
    • +
      +

      failedFuture

      +
      public static <T> CompletableFuture<T> failedFuture(Throwable t)
      +
      Can be replaced with CompletableFuture.failedFuture(Throwable) in Java 9+.
      +
      +
      Type Parameters:
      +
      T - the future's return type
      +
      Parameters:
      +
      t - Exception that is causing the failure
      +
      Returns:
      +
      a failed future containing the specified exception
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/HexFormat.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/HexFormat.html new file mode 100644 index 000000000..b7ee79912 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/HexFormat.html @@ -0,0 +1,172 @@ + + + + +HexFormat (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class HexFormat

+
+
java.lang.Object +
org.bitcoinj.base.internal.HexFormat
+
+
+
+
public class HexFormat +extends Object
+
This class implements a subset of the functionality of the HexFormat class available in Java 17 and later. + Its behavior is the same as an instance of Java 17 HexFormat created with HexFormat.of(). + It is an internal class to support ByteUtils and may be removed in the future + when and if we have a Java 17 baseline. +

Thanks to this Baeldung article.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      HexFormat

      +
      public HexFormat()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      formatHex

      +
      public String formatHex(byte[] bytes)
      +
      +
    • +
    • +
      +

      parseHex

      +
      public byte[] parseHex(String hexString)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/InternalUtils.Joiner.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/InternalUtils.Joiner.html new file mode 100644 index 000000000..5a6f254db --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/InternalUtils.Joiner.html @@ -0,0 +1,142 @@ + + + + +InternalUtils.Joiner (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface InternalUtils.Joiner

+
+
+
+
Enclosing class:
+
InternalUtils
+
+
+
Functional Interface:
+
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
+
+
+
@FunctionalInterface +public static interface InternalUtils.Joiner
+
A functional interface for joining Strings or Objects via Object.toString() using + a pre-configured delimiter. +

+ In previous versions of bitcoinj this functionality was provided by Guava's Joiner.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + +
    join(List<?> objects)
    +
     
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      join

      +
      String join(List<?> objects)
      +
      +
      Parameters:
      +
      objects - A list of objects to join (after calling Object.toString()) + The components joined into a single String separated by the pre-configured delimiter.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/InternalUtils.Splitter.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/InternalUtils.Splitter.html new file mode 100644 index 000000000..ee3169a73 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/InternalUtils.Splitter.html @@ -0,0 +1,142 @@ + + + + +InternalUtils.Splitter (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface InternalUtils.Splitter

+
+
+
+
Enclosing class:
+
InternalUtils
+
+
+
Functional Interface:
+
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
+
+
+
@FunctionalInterface +public static interface InternalUtils.Splitter
+
A functional interface for splitting Strings using a pre-configured regular expression. +

+ In previous versions of bitcoinj this functionality was provided by Guava's Splitter.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
     
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      splitToList

      +
      List<String> splitToList(String string)
      +
      +
      Parameters:
      +
      string - The String to split
      +
      Returns:
      +
      A list of split String components
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/InternalUtils.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/InternalUtils.html new file mode 100644 index 000000000..c12f634ec --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/InternalUtils.html @@ -0,0 +1,298 @@ + + + + +InternalUtils (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InternalUtils

+
+
java.lang.Object +
org.bitcoinj.base.internal.InternalUtils
+
+
+
+
public class InternalUtils +extends Object
+
Utilities for internal use only.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InternalUtils

      +
      public InternalUtils()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      joiner

      +
      public static InternalUtils.Joiner joiner(String delimiter)
      +
      Return a lambda for joining Strings or Objects via Object.toString().
      +
      +
      Parameters:
      +
      delimiter - The delimiter used to join the String components
      +
      Returns:
      +
      A Joiner (lambda) instance
      +
      +
      +
    • +
    • +
      +

      splitter

      +
      public static InternalUtils.Splitter splitter(String regex)
      +
      Return a lambda for splitting a string into components
      +
      +
      Parameters:
      +
      regex - regular expression used to split components
      +
      Returns:
      +
      A Splitter (lambda) instance
      +
      +
      +
    • +
    • +
      +

      commaJoin

      +
      public static String commaJoin(String... strings)
      +
      Join strings with ", " skipping nulls
      +
      +
      Parameters:
      +
      strings - varargs strings
      +
      Returns:
      +
      A joined string
      +
      +
      +
    • +
    • +
      +

      getUninterruptibly

      +
      public static <V> V getUninterruptibly(Future<V> future) + throws ExecutionException
      +
      Get a future's value uninterruptibly by temporarily ignoring InterruptedException, but making + sure we re-set the thread's interrupt status, so higher-level code on the thread can handle the + interruption properly. Based upon the Guava implementation.
      +
      +
      Type Parameters:
      +
      V - type of value
      +
      Parameters:
      +
      future - future with value to get
      +
      Returns:
      +
      the value
      +
      Throws:
      +
      ExecutionException - if the computation through an exception
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/PlatformUtils.OS.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/PlatformUtils.OS.html new file mode 100644 index 000000000..ad707d5cc --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/PlatformUtils.OS.html @@ -0,0 +1,229 @@ + + + + +PlatformUtils.OS (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class PlatformUtils.OS

+
+
java.lang.Object +
java.lang.Enum<PlatformUtils.OS> +
org.bitcoinj.base.internal.PlatformUtils.OS
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<PlatformUtils.OS>, Constable
+
+
+
Enclosing class:
+
PlatformUtils
+
+
+
public static enum PlatformUtils.OS +extends Enum<PlatformUtils.OS>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static PlatformUtils.OS[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static PlatformUtils.OS valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/PlatformUtils.Runtime.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/PlatformUtils.Runtime.html new file mode 100644 index 000000000..0cff27a4a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/PlatformUtils.Runtime.html @@ -0,0 +1,229 @@ + + + + +PlatformUtils.Runtime (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class PlatformUtils.Runtime

+
+
java.lang.Object +
java.lang.Enum<PlatformUtils.Runtime> +
org.bitcoinj.base.internal.PlatformUtils.Runtime
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<PlatformUtils.Runtime>, Constable
+
+
+
Enclosing class:
+
PlatformUtils
+
+
+
public static enum PlatformUtils.Runtime +extends Enum<PlatformUtils.Runtime>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static PlatformUtils.Runtime[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static PlatformUtils.Runtime valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/PlatformUtils.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/PlatformUtils.html new file mode 100644 index 000000000..550de744b --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/PlatformUtils.html @@ -0,0 +1,260 @@ + + + + +PlatformUtils (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PlatformUtils

+
+
java.lang.Object +
org.bitcoinj.base.internal.PlatformUtils
+
+
+
+
public class PlatformUtils +extends Object
+
Utilities for determining platform information (OS and runtime)
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PlatformUtils

      +
      public PlatformUtils()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      isAndroidRuntime

      +
      public static boolean isAndroidRuntime()
      +
      +
    • +
    • +
      +

      isOpenJDKRuntime

      +
      public static boolean isOpenJDKRuntime()
      +
      +
    • +
    • +
      +

      isOracleJavaRuntime

      +
      public static boolean isOracleJavaRuntime()
      +
      +
    • +
    • +
      +

      isLinux

      +
      public static boolean isLinux()
      +
      +
    • +
    • +
      +

      isWindows

      +
      public static boolean isWindows()
      +
      +
    • +
    • +
      +

      isMac

      +
      public static boolean isMac()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/Preconditions.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/Preconditions.html new file mode 100644 index 000000000..f429dafdb --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/Preconditions.html @@ -0,0 +1,253 @@ + + + + +Preconditions (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Preconditions

+
+
java.lang.Object +
org.bitcoinj.base.internal.Preconditions
+
+
+
+
public class Preconditions +extends Object
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static <X extends Throwable>
    void
    +
    check(boolean expression, + Supplier<? extends X> exceptionSupplier)
    +
    +
    Ensures the truth of an expression, throwing a custom exception if untrue.
    +
    +
    static void
    +
    checkArgument(boolean expression)
    +
    +
    Ensures the truth of an expression involving one or more parameters to the calling method.
    +
    +
    static void
    +
    checkArgument(boolean expression, + Supplier<String> messageSupplier)
    +
    +
    Ensures the truth of an expression involving one or more parameters to the calling method.
    +
    +
    static void
    +
    checkState(boolean expression)
    +
    +
    Ensures the truth of an expression involving the state of the calling instance, but not + involving any parameters to the calling method.
    +
    +
    static void
    +
    checkState(boolean expression, + Supplier<String> messageSupplier)
    +
    +
    Ensures the truth of an expression involving the state of the calling instance, but not + involving any parameters to the calling method.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Preconditions

      +
      public Preconditions()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      checkArgument

      +
      public static void checkArgument(boolean expression)
      +
      Ensures the truth of an expression involving one or more parameters to the calling method.
      +
      +
      Parameters:
      +
      expression - a boolean expression
      +
      Throws:
      +
      IllegalArgumentException - if expression is false
      +
      +
      +
    • +
    • +
      +

      checkArgument

      +
      public static void checkArgument(boolean expression, + Supplier<String> messageSupplier)
      +
      Ensures the truth of an expression involving one or more parameters to the calling method.
      +
      +
      Parameters:
      +
      expression - a boolean expression
      +
      messageSupplier - supplier of the detail message to be used in the event that a IllegalArgumentException is thrown
      +
      Throws:
      +
      IllegalArgumentException - if expression is false
      +
      +
      +
    • +
    • +
      +

      checkState

      +
      public static void checkState(boolean expression)
      +
      Ensures the truth of an expression involving the state of the calling instance, but not + involving any parameters to the calling method.
      +
      +
      Parameters:
      +
      expression - a boolean expression
      +
      Throws:
      +
      IllegalStateException - if expression is false
      +
      +
      +
    • +
    • +
      +

      checkState

      +
      public static void checkState(boolean expression, + Supplier<String> messageSupplier)
      +
      Ensures the truth of an expression involving the state of the calling instance, but not + involving any parameters to the calling method.
      +
      +
      Parameters:
      +
      expression - a boolean expression
      +
      messageSupplier - supplier of the detail message to be used in the event that a IllegalStateException is thrown
      +
      Throws:
      +
      IllegalStateException - if expression is false
      +
      +
      +
    • +
    • +
      +

      check

      +
      public static <X extends Throwable> void check(boolean expression, + Supplier<? extends X> exceptionSupplier) + throws X
      +
      Ensures the truth of an expression, throwing a custom exception if untrue.
      +
      +
      Parameters:
      +
      expression - a boolean expression
      +
      exceptionSupplier - supplier of the exception to be thrown
      +
      Throws:
      +
      X - if expression is false
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/Stopwatch.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/Stopwatch.html new file mode 100644 index 000000000..ea1b2ebe6 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/Stopwatch.html @@ -0,0 +1,258 @@ + + + + +Stopwatch (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Stopwatch

+
+
java.lang.Object +
org.bitcoinj.base.internal.Stopwatch
+
+
+
+
All Implemented Interfaces:
+
TemporalAmount
+
+
+
public class Stopwatch +extends Object +implements TemporalAmount
+
A tool for measuring time, mainly for log messages. Note this class isn't affected by the mock clock of + TimeUtils.
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      start

      +
      public static Stopwatch start()
      +
      Start a newly created stopwatch.
      +
      +
      Returns:
      +
      the stopwatch that was just started
      +
      +
      +
    • +
    • +
      +

      stop

      +
      public Stopwatch stop()
      +
      Stops the stopwatch, if it is running.
      +
      +
      Returns:
      +
      the stopwatch that is stopped
      +
      +
      +
    • +
    • +
      +

      isRunning

      +
      public boolean isRunning()
      +
      Returns true if the stopwatch is running.
      +
      +
      Returns:
      +
      true if the stopwatch is running, false otherwise
      +
      +
      +
    • +
    • +
      +

      elapsed

      +
      public Duration elapsed()
      +
      Gets the elapsed time on the watch. This doesn't stop the watch.
      +
      +
      Returns:
      +
      elapsed time
      +
      +
      +
    • +
    • +
      +

      get

      +
      public long get(TemporalUnit temporalUnit)
      +
      +
      Specified by:
      +
      get in interface TemporalAmount
      +
      +
      +
    • +
    • +
      +

      getUnits

      +
      public List<TemporalUnit> getUnits()
      +
      +
      Specified by:
      +
      getUnits in interface TemporalAmount
      +
      +
      +
    • +
    • +
      +

      addTo

      +
      public Temporal addTo(Temporal temporal)
      +
      +
      Specified by:
      +
      addTo in interface TemporalAmount
      +
      +
      +
    • +
    • +
      +

      subtractFrom

      +
      public Temporal subtractFrom(Temporal temporal)
      +
      +
      Specified by:
      +
      subtractFrom in interface TemporalAmount
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/StreamUtils.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/StreamUtils.html new file mode 100644 index 000000000..6efc0b265 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/StreamUtils.html @@ -0,0 +1,167 @@ + + + + +StreamUtils (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class StreamUtils

+
+
java.lang.Object +
org.bitcoinj.base.internal.StreamUtils
+
+
+
+
public class StreamUtils +extends Object
+
Stream Utilities. Bitcoinj is moving towards functional-style programming, immutable data structures, and + unmodifiable lists. Since we are currently limited to Java 8, this class contains utility methods that can simplify + code in many places.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      StreamUtils

      +
      public StreamUtils()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toUnmodifiableList

      +
      public static <T> Collector<T,?,List<T>> toUnmodifiableList()
      +
      Return a collector that collects a Stream into an unmodifiable list. +

      + Java 10 provides Collectors.toUnmodifiableList() and Java 16 provides Stream.toList(). + If those are not available, use this utility method.

      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/TimeUtils.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/TimeUtils.html new file mode 100644 index 000000000..72ee257e9 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/TimeUtils.html @@ -0,0 +1,292 @@ + + + + +TimeUtils (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TimeUtils

+
+
java.lang.Object +
org.bitcoinj.base.internal.TimeUtils
+
+
+
+
public class TimeUtils +extends Object
+
Utilities for time and mock time.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TimeUtils

      +
      public TimeUtils()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setMockClock

      +
      public static void setMockClock()
      +
      Sets the mock clock to the current time as a fixed instant.
      +
      +
    • +
    • +
      +

      setMockClock

      +
      public static void setMockClock(Instant fixedInstant)
      +
      Sets the mock clock to a fixed instant.
      +
      +
      Parameters:
      +
      fixedInstant - a fixed instant
      +
      +
      +
    • +
    • +
      +

      rollMockClock

      +
      public static void rollMockClock(Duration delta)
      +
      Rolls an already set mock clock by the given duration.
      +
      +
      Parameters:
      +
      delta - amount to roll the mock clock, can be negative
      +
      Throws:
      +
      IllegalStateException - if the mock clock isn't set
      +
      +
      +
    • +
    • +
      +

      clearMockClock

      +
      public static void clearMockClock()
      +
      Clears the mock clock and causes time to tick again.
      +
      +
    • +
    • +
      +

      currentTime

      +
      public static Instant currentTime()
      +
      Returns the current time as an Instant, or a mocked out equivalent.
      +
      +
    • +
    • +
      +

      elapsedTime

      +
      public static Duration elapsedTime(Instant start)
      +
      Returns elapsed time between given start and current time as a Duration. +

      + Note that this method is affected by the mock clock. If you want to raise real debug data use Stopwatch.

      +
      +
    • +
    • +
      +

      earlier

      +
      public static Instant earlier(Instant time1, + Instant time2)
      +
      Determines the earlier of two instants.
      +
      +
    • +
    • +
      +

      later

      +
      public static Instant later(Instant time1, + Instant time2)
      +
      Determines the later of two instants.
      +
      +
    • +
    • +
      +

      longest

      +
      public static Duration longest(Duration duration1, + Duration duration2)
      +
      Determines the longest of two durations.
      +
      +
    • +
    • +
      +

      dateTimeFormat

      +
      public static String dateTimeFormat(Instant time)
      +
      Formats a given date+time value to an ISO 8601 string.
      +
      +
      Parameters:
      +
      time - date and time to format
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/package-summary.html new file mode 100644 index 000000000..0f2358dfc --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/package-summary.html @@ -0,0 +1,162 @@ + + + + +org.bitcoinj.base.internal (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.base.internal

+
+
+
package org.bitcoinj.base.internal
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/internal/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/base/internal/package-tree.html new file mode 100644 index 000000000..9b990ae8b --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/internal/package-tree.html @@ -0,0 +1,108 @@ + + + + +org.bitcoinj.base.internal Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.base.internal

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/base/package-summary.html new file mode 100644 index 000000000..6bf8e64cc --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/package-summary.html @@ -0,0 +1,201 @@ + + + + +org.bitcoinj.base (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.base

+
+
+
package org.bitcoinj.base
+
+
The base package provides foundational types for bitcoinj. These types must have + minimal dependencies. The criteria for allowed dependencies for base types are: +
    +
  • No dependencies on other packages of bitcoinj
  • +
  • No API dependencies on external libraries other than the core JDK and slf4j-api
  • +
+

+ Temporary exception: In the 0.17 release, we are allowing some dependencies on other packages, e.g. to + NetworkParameters or to Guava provided that those references are in deprecated methods. + This smooths migration by allowing users to, for example, replace import org.bitcoinj.core.Address with + import org.bitcoinj.base.Address as first step of conversion and then remove usages of the deprecated methods + of Address in a second step. +

+ The base package makes bitcoinj more modular as it breaks circular dependencies between existing packages and provides + a "zero-dependency" foundation for the other packages. In a future release base will be + split into a separate JAR/module (tentatively bitcoinj-base.)

+
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/base/package-tree.html new file mode 100644 index 000000000..4aa248d35 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/package-tree.html @@ -0,0 +1,119 @@ + + + + +org.bitcoinj.base Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.base

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/utils/Fiat.html b/javadoc/0.17-rc1/org/bitcoinj/base/utils/Fiat.html new file mode 100644 index 000000000..b1f5d115e --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/utils/Fiat.html @@ -0,0 +1,521 @@ + + + + +Fiat (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Fiat

+
+
java.lang.Object +
org.bitcoinj.base.utils.Fiat
+
+
+
+
All Implemented Interfaces:
+
Comparable<Fiat>, Monetary
+
+
+
public final class Fiat +extends Object +implements Monetary, Comparable<Fiat>
+
Represents a monetary fiat value. It was decided to not fold this into Coin because of type + safety. Fiat values always come with an attached currency code. + + This class is immutable.
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    final String
    + +
     
    +
    static final int
    + +
    +
    The absolute value of exponent of the value of a "smallest unit" in scientific notation.
    +
    +
    final long
    + +
    +
    The number of smallest units of this monetary value.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + +
    add(Fiat value)
    +
     
    +
    int
    +
    compareTo(Fiat other)
    +
     
    + +
    divide(long divisor)
    +
     
    +
    long
    +
    divide(Fiat divisor)
    +
     
    + +
    divideAndRemainder(long divisor)
    +
     
    +
    boolean
    + +
     
    + + +
     
    +
    long
    + +
    +
    Returns the number of "smallest units" of this monetary value.
    +
    +
    int
    + +
     
    +
    boolean
    + +
    +
    Returns true if the monetary value represented by this instance is greater than that of the given other Fiat, + otherwise false.
    +
    +
    boolean
    + +
    +
    Returns true if the monetary value represented by this instance is less than that of the given other Fiat, + otherwise false.
    +
    +
    boolean
    + +
    +
    Returns true if and only if this instance represents a monetary value less than zero, otherwise false.
    +
    +
    boolean
    + +
    +
    Returns true if and only if this instance represents a monetary value greater than zero, otherwise false.
    +
    +
    boolean
    + +
    +
    Returns true if and only if this instance represents zero monetary value, otherwise false.
    +
    +
    long
    + +
    +
    Returns the number of "smallest units" of this monetary value.
    +
    + +
    multiply(long factor)
    +
     
    + + +
     
    +
    static Fiat
    +
    parseFiat(String currencyCode, + String str)
    +
    +
    Parses an amount expressed in the way humans are used to.
    +
    +
    static Fiat
    +
    parseFiatInexact(String currencyCode, + String str)
    +
    +
    Parses an amount expressed in the way humans are used to.
    +
    +
    int
    + +
     
    +
    int
    + +
    +
    Returns the absolute value of exponent of the value of a "smallest unit" in scientific notation.
    +
    + +
    subtract(Fiat value)
    +
     
    + + +
    +
    Returns the value as a 0.12 type string.
    +
    + + +
    +
    + Returns the value as a plain string.
    +
    + + +
     
    +
    static Fiat
    +
    valueOf(String currencyCode, + long value)
    +
     
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      SMALLEST_UNIT_EXPONENT

      +
      public static final int SMALLEST_UNIT_EXPONENT
      +
      The absolute value of exponent of the value of a "smallest unit" in scientific notation. We picked 4 rather than + 2, because in financial applications it's common to use sub-cent precision.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      value

      +
      public final long value
      +
      The number of smallest units of this monetary value.
      +
      +
    • +
    • +
      +

      currencyCode

      +
      public final String currencyCode
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      valueOf

      +
      public static Fiat valueOf(String currencyCode, + long value)
      +
      +
    • +
    • +
      +

      smallestUnitExponent

      +
      public int smallestUnitExponent()
      +
      Description copied from interface: Monetary
      +
      Returns the absolute value of exponent of the value of a "smallest unit" in scientific notation. For Bitcoin, a + satoshi is worth 1E-8 so this would be 8.
      +
      +
      Specified by:
      +
      smallestUnitExponent in interface Monetary
      +
      +
      +
    • +
    • +
      +

      getValue

      +
      public long getValue()
      +
      Returns the number of "smallest units" of this monetary value.
      +
      +
      Specified by:
      +
      getValue in interface Monetary
      +
      +
      +
    • +
    • +
      +

      getCurrencyCode

      +
      public String getCurrencyCode()
      +
      +
    • +
    • +
      +

      parseFiat

      +
      public static Fiat parseFiat(String currencyCode, + String str)
      +

      Parses an amount expressed in the way humans are used to.

      +

      This takes string in a format understood by BigDecimal(String), for example "0", "1", "0.10", + "1.23E3", "1234.5E-5".

      +
      +
      Throws:
      +
      IllegalArgumentException - if you try to specify more than 4 digits after the comma, or a value out of range.
      +
      +
      +
    • +
    • +
      +

      parseFiatInexact

      +
      public static Fiat parseFiatInexact(String currencyCode, + String str)
      +

      Parses an amount expressed in the way humans are used to. The amount is cut to 4 digits after the comma.

      +

      This takes string in a format understood by BigDecimal(String), for example "0", "1", "0.10", + "1.23E3", "1234.5E-5".

      +
      +
      Throws:
      +
      IllegalArgumentException - if you try to specify a value out of range.
      +
      +
      +
    • +
    • +
      +

      add

      +
      public Fiat add(Fiat value)
      +
      +
    • +
    • +
      +

      subtract

      +
      public Fiat subtract(Fiat value)
      +
      +
    • +
    • +
      +

      multiply

      +
      public Fiat multiply(long factor)
      +
      +
    • +
    • +
      +

      divide

      +
      public Fiat divide(long divisor)
      +
      +
    • +
    • +
      +

      divideAndRemainder

      +
      public Fiat[] divideAndRemainder(long divisor)
      +
      +
    • +
    • +
      +

      divide

      +
      public long divide(Fiat divisor)
      +
      +
    • +
    • +
      +

      isPositive

      +
      public boolean isPositive()
      +
      Returns true if and only if this instance represents a monetary value greater than zero, otherwise false.
      +
      +
    • +
    • +
      +

      isNegative

      +
      public boolean isNegative()
      +
      Returns true if and only if this instance represents a monetary value less than zero, otherwise false.
      +
      +
    • +
    • +
      +

      isZero

      +
      public boolean isZero()
      +
      Returns true if and only if this instance represents zero monetary value, otherwise false.
      +
      +
    • +
    • +
      +

      isGreaterThan

      +
      public boolean isGreaterThan(Fiat other)
      +
      Returns true if the monetary value represented by this instance is greater than that of the given other Fiat, + otherwise false.
      +
      +
    • +
    • +
      +

      isLessThan

      +
      public boolean isLessThan(Fiat other)
      +
      Returns true if the monetary value represented by this instance is less than that of the given other Fiat, + otherwise false.
      +
      +
    • +
    • +
      +

      signum

      +
      public int signum()
      +
      +
      Specified by:
      +
      signum in interface Monetary
      +
      +
      +
    • +
    • +
      +

      negate

      +
      public Fiat negate()
      +
      +
    • +
    • +
      +

      longValue

      +
      public long longValue()
      +
      Returns the number of "smallest units" of this monetary value. It's deprecated in favour of accessing value + directly.
      +
      +
    • +
    • +
      +

      toFriendlyString

      +
      public String toFriendlyString()
      +
      Returns the value as a 0.12 type string. More digits after the decimal place will be used if necessary, but two + will always be present.
      +
      +
    • +
    • +
      +

      toPlainString

      +
      public String toPlainString()
      +

      + Returns the value as a plain string. The result is unformatted with no trailing zeroes. For + instance, a value of 150000 "smallest units" gives an output string of "0.0015". +

      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      compareTo

      +
      public int compareTo(Fiat other)
      +
      +
      Specified by:
      +
      compareTo in interface Comparable<Fiat>
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/utils/MonetaryFormat.html b/javadoc/0.17-rc1/org/bitcoinj/base/utils/MonetaryFormat.html new file mode 100644 index 000000000..1b930ff5b --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/utils/MonetaryFormat.html @@ -0,0 +1,748 @@ + + + + +MonetaryFormat (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MonetaryFormat

+
+
java.lang.Object +
org.bitcoinj.base.utils.MonetaryFormat
+
+
+
+
public final class MonetaryFormat +extends Object
+

+ Utility for formatting and parsing coin values to and from human-readable form. +

+ +

+ MonetaryFormat instances are immutable. Invoking a configuration method has no effect on the receiving instance; you + must store and use the new instance it returns, instead. Instances are thread safe, so they may be stored safely as + static constants. +

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      BTC

      +
      public static final MonetaryFormat BTC
      +
      Standard format for the BTC denomination.
      +
      +
    • +
    • +
      +

      MBTC

      +
      public static final MonetaryFormat MBTC
      +
      Standard format for the mBTC denomination.
      +
      +
    • +
    • +
      +

      UBTC

      +
      public static final MonetaryFormat UBTC
      +
      Standard format for the µBTC denomination.
      +
      +
    • +
    • +
      +

      SAT

      +
      public static final MonetaryFormat SAT
      +
      Standard format for the satoshi denomination.
      +
      +
    • +
    • +
      +

      FIAT

      +
      public static final MonetaryFormat FIAT
      +
      Standard format for fiat amounts.
      +
      +
    • +
    • +
      +

      CODE_BTC

      +
      public static final String CODE_BTC
      +
      Currency code for base 1 Bitcoin.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      CODE_MBTC

      +
      public static final String CODE_MBTC
      +
      Currency code for base 1/1000 Bitcoin.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      CODE_UBTC

      +
      public static final String CODE_UBTC
      +
      Currency code for base 1/1000000 Bitcoin.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      CODE_SAT

      +
      public static final String CODE_SAT
      +
      Currency code for base 1 satoshi.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      SYMBOL_BTC

      +
      public static final String SYMBOL_BTC
      +
      Currency symbol for base 1 Bitcoin.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      SYMBOL_MBTC

      +
      public static final String SYMBOL_MBTC
      +
      Currency symbol for base 1/1000 Bitcoin.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      SYMBOL_UBTC

      +
      public static final String SYMBOL_UBTC
      +
      Currency symbol for base 1/1000000 Bitcoin.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      SYMBOL_SAT

      +
      public static final String SYMBOL_SAT
      +
      Currency symbol for base 1 satoshi.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      MAX_DECIMALS

      +
      public static final int MAX_DECIMALS
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MonetaryFormat

      +
      public MonetaryFormat()
      +
      Construct a MonetaryFormat with the default configuration.
      +
      +
    • +
    • +
      +

      MonetaryFormat

      +
      public MonetaryFormat(boolean useSymbol)
      +
      Construct a MonetaryFormat with the default configuration.
      +
      +
      Parameters:
      +
      useSymbol - use unicode symbols instead of the BTC and sat codes
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      negativeSign

      +
      public MonetaryFormat negativeSign(char negativeSign)
      +
      Set character to prefix negative values.
      +
      +
    • +
    • +
      +

      positiveSign

      +
      public MonetaryFormat positiveSign(char positiveSign)
      +
      Set character to prefix positive values. A zero value means no sign is used in this case. For parsing, a missing + sign will always be interpreted as if the positive sign was used.
      +
      +
    • +
    • +
      +

      digits

      +
      public MonetaryFormat digits(char zeroDigit)
      +
      Set character range to use for representing digits. It starts with the specified character representing zero.
      +
      +
    • +
    • +
      +

      decimalMark

      +
      public MonetaryFormat decimalMark(char decimalMark)
      +
      Set character to use as the decimal mark. If the formatted value does not have any decimals, no decimal mark is + used either.
      +
      +
    • +
    • +
      +

      minDecimals

      +
      public MonetaryFormat minDecimals(int minDecimals)
      +
      Set minimum number of decimals to use for formatting. If the value precision exceeds all decimals specified + (including additional decimals specified by optionalDecimals(int...) or + repeatOptionalDecimals(int, int)), the value will be rounded. This configuration is not relevant for + parsing.
      +
      +
    • +
    • +
      +

      optionalDecimals

      +
      public MonetaryFormat optionalDecimals(int... groups)
      +

      + Set additional groups of decimals to use after the minimum decimals, if they are useful for expressing precision. + Each value is a number of decimals in that group. If the value precision exceeds all decimals specified + (including minimum decimals), the value will be rounded. This configuration is not relevant for parsing. +

      + +

      + For example, if you pass 4,2 it will add four decimals to your formatted string if needed, and then add + another two decimals if needed. At this point, rather than adding further decimals the value will be rounded. +

      +
      +
      Parameters:
      +
      groups - any number numbers of decimals, one for each group
      +
      +
      +
    • +
    • +
      +

      repeatOptionalDecimals

      +
      public MonetaryFormat repeatOptionalDecimals(int decimals, + int repetitions)
      +

      + Set repeated additional groups of decimals to use after the minimum decimals, if they are useful for expressing + precision. If the value precision exceeds all decimals specified (including minimum decimals), the value will be + rounded. This configuration is not relevant for parsing. +

      + +

      + For example, if you pass 1,8 it will up to eight decimals to your formatted string if needed. After + these have been used up, rather than adding further decimals the value will be rounded. +

      +
      +
      Parameters:
      +
      decimals - value of the group to be repeated
      +
      repetitions - number of repetitions
      +
      +
      +
    • +
    • +
      +

      shift

      +
      public MonetaryFormat shift(int shift)
      +
      Set number of digits to shift the decimal separator to the right, coming from the standard BTC notation that was + common pre-2014. Note this will change the currency code if enabled.
      +
      +
    • +
    • +
      +

      roundingMode

      +
      public MonetaryFormat roundingMode(RoundingMode roundingMode)
      +
      Set rounding mode to use when it becomes necessary.
      +
      +
    • +
    • +
      +

      noCode

      +
      public MonetaryFormat noCode()
      +
      Don't display currency code when formatting. This configuration is not relevant for parsing.
      +
      +
    • +
    • +
      +

      code

      +
      public MonetaryFormat code(int codeShift, + String code)
      +
      Configure currency code for given decimal separator shift. This configuration is not relevant for parsing.
      +
      +
      Parameters:
      +
      codeShift - decimal separator shift, see shift
      +
      code - currency code
      +
      +
      +
    • +
    • +
      +

      codeSeparator

      +
      public MonetaryFormat codeSeparator(char codeSeparator)
      +
      Separator between currency code and formatted value. This configuration is not relevant for parsing.
      +
      +
    • +
    • +
      +

      prefixCode

      +
      public MonetaryFormat prefixCode()
      +
      Prefix formatted output by currency code. This configuration is not relevant for parsing.
      +
      +
    • +
    • +
      +

      postfixCode

      +
      public MonetaryFormat postfixCode()
      +
      Postfix formatted output with currency code. This configuration is not relevant for parsing.
      +
      +
    • +
    • +
      +

      withLocale

      +
      public MonetaryFormat withLocale(Locale locale)
      +
      Configure this instance with values from a Locale.
      +
      +
    • +
    • +
      +

      format

      +
      public CharSequence format(Monetary monetary)
      +
      Format the given monetary value to a human-readable form.
      +
      +
    • +
    • +
      +

      parse

      +
      public Coin parse(String str) + throws NumberFormatException
      +
      Parse a human-readable coin value to a Coin instance.
      +
      +
      Throws:
      +
      NumberFormatException - if the string cannot be parsed for some reason
      +
      +
      +
    • +
    • +
      +

      parseFiat

      +
      public Fiat parseFiat(String currencyCode, + String str) + throws NumberFormatException
      +
      Parse a human-readable fiat value to a Fiat instance.
      +
      +
      Throws:
      +
      NumberFormatException - if the string cannot be parsed for some reason
      +
      +
      +
    • +
    • +
      +

      code

      +
      public String code()
      +
      Get currency code that will be used for current shift.
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      Two formats are equal if they have the same parameters.
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/utils/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/base/utils/package-summary.html new file mode 100644 index 000000000..053b76ae5 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/utils/package-summary.html @@ -0,0 +1,106 @@ + + + + +org.bitcoinj.base.utils (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.base.utils

+
+
+
package org.bitcoinj.base.utils
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/base/utils/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/base/utils/package-tree.html new file mode 100644 index 000000000..040ceabe1 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/base/utils/package-tree.html @@ -0,0 +1,72 @@ + + + + +org.bitcoinj.base.utils Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.base.utils

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/AbstractBlockChain.NewBlockType.html b/javadoc/0.17-rc1/org/bitcoinj/core/AbstractBlockChain.NewBlockType.html new file mode 100644 index 000000000..652a2fa81 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/AbstractBlockChain.NewBlockType.html @@ -0,0 +1,228 @@ + + + + +AbstractBlockChain.NewBlockType (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class AbstractBlockChain.NewBlockType

+
+
java.lang.Object +
java.lang.Enum<AbstractBlockChain.NewBlockType> +
org.bitcoinj.core.AbstractBlockChain.NewBlockType
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<AbstractBlockChain.NewBlockType>, Constable
+
+
+
Enclosing class:
+
AbstractBlockChain
+
+
+
public static enum AbstractBlockChain.NewBlockType +extends Enum<AbstractBlockChain.NewBlockType>
+
Indicates whether new Block was on the best chain or not
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static AbstractBlockChain.NewBlockType[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static AbstractBlockChain.NewBlockType valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/AbstractBlockChain.html b/javadoc/0.17-rc1/org/bitcoinj/core/AbstractBlockChain.html new file mode 100644 index 000000000..d33722544 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/AbstractBlockChain.html @@ -0,0 +1,1077 @@ + + + + +AbstractBlockChain (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AbstractBlockChain

+
+
java.lang.Object +
org.bitcoinj.core.AbstractBlockChain
+
+
+
+
Direct Known Subclasses:
+
BlockChain, FullPrunedBlockChain
+
+
+
public abstract class AbstractBlockChain +extends Object
+

An AbstractBlockChain holds a series of Block objects, links them together, and knows how to verify that + the chain follows the rules of the NetworkParameters for this chain.

+ +

It can be connected to a Wallet, and also TransactionReceivedInBlockListeners that can receive transactions and + notifications of re-organizations.

+ +

An AbstractBlockChain implementation must be connected to a BlockStore implementation. The chain object + by itself doesn't store any data, that's delegated to the store. Which store you use is a decision best made by + reading the getting started guide, but briefly, fully validating block chains need fully validating stores. In + the lightweight SPV mode, a SPVBlockStore is the right choice.

+ +

This class implements an abstract class which makes it simple to create a BlockChain that does/doesn't do full + verification. It verifies headers and is implements most of what is required to implement SPV mode, but + also provides callback hooks which can be used to do full verification.

+ +

There are two subclasses of AbstractBlockChain that are useful: BlockChain, which is the simplest + class and implements simplified payment verification. This is a lightweight and efficient mode that does + not verify the contents of blocks, just their headers. A FullPrunedBlockChain paired with a + MemoryFullPrunedBlockStore implements full verification, which is equivalent to + Bitcoin Core. To learn more about the alternative security models, please consult the articles on the + website.

+ + Theory + +

The 'chain' is actually a tree although in normal operation it operates mostly as a list of Blocks. + When multiple new head blocks are found simultaneously, there are multiple stories of the economy competing to become + the one true consensus. This can happen naturally when two miners solve a block within a few seconds of each other, + or it can happen when the chain is under attack.

+ +

A reference to the head block of the best known chain is stored. If you can reach the genesis block by repeatedly + walking through the prevBlock pointers, then we say this is a full chain. If you cannot reach the genesis block + we say it is an orphan chain. Orphan chains can occur when blocks are solved and received during the initial block + chain download, or if we connect to a peer that doesn't send us blocks in order.

+ +

A reorganize occurs when the blocks that make up the best known chain change. Note that simply adding a + new block to the top of the best chain isn't a reorganize, but that a reorganize is always triggered by adding + a new block that connects to some other (non best head) block. By "best" we mean the chain representing the largest + amount of work done.

+ +

Every so often the block chain passes a difficulty transition point. At that time, all the blocks in the last + 2016 blocks are examined and a new difficulty target is calculated from them.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      lock

      +
      protected final ReentrantLock lock
      +
      synchronization lock
      +
      +
    • +
    • +
      +

      chainHead

      +
      protected StoredBlock chainHead
      +
      Tracks the top of the best known chain.

      + + Following this one down to the genesis block produces the story of the economy from the creation of Bitcoin + until the present day. The chain head can change if a new set of blocks is received that results in a chain of + greater work than the one obtained by following this one down. In that case a reorganize is triggered, + potentially invalidating transactions in our wallet.

      +
      +
    • +
    • +
      +

      params

      +
      protected final NetworkParameters params
      +
      network parameters for this chain
      +
      +
    • +
    • +
      +

      FP_ESTIMATOR_ALPHA

      +
      public static final double FP_ESTIMATOR_ALPHA
      +
      False positive estimation uses a double exponential moving average.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      FP_ESTIMATOR_BETA

      +
      public static final double FP_ESTIMATOR_BETA
      +
      False positive estimation uses a double exponential moving average.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AbstractBlockChain

      +
      public AbstractBlockChain(Network network, + List<? extends Wallet> wallets, + BlockStore blockStore) + throws BlockStoreException
      +
      Constructs a BlockChain connected to the given list of listeners (wallets) and a store.
      +
      +
      Parameters:
      +
      network - network for this chain
      +
      wallets - list of listeners (wallets)
      +
      blockStore - where to store blocks
      +
      Throws:
      +
      BlockStoreException - if a failure occurs while storing a block
      +
      +
      +
    • +
    • +
      +

      AbstractBlockChain

      +
      public AbstractBlockChain(NetworkParameters params, + List<? extends Wallet> wallets, + BlockStore blockStore) + throws BlockStoreException
      +
      Constructs a BlockChain connected to the given list of listeners (wallets) and a store.
      +
      +
      Parameters:
      +
      params - network parameters for this chain
      +
      wallets - list of listeners (wallets)
      +
      blockStore - where to store blocks
      +
      Throws:
      +
      BlockStoreException - if a failure occurs while storing a block
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      addWallet

      +
      public final void addWallet(Wallet wallet)
      +
      Add a wallet to the BlockChain. Note that the wallet will be unaffected by any blocks received while it + was not part of this BlockChain. This method is useful if the wallet has just been created, and its keys + have never been in use, or if the wallet has been loaded along with the BlockChain. Note that adding multiple + wallets is not well tested!
      +
      +
      Parameters:
      +
      wallet - wallet to add
      +
      +
      +
    • +
    • +
      +

      removeWallet

      +
      public void removeWallet(Wallet wallet)
      +
      Remove a wallet from the chain.
      +
      +
      Parameters:
      +
      wallet - wallet to remove
      +
      +
      +
    • +
    • +
      +

      addNewBestBlockListener

      +
      public void addNewBestBlockListener(NewBestBlockListener listener)
      +
      Adds a NewBestBlockListener listener to the chain.
      +
      +
      Parameters:
      +
      listener - listener to add
      +
      +
      +
    • +
    • +
      +

      addNewBestBlockListener

      +
      public final void addNewBestBlockListener(Executor executor, + NewBestBlockListener listener)
      +
      Adds a NewBestBlockListener listener to the chain.
      +
      +
      Parameters:
      +
      executor - executor to listen on
      +
      listener - listener to add
      +
      +
      +
    • +
    • +
      +

      addReorganizeListener

      +
      public void addReorganizeListener(ReorganizeListener listener)
      +
      Adds a generic ReorganizeListener listener to the chain.
      +
      +
      Parameters:
      +
      listener - listener to add
      +
      +
      +
    • +
    • +
      +

      addReorganizeListener

      +
      public final void addReorganizeListener(Executor executor, + ReorganizeListener listener)
      +
      Adds a generic ReorganizeListener listener to the chain.
      +
      +
      Parameters:
      +
      executor - executor to listen on
      +
      listener - listener to add
      +
      +
      +
    • +
    • +
      +

      addTransactionReceivedListener

      +
      public void addTransactionReceivedListener(TransactionReceivedInBlockListener listener)
      +
      Adds a generic TransactionReceivedInBlockListener listener to the chain.
      +
      +
      Parameters:
      +
      listener - listener to add
      +
      +
      +
    • +
    • +
      +

      addTransactionReceivedListener

      +
      public final void addTransactionReceivedListener(Executor executor, + TransactionReceivedInBlockListener listener)
      +
      Adds a generic TransactionReceivedInBlockListener listener to the chain.
      +
      +
      Parameters:
      +
      executor - executor to listen on
      +
      listener - listener to add
      +
      +
      +
    • +
    • +
      +

      removeNewBestBlockListener

      +
      public void removeNewBestBlockListener(NewBestBlockListener listener)
      +
      Removes the given NewBestBlockListener from the chain.
      +
      +
      Parameters:
      +
      listener - listener to remove
      +
      +
      +
    • +
    • +
      +

      removeReorganizeListener

      +
      public void removeReorganizeListener(ReorganizeListener listener)
      +
      Removes the given ReorganizeListener from the chain.
      +
      +
      Parameters:
      +
      listener - listener to remove
      +
      +
      +
    • +
    • +
      +

      removeTransactionReceivedListener

      +
      public void removeTransactionReceivedListener(TransactionReceivedInBlockListener listener)
      +
      Removes the given TransactionReceivedInBlockListener from the chain.
      +
      +
      Parameters:
      +
      listener - listener to remove
      +
      +
      +
    • +
    • +
      +

      getBlockStore

      +
      public BlockStore getBlockStore()
      +
      Returns the BlockStore the chain was constructed with. You can use this to iterate over the chain.
      +
      +
      Returns:
      +
      the BlockStore the chain was constructed with
      +
      +
      +
    • +
    • +
      +

      addToBlockStore

      +
      protected abstract StoredBlock addToBlockStore(StoredBlock storedPrev, + Block block) + throws BlockStoreException, +VerificationException
      +
      Adds/updates the given Block with the block store. + This version is used when the transactions have not been verified.
      +
      +
      Parameters:
      +
      storedPrev - The StoredBlock which immediately precedes block.
      +
      block - The Block to add/update.
      +
      Returns:
      +
      the newly created StoredBlock
      +
      Throws:
      +
      BlockStoreException - if a failure occurs while storing a block
      +
      VerificationException - if the block is invalid
      +
      +
      +
    • +
    • +
      +

      addToBlockStore

      +
      protected abstract StoredBlock addToBlockStore(StoredBlock storedPrev, + Block header, + @Nullable + TransactionOutputChanges txOutputChanges) + throws BlockStoreException, +VerificationException
      +
      Adds/updates the given StoredBlock with the block store. + This version is used when the transactions have already been verified to properly spend txOutputChanges.
      +
      +
      Parameters:
      +
      storedPrev - The StoredBlock which immediately precedes block.
      +
      header - The StoredBlock to add/update.
      +
      txOutputChanges - The total sum of all changes made by this block to the set of open transaction outputs + (from a call to connectTransactions), if in fully verifying mode (null otherwise).
      +
      Returns:
      +
      the newly created StoredBlock
      +
      Throws:
      +
      BlockStoreException - if a failure occurs while storing a block
      +
      VerificationException - if the block is invalid
      +
      +
      +
    • +
    • +
      +

      rollbackBlockStore

      +
      protected abstract void rollbackBlockStore(int height) + throws BlockStoreException
      +
      Rollback the block store to a given height. This is currently only supported by BlockChain instances.
      +
      +
      Parameters:
      +
      height - height to roll back to
      +
      Throws:
      +
      BlockStoreException - if the operation fails or is unsupported.
      +
      +
      +
    • +
    • +
      +

      doSetChainHead

      +
      protected abstract void doSetChainHead(StoredBlock chainHead) + throws BlockStoreException
      +
      Called before setting chain head in memory. + Should write the new head to block store and then commit any database transactions + that were started by disconnectTransactions/connectTransactions.
      +
      +
      Parameters:
      +
      chainHead - chain head to set
      +
      Throws:
      +
      BlockStoreException - if a failure occurs while storing a block
      +
      +
      +
    • +
    • +
      +

      notSettingChainHead

      +
      protected abstract void notSettingChainHead() + throws BlockStoreException
      +
      Called if we (possibly) previously called disconnectTransaction/connectTransactions, + but will not be calling preSetChainHead as a block failed verification. + Can be used to abort database transactions that were started by + disconnectTransactions/connectTransactions.
      +
      +
      Throws:
      +
      BlockStoreException - if a failure occurs while storing a block
      +
      +
      +
    • +
    • +
      +

      getStoredBlockInCurrentScope

      +
      protected abstract StoredBlock getStoredBlockInCurrentScope(Sha256Hash hash) + throws BlockStoreException
      +
      For a standard BlockChain, this should return blockStore.get(hash), + for a FullPrunedBlockChain blockStore.getOnceUndoableStoredBlock(hash)
      +
      +
      Parameters:
      +
      hash - hash of block to fetch
      +
      Returns:
      +
      block with matching hash
      +
      Throws:
      +
      BlockStoreException - if a failure occurs while storing a block
      +
      +
      +
    • +
    • +
      +

      add

      +
      public boolean add(Block block) + throws VerificationException, +PrunedException
      +
      Processes a received block and tries to add it to the chain. If there's something wrong with the block an + exception is thrown. If the block is OK but cannot be connected to the chain at this time, returns false. + If the block can be connected to the chain, returns true. + Accessing block's transactions in another thread while this method runs may result in undefined behavior.
      +
      +
      Parameters:
      +
      block - block to add
      +
      Returns:
      +
      true if block can be connected, false if block is valid but can't be connected
      +
      Throws:
      +
      VerificationException - block is invalid or contains invalid transactions
      +
      PrunedException - a reorg that is too-long for our stored block data has occurred
      +
      +
      +
    • +
    • +
      +

      add

      +
      public boolean add(FilteredBlock block) + throws VerificationException, +PrunedException
      +
      Processes a received block and tries to add it to the chain. If there's something wrong with the block an + exception is thrown. If the block is OK but cannot be connected to the chain at this time, returns false. + If the block can be connected to the chain, returns true.
      +
      +
      Parameters:
      +
      block - received block
      +
      Returns:
      +
      true if block can be connected, false if block is valid but can't be connected
      +
      Throws:
      +
      VerificationException - if invalid block
      +
      PrunedException - a reorg that is too-long for our stored block data has occurred
      +
      +
      +
    • +
    • +
      +

      shouldVerifyTransactions

      +
      protected abstract boolean shouldVerifyTransactions()
      +
      Whether or not we are maintaining a set of unspent outputs and are verifying all transactions. + Also indicates that all calls to add() should provide a block containing transactions
      +
      +
      Returns:
      +
      true if we are verifying all transactions
      +
      +
      +
    • +
    • +
      +

      connectTransactions

      +
      protected abstract TransactionOutputChanges connectTransactions(int height, + Block block) + throws VerificationException, +BlockStoreException
      +
      Connect each transaction in block.transactions, verifying them as we go and removing spent outputs + If an error is encountered in a transaction, no changes should be made to the underlying BlockStore. + and a VerificationException should be thrown. + Only called if(shouldVerifyTransactions())
      +
      +
      Parameters:
      +
      height - block height to attach at
      +
      block - block to connect
      +
      Returns:
      +
      The full set of all changes made to the set of open transaction outputs.
      +
      Throws:
      +
      VerificationException - if an attempt was made to spend an already-spent output, or if a transaction incorrectly solved an output script.
      +
      BlockStoreException - if the block store had an underlying error.
      +
      +
      +
    • +
    • +
      +

      connectTransactions

      +
      protected abstract TransactionOutputChanges connectTransactions(StoredBlock newBlock) + throws VerificationException, +BlockStoreException, +PrunedException
      +
      Load newBlock from BlockStore and connect its transactions, returning changes to the set of unspent transactions. + If an error is encountered in a transaction, no changes should be made to the underlying BlockStore. + Only called if(shouldVerifyTransactions())
      +
      +
      Parameters:
      +
      newBlock - block to load
      +
      Returns:
      +
      The full set of all changes made to the set of open transaction outputs.
      +
      Throws:
      +
      PrunedException - if newBlock does not exist as a StoredUndoableBlock in the block store.
      +
      VerificationException - if an attempt was made to spend an already-spent output, or if a transaction incorrectly solved an output script.
      +
      BlockStoreException - if the block store had an underlying error or newBlock does not exist in the block store at all.
      +
      +
      +
    • +
    • +
      +

      drainOrphanBlocks

      +
      public Set<Sha256Hash> drainOrphanBlocks()
      +
      Returns the hashes of the currently stored orphan blocks and then deletes them from this objects storage. + Used by Peer when a filter exhaustion event has occurred and thus any orphan blocks that have been downloaded + might be inaccurate/incomplete.
      +
      +
      Returns:
      +
      hashes of deleted blocks
      +
      +
      +
    • +
    • +
      +

      disconnectTransactions

      +
      protected abstract void disconnectTransactions(StoredBlock block) + throws PrunedException, +BlockStoreException
      +
      Disconnect each transaction in the block (after reading it from the block store) + Only called if(shouldVerifyTransactions())
      +
      +
      Parameters:
      +
      block - block to disconnect
      +
      Throws:
      +
      PrunedException - if block does not exist as a StoredUndoableBlock in the block store.
      +
      BlockStoreException - if the block store had an underlying error or block does not exist in the block store at all.
      +
      +
      +
    • +
    • +
      +

      getBestChainHeight

      +
      public final int getBestChainHeight()
      +
      +
      Returns:
      +
      the height of the best known chain, convenience for getChainHead().getHeight().
      +
      +
      +
    • +
    • +
      +

      setChainHead

      +
      protected void setChainHead(StoredBlock chainHead) + throws BlockStoreException
      +
      +
      Parameters:
      +
      chainHead - chain head to set
      +
      Throws:
      +
      BlockStoreException - if a failure occurs while storing a block
      +
      +
      +
    • +
    • +
      +

      getChainHead

      +
      public StoredBlock getChainHead()
      +
      Returns the block at the head of the current best chain. This is the block which represents the greatest + amount of cumulative work done.
      +
      +
      Returns:
      +
      block at the head of the current best chain
      +
      +
      +
    • +
    • +
      +

      getOrphanRoot

      +
      @Nullable +public Block getOrphanRoot(Sha256Hash from)
      +
      An orphan block is one that does not connect to the chain anywhere (ie we can't find its parent, therefore + it's an orphan). Typically, this occurs when we are downloading the chain and didn't reach the head yet, and/or + if a block is solved whilst we are downloading. It's possible that we see a small amount of orphan blocks which + chain together, this method tries walking backwards through the known orphan blocks to find the bottom-most.
      +
      +
      Parameters:
      +
      from - hash of block to walk backwards from
      +
      Returns:
      +
      from or one of froms parents, or null if "from" does not identify an orphan block
      +
      +
      +
    • +
    • +
      +

      isOrphan

      +
      public boolean isOrphan(Sha256Hash block)
      +
      Returns true if the given block is currently in the orphan blocks list.
      +
      +
      Parameters:
      +
      block - block to check
      +
      Returns:
      +
      true if block is an orphan
      +
      +
      +
    • +
    • +
      +

      estimateBlockTimeInstant

      +
      public Instant estimateBlockTimeInstant(int height)
      +
      Returns an estimate of when the given block will be reached, assuming a perfect 10 minute average for each + block. This is useful for turning transaction lock times into human-readable times. Note that a height in + the past will still be estimated, even though the time of solving is actually known (we won't scan backwards + through the chain to obtain the right answer).
      +
      +
      Parameters:
      +
      height - block time to estimate
      +
      Returns:
      +
      estimated time block will be mined
      +
      +
      +
    • +
    • +
      +

      estimateBlockTime

      +
      @Deprecated +public Date estimateBlockTime(int height)
      + +
      +
    • +
    • +
      +

      getHeightFuture

      +
      public ListenableCompletableFuture<StoredBlock> getHeightFuture(int height)
      +
      Returns a future that completes when the block chain has reached the given height. Yields the + StoredBlock of the block that reaches that height first. The future completes on a peer thread.
      +
      +
      Parameters:
      +
      height - desired height
      +
      Returns:
      +
      future that will complete when height is reached
      +
      +
      +
    • +
    • +
      +

      getFalsePositiveRate

      +
      public double getFalsePositiveRate()
      +
      The false positive rate is the average over all blockchain transactions of: + + - 1.0 if the transaction was false-positive (was irrelevant to all listeners) + - 0.0 if the transaction was relevant or filtered out
      +
      +
      Returns:
      +
      the false positive rate
      +
      +
      +
    • +
    • +
      +

      trackFilteredTransactions

      +
      protected void trackFilteredTransactions(int count)
      +
      We completed handling of a filtered block. Update false-positive estimate based + on the total number of transactions in the original block. + + count includes filtered transactions, transactions that were passed in and were relevant + and transactions that were false positives (i.e. includes all transactions in the block).
      +
      +
      Parameters:
      +
      count - total number of transactions in original block
      +
      +
      +
    • +
    • +
      +

      resetFalsePositiveEstimate

      +
      public void resetFalsePositiveEstimate()
      +
      Resets estimates of false positives. Used when the filter is sent to the peer.
      +
      +
    • +
    • +
      +

      getVersionTally

      +
      protected VersionTally getVersionTally()
      +
      +
      Returns:
      +
      version tally (not thread safe!)
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/AddressMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/AddressMessage.html new file mode 100644 index 000000000..b14227a3e --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/AddressMessage.html @@ -0,0 +1,268 @@ + + + + +AddressMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AddressMessage

+
+
java.lang.Object +
org.bitcoinj.core.BaseMessage +
org.bitcoinj.core.AddressMessage
+
+
+
+
+
All Implemented Interfaces:
+
Message
+
+
+
Direct Known Subclasses:
+
AddressV1Message, AddressV2Message
+
+
+
public abstract class AddressMessage +extends BaseMessage
+
Abstract superclass for address messages on the P2P network, which contain network addresses of other peers. This is + one of the ways peers can find each other without using the PeerDiscovery mechanism.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AddressMessage

      +
      protected AddressMessage(List<PeerAddress> addresses)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/AddressV1Message.html b/javadoc/0.17-rc1/org/bitcoinj/core/AddressV1Message.html new file mode 100644 index 000000000..e8c3c4e3d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/AddressV1Message.html @@ -0,0 +1,224 @@ + + + + +AddressV1Message (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AddressV1Message

+
+ +
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class AddressV1Message +extends AddressMessage
+
Represents an "addr" message on the P2P network, which contains broadcast IP addresses of other peers. This is + one of the ways peers can find each other without using the PeerDiscovery mechanism. +

+ Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/AddressV2Message.html b/javadoc/0.17-rc1/org/bitcoinj/core/AddressV2Message.html new file mode 100644 index 000000000..6bc6a10f2 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/AddressV2Message.html @@ -0,0 +1,226 @@ + + + + +AddressV2Message (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AddressV2Message

+
+ +
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class AddressV2Message +extends AddressMessage
+
Represents an "addrv2" message on the P2P network, which contains broadcast addresses of other peers. This is + one of the ways peers can find each other without using the PeerDiscovery mechanism. +

+ See BIP155 for details. +

+ Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/BaseMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/BaseMessage.html new file mode 100644 index 000000000..38a6edbe0 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/BaseMessage.html @@ -0,0 +1,229 @@ + + + + +BaseMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BaseMessage

+
+
java.lang.Object +
org.bitcoinj.core.BaseMessage
+
+
+
+
All Implemented Interfaces:
+
Message
+
+
+
Direct Known Subclasses:
+
AddressMessage, Block, BloomFilter, EmptyMessage, FeeFilterMessage, FilteredBlock, GetBlocksMessage, HeadersMessage, ListMessage, Ping, Pong, RejectMessage, Transaction, VersionMessage
+
+
+
public abstract class BaseMessage +extends Object +implements Message
+
A Message is a data structure that can be serialized/deserialized using the Bitcoin serialization format. + Specific types of messages that are used both in the blockchain, and on the wire, are derived from this + class. +

+ Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BaseMessage

      +
      public BaseMessage()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      serialize

      +
      public final byte[] serialize()
      +

      Serialize this message to a byte array that conforms to the bitcoin wire protocol.

      +
      +
      Specified by:
      +
      serialize in interface Message
      +
      Returns:
      +
      serialized data in Bitcoin protocol format
      +
      +
      +
    • +
    • +
      +

      bitcoinSerializeToStream

      +
      protected abstract void bitcoinSerializeToStream(OutputStream stream) + throws IOException
      +
      Serializes this message to the provided stream. If you just want the raw bytes use serialize().
      +
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      messageSize

      +
      public int messageSize()
      +
      Return the size of the serialized message. Note that if the message was deserialized from a payload, this + size can differ from the size of the original payload.
      +
      +
      Specified by:
      +
      messageSize in interface Message
      +
      Returns:
      +
      size of this object when serialized (in bytes)
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/BitcoinSerializer.BitcoinPacketHeader.html b/javadoc/0.17-rc1/org/bitcoinj/core/BitcoinSerializer.BitcoinPacketHeader.html new file mode 100644 index 000000000..7e83c0ecb --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/BitcoinSerializer.BitcoinPacketHeader.html @@ -0,0 +1,214 @@ + + + + +BitcoinSerializer.BitcoinPacketHeader (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BitcoinSerializer.BitcoinPacketHeader

+
+
java.lang.Object +
org.bitcoinj.core.BitcoinSerializer.BitcoinPacketHeader
+
+
+
+
Enclosing class:
+
BitcoinSerializer
+
+
+
public static class BitcoinSerializer.BitcoinPacketHeader +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      HEADER_LENGTH

      +
      public static final int HEADER_LENGTH
      +
      The largest number of bytes that a header can represent
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • + +
    • +
    • +
      +

      command

      +
      public final String command
      +
      +
    • +
    • +
      +

      size

      +
      public final int size
      +
      +
    • +
    • +
      +

      checksum

      +
      public final byte[] checksum
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/BitcoinSerializer.html b/javadoc/0.17-rc1/org/bitcoinj/core/BitcoinSerializer.html new file mode 100644 index 000000000..75f822d55 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/BitcoinSerializer.html @@ -0,0 +1,554 @@ + + + + +BitcoinSerializer (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BitcoinSerializer

+
+
java.lang.Object +
org.bitcoinj.core.MessageSerializer +
org.bitcoinj.core.BitcoinSerializer
+
+
+
+
+
public class BitcoinSerializer +extends MessageSerializer
+

Methods to serialize and de-serialize messages to the Bitcoin network format as defined in + the protocol specification.

+ +

To be able to serialize and deserialize new Message subclasses the following criteria needs to be met.

+ +
    +
  • The proper Class instance needs to be mapped to its message name in the names variable below
  • +
  • There needs to be a constructor matching: NetworkParameters params, byte[] payload
  • +
  • Message.bitcoinSerializeToStream() needs to be properly subclassed
  • +
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/Block.VerifyFlag.html b/javadoc/0.17-rc1/org/bitcoinj/core/Block.VerifyFlag.html new file mode 100644 index 000000000..829e13e50 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/Block.VerifyFlag.html @@ -0,0 +1,218 @@ + + + + +Block.VerifyFlag (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class Block.VerifyFlag

+
+
java.lang.Object +
java.lang.Enum<Block.VerifyFlag> +
org.bitcoinj.core.Block.VerifyFlag
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Block.VerifyFlag>, Constable
+
+
+
Enclosing class:
+
Block
+
+
+
public static enum Block.VerifyFlag +extends Enum<Block.VerifyFlag>
+
Flags used to control which elements of block validation are done on + received blocks.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      HEIGHT_IN_COINBASE

      +
      public static final Block.VerifyFlag HEIGHT_IN_COINBASE
      +
      Check that block height is in coinbase transaction (BIP 34).
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Block.VerifyFlag[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Block.VerifyFlag valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/Block.html b/javadoc/0.17-rc1/org/bitcoinj/core/Block.html new file mode 100644 index 000000000..2b743ff62 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/Block.html @@ -0,0 +1,1169 @@ + + + + +Block (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Block

+
+
java.lang.Object +
org.bitcoinj.core.BaseMessage +
org.bitcoinj.core.Block
+
+
+
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class Block +extends BaseMessage
+

A block is a group of transactions, and is one of the fundamental data structures of the Bitcoin system. + It records a set of Transactions together with some data that links it into a place in the global block + chain, and proves that a difficult calculation was done over its contents. See + the Bitcoin technical paper for + more detail on blocks.

+ +

To get a block, you can either build one from the raw bytes you can get from another implementation, or request one + specifically using Peer.getBlock(Sha256Hash), or grab one from a downloaded BlockChain.

+ +

Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      HEADER_SIZE

      +
      public static final int HEADER_SIZE
      +
      How many bytes are required to represent a block header WITHOUT the trailing 00 length byte.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      MAX_BLOCK_SIZE

      +
      public static final int MAX_BLOCK_SIZE
      +
      A constant shared by the entire network: how large in bytes a block is allowed to be. One day we may have to + upgrade everyone to change this, so Bitcoin can continue to grow. For now it exists as an anti-DoS measure to + avoid somebody creating a titanically huge but valid block and forcing everyone to download/store it forever.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      MAX_BLOCK_SIGOPS

      +
      public static final int MAX_BLOCK_SIGOPS
      +
      A "sigop" is a signature verification operation. Because they're expensive we also impose a separate limit on + the number in a block to prevent somebody mining a huge block that has way more sigops than normal, so is very + expensive/slow to verify.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      STANDARD_MAX_DIFFICULTY_TARGET

      +
      public static final long STANDARD_MAX_DIFFICULTY_TARGET
      +
      Standard maximum value for difficultyTarget (nBits) (Bitcoin MainNet and TestNet)
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      EASIEST_DIFFICULTY_TARGET

      +
      public static final long EASIEST_DIFFICULTY_TARGET
      +
      A value for difficultyTarget (nBits) that allows (slightly less than) half of all possible hash solutions. Used in unit testing.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      BLOCK_HEIGHT_UNKNOWN

      +
      public static final int BLOCK_HEIGHT_UNKNOWN
      +
      Value to use if the block height is unknown
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      BLOCK_HEIGHT_GENESIS

      +
      public static final int BLOCK_HEIGHT_GENESIS
      +
      Height of the first block
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      BLOCK_VERSION_GENESIS

      +
      public static final long BLOCK_VERSION_GENESIS
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      BLOCK_VERSION_BIP34

      +
      public static final long BLOCK_VERSION_BIP34
      +
      Block version introduced in BIP 34: Height in coinbase
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      BLOCK_VERSION_BIP66

      +
      public static final long BLOCK_VERSION_BIP66
      +
      Block version introduced in BIP 66: Strict DER signatures
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      BLOCK_VERSION_BIP65

      +
      public static final long BLOCK_VERSION_BIP65
      +
      Block version introduced in BIP 65: OP_CHECKLOCKTIMEVERIFY
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Block

      +
      public Block(long version, + Sha256Hash prevBlockHash, + Sha256Hash merkleRoot, + Instant time, + long difficultyTarget, + long nonce, + @Nullable + List<Transaction> transactions)
      +
      Construct a block initialized with all the given fields.
      +
      +
      Parameters:
      +
      version - This should usually be set to 1 or 2, depending on if the height is in the coinbase input.
      +
      prevBlockHash - Reference to previous block in the chain or Sha256Hash.ZERO_HASH if genesis.
      +
      merkleRoot - The root of the merkle tree formed by the transactions.
      +
      time - time when the block was mined.
      +
      difficultyTarget - Number which this block hashes lower than.
      +
      nonce - Arbitrary number to make the block hash lower than the target.
      +
      transactions - List of transactions including the coinbase, or null for header-only blocks
      +
      +
      +
    • +
    • +
      +

      Block

      +
      @Deprecated +public Block(long version, + Sha256Hash prevBlockHash, + Sha256Hash merkleRoot, + long time, + long difficultyTarget, + long nonce, + @Nullable + List<Transaction> transactions)
      + +
      Construct a block initialized with all the given fields.
      +
      +
      Parameters:
      +
      version - This should usually be set to 1 or 2, depending on if the height is in the coinbase input.
      +
      prevBlockHash - Reference to previous block in the chain or Sha256Hash.ZERO_HASH if genesis.
      +
      merkleRoot - The root of the merkle tree formed by the transactions.
      +
      time - UNIX time seconds when the block was mined.
      +
      difficultyTarget - Number which this block hashes lower than.
      +
      nonce - Arbitrary number to make the block hash lower than the target.
      +
      transactions - List of transactions including the coinbase, or null for header-only blocks
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      read

      +
      public static Block read(ByteBuffer payload) + throws BufferUnderflowException, +ProtocolException
      +
      Deserialize this message from a given payload.
      +
      +
      Parameters:
      +
      payload - payload to deserialize from
      +
      Returns:
      +
      read message
      +
      Throws:
      +
      BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      createGenesis

      +
      public static Block createGenesis(Instant time, + long difficultyTarget)
      +
      +
    • +
    • +
      +

      createGenesis

      +
      public static Block createGenesis(Instant time, + long difficultyTarget, + long nonce)
      +
      +
    • +
    • +
      +

      messageSize

      +
      public int messageSize()
      +
      Description copied from class: BaseMessage
      +
      Return the size of the serialized message. Note that if the message was deserialized from a payload, this + size can differ from the size of the original payload.
      +
      +
      Specified by:
      +
      messageSize in interface Message
      +
      Overrides:
      +
      messageSize in class BaseMessage
      +
      Returns:
      +
      size of this object when serialized (in bytes)
      +
      +
      +
    • +
    • +
      +

      bitcoinSerializeToStream

      +
      protected void bitcoinSerializeToStream(OutputStream stream) + throws IOException
      +
      Description copied from class: BaseMessage
      +
      Serializes this message to the provided stream. If you just want the raw bytes use BaseMessage.serialize().
      +
      +
      Specified by:
      +
      bitcoinSerializeToStream in class BaseMessage
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      unCache

      +
      protected void unCache()
      +
      +
    • +
    • +
      +

      getHashAsString

      +
      public String getHashAsString()
      +
      Returns the hash of the block (which for a valid, solved block should be below the target) in the form seen on + the block explorer. If you call this on block 1 in the mainnet chain + you will get "00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048".
      +
      +
    • +
    • +
      +

      getHash

      +
      public Sha256Hash getHash()
      +
      Returns the hash of the block (which for a valid, solved block should be + below the target). Big endian.
      +
      +
    • +
    • +
      +

      getWork

      +
      public BigInteger getWork() + throws VerificationException
      +
      Returns the work represented by this block.

      + + Work is defined as the number of tries needed to solve a block in the + average case. Consider a difficulty target that covers 5% of all possible + hash values. Then the work of the block will be 20. As the target gets + lower, the amount of work goes up.

      +
      +
      Throws:
      +
      VerificationException
      +
      +
      +
    • +
    • +
      +

      cloneAsHeader

      +
      public Block cloneAsHeader()
      +
      Returns a copy of the block, but without any transactions.
      +
      +
      Returns:
      +
      new, header-only Block
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      Returns a multi-line string containing a description of the contents of + the block. Use for debugging purposes only.
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      solve

      +
      public void solve()
      +

      Finds a value of nonce that makes the blocks hash lower than the difficulty target. This is called mining, but + solve() is far too slow to do real mining with. It exists only for unit testing purposes. + +

      This can loop forever if a solution cannot be found solely by incrementing nonce. It doesn't change + extraNonce.

      +
      +
    • +
    • +
      +

      getDifficultyTargetAsInteger

      +
      public BigInteger getDifficultyTargetAsInteger()
      +
      Returns the difficulty target as a 256 bit value that can be compared to a SHA-256 hash. Inside a block the + target is represented using a compact form.
      +
      +
      Returns:
      +
      difficulty target as 256-bit value
      +
      +
      +
    • +
    • +
      +

      checkProofOfWork

      +
      protected boolean checkProofOfWork(boolean throwException) + throws VerificationException
      +
      Returns true if the hash of the block is OK (lower than difficulty target).
      +
      +
      Throws:
      +
      VerificationException
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      getMerkleRoot

      +
      public Sha256Hash getMerkleRoot()
      +
      Returns the merkle root in big endian form, calculating it from transactions if necessary.
      +
      +
    • +
    • +
      +

      getWitnessRoot

      +
      public Sha256Hash getWitnessRoot()
      +
      Returns the witness root in big endian form, calculating it from transactions if necessary.
      +
      +
    • +
    • +
      +

      addTransaction

      +
      public void addTransaction(Transaction t)
      +
      Adds a transaction to this block. The nonce and merkle root are invalid after this.
      +
      +
    • +
    • +
      +

      getVersion

      +
      public long getVersion()
      +
      Returns the version of the block data structure as defined by the Bitcoin protocol.
      +
      +
    • +
    • +
      +

      getPrevBlockHash

      +
      public Sha256Hash getPrevBlockHash()
      +
      Returns the hash of the previous block in the chain, as defined by the block header.
      +
      +
    • +
    • +
      +

      time

      +
      public Instant time()
      +
      Returns the time at which the block was solved and broadcast, according to the clock of the solving node.
      +
      +
    • +
    • +
      +

      getTimeSeconds

      +
      @Deprecated +public long getTimeSeconds()
      +
      Deprecated. +
      use time()
      +
      +
      Returns the time at which the block was solved and broadcast, according to the clock of the solving node. This + is measured in seconds since the UNIX epoch (midnight Jan 1st 1970).
      +
      +
    • +
    • +
      +

      getTime

      +
      @Deprecated +public Date getTime()
      +
      Deprecated. +
      use time()
      +
      +
      Returns the time at which the block was solved and broadcast, according to the clock of the solving node.
      +
      +
    • +
    • +
      +

      getDifficultyTarget

      +
      public long getDifficultyTarget()
      +
      Returns the difficulty of the proof of work that this block should meet encoded in compact form. The BlockChain verifies that this is not too easy by looking at the length of the chain when the block is added. + To find the actual value the hash should be compared against, use + getDifficultyTargetAsInteger(). Note that this is not the same as + the difficulty value reported by the Bitcoin "getdifficulty" RPC that you may see on various block explorers. + That number is the result of applying a formula to the underlying difficulty to normalize the minimum to 1. + Calculating the difficulty that way is currently unsupported.
      +
      +
    • +
    • +
      +

      getNonce

      +
      public long getNonce()
      +
      Returns the nonce, an arbitrary value that exists only to make the hash of the block header fall below the + difficulty target.
      +
      +
    • +
    • +
      +

      getTransactions

      +
      @Nullable +public List<Transaction> getTransactions()
      +
      Returns an unmodifiable list of transactions held in this block, or null if this object represents just a header.
      +
      +
    • +
    • +
      +

      createNextBlock

      +
      public Block createNextBlock(@Nullable + Address to, + long version, + Instant time, + int height)
      +
      Returns a solved block that builds on top of this one. This exists for unit tests.
      +
      +
      Parameters:
      +
      to - if not null, 50 coins are sent to the address
      +
      version - version of the block to create
      +
      time - time of the block to create
      +
      height - block height if known, or -1 otherwise
      +
      Returns:
      +
      created block
      +
      +
      +
    • +
    • +
      +

      createNextBlock

      +
      public Block createNextBlock(@Nullable + Address to, + TransactionOutPoint prevOut)
      +
      This method is intended for test use only.
      +
      +
      Parameters:
      +
      to - if not null, 50 coins are sent to the address
      +
      prevOut - previous output to spend by the "50 coins transaction"
      +
      Returns:
      +
      created block
      +
      +
      +
    • +
    • +
      +

      createNextBlock

      +
      public Block createNextBlock(@Nullable + Address to, + Coin coinbaseValue)
      +
      This method is intended for test use only.
      +
      +
      Parameters:
      +
      to - if not null, 50 coins are sent to the address
      +
      coinbaseValue - for the coinbase
      +
      Returns:
      +
      created block
      +
      +
      +
    • +
    • +
      +

      createNextBlock

      +
      public Block createNextBlock(@Nullable + Address to)
      +
      This method is intended for test use only.
      +
      +
      Parameters:
      +
      to - if not null, 50 coins are sent to the address
      +
      Returns:
      +
      created block
      +
      +
      +
    • +
    • +
      +

      createNextBlockWithCoinbase

      +
      public Block createNextBlockWithCoinbase(long version, + byte[] pubKey, + Coin coinbaseValue, + int height)
      +
      This method is intended for test use only.
      +
      +
      Parameters:
      +
      version - version of the block to create
      +
      pubKey - for the coinbase
      +
      coinbaseValue - for the coinbase
      +
      height - block height if known, or -1 otherwise
      +
      Returns:
      +
      created block
      +
      +
      +
    • +
    • +
      +

      hasTransactions

      +
      public boolean hasTransactions()
      +
      Return whether this block contains any transactions.
      +
      +
      Returns:
      +
      true if the block contains transactions, false otherwise (is + purely a header).
      +
      +
      +
    • +
    • +
      +

      isBIP34

      +
      public boolean isBIP34()
      +
      Returns whether this block conforms to + BIP34: Height in Coinbase.
      +
      +
    • +
    • +
      +

      isBIP66

      +
      public boolean isBIP66()
      +
      Returns whether this block conforms to + BIP66: Strict DER signatures.
      +
      +
    • +
    • +
      +

      isBIP65

      +
      public boolean isBIP65()
      +
      Returns whether this block conforms to + BIP65: OP_CHECKLOCKTIMEVERIFY.
      +
      +
    • +
    • +
      +

      verify

      +
      public static void verify(NetworkParameters params, + Block block, + int height, + EnumSet<Block.VerifyFlag> flags) + throws VerificationException
      +
      Verifies both the header and that the transactions hash to the merkle root.
      +
      +
      Parameters:
      +
      params - parameters for the verification rules
      +
      block - block to verify
      +
      height - block height, if known, or -1 otherwise.
      +
      flags - flags to indicate which tests should be applied (i.e. + whether to test for height in the coinbase transaction).
      +
      Throws:
      +
      VerificationException - if at least one of the rules is violated
      +
      +
      +
    • +
    • +
      +

      verifyHeader

      +
      public static void verifyHeader(Block block) + throws VerificationException
      +
      Checks the block data to ensure it follows the rules laid out in the network parameters. Specifically, + throws an exception if the proof of work is invalid, or if the timestamp is too far from what it should be. + This is not everything that is required for a block to be valid, only what is checkable independent + of the chain and without a transaction index.
      +
      +
      Parameters:
      +
      block - block to verify
      +
      Throws:
      +
      VerificationException - if at least one of the rules is violated
      +
      +
      +
    • +
    • +
      +

      verifyTransactions

      +
      public static void verifyTransactions(NetworkParameters params, + Block block, + int height, + EnumSet<Block.VerifyFlag> flags) + throws VerificationException
      +
      Checks the block contents
      +
      +
      Parameters:
      +
      params - parameters for the verification rules
      +
      block - block to verify
      +
      height - block height, if known, or -1 otherwise. If valid, used + to validate the coinbase input script of v2 and above blocks.
      +
      flags - flags to indicate which tests should be applied (i.e. + whether to test for height in the coinbase transaction).
      +
      Throws:
      +
      VerificationException - if at least one of the rules is violated
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/BlockChain.html b/javadoc/0.17-rc1/org/bitcoinj/core/BlockChain.html new file mode 100644 index 000000000..51dd66c93 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/BlockChain.html @@ -0,0 +1,555 @@ + + + + +BlockChain (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BlockChain

+
+
java.lang.Object +
org.bitcoinj.core.AbstractBlockChain +
org.bitcoinj.core.BlockChain
+
+
+
+
+
public class BlockChain +extends AbstractBlockChain
+
A BlockChain implements the simplified payment verification mode of the Bitcoin protocol. It is the right + choice to use for programs that have limited resources as it won't verify transactions signatures or attempt to store + all of the block chain. Really, this class should be called SPVBlockChain but for backwards compatibility it is not.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      blockStore

      +
      protected final BlockStore blockStore
      +
      Keeps a map of block hashes to StoredBlocks.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      addToBlockStore

      +
      protected StoredBlock addToBlockStore(StoredBlock storedPrev, + Block blockHeader, + TransactionOutputChanges txOutChanges) + throws BlockStoreException, +VerificationException
      +
      Description copied from class: AbstractBlockChain
      +
      Adds/updates the given StoredBlock with the block store. + This version is used when the transactions have already been verified to properly spend txOutputChanges.
      +
      +
      Specified by:
      +
      addToBlockStore in class AbstractBlockChain
      +
      Parameters:
      +
      storedPrev - The StoredBlock which immediately precedes block.
      +
      blockHeader - The StoredBlock to add/update.
      +
      txOutChanges - The total sum of all changes made by this block to the set of open transaction outputs + (from a call to connectTransactions), if in fully verifying mode (null otherwise).
      +
      Returns:
      +
      the newly created StoredBlock
      +
      Throws:
      +
      BlockStoreException - if a failure occurs while storing a block
      +
      VerificationException - if the block is invalid
      +
      +
      +
    • +
    • +
      +

      addToBlockStore

      +
      protected StoredBlock addToBlockStore(StoredBlock storedPrev, + Block blockHeader) + throws BlockStoreException, +VerificationException
      +
      Description copied from class: AbstractBlockChain
      +
      Adds/updates the given Block with the block store. + This version is used when the transactions have not been verified.
      +
      +
      Specified by:
      +
      addToBlockStore in class AbstractBlockChain
      +
      Parameters:
      +
      storedPrev - The StoredBlock which immediately precedes block.
      +
      blockHeader - The Block to add/update.
      +
      Returns:
      +
      the newly created StoredBlock
      +
      Throws:
      +
      BlockStoreException - if a failure occurs while storing a block
      +
      VerificationException - if the block is invalid
      +
      +
      +
    • +
    • +
      +

      rollbackBlockStore

      +
      protected void rollbackBlockStore(int height) + throws BlockStoreException
      +
      Description copied from class: AbstractBlockChain
      +
      Rollback the block store to a given height. This is currently only supported by BlockChain instances.
      +
      +
      Specified by:
      +
      rollbackBlockStore in class AbstractBlockChain
      +
      Parameters:
      +
      height - height to roll back to
      +
      Throws:
      +
      BlockStoreException - if the operation fails or is unsupported.
      +
      +
      +
    • +
    • +
      +

      shouldVerifyTransactions

      +
      protected boolean shouldVerifyTransactions()
      +
      Description copied from class: AbstractBlockChain
      +
      Whether or not we are maintaining a set of unspent outputs and are verifying all transactions. + Also indicates that all calls to add() should provide a block containing transactions
      +
      +
      Specified by:
      +
      shouldVerifyTransactions in class AbstractBlockChain
      +
      Returns:
      +
      true if we are verifying all transactions
      +
      +
      +
    • +
    • +
      +

      connectTransactions

      +
      protected TransactionOutputChanges connectTransactions(int height, + Block block)
      +
      Description copied from class: AbstractBlockChain
      +
      Connect each transaction in block.transactions, verifying them as we go and removing spent outputs + If an error is encountered in a transaction, no changes should be made to the underlying BlockStore. + and a VerificationException should be thrown. + Only called if(shouldVerifyTransactions())
      +
      +
      Specified by:
      +
      connectTransactions in class AbstractBlockChain
      +
      Parameters:
      +
      height - block height to attach at
      +
      block - block to connect
      +
      Returns:
      +
      The full set of all changes made to the set of open transaction outputs.
      +
      +
      +
    • +
    • +
      +

      connectTransactions

      +
      protected TransactionOutputChanges connectTransactions(StoredBlock newBlock)
      +
      Description copied from class: AbstractBlockChain
      +
      Load newBlock from BlockStore and connect its transactions, returning changes to the set of unspent transactions. + If an error is encountered in a transaction, no changes should be made to the underlying BlockStore. + Only called if(shouldVerifyTransactions())
      +
      +
      Specified by:
      +
      connectTransactions in class AbstractBlockChain
      +
      Parameters:
      +
      newBlock - block to load
      +
      Returns:
      +
      The full set of all changes made to the set of open transaction outputs.
      +
      +
      +
    • +
    • +
      +

      disconnectTransactions

      +
      protected void disconnectTransactions(StoredBlock block)
      +
      Description copied from class: AbstractBlockChain
      +
      Disconnect each transaction in the block (after reading it from the block store) + Only called if(shouldVerifyTransactions())
      +
      +
      Specified by:
      +
      disconnectTransactions in class AbstractBlockChain
      +
      Parameters:
      +
      block - block to disconnect
      +
      +
      +
    • +
    • +
      +

      doSetChainHead

      +
      protected void doSetChainHead(StoredBlock chainHead) + throws BlockStoreException
      +
      Description copied from class: AbstractBlockChain
      +
      Called before setting chain head in memory. + Should write the new head to block store and then commit any database transactions + that were started by disconnectTransactions/connectTransactions.
      +
      +
      Specified by:
      +
      doSetChainHead in class AbstractBlockChain
      +
      Parameters:
      +
      chainHead - chain head to set
      +
      Throws:
      +
      BlockStoreException - if a failure occurs while storing a block
      +
      +
      +
    • +
    • +
      +

      notSettingChainHead

      +
      protected void notSettingChainHead() + throws BlockStoreException
      +
      Description copied from class: AbstractBlockChain
      +
      Called if we (possibly) previously called disconnectTransaction/connectTransactions, + but will not be calling preSetChainHead as a block failed verification. + Can be used to abort database transactions that were started by + disconnectTransactions/connectTransactions.
      +
      +
      Specified by:
      +
      notSettingChainHead in class AbstractBlockChain
      +
      Throws:
      +
      BlockStoreException - if a failure occurs while storing a block
      +
      +
      +
    • +
    • +
      +

      getStoredBlockInCurrentScope

      +
      protected StoredBlock getStoredBlockInCurrentScope(Sha256Hash hash) + throws BlockStoreException
      +
      Description copied from class: AbstractBlockChain
      +
      For a standard BlockChain, this should return blockStore.get(hash), + for a FullPrunedBlockChain blockStore.getOnceUndoableStoredBlock(hash)
      +
      +
      Specified by:
      +
      getStoredBlockInCurrentScope in class AbstractBlockChain
      +
      Parameters:
      +
      hash - hash of block to fetch
      +
      Returns:
      +
      block with matching hash
      +
      Throws:
      +
      BlockStoreException - if a failure occurs while storing a block
      +
      +
      +
    • +
    • +
      +

      add

      +
      public boolean add(FilteredBlock block) + throws VerificationException, +PrunedException
      +
      Description copied from class: AbstractBlockChain
      +
      Processes a received block and tries to add it to the chain. If there's something wrong with the block an + exception is thrown. If the block is OK but cannot be connected to the chain at this time, returns false. + If the block can be connected to the chain, returns true.
      +
      +
      Overrides:
      +
      add in class AbstractBlockChain
      +
      Parameters:
      +
      block - received block
      +
      Returns:
      +
      true if block can be connected, false if block is valid but can't be connected
      +
      Throws:
      +
      VerificationException - if invalid block
      +
      PrunedException - a reorg that is too-long for our stored block data has occurred
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/BlockLocator.html b/javadoc/0.17-rc1/org/bitcoinj/core/BlockLocator.html new file mode 100644 index 000000000..c15444a57 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/BlockLocator.html @@ -0,0 +1,262 @@ + + + + +BlockLocator (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BlockLocator

+
+
java.lang.Object +
org.bitcoinj.core.BlockLocator
+
+
+
+
public final class BlockLocator +extends Object
+
Represents Block Locator in GetBlocks and GetHeaders messages
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BlockLocator

      +
      @Deprecated +public BlockLocator()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      BlockLocator

      +
      public BlockLocator(List<Sha256Hash> hashes)
      +
      Creates a Block locator with defined list of hashes.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      add

      +
      @Deprecated +public BlockLocator add(Sha256Hash hash)
      +
      Deprecated. + +
      +
      Add a Sha256Hash to a newly created block locator.
      +
      +
    • +
    • +
      +

      size

      +
      public int size()
      +
      Returns the number of hashes in this block locator.
      +
      +
    • +
    • +
      +

      getHashes

      +
      public List<Sha256Hash> getHashes()
      +
      Returns List of Block locator hashes.
      +
      +
    • +
    • +
      +

      get

      +
      public Sha256Hash get(int i)
      +
      Get hash by index from this block locator.
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/BloomFilter.BloomUpdate.html b/javadoc/0.17-rc1/org/bitcoinj/core/BloomFilter.BloomUpdate.html new file mode 100644 index 000000000..5fda9f20c --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/BloomFilter.BloomUpdate.html @@ -0,0 +1,234 @@ + + + + +BloomFilter.BloomUpdate (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class BloomFilter.BloomUpdate

+
+
java.lang.Object +
java.lang.Enum<BloomFilter.BloomUpdate> +
org.bitcoinj.core.BloomFilter.BloomUpdate
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<BloomFilter.BloomUpdate>, Constable
+
+
+
Enclosing class:
+
BloomFilter
+
+
+
public static enum BloomFilter.BloomUpdate +extends Enum<BloomFilter.BloomUpdate>
+
The BLOOM_UPDATE_* constants control when the bloom filter is auto-updated by the peer using + it as a filter, either never, for all outputs or only for P2PK outputs (default)
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static BloomFilter.BloomUpdate[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static BloomFilter.BloomUpdate valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/BloomFilter.html b/javadoc/0.17-rc1/org/bitcoinj/core/BloomFilter.html new file mode 100644 index 000000000..cb8f54f7f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/BloomFilter.html @@ -0,0 +1,490 @@ + + + + +BloomFilter (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BloomFilter

+
+
java.lang.Object +
org.bitcoinj.core.BaseMessage +
org.bitcoinj.core.BloomFilter
+
+
+
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class BloomFilter +extends BaseMessage
+

A Bloom filter is a probabilistic data structure which can be sent to another client so that it can avoid + sending us transactions that aren't relevant to our set of keys. This allows for significantly more efficient + use of available network bandwidth and CPU time.

+ +

Because a Bloom filter is probabilistic, it has a configurable false positive rate. So the filter will sometimes + match transactions that weren't inserted into it, but it will never fail to match transactions that were. This is + a useful privacy feature - if you have spare bandwidth the false positive rate can be increased so the remote peer + gets a noisy picture of what transactions are relevant to your wallet.

+ +

Instances of this class are not safe for use by multiple threads.

+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    Nested Classes
    +
    +
    Modifier and Type
    +
    Class
    +
    Description
    +
    static enum 
    + +
    +
    The BLOOM_UPDATE_* constants control when the bloom filter is auto-updated by the peer using + it as a filter, either never, for all outputs or only for P2PK outputs (default)
    +
    +
    +
    +
  • + +
  • +
    +

    Field Summary

    +
    +

    Fields inherited from interface org.bitcoinj.core.Message

    +MAX_SIZE
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    BloomFilter(int elements, + double falsePositiveRate, + int randomNonce)
    +
    +
    Constructs a filter with the given parameters which is updated on P2PK outputs only.
    +
    +
    BloomFilter(int elements, + double falsePositiveRate, + int randomNonce, + BloomFilter.BloomUpdate updateFlag)
    +
    +
    Constructs a new Bloom Filter which will provide approximately the given false positive rate when the given + number of elements have been inserted.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Creates a new FilteredBlock from the given Block, using this filter to select transactions.
    +
    +
    boolean
    + +
     
    +
    protected void
    + +
    +
    Serializes this message to the provided stream.
    +
    +
    boolean
    +
    contains(byte[] object)
    +
    +
    Returns true if the given object matches the filter either because it was inserted, or because we have a + false-positive.
    +
    +
    boolean
    + +
     
    +
    double
    +
    getFalsePositiveRate(int elements)
    +
    +
    Returns the theoretical false positive rate of this filter if were to contain the given number of elements.
    +
    + + +
    +
    The update flag controls how application of the filter to a block modifies the filter.
    +
    +
    int
    + +
     
    +
    void
    +
    insert(byte[] object)
    +
    +
    Insert the given arbitrary data into the filter
    +
    +
    void
    + +
    +
    Inserts the given transaction outpoint.
    +
    +
    void
    + +
    +
    Inserts the given key and equivalent hashed form (for the address).
    +
    +
    boolean
    + +
    +
    Returns true if this filter will match anything.
    +
    +
    void
    + +
    +
    Copies filter into this.
    +
    +
    static int
    +
    murmurHash3(byte[] data, + long nTweak, + int hashNum, + byte[] object)
    +
    +
    Applies the MurmurHash3 (x86_32) algorithm to the given data.
    +
    + +
    read(ByteBuffer payload)
    +
    +
    Deserialize this message from a given payload.
    +
    +
    void
    + +
    +
    Sets this filter to match all objects.
    +
    + + +
     
    +
    +
    +
    +
    +

    Methods inherited from class org.bitcoinj.core.BaseMessage

    +messageSize, serialize
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +

    Methods inherited from interface org.bitcoinj.core.Message

    +bitcoinSerialize, getMessageSize, unsafeBitcoinSerialize
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BloomFilter

      +
      public BloomFilter(int elements, + double falsePositiveRate, + int randomNonce)
      +
      Constructs a filter with the given parameters which is updated on P2PK outputs only.
      +
      +
    • +
    • +
      +

      BloomFilter

      +
      public BloomFilter(int elements, + double falsePositiveRate, + int randomNonce, + BloomFilter.BloomUpdate updateFlag)
      +

      Constructs a new Bloom Filter which will provide approximately the given false positive rate when the given + number of elements have been inserted. If the filter would otherwise be larger than the maximum allowed size, + it will be automatically downsized to the maximum size.

      + +

      To check the theoretical false positive rate of a given filter, use + getFalsePositiveRate(int).

      + +

      The anonymity of which coins are yours to any peer which you send a BloomFilter to is controlled by the + false positive rate. For reference, as of block 187,000, the total number of addresses used in the chain was + roughly 4.5 million. Thus, if you use a false positive rate of 0.001 (0.1%), there will be, on average, 4,500 + distinct public keys/addresses which will be thought to be yours by nodes which have your bloom filter, but + which are not actually yours. Keep in mind that a remote node can do a pretty good job estimating the order of + magnitude of the false positive rate of a given filter you provide it when considering the anonymity of a given + filter.

      + +

      In order for filtered block download to function efficiently, the number of matched transactions in any given + block should be less than (with some headroom) the maximum size of the MemoryPool used by the Peer + doing the downloading (default is TxConfidenceTable.MAX_SIZE). See the comment in processBlock(FilteredBlock) + for more information on this restriction.

      + +

      randomNonce is a tweak for the hash function used to prevent some theoretical DoS attacks. + It should be a random value, however secureness of the random value is of no great consequence.

      + +

      updateFlag is used to control filter behaviour on the server (remote node) side when it encounters a hit. + See BloomFilter.BloomUpdate for a brief description of each mode. The purpose + of this flag is to reduce network round-tripping and avoid over-dirtying the filter for the most common + wallet configurations.

      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      read

      +
      public static BloomFilter read(ByteBuffer payload) + throws BufferUnderflowException, +ProtocolException
      +
      Deserialize this message from a given payload.
      +
      +
      Parameters:
      +
      payload - payload to deserialize from
      +
      Returns:
      +
      read message
      +
      Throws:
      +
      BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      getFalsePositiveRate

      +
      public double getFalsePositiveRate(int elements)
      +
      Returns the theoretical false positive rate of this filter if were to contain the given number of elements.
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      bitcoinSerializeToStream

      +
      protected void bitcoinSerializeToStream(OutputStream stream) + throws IOException
      +
      Serializes this message to the provided stream. If you just want the raw bytes use BaseMessage.serialize().
      +
      +
      Specified by:
      +
      bitcoinSerializeToStream in class BaseMessage
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      murmurHash3

      +
      public static int murmurHash3(byte[] data, + long nTweak, + int hashNum, + byte[] object)
      +
      Applies the MurmurHash3 (x86_32) algorithm to the given data. + See this C++ code for the original.
      +
      +
    • +
    • +
      +

      contains

      +
      public boolean contains(byte[] object)
      +
      Returns true if the given object matches the filter either because it was inserted, or because we have a + false-positive.
      +
      +
    • +
    • +
      +

      insert

      +
      public void insert(byte[] object)
      +
      Insert the given arbitrary data into the filter
      +
      +
    • +
    • +
      +

      insert

      +
      public void insert(ECKey key)
      +
      Inserts the given key and equivalent hashed form (for the address).
      +
      +
    • +
    • +
      +

      insert

      +
      public void insert(TransactionOutPoint outpoint)
      +
      Inserts the given transaction outpoint.
      +
      +
    • +
    • +
      +

      setMatchAll

      +
      public void setMatchAll()
      +
      Sets this filter to match all objects. A Bloom filter which matches everything may seem pointless, however, + it is useful in order to reduce steady state bandwidth usage when you want full blocks. Instead of receiving + all transaction data twice, you will receive the vast majority of all transactions just once, at broadcast time. + Solved blocks will then be send just as Merkle trees of tx hashes, meaning a constant 32 bytes of data for each + transaction instead of 100-300 bytes as per usual.
      +
      +
    • +
    • +
      +

      merge

      +
      public void merge(BloomFilter filter)
      +
      Copies filter into this. Filter must have the same size, hash function count and nTweak or an + IllegalArgumentException will be thrown.
      +
      +
    • +
    • +
      +

      matchesAll

      +
      public boolean matchesAll()
      +
      Returns true if this filter will match anything. See setMatchAll() + for when this can be a useful thing to do.
      +
      +
    • +
    • +
      +

      getUpdateFlag

      +
      public BloomFilter.BloomUpdate getUpdateFlag()
      +
      The update flag controls how application of the filter to a block modifies the filter. See the enum javadocs + for information on what occurs and when.
      +
      +
    • +
    • +
      +

      applyAndUpdate

      +
      public FilteredBlock applyAndUpdate(Block block)
      +
      Creates a new FilteredBlock from the given Block, using this filter to select transactions. Matches can cause the + filter to be updated with the matched element, this ensures that when a filter is applied to a block, spends of + matched transactions are also matched. However it means this filter can be mutated by the operation. The returned + filtered block already has the matched transactions associated with it.
      +
      +
    • +
    • +
      +

      applyAndUpdate

      +
      public boolean applyAndUpdate(Transaction tx)
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/CheckpointManager.html b/javadoc/0.17-rc1/org/bitcoinj/core/CheckpointManager.html new file mode 100644 index 000000000..b2b02d443 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/CheckpointManager.html @@ -0,0 +1,380 @@ + + + + +CheckpointManager (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CheckpointManager

+
+
java.lang.Object +
org.bitcoinj.core.CheckpointManager
+
+
+
+
public class CheckpointManager +extends Object
+

Vends hard-coded StoredBlocks for blocks throughout the chain. Checkpoints serve two purposes:

+
    +
  1. They act as a safety mechanism against huge re-orgs that could rewrite large chunks of history, thus + constraining the block chain to be a consensus mechanism only for recent parts of the timeline.
  2. +
  3. They allow synchronization to the head of the chain for new wallets/users much faster than syncing all + headers from the genesis block.
  4. +
+ +

Checkpoints are used by the SPV BlockChain to initialize fresh + SPVBlockStores. They are not used by fully validating mode, which instead has a + different concept of checkpoints that are used to hard-code the validity of blocks that violate BIP30 (duplicate + coinbase transactions). Those "checkpoints" can be found in NetworkParameters.

+ +

Checkpoints are read from a text file, one value per line. + It consists of the magic string "TXT CHECKPOINTS 1", followed by the number of signatures + to read. The value may not be larger than 256. + If the number of signatures is larger than zero, each 65 byte ECDSA secp256k1 signature then follows. The signatures + sign the hash of all bytes that follow the last signature.

+ +

After the signatures come the number of checkpoints in the file. Then each checkpoint follows one per line in + compact format (as written by StoredBlock.serializeCompactV2(ByteBuffer)) as a base64-encoded blob.

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/Context.html b/javadoc/0.17-rc1/org/bitcoinj/core/Context.html new file mode 100644 index 000000000..84ebc6b90 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/Context.html @@ -0,0 +1,407 @@ + + + + +Context (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Context

+
+
java.lang.Object +
org.bitcoinj.core.Context
+
+
+
+
public class Context +extends Object
+

The Context object holds various objects and pieces of configuration that are scoped to a specific instantiation of + bitcoinj for a specific network. You can get an instance of this class through calling get().

+ +

Context is new in 0.13 and the library is currently in a transitional period: you should create a Context that + wraps your chosen network parameters before using the rest of the library. However if you don't, things will still + work as a Context will be created for you and stashed in thread local storage. The context is then propagated between + library created threads as needed. This automagical propagation and creation is a temporary mechanism: one day it + will be removed to avoid confusing edge cases that could occur if the developer does not fully understand it e.g. + in the case where multiple instances of the library are in use simultaneously.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      DEFAULT_EVENT_HORIZON

      +
      public static final int DEFAULT_EVENT_HORIZON
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Context

      +
      public Context()
      +
      Creates a new context object. For now, this will be done for you by the framework. Eventually you will be + expected to do this yourself in the same manner as fetching a NetworkParameters object (at the start of your app).
      +
      +
    • +
    • +
      +

      Context

      +
      @Deprecated +public Context(NetworkParameters params)
      +
      Deprecated. + +
      +
      Note that NetworkParameters have been removed from this class. Thus, this constructor just swallows them.
      +
      +
    • +
    • +
      +

      Context

      +
      public Context(int eventHorizon, + Coin feePerKb, + boolean ensureMinRequiredFee, + boolean relaxProofOfWork)
      +
      Creates a new custom context object. This is mainly meant for unit tests for now.
      +
      +
      Parameters:
      +
      eventHorizon - Number of blocks after which the library will delete data and be unable to always process reorgs. See getEventHorizon().
      +
      feePerKb - The default fee per 1000 virtual bytes of transaction data to pay when completing transactions. For details, see SendRequest.feePerKb.
      +
      ensureMinRequiredFee - Whether to ensure the minimum required fee by default when completing transactions. For details, see SendRequest.ensureMinRequiredFee.
      +
      relaxProofOfWork - If true, proof of work is not enforced. This is useful for unit-testing. See Block.checkProofOfWork(boolean).
      +
      +
      +
    • +
    • +
      +

      Context

      +
      @Deprecated +public Context(NetworkParameters params, + int eventHorizon, + Coin feePerKb, + boolean ensureMinRequiredFee)
      + +
      Note that NetworkParameters have been removed from this class. Thus, this constructor just swallows them.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      get

      +
      public static Context get()
      +
      Returns the current context that is associated with the calling thread. BitcoinJ is an API that has thread + affinity: much like OpenGL it expects each thread that accesses it to have been configured with a global Context + object. This method returns that. Note that to help you develop, this method will also propagate whichever + context was created last onto the current thread, if it's missing. However it will print an error when doing so + because propagation of contexts is meant to be done manually: this is so two libraries or subsystems that + independently use bitcoinj (or possibly alt coin forks of it) can operate correctly.
      +
      +
      Throws:
      +
      IllegalStateException - if no context exists at all or if we are in strict mode and there is no context.
      +
      +
      +
    • +
    • +
      +

      enableStrictMode

      +
      public static void enableStrictMode()
      +
      Require that new threads use propagate(Context) or ContextPropagatingThreadFactory, + rather than using a heuristic for the desired context.
      +
      +
    • +
    • +
      +

      getOrCreate

      +
      public static Context getOrCreate()
      +
      +
    • +
    • +
      +

      getOrCreate

      +
      @Deprecated +public static Context getOrCreate(NetworkParameters params)
      +
      Deprecated. + +
      +
      Note that NetworkParameters have been removed from this class. Thus, this method just swallows them.
      +
      +
    • +
    • +
      +

      propagate

      +
      public static void propagate(Context context)
      +
      Sets the given context as the current thread context. You should use this if you create your own threads that + want to create core BitcoinJ objects. Generally, if a class can accept a Context in its constructor and might + be used (even indirectly) by a thread, you will want to call this first. Your task may be simplified by using + a ContextPropagatingThreadFactory.
      +
      +
    • +
    • +
      +

      getConfidenceTable

      +
      public TxConfidenceTable getConfidenceTable()
      +
      Returns the TxConfidenceTable created by this context. The pool tracks advertised + and downloaded transactions so their confidence can be measured as a proportion of how many peers announced it. + With an un-tampered with internet connection, the more peers announce a transaction the more confidence you can + have that it's really valid.
      +
      +
    • +
    • +
      +

      getEventHorizon

      +
      public int getEventHorizon()
      +
      The event horizon is the number of blocks after which various bits of the library consider a transaction to be + so confirmed that it's safe to delete data. Re-orgs larger than the event horizon will not be correctly + processed, so the default value is high (100).
      +
      +
    • +
    • +
      +

      getFeePerKb

      +
      public Coin getFeePerKb()
      +
      The default fee per 1000 virtual bytes of transaction data to pay when completing transactions. For details, see SendRequest.feePerKb.
      +
      +
    • +
    • +
      +

      isEnsureMinRequiredFee

      +
      public boolean isEnsureMinRequiredFee()
      +
      Whether to ensure the minimum required fee by default when completing transactions. For details, see SendRequest.ensureMinRequiredFee.
      +
      +
    • +
    • +
      +

      isRelaxProofOfWork

      +
      public boolean isRelaxProofOfWork()
      +
      If this is set to true, proof of work is not enforced. This is useful for unit-testing, as we need to create + and solve fake blocks quite often.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/EmptyMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/EmptyMessage.html new file mode 100644 index 000000000..9f9f42770 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/EmptyMessage.html @@ -0,0 +1,220 @@ + + + + +EmptyMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class EmptyMessage

+
+
java.lang.Object +
org.bitcoinj.core.BaseMessage +
org.bitcoinj.core.EmptyMessage
+
+
+
+
+
All Implemented Interfaces:
+
Message
+
+
+
Direct Known Subclasses:
+
GetAddrMessage, MemoryPoolMessage, SendAddrV2Message, SendHeadersMessage, UnknownMessage, VersionAck
+
+
+
public abstract class EmptyMessage +extends BaseMessage
+

Parent class for header only messages that don't have a payload. + Currently this includes getaddr, verack and special bitcoinj class UnknownMessage.

+ +

Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      EmptyMessage

      +
      public EmptyMessage()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      messageSize

      +
      public final int messageSize()
      +
      Description copied from class: BaseMessage
      +
      Return the size of the serialized message. Note that if the message was deserialized from a payload, this + size can differ from the size of the original payload.
      +
      +
      Specified by:
      +
      messageSize in interface Message
      +
      Overrides:
      +
      messageSize in class BaseMessage
      +
      Returns:
      +
      size of this object when serialized (in bytes)
      +
      +
      +
    • +
    • +
      +

      bitcoinSerializeToStream

      +
      protected final void bitcoinSerializeToStream(OutputStream stream) + throws IOException
      +
      Description copied from class: BaseMessage
      +
      Serializes this message to the provided stream. If you just want the raw bytes use BaseMessage.serialize().
      +
      +
      Specified by:
      +
      bitcoinSerializeToStream in class BaseMessage
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/FeeFilterMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/FeeFilterMessage.html new file mode 100644 index 000000000..330fc94ba --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/FeeFilterMessage.html @@ -0,0 +1,256 @@ + + + + +FeeFilterMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FeeFilterMessage

+
+
java.lang.Object +
org.bitcoinj.core.BaseMessage +
org.bitcoinj.core.FeeFilterMessage
+
+
+
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class FeeFilterMessage +extends BaseMessage
+
Represents a "feefilter" message on the P2P network, which instructs a peer to filter transaction invs for + transactions that fall below the feerate provided. +

+ See BIP133 for details. +

+ Instances of this class are immutable.

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/FilteredBlock.html b/javadoc/0.17-rc1/org/bitcoinj/core/FilteredBlock.html new file mode 100644 index 000000000..1def46b0b --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/FilteredBlock.html @@ -0,0 +1,355 @@ + + + + +FilteredBlock (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FilteredBlock

+
+
java.lang.Object +
org.bitcoinj.core.BaseMessage +
org.bitcoinj.core.FilteredBlock
+
+
+
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class FilteredBlock +extends BaseMessage
+

A FilteredBlock is used to relay a block with its transactions filtered using a BloomFilter. It consists + of the block header and a PartialMerkleTree which contains the transactions which matched the filter.

+ +

Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      read

      +
      public static FilteredBlock read(ByteBuffer payload) + throws BufferUnderflowException, +ProtocolException
      +
      Deserialize this message from a given payload.
      +
      +
      Parameters:
      +
      payload - payload to deserialize from
      +
      Returns:
      +
      read message
      +
      Throws:
      +
      BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      bitcoinSerializeToStream

      +
      public void bitcoinSerializeToStream(OutputStream stream) + throws IOException
      +
      Description copied from class: BaseMessage
      +
      Serializes this message to the provided stream. If you just want the raw bytes use BaseMessage.serialize().
      +
      +
      Specified by:
      +
      bitcoinSerializeToStream in class BaseMessage
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      getTransactionHashes

      +
      public List<Sha256Hash> getTransactionHashes() + throws VerificationException
      +
      Gets a list of leaf hashes which are contained in the partial merkle tree in this filtered block
      +
      +
      Throws:
      +
      ProtocolException - If the partial merkle block is invalid or the merkle root of the partial merkle block doesn't match the block header
      +
      VerificationException
      +
      +
      +
    • +
    • +
      +

      getBlockHeader

      +
      public Block getBlockHeader()
      +
      Gets a copy of the block header
      +
      +
    • +
    • +
      +

      getHash

      +
      public Sha256Hash getHash()
      +
      Gets the hash of the block represented in this Filtered Block
      +
      +
    • +
    • +
      +

      provideTransaction

      +
      public boolean provideTransaction(Transaction tx) + throws VerificationException
      +
      Provide this FilteredBlock with a transaction which is in its Merkle tree.
      +
      +
      Returns:
      +
      false if the tx is not relevant to this FilteredBlock
      +
      Throws:
      +
      VerificationException
      +
      +
      +
    • +
    • +
      +

      getPartialMerkleTree

      +
      public PartialMerkleTree getPartialMerkleTree()
      +
      Returns the PartialMerkleTree object that provides the mathematical proof of transaction inclusion in the block.
      +
      +
    • +
    • +
      +

      getAssociatedTransactions

      +
      public Map<Sha256Hash,Transaction> getAssociatedTransactions()
      +
      Gets the set of transactions which were provided using provideTransaction() which match in getTransactionHashes()
      +
      +
    • +
    • +
      +

      getTransactionCount

      +
      public int getTransactionCount()
      +
      Number of transactions in this block, before it was filtered
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/FullPrunedBlockChain.html b/javadoc/0.17-rc1/org/bitcoinj/core/FullPrunedBlockChain.html new file mode 100644 index 000000000..7b6aef64f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/FullPrunedBlockChain.html @@ -0,0 +1,537 @@ + + + + +FullPrunedBlockChain (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FullPrunedBlockChain

+
+
java.lang.Object +
org.bitcoinj.core.AbstractBlockChain +
org.bitcoinj.core.FullPrunedBlockChain
+
+
+
+
+
public class FullPrunedBlockChain +extends AbstractBlockChain
+

A FullPrunedBlockChain works in conjunction with a FullPrunedBlockStore to verify all the rules of the + Bitcoin system, with the downside being a large cost in system resources. Fully verifying means all unspent + transaction outputs are stored. Once a transaction output is spent and that spend is buried deep enough, the data + related to it is deleted to ensure disk space usage doesn't grow forever. For this reason a pruning node cannot + serve the full block chain to other clients, but it nevertheless provides the same security guarantees as Bitcoin + Core does.

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/GetAddrMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/GetAddrMessage.html new file mode 100644 index 000000000..a98618478 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/GetAddrMessage.html @@ -0,0 +1,157 @@ + + + + +GetAddrMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class GetAddrMessage

+
+ +
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class GetAddrMessage +extends EmptyMessage
+

Represents the "getaddr" P2P protocol message, which requests network AddressMessages from a peer. Not to + be confused with Address which is sort of like an account number.

+ +

Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      GetAddrMessage

      +
      public GetAddrMessage()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/GetBlocksMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/GetBlocksMessage.html new file mode 100644 index 000000000..f9fabf3d7 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/GetBlocksMessage.html @@ -0,0 +1,323 @@ + + + + +GetBlocksMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class GetBlocksMessage

+
+
java.lang.Object +
org.bitcoinj.core.BaseMessage +
org.bitcoinj.core.GetBlocksMessage
+
+
+
+
+
All Implemented Interfaces:
+
Message
+
+
+
Direct Known Subclasses:
+
GetHeadersMessage
+
+
+
public class GetBlocksMessage +extends BaseMessage
+

Represents the "getblocks" P2P network message, which requests the hashes of the parts of the block chain we're + missing. Those blocks can then be downloaded with a GetDataMessage.

+ +

Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/GetDataMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/GetDataMessage.html new file mode 100644 index 000000000..9f272b651 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/GetDataMessage.html @@ -0,0 +1,283 @@ + + + + +GetDataMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class GetDataMessage

+
+ +
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class GetDataMessage +extends ListMessage
+

Represents the "getdata" P2P network message, which requests the contents of blocks or transactions given their + hashes.

+ +

Instances of this class -- that use deprecated methods -- are not safe for use by multiple threads.

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/GetHeadersMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/GetHeadersMessage.html new file mode 100644 index 000000000..2641f51d3 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/GetHeadersMessage.html @@ -0,0 +1,254 @@ + + + + +GetHeadersMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class GetHeadersMessage

+
+ +
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class GetHeadersMessage +extends GetBlocksMessage
+

The "getheaders" command is structurally identical to "getblocks", but has different meaning. On receiving this + message a Bitcoin node returns matching blocks up to the limit, but without the bodies. It is useful as an + optimization: when your wallet does not contain any keys created before a particular time, you don't have to download + the bodies for those blocks because you know there are no relevant transactions.

+ +

Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/HeadersMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/HeadersMessage.html new file mode 100644 index 000000000..1f68c18fd --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/HeadersMessage.html @@ -0,0 +1,276 @@ + + + + +HeadersMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class HeadersMessage

+
+
java.lang.Object +
org.bitcoinj.core.BaseMessage +
org.bitcoinj.core.HeadersMessage
+
+
+
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class HeadersMessage +extends BaseMessage
+

A protocol message that contains a repeated series of block headers, sent in response to the "getheaders" command. + This is useful when you want to traverse the chain but know you don't care about the block contents, for example, + because you have a freshly created wallet with no keys.

+ +

Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/InsufficientMoneyException.html b/javadoc/0.17-rc1/org/bitcoinj/core/InsufficientMoneyException.html new file mode 100644 index 000000000..6fb1f7451 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/InsufficientMoneyException.html @@ -0,0 +1,217 @@ + + + + +InsufficientMoneyException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InsufficientMoneyException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.core.InsufficientMoneyException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class InsufficientMoneyException +extends Exception
+
Thrown to indicate that you don't have enough money available to perform the requested operation.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      missing

      +
      @Nullable +public final Coin missing
      +
      Contains the number of satoshis that would have been required to complete the operation.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InsufficientMoneyException

      +
      protected InsufficientMoneyException()
      +
      +
    • +
    • +
      +

      InsufficientMoneyException

      +
      public InsufficientMoneyException(Coin missing)
      +
      +
    • +
    • +
      +

      InsufficientMoneyException

      +
      public InsufficientMoneyException(Coin missing, + String message)
      +
      +
    • +
    • +
      +

      InsufficientMoneyException

      +
      public InsufficientMoneyException(Coin missing, + Coin available, + Coin outputs, + Coin fee)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/InventoryItem.Type.html b/javadoc/0.17-rc1/org/bitcoinj/core/InventoryItem.Type.html new file mode 100644 index 000000000..76c56a9ba --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/InventoryItem.Type.html @@ -0,0 +1,299 @@ + + + + +InventoryItem.Type (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class InventoryItem.Type

+
+
java.lang.Object +
java.lang.Enum<InventoryItem.Type> +
org.bitcoinj.core.InventoryItem.Type
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<InventoryItem.Type>, Constable
+
+
+
Enclosing class:
+
InventoryItem
+
+
+
public static enum InventoryItem.Type +extends Enum<InventoryItem.Type>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      code

      +
      public final int code
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static InventoryItem.Type[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static InventoryItem.Type valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      ofCode

      +
      public static InventoryItem.Type ofCode(int code)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/InventoryItem.html b/javadoc/0.17-rc1/org/bitcoinj/core/InventoryItem.html new file mode 100644 index 000000000..25f28876b --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/InventoryItem.html @@ -0,0 +1,259 @@ + + + + +InventoryItem (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InventoryItem

+
+
java.lang.Object +
org.bitcoinj.core.InventoryItem
+
+
+
+
public class InventoryItem +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/InventoryMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/InventoryMessage.html new file mode 100644 index 000000000..e41bb8d5f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/InventoryMessage.html @@ -0,0 +1,348 @@ + + + + +InventoryMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class InventoryMessage

+
+ +
+
+
All Implemented Interfaces:
+
Message
+
+
+
Direct Known Subclasses:
+
NotFoundMessage
+
+
+
public class InventoryMessage +extends ListMessage
+

Represents the "inv" P2P network message. An inv contains a list of hashes of either blocks or transactions. It's + a bandwidth optimization - on receiving some data, a (fully validating) peer sends every connected peer an inv + containing the hash of what it saw. It'll only transmit the full thing if a peer asks for it with a + GetDataMessage.

+ +

Instances of this class -- that use deprecated methods -- are not safe for use by multiple threads.

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/ListMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/ListMessage.html new file mode 100644 index 000000000..1fc99f9ee --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/ListMessage.html @@ -0,0 +1,342 @@ + + + + +ListMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ListMessage

+
+
java.lang.Object +
org.bitcoinj.core.BaseMessage +
org.bitcoinj.core.ListMessage
+
+
+
+
+
All Implemented Interfaces:
+
Message
+
+
+
Direct Known Subclasses:
+
GetDataMessage, InventoryMessage
+
+
+
public abstract class ListMessage +extends BaseMessage
+

Abstract superclass of classes with list based payload, ie InventoryMessage and GetDataMessage.

+ +

Instances of this class -- that use deprecated methods -- are not safe for use by multiple threads.

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/LockTime.HeightLock.html b/javadoc/0.17-rc1/org/bitcoinj/core/LockTime.HeightLock.html new file mode 100644 index 000000000..7c6d13486 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/LockTime.HeightLock.html @@ -0,0 +1,164 @@ + + + + +LockTime.HeightLock (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class LockTime.HeightLock

+
+
java.lang.Object +
org.bitcoinj.core.LockTime +
org.bitcoinj.core.LockTime.HeightLock
+
+
+
+
+
Enclosing class:
+
LockTime
+
+
+
public static final class LockTime.HeightLock +extends LockTime
+
A LockTime instance that contains a block height. + Can also be zero to represent no-lock.
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      blockHeight

      +
      public int blockHeight()
      +
      +
      Returns:
      +
      block height as an int
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/LockTime.TimeLock.html b/javadoc/0.17-rc1/org/bitcoinj/core/LockTime.TimeLock.html new file mode 100644 index 000000000..46ba8361a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/LockTime.TimeLock.html @@ -0,0 +1,163 @@ + + + + +LockTime.TimeLock (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class LockTime.TimeLock

+
+
java.lang.Object +
org.bitcoinj.core.LockTime +
org.bitcoinj.core.LockTime.TimeLock
+
+
+
+
+
Enclosing class:
+
LockTime
+
+
+
public static final class LockTime.TimeLock +extends LockTime
+
A LockTime instance that contains a timestamp.
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      timestamp

      +
      public Instant timestamp()
      +
      +
      Returns:
      +
      timestamp in java.time format
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/LockTime.html b/javadoc/0.17-rc1/org/bitcoinj/core/LockTime.html new file mode 100644 index 000000000..ea4e3ca1f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/LockTime.html @@ -0,0 +1,347 @@ + + + + +LockTime (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class LockTime

+
+
java.lang.Object +
org.bitcoinj.core.LockTime
+
+
+
+
Direct Known Subclasses:
+
LockTime.HeightLock, LockTime.TimeLock
+
+
+
public abstract class LockTime +extends Object
+
Wrapper for transaction lock time, specified either as a block height LockTime.HeightLock or as a timestamp + LockTime.TimeLock (in seconds since epoch). Both are encoded into the same long "raw value", as used in the Bitcoin protocol. + The lock time is said to be "not set" if its raw value is zero (and the zero value will be represented by a LockTime.HeightLock + with value zero.) +

+ Instances of this class are immutable and should be treated as Java + value-based.

+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    Nested Classes
    +
    +
    Modifier and Type
    +
    Class
    +
    Description
    +
    static final class 
    + +
    +
    A LockTime instance that contains a block height.
    +
    +
    static final class 
    + +
    +
    A LockTime instance that contains a timestamp.
    +
    +
    +
    +
  • + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static final long
    + +
    +
    Raw values below this threshold specify a block height, otherwise a timestamp in seconds since epoch.
    +
    +
    protected final long
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    boolean
    + +
     
    +
    int
    + +
     
    +
    boolean
    + +
    +
    The lock time is considered to be set only if its raw value is greater than zero.
    +
    +
    static LockTime
    +
    of(long rawValue)
    +
    +
    Wrap a raw value (as used in the Bitcoin protocol) into a lock time.
    +
    + +
    ofBlockHeight(int blockHeight)
    +
    +
    Wrap a block height into a lock time.
    +
    + + +
    +
    Wrap a timestamp into a lock time.
    +
    +
    long
    + +
    +
    Gets the raw value as used in the Bitcoin protocol
    +
    + + +
     
    +
    static LockTime
    + +
    +
    Construct an unset lock time.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      THRESHOLD

      +
      public static final long THRESHOLD
      +
      Raw values below this threshold specify a block height, otherwise a timestamp in seconds since epoch. + Consider using lockTime instance of HeightLock or lockTime instance of TimeLock before using this constant.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      value

      +
      protected final long value
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      of

      +
      public static LockTime of(long rawValue)
      +
      Wrap a raw value (as used in the Bitcoin protocol) into a lock time.
      +
      +
      Parameters:
      +
      rawValue - raw value to be wrapped
      +
      Returns:
      +
      wrapped value
      +
      +
      +
    • +
    • +
      +

      ofBlockHeight

      +
      public static LockTime.HeightLock ofBlockHeight(int blockHeight)
      +
      Wrap a block height into a lock time.
      +
      +
      Parameters:
      +
      blockHeight - block height to be wrapped
      +
      Returns:
      +
      wrapped block height
      +
      +
      +
    • +
    • +
      +

      ofTimestamp

      +
      public static LockTime.TimeLock ofTimestamp(Instant time)
      +
      Wrap a timestamp into a lock time.
      +
      +
      Parameters:
      +
      time - timestamp to be wrapped
      +
      Returns:
      +
      wrapped timestamp
      +
      +
      +
    • +
    • +
      +

      unset

      +
      public static LockTime unset()
      +
      Construct an unset lock time.
      +
      +
      Returns:
      +
      unset lock time
      +
      +
      +
    • +
    • +
      +

      rawValue

      +
      public long rawValue()
      +
      Gets the raw value as used in the Bitcoin protocol
      +
      +
      Returns:
      +
      raw value
      +
      +
      +
    • +
    • +
      +

      isSet

      +
      public boolean isSet()
      +
      The lock time is considered to be set only if its raw value is greater than zero. + In other words, it is set if it is either a non-zero block height or a timestamp.
      +
      +
      Returns:
      +
      true if lock time is set
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/MemoryPoolMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/MemoryPoolMessage.html new file mode 100644 index 000000000..6fe6db081 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/MemoryPoolMessage.html @@ -0,0 +1,160 @@ + + + + +MemoryPoolMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MemoryPoolMessage

+
+ +
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class MemoryPoolMessage +extends EmptyMessage
+

The "mempool" message asks a remote peer to announce all transactions in its memory pool, possibly restricted by + any Bloom filter set on the connection. The list of transaction hashes comes back in an inv message. Note that + this is different to the TxConfidenceTable object which doesn't try to keep track of all pending transactions, + it's just a holding area for transactions that a part of the app may find interesting. The mempool message has + no fields.

+ +

Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MemoryPoolMessage

      +
      public MemoryPoolMessage()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/Message.html b/javadoc/0.17-rc1/org/bitcoinj/core/Message.html new file mode 100644 index 000000000..c038e582e --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/Message.html @@ -0,0 +1,245 @@ + + + + +Message (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface Message

+
+
+
+
All Known Implementing Classes:
+
AddressMessage, AddressV1Message, AddressV2Message, BaseMessage, Block, BloomFilter, EmptyMessage, FeeFilterMessage, FilteredBlock, GetAddrMessage, GetBlocksMessage, GetDataMessage, GetHeadersMessage, HeadersMessage, InventoryMessage, ListMessage, MemoryPoolMessage, NotFoundMessage, Ping, Pong, RejectMessage, SendAddrV2Message, SendHeadersMessage, Transaction, UnknownMessage, VersionAck, VersionMessage
+
+
+
public interface Message
+
A Message is a data structure that can be serialized/deserialized using the Bitcoin serialization format. + Classes that can be serialized to the blockchain or P2P protocol should implement this interface.
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static final int
    + +
    +
    Maximum size of a Bitcoin P2P Message (32 MB)
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    default byte[]
    + +
    +
    Deprecated. + +
    +
    +
    default int
    + +
    +
    Deprecated. + +
    +
    +
    int
    + +
    +
    Return the size of the serialized message.
    +
    +
    byte[]
    + +
    +
    Serialize this message to a byte array that conforms to the Bitcoin wire protocol.
    +
    +
    default byte[]
    + +
    +
    Deprecated. + +
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      MAX_SIZE

      +
      static final int MAX_SIZE
      +
      Maximum size of a Bitcoin P2P Message (32 MB)
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      messageSize

      +
      int messageSize()
      +
      Return the size of the serialized message. Note that if the message was deserialized from a payload, this + size can differ from the size of the original payload.
      +
      +
      Returns:
      +
      size of this object when serialized (in bytes)
      +
      +
      +
    • +
    • +
      +

      getMessageSize

      +
      @Deprecated +default int getMessageSize()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      serialize

      +
      byte[] serialize()
      +
      Serialize this message to a byte array that conforms to the Bitcoin wire protocol.
      +
      +
      Returns:
      +
      serialized data in Bitcoin protocol format
      +
      +
      +
    • +
    • +
      +

      bitcoinSerialize

      +
      @Deprecated +default byte[] bitcoinSerialize()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      unsafeBitcoinSerialize

      +
      @Deprecated +default byte[] unsafeBitcoinSerialize()
      +
      Deprecated. + +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/MessageSerializer.html b/javadoc/0.17-rc1/org/bitcoinj/core/MessageSerializer.html new file mode 100644 index 000000000..4fbf26d2f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/MessageSerializer.html @@ -0,0 +1,454 @@ + + + + +MessageSerializer (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MessageSerializer

+
+
java.lang.Object +
org.bitcoinj.core.MessageSerializer
+
+
+
+
Direct Known Subclasses:
+
BitcoinSerializer
+
+
+
public abstract class MessageSerializer +extends Object
+
Generic interface for classes which serialize/deserialize messages. Implementing + classes should be immutable.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/NetworkParameters.html b/javadoc/0.17-rc1/org/bitcoinj/core/NetworkParameters.html new file mode 100644 index 000000000..c63c86da3 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/NetworkParameters.html @@ -0,0 +1,1424 @@ + + + + +NetworkParameters (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NetworkParameters

+
+
java.lang.Object +
org.bitcoinj.core.NetworkParameters
+
+
+
+
Direct Known Subclasses:
+
BitcoinNetworkParams, MockAltNetworkParams
+
+
+
public abstract class NetworkParameters +extends Object
+

NetworkParameters contains the data needed for working with an instantiation of a Bitcoin chain.

+ +

This is an abstract class, concrete instantiations can be found in the params package. There are four: + one for the main network (MainNetParams), one for the public test network, and two others that are + intended for unit testing and local app development purposes. Although this class contains some aliases for + them, you are encouraged to call the static get() methods on each specific params class directly.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      PAYMENT_PROTOCOL_ID_MAINNET

      +
      @Deprecated +public static final String PAYMENT_PROTOCOL_ID_MAINNET
      +
      Deprecated.
      +
      The string used by the payment protocol to represent the main net.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      PAYMENT_PROTOCOL_ID_TESTNET

      +
      @Deprecated +public static final String PAYMENT_PROTOCOL_ID_TESTNET
      +
      Deprecated.
      +
      The string used by the payment protocol to represent the test net.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      PAYMENT_PROTOCOL_ID_SIGNET

      +
      @Deprecated +public static final String PAYMENT_PROTOCOL_ID_SIGNET
      +
      Deprecated.
      +
      The string used by the payment protocol to represent signet (note that this is non-standard).
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      PAYMENT_PROTOCOL_ID_UNIT_TESTS

      +
      @Deprecated +public static final String PAYMENT_PROTOCOL_ID_UNIT_TESTS
      +
      Deprecated.
      +
      The string used by the payment protocol to represent unit testing (note that this is non-standard).
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      PAYMENT_PROTOCOL_ID_REGTEST

      +
      @Deprecated +public static final String PAYMENT_PROTOCOL_ID_REGTEST
      +
      Deprecated.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      maxTarget

      +
      protected BigInteger maxTarget
      +
      +
    • +
    • +
      +

      port

      +
      protected int port
      +
      +
    • +
    • +
      +

      packetMagic

      +
      protected int packetMagic
      +
      +
    • +
    • +
      +

      addressHeader

      +
      protected int addressHeader
      +
      +
    • +
    • +
      +

      p2shHeader

      +
      protected int p2shHeader
      +
      +
    • +
    • +
      +

      dumpedPrivateKeyHeader

      +
      protected int dumpedPrivateKeyHeader
      +
      +
    • +
    • +
      +

      segwitAddressHrp

      +
      protected String segwitAddressHrp
      +
      +
    • +
    • +
      +

      interval

      +
      protected int interval
      +
      +
    • +
    • +
      +

      targetTimespan

      +
      protected int targetTimespan
      +
      +
    • +
    • +
      +

      bip32HeaderP2PKHpub

      +
      protected int bip32HeaderP2PKHpub
      +
      +
    • +
    • +
      +

      bip32HeaderP2PKHpriv

      +
      protected int bip32HeaderP2PKHpriv
      +
      +
    • +
    • +
      +

      bip32HeaderP2WPKHpub

      +
      protected int bip32HeaderP2WPKHpub
      +
      +
    • +
    • +
      +

      bip32HeaderP2WPKHpriv

      +
      protected int bip32HeaderP2WPKHpriv
      +
      +
    • +
    • +
      +

      majorityEnforceBlockUpgrade

      +
      protected int majorityEnforceBlockUpgrade
      +
      Used to check majorities for block version upgrade
      +
      +
    • +
    • +
      +

      majorityRejectBlockOutdated

      +
      protected int majorityRejectBlockOutdated
      +
      +
    • +
    • +
      +

      majorityWindow

      +
      protected int majorityWindow
      +
      +
    • +
    • +
      +

      id

      +
      protected final String id
      +
      See getId()
      +
      +
    • +
    • +
      +

      network

      +
      protected final Network network
      +
      +
    • +
    • +
      +

      spendableCoinbaseDepth

      +
      protected int spendableCoinbaseDepth
      +
      The depth of blocks required for a coinbase transaction to be spendable.
      +
      +
    • +
    • +
      +

      subsidyDecreaseBlockCount

      +
      protected int subsidyDecreaseBlockCount
      +
      +
    • +
    • +
      +

      dnsSeeds

      +
      protected String[] dnsSeeds
      +
      +
    • +
    • +
      +

      addrSeeds

      +
      protected int[] addrSeeds
      +
      +
    • +
    • +
      +

      checkpoints

      +
      protected Map<Integer,Sha256Hash> checkpoints
      +
      +
    • +
    • +
      +

      defaultSerializer

      +
      protected transient volatile MessageSerializer defaultSerializer
      +
      +
    • +
    • +
      +

      TARGET_TIMESPAN

      +
      public static final int TARGET_TIMESPAN
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      TARGET_SPACING

      +
      public static final int TARGET_SPACING
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      INTERVAL

      +
      public static final int INTERVAL
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      BIP16_ENFORCE_TIME

      +
      public static final Instant BIP16_ENFORCE_TIME
      +
      Blocks with a timestamp after this should enforce BIP 16, aka "Pay to script hash". This BIP changed the + network rules in a soft-forking manner, that is, blocks that don't follow the rules are accepted but not + mined upon and thus will be quickly re-orged out as long as the majority are enforcing the rule.
      +
      +
    • +
    • +
      +

      MAX_COINS

      +
      @Deprecated +public static final long MAX_COINS
      +
      Deprecated. + +
      +
      The maximum number of coins to be generated
      +
      +
    • +
    • +
      +

      MAX_MONEY

      +
      @Deprecated +public static final Coin MAX_MONEY
      +
      Deprecated. + +
      +
      The maximum money to be generated
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NetworkParameters

      +
      protected NetworkParameters(Network network)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getId

      +
      public String getId()
      +
      A Java package style string acting as unique ID for these parameters
      +
      +
      Returns:
      +
      network id string
      +
      +
      +
    • +
    • +
      +

      network

      +
      public Network network()
      +
      +
      Returns:
      +
      Network enum for this network
      +
      +
      +
    • +
    • +
      +

      getPaymentProtocolId

      +
      @Deprecated +public abstract String getPaymentProtocolId()
      + +
      +
      Returns:
      +
      the payment protocol network id string
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      fromID

      +
      @Deprecated +@Nullable +public static NetworkParameters fromID(String id)
      + +
      Return network parameters for a network id
      +
      +
      Parameters:
      +
      id - the network id
      +
      Returns:
      +
      the network parameters for the given string ID or NULL if not recognized
      +
      +
      +
    • +
    • +
      +

      of

      +
      public static NetworkParameters of(Network network)
      +
      Return network parameters for a Network. +

      + Alternative networks will be found if they have been registered with Networks registry.

      +
      +
      Parameters:
      +
      network - the network
      +
      Returns:
      +
      the network parameters for the given string ID
      +
      Throws:
      +
      IllegalArgumentException - if unknown network
      +
      +
      +
    • +
    • +
      +

      fromPmtProtocolID

      +
      @Nullable +@Deprecated +public static NetworkParameters fromPmtProtocolID(String pmtProtocolId)
      + +
      Return network parameters for a paymentProtocol ID string
      +
      +
      Parameters:
      +
      pmtProtocolId - paymentProtocol ID string
      +
      Returns:
      +
      network parameters for the given string paymentProtocolID or NULL if not recognized
      +
      +
      +
    • +
    • +
      +

      fromAddress

      +
      @Deprecated +public static NetworkParameters fromAddress(Address address)
      +
      Deprecated. +
      You should be using Address.network() instead
      +
      +
      Get a NetworkParameters from an Address. + Addresses should not be used for storing NetworkParameters. In the future Address will + be an interface that only makes a Network available.
      +
      +
      Parameters:
      +
      address - An address
      +
      Returns:
      +
      network parameters
      +
      +
      +
    • +
    • +
      +

      getSpendableCoinbaseDepth

      +
      public int getSpendableCoinbaseDepth()
      +
      +
    • +
    • +
      +

      checkDifficultyTransitions

      +
      public abstract void checkDifficultyTransitions(StoredBlock storedPrev, + Block next, + BlockStore blockStore) + throws VerificationException, +BlockStoreException
      +
      Throws an exception if the block's difficulty is not correct.
      +
      +
      Parameters:
      +
      storedPrev - previous stored block
      +
      next - proposed block
      +
      blockStore - active BlockStore
      +
      Throws:
      +
      VerificationException - if the block's difficulty is not correct.
      +
      BlockStoreException - if an error occurred accessing the BlockStore
      +
      +
      +
    • +
    • +
      +

      passesCheckpoint

      +
      public boolean passesCheckpoint(int height, + Sha256Hash hash)
      +
      Validate the hash for a given block height against checkpoints
      +
      +
      Parameters:
      +
      height - block height
      +
      hash - hash for height
      +
      Returns:
      +
      true if the block height is either not a checkpoint, or is a checkpoint and the hash matches
      +
      +
      +
    • +
    • +
      +

      isCheckpoint

      +
      public boolean isCheckpoint(int height)
      +
      Is height a checkpoint
      +
      +
      Parameters:
      +
      height - block height
      +
      Returns:
      +
      true if the given height has a recorded checkpoint
      +
      +
      +
    • +
    • +
      +

      getSubsidyDecreaseBlockCount

      +
      public int getSubsidyDecreaseBlockCount()
      +
      +
    • +
    • +
      +

      getDnsSeeds

      +
      public String[] getDnsSeeds()
      +
      Return DNS names that when resolved, give IP addresses of active peers
      +
      +
      Returns:
      +
      an array of DNS names
      +
      +
      +
    • +
    • +
      +

      getAddrSeeds

      +
      public int[] getAddrSeeds()
      +
      Return IP addresses of active peers
      +
      +
      Returns:
      +
      array of IP addresses
      +
      +
      +
    • +
    • +
      +

      getGenesisBlock

      +
      public abstract Block getGenesisBlock()
      +

      Genesis block for this chain.

      + +

      The first block in every chain is a well known constant shared between all Bitcoin implementations. For a + block to be valid, it must be eventually possible to work backwards to the genesis block by following the + prevBlockHash pointers in the block headers.

      + +

      The genesis blocks for both test and main networks contain the timestamp of when they were created, + and a message in the coinbase transaction. It says, "The Times 03/Jan/2009 Chancellor on brink of second + bailout for banks".

      +
      +
      Returns:
      +
      genesis block
      +
      +
      +
    • +
    • +
      +

      getPort

      +
      public int getPort()
      +
      Default TCP port on which to connect to nodes
      +
      +
      Returns:
      +
      default port for this network
      +
      +
      +
    • +
    • +
      +

      getPacketMagic

      +
      public int getPacketMagic()
      +
      The header bytes that identify the start of a packet on this network.
      +
      +
      Returns:
      +
      header bytes as a long
      +
      +
      +
    • +
    • +
      +

      getAddressHeader

      +
      @Deprecated +public int getAddressHeader()
      +
      Deprecated.
      +
      First byte of a base58 encoded address. See LegacyAddress.
      +
      +
      Returns:
      +
      the header value
      +
      +
      +
    • +
    • +
      +

      getP2SHHeader

      +
      @Deprecated +public int getP2SHHeader()
      +
      Deprecated.
      +
      First byte of a base58 encoded P2SH address. P2SH addresses are defined as part of BIP0013.
      +
      +
      Returns:
      +
      the header value
      +
      +
      +
    • +
    • +
      +

      getDumpedPrivateKeyHeader

      +
      public int getDumpedPrivateKeyHeader()
      +
      First byte of a base58 encoded dumped private key. See DumpedPrivateKey.
      +
      +
      Returns:
      +
      the header value
      +
      +
      +
    • +
    • +
      +

      getSegwitAddressHrp

      +
      @Deprecated +public String getSegwitAddressHrp()
      + +
      Human-readable part of bech32 encoded segwit address.
      +
      +
      Returns:
      +
      the human-readable part value
      +
      +
      +
    • +
    • +
      +

      getTargetTimespan

      +
      public int getTargetTimespan()
      +
      How much time in seconds is supposed to pass between "interval" blocks. If the actual elapsed time is + significantly different from this value, the network difficulty formula will produce a different value. Both + test and main Bitcoin networks use 2 weeks (1209600 seconds).
      +
      +
      Returns:
      +
      target timespan in seconds
      +
      +
      +
    • +
    • +
      +

      allowEmptyPeerChain

      +
      public boolean allowEmptyPeerChain()
      +
      If we are running in testnet-in-a-box mode, we allow connections to nodes with 0 non-genesis blocks.
      +
      +
      Returns:
      +
      true if allowed
      +
      +
      +
    • +
    • +
      +

      getInterval

      +
      public int getInterval()
      +
      How many blocks pass between difficulty adjustment periods. Bitcoin standardises this to be 2016.
      +
      +
      Returns:
      +
      number of blocks
      +
      +
      +
    • +
    • +
      +

      getMaxTarget

      +
      public BigInteger getMaxTarget()
      +
      Maximum target represents the easiest allowable proof of work.
      +
      +
      Returns:
      +
      maximum target integer
      +
      +
      +
    • +
    • +
      +

      getBip32HeaderP2PKHpub

      +
      public int getBip32HeaderP2PKHpub()
      +
      Returns the 4 byte header for BIP32 wallet P2PKH - public key part.
      +
      +
      Returns:
      +
      the header value
      +
      +
      +
    • +
    • +
      +

      getBip32HeaderP2PKHpriv

      +
      public int getBip32HeaderP2PKHpriv()
      +
      Returns the 4 byte header for BIP32 wallet P2PKH - private key part.
      +
      +
      Returns:
      +
      the header value
      +
      +
      +
    • +
    • +
      +

      getBip32HeaderP2WPKHpub

      +
      public int getBip32HeaderP2WPKHpub()
      +
      Returns the 4 byte header for BIP32 wallet P2WPKH - public key part.
      +
      +
      Returns:
      +
      the header value
      +
      +
      +
    • +
    • +
      +

      getBip32HeaderP2WPKHpriv

      +
      public int getBip32HeaderP2WPKHpriv()
      +
      Returns the 4 byte header for BIP32 wallet P2WPKH - private key part.
      +
      +
      Returns:
      +
      the header value
      +
      +
      +
    • +
    • +
      +

      getMaxMoney

      +
      @Deprecated +public abstract Coin getMaxMoney()
      +
      Deprecated. + +
      +
      Returns the number of coins that will be produced in total, on this + network. Where not applicable, a very large number of coins is returned + instead (e.g. the main coin issue for Dogecoin).
      +
      +
      Returns:
      +
      maximum number of coins for this network
      +
      +
      +
    • +
    • +
      +

      getMonetaryFormat

      +
      @Deprecated +public abstract MonetaryFormat getMonetaryFormat()
      +
      Deprecated. +
      Get one another way or construct your own MonetaryFormat as needed.
      +
      +
      The monetary object for this currency.
      +
      +
      Returns:
      +
      formatting utility object
      +
      +
      +
    • +
    • +
      +

      getUriScheme

      +
      @Deprecated +public abstract String getUriScheme()
      +
      Deprecated. + +
      +
      Scheme part for URIs, for example "bitcoin".
      +
      +
      Returns:
      +
      a string with the "scheme" part
      +
      +
      +
    • +
    • +
      +

      hasMaxMoney

      +
      @Deprecated +public abstract boolean hasMaxMoney()
      +
      Deprecated. + +
      +
      Returns whether this network has a maximum number of coins (finite supply) or + not. Always returns true for Bitcoin, but exists to be overridden for other + networks.
      +
      +
      Returns:
      +
      true if network has a fixed maximum number of coins
      +
      +
      +
    • +
    • +
      +

      getDefaultSerializer

      +
      public final MessageSerializer getDefaultSerializer()
      +
      Return the default serializer for this network. This is a shared serializer.
      +
      +
      Returns:
      +
      the default serializer for this network.
      +
      +
      +
    • +
    • +
      +

      getSerializer

      +
      public abstract BitcoinSerializer getSerializer()
      +
      Construct and return a custom serializer.
      +
      +
      Returns:
      +
      the serializer
      +
      +
      +
    • +
    • +
      +

      getMajorityEnforceBlockUpgrade

      +
      public int getMajorityEnforceBlockUpgrade()
      +
      The number of blocks in the last getMajorityWindow() blocks + at which to trigger a notice to the user to upgrade their client, where + the client does not understand those blocks.
      +
      +
      Returns:
      +
      number of blocks
      +
      +
      +
    • +
    • +
      +

      getMajorityRejectBlockOutdated

      +
      public int getMajorityRejectBlockOutdated()
      +
      The number of blocks in the last getMajorityWindow() blocks + at which to enforce the requirement that all new blocks are of the + newer type (i.e. outdated blocks are rejected).
      +
      +
      Returns:
      +
      number of blocks
      +
      +
      +
    • +
    • +
      +

      getMajorityWindow

      +
      public int getMajorityWindow()
      +
      The sampling window from which the version numbers of blocks are taken + in order to determine if a new block version is now the majority.
      +
      +
      Returns:
      +
      number of blocks
      +
      +
      +
    • +
    • +
      +

      getBlockVerificationFlags

      +
      public EnumSet<Block.VerifyFlag> getBlockVerificationFlags(Block block, + VersionTally tally, + Integer height)
      +
      The flags indicating which block validation tests should be applied to + the given block. Enables support for alternative blockchains which enable + tests based on different criteria.
      +
      +
      Parameters:
      +
      block - block to determine flags for.
      +
      height - height of the block, if known, null otherwise. Returned + tests should be a safe subset if block height is unknown.
      +
      tally - caching tally counter
      +
      Returns:
      +
      the flags
      +
      +
      +
    • +
    • +
      +

      getTransactionVerificationFlags

      +
      public EnumSet<Script.VerifyFlag> getTransactionVerificationFlags(Block block, + Transaction transaction, + VersionTally tally, + Integer height)
      +
      The flags indicating which script validation tests should be applied to + the given transaction. Enables support for alternative blockchains which enable + tests based on different criteria.
      +
      +
      Parameters:
      +
      block - block the transaction belongs to.
      +
      transaction - to determine flags for.
      +
      tally - caching tally counter
      +
      height - height of the block, if known, null otherwise. Returned + tests should be a safe subset if block height is unknown.
      +
      Returns:
      +
      the flags
      +
      +
      +
    • +
    • +
      +

      getProtocolVersionNum

      +
      @Deprecated +public int getProtocolVersionNum(ProtocolVersion version)
      +
      Deprecated. + +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/NotFoundMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/NotFoundMessage.html new file mode 100644 index 000000000..5ef987766 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/NotFoundMessage.html @@ -0,0 +1,248 @@ + + + + +NotFoundMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NotFoundMessage

+
+ +
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class NotFoundMessage +extends InventoryMessage
+

Sent by a peer when a getdata request doesn't find the requested data in the mempool. It has the same format + as an inventory message and lists the hashes of the missing items.

+ +

Instances of this class -- that use deprecated methods -- are not safe for use by multiple threads.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      MIN_PROTOCOL_VERSION

      +
      public static int MIN_PROTOCOL_VERSION
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NotFoundMessage

      +
      @Deprecated +public NotFoundMessage()
      +
      Deprecated.
      +
      +
    • +
    • +
      +

      NotFoundMessage

      +
      public NotFoundMessage(List<InventoryItem> items)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/PartialMerkleTree.html b/javadoc/0.17-rc1/org/bitcoinj/core/PartialMerkleTree.html new file mode 100644 index 000000000..40f5f2049 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/PartialMerkleTree.html @@ -0,0 +1,368 @@ + + + + +PartialMerkleTree (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PartialMerkleTree

+
+
java.lang.Object +
org.bitcoinj.core.PartialMerkleTree
+
+
+
+
public class PartialMerkleTree +extends Object
+

A data structure that contains proofs of block inclusion for one or more transactions, in an efficient manner.

+ +

The encoding works as follows: we traverse the tree in depth-first order, storing a bit for each traversed node, + signifying whether the node is the parent of at least one matched leaf txid (or a matched txid itself). In case we + are at the leaf level, or this bit is 0, its merkle node hash is stored, and its children are not explored further. + Otherwise, no hash is stored, but we recurse into both (or the only) child branch. During decoding, the same + depth-first traversal is performed, consuming bits and hashes as they were written during encoding.

+ +

The serialization is fixed and provides a hard guarantee about the encoded size, + SIZE <= 10 + ceil(32.25*N) where N represents the number of leaf nodes of the partial tree. N itself + is bounded by:

+ +

+ N <= total_transactions
+ N <= 1 + matched_transactions*tree_height +

+ +

The serialization format:

+
+  - uint32     total_transactions (4 bytes)
+  - varint     number of hashes   (1-3 bytes)
+  - uint256[]  hashes in depth-first order (<= 32*N bytes)
+  - varint     number of bytes of flag bits (1-3 bytes)
+  - byte[]     flag bits, packed per 8 in a byte, least significant bit first (<= 2*N-1 bits)
+ 
+

The size constraints follow from this.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PartialMerkleTree

      +
      public PartialMerkleTree(int origTxCount, + List<Sha256Hash> hashes, + byte[] bits)
      +
      Constructs a new PMT with the given bit set (little endian) and the raw list of hashes including internal hashes, + taking ownership of the list.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      read

      + +
      Deserialize a partial merkle tree from a given payload.
      +
      +
      Parameters:
      +
      payload - payload to deserialize from
      +
      Returns:
      +
      read message
      +
      Throws:
      +
      BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      buildFromLeaves

      +
      public static PartialMerkleTree buildFromLeaves(byte[] includeBits, + List<Sha256Hash> allLeafHashes)
      +
      Calculates a PMT given the list of leaf hashes and which leaves need to be included. The relevant interior hashes + are calculated and a new PMT returned.
      +
      +
    • +
    • +
      +

      write

      +
      public ByteBuffer write(ByteBuffer buf) + throws BufferOverflowException
      +
      Write this partial merkle tree into the given buffer.
      +
      +
      Parameters:
      +
      buf - buffer to write into
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the partial merkle tree doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      serialize

      +
      public byte[] serialize()
      +
      Allocates a byte array and writes this partial merkle tree into it.
      +
      +
      Returns:
      +
      byte array containing the partial merkle tree
      +
      +
      +
    • +
    • +
      +

      messageSize

      +
      public int messageSize()
      +
      Return the size of the serialized message. Note that if the message was deserialized from a payload, this + size can differ from the size of the original payload.
      +
      +
      Returns:
      +
      size of the serialized message in bytes
      +
      +
      +
    • +
    • +
      +

      getMessageSize

      +
      @Deprecated +public int getMessageSize()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      getTxnHashAndMerkleRoot

      +
      public Sha256Hash getTxnHashAndMerkleRoot(List<Sha256Hash> matchedHashesOut) + throws VerificationException
      +
      Extracts tx hashes that are in this merkle tree + and returns the merkle root of this tree. + + The returned root should be checked against the + merkle root contained in the block header for security.
      +
      +
      Parameters:
      +
      matchedHashesOut - A list which will contain the matched txn (will be cleared).
      +
      Returns:
      +
      the merkle root of this merkle tree
      +
      Throws:
      +
      ProtocolException - if this partial merkle tree is invalid
      +
      VerificationException
      +
      +
      +
    • +
    • +
      +

      getTransactionCount

      +
      public int getTransactionCount()
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/Peer.html b/javadoc/0.17-rc1/org/bitcoinj/core/Peer.html new file mode 100644 index 000000000..c9b6fcc36 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/Peer.html @@ -0,0 +1,1289 @@ + + + + +Peer (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Peer

+
+ +
+
+
All Implemented Interfaces:
+
StreamConnection, TimeoutHandler
+
+
+
public class Peer +extends PeerSocketHandler
+

A Peer handles the high level communication with a Bitcoin node, extending a PeerSocketHandler which + handles low-level message (de)serialization.

+ +

Note that timeouts are handled by the implemented + TimeoutHandler and timeout is automatically disabled (using + TimeoutHandler.setTimeoutEnabled(boolean)) once the version + handshake completes.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      addBlocksDownloadedEventListener

      +
      public void addBlocksDownloadedEventListener(BlocksDownloadedEventListener listener)
      +
      Registers a listener that is invoked when new blocks are downloaded.
      +
      +
    • +
    • +
      +

      addBlocksDownloadedEventListener

      +
      public void addBlocksDownloadedEventListener(Executor executor, + BlocksDownloadedEventListener listener)
      +
      Registers a listener that is invoked when new blocks are downloaded.
      +
      +
    • +
    • +
      +

      addChainDownloadStartedEventListener

      +
      public void addChainDownloadStartedEventListener(ChainDownloadStartedEventListener listener)
      +
      Registers a listener that is invoked when a blockchain downloaded starts.
      +
      +
    • +
    • +
      +

      addChainDownloadStartedEventListener

      +
      public void addChainDownloadStartedEventListener(Executor executor, + ChainDownloadStartedEventListener listener)
      +
      Registers a listener that is invoked when a blockchain downloaded starts.
      +
      +
    • +
    • +
      +

      addConnectedEventListener

      +
      public void addConnectedEventListener(PeerConnectedEventListener listener)
      +
      Registers a listener that is invoked when a peer is connected.
      +
      +
    • +
    • +
      +

      addConnectedEventListener

      +
      public void addConnectedEventListener(Executor executor, + PeerConnectedEventListener listener)
      +
      Registers a listener that is invoked when a peer is connected.
      +
      +
    • +
    • +
      +

      addDisconnectedEventListener

      +
      public void addDisconnectedEventListener(PeerDisconnectedEventListener listener)
      +
      Registers a listener that is invoked when a peer is disconnected.
      +
      +
    • +
    • +
      +

      addDisconnectedEventListener

      +
      public void addDisconnectedEventListener(Executor executor, + PeerDisconnectedEventListener listener)
      +
      Registers a listener that is invoked when a peer is disconnected.
      +
      +
    • +
    • +
      +

      addGetDataEventListener

      +
      public void addGetDataEventListener(GetDataEventListener listener)
      +
      Registers a listener that is called when messages are received.
      +
      +
    • +
    • +
      +

      addGetDataEventListener

      +
      public void addGetDataEventListener(Executor executor, + GetDataEventListener listener)
      +
      Registers a listener that is called when messages are received.
      +
      +
    • +
    • +
      +

      addOnTransactionBroadcastListener

      +
      public void addOnTransactionBroadcastListener(OnTransactionBroadcastListener listener)
      +
      Registers a listener that is called when a transaction is broadcast across the network
      +
      +
    • +
    • +
      +

      addOnTransactionBroadcastListener

      +
      public void addOnTransactionBroadcastListener(Executor executor, + OnTransactionBroadcastListener listener)
      +
      Registers a listener that is called when a transaction is broadcast across the network
      +
      +
    • +
    • +
      +

      addPreMessageReceivedEventListener

      +
      public void addPreMessageReceivedEventListener(PreMessageReceivedEventListener listener)
      +
      Registers a listener that is called immediately before a message is received
      +
      +
    • +
    • +
      +

      addPreMessageReceivedEventListener

      +
      public void addPreMessageReceivedEventListener(Executor executor, + PreMessageReceivedEventListener listener)
      +
      Registers a listener that is called immediately before a message is received
      +
      +
    • +
    • +
      +

      addAddressEventListener

      +
      public void addAddressEventListener(AddressEventListener listener)
      +
      Registers a listener that is called when addr or addrv2 messages are received.
      +
      +
    • +
    • +
      +

      addAddressEventListener

      +
      public void addAddressEventListener(Executor executor, + AddressEventListener listener)
      +
      Registers a listener that is called when addr or addrv2 messages are received.
      +
      +
    • +
    • +
      +

      removeBlocksDownloadedEventListener

      +
      public boolean removeBlocksDownloadedEventListener(BlocksDownloadedEventListener listener)
      +
      +
    • +
    • +
      +

      removeChainDownloadStartedEventListener

      +
      public boolean removeChainDownloadStartedEventListener(ChainDownloadStartedEventListener listener)
      +
      +
    • +
    • +
      +

      removeConnectedEventListener

      +
      public boolean removeConnectedEventListener(PeerConnectedEventListener listener)
      +
      +
    • +
    • +
      +

      removeDisconnectedEventListener

      +
      public boolean removeDisconnectedEventListener(PeerDisconnectedEventListener listener)
      +
      +
    • +
    • +
      +

      removeGetDataEventListener

      +
      public boolean removeGetDataEventListener(GetDataEventListener listener)
      +
      +
    • +
    • +
      +

      removeOnTransactionBroadcastListener

      +
      public boolean removeOnTransactionBroadcastListener(OnTransactionBroadcastListener listener)
      +
      +
    • +
    • +
      +

      removePreMessageReceivedEventListener

      +
      public boolean removePreMessageReceivedEventListener(PreMessageReceivedEventListener listener)
      +
      +
    • +
    • +
      +

      removeAddressEventListener

      +
      public boolean removeAddressEventListener(AddressEventListener listener)
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      timeoutOccurred

      +
      protected void timeoutOccurred()
      +
      +
      Overrides:
      +
      timeoutOccurred in class PeerSocketHandler
      +
      +
      +
    • +
    • +
      +

      connectionClosed

      +
      public void connectionClosed()
      +
      Description copied from interface: StreamConnection
      +
      Called when the connection socket is closed
      +
      +
    • +
    • +
      +

      connectionOpened

      +
      public void connectionOpened()
      +
      Description copied from interface: StreamConnection
      +
      Called when the connection socket is first opened
      +
      +
    • +
    • +
      +

      getConnectionOpenFuture

      +
      public ListenableCompletableFuture<Peer> getConnectionOpenFuture()
      +
      Provides a ListenableCompletableFuture that can be used to wait for the socket to connect. A socket connection does not + mean that protocol handshake has occurred.
      +
      +
    • +
    • +
      +

      getVersionHandshakeFuture

      +
      public ListenableCompletableFuture<Peer> getVersionHandshakeFuture()
      +
      +
    • +
    • +
      +

      processMessage

      +
      protected void processMessage(Message m) + throws Exception
      +
      Description copied from class: PeerSocketHandler
      +
      Called every time a message is received from the network
      +
      +
      Specified by:
      +
      processMessage in class PeerSocketHandler
      +
      Throws:
      +
      Exception
      +
      +
      +
    • +
    • +
      +

      startFilteredBlock

      +
      protected void startFilteredBlock(FilteredBlock m)
      +
      +
    • +
    • +
      +

      processNotFoundMessage

      +
      protected void processNotFoundMessage(NotFoundMessage m)
      +
      +
    • +
    • +
      +

      processHeaders

      +
      protected void processHeaders(HeadersMessage m) + throws ProtocolException
      +
      +
      Throws:
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      processGetData

      +
      protected void processGetData(GetDataMessage getdata)
      +
      +
    • +
    • +
      +

      processTransaction

      +
      protected void processTransaction(Transaction tx) + throws VerificationException
      +
      +
      Throws:
      +
      VerificationException
      +
      +
      +
    • +
    • +
      +

      downloadDependencies

      +
      public ListenableCompletableFuture<List<Transaction>> downloadDependencies(Transaction tx)
      +

      Returns a future that wraps a list of all transactions that the given transaction depends on, recursively. + Only transactions in peers memory pools are included; the recursion stops at transactions that are in the + current best chain. So it doesn't make much sense to provide a tx that was already in the best chain and + a precondition checks this.

      + +

      For example, if tx has 2 inputs that connect to transactions A and B, and transaction B is unconfirmed and + has one input connecting to transaction C that is unconfirmed, and transaction C connects to transaction D + that is in the chain, then this method will return either {B, C} or {C, B}. No ordering is guaranteed.

      + +

      This method is useful for apps that want to learn about how long an unconfirmed transaction might take + to confirm, by checking for unexpectedly time locked transactions, unusually deep dependency trees or fee-paying + transactions that depend on unconfirmed free transactions.

      + +

      Note that dependencies downloaded this way will not trigger the onTransaction method of event listeners.

      +
      +
      Parameters:
      +
      tx - The transaction
      +
      Returns:
      +
      A Future for a list of dependent transactions
      +
      +
      +
    • +
    • +
      +

      downloadDependenciesInternal

      +
      protected CompletableFuture<List<Transaction>> downloadDependenciesInternal(Transaction rootTx, + int maxDepth, + int depth)
      +
      Internal, recursive dependency downloader
      +
      +
      Parameters:
      +
      rootTx - The root transaction
      +
      maxDepth - maximum recursion depth
      +
      depth - current recursion depth (starts at 0)
      +
      Returns:
      +
      A Future for a list of dependent transactions
      +
      +
      +
    • +
    • +
      +

      processBlock

      +
      protected void processBlock(Block m)
      +
      +
    • +
    • +
      +

      endFilteredBlock

      +
      protected void endFilteredBlock(FilteredBlock m)
      +
      +
    • +
    • +
      +

      processInv

      +
      protected void processInv(InventoryMessage inv)
      +
      +
    • +
    • +
      +

      getBlock

      +
      public ListenableCompletableFuture<Block> getBlock(Sha256Hash blockHash)
      +
      Asks the connected peer for the block of the given hash, and returns a future representing the answer. + If you want the block right away and don't mind waiting for it, just call .get() on the result. Your thread + will block until the peer answers.
      +
      +
    • +
    • +
      +

      getPeerMempoolTransaction

      +
      public ListenableCompletableFuture<Transaction> getPeerMempoolTransaction(Sha256Hash hash)
      +
      Asks the connected peer for the given transaction from its memory pool. Transactions in the chain cannot be + retrieved this way because peers don't have a transaction ID to transaction-pos-on-disk index, and besides, + in future many peers will delete old transaction data they don't need.
      +
      +
    • +
    • +
      +

      getAddr

      + +
      Sends a getaddr request to the peer and returns a future that completes with the answer once the peer has replied.
      +
      +
    • +
    • +
      +

      setFastDownloadParameters

      +
      public void setFastDownloadParameters(boolean useFilteredBlocks, + Instant fastCatchupTime)
      +
      When downloading the block chain, the bodies will be skipped for blocks created before the given date. Any + transactions relevant to the wallet will therefore not be found, but if you know your wallet has no such + transactions it doesn't matter and can save a lot of bandwidth and processing time. Note that the times of blocks + isn't known until their headers are available and they are requested in chunks, so some headers may be downloaded + twice using this scheme, but this optimization can still be a large win for newly created wallets.
      +
      +
      Parameters:
      +
      useFilteredBlocks - whether to request filtered blocks if the protocol version allows for them
      +
      fastCatchupTime - time before which block bodies are skipped
      +
      +
      +
    • +
    • +
      +

      setDownloadParameters

      +
      public void setDownloadParameters(boolean useFilteredBlocks)
      +
      Always download full blocks.
      +
      +
      Parameters:
      +
      useFilteredBlocks - whether to request filtered blocks if the protocol version allows for them
      +
      +
      +
    • +
    • +
      +

      setDownloadParameters

      +
      @Deprecated +public void setDownloadParameters(long fastCatchupTimeSecs, + boolean useFilteredBlocks)
      + +
      +
    • +
    • +
      +

      addWallet

      +
      public void addWallet(Wallet wallet)
      +
      Links the given wallet to this peer. If you have multiple peers, you should use a PeerGroup to manage + them and use the PeerGroup.addWallet(Wallet) method instead of registering the wallet with each peer + independently, otherwise the wallet will receive duplicate notifications.
      +
      +
    • +
    • +
      +

      removeWallet

      +
      public void removeWallet(Wallet wallet)
      +
      Unlinks the given wallet from peer. See addWallet(Wallet).
      +
      +
    • +
    • +
      +

      startBlockChainDownload

      +
      public void startBlockChainDownload()
      +
      Starts an asynchronous download of the block chain. The chain download is deemed to be complete once we've + downloaded the same number of blocks that the peer advertised having in its version handshake message.
      +
      +
    • +
    • +
      +

      sendPing

      +
      public CompletableFuture<Duration> sendPing()
      +
      Sends the peer a ping message and returns a future that will be completed when the pong is received back. + The future provides a Duration which contains the time elapsed between the ping and the pong. + Once the pong is received the value returned by lastPingInterval() is updated. + The future completes exceptionally with a ProtocolException if the peer version is too low to support measurable pings.
      +
      +
      Returns:
      +
      A future for the duration representing elapsed time
      +
      +
      +
    • +
    • +
      +

      sendPing

      +
      protected CompletableFuture<Duration> sendPing(long nonce)
      +
      +
    • +
    • +
      +

      ping

      + +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      lastPingInterval

      +
      public Optional<Duration> lastPingInterval()
      +
      Returns the elapsed time of the last ping/pong cycle. If sendPing() has never + been called or we did not hear back the "pong" message yet, returns empty.
      +
      +
      Returns:
      +
      last ping, or empty
      +
      +
      +
    • +
    • +
      +

      getLastPingTime

      +
      @Deprecated +public long getLastPingTime()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      pingInterval

      +
      public Optional<Duration> pingInterval()
      +
      Returns a moving average of the last N ping/pong cycles. If sendPing() has never + been called or we did not hear back the "pong" message yet, returns empty. The moving average + window is PING_MOVING_AVERAGE_WINDOW buckets.
      +
      +
      Returns:
      +
      moving average, or empty
      +
      +
      +
    • +
    • +
      +

      getPingTime

      +
      @Deprecated +public long getPingTime()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      processPong

      +
      protected void processPong(Pong m)
      +
      +
    • +
    • +
      +

      getPeerBlockHeightDifference

      +
      public int getPeerBlockHeightDifference()
      +
      Returns the difference between our best chain height and the peers, which can either be positive if we are + behind the peer, or negative if the peer is ahead of us.
      +
      +
    • +
    • +
      +

      isDownloadData

      +
      public boolean isDownloadData()
      +
      Returns true if this peer will try and download things it is sent in "inv" messages. Normally you only need + one peer to be downloading data. Defaults to true.
      +
      +
    • +
    • +
      +

      setDownloadData

      +
      public void setDownloadData(boolean downloadData)
      +
      If set to false, the peer won't try and fetch blocks and transactions it hears about. Normally, only one + peer should download missing blocks. Defaults to true. Changing this value from false to true may trigger + a request to the remote peer for the contents of its memory pool, if Bloom filtering is active.
      +
      +
    • +
    • +
      +

      getPeerVersionMessage

      +
      public VersionMessage getPeerVersionMessage()
      +
      Returns version data announced by the remote peer.
      +
      +
    • +
    • +
      +

      getFeeFilter

      +
      public Coin getFeeFilter()
      +
      Returns the fee filter announced by the remote peer, interpreted as satoshis per kB.
      +
      +
    • +
    • +
      +

      getVersionMessage

      +
      public VersionMessage getVersionMessage()
      +
      Returns version data we announce to our remote peers.
      +
      +
    • +
    • +
      +

      getBestHeight

      +
      public long getBestHeight()
      +
      +
      Returns:
      +
      the height of the best chain as claimed by peer: sum of its ver announcement and blocks announced since.
      +
      +
      +
    • +
    • +
      +

      setMinProtocolVersion

      +
      public boolean setMinProtocolVersion(int minProtocolVersion)
      +
      The minimum P2P protocol version that is accepted. If the peer speaks a protocol version lower than this, it + will be disconnected.
      +
      +
      Returns:
      +
      true if the peer was disconnected as a result
      +
      +
      +
    • +
    • +
      +

      setBloomFilter

      +
      public void setBloomFilter(BloomFilter filter)
      +

      Sets a Bloom filter on this connection. This will cause the given BloomFilter object to be sent to the + remote peer and if either a memory pool has been set using the constructor or the + vDownloadData property is true, a MemoryPoolMessage is sent as well to trigger downloading of any + pending transactions that may be relevant.

      + +

      The Peer does not automatically request filters from any wallets added using addWallet(Wallet). + This is to allow callers to avoid redundantly recalculating the same filter repeatedly when using multiple peers + and multiple wallets together.

      + +

      Therefore, you should not use this method if your app uses a PeerGroup. It is called for you.

      + +

      If the remote peer doesn't support Bloom filtering, then this call is ignored. Once set you presently cannot + unset a filter, though the underlying p2p protocol does support it.

      +
      +
    • +
    • +
      +

      setBloomFilter

      +
      public void setBloomFilter(BloomFilter filter, + boolean andQueryMemPool)
      +

      Sets a Bloom filter on this connection. This will cause the given BloomFilter object to be sent to the + remote peer and if requested, a MemoryPoolMessage is sent as well to trigger downloading of any + pending transactions that may be relevant.

      + +

      The Peer does not automatically request filters from any wallets added using addWallet(Wallet). + This is to allow callers to avoid redundantly recalculating the same filter repeatedly when using multiple peers + and multiple wallets together.

      + +

      Therefore, you should not use this method if your app uses a PeerGroup. It is called for you.

      + +

      If the remote peer doesn't support Bloom filtering, then this call is ignored. Once set you presently cannot + unset a filter, though the underlying p2p protocol does support it.

      +
      +
    • +
    • +
      +

      getBloomFilter

      +
      public BloomFilter getBloomFilter()
      +
      Returns the last BloomFilter set by setBloomFilter(BloomFilter). Bloom filters tell + the remote node what transactions to send us, in a compact manner.
      +
      +
    • +
    • +
      +

      isDownloadTxDependencies

      +
      public boolean isDownloadTxDependencies()
      +
      Returns true if this peer will use getdata/notfound messages to walk backwards through transaction dependencies + before handing the transaction off to the wallet. The wallet can do risk analysis on pending/recent transactions + to try and discover if a pending tx might be at risk of double spending.
      +
      +
    • +
    • +
      +

      setDownloadTxDependencies

      +
      public void setDownloadTxDependencies(boolean enable)
      +
      Sets if this peer will use getdata/notfound messages to walk backwards through transaction dependencies + before handing the transaction off to the wallet. The wallet can do risk analysis on pending/recent transactions + to try and discover if a pending tx might be at risk of double spending.
      +
      +
    • +
    • +
      +

      setDownloadTxDependencies

      +
      public void setDownloadTxDependencies(int depth)
      +
      Sets if this peer will use getdata/notfound messages to walk backwards through transaction dependencies + before handing the transaction off to the wallet. The wallet can do risk analysis on pending/recent transactions + to try and discover if a pending tx might be at risk of double spending.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/PeerAddress.html b/javadoc/0.17-rc1/org/bitcoinj/core/PeerAddress.html new file mode 100644 index 000000000..9737f521a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/PeerAddress.html @@ -0,0 +1,469 @@ + + + + +PeerAddress (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PeerAddress

+
+
java.lang.Object +
org.bitcoinj.core.PeerAddress
+
+
+
+
public class PeerAddress +extends Object
+
A PeerAddress holds an IP address and port number representing the network location of + a peer in the Bitcoin P2P network. It exists primarily for serialization purposes. +

+ Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      simple

      +
      public static PeerAddress simple(InetAddress addr, + int port)
      +
      Constructs a simple peer address from the given IP address and port, but without services. The time is set to + current time.
      +
      +
      Parameters:
      +
      addr - ip address of peer
      +
      port - port the peer is listening on
      +
      Returns:
      +
      simple peer address
      +
      +
      +
    • +
    • +
      +

      simple

      +
      public static PeerAddress simple(InetSocketAddress addr)
      +
      Constructs a simple peer address from the given socket address, but without services. The time is set to + current time.
      +
      +
      Parameters:
      +
      addr - ip address and port of peer
      +
      Returns:
      +
      simple peer address
      +
      +
      +
    • +
    • +
      +

      inet

      +
      public static PeerAddress inet(InetAddress addr, + int port, + Services services, + Instant time)
      +
      Constructs a peer address from the given IP address, port, services and time. Such addresses are used for + `addr` and `addrv2` messages of types IPv4 and IPv6.
      +
      +
      Parameters:
      +
      addr - ip address of the peer
      +
      port - port the peer is listening on
      +
      services - node services the peer is providing
      +
      time - last-seen time of the peer
      +
      +
      +
    • +
    • +
      +

      inet

      +
      public static PeerAddress inet(InetSocketAddress addr, + Services services, + Instant time)
      +
      Constructs a peer address from the given IP address, port, services and time. Such addresses are used for + `addr` and `addrv2` messages of types IPv4 and IPv6.
      +
      +
      Parameters:
      +
      addr - ip address and port of the peer
      +
      services - node services the peer is providing
      +
      time - last-seen time of the peer
      +
      +
      +
    • +
    • +
      +

      read

      +
      public static PeerAddress read(ByteBuffer payload, + int protocolVariant) + throws BufferUnderflowException, +ProtocolException
      +
      Deserialize this peer address from a given payload, using a given protocol variant. The variant can be + 1 (AddressV1Message) or 2 (AddressV2Message).
      +
      +
      Parameters:
      +
      payload - payload to deserialize from
      +
      protocolVariant - variant of protocol to use for parsing
      +
      Returns:
      +
      read message
      +
      Throws:
      +
      BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      localhost

      +
      public static PeerAddress localhost(NetworkParameters params)
      +
      +
    • +
    • +
      +

      write

      +
      public ByteBuffer write(ByteBuffer buf, + int protocolVariant) + throws BufferOverflowException
      +
      Write this peer address into the given buffer, using a given protocol variant. The variant can be + 1 (AddressV1Message) or 2 (AddressV2Message)..
      +
      +
      Parameters:
      +
      buf - buffer to write into
      +
      protocolVariant - variant of protocol used
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the peer addressdoesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      serialize

      +
      public byte[] serialize(int protocolVariant)
      +
      Allocates a byte array and writes this peer address into it, using a given protocol variant. The variant can be + 1 (AddressV1Message) or 2 (AddressV2Message).
      +
      +
      Parameters:
      +
      protocolVariant - variant of protocol used
      +
      Returns:
      +
      byte array containing the peer address
      +
      +
      +
    • +
    • +
      +

      getMessageSize

      +
      public int getMessageSize(int protocolVariant)
      +
      Return the size of the serialized message, using a given protocol variant. The variant can be + 1 (AddressV1Message) or 2 (AddressV2Message).. Note that if the message was deserialized from + a payload, this size can differ from the size of the original payload.
      +
      +
      Parameters:
      +
      protocolVariant - variant of protocol used
      +
      Returns:
      +
      size of the serialized message in bytes
      +
      +
      +
    • +
    • +
      +

      getByAddress

      +
      public static InetAddress getByAddress(byte[] addrBytes)
      +
      +
    • +
    • +
      +

      mapIntoIPv6

      +
      public static byte[] mapIntoIPv6(byte[] ip)
      +
      Map given IPv4 address into IPv6 space.
      +
      +
      Parameters:
      +
      ip - IPv4 to map into IPv6 space
      +
      Returns:
      +
      mapped IP
      +
      +
      +
    • +
    • +
      +

      getHostname

      +
      public String getHostname()
      +
      +
    • +
    • +
      +

      getAddr

      +
      public InetAddress getAddr()
      +
      +
    • +
    • +
      +

      getSocketAddress

      +
      public InetSocketAddress getSocketAddress()
      +
      +
    • +
    • +
      +

      getPort

      +
      public int getPort()
      +
      +
    • +
    • +
      +

      getServices

      +
      public Services getServices()
      +
      +
    • +
    • +
      +

      time

      +
      public Instant time()
      +
      Gets the time that the node was last seen as connected to the network.
      +
      +
      Returns:
      +
      time that the node was last seen
      +
      +
      +
    • +
    • +
      +

      getTime

      +
      @Deprecated +public long getTime()
      +
      Deprecated. +
      use time()
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      toSocketAddress

      +
      public InetSocketAddress toSocketAddress()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/PeerException.html b/javadoc/0.17-rc1/org/bitcoinj/core/PeerException.html new file mode 100644 index 000000000..77d2cb508 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/PeerException.html @@ -0,0 +1,166 @@ + + + + +PeerException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PeerException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.core.PeerException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class PeerException +extends Exception
+
Thrown when a problem occurs in communicating with a peer, and we should + retry.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PeerException

      +
      public PeerException(String msg)
      +
      +
    • +
    • +
      +

      PeerException

      +
      public PeerException(Exception e)
      +
      +
    • +
    • +
      +

      PeerException

      +
      public PeerException(String msg, + Exception e)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/PeerFilterProvider.html b/javadoc/0.17-rc1/org/bitcoinj/core/PeerFilterProvider.html new file mode 100644 index 000000000..d064bd58a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/PeerFilterProvider.html @@ -0,0 +1,215 @@ + + + + +PeerFilterProvider (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface PeerFilterProvider

+
+
+
+
All Known Implementing Classes:
+
Wallet
+
+
+
public interface PeerFilterProvider
+
An interface which provides the information required to properly filter data downloaded from Peers. Note that an + implementer is responsible for calling + PeerGroup.recalculateFastCatchupAndFilter(PeerGroup.FilterRecalculateMode) whenever a change occurs which + effects the data provided via this interface.
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      earliestKeyCreationTime

      +
      Instant earliestKeyCreationTime()
      +
      Returns the earliest time for which full/bloom-filtered blocks must be downloaded. + Blocks with timestamps before this time will only have headers downloaded. Instant.EPOCH requires that all + blocks be downloaded, and thus this should default to Instant.MAX.
      +
      +
    • +
    • +
      +

      getEarliestKeyCreationTime

      +
      @Deprecated +default long getEarliestKeyCreationTime()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      beginBloomFilterCalculation

      +
      void beginBloomFilterCalculation()
      +
      Called on all registered filter providers before getBloomFilterElementCount() and + getBloomFilter(int, double, int) are called. Once called, the provider should ensure that the items + it will want to insert into the filter don't change. The reason is that all providers will have their element + counts queried, and then a filter big enough for all of them will be specified. So the provider must use + consistent state. There is guaranteed to be a matching call to endBloomFilterCalculation() that can + be used to e.g. unlock a lock.
      +
      +
    • +
    • +
      +

      getBloomFilterElementCount

      +
      int getBloomFilterElementCount()
      +
      Gets the number of elements that will be added to a bloom filter returned by + getBloomFilter(int, double, int)
      +
      +
    • +
    • +
      +

      getBloomFilter

      +
      BloomFilter getBloomFilter(int size, + double falsePositiveRate, + int nTweak)
      +
      Gets a bloom filter that contains all the necessary elements for the listener to receive relevant transactions. + Default value should be an empty bloom filter with the given size, falsePositiveRate, and nTweak.
      +
      +
    • +
    • +
      +

      endBloomFilterCalculation

      +
      void endBloomFilterCalculation()
      + +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/PeerGroup.FilterRecalculateMode.html b/javadoc/0.17-rc1/org/bitcoinj/core/PeerGroup.FilterRecalculateMode.html new file mode 100644 index 000000000..6e66768ac --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/PeerGroup.FilterRecalculateMode.html @@ -0,0 +1,229 @@ + + + + +PeerGroup.FilterRecalculateMode (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class PeerGroup.FilterRecalculateMode

+
+
java.lang.Object +
java.lang.Enum<PeerGroup.FilterRecalculateMode> +
org.bitcoinj.core.PeerGroup.FilterRecalculateMode
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<PeerGroup.FilterRecalculateMode>, Constable
+
+
+
Enclosing class:
+
PeerGroup
+
+
+
public static enum PeerGroup.FilterRecalculateMode +extends Enum<PeerGroup.FilterRecalculateMode>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static PeerGroup.FilterRecalculateMode[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static PeerGroup.FilterRecalculateMode valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/PeerGroup.html b/javadoc/0.17-rc1/org/bitcoinj/core/PeerGroup.html new file mode 100644 index 000000000..e95f3bb8d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/PeerGroup.html @@ -0,0 +1,2004 @@ + + + + +PeerGroup (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PeerGroup

+
+
java.lang.Object +
org.bitcoinj.core.PeerGroup
+
+
+
+
All Implemented Interfaces:
+
TransactionBroadcaster
+
+
+
public class PeerGroup +extends Object +implements TransactionBroadcaster
+

Runs a set of connections to the P2P network, brings up connections to replace disconnected nodes and manages + the interaction between them all. Most applications will want to use one of these.

+ +

PeerGroup tries to maintain a constant number of connections to a set of distinct peers. + Each peer runs a network listener in its own thread. When a connection is lost, a new peer + will be tried after a delay as long as the number of connections less than the maximum.

+ +

Connections are made to addresses from a provided list. When that list is exhausted, + we start again from the head of the list.

+ +

The PeerGroup can broadcast a transaction to the currently connected set of peers. It can + also handle download of the blockchain from peers, restarting the process when peers die.

+ +

A PeerGroup won't do anything until you call the start() method + which will block until peer discovery is completed and some outbound connections + have been initiated (it will return before handshaking is done, however). + You should call stop() when finished. Note that not all methods + of PeerGroup are safe to call from a UI thread as some may do network IO, + but starting and stopping the service should be fine.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      lock

      +
      protected final ReentrantLock lock
      +
      +
    • +
    • +
      +

      DEFAULT_CONNECTIONS

      +
      public static final int DEFAULT_CONNECTIONS
      +
      The default number of connections to the p2p network the library will try to build. This is set to 12 empirically. + It used to be 4, but because we divide the connection pool in two for broadcasting transactions, that meant we + were only sending transactions to two peers and sometimes this wasn't reliable enough: transactions wouldn't + get through.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      params

      +
      protected final NetworkParameters params
      +
      +
    • +
    • +
      +

      chain

      +
      @Nullable +protected final AbstractBlockChain chain
      +
      +
    • +
    • +
      +

      executor

      +
      protected final ScheduledExecutorService executor
      +
      +
    • +
    • +
      +

      peerConnectedEventListeners

      +
      protected final CopyOnWriteArrayList<ListenerRegistration<PeerConnectedEventListener>> peerConnectedEventListeners
      +
      Callbacks for events related to peers connecting
      +
      +
    • +
    • +
      +

      peerDiscoveredEventListeners

      +
      protected final CopyOnWriteArrayList<ListenerRegistration<PeerDiscoveredEventListener>> peerDiscoveredEventListeners
      +
      Callbacks for events related to peer connection/disconnection
      +
      +
    • +
    • +
      +

      peerDisconnectedEventListeners

      +
      protected final CopyOnWriteArrayList<ListenerRegistration<PeerDisconnectedEventListener>> peerDisconnectedEventListeners
      +
      Callbacks for events related to peers disconnecting
      +
      +
    • +
    • +
      +

      peersTransactionBroadastEventListeners

      +
      protected final CopyOnWriteArrayList<ListenerRegistration<OnTransactionBroadcastListener>> peersTransactionBroadastEventListeners
      +
      +
    • +
    • +
      +

      DEFAULT_PING_INTERVAL_MSEC

      +
      public static final long DEFAULT_PING_INTERVAL_MSEC
      +
      How many milliseconds to wait after receiving a pong before sending another ping.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      MAX_ADDRESSES_PER_ADDR_MESSAGE

      +
      public static final int MAX_ADDRESSES_PER_ADDR_MESSAGE
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      DEFAULT_BLOOM_FILTER_FP_RATE

      +
      public static final double DEFAULT_BLOOM_FILTER_FP_RATE
      +
      The default Bloom filter false positive rate, which is selected to be extremely low such that you hardly ever + download false positives. This provides maximum performance. Although this default can be overridden to push + the FP rate higher, due to + various complexities there are still ways a remote peer can deanonymize the users wallet. This is why the + FP rate is chosen for performance rather than privacy. If a future version of bitcoinj fixes the known + de-anonymization attacks this FP rate may rise again (or more likely, become expressed as a bandwidth allowance).
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      MAX_FP_RATE_INCREASE

      +
      public static final double MAX_FP_RATE_INCREASE
      +
      Maximum increase in FP rate before forced refresh of the bloom filter
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      DEFAULT_CONNECT_TIMEOUT

      +
      public static final Duration DEFAULT_CONNECT_TIMEOUT
      +
      The default timeout between when a connection attempt begins and version message exchange completes
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PeerGroup

      +
      public PeerGroup(Network network)
      +
      Creates a PeerGroup for the given network. No chain is provided so this node will report its chain height + as zero to other peers. This constructor is useful if you just want to explore the network but aren't interested + in downloading block data.
      +
      +
      Parameters:
      +
      network - the P2P network to connect to
      +
      +
      +
    • +
    • +
      +

      PeerGroup

      +
      @Deprecated +public PeerGroup(NetworkParameters params)
      +
      Deprecated. + +
      +
      Creates a PeerGroup with the given network. No chain is provided so this node will report its chain height + as zero to other peers. This constructor is useful if you just want to explore the network but aren't interested + in downloading block data.
      +
      +
    • +
    • +
      +

      PeerGroup

      +
      public PeerGroup(Network network, + @Nullable + AbstractBlockChain chain)
      +
      Creates a PeerGroup for the given network and chain. Blocks will be passed to the chain as they are broadcast + and downloaded. This is probably the constructor you want to use.
      +
      +
      Parameters:
      +
      network - the P2P network to connect to
      +
      chain - used to process blocks
      +
      +
      +
    • +
    • +
      +

      PeerGroup

      +
      @Deprecated +public PeerGroup(NetworkParameters params, + @Nullable + AbstractBlockChain chain)
      + +
      Creates a PeerGroup for the given network and chain. Blocks will be passed to the chain as they are broadcast + and downloaded.
      +
      +
    • +
    • +
      +

      PeerGroup

      +
      protected PeerGroup(Network network, + @Nullable + AbstractBlockChain chain, + ClientConnectionManager connectionManager)
      +
      Create a PeerGroup for the given network, chain and connection manager.
      +
      +
      Parameters:
      +
      network - the P2P network to connect to
      +
      chain - used to process blocks
      +
      connectionManager - used to create new connections and keep track of existing ones.
      +
      +
      +
    • +
    • +
      +

      PeerGroup

      +
      protected PeerGroup(Network network, + @Nullable + AbstractBlockChain chain, + ClientConnectionManager connectionManager, + double bloomFilterFpRate)
      +
      Create a PeerGroup for the given network, chain and connection manager.
      +
      +
      Parameters:
      +
      network - the P2P network to connect to
      +
      chain - used to process blocks
      +
      connectionManager - used to create new connections and keep track of existing ones.
      +
      bloomFilterFpRate - false positive rate for bloom filters
      +
      +
      +
    • +
    • +
      +

      PeerGroup

      +
      protected PeerGroup(NetworkParameters params, + @Nullable + AbstractBlockChain chain, + ClientConnectionManager connectionManager, + double bloomFilterFpRate)
      +
      Create a PeerGroup for the given network, chain and connection manager.
      +
      +
      Parameters:
      +
      params - the P2P network to connect to
      +
      chain - used to process blocks
      +
      connectionManager - used to create new connections and keep track of existing ones.
      +
      bloomFilterFpRate - false positive rate for bloom filters
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      createPrivateExecutor

      +
      protected ScheduledExecutorService createPrivateExecutor()
      +
      +
    • +
    • +
      +

      setPeerDiscoveryTimeout

      +
      public void setPeerDiscoveryTimeout(Duration peerDiscoveryTimeout)
      +
      This is how long we wait for peer discoveries to return their results.
      +
      +
    • +
    • +
      +

      setPeerDiscoveryTimeoutMillis

      +
      @Deprecated +public void setPeerDiscoveryTimeoutMillis(long peerDiscoveryTimeoutMillis)
      + +
      This is how many milliseconds we wait for peer discoveries to return their results.
      +
      +
    • +
    • +
      +

      setMaxConnections

      +
      public void setMaxConnections(int maxConnections)
      +
      Adjusts the desired number of connections that we will create to peers. Note that if there are already peers + open and the new value is lower than the current number of peers, those connections will be terminated. Likewise + if there aren't enough current connections to meet the new requested max size, some will be added.
      +
      +
    • +
    • +
      +

      setDownloadTxDependencies

      +
      public void setDownloadTxDependencies(int depth)
      +
      Configure download of pending transaction dependencies. A change of values only takes effect for newly connected + peers.
      +
      +
    • +
    • +
      +

      getMaxConnections

      +
      public int getMaxConnections()
      +
      The maximum number of connections that we will create to peers.
      +
      +
    • +
    • +
      +

      setVersionMessage

      +
      public void setVersionMessage(VersionMessage ver)
      +
      Sets the VersionMessage that will be announced on newly created connections. A version message is + primarily interesting because it lets you customize the "subVer" field which is used a bit like the User-Agent + field from HTTP. It means your client tells the other side what it is, see + BIP 14. + + The VersionMessage you provide is copied and the best chain height/time filled in for each new connection, + therefore you don't have to worry about setting that. The provided object is really more of a template.
      +
      +
    • +
    • +
      +

      getVersionMessage

      +
      public VersionMessage getVersionMessage()
      +
      Returns the version message provided by setVersionMessage or a default if none was given.
      +
      +
    • +
    • +
      +

      setUserAgent

      +
      public void setUserAgent(String name, + String version, + @Nullable + String comments)
      +
      Sets information that identifies this software to remote nodes. This is a convenience wrapper for creating + a new VersionMessage, calling VersionMessage.appendToSubVer(String, String, String) on it, + and then calling setVersionMessage(VersionMessage) on the result of that. See the docs for + VersionMessage.appendToSubVer(String, String, String) for information on what the fields should contain.
      +
      +
    • +
    • +
      +

      setUserAgent

      +
      public void setUserAgent(String name, + String version)
      +
      Sets information that identifies this software to remote nodes. This is a convenience wrapper for creating + a new VersionMessage, calling VersionMessage.appendToSubVer(String, String, String) on it, + and then calling setVersionMessage(VersionMessage) on the result of that. See the docs for + VersionMessage.appendToSubVer(String, String, String) for information on what the fields should contain.
      +
      +
    • +
    • +
      +

      addBlocksDownloadedEventListener

      +
      public void addBlocksDownloadedEventListener(BlocksDownloadedEventListener listener)
      + +
      +
    • +
    • +
      +

      addBlocksDownloadedEventListener

      +
      public void addBlocksDownloadedEventListener(Executor executor, + BlocksDownloadedEventListener listener)
      +

      Adds a listener that will be notified on the given executor when + blocks are downloaded by the download peer.

      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      addChainDownloadStartedEventListener

      +
      public void addChainDownloadStartedEventListener(ChainDownloadStartedEventListener listener)
      + +
      +
    • +
    • +
      +

      addChainDownloadStartedEventListener

      +
      public void addChainDownloadStartedEventListener(Executor executor, + ChainDownloadStartedEventListener listener)
      +

      Adds a listener that will be notified on the given executor when + chain download starts.

      +
      +
    • +
    • +
      +

      addConnectedEventListener

      +
      public void addConnectedEventListener(PeerConnectedEventListener listener)
      + +
      +
    • +
    • +
      +

      addConnectedEventListener

      +
      public void addConnectedEventListener(Executor executor, + PeerConnectedEventListener listener)
      +

      Adds a listener that will be notified on the given executor when + new peers are connected to.

      +
      +
    • +
    • +
      +

      addDisconnectedEventListener

      +
      public void addDisconnectedEventListener(PeerDisconnectedEventListener listener)
      + +
      +
    • +
    • +
      +

      addDisconnectedEventListener

      +
      public void addDisconnectedEventListener(Executor executor, + PeerDisconnectedEventListener listener)
      +

      Adds a listener that will be notified on the given executor when + peers are disconnected from.

      +
      +
    • +
    • +
      +

      addDiscoveredEventListener

      +
      public void addDiscoveredEventListener(PeerDiscoveredEventListener listener)
      + +
      +
    • +
    • +
      +

      addDiscoveredEventListener

      +
      public void addDiscoveredEventListener(Executor executor, + PeerDiscoveredEventListener listener)
      +

      Adds a listener that will be notified on the given executor when new + peers are discovered.

      +
      +
    • +
    • +
      +

      addGetDataEventListener

      +
      public void addGetDataEventListener(GetDataEventListener listener)
      + +
      +
    • +
    • +
      +

      addGetDataEventListener

      +
      public void addGetDataEventListener(Executor executor, + GetDataEventListener listener)
      + +
      +
    • +
    • +
      +

      addOnTransactionBroadcastListener

      +
      public void addOnTransactionBroadcastListener(OnTransactionBroadcastListener listener)
      + +
      +
    • +
    • +
      +

      addOnTransactionBroadcastListener

      +
      public void addOnTransactionBroadcastListener(Executor executor, + OnTransactionBroadcastListener listener)
      + +
      +
    • +
    • +
      +

      addPreMessageReceivedEventListener

      +
      public void addPreMessageReceivedEventListener(PreMessageReceivedEventListener listener)
      + +
      +
    • +
    • +
      +

      addPreMessageReceivedEventListener

      +
      public void addPreMessageReceivedEventListener(Executor executor, + PreMessageReceivedEventListener listener)
      + +
      +
    • +
    • +
      +

      removeBlocksDownloadedEventListener

      +
      public boolean removeBlocksDownloadedEventListener(BlocksDownloadedEventListener listener)
      +
      +
    • +
    • +
      +

      removeChainDownloadStartedEventListener

      +
      public boolean removeChainDownloadStartedEventListener(ChainDownloadStartedEventListener listener)
      +
      +
    • +
    • +
      +

      removeConnectedEventListener

      +
      public boolean removeConnectedEventListener(PeerConnectedEventListener listener)
      +
      The given event listener will no longer be called with events.
      +
      +
    • +
    • +
      +

      removeDisconnectedEventListener

      +
      public boolean removeDisconnectedEventListener(PeerDisconnectedEventListener listener)
      +
      The given event listener will no longer be called with events.
      +
      +
    • +
    • +
      +

      removeDiscoveredEventListener

      +
      public boolean removeDiscoveredEventListener(PeerDiscoveredEventListener listener)
      +
      The given event listener will no longer be called with events.
      +
      +
    • +
    • +
      +

      removeGetDataEventListener

      +
      public boolean removeGetDataEventListener(GetDataEventListener listener)
      +
      The given event listener will no longer be called with events.
      +
      +
    • +
    • +
      +

      removeOnTransactionBroadcastListener

      +
      public boolean removeOnTransactionBroadcastListener(OnTransactionBroadcastListener listener)
      +
      The given event listener will no longer be called with events.
      +
      +
    • +
    • +
      +

      removePreMessageReceivedEventListener

      +
      public boolean removePreMessageReceivedEventListener(PreMessageReceivedEventListener listener)
      +
      +
    • +
    • +
      +

      getConnectedPeers

      +
      public List<Peer> getConnectedPeers()
      +
      Returns a newly allocated list containing the currently connected peers. If all you care about is the count, + use numConnectedPeers().
      +
      +
    • +
    • +
      +

      getPendingPeers

      +
      public List<Peer> getPendingPeers()
      +
      Returns a list containing Peers that did not complete connection yet.
      +
      +
    • +
    • +
      +

      addAddress

      +
      public void addAddress(PeerAddress peerAddress)
      +
      Add an address to the list of potential peers to connect to. It won't necessarily be used unless there's a need + to build new connections to reach the max connection count.
      +
      +
      Parameters:
      +
      peerAddress - IP/port to use.
      +
      +
      +
    • +
    • +
      +

      addAddress

      +
      public void addAddress(PeerAddress peerAddress, + int priority)
      +
      Add an address to the list of potential peers to connect to. It won't necessarily be used unless there's a need + to build new connections to reach the max connection count.
      +
      +
      Parameters:
      +
      peerAddress - IP/port to use.
      +
      priority - for connecting and being picked as a download peer
      +
      +
      +
    • +
    • +
      +

      setRequiredServices

      +
      public void setRequiredServices(long requiredServices)
      +
      Convenience for connecting only to peers that can serve specific services. It will configure suitable peer + discoveries.
      +
      +
      Parameters:
      +
      requiredServices - Required services as a bitmask, e.g. Services.NODE_NETWORK.
      +
      +
      +
    • +
    • +
      +

      addAddress

      +
      public void addAddress(InetAddress address)
      +
      Convenience method for addAddress(PeerAddress).
      +
      +
    • +
    • +
      +

      addAddress

      +
      public void addAddress(InetAddress address, + int priority)
      +
      Convenience method for addAddress(PeerAddress, int).
      +
      +
    • +
    • +
      +

      setDiscoverPeersViaP2P

      +
      public void setDiscoverPeersViaP2P(boolean discoverPeersViaP2P)
      +
      Setting this to true will add addresses discovered via P2P addr and addrv2 messages to + the list of potential peers to connect to. This will automatically be set to true if at least one peer discovery + is added via addPeerDiscovery(PeerDiscovery).
      +
      +
      Parameters:
      +
      discoverPeersViaP2P - true if peers should be discovered from the P2P network
      +
      +
      +
    • +
    • +
      +

      addPeerDiscovery

      +
      public void addPeerDiscovery(PeerDiscovery peerDiscovery)
      +
      Add addresses from a discovery source to the list of potential peers to connect to. If max connections has not + been configured, or set to zero, then it's set to the default at this point.
      +
      +
    • +
    • +
      +

      discoverPeers

      +
      protected int discoverPeers()
      +
      Returns number of discovered peers.
      +
      +
    • +
    • +
      +

      startAsync

      +
      public ListenableCompletableFuture<Void> startAsync()
      +
      Starts the PeerGroup and begins network activity.
      +
      +
      Returns:
      +
      A future that completes when first connection activity has been triggered (note: not first connection made).
      +
      +
      +
    • +
    • +
      +

      start

      +
      public void start()
      +
      Does a blocking startup.
      +
      +
    • +
    • +
      +

      stopAsync

      +
      public ListenableCompletableFuture<Void> stopAsync()
      +
      +
    • +
    • +
      +

      stop

      +
      public void stop()
      +
      Does a blocking stop
      +
      +
    • +
    • +
      +

      dropAllPeers

      +
      public void dropAllPeers()
      +
      Gracefully drops all connected peers.
      +
      +
    • +
    • +
      +

      addWallet

      +
      public void addWallet(Wallet wallet)
      +

      Link the given wallet to this PeerGroup. This is used for three purposes:

      + +
        +
      1. So the wallet receives broadcast transactions.
      2. +
      3. Announcing pending transactions that didn't get into the chain yet to our peers.
      4. +
      5. Set the fast catchup time using setFastCatchupTime(Instant), to optimize chain + download.
      6. +
      + +

      Note that this should be done before chain download commences because if you add a wallet with keys earlier + than the current chain head, the relevant parts of the chain won't be redownloaded for you.

      + +

      The Wallet will have an event listener registered on it, so to avoid leaks remember to use + removeWallet(Wallet) on it if you wish to keep the Wallet but lose the PeerGroup.

      +
      +
    • +
    • +
      +

      addPeerFilterProvider

      +
      public ListenableCompletableFuture<BloomFilter> addPeerFilterProvider(PeerFilterProvider provider)
      +

      Link the given PeerFilterProvider to this PeerGroup. DO NOT use this for Wallets, use + addWallet(Wallet) instead.

      + +

      Note that this should be done before chain download commences because if you add a listener with keys earlier + than the current chain head, the relevant parts of the chain won't be redownloaded for you.

      + +

      This method invokes recalculateFastCatchupAndFilter(FilterRecalculateMode). + The return value of this method is the ListenableCompletableFuture returned by that invocation.

      +
      +
      Returns:
      +
      a future that completes once each Peer in this group has had its + BloomFilter (re)set.
      +
      +
      +
    • +
    • +
      +

      removePeerFilterProvider

      +
      public void removePeerFilterProvider(PeerFilterProvider provider)
      +
      Opposite of addPeerFilterProvider(PeerFilterProvider). Again, don't use this for wallets. Does not + trigger recalculation of the filter.
      +
      +
    • +
    • +
      +

      removeWallet

      +
      public void removeWallet(Wallet wallet)
      +
      Unlinks the given wallet so it no longer receives broadcast transactions or has its transactions announced.
      +
      +
    • +
    • +
      +

      recalculateFastCatchupAndFilter

      +
      public ListenableCompletableFuture<BloomFilter> recalculateFastCatchupAndFilter(PeerGroup.FilterRecalculateMode mode)
      +
      Recalculates the bloom filter given to peers as well as the timestamp after which full blocks are downloaded + (instead of only headers). Note that calls made one after another may return the same future, if the request + wasn't processed yet (i.e. calls are deduplicated).
      +
      +
      Parameters:
      +
      mode - In what situations to send the filter to connected peers.
      +
      Returns:
      +
      a future that completes once the filter has been calculated (note: this does not mean acknowledged by remote peers).
      +
      +
      +
    • +
    • +
      +

      setBloomFilterFalsePositiveRate

      +
      @Deprecated +public void setBloomFilterFalsePositiveRate(double bloomFilterFPRate)
      +
      Deprecated.
      +

      Sets the false positive rate of bloom filters given to peers. The default is DEFAULT_BLOOM_FILTER_FP_RATE.

      + +

      Be careful regenerating the bloom filter too often, as it decreases anonymity because remote nodes can + compare transactions against both the new and old filters to significantly decrease the false positive rate.

      + +

      See the docs for BloomFilter(int, double, int, BloomFilter.BloomUpdate) for a brief + explanation of anonymity when using bloom filters.

      +
      +
    • +
    • +
      +

      numConnectedPeers

      +
      public int numConnectedPeers()
      +
      Returns the number of currently connected peers. To be informed when this count changes, use + PeerConnectedEventListener.onPeerConnected(org.bitcoinj.core.Peer, int) and PeerDisconnectedEventListener.onPeerDisconnected(org.bitcoinj.core.Peer, int).
      +
      +
    • +
    • +
      +

      connectTo

      +
      @Nullable +public Peer connectTo(InetSocketAddress address)
      +
      Connect to a peer by creating a channel to the destination address. This should not be + used normally - let the PeerGroup manage connections through start()
      +
      +
      Parameters:
      +
      address - destination IP and port.
      +
      Returns:
      +
      The newly created Peer object or null if the peer could not be connected. + Use Peer.getConnectionOpenFuture() if you + want a future which completes when the connection is open.
      +
      +
      +
    • +
    • +
      +

      connectToLocalHost

      +
      @Nullable +public Peer connectToLocalHost()
      +
      Helper for forcing a connection to localhost. Useful when using regtest mode. Returns the peer object.
      +
      +
    • +
    • +
      +

      connectTo

      +
      @Nullable +protected Peer connectTo(PeerAddress address, + boolean incrementMaxConnections, + Duration connectTimeout)
      +
      Creates a version message to send, constructs a Peer object and attempts to connect it. Returns the peer on + success or null on failure.
      +
      +
      Parameters:
      +
      address - Remote network address
      +
      incrementMaxConnections - Whether to consider this connection an attempt to fill our quota, or something + explicitly requested.
      +
      connectTimeout - timeout for establishing the connection to peers
      +
      Returns:
      +
      Peer or null.
      +
      +
      +
    • +
    • +
      +

      createPeer

      +
      protected Peer createPeer(PeerAddress address, + VersionMessage ver)
      +
      You can override this to customise the creation of Peer objects.
      +
      +
    • +
    • +
      +

      setConnectTimeout

      +
      public void setConnectTimeout(Duration connectTimeout)
      +
      Sets the timeout between when a connection attempt to a peer begins and when the version message exchange + completes. This does not apply to currently pending peers.
      +
      +
      Parameters:
      +
      connectTimeout - timeout for estiablishing the connection to peers
      +
      +
      +
    • +
    • +
      +

      setConnectTimeoutMillis

      +
      @Deprecated +public void setConnectTimeoutMillis(int connectTimeoutMillis)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      startBlockChainDownload

      +
      public void startBlockChainDownload(BlockchainDownloadEventListener listener)
      +

      Start downloading the blockchain.

      + +

      If no peers are currently connected, the download will be started once a peer starts. If the peer dies, + the download will resume with another peer.

      +
      +
      Parameters:
      +
      listener - a listener for chain download events, may not be null
      +
      +
      +
    • +
    • +
      +

      downloadBlockChain

      +
      public void downloadBlockChain()
      +
      Download the blockchain from peers. Convenience that uses a DownloadProgressTracker for you.

      + + This method waits until the download is complete. "Complete" is defined as downloading + from at least one peer all the blocks that are in that peer's inventory.

      +
      +
    • +
    • +
      +

      handleNewPeer

      +
      protected void handleNewPeer(Peer peer)
      +
      +
    • +
    • +
      +

      getMemoryPool

      +
      @Deprecated +@Nullable +public TxConfidenceTable getMemoryPool()
      +
      Deprecated.
      +
      Use "Context.get().getConfidenceTable()" instead
      +
      +
    • +
    • +
      +

      setFastCatchupTime

      +
      public void setFastCatchupTime(Instant fastCatchupTime)
      +
      Tells the PeerGroup to download only block headers before a certain time and bodies after that. Call this + before starting block chain download. + Do not use a time > NOW - 1 block, as it will break some block download logic.
      +
      +
    • +
    • +
      +

      setFastCatchupTimeSecs

      +
      @Deprecated +public void setFastCatchupTimeSecs(long fastCatchupTimeSecs)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      getFastCatchupTime

      +
      public Instant getFastCatchupTime()
      +
      Returns the current fast catchup time. The contents of blocks before this time won't be downloaded as they + cannot contain any interesting transactions. If you use addWallet(Wallet) this just returns + the min of the wallets earliest key times.
      +
      +
      Returns:
      +
      a time in seconds since the epoch
      +
      +
      +
    • +
    • +
      +

      getFastCatchupTimeSecs

      +
      @Deprecated +public long getFastCatchupTimeSecs()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      handlePeerDeath

      +
      protected void handlePeerDeath(Peer peer, + @Nullable + Throwable exception)
      +
      +
    • +
    • +
      +

      setStallThreshold

      +
      public void setStallThreshold(int periodSecs, + int bytesPerSecond)
      +
      Configures the stall speed: the speed at which a peer is considered to be serving us the block chain + unacceptably slowly. Once a peer has served us data slower than the given data rate for the given + number of seconds, it is considered stalled and will be disconnected, forcing the chain download to continue + from a different peer. The defaults are chosen conservatively, but if you are running on a platform that is + CPU constrained or on a very slow network e.g. EDGE, the default settings may need adjustment to + avoid false stalls.
      +
      +
      Parameters:
      +
      periodSecs - How many seconds the download speed must be below blocksPerSec, defaults to 10.
      +
      bytesPerSecond - Download speed (only blocks/txns count) must be consistently below this for a stall, defaults to the bandwidth required for 10 block headers per second.
      +
      +
      +
    • +
    • +
      +

      waitForPeers

      +
      public ListenableCompletableFuture<List<Peer>> waitForPeers(int numPeers)
      +
      Returns a future that is triggered when the number of connected peers is equal to the given number of + peers. By using this with getMaxConnections() you can wait until the + network is fully online. To block immediately, just call get() on the result. Just calls + waitForPeersOfVersion(int, long) with zero as the protocol version.
      +
      +
      Parameters:
      +
      numPeers - How many peers to wait for.
      +
      Returns:
      +
      a future that will be triggered when the number of connected peers is greater than or equals numPeers
      +
      +
      +
    • +
    • +
      +

      waitForPeersOfVersion

      +
      public ListenableCompletableFuture<List<Peer>> waitForPeersOfVersion(int numPeers, + long protocolVersion)
      +
      Returns a future that is triggered when there are at least the requested number of connected peers that support + the given protocol version or higher. To block immediately, just call get() on the result.
      +
      +
      Parameters:
      +
      numPeers - How many peers to wait for.
      +
      protocolVersion - The protocol version the awaited peers must implement (or better).
      +
      Returns:
      +
      a future that will be triggered when the number of connected peers implementing protocolVersion or higher is greater than or equals numPeers
      +
      +
      +
    • +
    • +
      +

      findPeersOfAtLeastVersion

      +
      public List<Peer> findPeersOfAtLeastVersion(long protocolVersion)
      +
      Returns an array list of peers that implement the given protocol version or better.
      +
      +
    • +
    • +
      +

      waitForPeersWithServiceMask

      +
      public ListenableCompletableFuture<List<Peer>> waitForPeersWithServiceMask(int numPeers, + int mask)
      +
      Returns a future that is triggered when there are at least the requested number of connected peers that support + the given protocol version or higher. To block immediately, just call get() on the result.
      +
      +
      Parameters:
      +
      numPeers - How many peers to wait for.
      +
      mask - An integer representing a bit mask that will be ANDed with the peers advertised service masks.
      +
      Returns:
      +
      a future that will be triggered when the number of connected peers implementing protocolVersion or higher is greater than or equals numPeers
      +
      +
      +
    • +
    • +
      +

      findPeersWithServiceMask

      +
      public List<Peer> findPeersWithServiceMask(int mask)
      +
      Returns an array list of peers that match the requested service bit mask.
      +
      +
    • +
    • +
      +

      getMinBroadcastConnections

      +
      public int getMinBroadcastConnections()
      +
      Returns the number of connections that are required before transactions will be broadcast. If there aren't + enough, broadcastTransaction(Transaction) will wait until the minimum number is reached so + propagation across the network can be observed. If no value has been set using + setMinBroadcastConnections(int) a default of 80% of whatever + getMaxConnections() returns is used.
      +
      +
    • +
    • +
      +

      setMinBroadcastConnections

      +
      public void setMinBroadcastConnections(int value)
      + +
      +
    • +
    • +
      +

      broadcastTransaction

      +
      public TransactionBroadcast broadcastTransaction(Transaction tx)
      +
      Calls broadcastTransaction(Transaction, int, boolean) with getMinBroadcastConnections() as + the number of connections to wait for before commencing broadcast. Also, if the transaction has no broadcast + confirmations yet the peers will be dropped after the transaction has been sent.
      +
      +
      Specified by:
      +
      broadcastTransaction in interface TransactionBroadcaster
      +
      +
      +
    • +
    • +
      +

      broadcastTransaction

      +
      public TransactionBroadcast broadcastTransaction(Transaction tx, + int minConnections, + boolean dropPeersAfterBroadcast)
      +

      Given a transaction, sends it un-announced to one peer and then waits for it to be received back from other + peers. Once all connected peers have announced the transaction, the future available via the + TransactionBroadcast.awaitRelayed() ()} method will be completed. If anything goes + wrong the exception will be thrown when get() is called, or you can receive it via a callback on the + ListenableCompletableFuture. This method returns immediately, so if you want it to block just call get() on the + result.

      + +

      Optionally, peers will be dropped after they have been used for broadcasting the transaction and they have + no broadcast confirmations yet.

      + +

      Note that if the PeerGroup is limited to only one connection (discovery is not activated) then the future + will complete as soon as the transaction was successfully written to that peer.

      + +

      The transaction won't be sent until there are at least minConnections active connections available. + A good choice for proportion would be between 0.5 and 0.8 but if you want faster transmission during initial + bringup of the peer group you can lower it.

      + +

      The returned TransactionBroadcast object can be used to get progress feedback, + which is calculated by watching the transaction propagate across the network and be announced by peers.

      +
      +
    • +
    • +
      +

      getPingIntervalMsec

      +
      public long getPingIntervalMsec()
      +
      Returns the period between pings for an individual peer. Setting this lower means more accurate and timely ping + times are available via Peer.lastPingInterval() but it increases load on the + remote node. It defaults to DEFAULT_PING_INTERVAL_MSEC.
      +
      +
    • +
    • +
      +

      setPingIntervalMsec

      +
      public void setPingIntervalMsec(long pingIntervalMsec)
      +
      Sets the period between pings for an individual peer. Setting this lower means more accurate and timely ping + times are available via Peer.lastPingInterval() but it increases load on the + remote node. It defaults to DEFAULT_PING_INTERVAL_MSEC. + Setting the value to be smaller or equals 0 disables pinging entirely, although you can still request one yourself + using Peer.sendPing().
      +
      +
    • +
    • +
      +

      setMinRequiredProtocolVersion

      +
      public void setMinRequiredProtocolVersion(int minRequiredProtocolVersion)
      +
      If a peer is connected to that claims to speak a protocol version lower than the given version, it will + be disconnected and another one will be tried instead.
      +
      +
    • +
    • +
      +

      getMinRequiredProtocolVersion

      +
      public int getMinRequiredProtocolVersion()
      +
      The minimum protocol version required: defaults to the version required for Bloom filtering.
      +
      +
    • +
    • +
      +

      getMostCommonChainHeight

      +
      public int getMostCommonChainHeight()
      +
      Returns our peers most commonly reported chain height. + If the most common heights are tied, or no peers are connected, returns 0.
      +
      +
    • +
    • +
      +

      getMostCommonChainHeight

      +
      public static int getMostCommonChainHeight(List<Peer> peers)
      +
      Returns most commonly reported chain height from the given list of Peers. + If the most common heights are tied, or no peers are connected, returns 0.
      +
      +
    • +
    • +
      +

      selectDownloadPeer

      +
      @Nullable +protected Peer selectDownloadPeer(List<Peer> peers)
      +
      Given a list of Peers, return a Peer to be used as the download peer. If you don't want PeerGroup to manage + download peer statuses for you, just override this and always return null.
      +
      +
    • +
    • +
      +

      getDownloadPeer

      +
      public Peer getDownloadPeer()
      +
      Returns the currently selected download peer. Bear in mind that it may have changed as soon as this method + returns. Can return null if no peer was selected.
      +
      +
    • +
    • +
      +

      getMaxPeersToDiscoverCount

      +
      public int getMaxPeersToDiscoverCount()
      +
      Returns the maximum number of Peers to discover. This maximum is checked after + each PeerDiscovery so this max number can be surpassed.
      +
      +
      Returns:
      +
      the maximum number of peers to discover
      +
      +
      +
    • +
    • +
      +

      setMaxPeersToDiscoverCount

      +
      public void setMaxPeersToDiscoverCount(int maxPeersToDiscoverCount)
      +
      Sets the maximum number of Peers to discover. This maximum is checked after + each PeerDiscovery so this max number can be surpassed.
      +
      +
      Parameters:
      +
      maxPeersToDiscoverCount - the maximum number of peers to discover
      +
      +
      +
    • +
    • +
      +

      getUseLocalhostPeerWhenPossible

      +
      public boolean getUseLocalhostPeerWhenPossible()
      + +
      +
    • +
    • +
      +

      setUseLocalhostPeerWhenPossible

      +
      public void setUseLocalhostPeerWhenPossible(boolean useLocalhostPeerWhenPossible)
      +
      When true (the default), PeerGroup will attempt to connect to a Bitcoin node running on localhost before + attempting to use the P2P network. If successful, only localhost will be used. This makes for a simple + and easy way for a user to upgrade a bitcoinj based app running in SPV mode to fully validating security.
      +
      +
    • +
    • +
      +

      isRunning

      +
      public boolean isRunning()
      +
      +
    • +
    • +
      +

      setBloomFilteringEnabled

      +
      public void setBloomFilteringEnabled(boolean bloomFilteringEnabled)
      +
      Can be used to disable Bloom filtering entirely, even in SPV mode. You are very unlikely to need this, it is + an optimisation for rare cases when full validation is not required but it's still more efficient to download + full blocks than filtered blocks.
      +
      +
    • +
    • +
      +

      isBloomFilteringEnabled

      +
      public boolean isBloomFilteringEnabled()
      +
      Returns whether the Bloom filtering protocol optimisation is in use: defaults to true.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/PeerSocketHandler.html b/javadoc/0.17-rc1/org/bitcoinj/core/PeerSocketHandler.html new file mode 100644 index 000000000..ff0168739 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/PeerSocketHandler.html @@ -0,0 +1,399 @@ + + + + +PeerSocketHandler (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PeerSocketHandler

+
+
java.lang.Object +
org.bitcoinj.core.PeerSocketHandler
+
+
+
+
All Implemented Interfaces:
+
StreamConnection, TimeoutHandler
+
+
+
Direct Known Subclasses:
+
Peer
+
+
+
public abstract class PeerSocketHandler +extends Object +implements TimeoutHandler, StreamConnection
+
Handles high-level message (de)serialization for peers, acting as the bridge between the + org.bitcoinj.net classes and Peer.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setTimeoutEnabled

      +
      public void setTimeoutEnabled(boolean timeoutEnabled)
      +
      Description copied from interface: TimeoutHandler
      +

      Enables or disables the timeout entirely. This may be useful if you want to store the timeout value but wish + to temporarily disable/enable timeouts.

      + +

      The default is for timeoutEnabled to be true but timeout to be set to 0 (ie disabled).

      + +

      This call will reset the current progress towards the timeout.

      +
      +
      Specified by:
      +
      setTimeoutEnabled in interface TimeoutHandler
      +
      +
      +
    • +
    • +
      +

      setSocketTimeout

      +
      public void setSocketTimeout(Duration timeout)
      +
      Description copied from interface: TimeoutHandler
      +

      Sets the receive timeout, automatically killing the connection if no + messages are received for this long

      + +

      A timeout of Duration.ZERO is interpreted as no timeout.

      + +

      The default is for timeoutEnabled to be true but timeout to be set to Duration.ZERO (ie disabled).

      + +

      This call will reset the current progress towards the timeout.

      +
      +
      Specified by:
      +
      setSocketTimeout in interface TimeoutHandler
      +
      +
      +
    • +
    • +
      +

      sendMessage

      +
      public ListenableCompletableFuture<Void> sendMessage(Message message) + throws NotYetConnectedException
      +
      Sends the given message to the peer. Due to the asynchronousness of network programming, there is no guarantee + the peer will have received it. Throws NotYetConnectedException if we are not yet connected to the remote peer. + TODO: Maybe use something other than the unchecked NotYetConnectedException here
      +
      +
      Throws:
      +
      NotYetConnectedException
      +
      +
      +
    • +
    • +
      +

      close

      +
      public void close()
      +
      Closes the connection to the peer if one exists, or immediately closes the connection as soon as it opens
      +
      +
    • +
    • +
      +

      timeoutOccurred

      +
      protected void timeoutOccurred()
      +
      +
    • +
    • +
      +

      processMessage

      +
      protected abstract void processMessage(Message m) + throws Exception
      +
      Called every time a message is received from the network
      +
      +
      Throws:
      +
      Exception
      +
      +
      +
    • +
    • +
      +

      receiveBytes

      +
      public int receiveBytes(ByteBuffer buff)
      +
      Description copied from interface: StreamConnection
      +

      Called when new bytes are available from the remote end. This should only ever be called by the single + writeTarget associated with any given StreamConnection, multiple callers will likely confuse implementations.

      + + Implementers/callers must follow the following conventions exactly: +
        +
      • buff will start with its limit set to the position we can read to and its position set to the location we + will start reading at (always 0)
      • +
      • May read more than one message (recursively) if there are enough bytes available
      • +
      • Uses some internal buffering to store message which are larger (incl their length prefix) than buff's + capacity(), ie it is up to this method to ensure we don't run out of buffer space to decode the next message. +
      • +
      • buff will end with its limit the same as it was previously, and its position set to the position up to which + bytes have been read (the same as its return value)
      • +
      • buff must be at least the size of a Bitcoin header (incl magic bytes).
      • +
      +
      +
      Specified by:
      +
      receiveBytes in interface StreamConnection
      +
      Returns:
      +
      The amount of bytes consumed which should not be provided again
      +
      +
      +
    • +
    • +
      +

      setWriteTarget

      +
      public void setWriteTarget(MessageWriteTarget writeTarget)
      +
      Sets the MessageWriteTarget used to write messages to the peer. This should almost never be called, it is + called automatically by NioClient or + NioClientManager once the socket finishes initialization.
      +
      +
      Specified by:
      +
      setWriteTarget in interface StreamConnection
      +
      +
      +
    • +
    • +
      +

      getMaxMessageSize

      +
      public int getMaxMessageSize()
      +
      Description copied from interface: StreamConnection
      +
      Returns the maximum message size of a message on the socket. This is used in calculating size of buffers to + allocate.
      +
      +
      Specified by:
      +
      getMaxMessageSize in interface StreamConnection
      +
      +
      +
    • +
    • +
      +

      getAddress

      +
      public PeerAddress getAddress()
      +
      +
      Returns:
      +
      the IP address and port of peer.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/Ping.html b/javadoc/0.17-rc1/org/bitcoinj/core/Ping.html new file mode 100644 index 000000000..cf972adc0 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/Ping.html @@ -0,0 +1,267 @@ + + + + +Ping (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Ping

+
+
java.lang.Object +
org.bitcoinj.core.BaseMessage +
org.bitcoinj.core.Ping
+
+
+
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class Ping +extends BaseMessage
+
See BIP31 for details. +

+ Instances of this class are immutable.

+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      read

      +
      public static Ping read(ByteBuffer payload) + throws BufferUnderflowException, +ProtocolException
      +
      Deserialize this message from a given payload.
      +
      +
      Parameters:
      +
      payload - payload to deserialize from
      +
      Returns:
      +
      read message
      +
      Throws:
      +
      BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      of

      +
      public static Ping of(long nonce)
      +
      Create a ping with a nonce value. + Only use this if the remote node has a protocol version greater than 60000
      +
      +
      Parameters:
      +
      nonce - nonce value
      +
      Returns:
      +
      ping message
      +
      +
      +
    • +
    • +
      +

      random

      +
      public static Ping random()
      +
      Create a ping with a random nonce value. + Only use this if the remote node has a protocol version greater than 60000
      +
      +
      Returns:
      +
      ping message
      +
      +
      +
    • +
    • +
      +

      bitcoinSerializeToStream

      +
      public void bitcoinSerializeToStream(OutputStream stream) + throws IOException
      +
      Description copied from class: BaseMessage
      +
      Serializes this message to the provided stream. If you just want the raw bytes use BaseMessage.serialize().
      +
      +
      Specified by:
      +
      bitcoinSerializeToStream in class BaseMessage
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      hasNonce

      +
      @Deprecated +public boolean hasNonce()
      +
      Deprecated. +
      returns true
      +
      +
      +
    • +
    • +
      +

      nonce

      +
      public long nonce()
      +
      +
    • +
    • +
      +

      pong

      +
      public Pong pong()
      +
      Create a Pong reply to this ping.
      +
      +
      Returns:
      +
      pong message
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/Pong.html b/javadoc/0.17-rc1/org/bitcoinj/core/Pong.html new file mode 100644 index 000000000..c37126d37 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/Pong.html @@ -0,0 +1,219 @@ + + + + +Pong (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Pong

+
+
java.lang.Object +
org.bitcoinj.core.BaseMessage +
org.bitcoinj.core.Pong
+
+
+
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class Pong +extends BaseMessage
+
See BIP31 for details. +

+ Instances of this class are immutable.

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/ProtocolException.html b/javadoc/0.17-rc1/org/bitcoinj/core/ProtocolException.html new file mode 100644 index 000000000..661854cb9 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/ProtocolException.html @@ -0,0 +1,185 @@ + + + + +ProtocolException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ProtocolException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class ProtocolException +extends VerificationException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ProtocolException

      +
      public ProtocolException()
      +
      +
    • +
    • +
      +

      ProtocolException

      +
      public ProtocolException(String msg)
      +
      +
    • +
    • +
      +

      ProtocolException

      +
      public ProtocolException(Exception e)
      +
      +
    • +
    • +
      +

      ProtocolException

      +
      public ProtocolException(String msg, + Exception e)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/ProtocolVersion.html b/javadoc/0.17-rc1/org/bitcoinj/core/ProtocolVersion.html new file mode 100644 index 000000000..00628ffd0 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/ProtocolVersion.html @@ -0,0 +1,292 @@ + + + + +ProtocolVersion (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class ProtocolVersion

+
+
java.lang.Object +
java.lang.Enum<ProtocolVersion> +
org.bitcoinj.core.ProtocolVersion
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<ProtocolVersion>, Constable
+
+
+
public enum ProtocolVersion +extends Enum<ProtocolVersion>
+
Define important versions of the Bitcoin Protocol
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static ProtocolVersion[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static ProtocolVersion valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      intValue

      +
      public int intValue()
      +
      +
      Returns:
      +
      protocol version as an integer value
      +
      +
      +
    • +
    • +
      +

      getBitcoinProtocolVersion

      +
      @Deprecated +public int getBitcoinProtocolVersion()
      +
      Deprecated. + +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/PrunedException.html b/javadoc/0.17-rc1/org/bitcoinj/core/PrunedException.html new file mode 100644 index 000000000..91e88439d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/PrunedException.html @@ -0,0 +1,181 @@ + + + + +PrunedException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PrunedException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.core.PrunedException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class PrunedException +extends Exception
+
PrunedException is thrown in cases where a fully verifying node has deleted (pruned) old block data that turned + out to be necessary for handling a re-org. Normally this should never happen unless you're playing with the testnet + as the pruning parameters should be set very conservatively, such that an absolutely enormous re-org would be + required to trigger it.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PrunedException

      +
      public PrunedException(Sha256Hash hash)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getHash

      +
      public Sha256Hash getHash()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/RejectMessage.RejectCode.html b/javadoc/0.17-rc1/org/bitcoinj/core/RejectMessage.RejectCode.html new file mode 100644 index 000000000..262658111 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/RejectMessage.RejectCode.html @@ -0,0 +1,307 @@ + + + + +RejectMessage.RejectCode (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class RejectMessage.RejectCode

+
+
java.lang.Object +
java.lang.Enum<RejectMessage.RejectCode> +
org.bitcoinj.core.RejectMessage.RejectCode
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<RejectMessage.RejectCode>, Constable
+
+
+
Enclosing class:
+
RejectMessage
+
+
+
public static enum RejectMessage.RejectCode +extends Enum<RejectMessage.RejectCode>
+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    +

    Nested classes/interfaces inherited from class java.lang.Enum

    +Enum.EnumDesc<E extends Enum<E>>
    +
    +
  • + +
  • +
    +

    Enum Constant Summary

    +
    Enum Constants
    +
    +
    Enum Constant
    +
    Description
    + +
    +
    The message described a block which was invalid according to hard-coded checkpoint blocks.
    +
    + +
    +
    The message was relayed multiple times or described an object which is in conflict with another.
    +
    + +
    +
    This refers to a specific form of NONSTANDARD transactions, which have an output smaller than some constant + defining them as dust (this is no longer used).
    +
    + +
    +
    The messages described an object which did not have sufficient fee to be relayed further.
    +
    + +
    +
    The message described an invalid object
    +
    + +
    +
    The message was not able to be parsed
    +
    + +
    +
    The message described an object was not standard and was thus not accepted.
    +
    + +
    +
    The message was obsolete or described an object which is obsolete (e.g.
    +
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Returns the enum constant of this class with the specified name.
    +
    + + +
    +
    Returns an array containing the constants of this enum class, in +the order they are declared.
    +
    +
    +
    +
    + +
    +

    Methods inherited from class java.lang.Object

    +getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      MALFORMED

      +
      public static final RejectMessage.RejectCode MALFORMED
      +
      The message was not able to be parsed
      +
      +
    • +
    • +
      +

      INVALID

      +
      public static final RejectMessage.RejectCode INVALID
      +
      The message described an invalid object
      +
      +
    • +
    • +
      +

      OBSOLETE

      +
      public static final RejectMessage.RejectCode OBSOLETE
      +
      The message was obsolete or described an object which is obsolete (e.g. unsupported, old version, v1 block)
      +
      +
    • +
    • +
      +

      DUPLICATE

      +
      public static final RejectMessage.RejectCode DUPLICATE
      +
      The message was relayed multiple times or described an object which is in conflict with another. + This message can describe errors in protocol implementation or the presence of an attempt to DOUBLE SPEND.
      +
      +
    • +
    • +
      +

      NONSTANDARD

      +
      public static final RejectMessage.RejectCode NONSTANDARD
      +
      The message described an object was not standard and was thus not accepted. + Bitcoin Core has a concept of standard transaction forms, which describe scripts and encodings which + it is willing to relay further. Other transactions are neither relayed nor mined, though they are considered + valid if they appear in a block.
      +
      +
    • +
    • +
      +

      DUST

      +
      public static final RejectMessage.RejectCode DUST
      +
      This refers to a specific form of NONSTANDARD transactions, which have an output smaller than some constant + defining them as dust (this is no longer used).
      +
      +
    • +
    • +
      +

      INSUFFICIENTFEE

      +
      public static final RejectMessage.RejectCode INSUFFICIENTFEE
      +
      The messages described an object which did not have sufficient fee to be relayed further.
      +
      +
    • +
    • +
      +

      CHECKPOINT

      +
      public static final RejectMessage.RejectCode CHECKPOINT
      +
      The message described a block which was invalid according to hard-coded checkpoint blocks.
      +
      +
    • +
    • +
      +

      OTHER

      +
      public static final RejectMessage.RejectCode OTHER
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static RejectMessage.RejectCode[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static RejectMessage.RejectCode valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/RejectMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/RejectMessage.html new file mode 100644 index 000000000..fc47830fd --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/RejectMessage.html @@ -0,0 +1,421 @@ + + + + +RejectMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class RejectMessage

+
+
java.lang.Object +
org.bitcoinj.core.BaseMessage +
org.bitcoinj.core.RejectMessage
+
+
+
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class RejectMessage +extends BaseMessage
+
A message sent by nodes when a message we sent was rejected (ie a transaction had too little fee/was invalid/etc). + See BIP61 for details. +

+ Instances of this class are immutable.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      RejectMessage

      +
      public RejectMessage(RejectMessage.RejectCode code, + @Nullable + Sha256Hash rejectedMessageHash, + String rejectedMessage, + String reason)
      +
      Constructs a reject message that fingers the object with the given hash as rejected for the given reason.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      read

      +
      public static RejectMessage read(ByteBuffer payload) + throws BufferUnderflowException, +ProtocolException
      +
      Deserialize this message from a given payload.
      +
      +
      Parameters:
      +
      payload - payload to deserialize from
      +
      Returns:
      +
      read message
      +
      Throws:
      +
      BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      bitcoinSerializeToStream

      +
      public void bitcoinSerializeToStream(OutputStream stream) + throws IOException
      +
      Description copied from class: BaseMessage
      +
      Serializes this message to the provided stream. If you just want the raw bytes use BaseMessage.serialize().
      +
      +
      Specified by:
      +
      bitcoinSerializeToStream in class BaseMessage
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      rejectedMessage

      +
      public String rejectedMessage()
      +
      Provides the type of message which was rejected by the peer. + Note that this is ENTIRELY UNTRUSTED and should be sanity-checked before it is printed or processed.
      +
      +
      Returns:
      +
      rejected message type
      +
      +
      +
    • +
    • +
      +

      getRejectedMessage

      +
      @Deprecated +public String getRejectedMessage()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      rejectedMessageHash

      +
      public Sha256Hash rejectedMessageHash()
      +
      Provides the hash of the rejected object (if getRejectedMessage() is either "tx" or "block"), otherwise null.
      +
      +
      Returns:
      +
      hash of rejected object
      +
      +
      +
    • +
    • +
      +

      getRejectedObjectHash

      +
      @Deprecated +public Sha256Hash getRejectedObjectHash()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      code

      +
      public RejectMessage.RejectCode code()
      +
      The reason code given for why the peer rejected the message.
      +
      +
      Returns:
      +
      reject reason code
      +
      +
      +
    • +
    • +
      +

      getReasonCode

      +
      @Deprecated +public RejectMessage.RejectCode getReasonCode()
      +
      Deprecated. +
      use code()
      +
      +
      +
    • +
    • +
      +

      reason

      +
      public String reason()
      +
      The reason message given for rejection. + Note that this is ENTIRELY UNTRUSTED and should be sanity-checked before it is printed or processed.
      +
      +
      Returns:
      +
      reject reason
      +
      +
      +
    • +
    • +
      +

      getReasonString

      +
      @Deprecated +public String getReasonString()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      A String representation of the relevant details of this reject message. + Be aware that the value returned by this method includes the value returned by + getReasonString, which is taken from the reject message unchecked. + Through malice or otherwise, it might contain control characters or other harmful content.
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/RejectedTransactionException.html b/javadoc/0.17-rc1/org/bitcoinj/core/RejectedTransactionException.html new file mode 100644 index 000000000..2a2922a68 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/RejectedTransactionException.html @@ -0,0 +1,198 @@ + + + + +RejectedTransactionException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class RejectedTransactionException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.core.RejectedTransactionException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class RejectedTransactionException +extends Exception
+
This exception is used by the TransactionBroadcast class to indicate that a broadcast + Transaction has been rejected by the network, for example because it violates a + protocol rule. Note that not all invalid transactions generate a reject message, and + some peers may never do so.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      RejectedTransactionException

      +
      public RejectedTransactionException(Transaction tx, + RejectMessage rejectMessage)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getTransaction

      +
      public Transaction getTransaction()
      +
      Return the original Transaction object whose broadcast was rejected.
      +
      +
    • +
    • +
      +

      getRejectMessage

      +
      public RejectMessage getRejectMessage()
      +
      Return the RejectMessage object representing the broadcast rejection.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/SendAddrV2Message.html b/javadoc/0.17-rc1/org/bitcoinj/core/SendAddrV2Message.html new file mode 100644 index 000000000..75bb7b25b --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/SendAddrV2Message.html @@ -0,0 +1,159 @@ + + + + +SendAddrV2Message (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SendAddrV2Message

+
+ +
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class SendAddrV2Message +extends EmptyMessage
+

Represents the sendaddrv2 P2P protocol message, which indicates that a node can understand and prefers + to receive addrv2 messages instead of addr messages.

+ +

See BIP155 for details.

+ +

Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SendAddrV2Message

      +
      public SendAddrV2Message()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/SendHeadersMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/SendHeadersMessage.html new file mode 100644 index 000000000..ba21adc7a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/SendHeadersMessage.html @@ -0,0 +1,161 @@ + + + + +SendHeadersMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SendHeadersMessage

+
+ +
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class SendHeadersMessage +extends EmptyMessage
+

+ A new message, "sendheaders", which indicates that a node prefers to receive new block announcements via a "headers" + message rather than an "inv". +

+ +

+ See BIP 130. +

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SendHeadersMessage

      +
      public SendHeadersMessage()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/Services.html b/javadoc/0.17-rc1/org/bitcoinj/core/Services.html new file mode 100644 index 000000000..41279222a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/Services.html @@ -0,0 +1,506 @@ + + + + +Services (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Services

+
+
java.lang.Object +
org.bitcoinj.core.Services
+
+
+
+
public class Services +extends Object
+
Wrapper for services bitfield used in various messages of the Bitcoin protocol. Each bit represents a node service, + e.g. NODE_NETWORK if the node serves the full blockchain. +

+ Instances of this class are immutable and should be treated as Java + value-based.

+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static final int
    + +
    +
    Number of bytes of this bitfield.
    +
    +
    static final int
    + +
    +
    A service bit used by Bitcoin-ABC to announce Bitcoin Cash nodes.
    +
    +
    static final int
    + +
    +
    A service bit that denotes whether the peer supports BIP37 bloom filters or not.
    +
    +
    static final int
    + +
    +
    Indicates the node will service basic block filter requests (BIP157, BIP158).
    +
    +
    static final int
    + +
    +
    A service bit that denotes whether the peer has a full copy of the block chain or not.
    +
    +
    static final int
    + +
    +
    A service bit that denotes whether the peer has at least the last two days worth of blockchain (BIP159).
    +
    +
    static final int
    + +
    +
    Indicates the node supports BIP324 transport.
    +
    +
    static final int
    + +
    +
    Indicates that a node can be asked for blocks and transactions including witness data.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    boolean
    +
    anyOf(long bitmask)
    +
    +
    Checks if at least one of the given node services is signaled by this bitfield.
    +
    +
    long
    + +
    +
    Gets the 64 bits of this bitfield, each representing a node service.
    +
    +
    boolean
    + +
     
    +
    boolean
    +
    has(long bitmask)
    +
    +
    Checks if given specific node services are signaled by this bitfield.
    +
    +
    boolean
    + +
    +
    Checks if this bitfield signals any node services at all.
    +
    +
    int
    + +
     
    +
    static Services
    + +
    +
    Constructs a services bitfield representing "no node services".
    +
    +
    static Services
    +
    of(long bits)
    +
    +
    Wrap 64 bits, each representing a node service.
    +
    +
    static Services
    + +
    +
    Construct a services bitfield by reading from the given buffer.
    +
    +
    byte[]
    + +
    +
    Allocates a byte array and writes the node service bits into it.
    +
    + + +
     
    + + +
    +
    Write the node service bits into the given buffer.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      NODE_NETWORK

      +
      public static final int NODE_NETWORK
      +
      A service bit that denotes whether the peer has a full copy of the block chain or not.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      NODE_BLOOM

      +
      public static final int NODE_BLOOM
      +
      A service bit that denotes whether the peer supports BIP37 bloom filters or not. The service bit is defined in BIP111.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      NODE_WITNESS

      +
      public static final int NODE_WITNESS
      +
      Indicates that a node can be asked for blocks and transactions including witness data.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      NODE_COMPACT_FILTERS

      +
      public static final int NODE_COMPACT_FILTERS
      +
      Indicates the node will service basic block filter requests (BIP157, BIP158).
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      NODE_NETWORK_LIMITED

      +
      public static final int NODE_NETWORK_LIMITED
      +
      A service bit that denotes whether the peer has at least the last two days worth of blockchain (BIP159).
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      NODE_P2P_V2

      +
      public static final int NODE_P2P_V2
      +
      Indicates the node supports BIP324 transport.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      NODE_BITCOIN_CASH

      +
      public static final int NODE_BITCOIN_CASH
      +
      A service bit used by Bitcoin-ABC to announce Bitcoin Cash nodes.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      BYTES

      +
      public static final int BYTES
      +
      Number of bytes of this bitfield.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      of

      +
      public static Services of(long bits)
      +
      Wrap 64 bits, each representing a node service.
      +
      +
      Parameters:
      +
      bits - bits to wrap
      +
      Returns:
      +
      wrapped service bits
      +
      +
      +
    • +
    • +
      +

      none

      +
      public static Services none()
      +
      Constructs a services bitfield representing "no node services".
      +
      +
      Returns:
      +
      wrapped service bits
      +
      +
      +
    • +
    • +
      +

      read

      +
      public static Services read(ByteBuffer buf) + throws BufferUnderflowException
      +
      Construct a services bitfield by reading from the given buffer.
      +
      +
      Parameters:
      +
      buf - buffer to read from
      +
      Returns:
      +
      wrapped service bits
      +
      Throws:
      +
      BufferUnderflowException - if the read services bitfield extends beyond the remaining bytes of the buffer
      +
      +
      +
    • +
    • +
      +

      bits

      +
      public long bits()
      +
      Gets the 64 bits of this bitfield, each representing a node service.
      +
      +
      Returns:
      +
      the service bits
      +
      +
      +
    • +
    • +
      +

      hasAny

      +
      public boolean hasAny()
      +
      Checks if this bitfield signals any node services at all.
      +
      +
      Returns:
      +
      true if at least one service is signaled, false otherwise
      +
      +
      +
    • +
    • +
      +

      has

      +
      public boolean has(long bitmask)
      +
      Checks if given specific node services are signaled by this bitfield.
      +
      +
      Parameters:
      +
      bitmask - bitmask representing the services to be checked for
      +
      Returns:
      +
      true if the given services are all signaled, false otherwise
      +
      +
      +
    • +
    • +
      +

      anyOf

      +
      public boolean anyOf(long bitmask)
      +
      Checks if at least one of the given node services is signaled by this bitfield.
      +
      +
      Parameters:
      +
      bitmask - bitmask representing the services to be checked for
      +
      Returns:
      +
      true if at least one of the given services is signaled, false otherwise
      +
      +
      +
    • +
    • +
      +

      write

      +
      public ByteBuffer write(ByteBuffer buf) + throws BufferOverflowException
      +
      Write the node service bits into the given buffer.
      +
      +
      Parameters:
      +
      buf - buffer to write into
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the service bits don't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      serialize

      +
      public byte[] serialize()
      +
      Allocates a byte array and writes the node service bits into it.
      +
      +
      Returns:
      +
      byte array containing the service bits
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/StoredBlock.html b/javadoc/0.17-rc1/org/bitcoinj/core/StoredBlock.html new file mode 100644 index 000000000..632b0e7b8 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/StoredBlock.html @@ -0,0 +1,457 @@ + + + + +StoredBlock (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class StoredBlock

+
+
java.lang.Object +
org.bitcoinj.core.StoredBlock
+
+
+
+
public class StoredBlock +extends Object
+
Wraps a Block object with extra data that can be derived from the block chain but is slow or inconvenient to + calculate. By storing it alongside the block header we reduce the amount of work required significantly. + Recalculation is slow because the fields are cumulative - to find the chainWork you have to iterate over every + block in the chain back to the genesis block, which involves lots of seeking/loading etc. So we just keep a + running total: it's a disk space vs cpu/io tradeoff.

+ + StoredBlocks are put inside a BlockStore which saves them to memory or disk.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      StoredBlock

      +
      public StoredBlock(Block header, + BigInteger chainWork, + int height)
      +
      Create a StoredBlock from a (header-only) Block, chain work value, and block height
      +
      +
      Parameters:
      +
      header - A Block object with only a header (no transactions should be included)
      +
      chainWork - Calculated chainWork for this block
      +
      height - block height for this block
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getHeader

      +
      public Block getHeader()
      +
      The block header this object wraps. The referenced block object must not have any transactions in it.
      +
      +
    • +
    • +
      +

      getChainWork

      +
      public BigInteger getChainWork()
      +
      The total sum of work done in this block, and all the blocks below it in the chain. Work is a measure of how + many tries are needed to solve a block. If the target is set to cover 10% of the total hash value space, + then the work represented by a block is 10.
      +
      +
    • +
    • +
      +

      getHeight

      +
      public int getHeight()
      +
      Position in the chain for this block. The genesis block has a height of zero.
      +
      +
    • +
    • +
      +

      moreWorkThan

      +
      public boolean moreWorkThan(StoredBlock other)
      +
      Returns true if this objects chainWork is higher than the others.
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      build

      +
      public StoredBlock build(Block block) + throws VerificationException
      +
      Creates a new StoredBlock, calculating the additional fields by adding to the values in this block.
      +
      +
      Throws:
      +
      VerificationException
      +
      +
      +
    • +
    • +
      +

      getPrev

      +
      public StoredBlock getPrev(BlockStore store) + throws BlockStoreException
      +
      Given a block store, looks up the previous block in this chain. Convenience method for doing + store.get(this.getHeader().getPrevBlockHash()).
      +
      +
      Returns:
      +
      the previous block in the chain or null if it was not found in the store.
      +
      Throws:
      +
      BlockStoreException
      +
      +
      +
    • +
    • +
      +

      serializeCompact

      +
      public void serializeCompact(ByteBuffer buffer)
      +
      Serializes the stored block to a custom packed format. Used internally. + As of June 22, 2024, it takes 12 unsigned bytes to store the chain work value, + so developers should use serializeCompactV2(ByteBuffer).
      +
      +
      Parameters:
      +
      buffer - buffer to write to
      +
      +
      +
    • +
    • +
      +

      serializeCompactV2

      +
      public void serializeCompactV2(ByteBuffer buffer)
      +
      Serializes the stored block to a custom packed format. Used internally.
      +
      +
      Parameters:
      +
      buffer - buffer to write to
      +
      +
      +
    • +
    • +
      +

      deserializeCompact

      +
      public static StoredBlock deserializeCompact(ByteBuffer buffer) + throws ProtocolException
      +
      Deserializes the stored block from a custom packed format. Used internally. + As of June 22, 2024, it takes 12 unsigned bytes to store the chain work value, + so developers should use deserializeCompactV2(ByteBuffer).
      +
      +
      Parameters:
      +
      buffer - data to deserialize
      +
      Returns:
      +
      deserialized stored block
      +
      Throws:
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      deserializeCompactV2

      +
      public static StoredBlock deserializeCompactV2(ByteBuffer buffer) + throws ProtocolException
      +
      Deserializes the stored block from a custom packed format. Used internally.
      +
      +
      Parameters:
      +
      buffer - data to deserialize
      +
      Returns:
      +
      deserialized stored block
      +
      Throws:
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      deserializeCompact

      +
      @Deprecated +public static StoredBlock deserializeCompact(MessageSerializer serializer, + ByteBuffer buffer) + throws ProtocolException
      + +
      +
      Throws:
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/StoredUndoableBlock.html b/javadoc/0.17-rc1/org/bitcoinj/core/StoredUndoableBlock.html new file mode 100644 index 000000000..67b7bb2c9 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/StoredUndoableBlock.html @@ -0,0 +1,243 @@ + + + + +StoredUndoableBlock (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class StoredUndoableBlock

+
+
java.lang.Object +
org.bitcoinj.core.StoredUndoableBlock
+
+
+
+
public class StoredUndoableBlock +extends Object
+
Contains minimal data necessary to disconnect/connect the transactions + in the stored block at will. Can either store the full set of + transactions (if the inputs for the block have not been tested to work) + or the set of transaction outputs created/destroyed when the block is + connected.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getTxOutChanges

      +
      public TransactionOutputChanges getTxOutChanges()
      +
      Get the transaction output changes if they have been calculated, otherwise null. + Only one of this and getTransactions() will return a non-null value.
      +
      +
    • +
    • +
      +

      getTransactions

      +
      public List<Transaction> getTransactions()
      +
      Get the full list of transactions if it is stored, otherwise null. + Only one of this and getTxOutChanges() will return a non-null value.
      +
      +
    • +
    • +
      +

      getHash

      +
      public Sha256Hash getHash()
      +
      Get the hash of the represented block
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/Transaction.Purpose.html b/javadoc/0.17-rc1/org/bitcoinj/core/Transaction.Purpose.html new file mode 100644 index 000000000..d356e4780 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/Transaction.Purpose.html @@ -0,0 +1,284 @@ + + + + +Transaction.Purpose (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class Transaction.Purpose

+
+
java.lang.Object +
java.lang.Enum<Transaction.Purpose> +
org.bitcoinj.core.Transaction.Purpose
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Transaction.Purpose>, Constable
+
+
+
Enclosing class:
+
Transaction
+
+
+
public static enum Transaction.Purpose +extends Enum<Transaction.Purpose>
+
This enum describes the underlying reason the transaction was created. It's useful for rendering wallet GUIs + more appropriately.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      UNKNOWN

      +
      public static final Transaction.Purpose UNKNOWN
      +
      Used when the purpose of a transaction is genuinely unknown.
      +
      +
    • +
    • +
      +

      USER_PAYMENT

      +
      public static final Transaction.Purpose USER_PAYMENT
      +
      Transaction created to satisfy a user payment request.
      +
      +
    • +
    • +
      +

      KEY_ROTATION

      +
      public static final Transaction.Purpose KEY_ROTATION
      +
      Transaction automatically created and broadcast in order to reallocate money from old to new keys.
      +
      +
    • +
    • +
      +

      ASSURANCE_CONTRACT_CLAIM

      +
      public static final Transaction.Purpose ASSURANCE_CONTRACT_CLAIM
      +
      Transaction that uses up pledges to an assurance contract
      +
      +
    • +
    • +
      +

      ASSURANCE_CONTRACT_PLEDGE

      +
      public static final Transaction.Purpose ASSURANCE_CONTRACT_PLEDGE
      +
      Transaction that makes a pledge to an assurance contract.
      +
      +
    • +
    • +
      +

      ASSURANCE_CONTRACT_STUB

      +
      public static final Transaction.Purpose ASSURANCE_CONTRACT_STUB
      +
      Send-to-self transaction that exists just to create an output of the right size we can pledge.
      +
      +
    • +
    • +
      +

      RAISE_FEE

      +
      public static final Transaction.Purpose RAISE_FEE
      +
      Raise fee, e.g. child-pays-for-parent.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Transaction.Purpose[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Transaction.Purpose valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/Transaction.SigHash.html b/javadoc/0.17-rc1/org/bitcoinj/core/Transaction.SigHash.html new file mode 100644 index 000000000..c0270daca --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/Transaction.SigHash.html @@ -0,0 +1,313 @@ + + + + +Transaction.SigHash (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class Transaction.SigHash

+
+
java.lang.Object +
java.lang.Enum<Transaction.SigHash> +
org.bitcoinj.core.Transaction.SigHash
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Transaction.SigHash>, Constable
+
+
+
Enclosing class:
+
Transaction
+
+
+
public static enum Transaction.SigHash +extends Enum<Transaction.SigHash>
+
These constants are a part of a scriptSig signature on the inputs. They define the details of how a + transaction can be redeemed, specifically, they control how the hash of the transaction is calculated.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      value

      +
      public final int value
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Transaction.SigHash[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Transaction.SigHash valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      byteValue

      +
      public byte byteValue()
      +
      +
      Returns:
      +
      the value as a byte
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/Transaction.html b/javadoc/0.17-rc1/org/bitcoinj/core/Transaction.html new file mode 100644 index 000000000..f4ada0052 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/Transaction.html @@ -0,0 +1,2188 @@ + + + + +Transaction (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Transaction

+
+
java.lang.Object +
org.bitcoinj.core.BaseMessage +
org.bitcoinj.core.Transaction
+
+
+
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class Transaction +extends BaseMessage
+

A transaction represents the movement of coins from some addresses to some other addresses. It can also represent + the minting of new coins. A Transaction object corresponds to the equivalent in the Bitcoin C++ implementation.

+ +

Transactions are the fundamental atoms of Bitcoin and have many powerful features. Read + "Working with transactions" in the + documentation to learn more about how to use this class.

+ +

All Bitcoin transactions are at risk of being reversed, though the risk is much less than with traditional payment + systems. Transactions have confidence levels, which help you decide whether to trust a transaction or not. + Whether to trust a transaction is something that needs to be decided on a case by case basis - a rule that makes + sense for selling MP3s might not make sense for selling cars, or accepting payments from a family member. If you + are building a wallet, how to present confidence to your users is something to consider carefully.

+ +

Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      SORT_TX_BY_UPDATE_TIME

      +
      public static final Comparator<Transaction> SORT_TX_BY_UPDATE_TIME
      +
      A comparator that can be used to sort transactions by their updateTime field. The ordering goes from most recent + into the past. Transactions with an unknown update time will go to the end.
      +
      +
    • +
    • +
      +

      SORT_TX_BY_HEIGHT

      +
      public static final Comparator<Transaction> SORT_TX_BY_HEIGHT
      +
      A comparator that can be used to sort transactions by their chain height. Unconfirmed transactions will go to + the end.
      +
      +
    • +
    • +
      +

      SERIALIZE_TRANSACTION_NO_WITNESS

      +
      public static final int SERIALIZE_TRANSACTION_NO_WITNESS
      +
      When this bit is set in protocolVersion, do not include witness. The actual value is the same as in Bitcoin Core + for consistency.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      LOCKTIME_THRESHOLD

      +
      @Deprecated +public static final int LOCKTIME_THRESHOLD
      +
      Deprecated. +
      use LockTime.THRESHOLD or + lockTime instanceof HeightLock or + lockTime instanceof TimeLock
      +
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      MAX_STANDARD_TX_SIZE

      +
      public static final int MAX_STANDARD_TX_SIZE
      +
      How many bytes a transaction can be before it won't be relayed anymore. Currently 100kb.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      REFERENCE_DEFAULT_MIN_TX_FEE

      +
      public static final Coin REFERENCE_DEFAULT_MIN_TX_FEE
      +
      If feePerKb is lower than this, Bitcoin Core will treat it as if there were no fee.
      +
      +
    • +
    • +
      +

      DEFAULT_TX_FEE

      +
      public static final Coin DEFAULT_TX_FEE
      +
      If using this feePerKb, transactions will get confirmed within the next couple of blocks. + This should be adjusted from time to time. Last adjustment: February 2017.
      +
      +
    • +
    • +
      +

      SIGHASH_ANYONECANPAY_VALUE

      +
      public static final byte SIGHASH_ANYONECANPAY_VALUE
      +
      Deprecated. +
      Instead use SigHash.ANYONECANPAY.value or SigHash.ANYONECANPAY.byteValue() as appropriate.
      +
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      coinbase

      +
      public static Transaction coinbase()
      +
      Constructs an incomplete coinbase transaction with a minimal input script and no outputs.
      +
      +
      Returns:
      +
      coinbase transaction
      +
      +
      +
    • +
    • +
      +

      coinbase

      +
      public static Transaction coinbase(byte[] inputScriptBytes)
      +
      Constructs an incomplete coinbase transaction with given bytes for the input script and no outputs.
      +
      +
      Parameters:
      +
      inputScriptBytes - arbitrary bytes for the coinbase input
      +
      Returns:
      +
      coinbase transaction
      +
      +
      +
    • +
    • +
      +

      read

      +
      public static Transaction read(ByteBuffer payload) + throws BufferUnderflowException, +ProtocolException
      +
      Deserialize this message from a given payload.
      +
      +
      Parameters:
      +
      payload - payload to deserialize from
      +
      Returns:
      +
      read message
      +
      Throws:
      +
      BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      read

      +
      public static Transaction read(ByteBuffer payload, + int protocolVersion) + throws BufferUnderflowException, +ProtocolException
      +
      Deserialize this message from a given payload, according to + BIP144 or the + classic format, depending on if the + transaction is segwit or not.
      +
      +
      Parameters:
      +
      payload - payload to deserialize from
      +
      protocolVersion - protocol version to use for deserialization
      +
      Returns:
      +
      read message
      +
      Throws:
      +
      BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      getTxId

      +
      public Sha256Hash getTxId()
      +
      Returns the transaction id as you see them in block explorers. It is used as a reference by transaction inputs + via outpoints.
      +
      +
    • +
    • +
      +

      getWTxId

      +
      public Sha256Hash getWTxId()
      +
      Returns the witness transaction id (aka witness id) as per BIP144. For transactions without witness, this is the + same as getTxId().
      +
      +
    • +
    • +
      +

      getWeight

      +
      public int getWeight()
      +
      Gets the transaction weight as defined in BIP141.
      +
      +
    • +
    • +
      +

      getVsize

      +
      public int getVsize()
      +
      Gets the virtual transaction size as defined in BIP141.
      +
      +
    • +
    • +
      +

      getInputSum

      +
      public Coin getInputSum()
      +
      Gets the sum of all transaction inputs, regardless of who owns them. +

      + Warning: Inputs with null TransactionInput.getValue() are silently skipped. Before completing + or signing a transaction you should verify that there are no inputs with null values.

      +
      +
      Returns:
      +
      The sum of all inputs with non-null values.
      +
      +
      +
    • +
    • +
      +

      getValueSentToMe

      +
      public Coin getValueSentToMe(TransactionBag transactionBag)
      +
      Calculates the sum of the outputs that are sending coins to a key in the wallet.
      +
      +
    • +
    • +
      +

      getAppearsInHashes

      +
      @Nullable +public Map<Sha256Hash,Integer> getAppearsInHashes()
      +
      Returns a map of block [hashes] which contain the transaction mapped to relativity counters, or null if this + transaction doesn't have that data because it's not stored in the wallet or because it has never appeared in a + block.
      +
      +
    • +
    • +
      +

      isPending

      +
      public boolean isPending()
      +
      Convenience wrapper around getConfidence().getConfidenceType()
      +
      +
      Returns:
      +
      true if this transaction hasn't been seen in any block yet.
      +
      +
      +
    • +
    • +
      +

      setBlockAppearance

      +
      public void setBlockAppearance(StoredBlock block, + boolean bestChain, + int relativityOffset)
      +

      Puts the given block in the internal set of blocks in which this transaction appears. This is + used by the wallet to ensure transactions that appear on side chains are recorded properly even though the + block stores do not save the transaction data at all.

      + +

      If there is a re-org this will be called once for each block that was previously seen, to update which block + is the best chain. The best chain block is guaranteed to be called last. So this must be idempotent.

      + +

      Sets updatedAt to be the earliest valid block time where this tx was seen.

      +
      +
      Parameters:
      +
      block - The StoredBlock in which the transaction has appeared.
      +
      bestChain - whether to set the updatedAt timestamp from the block header (only if not already set)
      +
      relativityOffset - A number that disambiguates the order of transactions within a block.
      +
      +
      +
    • +
    • +
      +

      addBlockAppearance

      +
      public void addBlockAppearance(Sha256Hash blockHash, + int relativityOffset)
      +
      +
    • +
    • +
      +

      getValueSentFromMe

      +
      public Coin getValueSentFromMe(TransactionBag wallet) + throws ScriptException
      +
      Calculates the sum of the inputs that are spending coins with keys in the wallet. This requires the + transactions sending coins to those keys to be in the wallet. This method will not attempt to download the + blocks containing the input transactions if the key is in the wallet but the transactions are not.
      +
      +
      Returns:
      +
      sum of the inputs that are spending coins with keys in the wallet
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      getOutputSum

      +
      public Coin getOutputSum()
      +
      Gets the sum of the outputs of the transaction. If the outputs are less than the inputs, it does not count the fee.
      +
      +
      Returns:
      +
      the sum of the outputs regardless of who owns them.
      +
      +
      +
    • +
    • +
      +

      getValue

      +
      public Coin getValue(TransactionBag wallet) + throws ScriptException
      + +
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      getFee

      +
      public Coin getFee()
      +
      The transaction fee is the difference of the value of all inputs and the value of all outputs. Currently, the fee + can only be determined for transactions created by us.
      +
      +
      Returns:
      +
      fee, or null if it cannot be determined
      +
      +
      +
    • +
    • +
      +

      isAnyOutputSpent

      +
      public boolean isAnyOutputSpent()
      +
      Returns true if any of the outputs is marked as spent.
      +
      +
    • +
    • +
      +

      isEveryOwnedOutputSpent

      +
      public boolean isEveryOwnedOutputSpent(TransactionBag transactionBag)
      +
      Returns false if this transaction has at least one output that is owned by the given wallet and unspent, true + otherwise.
      +
      +
    • +
    • +
      +

      updateTime

      +
      public Optional<Instant> updateTime()
      +
      Returns the earliest time at which the transaction was seen (broadcast or included into the chain), + or empty if that information isn't available.
      +
      +
    • +
    • +
      +

      getUpdateTime

      +
      @Deprecated +public Date getUpdateTime()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      setUpdateTime

      +
      public void setUpdateTime(Instant updateTime)
      +
      Sets the update time of this transaction.
      +
      +
      Parameters:
      +
      updateTime - update time
      +
      +
      +
    • +
    • +
      +

      clearUpdateTime

      +
      public void clearUpdateTime()
      +
      Clears the update time of this transaction.
      +
      +
    • +
    • +
      +

      setUpdateTime

      +
      @Deprecated +public void setUpdateTime(Date updateTime)
      + +
      +
    • +
    • +
      +

      hasWitnesses

      +
      public boolean hasWitnesses()
      +
      +
      Returns:
      +
      true of the transaction has any witnesses in any of its inputs
      +
      +
      +
    • +
    • +
      +

      getMessageSizeForPriorityCalc

      +
      public int getMessageSizeForPriorityCalc()
      +
      The priority (coin age) calculation doesn't use the regular message size, but rather one adjusted downwards + for the number of inputs. The goal is to incentivise cleaning up the UTXO set with free transactions, if one + can do so.
      +
      +
    • +
    • +
      +

      isCoinBase

      +
      public boolean isCoinBase()
      +
      A coinbase transaction is one that creates a new coin. They are the first transaction in each block and their + value is determined by a formula that all implementations of Bitcoin share. In 2011 the value of a coinbase + transaction is 50 coins, but in future it will be less. A coinbase transaction is defined not only by its + position in a block but by the data in the inputs.
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString(@Nullable + AbstractBlockChain chain, + @Nullable + Network network)
      +
      A human-readable version of the transaction useful for debugging. The format is not guaranteed to be stable.
      +
      +
      Parameters:
      +
      chain - if provided, will be used to estimate lock times (if set)
      +
      network - if provided, network for output scripts converted to addresses
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString(@Nullable + AbstractBlockChain chain, + @Nullable + Network network, + CharSequence indent)
      +
      A human-readable version of the transaction useful for debugging. The format is not guaranteed to be stable.
      +
      +
      Parameters:
      +
      chain - if provided, will be used to estimate lock times (if set)
      +
      network - if provided, network for output scripts converted to addresses
      +
      indent - characters that will be prepended to each line of the output
      +
      +
      +
    • +
    • +
      +

      clearInputs

      +
      public void clearInputs()
      +
      Removes all the inputs from this transaction. + Note that this also invalidates the length attribute
      +
      +
    • +
    • +
      +

      addInput

      +
      public TransactionInput addInput(TransactionOutput from)
      +
      Adds an input to this transaction that imports value from the given output. Note that this input is not + complete and after every input is added with addInput(TransactionInput) and every output is added with + addOutput(TransactionOutput), a TransactionSigner must be used to finalize the transaction and finish the inputs + off. Otherwise it won't be accepted by the network.
      +
      +
      Returns:
      +
      the newly created input.
      +
      +
      +
    • +
    • +
      +

      addInput

      +
      public TransactionInput addInput(TransactionInput input)
      +
      Adds an input directly, with no checking that it's valid.
      +
      +
      Returns:
      +
      the new input.
      +
      +
      +
    • +
    • +
      +

      addInput

      +
      public TransactionInput addInput(Sha256Hash spendTxHash, + long outputIndex, + Script script)
      +
      Creates and adds an input to this transaction, with no checking that it's valid.
      +
      +
      Returns:
      +
      the newly created input.
      +
      +
      +
    • +
    • +
      +

      addSignedInput

      +
      public TransactionInput addSignedInput(TransactionOutPoint prevOut, + Script scriptPubKey, + Coin amount, + ECKey sigKey, + Transaction.SigHash sigHash, + boolean anyoneCanPay) + throws ScriptException
      +
      Adds a new and fully signed input for the given parameters. Note that this method is not thread safe + and requires external synchronization. Please refer to general documentation on Bitcoin scripting and contracts + to understand the values of sigHash and anyoneCanPay: otherwise you can use the other form of this method + that sets them to typical defaults.
      +
      +
      Parameters:
      +
      prevOut - A reference to the output being spent
      +
      scriptPubKey - The scriptPubKey of the output
      +
      amount - The amount of the output (which is part of the signature hash for segwit)
      +
      sigKey - The signing key
      +
      sigHash - enum specifying how the transaction hash is calculated
      +
      anyoneCanPay - anyone-can-pay hashing
      +
      Returns:
      +
      The newly created input
      +
      Throws:
      +
      ScriptException - if the scriptPubKey is something we don't know how to sign.
      +
      +
      +
    • +
    • +
      +

      addSignedInput

      +
      @Deprecated +public TransactionInput addSignedInput(TransactionOutPoint prevOut, + Script scriptPubKey, + ECKey sigKey, + Transaction.SigHash sigHash, + boolean anyoneCanPay) + throws ScriptException
      + +
      +
      Parameters:
      +
      prevOut - A reference to the output being spent
      +
      scriptPubKey - The scriptPubKey of the output
      +
      sigKey - The signing key
      +
      sigHash - enum specifying how the transaction hash is calculated
      +
      anyoneCanPay - anyone-can-pay hashing
      +
      Returns:
      +
      The newly created input
      +
      Throws:
      +
      ScriptException - if the scriptPubKey is something we don't know how to sign.
      +
      +
      +
    • +
    • +
      +

      addSignedInput

      +
      public TransactionInput addSignedInput(TransactionOutPoint prevOut, + Script scriptPubKey, + Coin amount, + ECKey sigKey) + throws ScriptException
      +
      Adds a new and fully signed input for the given parameters. Note that this method is not thread safe + and requires external synchronization. + Defaults to Transaction.SigHash.ALL and "false" for the anyoneCanPay flag. This is normally what you want.
      +
      +
      Parameters:
      +
      prevOut - A reference to the output being spent
      +
      scriptPubKey - The scriptPubKey of the output
      +
      amount - The amount of the output (which is part of the signature hash for segwit)
      +
      sigKey - The signing key
      +
      Returns:
      +
      The newly created input
      +
      Throws:
      +
      ScriptException - if the scriptPubKey is something we don't know how to sign.
      +
      +
      +
    • +
    • +
      +

      addSignedInput

      +
      @Deprecated +public TransactionInput addSignedInput(TransactionOutPoint prevOut, + Script scriptPubKey, + ECKey sigKey) + throws ScriptException
      + +
      +
      Parameters:
      +
      prevOut - A reference to the output being spent
      +
      scriptPubKey - The scriptPubKey of the output
      +
      sigKey - The signing key
      +
      Returns:
      +
      The newly created input
      +
      Throws:
      +
      ScriptException - if the scriptPubKey is something we don't know how to sign.
      +
      +
      +
    • +
    • +
      +

      addSignedInput

      +
      public TransactionInput addSignedInput(TransactionOutput output, + ECKey sigKey)
      +
      Adds an input that points to the given output and contains a valid signature for it, calculated using the + signing key. Defaults to Transaction.SigHash.ALL and "false" for the anyoneCanPay flag. This is normally what you want.
      +
      +
      Parameters:
      +
      output - output to sign and use as input
      +
      sigKey - The signing key
      +
      Returns:
      +
      The newly created input
      +
      +
      +
    • +
    • +
      +

      addSignedInput

      +
      public TransactionInput addSignedInput(TransactionOutput output, + ECKey sigKey, + Transaction.SigHash sigHash, + boolean anyoneCanPay)
      +
      Adds an input that points to the given output and contains a valid signature for it, calculated using the + signing key.
      +
      +
      Parameters:
      +
      output - output to sign and use as input
      +
      sigKey - The signing key
      +
      sigHash - enum specifying how the transaction hash is calculated
      +
      anyoneCanPay - anyone-can-pay hashing
      +
      Returns:
      +
      The newly created input
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      clearOutputs

      +
      public void clearOutputs()
      +
      Removes all the outputs from this transaction. + Note that this also invalidates the length attribute
      +
      +
    • +
    • +
      +

      addOutput

      +
      public TransactionOutput addOutput(TransactionOutput to)
      +
      Adds the given output to this transaction. The output must be completely initialized. Returns the given output.
      +
      +
    • +
    • +
      +

      addOutput

      +
      public TransactionOutput addOutput(Coin value, + Address address)
      +
      Creates an output based on the given address and value, adds it to this transaction, and returns the new output.
      +
      +
    • +
    • +
      +

      addOutput

      +
      public TransactionOutput addOutput(Coin value, + ECKey pubkey)
      +
      Creates an output that pays to the given pubkey directly (no address) with the given value, adds it to this + transaction, and returns the new output.
      +
      +
    • +
    • +
      +

      addOutput

      +
      public TransactionOutput addOutput(Coin value, + Script script)
      +
      Creates an output that pays to the given script. The address and key forms are specialisations of this method, + you won't normally need to use it unless you're doing unusual things.
      +
      +
    • +
    • +
      +

      calculateSignature

      +
      public TransactionSignature calculateSignature(int inputIndex, + ECKey key, + byte[] redeemScript, + Transaction.SigHash hashType, + boolean anyoneCanPay)
      +
      Calculates a signature that is valid for being inserted into the input at the given position. This is simply + a wrapper around calling hashForSignature(int, byte[], Transaction.SigHash, boolean) + followed by ECKey.sign(Sha256Hash) and then returning a new TransactionSignature. The key + must be usable for signing as-is: if the key is encrypted it must be decrypted first external to this method.
      +
      +
      Parameters:
      +
      inputIndex - Which input to calculate the signature for, as an index.
      +
      key - The private key used to calculate the signature.
      +
      redeemScript - Byte-exact contents of the scriptPubKey that is being satisfied, or the P2SH redeem script.
      +
      hashType - Signing mode, see the enum for documentation.
      +
      anyoneCanPay - Signing mode, see the SigHash enum for documentation.
      +
      Returns:
      +
      A newly calculated signature object that wraps the r, s and sighash components.
      +
      +
      +
    • +
    • +
      +

      calculateSignature

      +
      public TransactionSignature calculateSignature(int inputIndex, + ECKey key, + Script redeemScript, + Transaction.SigHash hashType, + boolean anyoneCanPay)
      +
      Calculates a signature that is valid for being inserted into the input at the given position. This is simply + a wrapper around calling hashForSignature(int, byte[], Transaction.SigHash, boolean) + followed by ECKey.sign(Sha256Hash) and then returning a new TransactionSignature.
      +
      +
      Parameters:
      +
      inputIndex - Which input to calculate the signature for, as an index.
      +
      key - The private key used to calculate the signature.
      +
      redeemScript - The scriptPubKey that is being satisfied, or the P2SH redeem script.
      +
      hashType - Signing mode, see the enum for documentation.
      +
      anyoneCanPay - Signing mode, see the SigHash enum for documentation.
      +
      Returns:
      +
      A newly calculated signature object that wraps the r, s and sighash components.
      +
      +
      +
    • +
    • +
      +

      calculateSignature

      +
      public TransactionSignature calculateSignature(int inputIndex, + ECKey key, + @Nullable + AesKey aesKey, + byte[] redeemScript, + Transaction.SigHash hashType, + boolean anyoneCanPay)
      +
      Calculates a signature that is valid for being inserted into the input at the given position. This is simply + a wrapper around calling hashForSignature(int, byte[], Transaction.SigHash, boolean) + followed by ECKey.sign(Sha256Hash) and then returning a new TransactionSignature. The key + must be usable for signing as-is: if the key is encrypted it must be decrypted first external to this method.
      +
      +
      Parameters:
      +
      inputIndex - Which input to calculate the signature for, as an index.
      +
      key - The private key used to calculate the signature.
      +
      aesKey - The AES key to use for decryption of the private key. If null then no decryption is required.
      +
      redeemScript - Byte-exact contents of the scriptPubKey that is being satisfied, or the P2SH redeem script.
      +
      hashType - Signing mode, see the enum for documentation.
      +
      anyoneCanPay - Signing mode, see the SigHash enum for documentation.
      +
      Returns:
      +
      A newly calculated signature object that wraps the r, s and sighash components.
      +
      +
      +
    • +
    • +
      +

      calculateSignature

      +
      public TransactionSignature calculateSignature(int inputIndex, + ECKey key, + @Nullable + AesKey aesKey, + Script redeemScript, + Transaction.SigHash hashType, + boolean anyoneCanPay)
      +
      Calculates a signature that is valid for being inserted into the input at the given position. This is simply + a wrapper around calling hashForSignature(int, byte[], Transaction.SigHash, boolean) + followed by ECKey.sign(Sha256Hash) and then returning a new TransactionSignature.
      +
      +
      Parameters:
      +
      inputIndex - Which input to calculate the signature for, as an index.
      +
      key - The private key used to calculate the signature.
      +
      aesKey - The AES key to use for decryption of the private key. If null then no decryption is required.
      +
      redeemScript - The scriptPubKey that is being satisfied, or the P2SH redeem script.
      +
      hashType - Signing mode, see the enum for documentation.
      +
      anyoneCanPay - Signing mode, see the SigHash enum for documentation.
      +
      Returns:
      +
      A newly calculated signature object that wraps the r, s and sighash components.
      +
      +
      +
    • +
    • +
      +

      hashForSignature

      +
      public Sha256Hash hashForSignature(int inputIndex, + byte[] redeemScript, + Transaction.SigHash type, + boolean anyoneCanPay)
      +

      Calculates a signature hash, that is, a hash of a simplified form of the transaction. How exactly the transaction + is simplified is specified by the type and anyoneCanPay parameters.

      + +

      This is a low level API and when using the regular Wallet class you don't have to call this yourself. + When working with more complex transaction types and contracts, it can be necessary. When signing a P2SH output + the redeemScript should be the script encoded into the scriptSig field, for normal transactions, it's the + scriptPubKey of the output you're signing for.

      +
      +
      Parameters:
      +
      inputIndex - input the signature is being calculated for. Tx signatures are always relative to an input.
      +
      redeemScript - the bytes that should be in the given input during signing.
      +
      type - Should be SigHash.ALL
      +
      anyoneCanPay - should be false.
      +
      +
      +
    • +
    • +
      +

      hashForSignature

      +
      public Sha256Hash hashForSignature(int inputIndex, + Script redeemScript, + Transaction.SigHash type, + boolean anyoneCanPay)
      +

      Calculates a signature hash, that is, a hash of a simplified form of the transaction. How exactly the transaction + is simplified is specified by the type and anyoneCanPay parameters.

      + +

      This is a low level API and when using the regular Wallet class you don't have to call this yourself. + When working with more complex transaction types and contracts, it can be necessary. When signing a P2SH output + the redeemScript should be the script encoded into the scriptSig field, for normal transactions, it's the + scriptPubKey of the output you're signing for.

      +
      +
      Parameters:
      +
      inputIndex - input the signature is being calculated for. Tx signatures are always relative to an input.
      +
      redeemScript - the script that should be in the given input during signing.
      +
      type - Should be SigHash.ALL
      +
      anyoneCanPay - should be false.
      +
      +
      +
    • +
    • +
      +

      hashForSignature

      +
      public Sha256Hash hashForSignature(int inputIndex, + byte[] connectedScript, + byte sigHashType)
      +
      This is required for signatures which use a sigHashType which cannot be represented using SigHash and anyoneCanPay + See transaction c99c49da4c38af669dea436d3e73780dfdb6c1ecf9958baa52960e8baee30e73, which has sigHashType 0
      +
      +
    • +
    • +
      +

      calculateWitnessSignature

      +
      public TransactionSignature calculateWitnessSignature(int inputIndex, + ECKey key, + byte[] scriptCode, + Coin value, + Transaction.SigHash hashType, + boolean anyoneCanPay)
      +
      +
    • +
    • +
      +

      calculateWitnessSignature

      +
      public TransactionSignature calculateWitnessSignature(int inputIndex, + ECKey key, + Script scriptCode, + Coin value, + Transaction.SigHash hashType, + boolean anyoneCanPay)
      +
      +
    • +
    • +
      +

      calculateWitnessSignature

      +
      public TransactionSignature calculateWitnessSignature(int inputIndex, + ECKey key, + @Nullable + AesKey aesKey, + byte[] scriptCode, + Coin value, + Transaction.SigHash hashType, + boolean anyoneCanPay)
      +
      +
    • +
    • +
      +

      calculateWitnessSignature

      +
      public TransactionSignature calculateWitnessSignature(int inputIndex, + ECKey key, + @Nullable + AesKey aesKey, + Script scriptCode, + Coin value, + Transaction.SigHash hashType, + boolean anyoneCanPay)
      +
      +
    • +
    • +
      +

      hashForWitnessSignature

      +
      public Sha256Hash hashForWitnessSignature(int inputIndex, + byte[] scriptCode, + Coin prevValue, + Transaction.SigHash type, + boolean anyoneCanPay)
      +
      +
    • +
    • +
      +

      hashForWitnessSignature

      +
      public Sha256Hash hashForWitnessSignature(int inputIndex, + Script scriptCode, + Coin prevValue, + Transaction.SigHash type, + boolean anyoneCanPay)
      +

      Calculates a signature hash, that is, a hash of a simplified form of the transaction. How exactly the transaction + is simplified is specified by the type and anyoneCanPay parameters.

      + +

      This is a low level API and when using the regular Wallet class you don't have to call this yourself. + When working with more complex transaction types and contracts, it can be necessary. When signing a Witness output + the scriptCode should be the script encoded into the scriptSig field, for normal transactions, it's the + scriptPubKey of the output you're signing for. (See BIP143: https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki)

      +
      +
      Parameters:
      +
      inputIndex - input the signature is being calculated for. Tx signatures are always relative to an input.
      +
      scriptCode - the script that should be in the given input during signing.
      +
      prevValue - the value of the coin being spent
      +
      type - Should be SigHash.ALL
      +
      anyoneCanPay - should be false.
      +
      +
      +
    • +
    • +
      +

      hashForWitnessSignature

      +
      public Sha256Hash hashForWitnessSignature(int inputIndex, + byte[] scriptCode, + Coin prevValue, + byte sigHashType)
      +
      +
    • +
    • +
      +

      messageSize

      +
      public int messageSize()
      +
      Description copied from class: BaseMessage
      +
      Return the size of the serialized message. Note that if the message was deserialized from a payload, this + size can differ from the size of the original payload.
      +
      +
      Specified by:
      +
      messageSize in interface Message
      +
      Overrides:
      +
      messageSize in class BaseMessage
      +
      Returns:
      +
      size of this object when serialized (in bytes)
      +
      +
      +
    • +
    • +
      +

      bitcoinSerializeToStream

      +
      protected void bitcoinSerializeToStream(OutputStream stream) + throws IOException
      +
      Description copied from class: BaseMessage
      +
      Serializes this message to the provided stream. If you just want the raw bytes use BaseMessage.serialize().
      +
      +
      Specified by:
      +
      bitcoinSerializeToStream in class BaseMessage
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      bitcoinSerializeToStream

      +
      protected void bitcoinSerializeToStream(OutputStream stream, + boolean useSegwit) + throws IOException
      +
      Serialize according to BIP144 or the + classic format, depending on if segwit is + desired.
      +
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      lockTime

      +
      public LockTime lockTime()
      +
      Transactions can have an associated lock time, specified either as a block height or as a timestamp (in seconds + since epoch). A transaction is not allowed to be confirmed by miners until the lock time is reached, and + since Bitcoin 0.8+ a transaction that did not end its lock period (non final) is considered to be non + standard and won't be relayed or included in the memory pool either.
      +
      +
      Returns:
      +
      lock time, wrapped in a LockTime
      +
      +
      +
    • +
    • +
      +

      getLockTime

      +
      @Deprecated +public long getLockTime()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      setLockTime

      +
      public void setLockTime(long lockTime)
      +
      Transactions can have an associated lock time, specified either as a block height or as a timestamp (in seconds + since epoch). A transaction is not allowed to be confirmed by miners until the lock time is reached, and + since Bitcoin 0.8+ a transaction that did not end its lock period (non final) is considered to be non + standard and won't be relayed or included in the memory pool either.
      +
      +
    • +
    • +
      +

      getVersion

      +
      public long getVersion()
      +
      +
    • +
    • +
      +

      setVersion

      +
      public void setVersion(int version)
      +
      +
    • +
    • +
      +

      getInputs

      +
      public List<TransactionInput> getInputs()
      +
      Returns an unmodifiable view of all inputs.
      +
      +
    • +
    • +
      +

      getOutputs

      +
      public List<TransactionOutput> getOutputs()
      +
      Returns an unmodifiable view of all outputs.
      +
      +
    • +
    • +
      +

      getWalletOutputs

      +
      public List<TransactionOutput> getWalletOutputs(TransactionBag transactionBag)
      +

      Returns the list of transacion outputs, whether spent or unspent, that match a wallet by address or that are + watched by a wallet, i.e., transaction outputs whose script's address is controlled by the wallet and transaction + outputs whose script is watched by the wallet.

      +
      +
      Parameters:
      +
      transactionBag - The wallet that controls addresses and watches scripts.
      +
      Returns:
      +
      linked list of outputs relevant to the wallet in this transaction
      +
      +
      +
    • +
    • +
      +

      shuffleOutputs

      +
      public void shuffleOutputs()
      +
      Randomly re-orders the transaction outputs: good for privacy
      +
      +
    • +
    • +
      +

      getInput

      +
      public TransactionInput getInput(long index)
      +
      Same as getInputs().get(index).
      +
      +
    • +
    • +
      +

      getOutput

      +
      public TransactionOutput getOutput(long index)
      +
      Same as getOutputs().get(index)
      +
      +
    • +
    • +
      +

      getOutput

      +
      public TransactionOutput getOutput(TransactionOutPoint outpoint)
      +
      Gets the output the gihven outpoint is referring to. Note the output must belong to this transaction, or else + an IllegalArgumentException will occur.
      +
      +
      Parameters:
      +
      outpoint - outpoint referring to the output to get
      +
      Returns:
      +
      output referred to by the given outpoint
      +
      +
      +
    • +
    • +
      +

      getConfidence

      +
      public TransactionConfidence getConfidence()
      +
      Returns the confidence object for this transaction from the TxConfidenceTable + referenced by the implicit Context.
      +
      +
    • +
    • +
      +

      hasConfidence

      +
      public boolean hasConfidence()
      +
      Check if the transaction has a known confidence
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      getSigOpCount

      +
      public int getSigOpCount() + throws ScriptException
      +
      Gets the count of regular SigOps in this transactions
      +
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      checkCoinBaseHeight

      +
      public void checkCoinBaseHeight(int height) + throws VerificationException
      +
      Check block height is in coinbase input script, for use after BIP 34 + enforcement is enabled.
      +
      +
      Throws:
      +
      VerificationException
      +
      +
      +
    • +
    • +
      +

      findWitnessCommitment

      +
      public Sha256Hash findWitnessCommitment()
      +
      Loops the outputs of a coinbase transaction to locate the witness commitment.
      +
      +
    • +
    • +
      +

      isTimeLocked

      +
      public boolean isTimeLocked()
      +

      A transaction is time-locked if at least one of its inputs is non-final and it has a lock time. A transaction can + also have a relative lock time which this method doesn't tell. Use hasRelativeLockTime() to find out.

      + +

      To check if this transaction is final at a given height and time, see isFinal(int, Instant) +

      +
      +
    • +
    • +
      +

      hasRelativeLockTime

      +
      public boolean hasRelativeLockTime()
      +
      A transaction has a relative lock time + (BIP 68) if it is version 2 or + higher and at least one of its inputs has its TransactionInput.SEQUENCE_LOCKTIME_DISABLE_FLAG cleared.
      +
      +
    • +
    • +
      +

      isOptInFullRBF

      +
      public boolean isOptInFullRBF()
      +
      Returns whether this transaction will opt into the + full replace-by-fee semantics.
      +
      +
    • +
    • +
      +

      isFinal

      +
      public boolean isFinal(int height, + Instant blockTime)
      +

      Returns true if this transaction is considered finalized and can be placed in a block. Non-finalized + transactions won't be included by miners and can be replaced with newer versions using sequence numbers. + This is useful in certain types of contracts, such as + micropayment channels.

      + +

      Note that currently the replacement feature is disabled in Bitcoin Core and will need to be + re-activated before this functionality is useful.

      +
      +
    • +
    • +
      +

      isFinal

      +
      @Deprecated +public boolean isFinal(int height, + long blockTimeSeconds)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      estimateUnlockTime

      +
      public Instant estimateUnlockTime(AbstractBlockChain chain)
      +
      Returns either the lock time, if it was specified as a timestamp, or an estimate based on the time in + the current head block if it was specified as a block height.
      +
      +
    • +
    • +
      +

      estimateLockTime

      +
      @Deprecated +public Date estimateLockTime(AbstractBlockChain chain)
      + +
      +
    • +
    • +
      +

      getPurpose

      +
      public Transaction.Purpose getPurpose()
      +
      Returns the purpose for which this transaction was created. See the javadoc for Transaction.Purpose for more + information on the point of this field and what it can be.
      +
      +
    • +
    • +
      +

      setPurpose

      +
      public void setPurpose(Transaction.Purpose purpose)
      +
      Marks the transaction as being created for the given purpose. See the javadoc for Transaction.Purpose for more + information on the point of this field and what it can be.
      +
      +
    • +
    • +
      +

      getExchangeRate

      +
      @Nullable +public ExchangeRate getExchangeRate()
      +
      Getter for exchangeRate.
      +
      +
    • +
    • +
      +

      setExchangeRate

      +
      public void setExchangeRate(ExchangeRate exchangeRate)
      +
      Setter for exchangeRate.
      +
      +
    • +
    • +
      +

      getMemo

      +
      @Nullable +public String getMemo()
      +
      Returns the transaction memo.
      +
      +
    • +
    • +
      +

      setMemo

      +
      public void setMemo(String memo)
      +
      Set the transaction memo. It can be used to record the memo of the payment request that initiated the + transaction.
      +
      +
    • +
    • +
      +

      verify

      +
      public static void verify(Network network, + Transaction tx) + throws VerificationException
      +

      Checks the transaction contents for sanity, in ways that can be done in a standalone manner. + Does not perform all checks on a transaction such as whether the inputs are already spent. + Specifically this method verifies:

      + +
        +
      • That there is at least one input and output.
      • +
      • That the serialized size is not larger than the max block size.
      • +
      • That no outputs have negative value.
      • +
      • That the outputs do not sum to larger than the max allowed quantity of coin in the system.
      • +
      • If the tx is a coinbase tx, the coinbase scriptSig size is within range. Otherwise that there are no + coinbase inputs in the tx.
      • +
      +
      +
      Parameters:
      +
      network - network for the verification rules
      +
      tx - transaction to verify
      +
      Throws:
      +
      VerificationException - if at least one of the rules is violated
      +
      +
      +
    • +
    • +
      +

      verify

      +
      @Deprecated +public static void verify(NetworkParameters params, + Transaction tx) + throws VerificationException
      +
      Deprecated. + +
      +
      +
      Throws:
      +
      VerificationException
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TransactionBag.html b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionBag.html new file mode 100644 index 000000000..1d7275b6a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionBag.html @@ -0,0 +1,190 @@ + + + + +TransactionBag (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface TransactionBag

+
+
+
+
All Known Implementing Classes:
+
Wallet
+
+
+
public interface TransactionBag
+
This interface is used to abstract the Wallet and the Transaction
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Returns transactions from a specific pool.
    +
    +
    boolean
    +
    isPayToScriptHashMine(byte[] payToScriptHash)
    +
    +
    Returns true if this wallet knows the script corresponding to the given hash.
    +
    +
    boolean
    +
    isPubKeyHashMine(byte[] pubKeyHash, + ScriptType scriptType)
    +
    +
    Look for a public key which hashes to the given hash and (optionally) is used for a specific script type.
    +
    +
    boolean
    +
    isPubKeyMine(byte[] pubKey)
    +
    +
    Returns true if this wallet contains a keypair with the given public key.
    +
    +
    boolean
    + +
    +
    Returns true if this wallet is watching transactions for outputs with the script.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      isPubKeyHashMine

      +
      boolean isPubKeyHashMine(byte[] pubKeyHash, + @Nullable + ScriptType scriptType)
      +
      Look for a public key which hashes to the given hash and (optionally) is used for a specific script type.
      +
      +
      Parameters:
      +
      pubKeyHash - hash of the public key to look for
      +
      scriptType - only look for given usage (currently ScriptType.P2PKH or ScriptType.P2WPKH) or null if we don't care
      +
      Returns:
      +
      true if hash was found
      +
      +
      +
    • +
    • +
      +

      isWatchedScript

      +
      boolean isWatchedScript(Script script)
      +
      Returns true if this wallet is watching transactions for outputs with the script.
      +
      +
    • +
    • +
      +

      isPubKeyMine

      +
      boolean isPubKeyMine(byte[] pubKey)
      +
      Returns true if this wallet contains a keypair with the given public key.
      +
      +
    • +
    • +
      +

      isPayToScriptHashMine

      +
      boolean isPayToScriptHashMine(byte[] payToScriptHash)
      +
      Returns true if this wallet knows the script corresponding to the given hash.
      +
      +
    • +
    • +
      +

      getTransactionPool

      +
      Map<Sha256Hash,Transaction> getTransactionPool(WalletTransaction.Pool pool)
      +
      Returns transactions from a specific pool.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TransactionBroadcast.ProgressCallback.html b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionBroadcast.ProgressCallback.html new file mode 100644 index 000000000..542b41607 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionBroadcast.ProgressCallback.html @@ -0,0 +1,137 @@ + + + + +TransactionBroadcast.ProgressCallback (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface TransactionBroadcast.ProgressCallback

+
+
+
+
Enclosing class:
+
TransactionBroadcast
+
+
+
public static interface TransactionBroadcast.ProgressCallback
+
An interface for receiving progress information on the propagation of the tx, from 0.0 to 1.0
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onBroadcastProgress(double progress)
    +
    +
    onBroadcastProgress will be invoked on the provided executor when the progress of the transaction + broadcast has changed, because the transaction has been announced by another peer or because the transaction + was found inside a mined block (in this case progress will go to 1.0 immediately).
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onBroadcastProgress

      +
      void onBroadcastProgress(double progress)
      +
      onBroadcastProgress will be invoked on the provided executor when the progress of the transaction + broadcast has changed, because the transaction has been announced by another peer or because the transaction + was found inside a mined block (in this case progress will go to 1.0 immediately). Any exceptions thrown + by this callback will be logged and ignored.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TransactionBroadcast.html b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionBroadcast.html new file mode 100644 index 000000000..8bc9b2fe5 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionBroadcast.html @@ -0,0 +1,374 @@ + + + + +TransactionBroadcast (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TransactionBroadcast

+
+
java.lang.Object +
org.bitcoinj.core.TransactionBroadcast
+
+
+
+
public class TransactionBroadcast +extends Object
+
Represents a single transaction broadcast that we are performing. A broadcast occurs after a new transaction is created + (typically by a Wallet) and needs to be sent to the network. A broadcast can succeed or fail. A success is + defined as seeing the transaction be announced by peers via inv messages, thus indicating their acceptance. A failure + is defined as not reaching acceptance within a timeout period, or getting an explicit reject message from a peer + indicating that the transaction was not acceptable.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      random

      +
      public static Random random
      +
      Used for shuffling the peers before broadcast: unit tests can replace this to make themselves deterministic.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      transaction

      +
      public Transaction transaction()
      +
      +
    • +
    • +
      +

      createMockBroadcast

      +
      public static TransactionBroadcast createMockBroadcast(Transaction tx, + CompletableFuture<Transaction> future)
      +
      +
    • +
    • +
      +

      future

      + + +
      +
      Returns:
      +
      future that completes when some number of remote peers has rebroadcast the transaction
      +
      +
      +
    • +
    • +
      +

      setMinConnections

      +
      public void setMinConnections(int minConnections)
      +
      +
    • +
    • +
      +

      setDropPeersAfterBroadcast

      +
      public void setDropPeersAfterBroadcast(boolean dropPeersAfterBroadcast)
      +
      +
    • +
    • +
      +

      broadcastOnly

      +
      public CompletableFuture<TransactionBroadcast> broadcastOnly()
      +
      Broadcast this transaction to the proper calculated number of peers. Returns a future that completes when the message + has been "sent" to a set of remote peers. The TransactionBroadcast itself is the returned type/value for the future. +

      + The complete broadcast process includes the following steps: +

        +
      1. Wait until enough Peers are connected.
      2. +
      3. Broadcast the transaction to a determined number of Peers
      4. +
      5. Wait for confirmation from a determined number of remote peers that they have received the broadcast
      6. +
      7. Mark awaitRelayed() ()} ("seen future") as complete
      8. +
      + The future returned from this method completes when Step 2 is completed. +

      + It should further be noted that "broadcast" in this class means that + MessageWriteTarget.writeBytes(byte[]) has completed successfully which means the message has + been sent to the "OS network buffer" -- see MessageWriteTarget.writeBytes(byte[]) or its implementation. +

      +
      +
      Returns:
      +
      A future that completes when the message has been sent (or at least buffered) to the correct number of remote Peers. The future + will complete exceptionally if any of the peer broadcasts fails.
      +
      +
      +
    • +
    • +
      +

      broadcastAndAwaitRelay

      +
      public CompletableFuture<TransactionBroadcast> broadcastAndAwaitRelay()
      +
      Broadcast the transaction and wait for confirmation that the transaction has been received by the appropriate + number of Peers before completing.
      +
      +
      Returns:
      +
      A future that completes when the message has been relayed by the appropriate number of remote peers
      +
      +
      +
    • +
    • +
      +

      awaitRelayed

      +
      public CompletableFuture<TransactionBroadcast> awaitRelayed()
      +
      Wait for confirmation the transaction has been relayed.
      +
      +
      Returns:
      +
      A future that completes when the message has been relayed by the appropriate number of remote peers
      +
      +
      +
    • +
    • +
      +

      awaitSent

      + +
      Wait for confirmation the transaction has been sent to a remote peer. (Or at least buffered to be sent to + a peer.)
      +
      +
      Returns:
      +
      A future that completes when the message has been relayed by the appropriate number of remote peers
      +
      +
      +
    • +
    • +
      +

      broadcast

      + +
      Deprecated. + +
      +
      If you migrate to broadcastAndAwaitRelay() and need a CompletableFuture that returns + Transaction you can use: +
      
      +  CompletableFuture<Transaction> seenFuture = broadcast
      +              .broadcastAndAwaitRelay()
      +              .thenApply(TransactionBroadcast::transaction);
      + 
      +
      +
    • +
    • +
      +

      setProgressCallback

      +
      public void setProgressCallback(TransactionBroadcast.ProgressCallback callback)
      +
      Sets the given callback for receiving progress values, which will run on the user thread. See + Threading for details. If the broadcast has already started then the callback will + be invoked immediately with the current progress.
      +
      +
    • +
    • +
      +

      setProgressCallback

      +
      public void setProgressCallback(TransactionBroadcast.ProgressCallback callback, + @Nullable + Executor executor)
      +
      Sets the given callback for receiving progress values, which will run on the given executor. If the executor + is null then the callback will run on a network thread and may be invoked multiple times in parallel. You + probably want to provide your UI thread or Threading.USER_THREAD for the second parameter. If the broadcast + has already started then the callback will be invoked immediately with the current progress.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TransactionBroadcaster.html b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionBroadcaster.html new file mode 100644 index 000000000..53f6cca17 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionBroadcaster.html @@ -0,0 +1,133 @@ + + + + +TransactionBroadcaster (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface TransactionBroadcaster

+
+
+
+
All Known Implementing Classes:
+
PeerGroup
+
+
+
public interface TransactionBroadcaster
+
A general interface which declares the ability to broadcast transactions. This is implemented + by PeerGroup.
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.ConfidenceType.html b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.ConfidenceType.html new file mode 100644 index 000000000..dfbb8ed87 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.ConfidenceType.html @@ -0,0 +1,285 @@ + + + + +TransactionConfidence.ConfidenceType (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class TransactionConfidence.ConfidenceType

+
+
java.lang.Object +
java.lang.Enum<TransactionConfidence.ConfidenceType> +
org.bitcoinj.core.TransactionConfidence.ConfidenceType
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<TransactionConfidence.ConfidenceType>, Constable
+
+
+
Enclosing class:
+
TransactionConfidence
+
+
+
public static enum TransactionConfidence.ConfidenceType +extends Enum<TransactionConfidence.ConfidenceType>
+
Describes the state of the transaction in general terms. Properties can be read to learn specifics.
+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    +

    Nested classes/interfaces inherited from class java.lang.Enum

    +Enum.EnumDesc<E extends Enum<E>>
    +
    +
  • + +
  • +
    +

    Enum Constant Summary

    +
    Enum Constants
    +
    +
    Enum Constant
    +
    Description
    + +
    +
    If BUILDING, then the transaction is included in the best chain and your confidence in it is increasing.
    +
    + +
    +
    If DEAD, then it means the transaction won't confirm unless there is another re-org, + because some other transaction is spending one of its inputs.
    +
    + +
    +
    If IN_CONFLICT, then it means there is another transaction (or several other transactions) spending one + (or several) of its inputs but nor this transaction nor the other/s transaction/s are included in the best chain.
    +
    + +
    +
    If PENDING, then the transaction is unconfirmed and should be included shortly, as long as it is being + announced and is considered valid by the network.
    +
    + +
    +
    If a transaction hasn't been broadcast yet, or there's no record of it, its confidence is UNKNOWN.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    int
    + +
     
    + + +
    +
    Returns the enum constant of this class with the specified name.
    +
    + + +
    +
    Returns an array containing the constants of this enum class, in +the order they are declared.
    +
    +
    +
    +
    + +
    +

    Methods inherited from class java.lang.Object

    +getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      BUILDING

      +
      public static final TransactionConfidence.ConfidenceType BUILDING
      +
      If BUILDING, then the transaction is included in the best chain and your confidence in it is increasing.
      +
      +
    • +
    • +
      +

      PENDING

      +
      public static final TransactionConfidence.ConfidenceType PENDING
      +
      If PENDING, then the transaction is unconfirmed and should be included shortly, as long as it is being + announced and is considered valid by the network. A pending transaction will be announced if the containing + wallet has been attached to a live PeerGroup using PeerGroup.addWallet(Wallet). + You can estimate how likely the transaction is to be included by connecting to a bunch of nodes then measuring + how many announce it, using TransactionConfidence.numBroadcastPeers(). + Or if you saw it from a trusted peer, you can assume it's valid and will get mined sooner or later as well.
      +
      +
    • +
    • +
      +

      DEAD

      +
      public static final TransactionConfidence.ConfidenceType DEAD
      +
      If DEAD, then it means the transaction won't confirm unless there is another re-org, + because some other transaction is spending one of its inputs. Such transactions should be alerted to the user + so they can take action, e.g., suspending shipment of goods if they are a merchant. + It can also mean that a coinbase transaction has been made dead from it being moved onto a side chain.
      +
      +
    • +
    • +
      +

      IN_CONFLICT

      +
      public static final TransactionConfidence.ConfidenceType IN_CONFLICT
      +
      If IN_CONFLICT, then it means there is another transaction (or several other transactions) spending one + (or several) of its inputs but nor this transaction nor the other/s transaction/s are included in the best chain. + The other/s transaction/s should be IN_CONFLICT too. + IN_CONFLICT can be thought as an intermediary state between a) PENDING and BUILDING or b) PENDING and DEAD. + Another common name for this situation is "double spend".
      +
      +
    • +
    • +
      +

      UNKNOWN

      +
      public static final TransactionConfidence.ConfidenceType UNKNOWN
      +
      If a transaction hasn't been broadcast yet, or there's no record of it, its confidence is UNKNOWN.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static TransactionConfidence.ConfidenceType[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static TransactionConfidence.ConfidenceType valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      getValue

      +
      public int getValue()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.Listener.ChangeReason.html b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.Listener.ChangeReason.html new file mode 100644 index 000000000..444337a11 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.Listener.ChangeReason.html @@ -0,0 +1,246 @@ + + + + +TransactionConfidence.Listener.ChangeReason (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class TransactionConfidence.Listener.ChangeReason

+
+
java.lang.Object +
java.lang.Enum<TransactionConfidence.Listener.ChangeReason> +
org.bitcoinj.core.TransactionConfidence.Listener.ChangeReason
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<TransactionConfidence.Listener.ChangeReason>, Constable
+
+
+
Enclosing interface:
+
TransactionConfidence.Listener
+
+
+
public static enum TransactionConfidence.Listener.ChangeReason +extends Enum<TransactionConfidence.Listener.ChangeReason>
+
An enum that describes why a transaction confidence listener is being invoked (i.e. the class of change).
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      TYPE

      + +
      Occurs when the type returned by TransactionConfidence.getConfidenceType() + has changed. For example, if a PENDING transaction changes to BUILDING or DEAD, then this reason will + be given. It's a high level summary.
      +
      +
    • +
    • +
      +

      DEPTH

      + +
      Occurs when a transaction that is in the best known block chain gets buried by another block. If you're + waiting for a certain number of confirmations, this is the reason to watch out for.
      +
      +
    • +
    • +
      +

      SEEN_PEERS

      +
      public static final TransactionConfidence.Listener.ChangeReason SEEN_PEERS
      +
      Occurs when a pending transaction (not in the chain) was announced by another connected peers. By + watching the number of peers that announced a transaction go up, you can see whether it's being + accepted by the network or not. If all your peers announce, it's a pretty good bet the transaction + is considered relayable and has thus reached the miners.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      + +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      + +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.Listener.html b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.Listener.html new file mode 100644 index 000000000..967c413bc --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.Listener.html @@ -0,0 +1,158 @@ + + + + +TransactionConfidence.Listener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface TransactionConfidence.Listener

+
+
+
+
All Known Implementing Classes:
+
NativeTransactionConfidenceListener
+
+
+
Enclosing class:
+
TransactionConfidence
+
+
+
public static interface TransactionConfidence.Listener
+

A confidence listener is informed when the level of TransactionConfidence is updated by something, like + for example a Wallet. You can add listeners to update your user interface or manage your order tracking + system when confidence levels pass a certain threshold. Note that confidence can go down as well as up. + For example, this can happen if somebody is doing a double-spend attack against you. Whilst it's unlikely, your + code should be able to handle that in order to be correct.

+ +

During listener execution, it's safe to remove the current listener but not others.

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.Source.html b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.Source.html new file mode 100644 index 000000000..9524af16f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.Source.html @@ -0,0 +1,241 @@ + + + + +TransactionConfidence.Source (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class TransactionConfidence.Source

+
+
java.lang.Object +
java.lang.Enum<TransactionConfidence.Source> +
org.bitcoinj.core.TransactionConfidence.Source
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<TransactionConfidence.Source>, Constable
+
+
+
Enclosing class:
+
TransactionConfidence
+
+
+
public static enum TransactionConfidence.Source +extends Enum<TransactionConfidence.Source>
+
Information about where the transaction was first seen (network, sent direct from peer, created by ourselves). + Useful for risk analyzing pending transactions. Probably not that useful after a tx is included in the chain, + unless re-org double spends start happening frequently.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static TransactionConfidence.Source[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static TransactionConfidence.Source valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.html b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.html new file mode 100644 index 000000000..b57a3e7ed --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionConfidence.html @@ -0,0 +1,650 @@ + + + + +TransactionConfidence (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TransactionConfidence

+
+
java.lang.Object +
org.bitcoinj.core.TransactionConfidence
+
+
+
+
public class TransactionConfidence +extends Object
+

A TransactionConfidence object tracks data you can use to make a confidence decision about a transaction. + It also contains some pre-canned rules for common scenarios: if you aren't really sure what level of confidence + you need, these should prove useful. You can get a confidence object using Transaction.getConfidence(). + They cannot be constructed directly.

+ +

Confidence in a transaction can come in multiple ways:

+ +
    +
  • Because you created it yourself and only you have the necessary keys.
  • +
  • Receiving it from a fully validating peer you know is trustworthy, for instance, because it's run by yourself.
  • +
  • Receiving it from a peer on the network you randomly chose. If your network connection is not being + intercepted, you have a pretty good chance of connecting to a node that is following the rules.
  • +
  • Receiving it from multiple peers on the network. If your network connection is not being intercepted, + hearing about a transaction from multiple peers indicates the network has accepted the transaction and + thus miners likely have too (miners have the final say in whether a transaction becomes valid or not).
  • +
  • Seeing the transaction appear in a block on the best chain. Your confidence increases as the transaction + becomes further buried under work. Work can be measured either in blocks (roughly, units of time), or + amount of work done.
  • +
+ +

Alternatively, you may know that the transaction is "dead", that is, one or more of its inputs have + been double spent and will never confirm unless there is another re-org.

+ +

TransactionConfidence is updated via the incrementDepthInBlocks() + method to ensure the block depth is up to date.

+ To make a copy that won't be changed, use duplicate().
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TransactionConfidence

      +
      public TransactionConfidence(Sha256Hash hash)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      addEventListener

      +
      public void addEventListener(Executor executor, + TransactionConfidence.Listener listener)
      +

      Adds an event listener that will be run when this confidence object is updated. The listener will be locked and + is likely to be invoked on a peer thread.

      + +

      Note that this is NOT called when every block arrives. Instead it is called when the transaction + transitions between confidence states, ie, from not being seen in the chain to being seen (not necessarily in + the best chain). If you want to know when the transaction gets buried under another block, consider using + a future from getDepthFuture(int).

      +
      +
    • +
    • +
      +

      addEventListener

      +
      public void addEventListener(TransactionConfidence.Listener listener)
      +

      Adds an event listener that will be run when this confidence object is updated. The listener will be locked and + is likely to be invoked on a peer thread.

      + +

      Note that this is NOT called when every block arrives. Instead it is called when the transaction + transitions between confidence states, ie, from not being seen in the chain to being seen (not necessarily in + the best chain). If you want to know when the transaction gets buried under another block, implement + NewBestBlockListener and related listeners, attach them to a + BlockChain and then use the getters on the confidence object to determine the new depth.

      +
      +
    • +
    • +
      +

      removeEventListener

      +
      public boolean removeEventListener(TransactionConfidence.Listener listener)
      +
      +
    • +
    • +
      +

      getAppearedAtChainHeight

      +
      public int getAppearedAtChainHeight()
      +
      Returns the chain height at which the transaction appeared if confidence type is BUILDING.
      +
      +
      Throws:
      +
      IllegalStateException - if the confidence type is not BUILDING.
      +
      +
      +
    • +
    • +
      +

      setAppearedAtChainHeight

      +
      public void setAppearedAtChainHeight(int appearedAtChainHeight)
      +
      The chain height at which the transaction appeared, if it has been seen in the best chain. Automatically sets + the current type to TransactionConfidence.ConfidenceType.BUILDING and depth to one.
      +
      +
    • +
    • +
      +

      getConfidenceType

      +
      public TransactionConfidence.ConfidenceType getConfidenceType()
      +
      Returns a general statement of the level of confidence you can have in this transaction.
      +
      +
    • +
    • +
      +

      setConfidenceType

      +
      public void setConfidenceType(TransactionConfidence.ConfidenceType confidenceType)
      +
      Called by other objects in the system, like a Wallet, when new information about the confidence of a + transaction becomes available.
      +
      +
    • +
    • +
      +

      markBroadcastBy

      +
      public boolean markBroadcastBy(PeerAddress address)
      +
      Called by a Peer when a transaction is pending and announced by a peer. The more peers announce the + transaction, the more peers have validated it (assuming your internet connection is not being intercepted). + If confidence is currently unknown, sets it to TransactionConfidence.ConfidenceType.PENDING. Does not run listeners.
      +
      +
      Parameters:
      +
      address - IP address of the peer, used as a proxy for identity.
      +
      Returns:
      +
      true if marked, false if this address was already seen
      +
      +
      +
    • +
    • +
      +

      numBroadcastPeers

      +
      public int numBroadcastPeers()
      +
      Returns how many peers have been passed to markBroadcastBy(org.bitcoinj.core.PeerAddress).
      +
      +
    • +
    • +
      +

      getBroadcastBy

      +
      public Set<PeerAddress> getBroadcastBy()
      +
      Returns a snapshot of PeerAddresses that announced the transaction.
      +
      +
    • +
    • +
      +

      wasBroadcastBy

      +
      public boolean wasBroadcastBy(PeerAddress address)
      +
      Returns true if the given address has been seen via markBroadcastBy()
      +
      +
    • +
    • +
      +

      getLastBroadcastTime

      +
      public Optional<Instant> getLastBroadcastTime()
      +
      Return the time the transaction was last announced to us, or empty if unknown.
      +
      +
      Returns:
      +
      time the transaction was last announced to us, or empty if unknown
      +
      +
      +
    • +
    • +
      +

      getLastBroadcastedAt

      +
      @Deprecated +@Nullable +public Date getLastBroadcastedAt()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      setLastBroadcastTime

      +
      public void setLastBroadcastTime(Instant lastBroadcastTime)
      +
      Set the time the transaction was last announced to us.
      +
      +
      Parameters:
      +
      lastBroadcastTime - time the transaction was last announced to us
      +
      +
      +
    • +
    • +
      +

      setLastBroadcastedAt

      +
      @Deprecated +public void setLastBroadcastedAt(Date lastBroadcastedAt)
      + +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      incrementDepthInBlocks

      +
      public int incrementDepthInBlocks()
      +
      Called by the wallet when the tx appears on the best chain and a new block is added to the top. Updates the + internal counter that tracks how deeply buried the block is.
      +
      +
      Returns:
      +
      the new depth
      +
      +
      +
    • +
    • +
      +

      getDepthInBlocks

      +
      public int getDepthInBlocks()
      +

      Depth in the chain is an approximation of how much time has elapsed since the transaction has been confirmed. + On average there is supposed to be a new block every 10 minutes, but the actual rate may vary. Bitcoin Core + considers a transaction impractical to reverse after 6 blocks, but as of EOY 2011 network + security is high enough that often only one block is considered enough even for high value transactions. For low + value transactions like songs, or other cheap items, no blocks at all may be necessary.

      + +

      If the transaction appears in the top block, the depth is one. If it's anything else (pending, dead, unknown) + the depth is zero.

      +
      +
    • +
    • +
      +

      setDepthInBlocks

      +
      public void setDepthInBlocks(int depth)
      +
      +
    • +
    • +
      +

      clearBroadcastBy

      +
      public void clearBroadcastBy()
      +
      Erases the set of broadcast/seen peers. This cannot be called whilst the confidence is PENDING. It is useful + for saving memory and wallet space once a tx is buried so deep it doesn't seem likely to go pending again.
      +
      +
    • +
    • +
      +

      getOverridingTxId

      +
      @Nullable +public Sha256Hash getOverridingTxId()
      +
      If this transaction has been overridden by a double spend (is dead), this call returns the overriding transaction ID. + Note that this call can return null if you have migrated an old wallet, as pre-Jan 2012 wallets did not + store this information.
      +
      +
      Returns:
      +
      the transaction id that double spent this one
      +
      Throws:
      +
      IllegalStateException - if confidence type is not DEAD.
      +
      +
      +
    • +
    • +
      +

      setOverridingTransaction

      +
      @Deprecated +public void setOverridingTransaction(Transaction overridingTransaction)
      +
      Deprecated. +
      Use getOverridingTxId() (and null is no-longer allowed)
      +
      +
      Called when the transaction becomes newly dead, that is, we learn that one of its inputs has already been spent + in such a way that the double-spending transaction takes precedence over this one. It will not become valid now + unless there is a re-org. Automatically sets the confidence type to DEAD. The overriding transaction may not + directly double spend this one, but could also have double spent a dependency of this tx.
      +
      +
    • +
    • +
      +

      setOverridingTxId

      +
      public void setOverridingTxId(@Nullable + Sha256Hash overridingTxId)
      +
      Called when the transaction becomes newly dead, that is, we learn that one of its inputs has already been spent + in such a way that the double-spending transaction takes precedence over this one. It will not become valid now + unless there is a re-org. Automatically sets the confidence type to DEAD. The overriding transaction may not + directly double spend this one, but could also have double spent a dependency of this tx.
      +
      +
    • +
    • +
      +

      duplicate

      +
      public TransactionConfidence duplicate()
      +
      Returns a copy of this object. Event listeners are not duplicated.
      +
      +
    • +
    • +
      +

      queueListeners

      +
      public void queueListeners(TransactionConfidence.Listener.ChangeReason reason)
      +
      Call this after adjusting the confidence, for cases where listeners should be notified. This has to be done + explicitly rather than being done automatically because sometimes complex changes to transaction states can + result in a series of confidence changes that are not really useful to see separately. By invoking listeners + explicitly, more precise control is available. Note that this will run the listeners on the user code thread.
      +
      +
    • +
    • +
      +

      getSource

      +
      public TransactionConfidence.Source getSource()
      +
      The source of a transaction tries to identify where it came from originally. For instance, did we download it + from the peer to peer network, or make it ourselves, or receive it via Bluetooth, or import it from another app, + and so on. This information is useful for CoinSelector implementations to risk analyze + transactions and decide when to spend them.
      +
      +
    • +
    • +
      +

      setSource

      +
      public void setSource(TransactionConfidence.Source source)
      +
      The source of a transaction tries to identify where it came from originally. For instance, did we download it + from the peer to peer network, or make it ourselves, or receive it via Bluetooth, or import it from another app, + and so on. This information is useful for CoinSelector implementations to risk analyze + transactions and decide when to spend them. +

      + Once set it's immutable.

      +
      +
    • +
    • +
      +

      maybeSetSourceToNetwork

      +
      public void maybeSetSourceToNetwork()
      +
      Called when we receive a transaction from the network. It's possible we may have already seen this locally + so we don't want to override a setting of Source.SELF, but if source was not set, we should set it. + This method should only be used internally to bitcoinj and will be removed in a future release.
      +
      +
    • +
    • +
      +

      getDepthFuture

      +
      public ListenableCompletableFuture<TransactionConfidence> getDepthFuture(int depth)
      +
      +
    • +
    • +
      +

      getTransactionHash

      +
      public Sha256Hash getTransactionHash()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TransactionInput.ConnectMode.html b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionInput.ConnectMode.html new file mode 100644 index 000000000..54cefdba2 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionInput.ConnectMode.html @@ -0,0 +1,221 @@ + + + + +TransactionInput.ConnectMode (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class TransactionInput.ConnectMode

+
+
java.lang.Object +
java.lang.Enum<TransactionInput.ConnectMode> +
org.bitcoinj.core.TransactionInput.ConnectMode
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<TransactionInput.ConnectMode>, Constable
+
+
+
Enclosing class:
+
TransactionInput
+
+
+
public static enum TransactionInput.ConnectMode +extends Enum<TransactionInput.ConnectMode>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static TransactionInput.ConnectMode[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static TransactionInput.ConnectMode valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TransactionInput.ConnectionResult.html b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionInput.ConnectionResult.html new file mode 100644 index 000000000..a0e889926 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionInput.ConnectionResult.html @@ -0,0 +1,229 @@ + + + + +TransactionInput.ConnectionResult (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class TransactionInput.ConnectionResult

+
+
java.lang.Object +
java.lang.Enum<TransactionInput.ConnectionResult> +
org.bitcoinj.core.TransactionInput.ConnectionResult
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<TransactionInput.ConnectionResult>, Constable
+
+
+
Enclosing class:
+
TransactionInput
+
+
+
public static enum TransactionInput.ConnectionResult +extends Enum<TransactionInput.ConnectionResult>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static TransactionInput.ConnectionResult[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static TransactionInput.ConnectionResult valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TransactionInput.html b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionInput.html new file mode 100644 index 000000000..15fe88bf6 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionInput.html @@ -0,0 +1,914 @@ + + + + +TransactionInput (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TransactionInput

+
+
java.lang.Object +
org.bitcoinj.core.TransactionInput
+
+
+
+
public class TransactionInput +extends Object
+

A transfer of coins from one address to another creates a transaction in which the outputs + can be claimed by the recipient in the input of another transaction. You can imagine a + transaction as being a module which is wired up to others, the inputs of one have to be wired + to the outputs of another. The exceptions are coinbase transactions, which create new coins.

+ +

Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      NO_SEQUENCE

      +
      public static final long NO_SEQUENCE
      +
      Magic sequence number that indicates there is no sequence number.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      SEQUENCE_LOCKTIME_DISABLE_FLAG

      +
      public static final long SEQUENCE_LOCKTIME_DISABLE_FLAG
      +
      BIP68: If this flag set, sequence is NOT interpreted as a relative lock-time.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      SEQUENCE_LOCKTIME_TYPE_FLAG

      +
      public static final long SEQUENCE_LOCKTIME_TYPE_FLAG
      +
      BIP68: If sequence encodes a relative lock-time and this flag is set, the relative lock-time has units of 512 + seconds, otherwise it specifies blocks with a granularity of 1.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      SEQUENCE_LOCKTIME_MASK

      +
      public static final long SEQUENCE_LOCKTIME_MASK
      +
      BIP68: If sequence encodes a relative lock-time, this mask is applied to extract that lock-time from the sequence + field.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TransactionInput

      +
      public TransactionInput(@Nullable + Transaction parentTransaction, + byte[] scriptBytes, + TransactionOutPoint outpoint)
      +
      +
    • +
    • +
      +

      TransactionInput

      +
      public TransactionInput(@Nullable + Transaction parentTransaction, + byte[] scriptBytes, + TransactionOutPoint outpoint, + @Nullable + Coin value)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      coinbaseInput

      +
      public static TransactionInput coinbaseInput(Transaction parentTransaction, + byte[] scriptBytes)
      +
      Creates an input that connects to nothing - used only in creation of coinbase transactions.
      +
      +
      Parameters:
      +
      parentTransaction - parent transaction
      +
      scriptBytes - arbitrary bytes in the script
      +
      +
      +
    • +
    • +
      +

      read

      +
      public static TransactionInput read(ByteBuffer payload, + Transaction parentTransaction) + throws BufferUnderflowException, +ProtocolException
      +
      Deserialize this transaction input from a given payload.
      +
      +
      Parameters:
      +
      payload - payload to deserialize from
      +
      parentTransaction - parent transaction of the input
      +
      Returns:
      +
      read message
      +
      Throws:
      +
      BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      getIndex

      +
      public int getIndex()
      +
      Gets the index of this input in the parent transaction, or throws if this input is freestanding. Iterates + over the parents list to discover this.
      +
      +
    • +
    • +
      +

      write

      +
      public ByteBuffer write(ByteBuffer buf) + throws BufferOverflowException
      +
      Write this transaction input into the given buffer.
      +
      +
      Parameters:
      +
      buf - buffer to write into
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the input doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      serialize

      +
      public byte[] serialize()
      +
      Allocates a byte array and writes this transaction input into it.
      +
      +
      Returns:
      +
      byte array containing the transaction input
      +
      +
      +
    • +
    • +
      +

      bitcoinSerialize

      +
      @Deprecated +public byte[] bitcoinSerialize()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      messageSize

      +
      public int messageSize()
      +
      Return the size of the serialized message. Note that if the message was deserialized from a payload, this + size can differ from the size of the original payload.
      +
      +
      Returns:
      +
      size of the serialized message in bytes
      +
      +
      +
    • +
    • +
      +

      getMessageSize

      +
      @Deprecated +public int getMessageSize()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      isCoinBase

      +
      public boolean isCoinBase()
      +
      Coinbase transactions have special inputs with hashes of zero. If this is such an input, returns true.
      +
      +
    • +
    • +
      +

      getScriptSig

      +
      public Script getScriptSig() + throws ScriptException
      +
      Returns the script that is fed to the referenced output (scriptPubKey) script in order to satisfy it: usually + contains signatures and maybe keys, but can contain arbitrary data if the output script accepts it.
      +
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      setScriptSig

      +
      public void setScriptSig(Script scriptSig)
      +
      Set the given program as the scriptSig that is supposed to satisfy the connected output script.
      +
      +
    • +
    • +
      +

      getSequenceNumber

      +
      public long getSequenceNumber()
      +
      Sequence numbers allow participants in a multi-party transaction signing protocol to create new versions of the + transaction independently of each other. Newer versions of a transaction can replace an existing version that's + in nodes memory pools if the existing version is time locked. See the Contracts page on the Bitcoin wiki for + examples of how you can use this feature to build contract protocols.
      +
      +
    • +
    • +
      +

      setSequenceNumber

      +
      public void setSequenceNumber(long sequence)
      +
      Sequence numbers allow participants in a multi-party transaction signing protocol to create new versions of the + transaction independently of each other. Newer versions of a transaction can replace an existing version that's + in nodes memory pools if the existing version is time locked. See the Contracts page on the Bitcoin wiki for + examples of how you can use this feature to build contract protocols.
      +
      +
    • +
    • +
      +

      getOutpoint

      +
      public TransactionOutPoint getOutpoint()
      +
      +
      Returns:
      +
      The previous output transaction reference, as an OutPoint structure. This contains the + data needed to connect to the output of the transaction we're gathering coins from.
      +
      +
      +
    • +
    • +
      +

      getScriptBytes

      +
      public byte[] getScriptBytes()
      +
      The "script bytes" might not actually be a script. In coinbase transactions where new coins are minted there + is no input transaction, so instead the scriptBytes contains some extra stuff (like a rollover nonce) that we + don't care about much. The bytes are turned into a Script object (cached below) on demand via a getter.
      +
      +
      Returns:
      +
      the scriptBytes
      +
      +
      +
    • +
    • +
      +

      clearScriptBytes

      +
      public void clearScriptBytes()
      +
      Clear input scripts, e.g. in preparation for signing.
      +
      +
    • +
    • +
      +

      getParentTransaction

      +
      public Transaction getParentTransaction()
      +
      +
      Returns:
      +
      The Transaction that owns this input.
      +
      +
      +
    • +
    • +
      +

      getValue

      +
      @Nullable +public Coin getValue()
      +
      +
      Returns:
      +
      Value of the output connected to this input, if known. Null if unknown.
      +
      +
      +
    • +
    • +
      +

      getWitness

      +
      public TransactionWitness getWitness()
      +
      Get the transaction witness of this input.
      +
      +
      Returns:
      +
      the witness of the input
      +
      +
      +
    • +
    • +
      +

      setWitness

      +
      public void setWitness(TransactionWitness witness)
      +
      Set the transaction witness of an input.
      +
      +
    • +
    • +
      +

      hasWitness

      +
      public boolean hasWitness()
      +
      Determine if the transaction has witnesses.
      +
      +
      Returns:
      +
      true if the transaction has witnesses
      +
      +
      +
    • +
    • +
      +

      getConnectedRedeemData

      +
      @Nullable +public RedeemData getConnectedRedeemData(KeyBag keyBag) + throws ScriptException
      +
      Alias for getOutpoint().getConnectedRedeemData(keyBag)
      +
      +
      Throws:
      +
      ScriptException
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      connect

      + +
      Connects this input to the relevant output of the referenced transaction if it's in the given map. + Connecting means updating the internal pointers and spent flags. If the mode is to ABORT_ON_CONFLICT then + the spent output won't be changed, but the outpoint.fromTx pointer will still be updated.
      +
      +
      Parameters:
      +
      transactions - Map of txhash to transaction.
      +
      mode - Whether to abort if there's a pre-existing connection or not.
      +
      Returns:
      +
      NO_SUCH_TX if the prevtx wasn't found, ALREADY_SPENT if there was a conflict, SUCCESS if not.
      +
      +
      +
    • +
    • +
      +

      connect

      + +
      Connects this input to the relevant output of the referenced transaction. + Connecting means updating the internal pointers and spent flags. If the mode is to ABORT_ON_CONFLICT then + the spent output won't be changed, but the outpoint.fromTx pointer will still be updated.
      +
      +
      Parameters:
      +
      transaction - The transaction to try.
      +
      mode - Whether to abort if there's a pre-existing connection or not.
      +
      Returns:
      +
      NO_SUCH_TX if transaction is not the prevtx, ALREADY_SPENT if there was a conflict, SUCCESS if not.
      +
      +
      +
    • +
    • +
      +

      connect

      +
      public void connect(TransactionOutput out)
      +
      Internal use only: connects this TransactionInput to the given output (updates pointers and spent flags)
      +
      +
    • +
    • +
      +

      disconnect

      +
      public boolean disconnect()
      +
      If this input is connected, check the output is connected back to this input and release it if so, making + it spendable once again.
      +
      +
      Returns:
      +
      true if the disconnection took place, false if it was not connected.
      +
      +
      +
    • +
    • +
      +

      hasSequence

      +
      public boolean hasSequence()
      +
      +
      Returns:
      +
      true if this transaction's sequence number is set (ie it may be a part of a time-locked transaction)
      +
      +
      +
    • +
    • +
      +

      isOptInFullRBF

      +
      public boolean isOptInFullRBF()
      +
      Returns whether this input will cause a transaction to opt into the + full replace-by-fee semantics.
      +
      +
    • +
    • +
      +

      hasRelativeLockTime

      +
      public boolean hasRelativeLockTime()
      +
      Returns whether this input, if it belongs to a version 2 (or higher) transaction, has + relative lock-time enabled.
      +
      +
    • +
    • +
      +

      verify

      +
      public void verify() + throws VerificationException
      +
      For a connected transaction, runs the script against the connected pubkey and verifies they are correct.
      +
      +
      Throws:
      +
      ScriptException - if the script did not verify.
      +
      VerificationException - If the outpoint doesn't match the given output.
      +
      +
      +
    • +
    • +
      +

      verify

      +
      public void verify(TransactionOutput output) + throws VerificationException
      +
      Verifies that this input can spend the given output. Note that this input must be a part of a transaction. + Also note that the consistency of the outpoint will be checked, even if this input has not been connected.
      +
      +
      Parameters:
      +
      output - the output that this input is supposed to spend.
      +
      Throws:
      +
      ScriptException - If the script doesn't verify.
      +
      VerificationException - If the outpoint doesn't match the given output.
      +
      +
      +
    • +
    • +
      +

      getConnectedOutput

      +
      @Nullable +public TransactionOutput getConnectedOutput()
      +
      Returns the connected output, assuming the input was connected with + connect(TransactionOutput) or variants at some point. If it wasn't connected, then + this method returns null.
      +
      +
    • +
    • +
      +

      getConnectedTransaction

      +
      @Nullable +public Transaction getConnectedTransaction()
      +
      Returns the connected transaction, assuming the input was connected with + connect(TransactionOutput) or variants at some point. If it wasn't connected, then + this method returns null.
      +
      +
    • +
    • +
      +

      isStandard

      +
      public DefaultRiskAnalysis.RuleViolation isStandard()
      +

      Returns either RuleViolation.NONE if the input is standard, or which rule makes it non-standard if so. + The "IsStandard" rules control whether the default Bitcoin Core client blocks relay of a tx / refuses to mine it, + however, non-standard transactions can still be included in blocks and will be accepted as valid if so.

      + +

      This method simply calls DefaultRiskAnalysis.isInputStandard(this).

      +
      +
    • +
    • +
      +

      setParent

      +
      protected final void setParent(@Nullable + Transaction parent)
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      Returns a human-readable debug string.
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TransactionOutPoint.html b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionOutPoint.html new file mode 100644 index 000000000..16bcb3850 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionOutPoint.html @@ -0,0 +1,540 @@ + + + + +TransactionOutPoint (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TransactionOutPoint

+
+
java.lang.Object +
org.bitcoinj.core.TransactionOutPoint
+
+
+
+
public class TransactionOutPoint +extends Object
+

This message is a reference or pointer to an output of a different transaction.

+ +

Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      BYTES

      +
      public static final int BYTES
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      UNCONNECTED

      +
      public static final TransactionOutPoint UNCONNECTED
      +
      Special outpoint that normally marks a coinbase input. It's also used as a test dummy.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TransactionOutPoint

      +
      public TransactionOutPoint(long index, + Transaction fromTx)
      +
      +
    • +
    • +
      +

      TransactionOutPoint

      +
      public TransactionOutPoint(long index, + Sha256Hash hash)
      +
      +
    • +
    • +
      +

      TransactionOutPoint

      +
      public TransactionOutPoint(TransactionOutput connectedOutput)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      read

      + +
      Deserialize this transaction outpoint from a given payload.
      +
      +
      Parameters:
      +
      payload - payload to deserialize from
      +
      Returns:
      +
      read transaction outpoint
      +
      Throws:
      +
      BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      write

      +
      public ByteBuffer write(ByteBuffer buf) + throws BufferOverflowException
      +
      Write this transaction outpoint into the given buffer.
      +
      +
      Parameters:
      +
      buf - buffer to write into
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the outpoint doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      serialize

      +
      public byte[] serialize()
      +
      Allocates a byte array and writes this transaction outpoint into it.
      +
      +
      Returns:
      +
      byte array containing the transaction outpoint
      +
      +
      +
    • +
    • +
      +

      bitcoinSerialize

      +
      @Deprecated +public byte[] bitcoinSerialize()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      getMessageSize

      +
      @Deprecated +public int getMessageSize()
      +
      Deprecated. +
      use BYTES
      +
      +
      +
    • +
    • +
      +

      getConnectedOutput

      +
      @Nullable +public TransactionOutput getConnectedOutput()
      +
      An outpoint is a part of a transaction input that points to the output of another transaction. If we have both + sides in memory, and they have been linked together, this returns a pointer to the connected output, or null + if there is no such connection.
      +
      +
    • +
    • +
      +

      getConnectedPubKeyScript

      +
      public byte[] getConnectedPubKeyScript()
      +
      Returns the pubkey script from the connected output.
      +
      +
      Throws:
      +
      NullPointerException - if there is no connected output.
      +
      +
      +
    • +
    • +
      +

      getConnectedKey

      +
      @Nullable +public ECKey getConnectedKey(KeyBag keyBag) + throws ScriptException
      +
      Returns the ECKey identified in the connected output, for either P2PKH, P2WPKH or P2PK scripts. + For P2SH scripts you can use getConnectedRedeemData(KeyBag) and then get the + key from RedeemData. + If the script form cannot be understood, throws ScriptException.
      +
      +
      Returns:
      +
      an ECKey or null if the connected key cannot be found in the wallet.
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      getConnectedRedeemData

      +
      @Nullable +public RedeemData getConnectedRedeemData(KeyBag keyBag) + throws ScriptException
      +
      Returns the RedeemData identified in the connected output, for either P2PKH, P2WPKH, P2PK + or P2SH scripts. + If the script forms cannot be understood, throws ScriptException.
      +
      +
      Returns:
      +
      a RedeemData or null if the connected data cannot be found in the wallet.
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      disconnectOutput

      +
      public TransactionOutPoint disconnectOutput()
      +
      Returns a copy of this outpoint, but with the connectedOutput removed.
      +
      +
      Returns:
      +
      outpoint with removed connectedOutput
      +
      +
      +
    • +
    • +
      +

      connectTransaction

      +
      public TransactionOutPoint connectTransaction(Transaction transaction)
      +
      Returns a copy of this outpoint, but with the provided transaction as fromTx.
      +
      +
      Parameters:
      +
      transaction - transaction to set as fromTx
      +
      Returns:
      +
      outpoint with fromTx set
      +
      +
      +
    • +
    • +
      +

      disconnectTransaction

      +
      public TransactionOutPoint disconnectTransaction()
      +
      Returns a copy of this outpoint, but with fromTx removed.
      +
      +
      Returns:
      +
      outpoint with removed fromTx
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      hash

      +
      public Sha256Hash hash()
      +
      Returns the hash of the transaction this outpoint references/spends/is connected to.
      +
      +
    • +
    • +
      +

      index

      +
      public long index()
      +
      +
      Returns:
      +
      the index of this outpoint
      +
      +
      +
    • +
    • +
      +

      getHash

      +
      @Deprecated +public Sha256Hash getHash()
      +
      Deprecated. +
      Use hash()
      +
      +
      +
    • +
    • +
      +

      getIndex

      +
      @Deprecated +public long getIndex()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TransactionOutput.html b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionOutput.html new file mode 100644 index 000000000..c4e136363 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionOutput.html @@ -0,0 +1,716 @@ + + + + +TransactionOutput (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TransactionOutput

+
+
java.lang.Object +
org.bitcoinj.core.TransactionOutput
+
+
+
+
public class TransactionOutput +extends Object
+

A TransactionOutput message contains a scriptPubKey that controls who is able to spend its value. It is a sub-part + of the Transaction message.

+ +

Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      parent

      +
      @Nullable +protected Transaction parent
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      read

      +
      public static TransactionOutput read(ByteBuffer payload, + Transaction parentTransaction) + throws BufferUnderflowException, +ProtocolException
      +
      Deserialize this transaction output from a given payload.
      +
      +
      Parameters:
      +
      payload - payload to deserialize from
      +
      parentTransaction - parent transaction of the output
      +
      Returns:
      +
      read message
      +
      Throws:
      +
      BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      getScriptPubKey

      +
      public Script getScriptPubKey() + throws ScriptException
      +
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      write

      +
      public ByteBuffer write(ByteBuffer buf) + throws BufferOverflowException
      +
      Write this transaction output into the given buffer.
      +
      +
      Parameters:
      +
      buf - buffer to write into
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the output doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      serialize

      +
      public byte[] serialize()
      +
      Allocates a byte array and writes this transaction output into it.
      +
      +
      Returns:
      +
      byte array containing the transaction output
      +
      +
      +
    • +
    • +
      +

      bitcoinSerialize

      +
      @Deprecated +public byte[] bitcoinSerialize()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      messageSize

      +
      public int messageSize()
      +
      Return the size of the serialized message. Note that if the message was deserialized from a payload, this + size can differ from the size of the original payload.
      +
      +
      Returns:
      +
      size of the serialized message in bytes
      +
      +
      +
    • +
    • +
      +

      getMessageSize

      +
      @Deprecated +public int getMessageSize()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      getValue

      +
      public Coin getValue()
      +
      Returns the value of this output. This is the amount of currency that the destination address + receives.
      +
      +
    • +
    • +
      +

      setValue

      +
      public void setValue(Coin value)
      +
      Sets the value of this output.
      +
      +
    • +
    • +
      +

      getIndex

      +
      public int getIndex()
      +
      Gets the index of this output in the parent transaction, or throws if this output is freestanding. Iterates + over the parents list to discover this.
      +
      +
    • +
    • +
      +

      isDust

      +
      public boolean isDust()
      +
      Will this transaction be considered dust and not be relayable and mined by default miners?
      +
      +
      Returns:
      +
      true if this output is dust
      +
      +
      +
    • +
    • +
      +

      getMinNonDustValue

      +
      public Coin getMinNonDustValue(Coin feePerKb)
      +

      Gets the minimum value for a txout of this size to be considered non-dust by Bitcoin Core + (and thus relayed). See: CTxOut::IsDust() in Bitcoin Core.

      + +

      You probably should use getMinNonDustValue() which uses + a safe fee-per-kb by default.

      +
      +
      Parameters:
      +
      feePerKb - The fee required per kilobyte. Note that this is the same as Bitcoin Core's -minrelaytxfee * 3
      +
      +
      +
    • +
    • +
      +

      getMinNonDustValue

      +
      public Coin getMinNonDustValue()
      +
      Returns the minimum value for this output to be considered "not dust", i.e. the transaction will be relayable + and mined by default miners.
      +
      +
    • +
    • +
      +

      markAsSpent

      +
      public void markAsSpent(TransactionInput input)
      +
      Sets this objects availableForSpending flag to false and the spentBy pointer to the given input. + If the input is null, it means this output was signed over to somebody else rather than one of our own keys.
      +
      +
      Throws:
      +
      IllegalStateException - if the transaction was already marked as spent.
      +
      +
      +
    • +
    • +
      +

      markAsUnspent

      +
      public void markAsUnspent()
      +
      Resets the spent pointer / availableForSpending flag to null.
      +
      +
    • +
    • +
      +

      isAvailableForSpending

      +
      public boolean isAvailableForSpending()
      +
      Returns whether markAsSpent(TransactionInput) has been called on this class. A + Wallet will mark a transaction output as spent once it sees a transaction input that is connected to it. + Note that this flag can be false when an output has in fact been spent according to the rest of the network if + the spending transaction wasn't downloaded yet, and it can be marked as spent when in reality the rest of the + network believes it to be unspent if the signature or script connecting to it was not actually valid.
      +
      +
    • +
    • +
      +

      getScriptBytes

      +
      public byte[] getScriptBytes()
      +
      The backing script bytes which can be turned into a Script object.
      +
      +
      Returns:
      +
      the scriptBytes
      +
      +
      +
    • +
    • +
      +

      isMineOrWatched

      +
      public boolean isMineOrWatched(TransactionBag transactionBag)
      +
      Returns true if this output is to a key in the wallet or to an address/script we are watching.
      +
      +
    • +
    • +
      +

      isWatched

      +
      public boolean isWatched(TransactionBag transactionBag)
      +
      Returns true if this output is to a key, or an address we have the keys for, in the wallet.
      +
      +
    • +
    • +
      +

      isMine

      +
      public boolean isMine(TransactionBag transactionBag)
      +
      Returns true if this output is to a key, or an address we have the keys for, in the wallet.
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      Returns a human-readable debug string.
      +
      +
      Overrides:
      +
      toString in class Object
      +
      Returns:
      +
      debug string
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString(@Nullable + Network network)
      +
      Returns a human-readable debug string.
      +
      +
      Parameters:
      +
      network - if provided, addresses (of that network) will be printed for standard scripts
      +
      Returns:
      +
      debug string
      +
      +
      +
    • +
    • +
      +

      getSpentBy

      +
      @Nullable +public TransactionInput getSpentBy()
      +
      Returns the connected input.
      +
      +
    • +
    • +
      +

      getParentTransaction

      +
      @Nullable +public Transaction getParentTransaction()
      +
      Returns the transaction that owns this output.
      +
      +
    • +
    • +
      +

      getParentTransactionHash

      +
      @Nullable +public Sha256Hash getParentTransactionHash()
      +
      Returns the transaction hash that owns this output.
      +
      +
    • +
    • +
      +

      getParentTransactionDepthInBlocks

      +
      public int getParentTransactionDepthInBlocks()
      +
      Returns the depth in blocks of the parent tx. + +

      If the transaction appears in the top block, the depth is one. If it's anything else (pending, dead, unknown) + then -1.

      +
      +
      Returns:
      +
      The tx depth or -1.
      +
      +
      +
    • +
    • +
      +

      getOutPointFor

      +
      public TransactionOutPoint getOutPointFor()
      +
      Returns a new TransactionOutPoint, which is essentially a structure pointing to this output. + Requires that this output is not detached.
      +
      +
    • +
    • +
      +

      duplicateDetached

      +
      public TransactionOutput duplicateDetached()
      +
      Returns a copy of the output detached from its containing transaction, if need be.
      +
      +
    • +
    • +
      +

      setParent

      +
      protected final void setParent(@Nullable + Transaction parent)
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TransactionOutputChanges.html b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionOutputChanges.html new file mode 100644 index 000000000..74e129b81 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionOutputChanges.html @@ -0,0 +1,171 @@ + + + + +TransactionOutputChanges (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TransactionOutputChanges

+
+
java.lang.Object +
org.bitcoinj.core.TransactionOutputChanges
+
+
+
+
public class TransactionOutputChanges +extends Object
+

TransactionOutputChanges represents a delta to the set of unspent outputs. It used as a return value for + AbstractBlockChain.connectTransactions(int, Block). It contains the full list of transaction outputs created + and spent in a block. It DOES contain outputs created that were spent later in the block, as those are needed for + BIP30 (no duplicate txid creation if the previous one was not fully spent prior to this block) verification.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      txOutsCreated

      +
      public final List<UTXO> txOutsCreated
      +
      +
    • +
    • +
      +

      txOutsSpent

      +
      public final List<UTXO> txOutsSpent
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TransactionOutputChanges

      +
      public TransactionOutputChanges(List<UTXO> txOutsCreated, + List<UTXO> txOutsSpent)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TransactionWitness.html b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionWitness.html new file mode 100644 index 000000000..aa976b9cd --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TransactionWitness.html @@ -0,0 +1,366 @@ + + + + +TransactionWitness (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TransactionWitness

+
+
java.lang.Object +
org.bitcoinj.core.TransactionWitness
+
+
+
+
public class TransactionWitness +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      redeemP2WPKH

      +
      public static TransactionWitness redeemP2WPKH(@Nullable + TransactionSignature signature, + ECKey pubKey)
      +
      Creates the stack pushes necessary to redeem a P2WPKH output. If given signature is null, an empty push will be + used as a placeholder.
      +
      +
    • +
    • +
      +

      redeemP2WSH

      +
      public static TransactionWitness redeemP2WSH(Script witnessScript, + TransactionSignature... signatures)
      +
      Creates the stack pushes necessary to redeem a P2WSH output.
      +
      +
    • +
    • +
      +

      of

      +
      public static TransactionWitness of(List<byte[]> pushes)
      +
      Construct a transaction witness from a given list of arbitrary pushes.
      +
      +
      Parameters:
      +
      pushes - list of pushes
      +
      Returns:
      +
      constructed transaction witness
      +
      +
      +
    • +
    • +
      +

      of

      +
      public static TransactionWitness of(byte[]... pushes)
      +
      Construct a transaction witness from a given list of arbitrary pushes.
      +
      +
      Parameters:
      +
      pushes - list of pushes
      +
      Returns:
      +
      constructed transaction witness
      +
      +
      +
    • +
    • +
      +

      read

      +
      public static TransactionWitness read(ByteBuffer payload) + throws BufferUnderflowException
      +
      Deserialize this transaction witness from a given payload.
      +
      +
      Parameters:
      +
      payload - payload to deserialize from
      +
      Returns:
      +
      read message
      +
      Throws:
      +
      BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
      +
      +
      +
    • +
    • +
      +

      getPush

      +
      public byte[] getPush(int i)
      +
      +
    • +
    • +
      +

      getPushCount

      +
      public int getPushCount()
      +
      +
    • +
    • +
      +

      write

      +
      public ByteBuffer write(ByteBuffer buf) + throws BufferOverflowException
      +
      Write this transaction witness into the given buffer.
      +
      +
      Parameters:
      +
      buf - buffer to write into
      +
      Returns:
      +
      the buffer
      +
      Throws:
      +
      BufferOverflowException - if the serialized data doesn't fit the remaining buffer
      +
      +
      +
    • +
    • +
      +

      serialize

      +
      public byte[] serialize()
      +
      Allocates a byte array and writes this transaction witness into it.
      +
      +
      Returns:
      +
      byte array containing the transaction witness
      +
      +
      +
    • +
    • +
      +

      messageSize

      +
      public int messageSize()
      +
      Return the size of the serialized message. Note that if the message was deserialized from a payload, this + size can differ from the size of the original payload.
      +
      +
      Returns:
      +
      size of the serialized message in bytes
      +
      +
      +
    • +
    • +
      +

      getMessageSize

      +
      @Deprecated +public int getMessageSize()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/TxConfidenceTable.html b/javadoc/0.17-rc1/org/bitcoinj/core/TxConfidenceTable.html new file mode 100644 index 000000000..5f3e3a159 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/TxConfidenceTable.html @@ -0,0 +1,306 @@ + + + + +TxConfidenceTable (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TxConfidenceTable

+
+
java.lang.Object +
org.bitcoinj.core.TxConfidenceTable
+
+
+
+
public class TxConfidenceTable +extends Object
+

Tracks transactions that are being announced across the network. Typically one is created for you by a + PeerGroup and then given to each Peer to update. The current purpose is to let Peers update the confidence + (number of peers broadcasting). It helps address an attack scenario in which a malicious remote peer (or several) + feeds you invalid transactions, e.g., ones that spend coins which don't exist. If you don't see most of the peers + announce the transaction within a reasonable time, it may be that the TX is not valid. Alternatively, an attacker + may control your entire internet connection: in this scenario counting broadcasting peers does not help you.

+ +

It is not at this time directly equivalent to the Bitcoin Core memory pool, which tracks + all transactions not currently included in the best chain - it's simply a cache.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      lock

      +
      protected final ReentrantLock lock
      +
      +
    • +
    • +
      +

      MAX_SIZE

      +
      public static final int MAX_SIZE
      +
      The max size of a table created with the no-args constructor.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TxConfidenceTable

      +
      public TxConfidenceTable(int size)
      +
      Creates a table that will track at most the given number of transactions (allowing you to bound memory + usage).
      +
      +
      Parameters:
      +
      size - Max number of transactions to track. The table will fill up to this size then stop growing.
      +
      +
      +
    • +
    • +
      +

      TxConfidenceTable

      +
      public TxConfidenceTable()
      +
      Creates a table that will track at most MAX_SIZE entries. You should normally use + this constructor.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getConfidence

      +
      public TransactionConfidence getConfidence(Transaction tx)
      +
      Get the confidence object for a transaction
      +
      +
      Parameters:
      +
      tx - the transaction
      +
      Returns:
      +
      the corresponding confidence object
      +
      +
      +
    • +
    • +
      +

      numBroadcastPeers

      +
      public int numBroadcastPeers(Sha256Hash txHash)
      +
      Returns the number of peers that have seen the given hash recently.
      +
      +
    • +
    • +
      +

      seen

      +
      public TransactionConfidence seen(Sha256Hash hash, + PeerAddress byPeer)
      +
      Called by peers when they see a transaction advertised in an "inv" message. It passes the data on to the relevant + TransactionConfidence object, creating it if needed.
      +
      +
      Returns:
      +
      the number of peers that have now announced this hash (including the caller)
      +
      +
      +
    • +
    • +
      +

      getOrCreate

      +
      public TransactionConfidence getOrCreate(Sha256Hash hash)
      +
      Returns the TransactionConfidence for the given hash if we have downloaded it, or null if that tx hash + is unknown to the system at this time.
      +
      +
    • +
    • +
      +

      get

      +
      @Nullable +public TransactionConfidence get(Sha256Hash hash)
      +
      Returns the TransactionConfidence for the given hash if we have downloaded it, or null if that tx hash + is unknown to the system at this time.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/UTXO.html b/javadoc/0.17-rc1/org/bitcoinj/core/UTXO.html new file mode 100644 index 000000000..a00da37bb --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/UTXO.html @@ -0,0 +1,328 @@ + + + + +UTXO (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class UTXO

+
+
java.lang.Object +
org.bitcoinj.core.UTXO
+
+
+
+
public class UTXO +extends Object
+
A UTXO message contains the information necessary to check a spending transaction. + It avoids having to store the entire parentTransaction just to get the hash and index. + Useful when working with freestanding outputs.
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    UTXO(Sha256Hash hash, + long index, + Coin value, + int height, + boolean coinbase, + Script script)
    +
    +
    Creates a stored transaction output.
    +
    +
    UTXO(Sha256Hash hash, + long index, + Coin value, + int height, + boolean coinbase, + Script script, + String address)
    +
    +
    Creates a stored transaction output.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    boolean
    + +
     
    + + +
    +
    The address of this output, can be the empty string if none was provided at construction time or was deserialized
    +
    + + +
    +
    The hash of the transaction which holds this output.
    +
    +
    int
    + +
    +
    Gets the height of the block that created this output.
    +
    +
    long
    + +
    +
    The index of this output in the transaction which holds it.
    +
    + + +
    +
    The Script object which you can use to get address, script bytes or script type.
    +
    + + +
    +
    The value which this Transaction output holds.
    +
    +
    int
    + +
     
    +
    boolean
    + +
    +
    Gets the flag of whether this was created by a coinbase tx.
    +
    + + +
     
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      UTXO

      +
      public UTXO(Sha256Hash hash, + long index, + Coin value, + int height, + boolean coinbase, + Script script)
      +
      Creates a stored transaction output.
      +
      +
      Parameters:
      +
      hash - The hash of the containing transaction.
      +
      index - The outpoint.
      +
      value - The value available.
      +
      height - The height this output was created in.
      +
      coinbase - The coinbase flag.
      +
      +
      +
    • +
    • +
      +

      UTXO

      +
      public UTXO(Sha256Hash hash, + long index, + Coin value, + int height, + boolean coinbase, + Script script, + String address)
      +
      Creates a stored transaction output.
      +
      +
      Parameters:
      +
      hash - The hash of the containing transaction.
      +
      index - The outpoint.
      +
      value - The value available.
      +
      height - The height this output was created in.
      +
      coinbase - The coinbase flag.
      +
      address - The address.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getValue

      +
      public Coin getValue()
      +
      The value which this Transaction output holds.
      +
      +
    • +
    • +
      +

      getScript

      +
      public Script getScript()
      +
      The Script object which you can use to get address, script bytes or script type.
      +
      +
    • +
    • +
      +

      getHash

      +
      public Sha256Hash getHash()
      +
      The hash of the transaction which holds this output.
      +
      +
    • +
    • +
      +

      getIndex

      +
      public long getIndex()
      +
      The index of this output in the transaction which holds it.
      +
      +
    • +
    • +
      +

      getHeight

      +
      public int getHeight()
      +
      Gets the height of the block that created this output.
      +
      +
    • +
    • +
      +

      isCoinbase

      +
      public boolean isCoinbase()
      +
      Gets the flag of whether this was created by a coinbase tx.
      +
      +
    • +
    • +
      +

      getAddress

      +
      public String getAddress()
      +
      The address of this output, can be the empty string if none was provided at construction time or was deserialized
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/UTXOProvider.html b/javadoc/0.17-rc1/org/bitcoinj/core/UTXOProvider.html new file mode 100644 index 000000000..51e39ba40 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/UTXOProvider.html @@ -0,0 +1,183 @@ + + + + +UTXOProvider (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface UTXOProvider

+
+
+
+
All Known Subinterfaces:
+
FullPrunedBlockStore
+
+
+
All Known Implementing Classes:
+
MemoryFullPrunedBlockStore
+
+
+
public interface UTXOProvider
+
A UTXOProvider encapsulates functionality for returning unspent transaction outputs, + for use by the wallet or other code that crafts spends. + +

A FullPrunedBlockStore is an internal implementation within bitcoinj.

+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getOpenTransactionOutputs

      +
      List<UTXO> getOpenTransactionOutputs(List<ECKey> keys) + throws UTXOProviderException
      +
      Get the list of UTXO's for given keys.
      +
      +
      Parameters:
      +
      keys - List of keys.
      +
      Returns:
      +
      The list of transaction outputs.
      +
      Throws:
      +
      UTXOProviderException - If there is an error.
      +
      +
      +
    • +
    • +
      +

      getChainHeadHeight

      +
      int getChainHeadHeight() + throws UTXOProviderException
      +
      Get the height of the chain head.
      +
      +
      Returns:
      +
      The chain head height.
      +
      Throws:
      +
      UTXOProviderException - If there is an error.
      +
      +
      +
    • +
    • +
      +

      network

      +
      Network network()
      +
      The Network of this provider.
      +
      +
      Returns:
      +
      the network
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/UTXOProviderException.html b/javadoc/0.17-rc1/org/bitcoinj/core/UTXOProviderException.html new file mode 100644 index 000000000..8e46f0da5 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/UTXOProviderException.html @@ -0,0 +1,172 @@ + + + + +UTXOProviderException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class UTXOProviderException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.core.UTXOProviderException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class UTXOProviderException +extends Exception
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      UTXOProviderException

      +
      public UTXOProviderException()
      +
      +
    • +
    • +
      +

      UTXOProviderException

      +
      public UTXOProviderException(String message)
      +
      +
    • +
    • +
      +

      UTXOProviderException

      +
      public UTXOProviderException(String message, + Throwable cause)
      +
      +
    • +
    • +
      +

      UTXOProviderException

      +
      public UTXOProviderException(Throwable cause)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/UnknownMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/UnknownMessage.html new file mode 100644 index 000000000..0f7af49c1 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/UnknownMessage.html @@ -0,0 +1,194 @@ + + + + +UnknownMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class UnknownMessage

+
+ +
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class UnknownMessage +extends EmptyMessage
+

Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/Utils.html b/javadoc/0.17-rc1/org/bitcoinj/core/Utils.html new file mode 100644 index 000000000..ee696e199 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/Utils.html @@ -0,0 +1,238 @@ + + + + +Utils (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Utils

+
+
java.lang.Object +
org.bitcoinj.core.Utils
+
+
+
+
public class Utils +extends Object
+
A collection of various utility methods that are helpful for working with the Bitcoin protocol. + To enable debug logging from the library, run with -Dbitcoinj.logging=true on your command line.
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static final int
    + +
    +
    Max initial size of variable length arrays and ArrayLists that could be attacked.
    +
    +
    static final com.google.common.base.Joiner
    + +
    +
    Deprecated. +
    Use @link java.util.StringJoiner} or a direct Guava dependency
    +
    +
    +
    static final com.google.common.base.Splitter
    + +
    +
    Deprecated. +
    Use String.split(String) or a direct Guava dependency
    +
    +
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static String
    +
    toString(List<byte[]> stack)
    +
     
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      SPACE_JOINER

      +
      @Deprecated +public static final com.google.common.base.Joiner SPACE_JOINER
      +
      Deprecated. +
      Use @link java.util.StringJoiner} or a direct Guava dependency
      +
      +
      Joiner for concatenating words with a space inbetween.
      +
      +
    • +
    • +
      +

      WHITESPACE_SPLITTER

      +
      @Deprecated +public static final com.google.common.base.Splitter WHITESPACE_SPLITTER
      +
      Deprecated. +
      Use String.split(String) or a direct Guava dependency
      +
      +
      Splitter for splitting words on whitespaces.
      +
      +
    • +
    • +
      +

      MAX_INITIAL_ARRAY_LENGTH

      +
      public static final int MAX_INITIAL_ARRAY_LENGTH
      +
      Max initial size of variable length arrays and ArrayLists that could be attacked. + Avoids this attack: Attacker sends a msg indicating it will contain a huge number (e.g. 2 billion) elements (e.g. transaction inputs) and + forces bitcoinj to try to allocate a huge piece of the memory resulting in OutOfMemoryError.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Utils

      +
      public Utils()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toString

      +
      public static String toString(List<byte[]> stack)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.BlockVersionOutOfDate.html b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.BlockVersionOutOfDate.html new file mode 100644 index 000000000..7f11016b2 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.BlockVersionOutOfDate.html @@ -0,0 +1,163 @@ + + + + +VerificationException.BlockVersionOutOfDate (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class VerificationException.BlockVersionOutOfDate

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.core.VerificationException +
org.bitcoinj.core.VerificationException.BlockVersionOutOfDate
+
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
VerificationException
+
+
+
public static class VerificationException.BlockVersionOutOfDate +extends VerificationException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BlockVersionOutOfDate

      +
      public BlockVersionOutOfDate(long version)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.CoinbaseHeightMismatch.html b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.CoinbaseHeightMismatch.html new file mode 100644 index 000000000..a699e317f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.CoinbaseHeightMismatch.html @@ -0,0 +1,163 @@ + + + + +VerificationException.CoinbaseHeightMismatch (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class VerificationException.CoinbaseHeightMismatch

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.core.VerificationException +
org.bitcoinj.core.VerificationException.CoinbaseHeightMismatch
+
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
VerificationException
+
+
+
public static class VerificationException.CoinbaseHeightMismatch +extends VerificationException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CoinbaseHeightMismatch

      +
      public CoinbaseHeightMismatch(String message)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.CoinbaseScriptSizeOutOfRange.html b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.CoinbaseScriptSizeOutOfRange.html new file mode 100644 index 000000000..e6cc9af93 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.CoinbaseScriptSizeOutOfRange.html @@ -0,0 +1,163 @@ + + + + +VerificationException.CoinbaseScriptSizeOutOfRange (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class VerificationException.CoinbaseScriptSizeOutOfRange

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.core.VerificationException +
org.bitcoinj.core.VerificationException.CoinbaseScriptSizeOutOfRange
+
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
VerificationException
+
+
+
public static class VerificationException.CoinbaseScriptSizeOutOfRange +extends VerificationException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CoinbaseScriptSizeOutOfRange

      +
      public CoinbaseScriptSizeOutOfRange()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.DuplicatedOutPoint.html b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.DuplicatedOutPoint.html new file mode 100644 index 000000000..a18be1697 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.DuplicatedOutPoint.html @@ -0,0 +1,163 @@ + + + + +VerificationException.DuplicatedOutPoint (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class VerificationException.DuplicatedOutPoint

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
VerificationException
+
+
+
public static class VerificationException.DuplicatedOutPoint +extends VerificationException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DuplicatedOutPoint

      +
      public DuplicatedOutPoint()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.EmptyInputsOrOutputs.html b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.EmptyInputsOrOutputs.html new file mode 100644 index 000000000..7016f5a20 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.EmptyInputsOrOutputs.html @@ -0,0 +1,163 @@ + + + + +VerificationException.EmptyInputsOrOutputs (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class VerificationException.EmptyInputsOrOutputs

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.core.VerificationException +
org.bitcoinj.core.VerificationException.EmptyInputsOrOutputs
+
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
VerificationException
+
+
+
public static class VerificationException.EmptyInputsOrOutputs +extends VerificationException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      EmptyInputsOrOutputs

      +
      public EmptyInputsOrOutputs()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.ExcessiveValue.html b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.ExcessiveValue.html new file mode 100644 index 000000000..89f1eda4c --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.ExcessiveValue.html @@ -0,0 +1,163 @@ + + + + +VerificationException.ExcessiveValue (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class VerificationException.ExcessiveValue

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
VerificationException
+
+
+
public static class VerificationException.ExcessiveValue +extends VerificationException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ExcessiveValue

      +
      public ExcessiveValue()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.LargerThanMaxBlockSize.html b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.LargerThanMaxBlockSize.html new file mode 100644 index 000000000..afc4986d0 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.LargerThanMaxBlockSize.html @@ -0,0 +1,163 @@ + + + + +VerificationException.LargerThanMaxBlockSize (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class VerificationException.LargerThanMaxBlockSize

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.core.VerificationException +
org.bitcoinj.core.VerificationException.LargerThanMaxBlockSize
+
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
VerificationException
+
+
+
public static class VerificationException.LargerThanMaxBlockSize +extends VerificationException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      LargerThanMaxBlockSize

      +
      public LargerThanMaxBlockSize()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.NegativeValueOutput.html b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.NegativeValueOutput.html new file mode 100644 index 000000000..3120558c1 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.NegativeValueOutput.html @@ -0,0 +1,163 @@ + + + + +VerificationException.NegativeValueOutput (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class VerificationException.NegativeValueOutput

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
VerificationException
+
+
+
public static class VerificationException.NegativeValueOutput +extends VerificationException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NegativeValueOutput

      +
      public NegativeValueOutput()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.NoncanonicalSignature.html b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.NoncanonicalSignature.html new file mode 100644 index 000000000..781b5f076 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.NoncanonicalSignature.html @@ -0,0 +1,163 @@ + + + + +VerificationException.NoncanonicalSignature (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class VerificationException.NoncanonicalSignature

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.core.VerificationException +
org.bitcoinj.core.VerificationException.NoncanonicalSignature
+
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
VerificationException
+
+
+
public static class VerificationException.NoncanonicalSignature +extends VerificationException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NoncanonicalSignature

      +
      public NoncanonicalSignature()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.UnexpectedCoinbaseInput.html b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.UnexpectedCoinbaseInput.html new file mode 100644 index 000000000..e0866ab76 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.UnexpectedCoinbaseInput.html @@ -0,0 +1,163 @@ + + + + +VerificationException.UnexpectedCoinbaseInput (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class VerificationException.UnexpectedCoinbaseInput

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.core.VerificationException +
org.bitcoinj.core.VerificationException.UnexpectedCoinbaseInput
+
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
VerificationException
+
+
+
public static class VerificationException.UnexpectedCoinbaseInput +extends VerificationException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      UnexpectedCoinbaseInput

      +
      public UnexpectedCoinbaseInput()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.html b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.html new file mode 100644 index 000000000..f180377dc --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/VerificationException.html @@ -0,0 +1,220 @@ + + + + +VerificationException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class VerificationException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.core.VerificationException
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
ProtocolException, ScriptException, VerificationException.BlockVersionOutOfDate, VerificationException.CoinbaseHeightMismatch, VerificationException.CoinbaseScriptSizeOutOfRange, VerificationException.DuplicatedOutPoint, VerificationException.EmptyInputsOrOutputs, VerificationException.ExcessiveValue, VerificationException.LargerThanMaxBlockSize, VerificationException.NegativeValueOutput, VerificationException.NoncanonicalSignature, VerificationException.UnexpectedCoinbaseInput
+
+
+
public class VerificationException +extends RuntimeException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      VerificationException

      +
      public VerificationException()
      +
      +
    • +
    • +
      +

      VerificationException

      +
      public VerificationException(String msg)
      +
      +
    • +
    • +
      +

      VerificationException

      +
      public VerificationException(Exception e)
      +
      +
    • +
    • +
      +

      VerificationException

      +
      public VerificationException(String msg, + Throwable t)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/VersionAck.html b/javadoc/0.17-rc1/org/bitcoinj/core/VersionAck.html new file mode 100644 index 000000000..85ad3030e --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/VersionAck.html @@ -0,0 +1,157 @@ + + + + +VersionAck (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class VersionAck

+
+ +
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class VersionAck +extends EmptyMessage
+

The verack message, sent by a client accepting the version message they + received from their peer.

+ +

Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      VersionAck

      +
      public VersionAck()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/VersionMessage.html b/javadoc/0.17-rc1/org/bitcoinj/core/VersionMessage.html new file mode 100644 index 000000000..c7c888ced --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/VersionMessage.html @@ -0,0 +1,660 @@ + + + + +VersionMessage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class VersionMessage

+
+
java.lang.Object +
org.bitcoinj.core.BaseMessage +
org.bitcoinj.core.VersionMessage
+
+
+
+
+
All Implemented Interfaces:
+
Message
+
+
+
public class VersionMessage +extends BaseMessage
+

A VersionMessage holds information exchanged during connection setup with another peer. Most of the fields are not + particularly interesting. The subVer field, since BIP 14, acts as a User-Agent string would. You can and should + append to or change the subVer for your own software so other implementations can identify it, and you can look at + the subVer field received from other nodes to see what they are running.

+ +

After creating yourself a VersionMessage, you can pass it to PeerGroup.setVersionMessage(VersionMessage) + to ensure it will be used for each new connection.

+ +

Instances of this class are not safe for use by multiple threads.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      BITCOINJ_VERSION

      +
      public static final String BITCOINJ_VERSION
      +
      The version of this library release, as a string.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      LIBRARY_SUBVER

      +
      public static final String LIBRARY_SUBVER
      +
      The value that is prepended to the subVer field of this application.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      NODE_NETWORK

      +
      @Deprecated +public static final int NODE_NETWORK
      +
      Deprecated. + +
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      NODE_BLOOM

      +
      @Deprecated +public static final int NODE_BLOOM
      +
      Deprecated. + +
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      NODE_WITNESS

      +
      @Deprecated +public static final int NODE_WITNESS
      +
      Deprecated. + +
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      NODE_NETWORK_LIMITED

      +
      @Deprecated +public static final int NODE_NETWORK_LIMITED
      + +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      NODE_BITCOIN_CASH

      +
      @Deprecated +public static final int NODE_BITCOIN_CASH
      +
      Deprecated. + +
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      clientVersion

      +
      public int clientVersion
      +
      The version number of the protocol spoken.
      +
      +
    • +
    • +
      +

      localServices

      +
      public Services localServices
      +
      Flags defining what optional services are supported.
      +
      +
    • +
    • +
      +

      time

      +
      public Instant time
      +
      What the other side believes the current time to be.
      +
      +
    • +
    • +
      +

      receivingServices

      +
      public Services receivingServices
      +
      The services supported by the receiving node as perceived by the transmitting node.
      +
      +
    • +
    • +
      +

      receivingAddr

      +
      public InetSocketAddress receivingAddr
      +
      The network address of the receiving node as perceived by the transmitting node
      +
      +
    • +
    • +
      +

      subVer

      +
      public String subVer
      +
      User-Agent as defined in BIP 14. + Bitcoin Core sets it to something like "/Satoshi:0.9.1/".
      +
      +
    • +
    • +
      +

      bestHeight

      +
      public long bestHeight
      +
      How many blocks are in the chain, according to the other side.
      +
      +
    • +
    • +
      +

      relayTxesBeforeFilter

      +
      public boolean relayTxesBeforeFilter
      +
      Whether or not to relay tx invs before a filter is received. + See BIP 37.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      VersionMessage

      +
      public VersionMessage(NetworkParameters params, + int bestHeight)
      +
      Construct own version message from given NetworkParameters and our best height of the chain.
      +
      +
      Parameters:
      +
      params - network parameters to construct own version message from
      +
      bestHeight - our best height to announce
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      read

      +
      public static VersionMessage read(ByteBuffer payload) + throws BufferUnderflowException, +ProtocolException
      +
      Deserialize this message from a given payload.
      +
      +
      Parameters:
      +
      payload - payload to deserialize from
      +
      Returns:
      +
      read message
      +
      Throws:
      +
      BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
      +
      ProtocolException
      +
      +
      +
    • +
    • +
      +

      clientVersion

      +
      public int clientVersion()
      +
      Gets the client version.
      +
      +
      Returns:
      +
      client version
      +
      +
      +
    • +
    • +
      +

      services

      +
      public Services services()
      +
      Get the service bitfield that represents the node services being provided.
      +
      +
      Returns:
      +
      service bitfield
      +
      +
      +
    • +
    • +
      +

      bitcoinSerializeToStream

      +
      public void bitcoinSerializeToStream(OutputStream buf) + throws IOException
      +
      Description copied from class: BaseMessage
      +
      Serializes this message to the provided stream. If you just want the raw bytes use BaseMessage.serialize().
      +
      +
      Specified by:
      +
      bitcoinSerializeToStream in class BaseMessage
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      duplicate

      +
      public VersionMessage duplicate()
      +
      +
    • +
    • +
      +

      appendToSubVer

      +
      public void appendToSubVer(String name, + String version, + @Nullable + String comments)
      +

      Appends the given user-agent information to the subVer field. The subVer is composed of a series of + name:version pairs separated by slashes in the form of a path. For example a typical subVer field for bitcoinj + users might look like "/bitcoinj:0.13/MultiBit:1.2/" where libraries come further to the left.

      + +

      There can be as many components as you feel a need for, and the version string can be anything, but it is + recommended to use A.B.C where A = major, B = minor and C = revision for software releases, and dates for + auto-generated source repository snapshots. A valid subVer begins and ends with a slash, therefore name + and version are not allowed to contain such characters.

      + +

      Anything put in the "comments" field will appear in brackets and may be used for platform info, or anything + else. For example, calling appendToSubVer("MultiBit", "1.0", "Windows") will result in a subVer being + set of "/bitcoinj:1.0/MultiBit:1.0(Windows)/". Therefore the / ( and ) characters are reserved in all these + components. If you don't want to add a comment (recommended), pass null.

      + +

      See BIP 14 for more information.

      +
      +
      Parameters:
      +
      comments - Optional (can be null) platform or other node specific information.
      +
      Throws:
      +
      IllegalArgumentException - if name, version or comments contains invalid characters.
      +
      +
      +
    • +
    • +
      +

      isPingPongSupported

      +
      @Deprecated +public boolean isPingPongSupported()
      +
      Deprecated. +
      just assume Ping and Pong are supported
      +
      +
      +
    • +
    • +
      +

      toStringServices

      +
      @Deprecated +public static String toStringServices(long services)
      +
      Deprecated. + +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/internal/TorUtils.html b/javadoc/0.17-rc1/org/bitcoinj/core/internal/TorUtils.html new file mode 100644 index 000000000..3b535c72d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/internal/TorUtils.html @@ -0,0 +1,210 @@ + + + + +TorUtils (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TorUtils

+
+
java.lang.Object +
org.bitcoinj.core.internal.TorUtils
+
+
+
+
public class TorUtils +extends Object
+
Utilities for encoding and decoding Onion addresses.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TorUtils

      +
      public TorUtils()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      encodeOnionUrlV2

      +
      public static String encodeOnionUrlV2(byte[] onionAddrBytes)
      +
      Encode an Onion URL from a Tor V2 address. +

      + See address-spec.txt

      +
      +
      Parameters:
      +
      onionAddrBytes - Tor V2 address to encode
      +
      Returns:
      +
      encoded Onion URL
      +
      +
      +
    • +
    • +
      +

      encodeOnionUrlV3

      +
      public static String encodeOnionUrlV3(byte[] onionAddrBytes)
      +
      Encode an Onion URL from a Tor V3 address (pubkey). +

      + See address-spec.txt

      +
      +
      Parameters:
      +
      onionAddrBytes - Tor V3 address to encode
      +
      Returns:
      +
      encoded Onion URL
      +
      +
      +
    • +
    • +
      +

      decodeOnionUrl

      +
      public static byte[] decodeOnionUrl(String onionUrl)
      +
      Decode an Onion URL into a Tor V2 or V3 address. +

      + See address-spec.txt

      +
      +
      Parameters:
      +
      onionUrl - Onion URL to decode
      +
      Returns:
      +
      decoded Tor address
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/internal/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/core/internal/package-summary.html new file mode 100644 index 000000000..6698b0f40 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/internal/package-summary.html @@ -0,0 +1,101 @@ + + + + +org.bitcoinj.core.internal (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.core.internal

+
+
+
package org.bitcoinj.core.internal
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/internal/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/core/internal/package-tree.html new file mode 100644 index 000000000..cf941b584 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/internal/package-tree.html @@ -0,0 +1,71 @@ + + + + +org.bitcoinj.core.internal Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.core.internal

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/AddressEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/AddressEventListener.html new file mode 100644 index 000000000..cfd315391 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/AddressEventListener.html @@ -0,0 +1,137 @@ + + + + +AddressEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface AddressEventListener

+
+
+
+
public interface AddressEventListener
+

Implementors can listen to addresses being received from remote peers.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onAddr(Peer peer, + AddressMessage message)
    +
    +
    Called when a peer receives an addr or addrv2 message, usually in response to a + getaddr message.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onAddr

      +
      void onAddr(Peer peer, + AddressMessage message)
      +
      Called when a peer receives an addr or addrv2 message, usually in response to a + getaddr message.
      +
      +
      Parameters:
      +
      peer - the peer that received the addr or addrv2 message
      +
      message - the addr or addrv2 message that was received
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/BlockchainDownloadEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/BlockchainDownloadEventListener.html new file mode 100644 index 000000000..b7a17f2ad --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/BlockchainDownloadEventListener.html @@ -0,0 +1,106 @@ + + + + +BlockchainDownloadEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface BlockchainDownloadEventListener

+
+
+
+
All Superinterfaces:
+
BlocksDownloadedEventListener, ChainDownloadStartedEventListener
+
+
+
All Known Implementing Classes:
+
DownloadProgressTracker
+
+
+
public interface BlockchainDownloadEventListener +extends BlocksDownloadedEventListener, ChainDownloadStartedEventListener
+
Event Listener for blockchain download. Replaces deprecated PeerDataEventListener because most (all?) + implementations of PeerDataEventListener were only using BlocksDownloadedEventListener and ChainDownloadStartedEventListener anyway.
+
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/BlocksDownloadedEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/BlocksDownloadedEventListener.html new file mode 100644 index 000000000..85f0756cc --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/BlocksDownloadedEventListener.html @@ -0,0 +1,155 @@ + + + + +BlocksDownloadedEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface BlocksDownloadedEventListener

+
+
+
+
All Known Subinterfaces:
+
BlockchainDownloadEventListener, PeerDataEventListener
+
+
+
All Known Implementing Classes:
+
DownloadProgressTracker
+
+
+
public interface BlocksDownloadedEventListener
+

Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, + they can pre-filter messages before they are processed by a Peer or PeerGroup, and they can + provide transactions to remote peers when they ask for them.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onBlocksDownloaded(Peer peer, + Block block, + FilteredBlock filteredBlock, + int blocksLeft)
    +
    +
    Called on a Peer thread when a block is received.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onBlocksDownloaded

      +
      void onBlocksDownloaded(Peer peer, + Block block, + @Nullable + FilteredBlock filteredBlock, + int blocksLeft)
      +

      Called on a Peer thread when a block is received.

      + +

      The block may be a Block object that contains transactions, a Block object that is only a header when + fast catchup is being used. If set, filteredBlock can be used to retrieve the list of associated transactions.

      +
      +
      Parameters:
      +
      peer - the peer receiving the block
      +
      block - the downloaded block
      +
      filteredBlock - if non-null, the object that wraps the block header passed as the block param.
      +
      blocksLeft - the number of blocks left to download
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/ChainDownloadStartedEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/ChainDownloadStartedEventListener.html new file mode 100644 index 000000000..eaa72ebb2 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/ChainDownloadStartedEventListener.html @@ -0,0 +1,145 @@ + + + + +ChainDownloadStartedEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface ChainDownloadStartedEventListener

+
+
+
+
All Known Subinterfaces:
+
BlockchainDownloadEventListener, PeerDataEventListener
+
+
+
All Known Implementing Classes:
+
DownloadProgressTracker
+
+
+
public interface ChainDownloadStartedEventListener
+

Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, + they can pre-filter messages before they are processed by a Peer or PeerGroup, and they can + provide transactions to remote peers when they ask for them.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onChainDownloadStarted(Peer peer, + int blocksLeft)
    +
    +
    Called when a download is started with the initial number of blocks to be downloaded.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onChainDownloadStarted

      +
      void onChainDownloadStarted(Peer peer, + int blocksLeft)
      +
      Called when a download is started with the initial number of blocks to be downloaded.
      +
      +
      Parameters:
      +
      peer - the peer receiving the block
      +
      blocksLeft - the number of blocks left to download
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/DownloadProgressTracker.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/DownloadProgressTracker.html new file mode 100644 index 000000000..e3d1d2242 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/DownloadProgressTracker.html @@ -0,0 +1,291 @@ + + + + +DownloadProgressTracker (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DownloadProgressTracker

+
+
java.lang.Object +
org.bitcoinj.core.listeners.DownloadProgressTracker
+
+
+
+
All Implemented Interfaces:
+
BlockchainDownloadEventListener, BlocksDownloadedEventListener, ChainDownloadStartedEventListener
+
+
+
public class DownloadProgressTracker +extends Object +implements BlockchainDownloadEventListener
+

An implementation of BlockchainDownloadEventListener that listens to chain download events and tracks progress + as a percentage. The default implementation prints progress to stdout, but you can subclass it and override the + progress method to update a GUI instead.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DownloadProgressTracker

      +
      public DownloadProgressTracker()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onChainDownloadStarted

      +
      public void onChainDownloadStarted(Peer peer, + int blocksLeft)
      +
      Description copied from interface: ChainDownloadStartedEventListener
      +
      Called when a download is started with the initial number of blocks to be downloaded.
      +
      +
      Specified by:
      +
      onChainDownloadStarted in interface ChainDownloadStartedEventListener
      +
      Parameters:
      +
      peer - the peer receiving the block
      +
      blocksLeft - the number of blocks left to download
      +
      +
      +
    • +
    • +
      +

      onBlocksDownloaded

      +
      public void onBlocksDownloaded(Peer peer, + Block block, + @Nullable + FilteredBlock filteredBlock, + int blocksLeft)
      +
      Description copied from interface: BlocksDownloadedEventListener
      +

      Called on a Peer thread when a block is received.

      + +

      The block may be a Block object that contains transactions, a Block object that is only a header when + fast catchup is being used. If set, filteredBlock can be used to retrieve the list of associated transactions.

      +
      +
      Specified by:
      +
      onBlocksDownloaded in interface BlocksDownloadedEventListener
      +
      Parameters:
      +
      peer - the peer receiving the block
      +
      block - the downloaded block
      +
      filteredBlock - if non-null, the object that wraps the block header passed as the block param.
      +
      blocksLeft - the number of blocks left to download
      +
      +
      +
    • +
    • +
      +

      progress

      +
      protected void progress(double pct, + int blocksSoFar, + Instant time)
      +
      Called when download progress is made.
      +
      +
      Parameters:
      +
      pct - the percentage of chain downloaded, estimated
      +
      time - the time of the last block downloaded
      +
      +
      +
    • +
    • +
      +

      startDownload

      +
      protected void startDownload(int blocks)
      +
      Called when download is initiated.
      +
      +
      Parameters:
      +
      blocks - the number of blocks to download, estimated
      +
      +
      +
    • +
    • +
      +

      doneDownload

      +
      protected void doneDownload()
      +
      Called when we are done downloading the block chain.
      +
      +
    • +
    • +
      +

      await

      +
      public void await() + throws InterruptedException
      +
      Wait for the chain to be downloaded.
      +
      +
      Throws:
      +
      InterruptedException
      +
      +
      +
    • +
    • +
      +

      getFuture

      +
      public ListenableCompletableFuture<Long> getFuture()
      +
      Returns a listenable future that completes with the height of the best chain (as reported by the peer) once chain + download seems to be finished.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/GetDataEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/GetDataEventListener.html new file mode 100644 index 000000000..1e3f95067 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/GetDataEventListener.html @@ -0,0 +1,141 @@ + + + + +GetDataEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface GetDataEventListener

+
+
+
+
All Known Subinterfaces:
+
PeerDataEventListener
+
+
+
public interface GetDataEventListener
+

Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, + they can pre-filter messages before they are processed by a Peer or PeerGroup, and they can + provide transactions to remote peers when they ask for them.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Called when a peer receives a getdata message, usually in response to an "inv" being broadcast.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getData

      +
      @Nullable +List<Message> getData(Peer peer, + GetDataMessage m)
      +

      Called when a peer receives a getdata message, usually in response to an "inv" being broadcast. Return as many + items as possible which appear in the GetDataMessage, or null if you're not interested in responding.

      + +

      Note that this will never be called if registered with any executor other than + Threading.SAME_THREAD

      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/NewBestBlockListener.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/NewBestBlockListener.html new file mode 100644 index 000000000..6b049ef00 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/NewBestBlockListener.html @@ -0,0 +1,147 @@ + + + + +NewBestBlockListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface NewBestBlockListener

+
+
+
+
All Known Implementing Classes:
+
NativeBlockChainListener, Wallet
+
+
+
public interface NewBestBlockListener
+
Listener interface for when a new block on the best chain is seen.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/OnTransactionBroadcastListener.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/OnTransactionBroadcastListener.html new file mode 100644 index 000000000..eac4bf421 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/OnTransactionBroadcastListener.html @@ -0,0 +1,130 @@ + + + + +OnTransactionBroadcastListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface OnTransactionBroadcastListener

+
+
+
+
public interface OnTransactionBroadcastListener
+
Called when a new transaction is broadcast over the network.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Called when a new transaction is broadcast over the network.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onTransaction

      +
      void onTransaction(Peer peer, + Transaction t)
      +
      Called when a new transaction is broadcast over the network.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/PeerConnectedEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/PeerConnectedEventListener.html new file mode 100644 index 000000000..f2c8fed2b --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/PeerConnectedEventListener.html @@ -0,0 +1,136 @@ + + + + +PeerConnectedEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface PeerConnectedEventListener

+
+
+
+
public interface PeerConnectedEventListener
+

Implementors can listen to events indicating a new peer connecting.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onPeerConnected(Peer peer, + int peerCount)
    +
    +
    Called when a peer is connected.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onPeerConnected

      +
      void onPeerConnected(Peer peer, + int peerCount)
      +
      Called when a peer is connected. If this listener is registered to a Peer instead of a PeerGroup, + peerCount will always be 1.
      +
      +
      Parameters:
      +
      peer -
      +
      peerCount - the total number of connected peers
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/PeerDataEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/PeerDataEventListener.html new file mode 100644 index 000000000..299dedebe --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/PeerDataEventListener.html @@ -0,0 +1,113 @@ + + + + +PeerDataEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface PeerDataEventListener

+
+
+
+
All Superinterfaces:
+
BlocksDownloadedEventListener, ChainDownloadStartedEventListener, GetDataEventListener, PreMessageReceivedEventListener
+
+
+ + +

Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, + they can pre-filter messages before they are processed by a Peer or PeerGroup, and they can + provide transactions to remote peers when they ask for them.

+
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/PeerDisconnectedEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/PeerDisconnectedEventListener.html new file mode 100644 index 000000000..5cc72b56c --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/PeerDisconnectedEventListener.html @@ -0,0 +1,138 @@ + + + + +PeerDisconnectedEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface PeerDisconnectedEventListener

+
+
+
+
public interface PeerDisconnectedEventListener
+

Implementors can listen to events indicating a peer disconnecting.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onPeerDisconnected(Peer peer, + int peerCount)
    +
    +
    Called when a peer is disconnected.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onPeerDisconnected

      +
      void onPeerDisconnected(Peer peer, + int peerCount)
      +
      Called when a peer is disconnected. Note that this won't be called if the listener is registered on a + PeerGroup and the group is in the process of shutting down. If this listener is registered to a + Peer instead of a PeerGroup, peerCount will always be 0. This handler can be called without + a corresponding invocation of onPeerConnected if the initial connection is never successful.
      +
      +
      Parameters:
      +
      peer -
      +
      peerCount - the total number of connected peers
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/PeerDiscoveredEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/PeerDiscoveredEventListener.html new file mode 100644 index 000000000..4753a8354 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/PeerDiscoveredEventListener.html @@ -0,0 +1,134 @@ + + + + +PeerDiscoveredEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface PeerDiscoveredEventListener

+
+
+
+
public interface PeerDiscoveredEventListener
+

Implementors can listen to events for peers being discovered.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Called when peers are discovered, this happens at startup of PeerGroup or if we run out of + suitable Peers to connect to.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onPeersDiscovered

      +
      void onPeersDiscovered(Set<PeerAddress> peerAddresses)
      +

      Called when peers are discovered, this happens at startup of PeerGroup or if we run out of + suitable Peers to connect to.

      +
      +
      Parameters:
      +
      peerAddresses - the set of discovered PeerAddresses
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/PreMessageReceivedEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/PreMessageReceivedEventListener.html new file mode 100644 index 000000000..407a3f2d1 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/PreMessageReceivedEventListener.html @@ -0,0 +1,142 @@ + + + + +PreMessageReceivedEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface PreMessageReceivedEventListener

+
+
+
+
All Known Subinterfaces:
+
PeerDataEventListener
+
+
+
public interface PreMessageReceivedEventListener
+

Implementors can listen to events like blocks being downloaded/transactions being broadcast/connect/disconnects, + they can pre-filter messages before they are processed by a Peer or PeerGroup, and they can + provide transactions to remote peers when they ask for them.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Called when a message is received by a peer, before the message is processed.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onPreMessageReceived

      +
      Message onPreMessageReceived(Peer peer, + Message m)
      +

      Called when a message is received by a peer, before the message is processed. The returned message is + processed instead. Returning null will cause the message to be ignored by the Peer returning the same message + object allows you to see the messages received but not change them. The result from one event listeners + callback is passed as "m" to the next, forming a chain.

      + +

      Note that this will never be called if registered with any executor other than + Threading.SAME_THREAD

      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/ReorganizeListener.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/ReorganizeListener.html new file mode 100644 index 000000000..750b138ca --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/ReorganizeListener.html @@ -0,0 +1,148 @@ + + + + +ReorganizeListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface ReorganizeListener

+
+
+
+
All Known Implementing Classes:
+
NativeBlockChainListener, Wallet
+
+
+
public interface ReorganizeListener
+
Listener interface for when the best chain has changed.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    reorganize(StoredBlock splitPoint, + List<StoredBlock> oldBlocks, + List<StoredBlock> newBlocks)
    +
    +
    Called by the BlockChain when the best chain + (representing total work done) has changed.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      reorganize

      +
      void reorganize(StoredBlock splitPoint, + List<StoredBlock> oldBlocks, + List<StoredBlock> newBlocks) + throws VerificationException
      +
      Called by the BlockChain when the best chain + (representing total work done) has changed. In this case, + we need to go through our transactions and find out if any have become invalid. It's possible for our balance + to go down in this case: money we thought we had can suddenly vanish if the rest of the network agrees it + should be so.

      + + The oldBlocks/newBlocks lists are ordered height-wise from top first to bottom last (i.e. newest blocks first).

      +
      +
      Throws:
      +
      VerificationException
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/TransactionConfidenceEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/TransactionConfidenceEventListener.html new file mode 100644 index 000000000..2090534c5 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/TransactionConfidenceEventListener.html @@ -0,0 +1,157 @@ + + + + +TransactionConfidenceEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface TransactionConfidenceEventListener

+
+
+
+
All Known Implementing Classes:
+
NativeTransactionConfidenceEventListener
+
+
+
public interface TransactionConfidenceEventListener
+
Implementors are called when confidence of a transaction changes.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Called when a transaction changes its confidence level.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onTransactionConfidenceChanged

      +
      void onTransactionConfidenceChanged(Wallet wallet, + Transaction tx)
      +
      Called when a transaction changes its confidence level. You can also attach event listeners to + the individual transactions, if you don't care about all of them. Usually you would save the wallet to disk after + receiving this callback unless you already set up autosaving. +

      + You should pay attention to this callback in case a transaction becomes dead, that is, a transaction + you believed to be active (send or receive) becomes overridden by the network. This can happen if: + +

        +
      1. You are sharing keys between wallets and accidentally create/broadcast a double spend.
      2. +
      3. Somebody is attacking the network and reversing transactions, ie, the user is a victim of fraud.
      4. +
      5. A bug: for example you create a transaction, broadcast it but fail to commit it. The Wallet + will then re-use the same outputs when creating the next spend.
      6. +
      + + To find if the transaction is dead, you can use: +
      + 
      + tx.getConfidence().getConfidenceType() == TransactionConfidence.ConfidenceType.DEAD
      + 
      + If it is, you should notify the user in some way so they know the thing they bought may not arrive/the thing they sold should not be dispatched. +

      + Note that this callback will be invoked for every transaction in the wallet, for every new block that is + received (because the depth has changed). If you want to update a UI view from the contents of the wallet + it is more efficient to use onWalletChanged instead.

      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/TransactionReceivedInBlockListener.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/TransactionReceivedInBlockListener.html new file mode 100644 index 000000000..fbfb7bc5c --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/TransactionReceivedInBlockListener.html @@ -0,0 +1,193 @@ + + + + +TransactionReceivedInBlockListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface TransactionReceivedInBlockListener

+
+
+
+
All Known Implementing Classes:
+
NativeBlockChainListener, Wallet
+
+
+
public interface TransactionReceivedInBlockListener
+
Listener interface for when we receive a new block that contains a relevant + transaction.
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      receiveFromBlock

      +
      void receiveFromBlock(Transaction tx, + StoredBlock block, + AbstractBlockChain.NewBlockType blockType, + int relativityOffset) + throws VerificationException
      +

      Called by the BlockChain when we receive a new block that contains a relevant transaction.

      + +

      A transaction may be received multiple times if is included into blocks in parallel chains. The blockType + parameter describes whether the containing block is on the main/best chain or whether it's on a presently + inactive side chain.

      + +

      The relativityOffset parameter is an arbitrary number used to establish an ordering between transactions + within the same block. In the case where full blocks are being downloaded, it is simply the index of the + transaction within that block. When Bloom filtering is in use, we don't find out the exact offset into a block + that a transaction occurred at, so the relativity count is not reflective of anything in an absolute sense but + rather exists only to order the transaction relative to the others.

      +
      +
      Throws:
      +
      VerificationException
      +
      +
      +
    • +
    • +
      +

      notifyTransactionIsInBlock

      +
      boolean notifyTransactionIsInBlock(Sha256Hash txHash, + StoredBlock block, + AbstractBlockChain.NewBlockType blockType, + int relativityOffset) + throws VerificationException
      +

      Called by the BlockChain when we receive a new FilteredBlock that contains the given + transaction hash in its merkle tree.

      + +

      A transaction may be received multiple times if is included into blocks in parallel chains. The blockType + parameter describes whether the containing block is on the main/best chain or whether it's on a presently + inactive side chain.

      + +

      The relativityOffset parameter in this case is an arbitrary (meaningless) number, that is useful only when + compared to the relativity count of another transaction received inside the same block. It is used to establish + an ordering of transactions relative to one another.

      + +

      This method should return false if the given tx hash isn't known about, e.g. because the transaction was + a Bloom false positive. If it was known about and stored, it should return true. The caller may need to know + this to calculate the effective FP rate.

      +
      +
      Returns:
      +
      whether the transaction is known about i.e. was considered relevant previously.
      +
      Throws:
      +
      VerificationException
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/package-summary.html new file mode 100644 index 000000000..bd1bbaafb --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/package-summary.html @@ -0,0 +1,177 @@ + + + + +org.bitcoinj.core.listeners (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.core.listeners

+
+
+
package org.bitcoinj.core.listeners
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/listeners/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/package-tree.html new file mode 100644 index 000000000..5a8aff91c --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/listeners/package-tree.html @@ -0,0 +1,107 @@ + + + + +org.bitcoinj.core.listeners Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.core.listeners

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/core/package-summary.html new file mode 100644 index 000000000..f1d19371d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/package-summary.html @@ -0,0 +1,481 @@ + + + + +org.bitcoinj.core (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.core

+
+
+
package org.bitcoinj.core
+
+
The core package contains classes for network messages like Block and + Transaction, peer connectivity via PeerGroup, + and block chain management. + If what you're doing can be described as basic bitcoin tasks, the code is probably found here. + To learn more please consult the documentation on the website.
+
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/core/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/core/package-tree.html new file mode 100644 index 000000000..9053fd5d4 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/core/package-tree.html @@ -0,0 +1,230 @@ + + + + +org.bitcoinj.core Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.core

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/AesKey.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/AesKey.html new file mode 100644 index 000000000..8b005e81f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/AesKey.html @@ -0,0 +1,249 @@ + + + + +AesKey (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AesKey

+
+ +
+
+
All Implemented Interfaces:
+
Comparable<ByteArray>
+
+
+
public class AesKey +extends ByteArray
+
Wrapper for a byte[] containing an AES Key. This is a replacement for Bouncy Castle's KeyParameter which + was used for this purpose in previous versions of bitcoinj. Unfortunately, this created a Gradle _API_ dependency + on Bouncy Castle when that wasn't strictly necessary. +

+ We have made this change without deprecation because it affected many method signatures and because updating is a trivial change. + If for some reason you have code that uses the Bouncy Castle KeyParameter type and need to convert + to or from AesKey, you can temporarily use ofKeyParameter(KeyParameter) or toKeyParameter()

+
+
+
    + +
  • +
    +

    Field Summary

    +
    +

    Fields inherited from class org.bitcoinj.base.internal.ByteArray

    +bytes
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    AesKey(byte[] keyBytes)
    +
    +
    Wrapper for a byte[] containing an AES Key
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    byte[]
    + +
    +
    Deprecated. + +
    +
    +
    static AesKey
    +
    ofKeyParameter(org.bouncycastle.crypto.params.KeyParameter keyParameter)
    +
    +
    Deprecated. +
    Use new AesKey(keyParameter.bytes())
    +
    +
    +
    org.bouncycastle.crypto.params.KeyParameter
    + +
    +
    Deprecated. +
    Use new KeyParameter(key.bytes)
    +
    +
    +
    +
    +
    +
    +

    Methods inherited from class org.bitcoinj.base.internal.ByteArray

    +bytes, compareTo, equals, formatHex, hashCode
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AesKey

      +
      public AesKey(byte[] keyBytes)
      +
      Wrapper for a byte[] containing an AES Key
      +
      +
      Parameters:
      +
      keyBytes - implementation-dependent AES Key bytes
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getKey

      +
      @Deprecated +public byte[] getKey()
      +
      Deprecated. + +
      +
      Provided to ease migration from KeyParameter.
      +
      +
      Returns:
      +
      The key bytes
      +
      +
      +
    • +
    • +
      +

      ofKeyParameter

      +
      @Deprecated +public static AesKey ofKeyParameter(org.bouncycastle.crypto.params.KeyParameter keyParameter)
      +
      Deprecated. +
      Use new AesKey(keyParameter.bytes())
      +
      +
      Provided to ease migration from KeyParameter.
      +
      +
      Parameters:
      +
      keyParameter - instance to convert
      +
      Returns:
      +
      new, preferred container for AES keys
      +
      +
      +
    • +
    • +
      +

      toKeyParameter

      +
      @Deprecated +public org.bouncycastle.crypto.params.KeyParameter toKeyParameter()
      +
      Deprecated. +
      Use new KeyParameter(key.bytes)
      +
      +
      Provided to ease migration from KeyParameter.
      +
      +
      Returns:
      +
      if for some reason you still need (temporarily, we hope) a KeyParameter
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/BIP38PrivateKey.BadPassphraseException.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/BIP38PrivateKey.BadPassphraseException.html new file mode 100644 index 000000000..6205beec7 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/BIP38PrivateKey.BadPassphraseException.html @@ -0,0 +1,150 @@ + + + + +BIP38PrivateKey.BadPassphraseException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BIP38PrivateKey.BadPassphraseException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.crypto.BIP38PrivateKey.BadPassphraseException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
BIP38PrivateKey
+
+
+
public static final class BIP38PrivateKey.BadPassphraseException +extends Exception
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BadPassphraseException

      +
      public BadPassphraseException()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/BIP38PrivateKey.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/BIP38PrivateKey.html new file mode 100644 index 000000000..cda3fe8c1 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/BIP38PrivateKey.html @@ -0,0 +1,305 @@ + + + + +BIP38PrivateKey (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BIP38PrivateKey

+
+
java.lang.Object +
org.bitcoinj.crypto.EncodedPrivateKey +
org.bitcoinj.crypto.BIP38PrivateKey
+
+
+
+
+
public class BIP38PrivateKey +extends EncodedPrivateKey
+
Implementation of BIP 38 + passphrase-protected private keys. Currently, only decryption is supported.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      ecMultiply

      +
      public final boolean ecMultiply
      +
      +
    • +
    • +
      +

      compressed

      +
      public final boolean compressed
      +
      +
    • +
    • +
      +

      hasLotAndSequence

      +
      public final boolean hasLotAndSequence
      +
      +
    • +
    • +
      +

      addressHash

      +
      public final byte[] addressHash
      +
      +
    • +
    • +
      +

      content

      +
      public final byte[] content
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/ChildNumber.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/ChildNumber.html new file mode 100644 index 000000000..5b72a8d66 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/ChildNumber.html @@ -0,0 +1,416 @@ + + + + +ChildNumber (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ChildNumber

+
+
java.lang.Object +
org.bitcoinj.crypto.ChildNumber
+
+
+
+
All Implemented Interfaces:
+
Comparable<ChildNumber>
+
+
+
public class ChildNumber +extends Object +implements Comparable<ChildNumber>
+

This is just a wrapper for the i (child number) as per BIP 32 with a boolean getter for the most significant bit + and a getter for the actual 0-based child number. A List of these forms a path through a + DeterministicHierarchy. This class is immutable.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      HARDENED_BIT

      +
      public static final int HARDENED_BIT
      +
      The bit that's set in the child number to indicate whether this key is "hardened". Given a hardened key, it is + not possible to derive a child public key if you know only the hardened public key. With a non-hardened key this + is possible, so you can derive trees of public keys given only a public parent, but the downside is that it's + possible to leak private keys if you disclose a parent public key and a child private key (elliptic curve maths + allows you to work upwards).
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      ZERO

      +
      public static final ChildNumber ZERO
      +
      +
    • +
    • +
      +

      ZERO_HARDENED

      +
      public static final ChildNumber ZERO_HARDENED
      +
      +
    • +
    • +
      +

      ONE

      +
      public static final ChildNumber ONE
      +
      +
    • +
    • +
      +

      ONE_HARDENED

      +
      public static final ChildNumber ONE_HARDENED
      +
      +
    • +
    • +
      +

      PURPOSE_BIP44

      +
      public static final ChildNumber PURPOSE_BIP44
      +
      +
    • +
    • +
      +

      PURPOSE_BIP49

      +
      public static final ChildNumber PURPOSE_BIP49
      +
      +
    • +
    • +
      +

      PURPOSE_BIP84

      +
      public static final ChildNumber PURPOSE_BIP84
      +
      +
    • +
    • +
      +

      PURPOSE_BIP86

      +
      public static final ChildNumber PURPOSE_BIP86
      +
      +
    • +
    • +
      +

      COINTYPE_BTC

      +
      public static final ChildNumber COINTYPE_BTC
      +
      +
    • +
    • +
      +

      COINTYPE_TBTC

      +
      public static final ChildNumber COINTYPE_TBTC
      +
      +
    • +
    • +
      +

      CHANGE_RECEIVING

      +
      public static final ChildNumber CHANGE_RECEIVING
      +
      +
    • +
    • +
      +

      CHANGE_CHANGE

      +
      public static final ChildNumber CHANGE_CHANGE
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ChildNumber

      +
      public ChildNumber(int childNumber, + boolean isHardened)
      +
      +
    • +
    • +
      +

      ChildNumber

      +
      public ChildNumber(int i)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getI

      +
      public int getI()
      +
      Returns the uint32 encoded form of the path element, including the most significant bit.
      +
      +
    • +
    • +
      +

      i

      +
      public int i()
      +
      Returns the uint32 encoded form of the path element, including the most significant bit.
      +
      +
    • +
    • +
      +

      isHardened

      +
      public boolean isHardened()
      +
      +
    • +
    • +
      +

      num

      +
      public int num()
      +
      Returns the child number without the hardening bit set (i.e. index in that part of the tree).
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      compareTo

      +
      public int compareTo(ChildNumber other)
      +
      +
      Specified by:
      +
      compareTo in interface Comparable<ChildNumber>
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/DeterministicHierarchy.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/DeterministicHierarchy.html new file mode 100644 index 000000000..be7338f56 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/DeterministicHierarchy.html @@ -0,0 +1,344 @@ + + + + +DeterministicHierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DeterministicHierarchy

+
+
java.lang.Object +
org.bitcoinj.crypto.DeterministicHierarchy
+
+
+
+
public class DeterministicHierarchy +extends Object
+

A DeterministicHierarchy calculates and keeps a whole tree (hierarchy) of keys originating from a single + root key. This implements part of the BIP 32 specification. A deterministic key tree is useful because + Bitcoin's privacy system require new keys to be created for each transaction, but managing all these + keys quickly becomes unwieldy. In particular it becomes hard to back up and distribute them. By having + a way to derive random-looking but deterministic keys we can make wallet backup simpler and gain the + ability to hand out DeterministicKeys to other people who can then create new addresses + on the fly, without having to contact us.

+ +

The hierarchy is started from a single root key, and a location in the tree is given by a path which + is a list of ChildNumbers.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      BIP32_STANDARDISATION_TIME

      +
      public static final Instant BIP32_STANDARDISATION_TIME
      +
      +
    • +
    • +
      +

      BIP32_STANDARDISATION_TIME_SECS

      +
      @Deprecated +public static final int BIP32_STANDARDISATION_TIME_SECS
      +
      Deprecated. + +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DeterministicHierarchy

      +
      public DeterministicHierarchy(DeterministicKey rootKey)
      +
      Constructs a new hierarchy rooted at the given key. Note that this does not have to be the top of the tree. + You can construct a DeterministicHierarchy for a subtree of a larger tree that you may not own.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      putKey

      +
      public final void putKey(DeterministicKey key)
      +
      Inserts a key into the hierarchy. Used during deserialization: you normally don't need this. Keys must be + inserted in order.
      +
      +
    • +
    • +
      +

      putKeys

      +
      public final void putKeys(List<DeterministicKey> keys)
      +
      Inserts a list of keys into the hierarchy
      +
      +
      Parameters:
      +
      keys - A list of keys to put in the hierarchy
      +
      +
      +
    • +
    • +
      +

      get

      +
      public DeterministicKey get(List<ChildNumber> path, + boolean relativePath, + boolean create)
      +
      Returns a key for the given path, optionally creating it.
      +
      +
      Parameters:
      +
      path - the path to the key
      +
      relativePath - whether the path is relative to the root path
      +
      create - whether the key corresponding to path should be created (with any necessary ancestors) if it doesn't exist already
      +
      Returns:
      +
      next newly created key using the child derivation function
      +
      Throws:
      +
      IllegalArgumentException - if create is false and the path was not found.
      +
      +
      +
    • +
    • +
      +

      deriveNextChild

      +
      public DeterministicKey deriveNextChild(List<ChildNumber> parentPath, + boolean relative, + boolean createParent, + boolean privateDerivation)
      +
      Extends the tree by calculating the next key that hangs off the given parent path. For example, if you pass a + path of 1/2 here and there are already keys 1/2/1 and 1/2/2 then it will derive 1/2/3.
      +
      +
      Parameters:
      +
      parentPath - the path to the parent
      +
      relative - whether the path is relative to the root path
      +
      createParent - whether the parent corresponding to path should be created (with any necessary ancestors) if it doesn't exist already
      +
      privateDerivation - whether to use private or public derivation
      +
      Returns:
      +
      next newly created key using the child derivation function
      +
      Throws:
      +
      IllegalArgumentException - if the parent doesn't exist and createParent is false.
      +
      +
      +
    • +
    • +
      +

      getNumChildren

      +
      public int getNumChildren(HDPath path)
      +
      +
    • +
    • +
      +

      deriveChild

      +
      public DeterministicKey deriveChild(List<ChildNumber> parentPath, + boolean relative, + boolean createParent, + ChildNumber createChildNumber)
      +
      Extends the tree by calculating the requested child for the given path. For example, to get the key at position + 1/2/3 you would pass 1/2 as the parent path and 3 as the child number.
      +
      +
      Parameters:
      +
      parentPath - the path to the parent
      +
      relative - whether the path is relative to the root path
      +
      createParent - whether the parent corresponding to path should be created (with any necessary ancestors) if it doesn't exist already
      +
      Returns:
      +
      the requested key.
      +
      Throws:
      +
      IllegalArgumentException - if the parent doesn't exist and createParent is false.
      +
      +
      +
    • +
    • +
      +

      getRootKey

      +
      public DeterministicKey getRootKey()
      +
      Returns the root key that the DeterministicHierarchy was created with.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/DeterministicKey.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/DeterministicKey.html new file mode 100644 index 000000000..5f3057a5e --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/DeterministicKey.html @@ -0,0 +1,1271 @@ + + + + +DeterministicKey (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DeterministicKey

+
+
java.lang.Object +
org.bitcoinj.crypto.ECKey +
org.bitcoinj.crypto.DeterministicKey
+
+
+
+
+
All Implemented Interfaces:
+
EncryptableItem
+
+
+
public class DeterministicKey +extends ECKey
+
A deterministic key is a node in a DeterministicHierarchy. As per + the BIP 32 specification it is a pair + (key, chaincode). If you know its path in the tree and its chain code you can derive more keys from this. To obtain + one of these, you can call HDKeyDerivation.createMasterPrivateKey(byte[]).
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      CHILDNUM_ORDER

      +
      public static final Comparator<ECKey> CHILDNUM_ORDER
      +
      Sorts deterministic keys in the order of their child number. That's usually the order used to derive them.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DeterministicKey

      +
      public DeterministicKey(List<ChildNumber> childNumberPath, + byte[] chainCode, + LazyECPoint publicAsPoint, + @Nullable + BigInteger priv, + @Nullable + DeterministicKey parent)
      +
      Constructs a key from its components. This is not normally something you should use.
      +
      +
    • +
    • +
      +

      DeterministicKey

      +
      public DeterministicKey(List<ChildNumber> childNumberPath, + byte[] chainCode, + org.bouncycastle.math.ec.ECPoint publicAsPoint, + boolean compressed, + @Nullable + BigInteger priv, + @Nullable + DeterministicKey parent)
      +
      +
    • +
    • +
      +

      DeterministicKey

      +
      public DeterministicKey(HDPath hdPath, + byte[] chainCode, + BigInteger priv, + @Nullable + DeterministicKey parent)
      +
      Constructs a key from its components. This is not normally something you should use.
      +
      +
    • +
    • +
      +

      DeterministicKey

      +
      public DeterministicKey(List<ChildNumber> childNumberPath, + byte[] chainCode, + KeyCrypter crypter, + LazyECPoint pub, + EncryptedData priv, + @Nullable + DeterministicKey parent)
      +
      Constructs a key from its components. This is not normally something you should use.
      +
      +
    • +
    • +
      +

      DeterministicKey

      +
      public DeterministicKey(List<ChildNumber> childNumberPath, + byte[] chainCode, + LazyECPoint publicAsPoint, + @Nullable + DeterministicKey parent, + int depth, + int parentFingerprint)
      +
      Constructs a key from its components, including its public key data and possibly-redundant + information about its parent key. Invoked when deserializing, but otherwise not something that + you normally should use.
      +
      +
    • +
    • +
      +

      DeterministicKey

      +
      public DeterministicKey(List<ChildNumber> childNumberPath, + byte[] chainCode, + BigInteger priv, + @Nullable + DeterministicKey parent, + int depth, + int parentFingerprint)
      +
      Constructs a key from its components, including its private key data and possibly-redundant + information about its parent key. Invoked when deserializing, but otherwise not something that + you normally should use.
      +
      +
    • +
    • +
      +

      DeterministicKey

      +
      public DeterministicKey(DeterministicKey keyToClone, + DeterministicKey newParent)
      +
      Clones the key
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getPath

      +
      public HDPath getPath()
      +
      Returns the path through some DeterministicHierarchy which reaches this keys position in the tree. + A path can be written as 0/1/0 which means the first child of the root, the second child of that node, then + the first child of that node.
      +
      +
    • +
    • +
      +

      getPathAsString

      +
      public String getPathAsString()
      +
      Returns the path of this key as a human-readable string starting with M or m to indicate the master key.
      +
      +
    • +
    • +
      +

      getDepth

      +
      public int getDepth()
      +
      Return this key's depth in the hierarchy, where the root node is at depth zero. + This may be different than the number of segments in the path if this key was + deserialized without access to its parent.
      +
      +
    • +
    • +
      +

      getChildNumber

      +
      public ChildNumber getChildNumber()
      +
      Returns the last element of the path returned by getPath()
      +
      +
    • +
    • +
      +

      getChainCode

      +
      public byte[] getChainCode()
      +
      Returns the chain code associated with this key. See the specification to learn more about chain codes.
      +
      +
    • +
    • +
      +

      getIdentifier

      +
      public byte[] getIdentifier()
      +
      Returns RIPE-MD160(SHA256(pub key bytes)).
      +
      +
    • +
    • +
      +

      getFingerprint

      +
      public int getFingerprint()
      +
      Returns the first 32 bits of the result of getIdentifier().
      +
      +
    • +
    • +
      +

      getParent

      +
      @Nullable +public DeterministicKey getParent()
      +
      +
    • +
    • +
      +

      getParentFingerprint

      +
      public int getParentFingerprint()
      +
      Return the fingerprint of the key from which this key was derived, if this is a + child key, or else an array of four zero-value bytes.
      +
      +
    • +
    • +
      +

      getPrivKeyBytes33

      +
      public byte[] getPrivKeyBytes33()
      +
      Returns private key bytes, padded with zeros to 33 bytes.
      +
      +
      Throws:
      +
      IllegalStateException - if the private key bytes are missing.
      +
      +
      +
    • +
    • +
      +

      dropPrivateBytes

      +
      public DeterministicKey dropPrivateBytes()
      +
      Returns the same key with the private bytes removed. May return the same instance. The purpose of this is to save + memory: the private key can always be very efficiently rederived from a parent that a private key, so storing + all the private keys in RAM is a poor tradeoff especially on constrained devices. This means that the returned + key may still be usable for signing and so on, so don't expect it to be a true pubkey-only object! If you want + that then you should follow this call with a call to dropParent().
      +
      +
    • +
    • +
      +

      dropParent

      +
      public DeterministicKey dropParent()
      +

      Returns the same key with the parent pointer removed (it still knows its own path and the parent fingerprint).

      + +

      If this key doesn't have private key bytes stored/cached itself, but could rederive them from the parent, then + the new key returned by this method won't be able to do that. Thus, using dropPrivateBytes().dropParent() on a + regular DeterministicKey will yield a new DeterministicKey that cannot sign or do other things involving the + private key at all.

      +
      +
    • +
    • +
      +

      encrypt

      +
      public DeterministicKey encrypt(KeyCrypter keyCrypter, + AesKey aesKey) + throws KeyCrypterException
      +
      Description copied from class: ECKey
      +
      Create an encrypted private key with the keyCrypter and the AES key supplied. + This method returns a new encrypted key and leaves the original unchanged.
      +
      +
      Overrides:
      +
      encrypt in class ECKey
      +
      Parameters:
      +
      keyCrypter - The keyCrypter that specifies exactly how the encrypted bytes are created.
      +
      aesKey - The KeyParameter with the AES encryption key (usually constructed with keyCrypter#deriveKey and cached as it is slow to create).
      +
      Returns:
      +
      encryptedKey
      +
      Throws:
      +
      KeyCrypterException
      +
      +
      +
    • +
    • +
      +

      encrypt

      +
      public DeterministicKey encrypt(KeyCrypter keyCrypter, + AesKey aesKey, + @Nullable + DeterministicKey newParent) + throws KeyCrypterException
      +
      +
      Throws:
      +
      KeyCrypterException
      +
      +
      +
    • +
    • +
      +

      isPubKeyOnly

      +
      public boolean isPubKeyOnly()
      +
      A deterministic key is considered to be 'public key only' if it hasn't got a private key part and it cannot be + rederived. If the hierarchy is encrypted this returns true.
      +
      +
      Overrides:
      +
      isPubKeyOnly in class ECKey
      +
      +
      +
    • +
    • +
      +

      hasPrivKey

      +
      public boolean hasPrivKey()
      +
      Description copied from class: ECKey
      +
      Returns true if this key has unencrypted access to private key bytes. Does the opposite of + ECKey.isPubKeyOnly().
      +
      +
      Overrides:
      +
      hasPrivKey in class ECKey
      +
      +
      +
    • +
    • +
      +

      getSecretBytes

      +
      @Nullable +public byte[] getSecretBytes()
      +
      Description copied from class: ECKey
      +
      A wrapper for ECKey.getPrivKeyBytes() that returns null if the private key bytes are missing or would have + to be derived (for the HD key case).
      +
      +
      Specified by:
      +
      getSecretBytes in interface EncryptableItem
      +
      Overrides:
      +
      getSecretBytes in class ECKey
      +
      +
      +
    • +
    • +
      +

      isEncrypted

      +
      public boolean isEncrypted()
      +
      A deterministic key is considered to be encrypted if it has access to encrypted private key bytes, OR if its + parent does. The reason is because the parent would be encrypted under the same key and this key knows how to + rederive its own private key bytes from the parent, if needed.
      +
      +
      Specified by:
      +
      isEncrypted in interface EncryptableItem
      +
      Overrides:
      +
      isEncrypted in class ECKey
      +
      +
      +
    • +
    • +
      +

      getKeyCrypter

      +
      @Nullable +public KeyCrypter getKeyCrypter()
      +
      Returns this keys KeyCrypter or the keycrypter of its parent key.
      +
      +
      Overrides:
      +
      getKeyCrypter in class ECKey
      +
      +
      +
    • +
    • +
      +

      sign

      +
      public ECKey.ECDSASignature sign(Sha256Hash input, + @Nullable + AesKey aesKey) + throws KeyCrypterException
      +
      Description copied from class: ECKey
      +
      Signs the given hash and returns the R and S components as BigIntegers. In the Bitcoin protocol, they are + usually encoded using DER format, so you want ECKey.ECDSASignature.encodeToDER() + instead. However sometimes the independent components can be useful, for instance, if you're doing to do further + EC maths on them.
      +
      +
      Overrides:
      +
      sign in class ECKey
      +
      aesKey - The AES key to use for decryption of the private key. If null then no decryption is required.
      +
      Throws:
      +
      KeyCrypterException - if there's something wrong with aesKey.
      +
      +
      +
    • +
    • +
      +

      decrypt

      +
      public DeterministicKey decrypt(KeyCrypter keyCrypter, + AesKey aesKey) + throws KeyCrypterException
      +
      Description copied from class: ECKey
      +
      Create a decrypted private key with the keyCrypter and AES key supplied. Note that if the aesKey is wrong, this + has some chance of throwing KeyCrypterException due to the corrupted padding that will result, but it can also + just yield a garbage key.
      +
      +
      Overrides:
      +
      decrypt in class ECKey
      +
      Parameters:
      +
      keyCrypter - The keyCrypter that specifies exactly how the decrypted bytes are created.
      +
      aesKey - The KeyParameter with the AES encryption key (usually constructed with keyCrypter#deriveKey and cached).
      +
      Throws:
      +
      KeyCrypterException
      +
      +
      +
    • +
    • +
      +

      decrypt

      +
      public DeterministicKey decrypt(AesKey aesKey) + throws KeyCrypterException
      +
      Description copied from class: ECKey
      +
      Create a decrypted private key with AES key. Note that if the AES key is wrong, this + has some chance of throwing KeyCrypterException due to the corrupted padding that will result, but it can also + just yield a garbage key.
      +
      +
      Overrides:
      +
      decrypt in class ECKey
      +
      Parameters:
      +
      aesKey - The KeyParameter with the AES encryption key (usually constructed with keyCrypter#deriveKey and cached).
      +
      Throws:
      +
      KeyCrypterException
      +
      +
      +
    • +
    • +
      +

      derive

      +
      public DeterministicKey derive(int child)
      +
      Derives a child at the given index using hardened derivation. Note: index is + not the "i" value. If you want the softened derivation, then use instead + HDKeyDerivation.deriveChildKey(this, new ChildNumber(child, false)).
      +
      +
    • +
    • +
      +

      getPrivKey

      +
      public BigInteger getPrivKey()
      +
      Returns the private key of this deterministic key. Even if this object isn't storing the private key, + it can be re-derived by walking up to the parents if necessary and this is what will happen.
      +
      +
      Overrides:
      +
      getPrivKey in class ECKey
      +
      Throws:
      +
      IllegalStateException - if the parents are encrypted or a watching chain.
      +
      +
      +
    • +
    • +
      +

      serializePubB58

      +
      public String serializePubB58(Network network, + ScriptType outputScriptType)
      +
      Deprecated. +
      Use a serializePubB58(Network) or a descriptor if you need output type information
      +
      +
      Serialize public key to Base58 +

      + outputScriptType should not be used in generating "xpub" format. (and "ypub", "zpub", etc. should not be used)

      +
      +
      Parameters:
      +
      network - which network to serialize key for
      +
      outputScriptType - output script type
      +
      Returns:
      +
      the key serialized as a Base58 address
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      serializePubB58

      +
      @Deprecated +public String serializePubB58(NetworkParameters params, + ScriptType outputScriptType)
      + +
      +
    • +
    • +
      +

      serializePrivB58

      +
      public String serializePrivB58(Network network, + ScriptType outputScriptType)
      +
      Deprecated. +
      Use a serializePrivB58(Network) or a descriptor if you need output type information
      +
      +
      Serialize private key to Base58 +

      + outputScriptType should not be used in generating "xprv" format. (and "zprv", "vprv", etc. should not be used)

      +
      +
      Parameters:
      +
      network - which network to serialize key for
      +
      outputScriptType - output script type
      +
      Returns:
      +
      the key serialized as a Base58 address
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      serializePrivB58

      +
      @Deprecated +public String serializePrivB58(NetworkParameters params, + ScriptType outputScriptType)
      + +
      +
    • +
    • +
      +

      serializePubB58

      +
      public String serializePubB58(Network network)
      +
      Serialize public key to Base58 (either "xpub" or "tpub")
      +
      +
      Parameters:
      +
      network - which network to serialize key for
      +
      Returns:
      +
      the key serialized as a Base58 address
      +
      +
      +
    • +
    • +
      +

      serializePubB58

      +
      @Deprecated +public String serializePubB58(NetworkParameters params)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      serializePrivB58

      +
      public String serializePrivB58(Network network)
      +
      Serialize private key to Base58 (either "xprv" or "tprv")
      +
      +
      Parameters:
      +
      network - which network to serialize key for
      +
      Returns:
      +
      the key serialized as a Base58 address
      +
      +
      +
    • +
    • +
      +

      serializePrivB58

      +
      @Deprecated +public String serializePrivB58(NetworkParameters params)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      deserializeB58

      +
      public static DeterministicKey deserializeB58(String base58, + Network network)
      +
      Deserialize a base-58-encoded HD Key with no parent
      +
      +
    • +
    • +
      +

      deserializeB58

      +
      @Deprecated +public static DeterministicKey deserializeB58(String base58, + NetworkParameters params)
      + +
      +
    • +
    • +
      +

      deserializeB58

      +
      public static DeterministicKey deserializeB58(@Nullable + DeterministicKey parent, + String base58, + Network network)
      +
      Deserialize a base-58-encoded HD Key.
      +
      +
      Parameters:
      +
      parent - The parent node in the given key's deterministic hierarchy.
      +
      Throws:
      +
      IllegalArgumentException - if the base58 encoded key could not be parsed.
      +
      +
      +
    • +
    • +
      +

      deserializeB58

      +
      @Deprecated +public static DeterministicKey deserializeB58(@Nullable + DeterministicKey parent, + String base58, + NetworkParameters params)
      + +
      +
    • +
    • +
      +

      deserialize

      +
      public static DeterministicKey deserialize(Network network, + byte[] serializedKey)
      +
      Deserialize an HD Key with no parent
      +
      +
    • +
    • +
      +

      deserialize

      +
      @Deprecated +public static DeterministicKey deserialize(NetworkParameters params, + byte[] serializedKey)
      +
      Deprecated. + +
      +
      Deserialize an HD Key with no parent
      +
      +
    • +
    • +
      +

      deserialize

      +
      public static DeterministicKey deserialize(Network network, + byte[] serializedKey, + @Nullable + DeterministicKey parent)
      +
      Deserialize an HD Key.
      +
      +
      Parameters:
      +
      parent - The parent node in the given key's deterministic hierarchy.
      +
      +
      +
    • +
    • +
      +

      deserialize

      +
      @Deprecated +public static DeterministicKey deserialize(NetworkParameters params, + byte[] serializedKey, + @Nullable + DeterministicKey parent)
      + +
      Deserialize an HD Key.
      +
      +
    • +
    • +
      +

      getCreationTime

      +
      public Optional<Instant> getCreationTime()
      +
      The creation time of a deterministic key is equal to that of its parent, unless this key is the root of a tree + in which case the time is stored alongside the key as per normal, see ECKey.getCreationTime().
      +
      +
      Specified by:
      +
      getCreationTime in interface EncryptableItem
      +
      Overrides:
      +
      getCreationTime in class ECKey
      +
      +
      +
    • +
    • +
      +

      setCreationTime

      +
      public void setCreationTime(Instant creationTime)
      +
      The creation time of a deterministic key is equal to that of its parent, unless this key is the root of a tree. + Thus, setting the creation time on a leaf is forbidden.
      +
      +
      Overrides:
      +
      setCreationTime in class ECKey
      +
      Parameters:
      +
      creationTime - creation time of this key
      +
      +
      +
    • +
    • +
      +

      clearCreationTime

      +
      public void clearCreationTime()
      +
      Clears the creation time of this key. This is mainly used deserialization and cloning. Normally you should not + need to use this, as keys should have proper creation times whenever possible.
      +
      +
      Overrides:
      +
      clearCreationTime in class ECKey
      +
      +
      +
    • +
    • +
      +

      setCreationTimeSeconds

      +
      @Deprecated +public void setCreationTimeSeconds(long creationTimeSecs)
      +
      Deprecated. + +
      +
      +
      Overrides:
      +
      setCreationTimeSeconds in class ECKey
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      Verifies equality of all fields but NOT the parent pointer (thus the same key derived in two separate hierarchy + objects will equal each other.
      +
      +
      Overrides:
      +
      equals in class ECKey
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class ECKey
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class ECKey
      +
      +
      +
    • +
    • +
      +

      formatKeyWithAddress

      +
      public void formatKeyWithAddress(boolean includePrivateKeys, + @Nullable + AesKey aesKey, + StringBuilder builder, + Network network, + ScriptType outputScriptType, + @Nullable + String comment)
      +
      +
      Overrides:
      +
      formatKeyWithAddress in class ECKey
      +
      +
      +
    • +
    • +
      +

      formatKeyWithAddress

      +
      @Deprecated +public void formatKeyWithAddress(boolean includePrivateKeys, + @Nullable + AesKey aesKey, + StringBuilder builder, + NetworkParameters params, + ScriptType outputScriptType, + @Nullable + String comment)
      + +
      +
      Overrides:
      +
      formatKeyWithAddress in class ECKey
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/DumpedPrivateKey.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/DumpedPrivateKey.html new file mode 100644 index 000000000..82df04341 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/DumpedPrivateKey.html @@ -0,0 +1,248 @@ + + + + +DumpedPrivateKey (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DumpedPrivateKey

+
+
java.lang.Object +
org.bitcoinj.crypto.EncodedPrivateKey +
org.bitcoinj.crypto.DumpedPrivateKey
+
+
+
+
+
public class DumpedPrivateKey +extends EncodedPrivateKey
+
Parses and generates private keys in the form used by the Bitcoin "dumpprivkey" command. This is the private key + bytes with a header byte and 4 checksum bytes at the end. If there are 33 private key bytes instead of 32, then + the last byte is a discriminator value for the compressed pubkey.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/ECKey.ECDSASignature.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/ECKey.ECDSASignature.html new file mode 100644 index 000000000..653f0e6f1 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/ECKey.ECDSASignature.html @@ -0,0 +1,305 @@ + + + + +ECKey.ECDSASignature (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ECKey.ECDSASignature

+
+
java.lang.Object +
org.bitcoinj.crypto.ECKey.ECDSASignature
+
+
+
+
Direct Known Subclasses:
+
TransactionSignature
+
+
+
Enclosing class:
+
ECKey
+
+
+
public static class ECKey.ECDSASignature +extends Object
+
Groups the two components that make up a signature, and provides a way to encode to DER form, which is + how ECDSA signatures are represented when embedded in other data structures in the Bitcoin protocol. The raw + components can be useful for doing further EC maths on them.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      r

      +
      public final BigInteger r
      +
      The two components of the signature.
      +
      +
    • +
    • +
      +

      s

      +
      public final BigInteger s
      +
      The two components of the signature.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ECDSASignature

      +
      public ECDSASignature(BigInteger r, + BigInteger s)
      +
      Constructs a signature with the given components. Does NOT automatically canonicalise the signature.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      isCanonical

      +
      public boolean isCanonical()
      +
      Returns true if the S component is "low", that means it is below ECKey.HALF_CURVE_ORDER. See BIP62.
      +
      +
    • +
    • +
      +

      toCanonicalised

      +
      public ECKey.ECDSASignature toCanonicalised()
      +
      Will automatically adjust the S component to be less than or equal to half the curve order, if necessary. + This is required because for every signature (r,s) the signature (r, -s (mod N)) is a valid signature of + the same message. However, we dislike the ability to modify the bits of a Bitcoin transaction after it's + been signed, as that violates various assumed invariants. Thus in future only one of those forms will be + considered legal and the other will be banned.
      +
      +
    • +
    • +
      +

      encodeToDER

      +
      public byte[] encodeToDER()
      +
      DER is an international standard for serializing data structures which is widely used in cryptography. + It's somewhat like protocol buffers but less convenient. This method returns a standard DER encoding + of the signature, as recognized by OpenSSL and other libraries.
      +
      +
    • +
    • +
      +

      decodeFromDER

      +
      public static ECKey.ECDSASignature decodeFromDER(byte[] bytes) + throws SignatureDecodeException
      +
      +
      Throws:
      +
      SignatureDecodeException - if the signature is unparseable in some way.
      +
      +
      +
    • +
    • +
      +

      derByteStream

      +
      protected ByteArrayOutputStream derByteStream() + throws IOException
      +
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/ECKey.KeyIsEncryptedException.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/ECKey.KeyIsEncryptedException.html new file mode 100644 index 000000000..b03f78bb0 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/ECKey.KeyIsEncryptedException.html @@ -0,0 +1,154 @@ + + + + +ECKey.KeyIsEncryptedException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ECKey.KeyIsEncryptedException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
ECKey
+
+
+
public static class ECKey.KeyIsEncryptedException +extends ECKey.MissingPrivateKeyException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      KeyIsEncryptedException

      +
      public KeyIsEncryptedException()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/ECKey.MissingPrivateKeyException.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/ECKey.MissingPrivateKeyException.html new file mode 100644 index 000000000..8dfc27eab --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/ECKey.MissingPrivateKeyException.html @@ -0,0 +1,156 @@ + + + + +ECKey.MissingPrivateKeyException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ECKey.MissingPrivateKeyException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.crypto.ECKey.MissingPrivateKeyException
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
ECKey.KeyIsEncryptedException
+
+
+
Enclosing class:
+
ECKey
+
+
+
public static class ECKey.MissingPrivateKeyException +extends RuntimeException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MissingPrivateKeyException

      +
      public MissingPrivateKeyException()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/ECKey.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/ECKey.html new file mode 100644 index 000000000..1d608f7a0 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/ECKey.html @@ -0,0 +1,1654 @@ + + + + +ECKey (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ECKey

+
+
java.lang.Object +
org.bitcoinj.crypto.ECKey
+
+
+
+
All Implemented Interfaces:
+
EncryptableItem
+
+
+
Direct Known Subclasses:
+
DeterministicKey
+
+
+
public class ECKey +extends Object +implements EncryptableItem
+

Represents an elliptic curve public and (optionally) private key, usable for digital signatures but not encryption. + Creating a new ECKey with the empty constructor will generate a new random keypair. Other static methods can be used + when you already have the public or private parts. If you create a key with only the public part, you can check + signatures but not create them.

+ +

ECKey also provides access to Bitcoin Core compatible text message signing, as accessible via the UI or JSON-RPC. + This is slightly different to signing raw bytes - if you want to sign your own data and it won't be exposed as + text to people, you don't want to use this.

+ +

The ECDSA algorithm supports key recovery in which a signature plus a couple of discriminator bits can + be reversed to find the public key used to calculate it. This can be convenient when you have a message and a + signature and want to find out who signed it, rather than requiring the user to provide the expected identity.

+ +

This class supports a variety of serialization forms. The methods that accept/return byte arrays serialize + private keys as raw byte arrays and public keys using the SEC standard byte encoding for public keys. Signatures + are encoded using ASN.1/DER inside the Bitcoin protocol.

+ +

A key can be compressed or uncompressed. This refers to whether the public key is represented + when encoded into bytes as an (x, y) coordinate on the elliptic curve, or whether it's represented as just an X + co-ordinate and an extra byte that carries a sign bit. With the latter form the Y coordinate can be calculated + dynamically, however, because the binary serialization is different the address of a key changes if its + compression status is changed. If you deviate from the defaults it's important to understand this: money sent + to a compressed version of the key will have a different address to the same key in uncompressed form. Whether + a public key is compressed or not is recorded in the SEC binary serialisation format, and preserved in a flag in + this class so round-tripping preserves state. Unless you're working with old software or doing unusual things, you + can usually ignore the compressed/uncompressed distinction.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      AGE_COMPARATOR

      +
      public static final Comparator<ECKey> AGE_COMPARATOR
      +
      Sorts oldest keys first, newest last.
      +
      +
    • +
    • +
      +

      PUBKEY_COMPARATOR

      +
      public static final Comparator<ECKey> PUBKEY_COMPARATOR
      +
      Compares by extracting pub key as a byte[] and using a lexicographic comparator
      +
      +
    • +
    • +
      +

      priv

      +
      @Nullable +protected final BigInteger priv
      +
      +
    • +
    • +
      +

      pub

      +
      protected final LazyECPoint pub
      +
      +
    • +
    • +
      +

      creationTime

      +
      @Nullable +protected Instant creationTime
      +
      +
    • +
    • +
      +

      keyCrypter

      +
      protected KeyCrypter keyCrypter
      +
      +
    • +
    • +
      +

      encryptedPrivateKey

      +
      protected EncryptedData encryptedPrivateKey
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ECKey

      +
      public ECKey()
      +
      Generates an entirely new keypair. Point compression is used so the resulting public key will be 33 bytes + (32 for the co-ordinate and 1 byte to represent the y bit).
      +
      +
    • +
    • +
      +

      ECKey

      +
      public ECKey(SecureRandom secureRandom)
      +
      Generates an entirely new keypair with the given SecureRandom object. Point compression is used so the + resulting public key will be 33 bytes (32 for the co-ordinate and 1 byte to represent the y bit).
      +
      +
    • +
    • +
      +

      ECKey

      +
      protected ECKey(@Nullable + BigInteger priv, + org.bouncycastle.math.ec.ECPoint pub, + boolean compressed)
      +
      +
    • +
    • +
      +

      ECKey

      +
      protected ECKey(@Nullable + BigInteger priv, + LazyECPoint pub)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      ecDomainParameters

      +
      public static org.bouncycastle.crypto.params.ECDomainParameters ecDomainParameters()
      +
      Return EC parameters for the SECP256K1 curve, in a Bouncy Castle type. + Note that we are migrating to using the build in JDK types for EC parameters, + so we anticipate this method will be deprecated in the near future.
      +
      +
      Returns:
      +
      Elliptic Curve Domain Parameters (Bouncy Castle)
      +
      +
      +
    • +
    • +
      +

      fromASN1

      +
      public static ECKey fromASN1(byte[] asn1privkey)
      +
      Construct an ECKey from an ASN.1 encoded private key. These are produced by OpenSSL and stored by Bitcoin + Core in its wallet. Note that this is slow because it requires an EC point multiply.
      +
      +
    • +
    • +
      +

      fromPrivate

      +
      public static ECKey fromPrivate(BigInteger privKey)
      +
      Creates an ECKey given the private key only. The public key is calculated from it (this is slow). The resulting + public key is compressed.
      +
      +
    • +
    • +
      +

      fromPrivate

      +
      public static ECKey fromPrivate(BigInteger privKey, + boolean compressed)
      +
      Creates an ECKey given the private key only. The public key is calculated from it (this is slow).
      +
      +
      Parameters:
      +
      compressed - Determines whether the resulting ECKey will use a compressed encoding for the public key.
      +
      +
      +
    • +
    • +
      +

      fromPrivate

      +
      public static ECKey fromPrivate(byte[] privKeyBytes)
      +
      Creates an ECKey given the private key only. The public key is calculated from it (this is slow). The resulting + public key is compressed.
      +
      +
    • +
    • +
      +

      fromPrivate

      +
      public static ECKey fromPrivate(byte[] privKeyBytes, + boolean compressed)
      +
      Creates an ECKey given the private key only. The public key is calculated from it (this is slow).
      +
      +
      Parameters:
      +
      compressed - Determines whether the resulting ECKey will use a compressed encoding for the public key.
      +
      +
      +
    • +
    • +
      +

      fromPrivateAndPrecalculatedPublic

      +
      public static ECKey fromPrivateAndPrecalculatedPublic(BigInteger priv, + org.bouncycastle.math.ec.ECPoint pub, + boolean compressed)
      +
      Creates an ECKey that simply trusts the caller to ensure that point is really the result of multiplying the + generator point by the private key. This is used to speed things up when you know you have the right values + already.
      +
      +
      Parameters:
      +
      compressed - Determines whether the resulting ECKey will use a compressed encoding for the public key.
      +
      +
      +
    • +
    • +
      +

      fromPrivateAndPrecalculatedPublic

      +
      public static ECKey fromPrivateAndPrecalculatedPublic(byte[] priv, + byte[] pub)
      +
      Creates an ECKey that simply trusts the caller to ensure that point is really the result of multiplying the + generator point by the private key. This is used to speed things up when you know you have the right values + already. The compression state of the point will be preserved.
      +
      +
    • +
    • +
      +

      fromPublicOnly

      +
      public static ECKey fromPublicOnly(org.bouncycastle.math.ec.ECPoint pub, + boolean compressed)
      +
      Creates an ECKey that cannot be used for signing, only verifying signatures, from the given point.
      +
      +
      Parameters:
      +
      compressed - Determines whether the resulting ECKey will use a compressed encoding for the public key.
      +
      +
      +
    • +
    • +
      +

      fromPublicOnly

      +
      public static ECKey fromPublicOnly(byte[] pub)
      +
      Creates an ECKey that cannot be used for signing, only verifying signatures, from the given encoded point. + The compression state of pub will be preserved.
      +
      +
    • +
    • +
      +

      fromPublicOnly

      +
      public static ECKey fromPublicOnly(ECKey key)
      +
      +
    • +
    • +
      +

      decompress

      +
      public ECKey decompress()
      +
      Returns a copy of this key, but with the public point represented in uncompressed form. Normally you would + never need this: it's for specialised scenarios or when backwards compatibility in encoded form is necessary.
      +
      +
    • +
    • +
      +

      fromEncrypted

      +
      public static ECKey fromEncrypted(EncryptedData encryptedPrivateKey, + KeyCrypter crypter, + byte[] pubKey)
      +
      Constructs a key that has an encrypted private component. The given object wraps encrypted bytes and an + initialization vector. Note that the key will not be decrypted during this call: the returned ECKey is + unusable for signing unless a decryption key is supplied.
      +
      +
    • +
    • +
      +

      isPubKeyOnly

      +
      public boolean isPubKeyOnly()
      +
      Returns true if this key doesn't have unencrypted access to private key bytes. This may be because it was never + given any private key bytes to begin with (a watching key), or because the key is encrypted. You can use + isEncrypted() to tell the cases apart.
      +
      +
    • +
    • +
      +

      hasPrivKey

      +
      public boolean hasPrivKey()
      +
      Returns true if this key has unencrypted access to private key bytes. Does the opposite of + isPubKeyOnly().
      +
      +
    • +
    • +
      +

      isWatching

      +
      public boolean isWatching()
      +
      Returns true if this key is watch only, meaning it has a public key but no private key.
      +
      +
    • +
    • +
      +

      toASN1

      +
      public byte[] toASN1()
      +
      Output this ECKey as an ASN.1 encoded private key, as understood by OpenSSL or used by Bitcoin Core + in its wallet storage format.
      +
      +
      Throws:
      +
      ECKey.MissingPrivateKeyException - if the private key is missing or encrypted.
      +
      +
      +
    • +
    • +
      +

      publicKeyFromPrivate

      +
      public static byte[] publicKeyFromPrivate(BigInteger privKey, + boolean compressed)
      +
      Returns public key bytes from the given private key. To convert a byte array into a BigInteger, + use ByteUtils.bytesToBigInteger(byte[])
      +
      +
    • +
    • +
      +

      publicPointFromPrivate

      +
      public static org.bouncycastle.math.ec.ECPoint publicPointFromPrivate(BigInteger privKey)
      +
      Returns public key point from the given private key. To convert a byte array into a BigInteger, + use ByteUtils.bytesToBigInteger(byte[])
      +
      +
    • +
    • +
      +

      getPubKeyHash

      +
      public byte[] getPubKeyHash()
      +
      Gets the hash160 form of the public key (as seen in addresses).
      +
      +
    • +
    • +
      +

      getPubKey

      +
      public byte[] getPubKey()
      +
      Gets the raw public key value. This appears in transaction scriptSigs. Note that this is not the same + as the pubKeyHash/address.
      +
      +
    • +
    • +
      +

      getPubKeyPoint

      +
      public org.bouncycastle.math.ec.ECPoint getPubKeyPoint()
      +
      Gets the public key in the form of an elliptic curve point object from Bouncy Castle.
      +
      +
    • +
    • +
      +

      getPrivKey

      +
      public BigInteger getPrivKey()
      +
      Gets the private key in the form of an integer field element. The public key is derived by performing EC + point addition this number of times (i.e. point multiplying).
      +
      +
      Throws:
      +
      IllegalStateException - if the private key bytes are not available.
      +
      +
      +
    • +
    • +
      +

      isCompressed

      +
      public boolean isCompressed()
      +
      Returns whether this key is using the compressed form or not. Compressed pubkeys are only 33 bytes, not 64.
      +
      +
    • +
    • +
      +

      toAddress

      +
      public Address toAddress(ScriptType scriptType, + Network network)
      +
      +
    • +
    • +
      +

      sign

      +
      public ECKey.ECDSASignature sign(Sha256Hash input) + throws KeyCrypterException
      +
      Signs the given hash and returns the R and S components as BigIntegers. In the Bitcoin protocol, they are + usually encoded using ASN.1 format, so you want toASN1() + instead. However sometimes the independent components can be useful, for instance, if you're going to do + further EC maths on them.
      +
      +
      Throws:
      +
      KeyCrypterException - if this ECKey doesn't have a private part.
      +
      +
      +
    • +
    • +
      +

      sign

      +
      public ECKey.ECDSASignature sign(Sha256Hash input, + @Nullable + AesKey aesKey) + throws KeyCrypterException
      +
      Signs the given hash and returns the R and S components as BigIntegers. In the Bitcoin protocol, they are + usually encoded using DER format, so you want ECKey.ECDSASignature.encodeToDER() + instead. However sometimes the independent components can be useful, for instance, if you're doing to do further + EC maths on them.
      +
      +
      Parameters:
      +
      aesKey - The AES key to use for decryption of the private key. If null then no decryption is required.
      +
      Throws:
      +
      KeyCrypterException - if there's something wrong with aesKey.
      +
      ECKey.MissingPrivateKeyException - if this key cannot sign because it's pubkey only.
      +
      +
      +
    • +
    • +
      +

      doSign

      +
      protected ECKey.ECDSASignature doSign(Sha256Hash input, + BigInteger privateKeyForSigning)
      +
      +
    • +
    • +
      +

      verify

      +
      public static boolean verify(byte[] data, + ECKey.ECDSASignature signature, + byte[] pub)
      +

      Verifies the given ECDSA signature against the message bytes using the public key bytes.

      +
      +
      Parameters:
      +
      data - Hash of the data to verify.
      +
      signature - ASN.1 encoded signature.
      +
      pub - The public key bytes to use.
      +
      +
      +
    • +
    • +
      +

      verify

      +
      public static boolean verify(byte[] data, + byte[] signature, + byte[] pub) + throws SignatureDecodeException
      +
      Verifies the given ASN.1 encoded ECDSA signature against a hash using the public key.
      +
      +
      Parameters:
      +
      data - Hash of the data to verify.
      +
      signature - ASN.1 encoded signature.
      +
      pub - The public key bytes to use.
      +
      Throws:
      +
      SignatureDecodeException - if the signature is unparseable in some way.
      +
      +
      +
    • +
    • +
      +

      verify

      +
      public boolean verify(byte[] hash, + byte[] signature) + throws SignatureDecodeException
      +
      Verifies the given ASN.1 encoded ECDSA signature against a hash using the public key.
      +
      +
      Parameters:
      +
      hash - Hash of the data to verify.
      +
      signature - ASN.1 encoded signature.
      +
      Throws:
      +
      SignatureDecodeException - if the signature is unparseable in some way.
      +
      +
      +
    • +
    • +
      +

      verify

      +
      public boolean verify(Sha256Hash sigHash, + ECKey.ECDSASignature signature)
      +
      Verifies the given R/S pair (signature) against a hash using the public key.
      +
      +
    • +
    • +
      +

      verifyOrThrow

      +
      public void verifyOrThrow(byte[] hash, + byte[] signature) + throws SignatureDecodeException, +SignatureException
      +
      Verifies the given ASN.1 encoded ECDSA signature against a hash using the public key, and throws an exception + if the signature doesn't match
      +
      +
      Throws:
      +
      SignatureDecodeException - if the signature is unparseable in some way.
      +
      SignatureException - if the signature does not match.
      +
      +
      +
    • +
    • +
      +

      verifyOrThrow

      +
      public void verifyOrThrow(Sha256Hash sigHash, + ECKey.ECDSASignature signature) + throws SignatureException
      +
      Verifies the given R/S pair (signature) against a hash using the public key, and throws an exception + if the signature doesn't match
      +
      +
      Throws:
      +
      SignatureException - if the signature does not match.
      +
      +
      +
    • +
    • +
      +

      isPubKeyCanonical

      +
      public static boolean isPubKeyCanonical(byte[] pubkey)
      +
      Returns true if the given pubkey is canonical, i.e. the correct length taking into account compression.
      +
      +
    • +
    • +
      +

      isPubKeyCompressed

      +
      public static boolean isPubKeyCompressed(byte[] encoded)
      +
      Returns true if the given pubkey is in its compressed form.
      +
      +
    • +
    • +
      +

      signMessage

      +
      @Deprecated +public String signMessage(String message) + throws KeyCrypterException
      +
      Deprecated. +
      use signMessage(String, ScriptType) instead and specify the correct script type
      +
      +
      Signs a text message using the standard Bitcoin messaging signing format and returns the signature as a base64 + encoded string.
      +
      +
      Throws:
      +
      IllegalStateException - if this ECKey does not have the private part.
      +
      KeyCrypterException - if this ECKey is encrypted and no AESKey is provided or it does not decrypt the ECKey.
      +
      +
      +
    • +
    • +
      +

      signMessage

      +
      public String signMessage(String message, + ScriptType scriptType) + throws KeyCrypterException
      +
      Signs a text message using the standard Bitcoin messaging signing format and returns the signature as a base64 + encoded string.
      +
      +
      Throws:
      +
      IllegalStateException - if this ECKey does not have the private part.
      +
      KeyCrypterException - if this ECKey is encrypted and no AESKey is provided or it does not decrypt the ECKey.
      +
      +
      +
    • +
    • +
      +

      signMessage

      +
      @Deprecated +public String signMessage(String message, + @Nullable + AesKey aesKey) + throws KeyCrypterException
      +
      Deprecated. +
      use signMessage(String, AesKey, ScriptType) instead and specify the correct script type
      +
      +
      Signs a text message using the standard Bitcoin messaging signing format and returns the signature as a base64 + encoded string.
      +
      +
      Throws:
      +
      IllegalStateException - if this ECKey does not have the private part.
      +
      KeyCrypterException - if this ECKey is encrypted and no AESKey is provided or it does not decrypt the ECKey.
      +
      +
      +
    • +
    • +
      +

      signMessage

      +
      public String signMessage(String message, + @Nullable + AesKey aesKey, + ScriptType scriptType) + throws KeyCrypterException
      +
      Signs a text message using the standard Bitcoin messaging signing format and returns the signature as a base64 + encoded string.
      +
      +
      Throws:
      +
      IllegalArgumentException - if uncompressed key is used for Segwit scriptType, or unsupported script type is specified
      +
      IllegalStateException - if this ECKey does not have the private part.
      +
      KeyCrypterException - if this ECKey is encrypted and no AESKey is provided or it does not decrypt the ECKey.
      +
      +
      +
    • +
    • +
      +

      signedMessageToKey

      +
      public static ECKey signedMessageToKey(String message, + String signatureBase64) + throws SignatureException
      +
      Given an arbitrary piece of text and a Bitcoin-format message signature encoded in base64, returns an ECKey + containing the public key that was used to sign it. This can then be compared to the expected public key to + determine if the signature was correct. These sorts of signatures are compatible with the Bitcoin-Qt/bitcoind + format generated by signmessage/verifymessage RPCs and GUI menu options. They are intended for humans to verify + their communications with each other, hence the base64 format and the fact that the input is text.
      +
      +
      Parameters:
      +
      message - Some piece of human-readable text.
      +
      signatureBase64 - The Bitcoin-format message signature in base64
      +
      Throws:
      +
      SignatureException - If the public key could not be recovered or if there was a signature format error.
      +
      +
      +
    • +
    • +
      +

      verifyMessage

      +
      @Deprecated +public void verifyMessage(String message, + String signatureBase64) + throws SignatureException
      +
      Deprecated. +
      Use MessageVerifyUtils.verifyMessage(Address, String, String) instead, + which works with different address types, which works also with legacy segwit (P2SH-P2WPKH, 3…) + and native segwit addresses (P2WPKH, bc1…).
      +
      +
      Convenience wrapper around signedMessageToKey(String, String). If the key derived from the + signature is not the same as this one, throws a SignatureException.
      +
      +
      Throws:
      +
      SignatureException
      +
      +
      +
    • +
    • +
      +

      findRecoveryId

      +
      public byte findRecoveryId(Sha256Hash hash, + ECKey.ECDSASignature sig)
      +
      Returns the recovery ID, a byte with value between 0 and 3, inclusive, that specifies which of 4 possible + curve points was used to sign a message. This value is also referred to as "v".
      +
      +
      Throws:
      +
      RuntimeException - if no recovery ID can be found.
      +
      +
      +
    • +
    • +
      +

      recoverFromSignature

      +
      @Nullable +public static ECKey recoverFromSignature(int recId, + ECKey.ECDSASignature sig, + Sha256Hash message, + boolean compressed)
      +

      Given the components of a signature and a selector value, recover and return the public key + that generated the signature according to the algorithm in SEC1v2 section 4.1.6.

      + +

      The recId is an index from 0 to 3 which indicates which of the 4 possible keys is the correct one. Because + the key recovery operation yields multiple potential keys, the correct key must either be stored alongside the + signature, or you must be willing to try each recId in turn until you find one that outputs the key you are + expecting.

      + +

      If this method returns null it means recovery was not possible and recId should be iterated.

      + +

      Given the above two points, a correct usage of this method is inside a for loop from 0 to 3, and if the + output is null OR a key that is not the one you expect, you try again with the next recId.

      +
      +
      Parameters:
      +
      recId - Which possible key to recover (see inline comments for detailed explanation)
      +
      sig - the R and S components of the signature, wrapped.
      +
      message - Hash of the data that was signed.
      +
      compressed - Whether or not the original pubkey was compressed.
      +
      Returns:
      +
      An ECKey containing only the public part, or null if recovery wasn't possible.
      +
      +
      +
    • +
    • +
      +

      getPrivKeyBytes

      +
      public byte[] getPrivKeyBytes()
      +
      Returns a 32 byte array containing the private key.
      +
      +
      Throws:
      +
      ECKey.MissingPrivateKeyException - if the private key bytes are missing/encrypted.
      +
      +
      +
    • +
    • +
      +

      getPrivateKeyEncoded

      +
      public DumpedPrivateKey getPrivateKeyEncoded(Network network)
      +
      Exports the private key in the form used by Bitcoin Core's "dumpprivkey" and "importprivkey" commands. Use + the DumpedPrivateKey.toString() method to get the string.
      +
      +
      Parameters:
      +
      network - The network this key is intended for use on.
      +
      Returns:
      +
      Private key bytes as a DumpedPrivateKey.
      +
      Throws:
      +
      IllegalStateException - if the private key is not available.
      +
      +
      +
    • +
    • +
      +

      getPrivateKeyEncoded

      +
      @Deprecated +public DumpedPrivateKey getPrivateKeyEncoded(NetworkParameters params)
      + +
      Exports the private key in the form used by Bitcoin Core's "dumpprivkey" and "importprivkey" commands. Use + the DumpedPrivateKey.toString() method to get the string.
      +
      +
      Parameters:
      +
      params - The network this key is intended for use on.
      +
      Returns:
      +
      Private key bytes as a DumpedPrivateKey.
      +
      Throws:
      +
      IllegalStateException - if the private key is not available.
      +
      +
      +
    • +
    • +
      +

      getCreationTime

      +
      public Optional<Instant> getCreationTime()
      +
      Returns the creation time of this key, or empty if the key was deserialized from a version that did not store + that data.
      +
      +
      Specified by:
      +
      getCreationTime in interface EncryptableItem
      +
      +
      +
    • +
    • +
      +

      setCreationTime

      +
      public void setCreationTime(Instant creationTime)
      +
      Sets the creation time of this key. This method can be useful when + you have a raw key you are importing from somewhere else.
      +
      +
      Parameters:
      +
      creationTime - creation time of this key
      +
      +
      +
    • +
    • +
      +

      clearCreationTime

      +
      public void clearCreationTime()
      +
      Clears the creation time of this key. This is mainly used deserialization and cloning. Normally you should not + need to use this, as keys should have proper creation times whenever possible.
      +
      +
    • +
    • +
      +

      setCreationTimeSeconds

      +
      @Deprecated +public void setCreationTimeSeconds(long creationTimeSecs)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      encrypt

      +
      public ECKey encrypt(KeyCrypter keyCrypter, + AesKey aesKey) + throws KeyCrypterException
      +
      Create an encrypted private key with the keyCrypter and the AES key supplied. + This method returns a new encrypted key and leaves the original unchanged.
      +
      +
      Parameters:
      +
      keyCrypter - The keyCrypter that specifies exactly how the encrypted bytes are created.
      +
      aesKey - The KeyParameter with the AES encryption key (usually constructed with keyCrypter#deriveKey and cached as it is slow to create).
      +
      Returns:
      +
      encryptedKey
      +
      Throws:
      +
      KeyCrypterException
      +
      +
      +
    • +
    • +
      +

      decrypt

      +
      public ECKey decrypt(KeyCrypter keyCrypter, + AesKey aesKey) + throws KeyCrypterException
      +
      Create a decrypted private key with the keyCrypter and AES key supplied. Note that if the aesKey is wrong, this + has some chance of throwing KeyCrypterException due to the corrupted padding that will result, but it can also + just yield a garbage key.
      +
      +
      Parameters:
      +
      keyCrypter - The keyCrypter that specifies exactly how the decrypted bytes are created.
      +
      aesKey - The KeyParameter with the AES encryption key (usually constructed with keyCrypter#deriveKey and cached).
      +
      Throws:
      +
      KeyCrypterException
      +
      +
      +
    • +
    • +
      +

      decrypt

      +
      public ECKey decrypt(AesKey aesKey) + throws KeyCrypterException
      +
      Create a decrypted private key with AES key. Note that if the AES key is wrong, this + has some chance of throwing KeyCrypterException due to the corrupted padding that will result, but it can also + just yield a garbage key.
      +
      +
      Parameters:
      +
      aesKey - The KeyParameter with the AES encryption key (usually constructed with keyCrypter#deriveKey and cached).
      +
      Throws:
      +
      KeyCrypterException
      +
      +
      +
    • +
    • +
      +

      maybeDecrypt

      +
      public ECKey maybeDecrypt(@Nullable + AesKey aesKey) + throws KeyCrypterException
      +
      Creates decrypted private key if needed.
      +
      +
      Throws:
      +
      KeyCrypterException
      +
      +
      +
    • +
    • +
      +

      encryptionIsReversible

      +
      public static boolean encryptionIsReversible(ECKey originalKey, + ECKey encryptedKey, + KeyCrypter keyCrypter, + AesKey aesKey)
      +

      Check that it is possible to decrypt the key with the keyCrypter and that the original key is returned.

      + +

      Because it is a critical failure if the private keys cannot be decrypted successfully (resulting of loss of all + bitcoins controlled by the private key) you can use this method to check when you *encrypt* a wallet that + it can definitely be decrypted successfully.

      + +

      See Wallet.encrypt(KeyCrypter keyCrypter, AesKey aesKey) for example usage.

      +
      +
      Returns:
      +
      true if the encrypted key can be decrypted back to the original key successfully.
      +
      +
      +
    • +
    • +
      +

      isEncrypted

      +
      public boolean isEncrypted()
      +
      Indicates whether the private key is encrypted (true) or not (false). + A private key is deemed to be encrypted when there is both a KeyCrypter and the encryptedPrivateKey is non-zero.
      +
      +
      Specified by:
      +
      isEncrypted in interface EncryptableItem
      +
      +
      +
    • +
    • +
      +

      getEncryptionType

      +
      @Nullable +public org.bitcoinj.protobuf.wallet.Protos.Wallet.EncryptionType getEncryptionType()
      +
      Description copied from interface: EncryptableItem
      +
      Returns an enum constant describing what algorithm was used to encrypt the key or UNENCRYPTED.
      +
      +
      Specified by:
      +
      getEncryptionType in interface EncryptableItem
      +
      +
      +
    • +
    • +
      +

      getSecretBytes

      +
      @Nullable +public byte[] getSecretBytes()
      +
      A wrapper for getPrivKeyBytes() that returns null if the private key bytes are missing or would have + to be derived (for the HD key case).
      +
      +
      Specified by:
      +
      getSecretBytes in interface EncryptableItem
      +
      +
      +
    • +
    • +
      +

      getEncryptedData

      +
      @Nullable +public EncryptedData getEncryptedData()
      + +
      +
      Specified by:
      +
      getEncryptedData in interface EncryptableItem
      +
      +
      +
    • +
    • +
      +

      getEncryptedPrivateKey

      +
      @Nullable +public EncryptedData getEncryptedPrivateKey()
      +
      Returns the encrypted private key bytes and initialisation vector for this ECKey, or null if the ECKey + is not encrypted.
      +
      +
    • +
    • +
      +

      getKeyCrypter

      +
      @Nullable +public KeyCrypter getKeyCrypter()
      +
      Returns the KeyCrypter that was used to encrypt to encrypt this ECKey. You need this to decrypt the ECKey.
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      toStringWithPrivate

      +
      public String toStringWithPrivate(@Nullable + AesKey aesKey, + Network network)
      +
      Produce a string rendering of the ECKey INCLUDING the private key. + Unless you absolutely need the private key it is better for security reasons to just use toString().
      +
      +
    • +
    • +
      +

      toStringWithPrivate

      +
      @Deprecated +public String toStringWithPrivate(@Nullable + AesKey aesKey, + NetworkParameters params)
      + +
      Produce a string rendering of the ECKey INCLUDING the private key. + Unless you absolutely need the private key it is better for security reasons to just use toString().
      +
      +
    • +
    • +
      +

      getPrivateKeyAsHex

      +
      public String getPrivateKeyAsHex()
      +
      +
    • +
    • +
      +

      getPublicKeyAsHex

      +
      public String getPublicKeyAsHex()
      +
      +
    • +
    • +
      +

      getPrivateKeyAsWiF

      +
      public String getPrivateKeyAsWiF(Network network)
      +
      +
    • +
    • +
      +

      getPrivateKeyAsWiF

      +
      @Deprecated +public String getPrivateKeyAsWiF(NetworkParameters params)
      + +
      +
    • +
    • +
      +

      formatKeyWithAddress

      +
      public void formatKeyWithAddress(boolean includePrivateKeys, + @Nullable + AesKey aesKey, + StringBuilder builder, + Network network, + ScriptType outputScriptType, + @Nullable + String comment)
      +
      +
    • +
    • +
      +

      formatKeyWithAddress

      +
      @Deprecated +public void formatKeyWithAddress(boolean includePrivateKeys, + @Nullable + AesKey aesKey, + StringBuilder builder, + NetworkParameters params, + ScriptType outputScriptType, + @Nullable + String comment)
      + +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/EncodedPrivateKey.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/EncodedPrivateKey.html new file mode 100644 index 000000000..9f700fafd --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/EncodedPrivateKey.html @@ -0,0 +1,274 @@ + + + + +EncodedPrivateKey (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class EncodedPrivateKey

+
+
java.lang.Object +
org.bitcoinj.crypto.EncodedPrivateKey
+
+
+
+
Direct Known Subclasses:
+
BIP38PrivateKey, DumpedPrivateKey
+
+
+
public abstract class EncodedPrivateKey +extends Object
+
Some form of string-encoded private key. This form is useful for noting them down, e.g. on paper wallets.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      network

      +
      protected final Network network
      +
      +
    • +
    • +
      +

      bytes

      +
      protected final byte[] bytes
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      EncodedPrivateKey

      +
      protected EncodedPrivateKey(Network network, + byte[] bytes)
      +
      +
    • +
    • +
      +

      EncodedPrivateKey

      +
      @Deprecated +protected EncodedPrivateKey(NetworkParameters params, + byte[] bytes)
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      network

      +
      public Network network()
      +
      Get the network this data is prefixed with.
      +
      +
      Returns:
      +
      the Network.
      +
      +
      +
    • +
    • +
      +

      getParameters

      +
      @Deprecated +public final NetworkParameters getParameters()
      +
      Deprecated. + +
      +
      +
      Returns:
      +
      network this data is valid for
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/EncryptableItem.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/EncryptableItem.html new file mode 100644 index 000000000..4be6b57bd --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/EncryptableItem.html @@ -0,0 +1,201 @@ + + + + +EncryptableItem (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface EncryptableItem

+
+
+
+
All Known Implementing Classes:
+
DeterministicKey, DeterministicSeed, ECKey
+
+
+
public interface EncryptableItem
+
Provides a uniform way to access something that can be optionally encrypted with a + KeyCrypter, yielding an EncryptedData, and + which can have a creation time associated with it.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Returns the time at which this encryptable item was first created/derived, or empty of unknown.
    +
    +
    default long
    + +
    +
    Deprecated. + +
    +
    + + +
    +
    Returns the initialization vector and encrypted secret bytes, or null if not encrypted.
    +
    +
    org.bitcoinj.protobuf.wallet.Protos.Wallet.EncryptionType
    + +
    +
    Returns an enum constant describing what algorithm was used to encrypt the key or UNENCRYPTED.
    +
    +
    byte[]
    + +
    +
    Returns the raw bytes of the item, if not encrypted, or null if encrypted or the secret is missing.
    +
    +
    boolean
    + +
    +
    Returns whether the item is encrypted or not.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      isEncrypted

      +
      boolean isEncrypted()
      +
      Returns whether the item is encrypted or not. If it is, then getSecretBytes() will return null.
      +
      +
    • +
    • +
      +

      getSecretBytes

      +
      @Nullable +byte[] getSecretBytes()
      +
      Returns the raw bytes of the item, if not encrypted, or null if encrypted or the secret is missing.
      +
      +
    • +
    • +
      +

      getEncryptedData

      +
      @Nullable +EncryptedData getEncryptedData()
      +
      Returns the initialization vector and encrypted secret bytes, or null if not encrypted.
      +
      +
    • +
    • +
      +

      getEncryptionType

      +
      org.bitcoinj.protobuf.wallet.Protos.Wallet.EncryptionType getEncryptionType()
      +
      Returns an enum constant describing what algorithm was used to encrypt the key or UNENCRYPTED.
      +
      +
    • +
    • +
      +

      getCreationTime

      +
      Optional<Instant> getCreationTime()
      +
      Returns the time at which this encryptable item was first created/derived, or empty of unknown.
      +
      +
    • +
    • +
      +

      getCreationTimeSeconds

      +
      @Deprecated +default long getCreationTimeSeconds()
      +
      Deprecated. + +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/EncryptedData.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/EncryptedData.html new file mode 100644 index 000000000..819f33cbc --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/EncryptedData.html @@ -0,0 +1,233 @@ + + + + +EncryptedData (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class EncryptedData

+
+
java.lang.Object +
org.bitcoinj.crypto.EncryptedData
+
+
+
+
public final class EncryptedData +extends Object
+

An instance of EncryptedData is a holder for an initialization vector and encrypted bytes. It is typically + used to hold encrypted private key bytes.

+ +

The initialisation vector is random data that is used to initialise the AES block cipher when the + private key bytes were encrypted. You need these for decryption.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      initialisationVector

      +
      public final byte[] initialisationVector
      +
      +
    • +
    • +
      +

      encryptedBytes

      +
      public final byte[] encryptedBytes
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      EncryptedData

      +
      public EncryptedData(byte[] initialisationVector, + byte[] encryptedBytes)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/HDDerivationException.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/HDDerivationException.html new file mode 100644 index 000000000..d6ad4f8b7 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/HDDerivationException.html @@ -0,0 +1,148 @@ + + + + +HDDerivationException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class HDDerivationException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.crypto.HDDerivationException
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class HDDerivationException +extends RuntimeException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      HDDerivationException

      +
      public HDDerivationException(String message)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/HDKeyDerivation.PublicDeriveMode.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/HDKeyDerivation.PublicDeriveMode.html new file mode 100644 index 000000000..fd1c795a2 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/HDKeyDerivation.PublicDeriveMode.html @@ -0,0 +1,221 @@ + + + + +HDKeyDerivation.PublicDeriveMode (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class HDKeyDerivation.PublicDeriveMode

+
+
java.lang.Object +
java.lang.Enum<HDKeyDerivation.PublicDeriveMode> +
org.bitcoinj.crypto.HDKeyDerivation.PublicDeriveMode
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<HDKeyDerivation.PublicDeriveMode>, Constable
+
+
+
Enclosing class:
+
HDKeyDerivation
+
+
+
public static enum HDKeyDerivation.PublicDeriveMode +extends Enum<HDKeyDerivation.PublicDeriveMode>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static HDKeyDerivation.PublicDeriveMode[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static HDKeyDerivation.PublicDeriveMode valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/HDKeyDerivation.RawKeyBytes.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/HDKeyDerivation.RawKeyBytes.html new file mode 100644 index 000000000..e6c0eac29 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/HDKeyDerivation.RawKeyBytes.html @@ -0,0 +1,171 @@ + + + + +HDKeyDerivation.RawKeyBytes (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class HDKeyDerivation.RawKeyBytes

+
+
java.lang.Object +
org.bitcoinj.crypto.HDKeyDerivation.RawKeyBytes
+
+
+
+
Enclosing class:
+
HDKeyDerivation
+
+
+
public static class HDKeyDerivation.RawKeyBytes +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      keyBytes

      +
      public final byte[] keyBytes
      +
      +
    • +
    • +
      +

      chainCode

      +
      public final byte[] chainCode
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      RawKeyBytes

      +
      public RawKeyBytes(byte[] keyBytes, + byte[] chainCode)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/HDKeyDerivation.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/HDKeyDerivation.html new file mode 100644 index 000000000..9eb8fee30 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/HDKeyDerivation.html @@ -0,0 +1,373 @@ + + + + +HDKeyDerivation (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class HDKeyDerivation

+
+
java.lang.Object +
org.bitcoinj.crypto.HDKeyDerivation
+
+
+
+
public final class HDKeyDerivation +extends Object
+
Implementation of the BIP 32 + deterministic wallet child key generation algorithm.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      MAX_CHILD_DERIVATION_ATTEMPTS

      +
      public static final int MAX_CHILD_DERIVATION_ATTEMPTS
      +
      Child derivation may fail (although with extremely low probability); in such case it is re-attempted. + This is the maximum number of re-attempts (to avoid an infinite loop in case of bugs etc.).
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/HDPath.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/HDPath.html new file mode 100644 index 000000000..e5750b42b --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/HDPath.html @@ -0,0 +1,639 @@ + + + + +HDPath (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class HDPath

+
+ +
+
+
All Implemented Interfaces:
+
Iterable<ChildNumber>, Collection<ChildNumber>, List<ChildNumber>
+
+
+
public class HDPath +extends AbstractList<ChildNumber>
+
HD Key derivation path. HDPath can be used to represent a full path or a relative path. + The hasPrivateKey boolean is used for rendering to String + but (at present) not much else. It defaults to false which is the preferred setting for a relative path. +

+ HDPath is immutable and uses the Collections.UnmodifiableList type internally. +

+ It implements java.util.List<ChildNumber> to ease migration + from the previous implementation. When an HDPath is returned you can treat it as a List<ChildNumber> + where necessary in your code. Although it is recommended to use the HDPath type for clarity and for + access to HDPath-specific functionality. +

+ Note that it is possible for HDPath to be an empty list. +

+ Take note of the overloaded factory methods M() and m(). These can be used to very + concisely create HDPath objects (especially when statically imported.)

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      hasPrivateKey

      +
      protected final boolean hasPrivateKey
      +
      +
    • +
    • +
      +

      unmodifiableList

      +
      protected final List<ChildNumber> unmodifiableList
      +
      +
    • +
    • +
      +

      BIP44_PARENT

      +
      public static final HDPath BIP44_PARENT
      +
      Partial path with BIP44 purpose
      +
      +
    • +
    • +
      +

      BIP84_PARENT

      +
      public static final HDPath BIP84_PARENT
      +
      Partial path with BIP84 purpose
      +
      +
    • +
    • +
      +

      BIP86_PARENT

      +
      public static final HDPath BIP86_PARENT
      +
      Partial path with BIP86 purpose
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      HDPath

      +
      public HDPath(boolean hasPrivateKey, + List<ChildNumber> list)
      +
      Constructs a path for a public or private key. Should probably be a private constructor.
      +
      +
      Parameters:
      +
      hasPrivateKey - Whether it is a path to a private key or not
      +
      list - List of children in the path
      +
      +
      +
    • +
    • +
      +

      HDPath

      +
      @Deprecated +public HDPath(List<ChildNumber> list)
      +
      Deprecated. +
      Use M(List) or m(List) instead
      +
      +
      Constructs a path for a public key.
      +
      +
      Parameters:
      +
      list - List of children in the path
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      deserialize

      +
      public static HDPath deserialize(List<Integer> integerList)
      +
      Deserialize a list of integers into an HDPath (internal use only)
      +
      +
      Parameters:
      +
      integerList - A list of integers (what we use in ProtoBuf for an HDPath)
      +
      Returns:
      +
      a deserialized HDPath (hasPrivateKey is false/unknown)
      +
      +
      +
    • +
    • +
      +

      M

      +
      public static HDPath M(List<ChildNumber> list)
      +
      Returns a path for a public key.
      +
      +
      Parameters:
      +
      list - List of children in the path
      +
      +
      +
    • +
    • +
      +

      M

      +
      public static HDPath M()
      +
      Returns an empty path for a public key.
      +
      +
    • +
    • +
      +

      M

      +
      public static HDPath M(ChildNumber childNumber)
      +
      Returns a path for a public key.
      +
      +
      Parameters:
      +
      childNumber - Single child in path
      +
      +
      +
    • +
    • +
      +

      M

      +
      public static HDPath M(ChildNumber... children)
      +
      Returns a path for a public key.
      +
      +
      Parameters:
      +
      children - Children in the path
      +
      +
      +
    • +
    • +
      +

      m

      +
      public static HDPath m(List<ChildNumber> list)
      +
      Returns a path for a private key.
      +
      +
      Parameters:
      +
      list - List of children in the path
      +
      +
      +
    • +
    • +
      +

      m

      +
      public static HDPath m()
      +
      Returns an empty path for a private key.
      +
      +
    • +
    • +
      +

      m

      +
      public static HDPath m(ChildNumber childNumber)
      +
      Returns a path for a private key.
      +
      +
      Parameters:
      +
      childNumber - Single child in path
      +
      +
      +
    • +
    • +
      +

      m

      +
      public static HDPath m(ChildNumber... children)
      +
      Returns a path for a private key.
      +
      +
      Parameters:
      +
      children - Children in the path
      +
      +
      +
    • +
    • +
      +

      parsePath

      +
      public static HDPath parsePath(@Nonnull + String path)
      +
      Create an HDPath from a path string. The path string is a human-friendly representation of the deterministic path. For example: + + "44H / 0H / 0H / 1 / 1" + + Where a letter "H" means hardened key. Spaces are ignored.
      +
      +
    • +
    • +
      +

      hasPrivateKey

      +
      public boolean hasPrivateKey()
      +
      Is this a path to a private key?
      +
      +
      Returns:
      +
      true if yes, false if no or a partial path
      +
      +
      +
    • +
    • +
      +

      extend

      +
      public HDPath extend(ChildNumber child1, + ChildNumber... children)
      +
      Extend the path by appending additional ChildNumber objects.
      +
      +
      Parameters:
      +
      child1 - the first child to append
      +
      children - zero or more additional children to append
      +
      Returns:
      +
      A new immutable path
      +
      +
      +
    • +
    • +
      +

      extend

      +
      public HDPath extend(HDPath path2)
      +
      Extend the path by appending a relative path.
      +
      +
      Parameters:
      +
      path2 - the relative path to append
      +
      Returns:
      +
      A new immutable path
      +
      +
      +
    • +
    • +
      +

      extend

      +
      public HDPath extend(List<ChildNumber> path2)
      +
      Extend the path by appending a relative path.
      +
      +
      Parameters:
      +
      path2 - the relative path to append
      +
      Returns:
      +
      A new immutable path
      +
      +
      +
    • +
    • +
      +

      list

      +
      public List<ChildNumber> list()
      +
      Return a simple list of ChildNumber
      +
      +
      Returns:
      +
      an unmodifiable list of ChildNumber
      +
      +
      +
    • +
    • +
      +

      parent

      +
      public HDPath parent()
      +
      Return the parent path. +

      + Note that this method defines the parent of a root path as the empty path and the parent + of the empty path as the empty path. This behavior is what one would expect + of an unmodifiable, copy-on-modify list. If you need to check for edge cases, you can use + AbstractCollection.isEmpty() before or after using HDPath#parent()

      +
      +
      Returns:
      +
      parent path (which can be empty -- see above)
      +
      +
      +
    • +
    • +
      +

      ancestors

      +
      public List<HDPath> ancestors()
      +
      Return a list of all ancestors of this path
      +
      +
      Returns:
      +
      unmodifiable list of ancestors
      +
      +
      +
    • +
    • +
      +

      ancestors

      +
      public List<HDPath> ancestors(boolean includeSelf)
      +
      Return a list of all ancestors of this path
      +
      +
      Parameters:
      +
      includeSelf - true if include path for self
      +
      Returns:
      +
      unmodifiable list of ancestors
      +
      +
      +
    • +
    • +
      +

      get

      +
      public ChildNumber get(int index)
      +
      +
      Specified by:
      +
      get in interface List<ChildNumber>
      +
      Specified by:
      +
      get in class AbstractList<ChildNumber>
      +
      +
      +
    • +
    • +
      +

      size

      +
      public int size()
      +
      +
      Specified by:
      +
      size in interface Collection<ChildNumber>
      +
      Specified by:
      +
      size in interface List<ChildNumber>
      +
      Specified by:
      +
      size in class AbstractCollection<ChildNumber>
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class AbstractCollection<ChildNumber>
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/HDUtils.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/HDUtils.html new file mode 100644 index 000000000..abb8c34f1 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/HDUtils.html @@ -0,0 +1,161 @@ + + + + +HDUtils (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class HDUtils

+
+
java.lang.Object +
org.bitcoinj.crypto.HDUtils
+
+
+
+
public final class HDUtils +extends Object
+
Static utilities used in BIP 32 Hierarchical Deterministic Wallets (HDW).
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      HDUtils

      +
      public HDUtils()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      hmacSha512

      +
      public static byte[] hmacSha512(byte[] key, + byte[] data)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypter.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypter.html new file mode 100644 index 000000000..07aeb3289 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypter.html @@ -0,0 +1,205 @@ + + + + +KeyCrypter (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface KeyCrypter

+
+
+
+
All Known Implementing Classes:
+
KeyCrypterScrypt
+
+
+
public interface KeyCrypter
+

A KeyCrypter can be used to encrypt and decrypt a message. The sequence of events to encrypt and then decrypt + a message are as follows:

+ +

(1) Ask the user for a password. deriveKey() is then called to create an KeyParameter. This contains the AES + key that will be used for encryption.

+

(2) Encrypt the message using encrypt(), providing the message bytes and the KeyParameter from (1). This returns + an EncryptedData which contains the encryptedPrivateKey bytes and an initialisation vector.

+

(3) To decrypt an EncryptedData, repeat step (1) to get a KeyParameter, then call decrypt().

+ +

There can be different algorithms used for encryption/ decryption so the getUnderstoodEncryptionType is used + to determine whether any given KeyCrypter can understand the type of encrypted data you have.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    byte[]
    +
    decrypt(EncryptedData encryptedBytesToDecode, + AesKey aesKey)
    +
    +
    Decrypt the provided encrypted bytes, converting them into unencrypted bytes.
    +
    + + +
    +
    Create an AESKey (which typically contains an AES key)
    +
    + +
    encrypt(byte[] plainBytes, + AesKey aesKey)
    +
    +
    Encrypt the supplied bytes, converting them into ciphertext.
    +
    +
    org.bitcoinj.protobuf.wallet.Protos.Wallet.EncryptionType
    + +
    +
    Return the EncryptionType enum value which denotes the type of encryption/ decryption that this KeyCrypter + can understand.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getUnderstoodEncryptionType

      +
      org.bitcoinj.protobuf.wallet.Protos.Wallet.EncryptionType getUnderstoodEncryptionType()
      +
      Return the EncryptionType enum value which denotes the type of encryption/ decryption that this KeyCrypter + can understand.
      +
      +
    • +
    • +
      +

      deriveKey

      +
      AesKey deriveKey(CharSequence password) + throws KeyCrypterException
      +
      Create an AESKey (which typically contains an AES key)
      +
      +
      Parameters:
      +
      password -
      +
      Returns:
      +
      AESKey which typically contains the AES key to use for encrypting and decrypting
      +
      Throws:
      +
      KeyCrypterException
      +
      +
      +
    • +
    • +
      +

      decrypt

      +
      byte[] decrypt(EncryptedData encryptedBytesToDecode, + AesKey aesKey) + throws KeyCrypterException
      +
      Decrypt the provided encrypted bytes, converting them into unencrypted bytes.
      +
      +
      Throws:
      +
      KeyCrypterException - if decryption was unsuccessful.
      +
      +
      +
    • +
    • +
      +

      encrypt

      +
      EncryptedData encrypt(byte[] plainBytes, + AesKey aesKey) + throws KeyCrypterException
      +
      Encrypt the supplied bytes, converting them into ciphertext.
      +
      +
      Returns:
      +
      encryptedPrivateKey An encryptedPrivateKey containing the encrypted bytes and an initialisation vector.
      +
      Throws:
      +
      KeyCrypterException - if encryption was unsuccessful
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypterException.InvalidCipherText.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypterException.InvalidCipherText.html new file mode 100644 index 000000000..712bd0bf4 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypterException.InvalidCipherText.html @@ -0,0 +1,175 @@ + + + + +KeyCrypterException.InvalidCipherText (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class KeyCrypterException.InvalidCipherText

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
KeyCrypterException
+
+
+
public static class KeyCrypterException.InvalidCipherText +extends KeyCrypterException
+
This exception is thrown when a private key or seed is decrypted, the decrypted message is damaged + (e.g. the padding is damaged). This likely means the wrong decryption key has been used.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidCipherText

      +
      public InvalidCipherText(String message)
      +
      +
    • +
    • +
      +

      InvalidCipherText

      +
      public InvalidCipherText(String message, + Throwable throwable)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypterException.PublicPrivateMismatch.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypterException.PublicPrivateMismatch.html new file mode 100644 index 000000000..1ed02650a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypterException.PublicPrivateMismatch.html @@ -0,0 +1,175 @@ + + + + +KeyCrypterException.PublicPrivateMismatch (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class KeyCrypterException.PublicPrivateMismatch

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.crypto.KeyCrypterException +
org.bitcoinj.crypto.KeyCrypterException.PublicPrivateMismatch
+
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
KeyCrypterException
+
+
+
public static class KeyCrypterException.PublicPrivateMismatch +extends KeyCrypterException
+
This exception is thrown when a private key or seed is decrypted, it doesn't match its public key any + more. This likely means the wrong decryption key has been used.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PublicPrivateMismatch

      +
      public PublicPrivateMismatch(String message)
      +
      +
    • +
    • +
      +

      PublicPrivateMismatch

      +
      public PublicPrivateMismatch(String message, + Throwable throwable)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypterException.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypterException.html new file mode 100644 index 000000000..111123694 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypterException.html @@ -0,0 +1,193 @@ + + + + +KeyCrypterException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class KeyCrypterException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.crypto.KeyCrypterException
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
KeyCrypterException.InvalidCipherText, KeyCrypterException.PublicPrivateMismatch
+
+
+
public class KeyCrypterException +extends RuntimeException
+

Exception to provide the following:

+
    +
  • Provision of encryption / decryption exception
  • +
+

This base exception acts as a general failure mode not attributable to a specific cause (other than + that reported in the exception message). Since this is in English, it may not be worth reporting directly + to the user other than as part of a "general failure to parse" response.

+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      KeyCrypterException

      +
      public KeyCrypterException(String message)
      +
      +
    • +
    • +
      +

      KeyCrypterException

      +
      public KeyCrypterException(String message, + Throwable throwable)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypterScrypt.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypterScrypt.html new file mode 100644 index 000000000..179efb144 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/KeyCrypterScrypt.html @@ -0,0 +1,435 @@ + + + + +KeyCrypterScrypt (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class KeyCrypterScrypt

+
+
java.lang.Object +
org.bitcoinj.crypto.KeyCrypterScrypt
+
+
+
+
All Implemented Interfaces:
+
KeyCrypter
+
+
+
public class KeyCrypterScrypt +extends Object +implements KeyCrypter
+

This class encrypts and decrypts byte arrays and strings using scrypt as the + key derivation function and AES for the encryption.

+ +

You can use this class to:

+ +

1) Using a user password, create an AES key that can encrypt and decrypt your private keys. + To convert the password to the AES key, scrypt is used. This is an algorithm resistant + to brute force attacks. You can use the ScryptParameters to tune how difficult you + want this to be generation to be.

+ +

2) Using the AES Key generated above, you then can encrypt and decrypt any bytes using + the AES symmetric cipher. Eight bytes of salt is used to prevent dictionary attacks.

+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static final int
    + +
    +
    The size of an AES block in bytes.
    +
    +
    static final int
    + +
    +
    Key length in bytes.
    +
    +
    static final int
    + +
    +
    The length of the salt used.
    +
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Encryption/Decryption using default parameters and a random salt.
    +
    +
    KeyCrypterScrypt(int iterations)
    +
    +
    Encryption/Decryption using custom number of iterations parameters and a random salt.
    +
    +
    KeyCrypterScrypt(org.bitcoinj.protobuf.wallet.Protos.ScryptParameters scryptParameters)
    +
    +
    Encryption/ Decryption using specified Scrypt parameters.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    byte[]
    +
    decrypt(EncryptedData dataToDecrypt, + AesKey aesKey)
    +
    +
    Decrypt bytes previously encrypted with this class.
    +
    + + +
    +
    Generate AES key.
    +
    + +
    encrypt(byte[] plainBytes, + AesKey aesKey)
    +
    +
    Password based encryption using AES - CBC 256 bits.
    +
    +
    boolean
    + +
     
    +
    org.bitcoinj.protobuf.wallet.Protos.ScryptParameters
    + +
     
    +
    org.bitcoinj.protobuf.wallet.Protos.Wallet.EncryptionType
    + +
    +
    Return the EncryptionType enum value which denotes the type of encryption/ decryption that this KeyCrypter + can understand.
    +
    +
    int
    + +
     
    +
    static byte[]
    + +
    +
    Returns SALT_LENGTH (8) bytes of random data
    +
    + + +
     
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      KEY_LENGTH

      +
      public static final int KEY_LENGTH
      +
      Key length in bytes.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      BLOCK_LENGTH

      +
      public static final int BLOCK_LENGTH
      +
      The size of an AES block in bytes. + This is also the length of the initialisation vector.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      SALT_LENGTH

      +
      public static final int SALT_LENGTH
      +
      The length of the salt used.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      KeyCrypterScrypt

      +
      public KeyCrypterScrypt()
      +
      Encryption/Decryption using default parameters and a random salt.
      +
      +
    • +
    • +
      +

      KeyCrypterScrypt

      +
      public KeyCrypterScrypt(int iterations)
      +
      Encryption/Decryption using custom number of iterations parameters and a random salt. + As of August 2016, a useful value for mobile devices is 4096 (derivation takes about 1 second).
      +
      +
      Parameters:
      +
      iterations - number of scrypt iterations
      +
      +
      +
    • +
    • +
      +

      KeyCrypterScrypt

      +
      public KeyCrypterScrypt(org.bitcoinj.protobuf.wallet.Protos.ScryptParameters scryptParameters)
      +
      Encryption/ Decryption using specified Scrypt parameters.
      +
      +
      Parameters:
      +
      scryptParameters - ScryptParameters to use
      +
      Throws:
      +
      NullPointerException - if the scryptParameters or any of its N, R or P is null.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      randomSalt

      +
      public static byte[] randomSalt()
      +
      Returns SALT_LENGTH (8) bytes of random data
      +
      +
    • +
    • +
      +

      deriveKey

      +
      public AesKey deriveKey(CharSequence password) + throws KeyCrypterException
      +
      Generate AES key. + + This is a very slow operation compared to encrypt/ decrypt so it is normally worth caching the result.
      +
      +
      Specified by:
      +
      deriveKey in interface KeyCrypter
      +
      Parameters:
      +
      password - The password to use in key generation
      +
      Returns:
      +
      The AesKey containing the created AES key
      +
      Throws:
      +
      KeyCrypterException
      +
      +
      +
    • +
    • +
      +

      encrypt

      +
      public EncryptedData encrypt(byte[] plainBytes, + AesKey aesKey) + throws KeyCrypterException
      +
      Password based encryption using AES - CBC 256 bits.
      +
      +
      Specified by:
      +
      encrypt in interface KeyCrypter
      +
      Returns:
      +
      encryptedPrivateKey An encryptedPrivateKey containing the encrypted bytes and an initialisation vector.
      +
      Throws:
      +
      KeyCrypterException - if encryption was unsuccessful
      +
      +
      +
    • +
    • +
      +

      decrypt

      +
      public byte[] decrypt(EncryptedData dataToDecrypt, + AesKey aesKey) + throws KeyCrypterException
      +
      Decrypt bytes previously encrypted with this class.
      +
      +
      Specified by:
      +
      decrypt in interface KeyCrypter
      +
      Parameters:
      +
      dataToDecrypt - The data to decrypt
      +
      aesKey - The AES key to use for decryption
      +
      Returns:
      +
      The decrypted bytes
      +
      Throws:
      +
      KeyCrypterException - if bytes could not be decrypted
      +
      +
      +
    • +
    • +
      +

      getScryptParameters

      +
      public org.bitcoinj.protobuf.wallet.Protos.ScryptParameters getScryptParameters()
      +
      +
    • +
    • +
      +

      getUnderstoodEncryptionType

      +
      public org.bitcoinj.protobuf.wallet.Protos.Wallet.EncryptionType getUnderstoodEncryptionType()
      +
      Return the EncryptionType enum value which denotes the type of encryption/ decryption that this KeyCrypter + can understand.
      +
      +
      Specified by:
      +
      getUnderstoodEncryptionType in interface KeyCrypter
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/LazyECPoint.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/LazyECPoint.html new file mode 100644 index 000000000..6eefbbae7 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/LazyECPoint.html @@ -0,0 +1,515 @@ + + + + +LazyECPoint (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class LazyECPoint

+
+
java.lang.Object +
org.bitcoinj.crypto.LazyECPoint
+
+
+
+
public class LazyECPoint +extends Object
+
A wrapper around a SECP256K1 ECPoint that delays decoding of the point for as long as possible. This is useful because point + encode/decode in Bouncy Castle is quite slow especially on Dalvik, as it often involves decompression/recompression.
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    LazyECPoint(byte[] bits)
    +
    +
    Construct a LazyECPoint from a public key.
    +
    +
    LazyECPoint(org.bouncycastle.math.ec.ECCurve curve, + byte[] bits)
    +
    +
    Deprecated. + +
    +
    +
    LazyECPoint(org.bouncycastle.math.ec.ECPoint point, + boolean compressed)
    +
    +
    Construct a LazyECPoint from an already decoded point.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    org.bouncycastle.math.ec.ECPoint
    +
    add(org.bouncycastle.math.ec.ECPoint b)
    +
     
    + + +
    +
    Returns a compressed version of this elliptic curve point.
    +
    + + +
    +
    Returns a decompressed version of this elliptic curve point.
    +
    +
    boolean
    + +
     
    +
    boolean
    +
    equals(org.bouncycastle.math.ec.ECPoint other)
    +
     
    +
    org.bouncycastle.math.ec.ECPoint
    +
    get()
    +
     
    +
    org.bouncycastle.math.ec.ECFieldElement
    + +
     
    +
    org.bouncycastle.math.ec.ECFieldElement
    + +
     
    +
    org.bouncycastle.math.ec.ECCurve
    + +
     
    +
    org.bouncycastle.math.ec.ECPoint
    + +
     
    +
    byte[]
    + +
     
    +
    byte[]
    +
    getEncoded(boolean compressed)
    +
     
    +
    org.bouncycastle.math.ec.ECFieldElement
    + +
     
    +
    org.bouncycastle.math.ec.ECFieldElement
    + +
     
    +
    org.bouncycastle.math.ec.ECFieldElement
    + +
     
    +
    org.bouncycastle.math.ec.ECFieldElement
    + +
     
    +
    org.bouncycastle.math.ec.ECFieldElement
    +
    getZCoord(int index)
    +
     
    +
    org.bouncycastle.math.ec.ECFieldElement[]
    + +
     
    +
    int
    + +
     
    +
    boolean
    + +
     
    +
    boolean
    + +
     
    +
    boolean
    + +
     
    +
    boolean
    + +
     
    +
    org.bouncycastle.math.ec.ECPoint
    + +
     
    +
    org.bouncycastle.math.ec.ECPoint
    + +
     
    +
    org.bouncycastle.math.ec.ECPoint
    + +
     
    +
    org.bouncycastle.math.ec.ECPoint
    +
    scaleX(org.bouncycastle.math.ec.ECFieldElement scale)
    +
     
    +
    org.bouncycastle.math.ec.ECPoint
    +
    scaleY(org.bouncycastle.math.ec.ECFieldElement scale)
    +
     
    +
    org.bouncycastle.math.ec.ECPoint
    +
    subtract(org.bouncycastle.math.ec.ECPoint b)
    +
     
    +
    org.bouncycastle.math.ec.ECPoint
    + +
     
    +
    org.bouncycastle.math.ec.ECPoint
    +
    timesPow2(int e)
    +
     
    +
    org.bouncycastle.math.ec.ECPoint
    + +
     
    +
    org.bouncycastle.math.ec.ECPoint
    +
    twicePlus(org.bouncycastle.math.ec.ECPoint b)
    +
     
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      LazyECPoint

      +
      public LazyECPoint(byte[] bits)
      +
      Construct a LazyECPoint from a public key. Due to the delayed decoding of the point the validation of the + public key is delayed too, e.g. until a getter is called.
      +
      +
      Parameters:
      +
      bits - public key bytes
      +
      +
      +
    • +
    • +
      +

      LazyECPoint

      +
      @Deprecated +public LazyECPoint(org.bouncycastle.math.ec.ECCurve curve, + byte[] bits)
      +
      Deprecated. + +
      +
      Construct a LazyECPoint from a public key. Due to the delayed decoding of the point the validation of the + public key is delayed too, e.g. until a getter is called.
      +
      +
      Parameters:
      +
      curve - a curve the point is on
      +
      bits - public key bytes
      +
      +
      +
    • +
    • +
      +

      LazyECPoint

      +
      public LazyECPoint(org.bouncycastle.math.ec.ECPoint point, + boolean compressed)
      +
      Construct a LazyECPoint from an already decoded point.
      +
      +
      Parameters:
      +
      point - the wrapped point
      +
      compressed - true if the represented public key is compressed
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      compress

      +
      public LazyECPoint compress()
      +
      Returns a compressed version of this elliptic curve point. Returns the same point if it's already compressed. + See the ECKey class docs for a discussion of point compression.
      +
      +
    • +
    • +
      +

      decompress

      +
      public LazyECPoint decompress()
      +
      Returns a decompressed version of this elliptic curve point. Returns the same point if it's already compressed. + See the ECKey class docs for a discussion of point compression.
      +
      +
    • +
    • +
      +

      get

      +
      public org.bouncycastle.math.ec.ECPoint get()
      +
      +
    • +
    • +
      +

      getEncoded

      +
      public byte[] getEncoded()
      +
      +
    • +
    • +
      +

      getDetachedPoint

      +
      public org.bouncycastle.math.ec.ECPoint getDetachedPoint()
      +
      +
    • +
    • +
      +

      isInfinity

      +
      public boolean isInfinity()
      +
      +
    • +
    • +
      +

      timesPow2

      +
      public org.bouncycastle.math.ec.ECPoint timesPow2(int e)
      +
      +
    • +
    • +
      +

      getYCoord

      +
      public org.bouncycastle.math.ec.ECFieldElement getYCoord()
      +
      +
    • +
    • +
      +

      getZCoords

      +
      public org.bouncycastle.math.ec.ECFieldElement[] getZCoords()
      +
      +
    • +
    • +
      +

      isNormalized

      +
      public boolean isNormalized()
      +
      +
    • +
    • +
      +

      isCompressed

      +
      public boolean isCompressed()
      +
      +
    • +
    • +
      +

      multiply

      +
      public org.bouncycastle.math.ec.ECPoint multiply(BigInteger k)
      +
      +
    • +
    • +
      +

      subtract

      +
      public org.bouncycastle.math.ec.ECPoint subtract(org.bouncycastle.math.ec.ECPoint b)
      +
      +
    • +
    • +
      +

      isValid

      +
      public boolean isValid()
      +
      +
    • +
    • +
      +

      scaleY

      +
      public org.bouncycastle.math.ec.ECPoint scaleY(org.bouncycastle.math.ec.ECFieldElement scale)
      +
      +
    • +
    • +
      +

      getXCoord

      +
      public org.bouncycastle.math.ec.ECFieldElement getXCoord()
      +
      +
    • +
    • +
      +

      scaleX

      +
      public org.bouncycastle.math.ec.ECPoint scaleX(org.bouncycastle.math.ec.ECFieldElement scale)
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(org.bouncycastle.math.ec.ECPoint other)
      +
      +
    • +
    • +
      +

      negate

      +
      public org.bouncycastle.math.ec.ECPoint negate()
      +
      +
    • +
    • +
      +

      threeTimes

      +
      public org.bouncycastle.math.ec.ECPoint threeTimes()
      +
      +
    • +
    • +
      +

      getZCoord

      +
      public org.bouncycastle.math.ec.ECFieldElement getZCoord(int index)
      +
      +
    • +
    • +
      +

      getEncoded

      +
      public byte[] getEncoded(boolean compressed)
      +
      +
    • +
    • +
      +

      add

      +
      public org.bouncycastle.math.ec.ECPoint add(org.bouncycastle.math.ec.ECPoint b)
      +
      +
    • +
    • +
      +

      twicePlus

      +
      public org.bouncycastle.math.ec.ECPoint twicePlus(org.bouncycastle.math.ec.ECPoint b)
      +
      +
    • +
    • +
      +

      getCurve

      +
      public org.bouncycastle.math.ec.ECCurve getCurve()
      +
      +
    • +
    • +
      +

      normalize

      +
      public org.bouncycastle.math.ec.ECPoint normalize()
      +
      +
    • +
    • +
      +

      getY

      +
      public org.bouncycastle.math.ec.ECFieldElement getY()
      +
      +
    • +
    • +
      +

      twice

      +
      public org.bouncycastle.math.ec.ECPoint twice()
      +
      +
    • +
    • +
      +

      getAffineYCoord

      +
      public org.bouncycastle.math.ec.ECFieldElement getAffineYCoord()
      +
      +
    • +
    • +
      +

      getAffineXCoord

      +
      public org.bouncycastle.math.ec.ECFieldElement getAffineXCoord()
      +
      +
    • +
    • +
      +

      getX

      +
      public org.bouncycastle.math.ec.ECFieldElement getX()
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/LinuxSecureRandom.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/LinuxSecureRandom.html new file mode 100644 index 000000000..7f2c8a29f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/LinuxSecureRandom.html @@ -0,0 +1,209 @@ + + + + +LinuxSecureRandom (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class LinuxSecureRandom

+
+
java.lang.Object +
java.security.SecureRandomSpi +
org.bitcoinj.crypto.LinuxSecureRandom
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class LinuxSecureRandom +extends SecureRandomSpi
+
A SecureRandom implementation that is able to override the standard JVM provided implementation, and which simply + serves random numbers by reading /dev/urandom. That is, it delegates to the kernel on UNIX systems and is unusable on + other platforms. Attempts to manually set the seed are ignored. There is no difference between seed bytes and + non-seed bytes, they are all from the same source.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      LinuxSecureRandom

      +
      public LinuxSecureRandom()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicCode.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicCode.html new file mode 100644 index 000000000..17851ad8e --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicCode.html @@ -0,0 +1,326 @@ + + + + +MnemonicCode (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MnemonicCode

+
+
java.lang.Object +
org.bitcoinj.crypto.MnemonicCode
+
+
+
+
public class MnemonicCode +extends Object
+
A MnemonicCode object may be used to convert between binary seed values and + lists of words per the BIP 39 + specification
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicException.MnemonicChecksumException.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicException.MnemonicChecksumException.html new file mode 100644 index 000000000..ff1f07a90 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicException.MnemonicChecksumException.html @@ -0,0 +1,162 @@ + + + + +MnemonicException.MnemonicChecksumException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MnemonicException.MnemonicChecksumException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.crypto.MnemonicException +
org.bitcoinj.crypto.MnemonicException.MnemonicChecksumException
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
MnemonicException
+
+
+
public static class MnemonicException.MnemonicChecksumException +extends MnemonicException
+
Thrown when a list of MnemonicCode words fails the checksum check.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MnemonicChecksumException

      +
      public MnemonicChecksumException()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicException.MnemonicLengthException.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicException.MnemonicLengthException.html new file mode 100644 index 000000000..1c3bfdc23 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicException.MnemonicLengthException.html @@ -0,0 +1,162 @@ + + + + +MnemonicException.MnemonicLengthException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MnemonicException.MnemonicLengthException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.crypto.MnemonicException +
org.bitcoinj.crypto.MnemonicException.MnemonicLengthException
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
MnemonicException
+
+
+
public static class MnemonicException.MnemonicLengthException +extends MnemonicException
+
Thrown when an argument to MnemonicCode is the wrong length.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MnemonicLengthException

      +
      public MnemonicLengthException(String msg)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicException.MnemonicWordException.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicException.MnemonicWordException.html new file mode 100644 index 000000000..e70b22230 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicException.MnemonicWordException.html @@ -0,0 +1,194 @@ + + + + +MnemonicException.MnemonicWordException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MnemonicException.MnemonicWordException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.crypto.MnemonicException +
org.bitcoinj.crypto.MnemonicException.MnemonicWordException
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
MnemonicException
+
+
+
public static class MnemonicException.MnemonicWordException +extends MnemonicException
+
Thrown when a word is encountered which is not in the MnemonicCode's word list.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      badWord

      +
      public final String badWord
      +
      Contains the word that was not found in the word list.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MnemonicWordException

      +
      public MnemonicWordException(String badWord)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicException.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicException.html new file mode 100644 index 000000000..d5a633564 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/MnemonicException.html @@ -0,0 +1,186 @@ + + + + +MnemonicException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MnemonicException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.crypto.MnemonicException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
MnemonicException.MnemonicChecksumException, MnemonicException.MnemonicLengthException, MnemonicException.MnemonicWordException
+
+
+
public class MnemonicException +extends Exception
+
Exceptions thrown by the MnemonicCode module.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MnemonicException

      +
      public MnemonicException()
      +
      +
    • +
    • +
      +

      MnemonicException

      +
      public MnemonicException(String msg)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/PBKDF2SHA512.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/PBKDF2SHA512.html new file mode 100644 index 000000000..f7a12fb8c --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/PBKDF2SHA512.html @@ -0,0 +1,187 @@ + + + + +PBKDF2SHA512 (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PBKDF2SHA512

+
+
java.lang.Object +
org.bitcoinj.crypto.PBKDF2SHA512
+
+
+
+
public class PBKDF2SHA512 +extends Object
+
This is a clean-room implementation of PBKDF2 using RFC 2898 as a reference. + Modified to use SHA-512 by Ken Sedgwick (ken@bonsai.com)
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PBKDF2SHA512

      +
      public PBKDF2SHA512()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      derive

      +
      public static byte[] derive(String P, + String S, + int c, + int dkLen)
      +
      Derive a key using PBKDF2-SHA512
      +
      +
      Parameters:
      +
      P - password
      +
      S - salt
      +
      c - iteration count, a positive integer
      +
      dkLen - intended length in octets of the derived key, a positive integer
      +
      Returns:
      +
      derived key
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/SignatureDecodeException.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/SignatureDecodeException.html new file mode 100644 index 000000000..09bad9ea8 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/SignatureDecodeException.html @@ -0,0 +1,172 @@ + + + + +SignatureDecodeException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SignatureDecodeException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.crypto.SignatureDecodeException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class SignatureDecodeException +extends Exception
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SignatureDecodeException

      +
      public SignatureDecodeException()
      +
      +
    • +
    • +
      +

      SignatureDecodeException

      +
      public SignatureDecodeException(String message)
      +
      +
    • +
    • +
      +

      SignatureDecodeException

      +
      public SignatureDecodeException(Throwable cause)
      +
      +
    • +
    • +
      +

      SignatureDecodeException

      +
      public SignatureDecodeException(String message, + Throwable cause)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/TransactionSignature.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/TransactionSignature.html new file mode 100644 index 000000000..2431aca6d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/TransactionSignature.html @@ -0,0 +1,358 @@ + + + + +TransactionSignature (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TransactionSignature

+
+
java.lang.Object +
org.bitcoinj.crypto.ECKey.ECDSASignature +
org.bitcoinj.crypto.TransactionSignature
+
+
+
+
+
public class TransactionSignature +extends ECKey.ECDSASignature
+
A TransactionSignature wraps an ECKey.ECDSASignature and adds methods for handling + the additional SIGHASH mode byte that is used.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      sighashFlags

      +
      public final int sighashFlags
      +
      A byte that controls which parts of a transaction are signed. This is exposed because signatures + parsed off the wire may have sighash flags that aren't "normal" serializations of the enum values. + Because Bitcoin Core works via bit testing, we must not lose the exact value when round-tripping + otherwise we'll fail to verify signature hashes.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TransactionSignature

      +
      public TransactionSignature(BigInteger r, + BigInteger s)
      +
      Constructs a signature with the given components and SIGHASH_ALL.
      +
      +
    • +
    • +
      +

      TransactionSignature

      +
      public TransactionSignature(BigInteger r, + BigInteger s, + int sighashFlags)
      +
      Constructs a signature with the given components and raw sighash flag bytes (needed for rule compatibility).
      +
      +
    • +
    • +
      +

      TransactionSignature

      +
      public TransactionSignature(ECKey.ECDSASignature signature, + Transaction.SigHash mode, + boolean anyoneCanPay)
      +
      Constructs a transaction signature based on the ECDSA signature.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      dummy

      +
      public static TransactionSignature dummy()
      +
      Returns a dummy invalid signature whose R/S values are set such that they will take up the same number of + encoded bytes as a real signature. This can be useful when you want to fill out a transaction to be of the + right size (e.g. for fee calculations) but don't have the requisite signing key yet and will fill out the + real signature later.
      +
      +
    • +
    • +
      +

      calcSigHashValue

      +
      public static int calcSigHashValue(Transaction.SigHash mode, + boolean anyoneCanPay)
      +
      Calculates the byte used in the protocol to represent the combination of mode and anyoneCanPay.
      +
      +
    • +
    • +
      +

      isEncodingCanonical

      +
      public static boolean isEncodingCanonical(byte[] signature)
      +
      Returns true if the given signature is has canonical encoding, and will thus be accepted as standard by + Bitcoin Core. DER and the SIGHASH encoding allow for quite some flexibility in how the same structures + are encoded, and this can open up novel attacks in which a man in the middle takes a transaction and then + changes its signature such that the transaction hash is different but it's still valid. This can confuse wallets + and generally violates people's mental model of how Bitcoin should work, thus, non-canonical signatures are now + not relayed by default.
      +
      +
    • +
    • +
      +

      anyoneCanPay

      +
      public boolean anyoneCanPay()
      +
      +
    • +
    • +
      +

      sigHashMode

      +
      public Transaction.SigHash sigHashMode()
      +
      +
    • +
    • +
      +

      encodeToBitcoin

      +
      public byte[] encodeToBitcoin()
      +
      What we get back from the signer are the two components of a signature, r and s. To get a flat byte stream + of the type used by Bitcoin we have to encode them using DER encoding, which is just a way to pack the two + components into a structure, and then we append a byte to the end for the sighash flags.
      +
      +
    • +
    • +
      +

      toCanonicalised

      +
      public ECKey.ECDSASignature toCanonicalised()
      +
      Description copied from class: ECKey.ECDSASignature
      +
      Will automatically adjust the S component to be less than or equal to half the curve order, if necessary. + This is required because for every signature (r,s) the signature (r, -s (mod N)) is a valid signature of + the same message. However, we dislike the ability to modify the bits of a Bitcoin transaction after it's + been signed, as that violates various assumed invariants. Thus in future only one of those forms will be + considered legal and the other will be banned.
      +
      +
      Overrides:
      +
      toCanonicalised in class ECKey.ECDSASignature
      +
      +
      +
    • +
    • +
      +

      decodeFromBitcoin

      +
      public static TransactionSignature decodeFromBitcoin(byte[] bytes, + boolean requireCanonicalEncoding, + boolean requireCanonicalSValue) + throws SignatureDecodeException, +VerificationException
      +
      Returns a decoded signature.
      +
      +
      Parameters:
      +
      requireCanonicalEncoding - if the encoding of the signature must + be canonical.
      +
      requireCanonicalSValue - if the S-value must be canonical (below half + the order of the curve).
      +
      Throws:
      +
      SignatureDecodeException - if the signature is unparseable in some way.
      +
      VerificationException - if the signature is invalid.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/TrustStoreLoader.DefaultTrustStoreLoader.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/TrustStoreLoader.DefaultTrustStoreLoader.html new file mode 100644 index 000000000..d86a69f4f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/TrustStoreLoader.DefaultTrustStoreLoader.html @@ -0,0 +1,194 @@ + + + + +TrustStoreLoader.DefaultTrustStoreLoader (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TrustStoreLoader.DefaultTrustStoreLoader

+
+
java.lang.Object +
org.bitcoinj.crypto.TrustStoreLoader.DefaultTrustStoreLoader
+
+
+
+
All Implemented Interfaces:
+
TrustStoreLoader
+
+
+
Enclosing interface:
+
TrustStoreLoader
+
+
+
public static class TrustStoreLoader.DefaultTrustStoreLoader +extends Object +implements TrustStoreLoader
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/TrustStoreLoader.FileTrustStoreLoader.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/TrustStoreLoader.FileTrustStoreLoader.html new file mode 100644 index 000000000..b3cb6cef0 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/TrustStoreLoader.FileTrustStoreLoader.html @@ -0,0 +1,200 @@ + + + + +TrustStoreLoader.FileTrustStoreLoader (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TrustStoreLoader.FileTrustStoreLoader

+
+
java.lang.Object +
org.bitcoinj.crypto.TrustStoreLoader.FileTrustStoreLoader
+
+
+
+
All Implemented Interfaces:
+
TrustStoreLoader
+
+
+
Enclosing interface:
+
TrustStoreLoader
+
+
+
public static class TrustStoreLoader.FileTrustStoreLoader +extends Object +implements TrustStoreLoader
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/TrustStoreLoader.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/TrustStoreLoader.html new file mode 100644 index 000000000..be1ba8157 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/TrustStoreLoader.html @@ -0,0 +1,203 @@ + + + + +TrustStoreLoader (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface TrustStoreLoader

+
+
+
+
All Known Implementing Classes:
+
TrustStoreLoader.DefaultTrustStoreLoader, TrustStoreLoader.FileTrustStoreLoader
+
+
+
public interface TrustStoreLoader
+
An implementation of TrustStoreLoader handles fetching a KeyStore from the operating system, a file, etc. It's + necessary because the Java KeyStore abstraction is not completely seamless and for example + we sometimes need slightly different techniques to load the key store on different versions of Android, MacOS, + Windows, etc.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/X509Utils.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/X509Utils.html new file mode 100644 index 000000000..81f2737ed --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/X509Utils.html @@ -0,0 +1,199 @@ + + + + +X509Utils (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class X509Utils

+
+
java.lang.Object +
org.bitcoinj.crypto.X509Utils
+
+
+
+
public class X509Utils +extends Object
+
X509Utils provides tools for working with X.509 certificates and keystores, as used in the BIP 70 payment protocol. + For more details on this, see PaymentSession, the article "Working with + the payment protocol" on the bitcoinj website, or the Bitcoin developer guide.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      X509Utils

      +
      public X509Utils()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getDisplayNameFromCertificate

      +
      @Nullable +public static String getDisplayNameFromCertificate(@Nonnull + X509Certificate certificate, + boolean withLocation) + throws CertificateParsingException
      +
      Returns either a string that "sums up" the certificate for humans, in a similar manner to what you might see + in a web browser, or null if one cannot be extracted. This will typically be the common name (CN) field, but + can also be the org (O) field, org+location+country if withLocation is set, or the email + address for S/MIME certificates.
      +
      +
      Throws:
      +
      CertificateParsingException
      +
      +
      +
    • +
    • +
      +

      loadKeyStore

      +
      public static KeyStore loadKeyStore(String keystoreType, + @Nullable + String keystorePassword, + InputStream is) + throws KeyStoreException
      +
      Returns a key store loaded from the given stream. Just a convenience around the Java APIs.
      +
      +
      Throws:
      +
      KeyStoreException
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/internal/CryptoUtils.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/internal/CryptoUtils.html new file mode 100644 index 000000000..673aa0198 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/internal/CryptoUtils.html @@ -0,0 +1,186 @@ + + + + +CryptoUtils (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CryptoUtils

+
+
java.lang.Object +
org.bitcoinj.crypto.internal.CryptoUtils
+
+
+
+
public class CryptoUtils +extends Object
+
Utilities for the crypto module (e.g. using Bouncy Castle)
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CryptoUtils

      +
      public CryptoUtils()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      sha256hash160

      +
      public static byte[] sha256hash160(byte[] input)
      +
      Calculate RIPEMD160(SHA256(input)). This is used in Address calculations.
      +
      +
      Parameters:
      +
      input - bytes to hash
      +
      Returns:
      +
      RIPEMD160(SHA256(input))
      +
      +
      +
    • +
    • +
      +

      digestRipeMd160

      +
      public static byte[] digestRipeMd160(byte[] input)
      +
      Calculate RIPEMD160(input).
      +
      +
      Parameters:
      +
      input - bytes to hash
      +
      Returns:
      +
      RIPEMD160(input)
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/internal/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/internal/package-summary.html new file mode 100644 index 000000000..0623b4096 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/internal/package-summary.html @@ -0,0 +1,101 @@ + + + + +org.bitcoinj.crypto.internal (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.crypto.internal

+
+
+
package org.bitcoinj.crypto.internal
+
+
    +
  • + +
  • +
  • +
    +
    Classes
    +
    +
    Class
    +
    Description
    + +
    +
    Utilities for the crypto module (e.g.
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/internal/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/internal/package-tree.html new file mode 100644 index 000000000..46816d5a1 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/internal/package-tree.html @@ -0,0 +1,71 @@ + + + + +org.bitcoinj.crypto.internal Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.crypto.internal

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/package-summary.html new file mode 100644 index 000000000..12ab0e974 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/package-summary.html @@ -0,0 +1,258 @@ + + + + +org.bitcoinj.crypto (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.crypto

+
+
+
package org.bitcoinj.crypto
+
+
The crypto package contains classes that work with key derivation algorithms like scrypt (passwords to AES keys), + BIP 32 hierarchies (chains of keys from a root seed), X.509 utilities for the payment protocol and other general + cryptography tasks. It also contains a class that can disable the (long since obsolete) DRM Java/US Govt imposes + on strong crypto. This is legal because Oracle got permission to ship strong AES to everyone years ago but hasn't + bothered to actually remove the logic barriers.
+
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/package-tree.html new file mode 100644 index 000000000..9beeb2689 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/package-tree.html @@ -0,0 +1,173 @@ + + + + +org.bitcoinj.crypto Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.crypto

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/utils/MessageVerifyUtils.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/utils/MessageVerifyUtils.html new file mode 100644 index 000000000..03005c4e7 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/utils/MessageVerifyUtils.html @@ -0,0 +1,191 @@ + + + + +MessageVerifyUtils (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MessageVerifyUtils

+
+
java.lang.Object +
org.bitcoinj.crypto.utils.MessageVerifyUtils
+
+
+
+
public class MessageVerifyUtils +extends Object
+
Small utility class for verifying signatures of text messages created with + Bitcoin addresses (more precisely: with the private key of Bitcoin addresses). + Supports verifying of signatures created with:
    +
  • P2PKH addresses (old legacy 1… addresses)
  • +
  • P2WPKH addresses (native segwit v0 addresses, aka bc1q… addresses)
  • +
  • P2SH-P2WPKH addresses (segwit wrapped into P2SH, aka legacy segwit addresses, like 3…)
  • +
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      SIGNATURE_FAILED_ERROR_MESSAGE

      +
      public static final String SIGNATURE_FAILED_ERROR_MESSAGE
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      verifyMessage

      +
      public static void verifyMessage(Address address, + String message, + String signatureBase64) + throws SignatureException
      +
      Verifies messages signed with private keys of Bitcoin addresses.
      +
      +
      Parameters:
      +
      address - bitcoin address used to create the signature
      +
      message - message which has been signed
      +
      signatureBase64 - signature as base64 encoded string
      +
      Throws:
      +
      SignatureException - if the signature does not match the message and the address
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/utils/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/utils/package-summary.html new file mode 100644 index 000000000..8c6dd9b0a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/utils/package-summary.html @@ -0,0 +1,102 @@ + + + + +org.bitcoinj.crypto.utils (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.crypto.utils

+
+
+
package org.bitcoinj.crypto.utils
+
+
    +
  • + +
  • +
  • +
    +
    Classes
    +
    +
    Class
    +
    Description
    + +
    +
    Small utility class for verifying signatures of text messages created with + Bitcoin addresses (more precisely: with the private key of Bitcoin addresses).
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/crypto/utils/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/crypto/utils/package-tree.html new file mode 100644 index 000000000..6e3e718a6 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/crypto/utils/package-tree.html @@ -0,0 +1,71 @@ + + + + +org.bitcoinj.crypto.utils Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.crypto.utils

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/jni/NativeBlockChainListener.html b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeBlockChainListener.html new file mode 100644 index 000000000..e35421f53 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeBlockChainListener.html @@ -0,0 +1,343 @@ + + + + +NativeBlockChainListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NativeBlockChainListener

+
+
java.lang.Object +
org.bitcoinj.jni.NativeBlockChainListener
+
+
+
+
All Implemented Interfaces:
+
NewBestBlockListener, ReorganizeListener, TransactionReceivedInBlockListener
+
+
+
@Deprecated +public class NativeBlockChainListener +extends Object +implements NewBestBlockListener, ReorganizeListener, TransactionReceivedInBlockListener
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
An event listener that relays events to a native C++ object. A pointer to that object is stored in + this class using JNI on the native side, thus several instances of this can point to different actual + native implementations.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      ptr

      +
      public long ptr
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NativeBlockChainListener

      +
      public NativeBlockChainListener()
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/jni/NativeFutureCallback.html b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeFutureCallback.html new file mode 100644 index 000000000..5033d2117 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeFutureCallback.html @@ -0,0 +1,228 @@ + + + + +NativeFutureCallback (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NativeFutureCallback

+
+
java.lang.Object +
org.bitcoinj.jni.NativeFutureCallback
+
+
+
+
All Implemented Interfaces:
+
com.google.common.util.concurrent.FutureCallback
+
+
+
@Deprecated +public class NativeFutureCallback +extends Object +implements com.google.common.util.concurrent.FutureCallback
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
An event listener that relays events to a native C++ object. A pointer to that object is stored in + this class using JNI on the native side, thus several instances of this can point to different actual + native implementations.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      ptr

      +
      public long ptr
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NativeFutureCallback

      +
      public NativeFutureCallback()
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onSuccess

      +
      public void onSuccess(Object o)
      +
      Deprecated.
      +
      +
      Specified by:
      +
      onSuccess in interface com.google.common.util.concurrent.FutureCallback
      +
      +
      +
    • +
    • +
      +

      onFailure

      +
      public void onFailure(Throwable throwable)
      +
      Deprecated.
      +
      +
      Specified by:
      +
      onFailure in interface com.google.common.util.concurrent.FutureCallback
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/jni/NativeKeyChainEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeKeyChainEventListener.html new file mode 100644 index 000000000..9cce9542f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeKeyChainEventListener.html @@ -0,0 +1,218 @@ + + + + +NativeKeyChainEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NativeKeyChainEventListener

+
+
java.lang.Object +
org.bitcoinj.jni.NativeKeyChainEventListener
+
+
+
+
All Implemented Interfaces:
+
KeyChainEventListener
+
+
+
@Deprecated +public class NativeKeyChainEventListener +extends Object +implements KeyChainEventListener
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
An event listener that relays events to a native C++ object. A pointer to that object is stored in + this class using JNI on the native side, thus several instances of this can point to different actual + native implementations.
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    long
    + +
    +
    Deprecated.
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Deprecated.
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Deprecated.
    +
    Called whenever a new key is added to the key chain, whether that be via an explicit addition or due to some + other automatic derivation.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      ptr

      +
      public long ptr
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NativeKeyChainEventListener

      +
      public NativeKeyChainEventListener()
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onKeysAdded

      +
      public void onKeysAdded(List<ECKey> keys)
      +
      Deprecated.
      +
      Description copied from interface: KeyChainEventListener
      +
      Called whenever a new key is added to the key chain, whether that be via an explicit addition or due to some + other automatic derivation. See the documentation for your KeyChain implementation for details on what + can trigger this event.
      +
      +
      Specified by:
      +
      onKeysAdded in interface KeyChainEventListener
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/jni/NativeScriptsChangeEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeScriptsChangeEventListener.html new file mode 100644 index 000000000..11bd17643 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeScriptsChangeEventListener.html @@ -0,0 +1,220 @@ + + + + +NativeScriptsChangeEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NativeScriptsChangeEventListener

+
+
java.lang.Object +
org.bitcoinj.jni.NativeScriptsChangeEventListener
+
+
+
+
All Implemented Interfaces:
+
ScriptsChangeEventListener
+
+
+
@Deprecated +public class NativeScriptsChangeEventListener +extends Object +implements ScriptsChangeEventListener
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
An event listener that relays events to a native C++ object. A pointer to that object is stored in + this class using JNI on the native side, thus several instances of this can point to different actual + native implementations.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      ptr

      +
      public long ptr
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NativeScriptsChangeEventListener

      +
      public NativeScriptsChangeEventListener()
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onScriptsChanged

      +
      public void onScriptsChanged(Wallet wallet, + List<Script> scripts, + boolean isAddingScripts)
      +
      Deprecated.
      +
      Description copied from interface: ScriptsChangeEventListener
      +
      Called whenever a new watched script is added to the wallet.
      +
      +
      Specified by:
      +
      onScriptsChanged in interface ScriptsChangeEventListener
      +
      isAddingScripts - will be true if added scripts, false if removed scripts.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/jni/NativeTransactionConfidenceEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeTransactionConfidenceEventListener.html new file mode 100644 index 000000000..42c8e276d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeTransactionConfidenceEventListener.html @@ -0,0 +1,240 @@ + + + + +NativeTransactionConfidenceEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NativeTransactionConfidenceEventListener

+
+
java.lang.Object +
org.bitcoinj.jni.NativeTransactionConfidenceEventListener
+
+
+
+
All Implemented Interfaces:
+
TransactionConfidenceEventListener
+
+
+
@Deprecated +public class NativeTransactionConfidenceEventListener +extends Object +implements TransactionConfidenceEventListener
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
An event listener that relays events to a native C++ object. A pointer to that object is stored in + this class using JNI on the native side, thus several instances of this can point to different actual + native implementations.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      ptr

      +
      public long ptr
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NativeTransactionConfidenceEventListener

      +
      public NativeTransactionConfidenceEventListener()
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onTransactionConfidenceChanged

      +
      public void onTransactionConfidenceChanged(Wallet wallet, + Transaction tx)
      +
      Deprecated.
      +
      Description copied from interface: TransactionConfidenceEventListener
      +
      Called when a transaction changes its confidence level. You can also attach event listeners to + the individual transactions, if you don't care about all of them. Usually you would save the wallet to disk after + receiving this callback unless you already set up autosaving. +

      + You should pay attention to this callback in case a transaction becomes dead, that is, a transaction + you believed to be active (send or receive) becomes overridden by the network. This can happen if: + +

        +
      1. You are sharing keys between wallets and accidentally create/broadcast a double spend.
      2. +
      3. Somebody is attacking the network and reversing transactions, ie, the user is a victim of fraud.
      4. +
      5. A bug: for example you create a transaction, broadcast it but fail to commit it. The Wallet + will then re-use the same outputs when creating the next spend.
      6. +
      + + To find if the transaction is dead, you can use: +
      + 
      + tx.getConfidence().getConfidenceType() == TransactionConfidence.ConfidenceType.DEAD
      + 
      + If it is, you should notify the user in some way so they know the thing they bought may not arrive/the thing they sold should not be dispatched. +

      + Note that this callback will be invoked for every transaction in the wallet, for every new block that is + received (because the depth has changed). If you want to update a UI view from the contents of the wallet + it is more efficient to use onWalletChanged instead.

      +
      +
      Specified by:
      +
      onTransactionConfidenceChanged in interface TransactionConfidenceEventListener
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/jni/NativeTransactionConfidenceListener.html b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeTransactionConfidenceListener.html new file mode 100644 index 000000000..a57255ec0 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeTransactionConfidenceListener.html @@ -0,0 +1,223 @@ + + + + +NativeTransactionConfidenceListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NativeTransactionConfidenceListener

+
+
java.lang.Object +
org.bitcoinj.jni.NativeTransactionConfidenceListener
+
+
+
+
All Implemented Interfaces:
+
TransactionConfidence.Listener
+
+
+
@Deprecated +public class NativeTransactionConfidenceListener +extends Object +implements TransactionConfidence.Listener
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
An event listener that relays events to a native C++ object. A pointer to that object is stored in + this class using JNI on the native side, thus several instances of this can point to different actual + native implementations.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/jni/NativeWalletChangeEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeWalletChangeEventListener.html new file mode 100644 index 000000000..492700394 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeWalletChangeEventListener.html @@ -0,0 +1,230 @@ + + + + +NativeWalletChangeEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NativeWalletChangeEventListener

+
+
java.lang.Object +
org.bitcoinj.jni.NativeWalletChangeEventListener
+
+
+
+
All Implemented Interfaces:
+
WalletChangeEventListener
+
+
+
@Deprecated +public class NativeWalletChangeEventListener +extends Object +implements WalletChangeEventListener
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
An event listener that relays events to a native C++ object. A pointer to that object is stored in + this class using JNI on the native side, thus several instances of this can point to different actual + native implementations.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      ptr

      +
      public long ptr
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NativeWalletChangeEventListener

      +
      public NativeWalletChangeEventListener()
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onWalletChanged

      +
      public void onWalletChanged(Wallet wallet)
      +
      Deprecated.
      +
      Description copied from interface: WalletChangeEventListener
      +

      Designed for GUI applications to refresh their transaction lists. This callback is invoked in the following + situations:

      + +
        +
      1. A new block is received (and thus building transactions got more confidence)
      2. +
      3. A pending transaction is received
      4. +
      5. A pending transaction changes confidence due to some non-new-block related event, such as being + announced by more peers or by a double-spend conflict being observed.
      6. +
      7. A re-organize occurs. Call occurs only if the re-org modified any of our transactions.
      8. +
      9. A new spend is committed to the wallet.
      10. +
      11. The wallet is reset and all transactions removed.
      12. +
      + +

      When this is called you can refresh the UI contents from the wallet contents. It's more efficient to use + this rather than onTransactionConfidenceChanged() + onReorganize() because you only get one callback per block + rather than one per transaction per block. Note that this is not called when a key is added.

      +
      +
      Specified by:
      +
      onWalletChanged in interface WalletChangeEventListener
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/jni/NativeWalletCoinsReceivedEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeWalletCoinsReceivedEventListener.html new file mode 100644 index 000000000..59b03388c --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeWalletCoinsReceivedEventListener.html @@ -0,0 +1,232 @@ + + + + +NativeWalletCoinsReceivedEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NativeWalletCoinsReceivedEventListener

+
+
java.lang.Object +
org.bitcoinj.jni.NativeWalletCoinsReceivedEventListener
+
+
+
+
All Implemented Interfaces:
+
WalletCoinsReceivedEventListener
+
+
+
@Deprecated +public class NativeWalletCoinsReceivedEventListener +extends Object +implements WalletCoinsReceivedEventListener
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
An event listener that relays events to a native C++ object. A pointer to that object is stored in + this class using JNI on the native side, thus several instances of this can point to different actual + native implementations.
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    long
    + +
    +
    Deprecated.
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Deprecated.
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onCoinsReceived(Wallet wallet, + Transaction tx, + Coin prevBalance, + Coin newBalance)
    +
    +
    Deprecated.
    +
    This is called when a transaction is seen that sends coins to this wallet, either because it + was broadcast across the network or because a block was received.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      ptr

      +
      public long ptr
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NativeWalletCoinsReceivedEventListener

      +
      public NativeWalletCoinsReceivedEventListener()
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onCoinsReceived

      +
      public void onCoinsReceived(Wallet wallet, + Transaction tx, + Coin prevBalance, + Coin newBalance)
      +
      Deprecated.
      +
      Description copied from interface: WalletCoinsReceivedEventListener
      +
      This is called when a transaction is seen that sends coins to this wallet, either because it + was broadcast across the network or because a block was received. If a transaction is seen when it was broadcast, + onCoinsReceived won't be called again when a block containing it is received. If you want to know when such a + transaction receives its first confirmation, register a TransactionConfidence event listener using + the object retrieved via Transaction.getConfidence(). It's safe to modify the + wallet in this callback, for example, by spending the transaction just received.
      +
      +
      Specified by:
      +
      onCoinsReceived in interface WalletCoinsReceivedEventListener
      +
      Parameters:
      +
      wallet - The wallet object that received the coins
      +
      tx - The transaction which sent us the coins.
      +
      prevBalance - Balance before the coins were received.
      +
      newBalance - Current balance of the wallet. This is the 'estimated' balance.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/jni/NativeWalletCoinsSentEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeWalletCoinsSentEventListener.html new file mode 100644 index 000000000..8ba89ad8b --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeWalletCoinsSentEventListener.html @@ -0,0 +1,235 @@ + + + + +NativeWalletCoinsSentEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NativeWalletCoinsSentEventListener

+
+
java.lang.Object +
org.bitcoinj.jni.NativeWalletCoinsSentEventListener
+
+
+
+
All Implemented Interfaces:
+
WalletCoinsSentEventListener
+
+
+
@Deprecated +public class NativeWalletCoinsSentEventListener +extends Object +implements WalletCoinsSentEventListener
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
An event listener that relays events to a native C++ object. A pointer to that object is stored in + this class using JNI on the native side, thus several instances of this can point to different actual + native implementations.
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    long
    + +
    +
    Deprecated.
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Deprecated.
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onCoinsSent(Wallet wallet, + Transaction tx, + Coin prevBalance, + Coin newBalance)
    +
    +
    Deprecated.
    +
    This is called when a transaction is seen that sends coins from this wallet, either + because it was broadcast across the network or because a block was received.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      ptr

      +
      public long ptr
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NativeWalletCoinsSentEventListener

      +
      public NativeWalletCoinsSentEventListener()
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onCoinsSent

      +
      public void onCoinsSent(Wallet wallet, + Transaction tx, + Coin prevBalance, + Coin newBalance)
      +
      Deprecated.
      +
      Description copied from interface: WalletCoinsSentEventListener
      +
      This is called when a transaction is seen that sends coins from this wallet, either + because it was broadcast across the network or because a block was received. This may at first glance seem + useless, because in the common case you already know about such transactions because you created them with + the Wallets createSend/sendCoins methods. However when you have a wallet containing only keys, and you wish + to replay the block chain to fill it with transactions, it's useful to find out when a transaction is discovered + that sends coins from the wallet.

      + + It's safe to modify the wallet from inside this callback, but if you're replaying the block chain you should + be careful to avoid such modifications. Otherwise your changes may be overridden by new data from the chain.

      +
      +
      Specified by:
      +
      onCoinsSent in interface WalletCoinsSentEventListener
      +
      Parameters:
      +
      wallet - The wallet object that this callback relates to (that sent the coins).
      +
      tx - The transaction that sent the coins to someone else.
      +
      prevBalance - The wallets balance before this transaction was seen.
      +
      newBalance - The wallets balance after this transaction was seen. This is the 'estimated' balance.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/jni/NativeWalletReorganizeEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeWalletReorganizeEventListener.html new file mode 100644 index 000000000..81524fa5b --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/jni/NativeWalletReorganizeEventListener.html @@ -0,0 +1,222 @@ + + + + +NativeWalletReorganizeEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NativeWalletReorganizeEventListener

+
+
java.lang.Object +
org.bitcoinj.jni.NativeWalletReorganizeEventListener
+
+
+
+
All Implemented Interfaces:
+
WalletReorganizeEventListener
+
+
+
@Deprecated +public class NativeWalletReorganizeEventListener +extends Object +implements WalletReorganizeEventListener
+
Deprecated. +
See https://github.com/bitcoinj/bitcoinj/issues/2465
+
+
An event listener that relays events to a native C++ object. A pointer to that object is stored in + this class using JNI on the native side, thus several instances of this can point to different actual + native implementations.
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    long
    + +
    +
    Deprecated.
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Deprecated.
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Deprecated.
    +
    This is called when a block is received that triggers a block chain re-organization.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      ptr

      +
      public long ptr
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NativeWalletReorganizeEventListener

      +
      public NativeWalletReorganizeEventListener()
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onReorganize

      +
      public void onReorganize(Wallet wallet)
      +
      Deprecated.
      +
      Description copied from interface: WalletReorganizeEventListener
      +

      This is called when a block is received that triggers a block chain re-organization.

      + +

      A re-organize means that the consensus (chain) of the network has diverged and now changed from what we + believed it was previously. Usually this won't matter because the new consensus will include all our old + transactions assuming we are playing by the rules. However it's theoretically possible for our balance to + change in arbitrary ways, most likely, we could lose some money we thought we had.

      + +

      It is safe to use methods of wallet whilst inside this callback.

      +
      +
      Specified by:
      +
      onReorganize in interface WalletReorganizeEventListener
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/jni/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/jni/package-summary.html new file mode 100644 index 000000000..172c49612 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/jni/package-summary.html @@ -0,0 +1,120 @@ + + + + +org.bitcoinj.jni (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.jni

+
+
+
package org.bitcoinj.jni
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/jni/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/jni/package-tree.html new file mode 100644 index 000000000..5ce98660e --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/jni/package-tree.html @@ -0,0 +1,80 @@ + + + + +org.bitcoinj.jni Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.jni

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/kits/WalletAppKit.html b/javadoc/0.17-rc1/org/bitcoinj/kits/WalletAppKit.html new file mode 100644 index 000000000..a3113d87a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/kits/WalletAppKit.html @@ -0,0 +1,976 @@ + + + + +WalletAppKit (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WalletAppKit

+
+
java.lang.Object +
com.google.common.util.concurrent.AbstractIdleService +
org.bitcoinj.kits.WalletAppKit
+
+
+
+
+
All Implemented Interfaces:
+
com.google.common.util.concurrent.Service, Closeable, AutoCloseable
+
+
+
public class WalletAppKit +extends com.google.common.util.concurrent.AbstractIdleService +implements Closeable
+

Utility class that wraps the boilerplate needed to set up a new SPV bitcoinj app. Instantiate it with a directory + and file prefix, optionally configure a few things, then use startAsync and optionally awaitRunning. The object will + construct and configure a BlockChain, SPVBlockStore, Wallet and PeerGroup. Depending + on the value of the blockingStartup property, startup will be considered complete once the block chain has fully + synchronized, so it can take a while.

+ +

To add listeners and modify the objects that are constructed, you can either do that by overriding the + onSetupCompleted() method (which will run on a background thread) and make your changes there, + or by waiting for the service to start and then accessing the objects from wherever you want. However, you cannot + access the objects this class creates until startup is complete.

+ +

The asynchronous design of this class may seem puzzling (just use AbstractIdleService.awaitRunning() if you don't want that). + It is to make it easier to fit bitcoinj into GUI apps, which require a high degree of responsiveness on their main + thread which handles all the animation and user interaction. Even when blockingStart is false, initializing bitcoinj + means doing potentially blocking file IO, generating keys and other potentially intensive operations. By running it + on a background thread, there's no risk of accidentally causing UI lag.

+ +

Note that AbstractIdleService.awaitRunning() can throw an unchecked IllegalStateException + if anything goes wrong during startup - you should probably handle it and use Throwable.getCause() to figure + out what went wrong more precisely. Same thing if you just use the AbstractIdleService.startAsync() method.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      log

      +
      protected static final org.slf4j.Logger log
      +
      +
    • +
    • +
      +

      network

      +
      protected final BitcoinNetwork network
      +
      +
    • +
    • +
      +

      params

      +
      protected final NetworkParameters params
      +
      +
    • +
    • +
      +

      preferredOutputScriptType

      +
      protected final ScriptType preferredOutputScriptType
      +
      +
    • +
    • +
      +

      structure

      +
      protected final KeyChainGroupStructure structure
      +
      +
    • +
    • +
      +

      filePrefix

      +
      protected final String filePrefix
      +
      +
    • +
    • +
      +

      vChain

      +
      protected volatile BlockChain vChain
      +
      +
    • +
    • +
      +

      vStore

      +
      protected volatile SPVBlockStore vStore
      +
      +
    • +
    • +
      +

      vWallet

      +
      protected volatile Wallet vWallet
      +
      +
    • +
    • +
      +

      vPeerGroup

      +
      protected volatile PeerGroup vPeerGroup
      +
      +
    • +
    • +
      +

      directory

      +
      protected final File directory
      +
      +
    • +
    • +
      +

      vWalletFile

      +
      protected volatile File vWalletFile
      +
      +
    • +
    • +
      +

      useAutoSave

      +
      protected boolean useAutoSave
      +
      +
    • +
    • +
      +

      peerAddresses

      +
      protected PeerAddress[] peerAddresses
      +
      +
    • +
    • +
      +

      downloadListener

      +
      protected DownloadProgressTracker downloadListener
      +
      +
    • +
    • +
      +

      autoStop

      +
      protected boolean autoStop
      +
      +
    • +
    • +
      +

      checkpoints

      +
      protected InputStream checkpoints
      +
      +
    • +
    • +
      +

      blockingStartup

      +
      protected boolean blockingStartup
      +
      +
    • +
    • +
      +

      userAgent

      +
      protected String userAgent
      +
      +
    • +
    • +
      +

      version

      +
      protected String version
      +
      +
    • +
    • +
      +

      walletFactory

      +
      @Nonnull +protected WalletProtobufSerializer.WalletFactory walletFactory
      +
      +
    • +
    • +
      +

      restoreFromSeed

      +
      @Nullable +protected DeterministicSeed restoreFromSeed
      +
      +
    • +
    • +
      +

      restoreFromKey

      +
      @Nullable +protected DeterministicKey restoreFromKey
      +
      +
    • +
    • +
      +

      discovery

      +
      @Nullable +protected PeerDiscovery discovery
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      launch

      +
      public static WalletAppKit launch(BitcoinNetwork network, + File directory, + String filePrefix)
      +
      Launch an instance of WalletAppKit with asynchronous startup. Wait until the PeerGroup is initialized.
      +
      +
      Parameters:
      +
      network - The network the wallet connects to
      +
      directory - The directory for creating .wallet and .spvchain files
      +
      filePrefix - The base name for the .wallet and .spvchain files
      +
      Returns:
      +
      the instance
      +
      +
      +
    • +
    • +
      +

      launch

      +
      public static WalletAppKit launch(BitcoinNetwork network, + File directory, + String filePrefix, + Consumer<WalletAppKit> configurer)
      +
      Launch an instance of WalletAppKit with asynchronous startup. Wait until the PeerGroup is initialized.
      +
      +
      Parameters:
      +
      network - The network the wallet connects to
      +
      directory - The directory for creating .wallet and .spvchain files
      +
      filePrefix - The base name for the .wallet and .spvchain files
      +
      configurer - Callback to allow configuring the kit before it is started
      +
      Returns:
      +
      the instance
      +
      +
      +
    • +
    • +
      +

      launch

      +
      public static WalletAppKit launch(BitcoinNetwork network, + File directory, + String filePrefix, + int maxConnections)
      +
      Launch an instance of WalletAppKit with asynchronous startup. Wait until the PeerGroup is initialized.
      +
      +
      Parameters:
      +
      network - The network the wallet connects to
      +
      directory - The directory for creating .wallet and .spvchain files
      +
      filePrefix - The base name for the .wallet and .spvchain files
      +
      maxConnections - maximum number of peer connections.
      +
      Returns:
      +
      the instance
      +
      +
      +
    • +
    • +
      +

      launch

      +
      public static WalletAppKit launch(BitcoinNetwork network, + File directory, + String filePrefix, + Consumer<WalletAppKit> configurer, + int maxConnections)
      +
      Launch an instance of WalletAppKit with asynchronous startup. Wait until the PeerGroup is initialized.
      +
      +
      Parameters:
      +
      network - The network the wallet connects to
      +
      directory - The directory for creating .wallet and .spvchain files
      +
      filePrefix - The base name for the .wallet and .spvchain files
      +
      configurer - Callback to allow configuring the kit before it is started
      +
      maxConnections - maximum number of peer connections.
      +
      Returns:
      +
      the instance
      +
      +
      +
    • +
    • +
      +

      setPeerNodes

      +
      public WalletAppKit setPeerNodes(PeerAddress... addresses)
      +
      Will only connect to the given addresses. Cannot be called after startup.
      +
      +
    • +
    • +
      +

      connectToLocalHost

      +
      public WalletAppKit connectToLocalHost()
      +
      Will only connect to localhost. Cannot be called after startup.
      +
      +
    • +
    • +
      +

      setAutoSave

      +
      public WalletAppKit setAutoSave(boolean value)
      +
      If true, the wallet will save itself to disk automatically whenever it changes.
      +
      +
    • +
    • +
      +

      setDownloadListener

      +
      public WalletAppKit setDownloadListener(DownloadProgressTracker listener)
      +
      If you want to learn about the sync process, you can provide a listener here. For instance, a + DownloadProgressTracker is a good choice. This has no effect unless setBlockingStartup(false) has been called + too, due to some missing implementation code.
      +
      +
    • +
    • +
      +

      setAutoStop

      +
      public WalletAppKit setAutoStop(boolean autoStop)
      +
      If true, will register a shutdown hook to stop the library. Defaults to true.
      +
      +
    • +
    • +
      +

      setCheckpoints

      +
      public WalletAppKit setCheckpoints(InputStream checkpoints)
      +
      If set, the file is expected to contain a checkpoints file calculated with BuildCheckpoints. It makes initial + block sync faster for new users - please refer to the documentation on the bitcoinj website + (https://bitcoinj.github.io/speeding-up-chain-sync) for further details.
      +
      +
    • +
    • +
      +

      setBlockingStartup

      +
      public WalletAppKit setBlockingStartup(boolean blockingStartup)
      +
      If true (the default) then the startup of this service won't be considered complete until the network has been + brought up, peer connections established and the block chain synchronised. Therefore AbstractIdleService.awaitRunning() can + potentially take a very long time. If false, then startup is considered complete once the network activity + begins and peer connections/block chain sync will continue in the background.
      +
      +
    • +
    • +
      +

      setUserAgent

      +
      public WalletAppKit setUserAgent(String userAgent, + String version)
      +
      Sets the string that will appear in the subver field of the version message.
      +
      +
      Parameters:
      +
      userAgent - A short string that should be the name of your app, e.g. "My Wallet"
      +
      version - A short string that contains the version number, e.g. "1.0-BETA"
      +
      +
      +
    • +
    • +
      +

      setWalletFactory

      +
      public WalletAppKit setWalletFactory(@Nonnull + WalletProtobufSerializer.WalletFactory walletFactory)
      +
      Sets a wallet factory which will be used when the kit creates a new wallet.
      +
      +
      Parameters:
      +
      walletFactory - Factory for making new wallets (Use WalletProtobufSerializer.WalletFactory.DEFAULT for default behavior)
      +
      Returns:
      +
      WalletAppKit for method chaining purposes
      +
      +
      +
    • +
    • +
      +

      restoreWalletFromSeed

      +
      public WalletAppKit restoreWalletFromSeed(DeterministicSeed seed)
      +
      If a seed is set here then any existing wallet that matches the file name will be renamed to a backup name, + the chain file will be deleted, and the wallet object will be instantiated with the given seed instead of + a fresh one being created. This is intended for restoring a wallet from the original seed. To implement restore + you would shut down the existing appkit, if any, then recreate it with the seed given by the user, then start + up the new kit. The next time your app starts it should work as normal (that is, don't keep calling this each + time).
      +
      +
    • +
    • +
      +

      restoreWalletFromKey

      +
      public WalletAppKit restoreWalletFromKey(DeterministicKey accountKey)
      +
      If an account key is set here then any existing wallet that matches the file name will be renamed to a backup name, + the chain file will be deleted, and the wallet object will be instantiated with the given key instead of + a fresh seed being created. This is intended for restoring a wallet from an account key. To implement restore + you would shut down the existing appkit, if any, then recreate it with the key given by the user, then start + up the new kit. The next time your app starts it should work as normal (that is, don't keep calling this each + time).
      +
      +
    • +
    • +
      +

      setDiscovery

      +
      public WalletAppKit setDiscovery(@Nullable + PeerDiscovery discovery)
      +
      Sets the peer discovery class to use. If none is provided then DNS is used, which is a reasonable default.
      +
      +
    • +
    • +
      +

      provideWalletExtensions

      +
      protected List<WalletExtension> provideWalletExtensions() + throws Exception
      +

      Override this to return wallet extensions if any are necessary.

      + +

      When this is called, chain(), store(), and peerGroup() will return the created objects, however they are not + initialized/started.

      +
      +
      Throws:
      +
      Exception
      +
      +
      +
    • +
    • +
      +

      onSetupCompleted

      +
      protected void onSetupCompleted()
      +
      This method is invoked on a background thread after all objects are initialised, but before the peer group + or block chain download is started. You can tweak the objects configuration here.
      +
      +
    • +
    • +
      +

      isChainFileLocked

      +
      public boolean isChainFileLocked() + throws IOException
      +
      Tests to see if the spvchain file has an operating system file lock on it. Useful for checking if your app + is already running. If another copy of your app is running and you start the appkit anyway, an exception will + be thrown during the startup process. Returns false if the chain file does not exist or is a directory.
      +
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      startUp

      +
      protected void startUp() + throws Exception
      +
      +
      Specified by:
      +
      startUp in class com.google.common.util.concurrent.AbstractIdleService
      +
      Throws:
      +
      Exception
      +
      +
      +
    • +
    • +
      +

      setupAutoSave

      +
      protected void setupAutoSave(Wallet wallet)
      +
      +
    • +
    • +
      +

      createWallet

      +
      protected Wallet createWallet()
      +
      +
    • +
    • +
      +

      createPeerGroup

      +
      protected PeerGroup createPeerGroup()
      +
      +
    • +
    • +
      +

      shutDown

      +
      protected void shutDown() + throws Exception
      +
      +
      Specified by:
      +
      shutDown in class com.google.common.util.concurrent.AbstractIdleService
      +
      Throws:
      +
      Exception
      +
      +
      +
    • +
    • +
      +

      close

      +
      public void close()
      +
      Close and release resources. Implements Closeable. This should be idempotent.
      +
      +
      Specified by:
      +
      close in interface AutoCloseable
      +
      Specified by:
      +
      close in interface Closeable
      +
      +
      +
    • +
    • +
      +

      network

      +
      public BitcoinNetwork network()
      +
      +
    • +
    • +
      +

      params

      +
      public NetworkParameters params()
      +
      +
    • +
    • +
      +

      chain

      +
      public BlockChain chain()
      +
      +
    • +
    • +
      +

      store

      +
      public BlockStore store()
      +
      +
    • +
    • +
      +

      wallet

      +
      public Wallet wallet()
      +
      +
    • +
    • +
      +

      peerGroup

      +
      public PeerGroup peerGroup()
      +
      +
    • +
    • +
      +

      directory

      +
      public File directory()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/kits/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/kits/package-summary.html new file mode 100644 index 000000000..17368775e --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/kits/package-summary.html @@ -0,0 +1,88 @@ + + + + +org.bitcoinj.kits (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.kits

+
+
+
package org.bitcoinj.kits
+
+
High level wrapper APIs around the bitcoinj building blocks. WalletAppKit is suitable for many different types of + apps that require an SPV wallet.
+
+
+
    +
  • +
    +
    Classes
    +
    +
    Class
    +
    Description
    + +
    +
    Utility class that wraps the boilerplate needed to set up a new SPV bitcoinj app.
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/kits/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/kits/package-tree.html new file mode 100644 index 000000000..31ac10ca3 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/kits/package-tree.html @@ -0,0 +1,75 @@ + + + + +org.bitcoinj.kits Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.kits

+Package Hierarchies: + +
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • com.google.common.util.concurrent.AbstractIdleService (implements com.google.common.util.concurrent.Service) + +
    • +
    +
  • +
+
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/AbstractTimeoutHandler.html b/javadoc/0.17-rc1/org/bitcoinj/net/AbstractTimeoutHandler.html new file mode 100644 index 000000000..c09430241 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/AbstractTimeoutHandler.html @@ -0,0 +1,239 @@ + + + + +AbstractTimeoutHandler (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AbstractTimeoutHandler

+
+
java.lang.Object +
org.bitcoinj.net.AbstractTimeoutHandler
+
+
+
+
All Implemented Interfaces:
+
TimeoutHandler
+
+
+
@Deprecated +public abstract class AbstractTimeoutHandler +extends Object +implements TimeoutHandler
+
Deprecated. +
Don't extend this class, implement TimeoutHandler using SocketTimeoutTask instead
+
+
A base class which provides basic support for socket timeouts. It is used instead of integrating timeouts into the + NIO select thread both for simplicity and to keep code shared between NIO and blocking sockets as much as possible. +

+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Deprecated.
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    protected void
    + +
    +
    Deprecated.
    +
    Resets the current progress towards timeout to 0.
    +
    +
    final void
    + +
    +
    Deprecated.
    +
    Sets the receive timeout, automatically killing the connection if no + messages are received for this long
    +
    +
    final void
    +
    setTimeoutEnabled(boolean timeoutEnabled)
    +
    +
    Deprecated.
    +
    Enables or disables the timeout entirely.
    +
    +
    protected abstract void
    + +
    +
    Deprecated.
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AbstractTimeoutHandler

      +
      public AbstractTimeoutHandler()
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setTimeoutEnabled

      +
      public final void setTimeoutEnabled(boolean timeoutEnabled)
      +
      Deprecated.
      +

      Enables or disables the timeout entirely. This may be useful if you want to store the timeout value but wish + to temporarily disable/enable timeouts.

      + +

      The default is for timeoutEnabled to be true but timeout to be set to Duration.ZERO (ie disabled).

      + +

      This call will reset the current progress towards the timeout.

      +
      +
      Specified by:
      +
      setTimeoutEnabled in interface TimeoutHandler
      +
      +
      +
    • +
    • +
      +

      setSocketTimeout

      +
      public final void setSocketTimeout(Duration timeout)
      +
      Deprecated.
      +

      Sets the receive timeout, automatically killing the connection if no + messages are received for this long

      + +

      A timeout of 0Duration.ZERO is interpreted as no timeout.

      + +

      The default is for timeoutEnabled to be true but timeout to be set to Duration.ZERO (ie disabled).

      + +

      This call will reset the current progress towards the timeout.

      +
      +
      Specified by:
      +
      setSocketTimeout in interface TimeoutHandler
      +
      +
      +
    • +
    • +
      +

      resetTimeout

      +
      protected void resetTimeout()
      +
      Deprecated.
      +
      Resets the current progress towards timeout to 0.
      +
      +
    • +
    • +
      +

      timeoutOccurred

      +
      protected abstract void timeoutOccurred()
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/BlockingClient.html b/javadoc/0.17-rc1/org/bitcoinj/net/BlockingClient.html new file mode 100644 index 000000000..5825e9c49 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/BlockingClient.html @@ -0,0 +1,255 @@ + + + + +BlockingClient (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BlockingClient

+
+
java.lang.Object +
org.bitcoinj.net.BlockingClient
+
+
+
+
All Implemented Interfaces:
+
MessageWriteTarget
+
+
+
public class BlockingClient +extends Object +implements MessageWriteTarget
+

Creates a simple connection to a server using a StreamConnection to process data.

+ +

Generally, using NioClient and NioClientManager should be preferred over BlockingClient + and BlockingClientManager, unless you wish to connect over a proxy or use some other network settings that + cannot be set using NIO.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BlockingClient

      +
      public BlockingClient(SocketAddress serverAddress, + StreamConnection connection, + Duration connectTimeout, + SocketFactory socketFactory, + @Nullable + Set<BlockingClient> clientSet) + throws IOException
      +

      Creates a new client to the given server address using the given StreamConnection to decode the data. + The given connection MUST be unique to this object. This does not block while waiting for the connection to + open, but will call either the StreamConnection.connectionOpened() or + StreamConnection.connectionClosed() callback on the created network event processing thread.

      +
      +
      Parameters:
      +
      connectTimeout - The connect timeout set on the connection. ZERO is interpreted as no timeout.
      +
      socketFactory - An object that creates Socket objects on demand, which may be customised to control + how this client connects to the internet. If not sure, use SocketFactory.getDefault()
      +
      clientSet - A set which this object will add itself to after initialization, and then remove itself from
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/BlockingClientManager.html b/javadoc/0.17-rc1/org/bitcoinj/net/BlockingClientManager.html new file mode 100644 index 000000000..b41d22e0b --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/BlockingClientManager.html @@ -0,0 +1,307 @@ + + + + +BlockingClientManager (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BlockingClientManager

+
+
java.lang.Object +
com.google.common.util.concurrent.AbstractIdleService +
org.bitcoinj.net.BlockingClientManager
+
+
+
+
+
All Implemented Interfaces:
+
com.google.common.util.concurrent.Service, ClientConnectionManager
+
+
+
public class BlockingClientManager +extends com.google.common.util.concurrent.AbstractIdleService +implements ClientConnectionManager
+

A thin wrapper around a set of BlockingClients.

+ +

Generally, using NioClient and NioClientManager should be preferred over BlockingClient + and BlockingClientManager as they scale significantly better, unless you wish to connect over a proxy or use + some other network settings that cannot be set using NIO.

+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    +

    Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service

    +com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    + +
    +
    Creates a blocking client manager that will obtain sockets from the given factory.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Closes n peer connections
    +
    +
    int
    + +
    +
    Gets the number of connected peers
    +
    + +
    openConnection(SocketAddress serverAddress, + StreamConnection connection)
    +
    +
    Creates a new connection to the given address, with the given connection used to handle incoming data.
    +
    +
    void
    +
    setConnectTimeout(Duration connectTimeout)
    +
    +
    Sets the number of milliseconds to wait before giving up on a connect attempt
    +
    +
    void
    +
    setConnectTimeoutMillis(int connectTimeoutMillis)
    +
    +
    Deprecated. + +
    +
    +
    protected void
    + +
     
    +
    protected void
    + +
     
    +
    +
    +
    +
    +

    Methods inherited from class com.google.common.util.concurrent.AbstractIdleService

    +addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, serviceName, startAsync, state, stopAsync, toString
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    +
    +

    Methods inherited from interface com.google.common.util.concurrent.Service

    +addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BlockingClientManager

      +
      public BlockingClientManager()
      +
      +
    • +
    • +
      +

      BlockingClientManager

      +
      public BlockingClientManager(SocketFactory socketFactory)
      +
      Creates a blocking client manager that will obtain sockets from the given factory. Useful for customising how + bitcoinj connects to the P2P network.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      openConnection

      +
      public ListenableCompletableFuture<SocketAddress> openConnection(SocketAddress serverAddress, + StreamConnection connection)
      +
      Description copied from interface: ClientConnectionManager
      +
      Creates a new connection to the given address, with the given connection used to handle incoming data. Any errors + that occur during connection will be returned in the given future, including errors that can occur immediately.
      +
      +
      Specified by:
      +
      openConnection in interface ClientConnectionManager
      +
      +
      +
    • +
    • +
      +

      setConnectTimeout

      +
      public void setConnectTimeout(Duration connectTimeout)
      +
      Sets the number of milliseconds to wait before giving up on a connect attempt
      +
      +
      Parameters:
      +
      connectTimeout - timeout for establishing a connection to the client
      +
      +
      +
    • +
    • +
      +

      setConnectTimeoutMillis

      +
      @Deprecated +public void setConnectTimeoutMillis(int connectTimeoutMillis)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      startUp

      +
      protected void startUp() + throws Exception
      +
      +
      Specified by:
      +
      startUp in class com.google.common.util.concurrent.AbstractIdleService
      +
      Throws:
      +
      Exception
      +
      +
      +
    • +
    • +
      +

      shutDown

      +
      protected void shutDown() + throws Exception
      +
      +
      Specified by:
      +
      shutDown in class com.google.common.util.concurrent.AbstractIdleService
      +
      Throws:
      +
      Exception
      +
      +
      +
    • +
    • +
      +

      getConnectedClientCount

      +
      public int getConnectedClientCount()
      +
      Description copied from interface: ClientConnectionManager
      +
      Gets the number of connected peers
      +
      +
      Specified by:
      +
      getConnectedClientCount in interface ClientConnectionManager
      +
      +
      +
    • +
    • +
      +

      closeConnections

      +
      public void closeConnections(int n)
      +
      Description copied from interface: ClientConnectionManager
      +
      Closes n peer connections
      +
      +
      Specified by:
      +
      closeConnections in interface ClientConnectionManager
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/ClientConnectionManager.html b/javadoc/0.17-rc1/org/bitcoinj/net/ClientConnectionManager.html new file mode 100644 index 000000000..63a878706 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/ClientConnectionManager.html @@ -0,0 +1,180 @@ + + + + +ClientConnectionManager (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface ClientConnectionManager

+
+
+
+
All Superinterfaces:
+
com.google.common.util.concurrent.Service
+
+
+
All Known Implementing Classes:
+
BlockingClientManager, NioClientManager
+
+
+
public interface ClientConnectionManager +extends com.google.common.util.concurrent.Service
+

A generic interface for an object which keeps track of a set of open client connections, creates new ones and + ensures they are serviced properly.

+ +

When the service is stopped via Service.stopAsync(), all connections will be closed and + the appropriate connectionClosed() calls must be made.

+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    +

    Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service

    +com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Closes n peer connections
    +
    +
    int
    + +
    +
    Gets the number of connected peers
    +
    + +
    openConnection(SocketAddress serverAddress, + StreamConnection connection)
    +
    +
    Creates a new connection to the given address, with the given connection used to handle incoming data.
    +
    +
    +
    +
    +
    +

    Methods inherited from interface com.google.common.util.concurrent.Service

    +addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      openConnection

      +
      ListenableCompletableFuture<SocketAddress> openConnection(SocketAddress serverAddress, + StreamConnection connection)
      +
      Creates a new connection to the given address, with the given connection used to handle incoming data. Any errors + that occur during connection will be returned in the given future, including errors that can occur immediately.
      +
      +
    • +
    • +
      +

      getConnectedClientCount

      +
      int getConnectedClientCount()
      +
      Gets the number of connected peers
      +
      +
    • +
    • +
      +

      closeConnections

      +
      void closeConnections(int n)
      +
      Closes n peer connections
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/FilterMerger.Result.html b/javadoc/0.17-rc1/org/bitcoinj/net/FilterMerger.Result.html new file mode 100644 index 000000000..f853c7d51 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/FilterMerger.Result.html @@ -0,0 +1,178 @@ + + + + +FilterMerger.Result (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FilterMerger.Result

+
+
java.lang.Object +
org.bitcoinj.net.FilterMerger.Result
+
+
+
+
Enclosing class:
+
FilterMerger
+
+
+
public static class FilterMerger.Result +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      filter

      +
      public BloomFilter filter
      +
      +
    • +
    • +
      +

      earliestKeyTime

      +
      public Instant earliestKeyTime
      +
      +
    • +
    • +
      +

      changed

      +
      public boolean changed
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Result

      +
      public Result()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/FilterMerger.html b/javadoc/0.17-rc1/org/bitcoinj/net/FilterMerger.html new file mode 100644 index 000000000..aeb880c6c --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/FilterMerger.html @@ -0,0 +1,214 @@ + + + + +FilterMerger (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FilterMerger

+
+
java.lang.Object +
org.bitcoinj.net.FilterMerger
+
+
+
+
public class FilterMerger +extends Object
+

A reusable object that will calculate, given a list of PeerFilterProviders, a merged + BloomFilter and earliest key time for all of them. + Used by the PeerGroup class internally.

+ +

Thread safety: threading here can be complicated. Each filter provider is given a begin event, which may acquire + a lock (and is guaranteed to receive an end event). This class is mostly thread unsafe and is meant to be used from a + single thread only, PeerGroup ensures this by only accessing it from the dedicated PeerGroup thread. PeerGroup does + not hold any locks whilst this object is used, relying on the single thread to prevent multiple filters being + calculated in parallel, thus a filter provider can do things like make blocking calls into PeerGroup from a separate + thread. However the bloomFilterFPRate property IS thread safe, for convenience.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      FilterMerger

      +
      public FilterMerger(double bloomFilterFPRate)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      calculate

      +
      public FilterMerger.Result calculate(List<PeerFilterProvider> providerList)
      +
      +
    • +
    • +
      +

      setBloomFilterFPRate

      +
      @Deprecated +public void setBloomFilterFPRate(double bloomFilterFPRate)
      +
      Deprecated.
      +
      +
    • +
    • +
      +

      getBloomFilterFPRate

      +
      public double getBloomFilterFPRate()
      +
      +
    • +
    • +
      +

      getLastFilter

      +
      public BloomFilter getLastFilter()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/MessageWriteTarget.html b/javadoc/0.17-rc1/org/bitcoinj/net/MessageWriteTarget.html new file mode 100644 index 000000000..7cf4d4175 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/MessageWriteTarget.html @@ -0,0 +1,152 @@ + + + + +MessageWriteTarget (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface MessageWriteTarget

+
+
+
+
All Known Implementing Classes:
+
BlockingClient, NioClient
+
+
+
public interface MessageWriteTarget
+
A target to which messages can be written/connection can be closed
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      writeBytes

      +
      ListenableCompletableFuture<Void> writeBytes(byte[] message) + throws IOException
      +
      Writes the given bytes to the remote server. The returned future will complete when all bytes + have been written to the OS network buffer.
      +
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      closeConnection

      +
      void closeConnection()
      +
      Closes the connection to the server, triggering the StreamConnection.connectionClosed() + event on the network-handling thread where all callbacks occur.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/NioClient.html b/javadoc/0.17-rc1/org/bitcoinj/net/NioClient.html new file mode 100644 index 000000000..377c79bcd --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/NioClient.html @@ -0,0 +1,214 @@ + + + + +NioClient (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NioClient

+
+
java.lang.Object +
org.bitcoinj.net.NioClient
+
+
+
+
All Implemented Interfaces:
+
MessageWriteTarget
+
+
+
public class NioClient +extends Object +implements MessageWriteTarget
+
Creates a simple connection to a server using a StreamConnection to process data.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/NioClientManager.html b/javadoc/0.17-rc1/org/bitcoinj/net/NioClientManager.html new file mode 100644 index 000000000..f2cf18ec4 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/NioClientManager.html @@ -0,0 +1,270 @@ + + + + +NioClientManager (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NioClientManager

+
+
java.lang.Object +
com.google.common.util.concurrent.AbstractExecutionThreadService +
org.bitcoinj.net.NioClientManager
+
+
+
+
+
All Implemented Interfaces:
+
com.google.common.util.concurrent.Service, ClientConnectionManager
+
+
+
public class NioClientManager +extends com.google.common.util.concurrent.AbstractExecutionThreadService +implements ClientConnectionManager
+
A class which manages a set of client connections. Uses Java NIO to select network events and processes them in a + single network processing thread.
+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    +

    Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service

    +com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Creates a new client manager which uses Java NIO for socket management.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Closes n peer connections
    +
    +
    protected Executor
    + +
     
    +
    int
    + +
    +
    Gets the number of connected peers
    +
    + +
    openConnection(SocketAddress serverAddress, + StreamConnection connection)
    +
    +
    Creates a new connection to the given address, with the given connection used to handle incoming data.
    +
    +
    void
    +
    run()
    +
     
    +
    void
    + +
     
    +
    +
    +
    +
    +

    Methods inherited from class com.google.common.util.concurrent.AbstractExecutionThreadService

    +addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning, serviceName, shutDown, startAsync, startUp, state, stopAsync, toString
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    +
    +

    Methods inherited from interface com.google.common.util.concurrent.Service

    +addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NioClientManager

      +
      public NioClientManager()
      +
      Creates a new client manager which uses Java NIO for socket management. Uses a single thread to handle all select + calls.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      run

      +
      public void run()
      +
      +
      Specified by:
      +
      run in class com.google.common.util.concurrent.AbstractExecutionThreadService
      +
      +
      +
    • +
    • +
      +

      openConnection

      +
      public ListenableCompletableFuture<SocketAddress> openConnection(SocketAddress serverAddress, + StreamConnection connection)
      +
      Description copied from interface: ClientConnectionManager
      +
      Creates a new connection to the given address, with the given connection used to handle incoming data. Any errors + that occur during connection will be returned in the given future, including errors that can occur immediately.
      +
      +
      Specified by:
      +
      openConnection in interface ClientConnectionManager
      +
      +
      +
    • +
    • +
      +

      triggerShutdown

      +
      public void triggerShutdown()
      +
      +
      Overrides:
      +
      triggerShutdown in class com.google.common.util.concurrent.AbstractExecutionThreadService
      +
      +
      +
    • +
    • +
      +

      getConnectedClientCount

      +
      public int getConnectedClientCount()
      +
      Description copied from interface: ClientConnectionManager
      +
      Gets the number of connected peers
      +
      +
      Specified by:
      +
      getConnectedClientCount in interface ClientConnectionManager
      +
      +
      +
    • +
    • +
      +

      closeConnections

      +
      public void closeConnections(int n)
      +
      Description copied from interface: ClientConnectionManager
      +
      Closes n peer connections
      +
      +
      Specified by:
      +
      closeConnections in interface ClientConnectionManager
      +
      +
      +
    • +
    • +
      +

      executor

      +
      protected Executor executor()
      +
      +
      Overrides:
      +
      executor in class com.google.common.util.concurrent.AbstractExecutionThreadService
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/NioServer.html b/javadoc/0.17-rc1/org/bitcoinj/net/NioServer.html new file mode 100644 index 000000000..1f1b46067 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/NioServer.html @@ -0,0 +1,215 @@ + + + + +NioServer (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class NioServer

+
+
java.lang.Object +
com.google.common.util.concurrent.AbstractExecutionThreadService +
org.bitcoinj.net.NioServer
+
+
+
+
+
All Implemented Interfaces:
+
com.google.common.util.concurrent.Service
+
+
+
public class NioServer +extends com.google.common.util.concurrent.AbstractExecutionThreadService
+
Creates a simple server listener which listens for incoming client connections and uses a StreamConnection to + process data.
+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    +

    Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service

    +com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    NioServer(StreamConnectionFactory connectionFactory, + InetSocketAddress bindAddress)
    +
    +
    Creates a new server which is capable of listening for incoming connections and processing client provided data + using StreamConnections created by the given StreamConnectionFactory
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    protected void
    +
    run()
    +
     
    +
    void
    + +
    +
    Invoked by the Execution service when it's time to stop.
    +
    +
    +
    +
    +
    +

    Methods inherited from class com.google.common.util.concurrent.AbstractExecutionThreadService

    +addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, serviceName, shutDown, startAsync, startUp, state, stopAsync, toString
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      run

      +
      protected void run() + throws Exception
      +
      +
      Specified by:
      +
      run in class com.google.common.util.concurrent.AbstractExecutionThreadService
      +
      Throws:
      +
      Exception
      +
      +
      +
    • +
    • +
      +

      triggerShutdown

      +
      public void triggerShutdown()
      +
      Invoked by the Execution service when it's time to stop. + Calling this method directly will NOT stop the service, call + AbstractExecutionThreadService.stopAsync() instead.
      +
      +
      Overrides:
      +
      triggerShutdown in class com.google.common.util.concurrent.AbstractExecutionThreadService
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/SocketTimeoutTask.html b/javadoc/0.17-rc1/org/bitcoinj/net/SocketTimeoutTask.html new file mode 100644 index 000000000..d4090cd07 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/SocketTimeoutTask.html @@ -0,0 +1,200 @@ + + + + +SocketTimeoutTask (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SocketTimeoutTask

+
+
java.lang.Object +
org.bitcoinj.net.SocketTimeoutTask
+
+
+
+
All Implemented Interfaces:
+
TimeoutHandler
+
+
+
public class SocketTimeoutTask +extends Object +implements TimeoutHandler
+
Component that implements the timeout capability of TimeoutHandler.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SocketTimeoutTask

      +
      public SocketTimeoutTask(Runnable actualTask)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setTimeoutEnabled

      +
      public final void setTimeoutEnabled(boolean timeoutEnabled)
      +

      Enables or disables the timeout entirely. This may be useful if you want to store the timeout value but wish + to temporarily disable/enable timeouts.

      + +

      The default is for timeoutEnabled to be true but timeout to be set to Duration.ZERO (ie disabled).

      + +

      This call will reset the current progress towards the timeout.

      +
      +
      Specified by:
      +
      setTimeoutEnabled in interface TimeoutHandler
      +
      +
      +
    • +
    • +
      +

      setSocketTimeout

      +
      public final void setSocketTimeout(Duration timeout)
      +

      Sets the receive timeout, automatically killing the connection if no + messages are received for this long

      + +

      A timeout of Duration.ZERO is interpreted as no timeout.

      + +

      The default is for timeoutEnabled to be true but timeout to be set to Duration.ZERO (ie disabled).

      + +

      This call will reset the current progress towards the timeout.

      +
      +
      Specified by:
      +
      setSocketTimeout in interface TimeoutHandler
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/StreamConnection.html b/javadoc/0.17-rc1/org/bitcoinj/net/StreamConnection.html new file mode 100644 index 000000000..8e3d2ad81 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/StreamConnection.html @@ -0,0 +1,206 @@ + + + + +StreamConnection (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface StreamConnection

+
+
+
+
All Known Implementing Classes:
+
Peer, PeerSocketHandler
+
+
+
public interface StreamConnection
+
A generic handler which is used in NioServer, NioClient and BlockingClient to handle incoming + data streams. + + Used to be called StreamParser.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Called when the connection socket is closed
    +
    +
    void
    + +
    +
    Called when the connection socket is first opened
    +
    +
    int
    + +
    +
    Returns the maximum message size of a message on the socket.
    +
    +
    int
    + +
    +
    Called when new bytes are available from the remote end.
    +
    +
    void
    + +
    +
    Called when this connection is attached to an upstream write target (ie a low-level connection handler).
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      connectionClosed

      +
      void connectionClosed()
      +
      Called when the connection socket is closed
      +
      +
    • +
    • +
      +

      connectionOpened

      +
      void connectionOpened()
      +
      Called when the connection socket is first opened
      +
      +
    • +
    • +
      +

      receiveBytes

      +
      int receiveBytes(ByteBuffer buff) + throws Exception
      +

      Called when new bytes are available from the remote end. This should only ever be called by the single + writeTarget associated with any given StreamConnection, multiple callers will likely confuse implementations.

      + + Implementers/callers must follow the following conventions exactly: +
        +
      • buff will start with its limit set to the position we can read to and its position set to the location we + will start reading at (always 0)
      • +
      • May read more than one message (recursively) if there are enough bytes available
      • +
      • Uses some internal buffering to store message which are larger (incl their length prefix) than buff's + capacity(), ie it is up to this method to ensure we don't run out of buffer space to decode the next message. +
      • +
      • buff will end with its limit the same as it was previously, and its position set to the position up to which + bytes have been read (the same as its return value)
      • +
      • buff must be at least the size of a Bitcoin header (incl magic bytes).
      • +
      +
      +
      Returns:
      +
      The amount of bytes consumed which should not be provided again
      +
      Throws:
      +
      Exception
      +
      +
      +
    • +
    • +
      +

      setWriteTarget

      +
      void setWriteTarget(MessageWriteTarget writeTarget)
      +
      Called when this connection is attached to an upstream write target (ie a low-level connection handler). This + writeTarget should be stored and used to close the connection or write data to the socket.
      +
      +
    • +
    • +
      +

      getMaxMessageSize

      +
      int getMaxMessageSize()
      +
      Returns the maximum message size of a message on the socket. This is used in calculating size of buffers to + allocate.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/StreamConnectionFactory.html b/javadoc/0.17-rc1/org/bitcoinj/net/StreamConnectionFactory.html new file mode 100644 index 000000000..e8fbf005d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/StreamConnectionFactory.html @@ -0,0 +1,136 @@ + + + + +StreamConnectionFactory (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface StreamConnectionFactory

+
+
+
+
public interface StreamConnectionFactory
+
A factory which generates new StreamConnections when a new connection is opened.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + +
    getNewConnection(InetAddress inetAddress, + int port)
    +
    +
    Returns a new handler or null to have the connection close.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getNewConnection

      +
      @Nullable +StreamConnection getNewConnection(InetAddress inetAddress, + int port)
      +
      Returns a new handler or null to have the connection close.
      +
      +
      Parameters:
      +
      inetAddress - The client's (IP) address
      +
      port - The remote port on the client side
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/TimeoutHandler.html b/javadoc/0.17-rc1/org/bitcoinj/net/TimeoutHandler.html new file mode 100644 index 000000000..847e8f151 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/TimeoutHandler.html @@ -0,0 +1,158 @@ + + + + +TimeoutHandler (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface TimeoutHandler

+
+
+
+
All Known Implementing Classes:
+
AbstractTimeoutHandler, Peer, PeerSocketHandler, SocketTimeoutTask
+
+
+
public interface TimeoutHandler
+
Provides basic support for socket timeouts. It is used instead of integrating timeouts into the + NIO select thread both for simplicity and to keep code shared between NIO and blocking sockets as much as possible.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Sets the receive timeout, automatically killing the connection if no + messages are received for this long
    +
    +
    void
    +
    setTimeoutEnabled(boolean timeoutEnabled)
    +
    +
    Enables or disables the timeout entirely.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setTimeoutEnabled

      +
      void setTimeoutEnabled(boolean timeoutEnabled)
      +

      Enables or disables the timeout entirely. This may be useful if you want to store the timeout value but wish + to temporarily disable/enable timeouts.

      + +

      The default is for timeoutEnabled to be true but timeout to be set to 0 (ie disabled).

      + +

      This call will reset the current progress towards the timeout.

      +
      +
    • +
    • +
      +

      setSocketTimeout

      +
      void setSocketTimeout(Duration timeout)
      +

      Sets the receive timeout, automatically killing the connection if no + messages are received for this long

      + +

      A timeout of Duration.ZERO is interpreted as no timeout.

      + +

      The default is for timeoutEnabled to be true but timeout to be set to Duration.ZERO (ie disabled).

      + +

      This call will reset the current progress towards the timeout.

      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/discovery/DnsDiscovery.DnsSeedDiscovery.html b/javadoc/0.17-rc1/org/bitcoinj/net/discovery/DnsDiscovery.DnsSeedDiscovery.html new file mode 100644 index 000000000..f4aef9ea3 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/discovery/DnsDiscovery.DnsSeedDiscovery.html @@ -0,0 +1,239 @@ + + + + +DnsDiscovery.DnsSeedDiscovery (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DnsDiscovery.DnsSeedDiscovery

+
+
java.lang.Object +
org.bitcoinj.net.discovery.DnsDiscovery.DnsSeedDiscovery
+
+
+
+
All Implemented Interfaces:
+
PeerDiscovery
+
+
+
Enclosing class:
+
DnsDiscovery
+
+
+
public static class DnsDiscovery.DnsSeedDiscovery +extends Object +implements PeerDiscovery
+
Implements discovery from a single DNS host.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/discovery/DnsDiscovery.html b/javadoc/0.17-rc1/org/bitcoinj/net/discovery/DnsDiscovery.html new file mode 100644 index 000000000..fa3bd986d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/discovery/DnsDiscovery.html @@ -0,0 +1,268 @@ + + + + +DnsDiscovery (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DnsDiscovery

+
+
java.lang.Object +
org.bitcoinj.net.discovery.MultiplexingDiscovery +
org.bitcoinj.net.discovery.DnsDiscovery
+
+
+
+
+
All Implemented Interfaces:
+
PeerDiscovery
+
+
+
public class DnsDiscovery +extends MultiplexingDiscovery
+

Supports peer discovery through DNS.

+ +

Failure to resolve individual host names will not cause an Exception to be thrown. + However, if all hosts passed fail to resolve a PeerDiscoveryException will be thrown during getPeers(). +

+ +

DNS seeds do not attempt to enumerate every peer on the network. MultiplexingDiscovery.getPeers(long, Duration) + will return up to 30 random peers from the set of those returned within the timeout period. If you want more peers + to connect to, you need to discover them via other means (like addr broadcasts).

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DnsDiscovery

      +
      public DnsDiscovery(Network network)
      +
      Supports finding peers through DNS A records. Community run DNS entry points will be used.
      +
      +
      Parameters:
      +
      network - Network to be used for port information.
      +
      +
      +
    • +
    • +
      +

      DnsDiscovery

      +
      public DnsDiscovery(String[] dnsSeeds, + Network network)
      +
      Supports finding peers through DNS A records.
      +
      +
      Parameters:
      +
      dnsSeeds - Host names to be examined for seed addresses.
      +
      network - Network to be used for port information.
      +
      +
      +
    • +
    • +
      +

      DnsDiscovery

      +
      @Deprecated +public DnsDiscovery(NetworkParameters netParams)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      DnsDiscovery

      +
      @Deprecated +public DnsDiscovery(String[] dnsSeeds, + NetworkParameters params)
      + +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/discovery/MultiplexingDiscovery.html b/javadoc/0.17-rc1/org/bitcoinj/net/discovery/MultiplexingDiscovery.html new file mode 100644 index 000000000..a9b7fd1f9 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/discovery/MultiplexingDiscovery.html @@ -0,0 +1,374 @@ + + + + +MultiplexingDiscovery (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MultiplexingDiscovery

+
+
java.lang.Object +
org.bitcoinj.net.discovery.MultiplexingDiscovery
+
+
+
+
All Implemented Interfaces:
+
PeerDiscovery
+
+
+
Direct Known Subclasses:
+
DnsDiscovery
+
+
+
public class MultiplexingDiscovery +extends Object +implements PeerDiscovery
+
MultiplexingDiscovery queries multiple PeerDiscovery objects, optionally shuffles their responses and then returns the results, + thus selecting randomly between them and reducing the influence of any particular seed. Any that don't respond + within the timeout are ignored. Backends are queried in parallel or serially. Backends may block.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/discovery/PeerDiscovery.html b/javadoc/0.17-rc1/org/bitcoinj/net/discovery/PeerDiscovery.html new file mode 100644 index 000000000..08180fdc3 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/discovery/PeerDiscovery.html @@ -0,0 +1,183 @@ + + + + +PeerDiscovery (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface PeerDiscovery

+
+
+
+
All Known Implementing Classes:
+
DnsDiscovery, DnsDiscovery.DnsSeedDiscovery, MultiplexingDiscovery, SeedPeers
+
+
+
public interface PeerDiscovery
+
A PeerDiscovery object is responsible for finding addresses of other nodes in the Bitcoin P2P network. Note that + the addresses returned may or may not be accepting connections.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/discovery/PeerDiscoveryException.html b/javadoc/0.17-rc1/org/bitcoinj/net/discovery/PeerDiscoveryException.html new file mode 100644 index 000000000..810be05c4 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/discovery/PeerDiscoveryException.html @@ -0,0 +1,172 @@ + + + + +PeerDiscoveryException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PeerDiscoveryException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.net.discovery.PeerDiscoveryException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class PeerDiscoveryException +extends Exception
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PeerDiscoveryException

      +
      public PeerDiscoveryException()
      +
      +
    • +
    • +
      +

      PeerDiscoveryException

      +
      public PeerDiscoveryException(String message)
      +
      +
    • +
    • +
      +

      PeerDiscoveryException

      +
      public PeerDiscoveryException(Throwable arg0)
      +
      +
    • +
    • +
      +

      PeerDiscoveryException

      +
      public PeerDiscoveryException(String message, + Throwable arg0)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/discovery/SeedPeers.html b/javadoc/0.17-rc1/org/bitcoinj/net/discovery/SeedPeers.html new file mode 100644 index 000000000..41619e89d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/discovery/SeedPeers.html @@ -0,0 +1,270 @@ + + + + +SeedPeers (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SeedPeers

+
+
java.lang.Object +
org.bitcoinj.net.discovery.SeedPeers
+
+
+
+
All Implemented Interfaces:
+
PeerDiscovery
+
+
+
public class SeedPeers +extends Object +implements PeerDiscovery
+
SeedPeers stores a pre-determined list of Bitcoin node addresses. These nodes are selected based on being + active on the network for a long period of time. The intention is to be a last resort way of finding a connection + to the network, in case IRC and DNS fail. The list comes from the Bitcoin C++ source code.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SeedPeers

      +
      public SeedPeers(InetSocketAddress[] seedAddrs)
      +
      Supports finding peers by IP addresses/ports
      +
      +
      Parameters:
      +
      seedAddrs - IP addresses/ports of seeds.
      +
      +
      +
    • +
    • +
      +

      SeedPeers

      +
      @Deprecated +public SeedPeers(NetworkParameters params)
      + +
      Supports finding peers by IP addresses
      +
      +
      Parameters:
      +
      params - Network parameters to be used for port information.
      +
      +
      +
    • +
    • +
      +

      SeedPeers

      +
      @Deprecated +public SeedPeers(int[] seedAddrInts, + NetworkParameters params)
      + +
      Supports finding peers by IP addresses
      +
      +
      Parameters:
      +
      seedAddrInts - IP addresses for seed addresses.
      +
      params - Network parameters to be used for port information.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getPeer

      +
      @Nullable +public InetSocketAddress getPeer()
      +
      Acts as an iterator, returning the address of each node in the list sequentially. + Once all the list has been iterated, null will be returned for each subsequent query.
      +
      +
      Returns:
      +
      InetSocketAddress - The address/port of the next node.
      +
      +
      +
    • +
    • +
      +

      getPeers

      +
      public List<InetSocketAddress> getPeers(long services, + Duration timeout)
      +
      Returns all the Bitcoin nodes within the list.
      +
      +
      Specified by:
      +
      getPeers in interface PeerDiscovery
      +
      Parameters:
      +
      services - ignored
      +
      timeout - ignored
      +
      Returns:
      +
      the pre-determined list of peers
      +
      +
      +
    • +
    • +
      +

      shutdown

      +
      public void shutdown()
      +
      Description copied from interface: PeerDiscovery
      +
      Stops any discovery in progress when we want to shut down quickly.
      +
      +
      Specified by:
      +
      shutdown in interface PeerDiscovery
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/discovery/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/net/discovery/package-summary.html new file mode 100644 index 000000000..47de43244 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/discovery/package-summary.html @@ -0,0 +1,126 @@ + + + + +org.bitcoinj.net.discovery (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.net.discovery

+
+
+
package org.bitcoinj.net.discovery
+
+
Classes that know how to discover peers in the P2P network using DNS or HTTP.
+
+
+
    +
  • + +
  • +
  • +
    +
    +
    +
    +
    Class
    +
    Description
    + +
    +
    Supports peer discovery through DNS.
    +
    + +
    +
    Implements discovery from a single DNS host.
    +
    + +
    +
    MultiplexingDiscovery queries multiple PeerDiscovery objects, optionally shuffles their responses and then returns the results, + thus selecting randomly between them and reducing the influence of any particular seed.
    +
    + +
    +
    A PeerDiscovery object is responsible for finding addresses of other nodes in the Bitcoin P2P network.
    +
    + +
     
    + +
    +
    SeedPeers stores a pre-determined list of Bitcoin node addresses.
    +
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/discovery/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/net/discovery/package-tree.html new file mode 100644 index 000000000..b6a9a93be --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/discovery/package-tree.html @@ -0,0 +1,92 @@ + + + + +org.bitcoinj.net.discovery Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.net.discovery

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/net/package-summary.html new file mode 100644 index 000000000..4d7562d50 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/package-summary.html @@ -0,0 +1,162 @@ + + + + +org.bitcoinj.net (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.net

+
+
+
package org.bitcoinj.net
+
+
Classes handling low level network management using either NIO (async io) or older style blocking sockets (useful for + using SOCKS proxies, Tor, SSL etc). The code in this package implements a simple network abstraction a little like + what the Netty library provides, but with only what bitcoinj needs.
+
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/net/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/net/package-tree.html new file mode 100644 index 000000000..83f84a879 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/net/package-tree.html @@ -0,0 +1,101 @@ + + + + +org.bitcoinj.net Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.net

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/params/BitcoinNetworkParams.html b/javadoc/0.17-rc1/org/bitcoinj/params/BitcoinNetworkParams.html new file mode 100644 index 000000000..6c66fd7c2 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/params/BitcoinNetworkParams.html @@ -0,0 +1,505 @@ + + + + +BitcoinNetworkParams (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BitcoinNetworkParams

+
+
java.lang.Object +
org.bitcoinj.core.NetworkParameters +
org.bitcoinj.params.BitcoinNetworkParams
+
+
+
+
+
Direct Known Subclasses:
+
MainNetParams, RegTestParams, SigNetParams, TestNet3Params, UnitTestParams
+
+
+
public abstract class BitcoinNetworkParams +extends NetworkParameters
+
Parameters for Bitcoin-like networks.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BitcoinNetworkParams

      +
      public BitcoinNetworkParams(BitcoinNetwork network)
      +
      No-args constructor
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      fromID

      +
      @Nullable +public static BitcoinNetworkParams fromID(String id)
      +
      Return network parameters for a network id
      +
      +
      Parameters:
      +
      id - the network id
      +
      Returns:
      +
      the network parameters for the given string ID or NULL if not recognized
      +
      +
      +
    • +
    • +
      +

      of

      +
      public static BitcoinNetworkParams of(BitcoinNetwork network)
      +
      Return network parameters for a BitcoinNetwork enum
      +
      +
      Parameters:
      +
      network - the network
      +
      Returns:
      +
      the network parameters for the given string ID
      +
      Throws:
      +
      IllegalArgumentException - if unknown network
      +
      +
      +
    • +
    • +
      +

      getPaymentProtocolId

      +
      @Deprecated +public String getPaymentProtocolId()
      + +
      +
      Specified by:
      +
      getPaymentProtocolId in class NetworkParameters
      +
      Returns:
      +
      the payment protocol network id string
      +
      +
      +
    • +
    • +
      +

      isRewardHalvingPoint

      +
      public final boolean isRewardHalvingPoint(int previousHeight)
      +
      Checks if we are at a reward halving point.
      +
      +
      Parameters:
      +
      previousHeight - The height of the previous stored block
      +
      Returns:
      +
      If this is a reward halving point
      +
      +
      +
    • +
    • +
      +

      getBlockInflation

      +
      public Coin getBlockInflation(int height)
      +

      A utility method that calculates how much new Bitcoin would be created by the block at the given height. + The inflation of Bitcoin is predictable and drops roughly every 4 years (210,000 blocks). At the dawn of + the system it was 50 coins per block, in late 2012 it went to 25 coins per block, and so on. The size of + a coinbase transaction is inflation plus fees.

      + +

      The half-life is controlled by NetworkParameters.getSubsidyDecreaseBlockCount().

      +
      +
      Parameters:
      +
      height - the height of the block to calculate inflation for
      +
      Returns:
      +
      block reward (inflation) for specified block
      +
      +
      +
    • +
    • +
      +

      isDifficultyTransitionPoint

      +
      public final boolean isDifficultyTransitionPoint(int previousHeight)
      +
      Checks if we are at a difficulty transition point.
      +
      +
      Parameters:
      +
      previousHeight - The height of the previous stored block
      +
      Returns:
      +
      If this is a difficulty transition point
      +
      +
      +
    • +
    • +
      +

      checkDifficultyTransitions

      +
      public void checkDifficultyTransitions(StoredBlock storedPrev, + Block nextBlock, + BlockStore blockStore) + throws VerificationException, +BlockStoreException
      +
      Description copied from class: NetworkParameters
      +
      Throws an exception if the block's difficulty is not correct.
      +
      +
      Specified by:
      +
      checkDifficultyTransitions in class NetworkParameters
      +
      Parameters:
      +
      storedPrev - previous stored block
      +
      nextBlock - proposed block
      +
      blockStore - active BlockStore
      +
      Throws:
      +
      VerificationException - if the block's difficulty is not correct.
      +
      BlockStoreException - if an error occurred accessing the BlockStore
      +
      +
      +
    • +
    • +
      +

      getMaxMoney

      +
      @Deprecated +public Coin getMaxMoney()
      +
      Deprecated.
      +
      Description copied from class: NetworkParameters
      +
      Returns the number of coins that will be produced in total, on this + network. Where not applicable, a very large number of coins is returned + instead (e.g. the main coin issue for Dogecoin).
      +
      +
      Specified by:
      +
      getMaxMoney in class NetworkParameters
      +
      Returns:
      +
      maximum number of coins for this network
      +
      +
      +
    • +
    • +
      +

      getMonetaryFormat

      +
      @Deprecated +public MonetaryFormat getMonetaryFormat()
      +
      Deprecated. +
      Get one another way or construct your own MonetaryFormat as needed.
      +
      +
      Description copied from class: NetworkParameters
      +
      The monetary object for this currency.
      +
      +
      Specified by:
      +
      getMonetaryFormat in class NetworkParameters
      +
      Returns:
      +
      formatting utility object
      +
      +
      +
    • +
    • +
      +

      getSerializer

      +
      public BitcoinSerializer getSerializer()
      +
      Description copied from class: NetworkParameters
      +
      Construct and return a custom serializer.
      +
      +
      Specified by:
      +
      getSerializer in class NetworkParameters
      +
      Returns:
      +
      the serializer
      +
      +
      +
    • +
    • +
      +

      getUriScheme

      +
      @Deprecated +public String getUriScheme()
      +
      Deprecated.
      +
      Description copied from class: NetworkParameters
      +
      Scheme part for URIs, for example "bitcoin".
      +
      +
      Specified by:
      +
      getUriScheme in class NetworkParameters
      +
      Returns:
      +
      a string with the "scheme" part
      +
      +
      +
    • +
    • +
      +

      hasMaxMoney

      +
      @Deprecated +public boolean hasMaxMoney()
      +
      Deprecated.
      +
      Description copied from class: NetworkParameters
      +
      Returns whether this network has a maximum number of coins (finite supply) or + not. Always returns true for Bitcoin, but exists to be overridden for other + networks.
      +
      +
      Specified by:
      +
      hasMaxMoney in class NetworkParameters
      +
      Returns:
      +
      true if network has a fixed maximum number of coins
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/params/MainNetParams.html b/javadoc/0.17-rc1/org/bitcoinj/params/MainNetParams.html new file mode 100644 index 000000000..9b5b3d47e --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/params/MainNetParams.html @@ -0,0 +1,273 @@ + + + + +MainNetParams (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MainNetParams

+
+ +
+
+
public class MainNetParams +extends BitcoinNetworkParams
+
Parameters for the main production network on which people trade goods and services.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      MAINNET_MAJORITY_WINDOW

      +
      public static final int MAINNET_MAJORITY_WINDOW
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      MAINNET_MAJORITY_REJECT_BLOCK_OUTDATED

      +
      public static final int MAINNET_MAJORITY_REJECT_BLOCK_OUTDATED
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      MAINNET_MAJORITY_ENFORCE_BLOCK_UPGRADE

      +
      public static final int MAINNET_MAJORITY_ENFORCE_BLOCK_UPGRADE
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MainNetParams

      +
      public MainNetParams()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      get

      +
      public static MainNetParams get()
      +
      +
    • +
    • +
      +

      getGenesisBlock

      +
      public Block getGenesisBlock()
      +
      Description copied from class: NetworkParameters
      +

      Genesis block for this chain.

      + +

      The first block in every chain is a well known constant shared between all Bitcoin implementations. For a + block to be valid, it must be eventually possible to work backwards to the genesis block by following the + prevBlockHash pointers in the block headers.

      + +

      The genesis blocks for both test and main networks contain the timestamp of when they were created, + and a message in the coinbase transaction. It says, "The Times 03/Jan/2009 Chancellor on brink of second + bailout for banks".

      +
      +
      Specified by:
      +
      getGenesisBlock in class NetworkParameters
      +
      Returns:
      +
      genesis block
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/params/Networks.html b/javadoc/0.17-rc1/org/bitcoinj/params/Networks.html new file mode 100644 index 000000000..5622f8420 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/params/Networks.html @@ -0,0 +1,231 @@ + + + + +Networks (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Networks

+
+
java.lang.Object +
org.bitcoinj.params.Networks
+
+
+
+
public class Networks +extends Object
+
Utility class that holds all the registered NetworkParameters types used for address auto discovery. + By default only MainNetParams and TestNet3Params are used. If you want to use RegTestParams + or UnitTestParams use register and then unregister the TestNet3Params as they don't + have their own Base58 version/type code (although for SegwitAddress the human-readable + parts for RegTest and TestNet are different.)
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Networks

      +
      public Networks()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      get

      +
      public static Set<NetworkParameters> get()
      +
      +
    • +
    • +
      +

      find

      +
      public static Optional<NetworkParameters> find(Network network)
      + +
      +
      Parameters:
      +
      network - The network to find (convert)
      +
      Returns:
      +
      Matching params if one was registered
      +
      +
      +
    • +
    • +
      +

      register

      +
      public static void register(NetworkParameters network)
      +
      Register a single network type by adding it to the Set.
      +
      +
      Parameters:
      +
      network - Network to register/add.
      +
      +
      +
    • +
    • +
      +

      register

      +
      public static void register(Collection<NetworkParameters> networks)
      +
      Register a collection of additional network types by adding them + to the Set.
      +
      +
      Parameters:
      +
      networks - Networks to register/add.
      +
      +
      +
    • +
    • +
      +

      unregister

      +
      public static void unregister(NetworkParameters network)
      +
      Unregister a network type.
      +
      +
      Parameters:
      +
      network - Network type to unregister/remove.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/params/RegTestParams.html b/javadoc/0.17-rc1/org/bitcoinj/params/RegTestParams.html new file mode 100644 index 000000000..8bc6a1701 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/params/RegTestParams.html @@ -0,0 +1,227 @@ + + + + +RegTestParams (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class RegTestParams

+
+ +
+
+
public class RegTestParams +extends BitcoinNetworkParams
+
Network parameters for the regression test mode of bitcoind in which all blocks are trivially solvable.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      RegTestParams

      +
      public RegTestParams()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      allowEmptyPeerChain

      +
      public boolean allowEmptyPeerChain()
      +
      Description copied from class: NetworkParameters
      +
      If we are running in testnet-in-a-box mode, we allow connections to nodes with 0 non-genesis blocks.
      +
      +
      Overrides:
      +
      allowEmptyPeerChain in class NetworkParameters
      +
      Returns:
      +
      true if allowed
      +
      +
      +
    • +
    • +
      +

      get

      +
      public static RegTestParams get()
      +
      +
    • +
    • +
      +

      getGenesisBlock

      +
      public Block getGenesisBlock()
      +
      Description copied from class: NetworkParameters
      +

      Genesis block for this chain.

      + +

      The first block in every chain is a well known constant shared between all Bitcoin implementations. For a + block to be valid, it must be eventually possible to work backwards to the genesis block by following the + prevBlockHash pointers in the block headers.

      + +

      The genesis blocks for both test and main networks contain the timestamp of when they were created, + and a message in the coinbase transaction. It says, "The Times 03/Jan/2009 Chancellor on brink of second + bailout for banks".

      +
      +
      Specified by:
      +
      getGenesisBlock in class NetworkParameters
      +
      Returns:
      +
      genesis block
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/params/SigNetParams.html b/javadoc/0.17-rc1/org/bitcoinj/params/SigNetParams.html new file mode 100644 index 000000000..dca73881e --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/params/SigNetParams.html @@ -0,0 +1,275 @@ + + + + +SigNetParams (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SigNetParams

+
+ +
+
+
public class SigNetParams +extends BitcoinNetworkParams
+

Parameters for the signet, a separate public instance of Bitcoin that has relaxed rules suitable for development + and testing of applications and new Bitcoin versions.

+

See BIP325

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      TESTNET_MAJORITY_WINDOW

      +
      public static final int TESTNET_MAJORITY_WINDOW
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED

      +
      public static final int TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE

      +
      public static final int TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SigNetParams

      +
      public SigNetParams()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      get

      +
      public static SigNetParams get()
      +
      +
    • +
    • +
      +

      getGenesisBlock

      +
      public Block getGenesisBlock()
      +
      Description copied from class: NetworkParameters
      +

      Genesis block for this chain.

      + +

      The first block in every chain is a well known constant shared between all Bitcoin implementations. For a + block to be valid, it must be eventually possible to work backwards to the genesis block by following the + prevBlockHash pointers in the block headers.

      + +

      The genesis blocks for both test and main networks contain the timestamp of when they were created, + and a message in the coinbase transaction. It says, "The Times 03/Jan/2009 Chancellor on brink of second + bailout for banks".

      +
      +
      Specified by:
      +
      getGenesisBlock in class NetworkParameters
      +
      Returns:
      +
      genesis block
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/params/TestNet3Params.html b/javadoc/0.17-rc1/org/bitcoinj/params/TestNet3Params.html new file mode 100644 index 000000000..f0539fd99 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/params/TestNet3Params.html @@ -0,0 +1,304 @@ + + + + +TestNet3Params (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TestNet3Params

+
+ +
+
+
public class TestNet3Params +extends BitcoinNetworkParams
+
Parameters for the testnet, a separate public instance of Bitcoin that has relaxed rules suitable for development + and testing of applications and new Bitcoin versions.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      TESTNET_MAJORITY_WINDOW

      +
      public static final int TESTNET_MAJORITY_WINDOW
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED

      +
      public static final int TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE

      +
      public static final int TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      TestNet3Params

      +
      public TestNet3Params()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      get

      +
      public static TestNet3Params get()
      +
      +
    • +
    • +
      +

      getGenesisBlock

      +
      public Block getGenesisBlock()
      +
      Description copied from class: NetworkParameters
      +

      Genesis block for this chain.

      + +

      The first block in every chain is a well known constant shared between all Bitcoin implementations. For a + block to be valid, it must be eventually possible to work backwards to the genesis block by following the + prevBlockHash pointers in the block headers.

      + +

      The genesis blocks for both test and main networks contain the timestamp of when they were created, + and a message in the coinbase transaction. It says, "The Times 03/Jan/2009 Chancellor on brink of second + bailout for banks".

      +
      +
      Specified by:
      +
      getGenesisBlock in class NetworkParameters
      +
      Returns:
      +
      genesis block
      +
      +
      +
    • +
    • +
      +

      checkDifficultyTransitions

      +
      public void checkDifficultyTransitions(StoredBlock storedPrev, + Block nextBlock, + BlockStore blockStore) + throws VerificationException, +BlockStoreException
      +
      Description copied from class: NetworkParameters
      +
      Throws an exception if the block's difficulty is not correct.
      +
      +
      Overrides:
      +
      checkDifficultyTransitions in class BitcoinNetworkParams
      +
      Parameters:
      +
      storedPrev - previous stored block
      +
      nextBlock - proposed block
      +
      blockStore - active BlockStore
      +
      Throws:
      +
      VerificationException - if the block's difficulty is not correct.
      +
      BlockStoreException - if an error occurred accessing the BlockStore
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/params/UnitTestParams.html b/javadoc/0.17-rc1/org/bitcoinj/params/UnitTestParams.html new file mode 100644 index 000000000..d40bdda74 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/params/UnitTestParams.html @@ -0,0 +1,274 @@ + + + + +UnitTestParams (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class UnitTestParams

+
+ +
+
+
public class UnitTestParams +extends BitcoinNetworkParams
+
Network parameters used by the bitcoinj unit tests (and potentially your own). This lets you solve a block using + Block.solve() by setting difficulty to the easiest possible.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      UNITNET_MAJORITY_WINDOW

      +
      public static final int UNITNET_MAJORITY_WINDOW
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED

      +
      public static final int TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE

      +
      public static final int TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      UnitTestParams

      +
      public UnitTestParams()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      get

      +
      public static UnitTestParams get()
      +
      +
    • +
    • +
      +

      getGenesisBlock

      +
      public Block getGenesisBlock()
      +
      Description copied from class: NetworkParameters
      +

      Genesis block for this chain.

      + +

      The first block in every chain is a well known constant shared between all Bitcoin implementations. For a + block to be valid, it must be eventually possible to work backwards to the genesis block by following the + prevBlockHash pointers in the block headers.

      + +

      The genesis blocks for both test and main networks contain the timestamp of when they were created, + and a message in the coinbase transaction. It says, "The Times 03/Jan/2009 Chancellor on brink of second + bailout for banks".

      +
      +
      Specified by:
      +
      getGenesisBlock in class NetworkParameters
      +
      Returns:
      +
      genesis block
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/params/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/params/package-summary.html new file mode 100644 index 000000000..87f166bbd --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/params/package-summary.html @@ -0,0 +1,114 @@ + + + + +org.bitcoinj.params (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.params

+
+
+
package org.bitcoinj.params
+
+
Network parameters encapsulate some of the differences between different Bitcoin networks such as the main + network, the testnet, regtest mode, unit testing params and so on.
+
+
+
    +
  • +
    +
    Classes
    +
    +
    Class
    +
    Description
    + +
    +
    Parameters for Bitcoin-like networks.
    +
    + +
    +
    Parameters for the main production network on which people trade goods and services.
    +
    + +
    +
    Utility class that holds all the registered NetworkParameters types used for address auto discovery.
    +
    + +
    +
    Network parameters for the regression test mode of bitcoind in which all blocks are trivially solvable.
    +
    + +
    +
    Parameters for the signet, a separate public instance of Bitcoin that has relaxed rules suitable for development + and testing of applications and new Bitcoin versions.
    +
    + +
    +
    Parameters for the testnet, a separate public instance of Bitcoin that has relaxed rules suitable for development + and testing of applications and new Bitcoin versions.
    +
    + +
    +
    Network parameters used by the bitcoinj unit tests (and potentially your own).
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/params/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/params/package-tree.html new file mode 100644 index 000000000..2042f8120 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/params/package-tree.html @@ -0,0 +1,84 @@ + + + + +org.bitcoinj.params Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.params

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocol.Ack.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocol.Ack.html new file mode 100644 index 000000000..925534034 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocol.Ack.html @@ -0,0 +1,142 @@ + + + + +PaymentProtocol.Ack (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentProtocol.Ack

+
+
java.lang.Object +
org.bitcoinj.protocols.payments.PaymentProtocol.Ack
+
+
+
+
Enclosing class:
+
PaymentProtocol
+
+
+
public static class PaymentProtocol.Ack +extends Object
+
Message returned by the merchant in response to a Payment message.
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getMemo

      +
      @Nullable +public String getMemo()
      +
      Returns the memo included by the merchant in the payment ack. This message is typically displayed to the user + as a notification (e.g. "Your payment was received and is being processed"). If none was provided, returns + null.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocol.Output.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocol.Output.html new file mode 100644 index 000000000..2fb359b10 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocol.Output.html @@ -0,0 +1,174 @@ + + + + +PaymentProtocol.Output (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentProtocol.Output

+
+
java.lang.Object +
org.bitcoinj.protocols.payments.PaymentProtocol.Output
+
+
+
+
Enclosing class:
+
PaymentProtocol
+
+
+
public static class PaymentProtocol.Output +extends Object
+
Value object to hold amount/script pairs.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      amount

      +
      @Nullable +public final Coin amount
      +
      +
    • +
    • +
      +

      scriptData

      +
      public final byte[] scriptData
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Output

      +
      public Output(@Nullable + Coin amount, + byte[] scriptData)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocol.PkiVerificationData.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocol.PkiVerificationData.html new file mode 100644 index 000000000..5361537fa --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocol.PkiVerificationData.html @@ -0,0 +1,208 @@ + + + + +PaymentProtocol.PkiVerificationData (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentProtocol.PkiVerificationData

+
+
java.lang.Object +
org.bitcoinj.protocols.payments.PaymentProtocol.PkiVerificationData
+
+
+
+
Enclosing class:
+
PaymentProtocol
+
+
+
public static class PaymentProtocol.PkiVerificationData +extends Object
+
Information about the X.509 signature's issuer and subject.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      displayName

      +
      public final String displayName
      +
      Display name of the payment requestor, could be a domain name, email address, legal name, etc
      +
      +
    • +
    • +
      +

      merchantSigningKey

      +
      public final PublicKey merchantSigningKey
      +
      SSL public key that was used to sign.
      +
      +
    • +
    • +
      +

      rootAuthority

      +
      public final TrustAnchor rootAuthority
      +
      Object representing the CA that verified the merchant's ID
      +
      +
    • +
    • +
      +

      rootAuthorityName

      +
      public final String rootAuthorityName
      +
      String representing the display name of the CA that verified the merchant's ID
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocol.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocol.html new file mode 100644 index 000000000..1a66f8bd0 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocol.html @@ -0,0 +1,664 @@ + + + + +PaymentProtocol (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentProtocol

+
+
java.lang.Object +
org.bitcoinj.protocols.payments.PaymentProtocol
+
+
+
+
public class PaymentProtocol +extends Object
+

Utility methods and constants for working with + BIP 70 aka the payment protocol. These are low level wrappers around the protocol buffers. If you're implementing + a wallet app, look at PaymentSession for a higher level API that should simplify working with the protocol.

+ +

BIP 70 defines a binary, protobuf based protocol that runs directly between sender and receiver of funds. Payment + protocol data does not flow over the Bitcoin P2P network or enter the block chain. It's instead for data that is only + of interest to the parties involved but isn't otherwise needed for consensus.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      MIMETYPE_PAYMENTREQUEST

      +
      public static final String MIMETYPE_PAYMENTREQUEST
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      MIMETYPE_PAYMENT

      +
      public static final String MIMETYPE_PAYMENT
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      MIMETYPE_PAYMENTACK

      +
      public static final String MIMETYPE_PAYMENTACK
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      PAYMENT_PROTOCOL_ID_MAINNET

      +
      public static final String PAYMENT_PROTOCOL_ID_MAINNET
      +
      The string used by the payment protocol to represent the main net.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      PAYMENT_PROTOCOL_ID_TESTNET

      +
      public static final String PAYMENT_PROTOCOL_ID_TESTNET
      +
      The string used by the payment protocol to represent the test net.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      PAYMENT_PROTOCOL_ID_SIGNET

      +
      public static final String PAYMENT_PROTOCOL_ID_SIGNET
      +
      The string used by the payment protocol to represent signet (note that this is non-standard).
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      PAYMENT_PROTOCOL_ID_UNIT_TESTS

      +
      public static final String PAYMENT_PROTOCOL_ID_UNIT_TESTS
      +
      The string used by the payment protocol to represent unit testing (note that this is non-standard).
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      PAYMENT_PROTOCOL_ID_REGTEST

      +
      public static final String PAYMENT_PROTOCOL_ID_REGTEST
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PaymentProtocol

      +
      public PaymentProtocol()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      createPaymentRequest

      +
      public static org.bitcoinj.protobuf.payments.Protos.PaymentRequest.Builder createPaymentRequest(NetworkParameters params, + @Nullable + Coin amount, + Address toAddress, + @Nullable + String memo, + @Nullable + String paymentUrl, + @Nullable + byte[] merchantData)
      +
      Create a payment request with one standard pay to address output. You may want to sign the request using + signPaymentRequest(org.bitcoinj.protobuf.payments.Protos.PaymentRequest.Builder, java.security.cert.X509Certificate[], java.security.PrivateKey). Use GeneratedMessageLite.Builder.build() to get the actual payment + request.
      +
      +
      Parameters:
      +
      params - network parameters
      +
      amount - amount of coins to request, or null
      +
      toAddress - address to request coins to
      +
      memo - arbitrary, user readable memo, or null if none
      +
      paymentUrl - URL to send payment message to, or null if none
      +
      merchantData - arbitrary merchant data, or null if none
      +
      Returns:
      +
      created payment request, in its builder form
      +
      +
      +
    • +
    • +
      +

      createPaymentRequest

      +
      public static org.bitcoinj.protobuf.payments.Protos.PaymentRequest.Builder createPaymentRequest(NetworkParameters params, + List<org.bitcoinj.protobuf.payments.Protos.Output> outputs, + @Nullable + String memo, + @Nullable + String paymentUrl, + @Nullable + byte[] merchantData)
      +
      Create a payment request. You may want to sign the request using signPaymentRequest(org.bitcoinj.protobuf.payments.Protos.PaymentRequest.Builder, java.security.cert.X509Certificate[], java.security.PrivateKey). Use + GeneratedMessageLite.Builder.build() to get the actual payment request.
      +
      +
      Parameters:
      +
      params - network parameters
      +
      outputs - list of outputs to request coins to
      +
      memo - arbitrary, user readable memo, or null if none
      +
      paymentUrl - URL to send payment message to, or null if none
      +
      merchantData - arbitrary merchant data, or null if none
      +
      Returns:
      +
      created payment request, in its builder form
      +
      +
      +
    • +
    • +
      +

      parsePaymentRequest

      +
      public static PaymentSession parsePaymentRequest(org.bitcoinj.protobuf.payments.Protos.PaymentRequest paymentRequest) + throws PaymentProtocolException
      +
      Parse a payment request.
      +
      +
      Parameters:
      +
      paymentRequest - payment request to parse
      +
      Returns:
      +
      instance of PaymentSession, used as a value object
      +
      Throws:
      +
      PaymentProtocolException
      +
      +
      +
    • +
    • +
      +

      signPaymentRequest

      +
      public static void signPaymentRequest(org.bitcoinj.protobuf.payments.Protos.PaymentRequest.Builder paymentRequest, + X509Certificate[] certificateChain, + PrivateKey privateKey)
      +
      Sign the provided payment request.
      +
      +
      Parameters:
      +
      paymentRequest - Payment request to sign, in its builder form.
      +
      certificateChain - Certificate chain to send with the payment request, ordered from client certificate to root + certificate. The root certificate itself may be omitted.
      +
      privateKey - The key to sign with. Must match the public key from the first certificate of the certificate chain.
      +
      +
      +
    • +
    • +
      +

      verifyPaymentRequestPki

      +
      @Nullable +public static PaymentProtocol.PkiVerificationData verifyPaymentRequestPki(org.bitcoinj.protobuf.payments.Protos.PaymentRequest paymentRequest, + KeyStore trustStore) + throws PaymentProtocolException
      +
      Uses the provided PKI method to find the corresponding public key and verify the provided signature.
      +
      +
      Parameters:
      +
      paymentRequest - Payment request to verify.
      +
      trustStore - KeyStore of trusted root certificate authorities.
      +
      Returns:
      +
      verification data, or null if no PKI method was specified in the Protos.PaymentRequest.
      +
      Throws:
      +
      PaymentProtocolException - if payment request could not be verified.
      +
      +
      +
    • +
    • +
      +

      createPaymentMessage

      +
      public static org.bitcoinj.protobuf.payments.Protos.Payment createPaymentMessage(List<Transaction> transactions, + @Nullable + Coin refundAmount, + @Nullable + Address refundAddress, + @Nullable + String memo, + @Nullable + byte[] merchantData)
      +
      Create a payment message with one standard pay to address output.
      +
      +
      Parameters:
      +
      transactions - one or more transactions that satisfy the requested outputs.
      +
      refundAmount - amount of coins to request as a refund, or null if no refund.
      +
      refundAddress - address to refund coins to
      +
      memo - arbitrary, user readable memo, or null if none
      +
      merchantData - arbitrary merchant data, or null if none
      +
      Returns:
      +
      created payment message
      +
      +
      +
    • +
    • +
      +

      createPaymentMessage

      +
      public static org.bitcoinj.protobuf.payments.Protos.Payment createPaymentMessage(List<Transaction> transactions, + @Nullable + List<org.bitcoinj.protobuf.payments.Protos.Output> refundOutputs, + @Nullable + String memo, + @Nullable + byte[] merchantData)
      +
      Create a payment message. This wraps up transaction data along with anything else useful for making a payment.
      +
      +
      Parameters:
      +
      transactions - transactions to include with the payment message
      +
      refundOutputs - list of outputs to refund coins to, or null
      +
      memo - arbitrary, user readable memo, or null if none
      +
      merchantData - arbitrary merchant data, or null if none
      +
      Returns:
      +
      created payment message
      +
      +
      +
    • +
    • +
      +

      parseTransactionsFromPaymentMessage

      +
      public static List<Transaction> parseTransactionsFromPaymentMessage(NetworkParameters params, + org.bitcoinj.protobuf.payments.Protos.Payment paymentMessage)
      +
      Parse transactions from payment message.
      +
      +
      Parameters:
      +
      params - network parameters (needed for transaction deserialization)
      +
      paymentMessage - payment message to parse
      +
      Returns:
      +
      list of transactions
      +
      +
      +
    • +
    • +
      +

      createPaymentAck

      +
      public static org.bitcoinj.protobuf.payments.Protos.PaymentACK createPaymentAck(org.bitcoinj.protobuf.payments.Protos.Payment paymentMessage, + @Nullable + String memo)
      +
      Create a payment ack.
      +
      +
      Parameters:
      +
      paymentMessage - payment message to send with the ack
      +
      memo - arbitrary, user readable memo, or null if none
      +
      Returns:
      +
      created payment ack
      +
      +
      +
    • +
    • +
      +

      parsePaymentAck

      +
      public static PaymentProtocol.Ack parsePaymentAck(org.bitcoinj.protobuf.payments.Protos.PaymentACK paymentAck)
      +
      Parse payment ack into an object.
      +
      +
    • +
    • +
      +

      createPayToAddressOutput

      +
      public static org.bitcoinj.protobuf.payments.Protos.Output createPayToAddressOutput(@Nullable + Coin amount, + Address address)
      + +
      +
      Parameters:
      +
      amount - amount to pay, or null
      +
      address - address to pay to
      +
      Returns:
      +
      output
      +
      +
      +
    • +
    • +
      +

      paramsFromPmtProtocolID

      +
      @Nullable +public static BitcoinNetworkParams paramsFromPmtProtocolID(String pmtProtocolId)
      +
      Return network parameters for a paymentProtocol ID string
      +
      +
      Parameters:
      +
      pmtProtocolId - paymentProtocol ID string
      +
      Returns:
      +
      network parameters for the given string paymentProtocolID or NULL if not recognized
      +
      +
      +
    • +
    • +
      +

      protocolIdFromParams

      +
      public static String protocolIdFromParams(NetworkParameters params)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.Expired.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.Expired.html new file mode 100644 index 000000000..78e31f5b4 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.Expired.html @@ -0,0 +1,161 @@ + + + + +PaymentProtocolException.Expired (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentProtocolException.Expired

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.protocols.payments.PaymentProtocolException +
org.bitcoinj.protocols.payments.PaymentProtocolException.Expired
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
PaymentProtocolException
+
+
+
public static class PaymentProtocolException.Expired +extends PaymentProtocolException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Expired

      +
      public Expired(String msg)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidNetwork.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidNetwork.html new file mode 100644 index 000000000..8b8a91710 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidNetwork.html @@ -0,0 +1,161 @@ + + + + +PaymentProtocolException.InvalidNetwork (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentProtocolException.InvalidNetwork

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.protocols.payments.PaymentProtocolException +
org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidNetwork
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
PaymentProtocolException
+
+
+
public static class PaymentProtocolException.InvalidNetwork +extends PaymentProtocolException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidNetwork

      +
      public InvalidNetwork(String msg)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidOutputs.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidOutputs.html new file mode 100644 index 000000000..5b347ed45 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidOutputs.html @@ -0,0 +1,161 @@ + + + + +PaymentProtocolException.InvalidOutputs (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentProtocolException.InvalidOutputs

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.protocols.payments.PaymentProtocolException +
org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidOutputs
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
PaymentProtocolException
+
+
+
public static class PaymentProtocolException.InvalidOutputs +extends PaymentProtocolException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidOutputs

      +
      public InvalidOutputs(String msg)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPaymentRequestURL.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPaymentRequestURL.html new file mode 100644 index 000000000..32e1ab813 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPaymentRequestURL.html @@ -0,0 +1,169 @@ + + + + +PaymentProtocolException.InvalidPaymentRequestURL (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentProtocolException.InvalidPaymentRequestURL

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.protocols.payments.PaymentProtocolException +
org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidPaymentRequestURL
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
PaymentProtocolException
+
+
+
public static class PaymentProtocolException.InvalidPaymentRequestURL +extends PaymentProtocolException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidPaymentRequestURL

      +
      public InvalidPaymentRequestURL(String msg)
      +
      +
    • +
    • +
      +

      InvalidPaymentRequestURL

      +
      public InvalidPaymentRequestURL(Exception e)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPaymentURL.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPaymentURL.html new file mode 100644 index 000000000..7967cbba1 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPaymentURL.html @@ -0,0 +1,169 @@ + + + + +PaymentProtocolException.InvalidPaymentURL (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentProtocolException.InvalidPaymentURL

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.protocols.payments.PaymentProtocolException +
org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidPaymentURL
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
PaymentProtocolException
+
+
+
public static class PaymentProtocolException.InvalidPaymentURL +extends PaymentProtocolException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidPaymentURL

      +
      public InvalidPaymentURL(Exception e)
      +
      +
    • +
    • +
      +

      InvalidPaymentURL

      +
      public InvalidPaymentURL(String msg)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPkiData.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPkiData.html new file mode 100644 index 000000000..eb777ebe5 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPkiData.html @@ -0,0 +1,169 @@ + + + + +PaymentProtocolException.InvalidPkiData (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentProtocolException.InvalidPkiData

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.protocols.payments.PaymentProtocolException +
org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidPkiData
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
PaymentProtocolException
+
+
+
public static class PaymentProtocolException.InvalidPkiData +extends PaymentProtocolException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidPkiData

      +
      public InvalidPkiData(String msg)
      +
      +
    • +
    • +
      +

      InvalidPkiData

      +
      public InvalidPkiData(Exception e)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPkiType.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPkiType.html new file mode 100644 index 000000000..fc01d6584 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidPkiType.html @@ -0,0 +1,161 @@ + + + + +PaymentProtocolException.InvalidPkiType (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentProtocolException.InvalidPkiType

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.protocols.payments.PaymentProtocolException +
org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidPkiType
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
PaymentProtocolException
+
+
+
public static class PaymentProtocolException.InvalidPkiType +extends PaymentProtocolException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidPkiType

      +
      public InvalidPkiType(String msg)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidVersion.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidVersion.html new file mode 100644 index 000000000..83918d5d4 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.InvalidVersion.html @@ -0,0 +1,161 @@ + + + + +PaymentProtocolException.InvalidVersion (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentProtocolException.InvalidVersion

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.protocols.payments.PaymentProtocolException +
org.bitcoinj.protocols.payments.PaymentProtocolException.InvalidVersion
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
PaymentProtocolException
+
+
+
public static class PaymentProtocolException.InvalidVersion +extends PaymentProtocolException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      InvalidVersion

      +
      public InvalidVersion(String msg)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.PkiVerificationException.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.PkiVerificationException.html new file mode 100644 index 000000000..44e077f94 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.PkiVerificationException.html @@ -0,0 +1,208 @@ + + + + +PaymentProtocolException.PkiVerificationException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentProtocolException.PkiVerificationException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.protocols.payments.PaymentProtocolException +
org.bitcoinj.protocols.payments.PaymentProtocolException.PkiVerificationException
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
PaymentProtocolException
+
+
+
public static class PaymentProtocolException.PkiVerificationException +extends PaymentProtocolException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PkiVerificationException

      +
      public PkiVerificationException(String msg)
      +
      +
    • +
    • +
      +

      PkiVerificationException

      +
      public PkiVerificationException(Exception e)
      +
      +
    • +
    • +
      +

      PkiVerificationException

      +
      public PkiVerificationException(Exception e, + List<X509Certificate> certificates)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.html new file mode 100644 index 000000000..a09159a9a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentProtocolException.html @@ -0,0 +1,197 @@ + + + + +PaymentProtocolException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentProtocolException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.protocols.payments.PaymentProtocolException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
PaymentProtocolException.Expired, PaymentProtocolException.InvalidNetwork, PaymentProtocolException.InvalidOutputs, PaymentProtocolException.InvalidPaymentRequestURL, PaymentProtocolException.InvalidPaymentURL, PaymentProtocolException.InvalidPkiData, PaymentProtocolException.InvalidPkiType, PaymentProtocolException.InvalidVersion, PaymentProtocolException.PkiVerificationException
+
+
+
public class PaymentProtocolException +extends Exception
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PaymentProtocolException

      +
      public PaymentProtocolException(String msg)
      +
      +
    • +
    • +
      +

      PaymentProtocolException

      +
      public PaymentProtocolException(Exception e)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentSession.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentSession.html new file mode 100644 index 000000000..1a4951803 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/PaymentSession.html @@ -0,0 +1,680 @@ + + + + +PaymentSession (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class PaymentSession

+
+
java.lang.Object +
org.bitcoinj.protocols.payments.PaymentSession
+
+
+
+
public class PaymentSession +extends Object
+

Provides a standard implementation of the Payment Protocol (BIP 0070)

+ +

A PaymentSession can be initialized from one of the following:

+ +
    +
  • A BitcoinURI object that conforms to BIP 0072
  • +
  • A url where the Protos.PaymentRequest can be fetched
  • +
  • Directly with a Protos.PaymentRequest object
  • +
+ +

If initialized with a BitcoinURI or a url, a network request is made for the payment request object and a + ListenableCompletableFuture is returned that will be notified with the PaymentSession object after it is downloaded.

+ +

Once the PaymentSession is initialized, typically a wallet application will prompt the user to confirm that the + amount and recipient are correct, perform any additional steps, and then construct a list of transactions to pass to + the sendPayment method.

+ +

Call sendPayment with a list of transactions that will be broadcast. A Protos.Payment message will be sent + to the merchant if a payment url is provided in the PaymentRequest. NOTE: sendPayment does NOT broadcast the + transactions to the bitcoin network. Instead it returns a ListenableCompletableFuture that will be notified when a + Protos.PaymentACK is received from the merchant. Typically a wallet will show the message to the user + as a confirmation message that the payment is now "processing" or that an error occurred, and then broadcast the + tx itself later if needed.

+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      pkiVerificationData

      +
      @Nullable +public final PaymentProtocol.PkiVerificationData pkiVerificationData
      +
      Stores the calculated PKI verification data, or null if none is available. + Only valid after the session is created with the verifyPki parameter set to true.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      PaymentSession

      +
      public PaymentSession(org.bitcoinj.protobuf.payments.Protos.PaymentRequest request) + throws PaymentProtocolException
      +
      Creates a PaymentSession from the provided Protos.PaymentRequest. + Verifies PKI by default.
      +
      +
      Throws:
      +
      PaymentProtocolException
      +
      +
      +
    • +
    • +
      +

      PaymentSession

      +
      public PaymentSession(org.bitcoinj.protobuf.payments.Protos.PaymentRequest request, + boolean verifyPki) + throws PaymentProtocolException
      +
      Creates a PaymentSession from the provided Protos.PaymentRequest. + If verifyPki is true, also validates the signature and throws an exception if it fails.
      +
      +
      Throws:
      +
      PaymentProtocolException
      +
      +
      +
    • +
    • +
      +

      PaymentSession

      +
      public PaymentSession(org.bitcoinj.protobuf.payments.Protos.PaymentRequest request, + boolean verifyPki, + @Nullable + TrustStoreLoader trustStoreLoader) + throws PaymentProtocolException
      +
      Creates a PaymentSession from the provided Protos.PaymentRequest. + If verifyPki is true, also validates the signature and throws an exception if it fails. + If trustStoreLoader is null, the system default trust store is used.
      +
      +
      Throws:
      +
      PaymentProtocolException
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      createFromBitcoinUri

      +
      public static ListenableCompletableFuture<PaymentSession> createFromBitcoinUri(BitcoinURI uri) + throws PaymentProtocolException
      +

      Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri. + uri is a BIP-72-style BitcoinURI object that specifies where the Protos.PaymentRequest object may + be fetched in the r= parameter.

      + +

      If the payment request object specifies a PKI method, then the system trust store will be used to verify + the signature provided by the payment request. An exception is thrown by the future if the signature cannot + be verified.

      +
      +
      Throws:
      +
      PaymentProtocolException
      +
      +
      +
    • +
    • +
      +

      createFromBitcoinUri

      +
      public static ListenableCompletableFuture<PaymentSession> createFromBitcoinUri(BitcoinURI uri, + boolean verifyPki) + throws PaymentProtocolException
      +
      Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri. + uri is a BIP-72-style BitcoinURI object that specifies where the Protos.PaymentRequest object may + be fetched in the r= parameter. + If verifyPki is specified and the payment request object specifies a PKI method, then the system trust store will + be used to verify the signature provided by the payment request. An exception is thrown by the future if the + signature cannot be verified.
      +
      +
      Throws:
      +
      PaymentProtocolException
      +
      +
      +
    • +
    • +
      +

      createFromBitcoinUri

      +
      public static ListenableCompletableFuture<PaymentSession> createFromBitcoinUri(BitcoinURI uri, + boolean verifyPki, + @Nullable + TrustStoreLoader trustStoreLoader) + throws PaymentProtocolException
      +
      Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri. + uri is a BIP-72-style BitcoinURI object that specifies where the Protos.PaymentRequest object may + be fetched in the r= parameter. + If verifyPki is specified and the payment request object specifies a PKI method, then the system trust store will + be used to verify the signature provided by the payment request. An exception is thrown by the future if the + signature cannot be verified. + If trustStoreLoader is null, the system default trust store is used.
      +
      +
      Throws:
      +
      PaymentProtocolException
      +
      +
      +
    • +
    • +
      +

      createFromUrl

      +
      public static ListenableCompletableFuture<PaymentSession> createFromUrl(String url) + throws PaymentProtocolException
      +
      Returns a future that will be notified with a PaymentSession object after it is fetched using the provided url. + url is an address where the Protos.PaymentRequest object may be fetched. + If verifyPki is specified and the payment request object specifies a PKI method, then the system trust store will + be used to verify the signature provided by the payment request. An exception is thrown by the future if the + signature cannot be verified.
      +
      +
      Throws:
      +
      PaymentProtocolException
      +
      +
      +
    • +
    • +
      +

      createFromUrl

      +
      public static ListenableCompletableFuture<PaymentSession> createFromUrl(String url, + boolean verifyPki) + throws PaymentProtocolException
      +
      Returns a future that will be notified with a PaymentSession object after it is fetched using the provided url. + url is an address where the Protos.PaymentRequest object may be fetched. + If the payment request object specifies a PKI method, then the system trust store will + be used to verify the signature provided by the payment request. An exception is thrown by the future if the + signature cannot be verified.
      +
      +
      Throws:
      +
      PaymentProtocolException
      +
      +
      +
    • +
    • +
      +

      createFromUrl

      +
      public static ListenableCompletableFuture<PaymentSession> createFromUrl(String url, + boolean verifyPki, + @Nullable + TrustStoreLoader trustStoreLoader) + throws PaymentProtocolException
      +
      Returns a future that will be notified with a PaymentSession object after it is fetched using the provided url. + url is an address where the Protos.PaymentRequest object may be fetched. + If the payment request object specifies a PKI method, then the system trust store will + be used to verify the signature provided by the payment request. An exception is thrown by the future if the + signature cannot be verified. + If trustStoreLoader is null, the system default trust store is used.
      +
      +
      Throws:
      +
      PaymentProtocolException
      +
      +
      +
    • +
    • +
      +

      getOutputs

      +
      public List<PaymentProtocol.Output> getOutputs()
      +
      Returns the outputs of the payment request.
      +
      +
    • +
    • +
      +

      getMemo

      +
      @Nullable +public String getMemo()
      +
      Returns the memo included by the merchant in the payment request, or null if not found.
      +
      +
    • +
    • +
      +

      getValue

      +
      public Coin getValue()
      +
      Returns the total amount of bitcoins requested.
      +
      +
    • +
    • +
      +

      time

      +
      public Instant time()
      +
      Returns the time that the payment request was generated.
      +
      +
    • +
    • +
      +

      getDate

      +
      @Deprecated +public Date getDate()
      +
      Deprecated. +
      use time()
      +
      +
      +
    • +
    • +
      +

      expires

      +
      public Optional<Instant> expires()
      +
      Returns the expires time of the payment request, or empty if none.
      +
      +
    • +
    • +
      +

      getExpires

      +
      @Nullable +@Deprecated +public Date getExpires()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      isExpired

      +
      public boolean isExpired()
      +
      This should always be called before attempting to call sendPayment.
      +
      +
    • +
    • +
      +

      getPaymentUrl

      +
      @Nullable +public String getPaymentUrl()
      +
      Returns the payment url where the Payment message should be sent. + Returns null if no payment url was provided in the PaymentRequest.
      +
      +
    • +
    • +
      +

      getMerchantData

      +
      @Nullable +public byte[] getMerchantData()
      +
      Returns the merchant data included by the merchant in the payment request, or null if none.
      +
      +
    • +
    • +
      +

      getSendRequest

      +
      public SendRequest getSendRequest()
      +
      Returns a SendRequest suitable for broadcasting to the network.
      +
      +
    • +
    • +
      +

      sendPayment

      +
      public ListenableCompletableFuture<PaymentProtocol.Ack> sendPayment(List<Transaction> txns, + @Nullable + Address refundAddr, + @Nullable + String memo)
      +
      Generates a Payment message and sends the payment to the merchant who sent the PaymentRequest. + Provide transactions built by the wallet. + NOTE: This does not broadcast the transactions to the bitcoin network, it merely sends a Payment message to the + merchant confirming the payment. + Returns an object wrapping PaymentACK once received. + If the PaymentRequest did not specify a payment_url, completes exceptionally.
      +
      +
      Parameters:
      +
      txns - list of transactions to be included with the Payment message.
      +
      refundAddr - will be used by the merchant to send money back if there was a problem.
      +
      memo - is a message to include in the payment message sent to the merchant.
      +
      Returns:
      +
      a future for the PaymentACK
      +
      +
      +
    • +
    • +
      +

      getPayment

      +
      @Nullable +public org.bitcoinj.protobuf.payments.Protos.Payment getPayment(List<Transaction> txns, + @Nullable + Address refundAddr, + @Nullable + String memo) + throws IOException
      +
      Generates a Payment message based on the information in the PaymentRequest. + Provide transactions built by the wallet.
      +
      +
      Parameters:
      +
      txns - list of transactions to be included with the Payment message.
      +
      refundAddr - will be used by the merchant to send money back if there was a problem.
      +
      memo - is a message to include in the payment message sent to the merchant.
      +
      Returns:
      +
      Payment message or null (if the PaymentRequest did not specify a payment_url)
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      sendPayment

      +
      protected CompletableFuture<PaymentProtocol.Ack> sendPayment(URL url, + org.bitcoinj.protobuf.payments.Protos.Payment payment)
      +
      +
    • +
    • +
      +

      verifyPki

      +
      @Nullable +public PaymentProtocol.PkiVerificationData verifyPki()
      +
      Returns the value of pkiVerificationData or null if it wasn't verified at construction time.
      +
      +
    • +
    • +
      +

      getNetworkParameters

      +
      public NetworkParameters getNetworkParameters()
      +
      Gets the params as read from the PaymentRequest.network field: main is the default if missing.
      +
      +
    • +
    • +
      +

      getPaymentRequest

      +
      public org.bitcoinj.protobuf.payments.Protos.PaymentRequest getPaymentRequest()
      +
      Returns the protobuf that this object was instantiated with.
      +
      +
    • +
    • +
      +

      getPaymentDetails

      +
      public org.bitcoinj.protobuf.payments.Protos.PaymentDetails getPaymentDetails()
      +
      Returns the protobuf that describes the payment to be made.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/package-summary.html new file mode 100644 index 000000000..753753995 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/package-summary.html @@ -0,0 +1,131 @@ + + + + +org.bitcoinj.protocols.payments (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.protocols.payments

+
+
+
package org.bitcoinj.protocols.payments
+
+
The BIP70 payment protocol wraps Bitcoin transactions and adds various useful features like memos, refund addresses + and authentication.
+
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/package-tree.html new file mode 100644 index 000000000..23f5bf052 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/protocols/payments/package-tree.html @@ -0,0 +1,96 @@ + + + + +org.bitcoinj.protocols.payments Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.protocols.payments

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/script/Script.VerifyFlag.html b/javadoc/0.17-rc1/org/bitcoinj/script/Script.VerifyFlag.html new file mode 100644 index 000000000..a7047aa2e --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/script/Script.VerifyFlag.html @@ -0,0 +1,295 @@ + + + + +Script.VerifyFlag (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class Script.VerifyFlag

+
+
java.lang.Object +
java.lang.Enum<Script.VerifyFlag> +
org.bitcoinj.script.Script.VerifyFlag
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Script.VerifyFlag>, Constable
+
+
+
Enclosing class:
+
Script
+
+
+
public static enum Script.VerifyFlag +extends Enum<Script.VerifyFlag>
+
Flags to pass to Script.correctlySpends(Transaction, int, TransactionWitness, Coin, Script, Set). + Note currently only P2SH, DERSIG and NULLDUMMY are actually supported.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Script.VerifyFlag[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Script.VerifyFlag valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/script/Script.html b/javadoc/0.17-rc1/org/bitcoinj/script/Script.html new file mode 100644 index 000000000..8587feffe --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/script/Script.html @@ -0,0 +1,971 @@ + + + + +Script (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Script

+
+
java.lang.Object +
org.bitcoinj.script.Script
+
+
+
+
public class Script +extends Object
+

Programs embedded inside transactions that control redemption of payments.

+ +

Bitcoin transactions don't specify what they do directly. Instead a + small binary stack language is used to define programs that when evaluated return whether the transaction + "accepts" or rejects the other transactions connected to it.

+ +

In SPV mode, scripts are not run, because that would require all transactions to be available and lightweight + clients don't have that data. In full mode, this class is used to run the interpreted language. It also has + static methods for building scripts.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      ALL_VERIFY_FLAGS

      +
      public static final EnumSet<Script.VerifyFlag> ALL_VERIFY_FLAGS
      +
      +
    • +
    • +
      +

      MAX_SCRIPT_ELEMENT_SIZE

      +
      public static final int MAX_SCRIPT_ELEMENT_SIZE
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      SIG_SIZE

      +
      public static final int SIG_SIZE
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      MAX_P2SH_SIGOPS

      +
      public static final int MAX_P2SH_SIGOPS
      +
      Max number of sigops allowed in a standard p2sh redeem script
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      of

      +
      public static Script of(List<ScriptChunk> chunks)
      +
      Wraps given script chunks.
      +
      +
      Parameters:
      +
      chunks - chunks to wrap
      +
      Returns:
      +
      script that wraps the chunks
      +
      +
      +
    • +
    • +
      +

      of

      +
      public static Script of(List<ScriptChunk> chunks, + Instant creationTime)
      +
      Wraps given script chunks.
      +
      +
      Parameters:
      +
      chunks - chunks to wrap
      +
      creationTime - creation time to associate the script with
      +
      Returns:
      +
      script that wraps the chunks
      +
      +
      +
    • +
    • +
      +

      parse

      +
      public static Script parse(byte[] program) + throws ScriptException
      +
      Construct a script that copies and wraps a given program. The array is parsed and checked for syntactic + validity. Programs like this are e.g. used in TransactionInput and TransactionOutput.
      +
      +
      Parameters:
      +
      program - array of program bytes
      +
      Returns:
      +
      parsed program
      +
      Throws:
      +
      ScriptException - if the program could not be parsed
      +
      +
      +
    • +
    • +
      +

      parse

      +
      public static Script parse(byte[] program, + Instant creationTime) + throws ScriptException
      +
      Construct a script that copies and wraps a given program. The array is parsed and checked for syntactic + validity. Programs like this are e.g. used in TransactionInput and TransactionOutput.
      +
      +
      Parameters:
      +
      program - Array of program bytes from a transaction.
      +
      creationTime - creation time to associate the script with
      +
      Returns:
      +
      parsed program
      +
      Throws:
      +
      ScriptException - if the program could not be parsed
      +
      +
      +
    • +
    • +
      +

      program

      +
      public byte[] program()
      +
      Gets the serialized program as a newly created byte array.
      +
      +
      Returns:
      +
      serialized program
      +
      +
      +
    • +
    • +
      +

      getProgram

      +
      @Deprecated +public byte[] getProgram()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      chunks

      +
      public List<ScriptChunk> chunks()
      +
      Gets an immutable list of the scripts parsed form. Each chunk is either an opcode or data element.
      +
      +
      Returns:
      +
      script chunks
      +
      +
      +
    • +
    • +
      +

      getChunks

      +
      @Deprecated +public List<ScriptChunk> getChunks()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      creationTime

      +
      public Optional<Instant> creationTime()
      +
      Gets the associated creation time of this script, or empty if undefined. This is currently used in the context of + watching wallets only, where the scriptPubKeys being watched actually represent public keys and their + addresses.
      +
      +
      Returns:
      +
      associated creation time of this script, or empty if undefined
      +
      +
      +
    • +
    • +
      +

      getCreationTimeSeconds

      +
      @Deprecated +public long getCreationTimeSeconds()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      Returns the program opcodes as a string, for example "[1234] DUP HASH160", or "<empty>".
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      getPubKeyHash

      +
      public byte[] getPubKeyHash() + throws ScriptException
      +

      If the program somehow pays to a hash, returns the hash.

      + +

      Otherwise this method throws a ScriptException.

      +
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      getToAddress

      +
      public Address getToAddress(Network network) + throws ScriptException
      +
      Gets the destination address from this script, if it's in the required form.
      +
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      getToAddress

      +
      @Deprecated +public Address getToAddress(NetworkParameters params) + throws ScriptException
      +
      Deprecated. + +
      +
      Gets the destination address from this script, if it's in the required form.
      +
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      getToAddress

      +
      public Address getToAddress(Network network, + boolean forcePayToPubKey) + throws ScriptException
      +
      Gets the destination address from this script, if it's in the required form.
      +
      +
      Parameters:
      +
      forcePayToPubKey - If true, allow payToPubKey to be casted to the corresponding address. This is useful if you prefer + showing addresses rather than pubkeys.
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      getToAddress

      +
      @Deprecated +public Address getToAddress(NetworkParameters params, + boolean forcePayToPubKey) + throws ScriptException
      + +
      Gets the destination address from this script, if it's in the required form.
      +
      +
      Parameters:
      +
      forcePayToPubKey - If true, allow payToPubKey to be casted to the corresponding address. This is useful if you prefer + showing addresses rather than pubkeys.
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      writeBytes

      +
      public static void writeBytes(OutputStream os, + byte[] buf) + throws IOException
      +
      Writes out the given byte buffer to the output stream with the correct opcode prefix + To write an integer call writeBytes(out, Utils.reverseBytes(Utils.encodeMPI(val, false)));
      +
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      createMultiSigOutputScript

      +
      public static byte[] createMultiSigOutputScript(int threshold, + List<ECKey> pubkeys)
      +
      Creates a program that requires at least N of the given keys to sign, using OP_CHECKMULTISIG.
      +
      +
    • +
    • +
      +

      createInputScript

      +
      public static byte[] createInputScript(byte[] signature, + byte[] pubkey)
      +
      +
    • +
    • +
      +

      createInputScript

      +
      public static byte[] createInputScript(byte[] signature)
      +
      +
    • +
    • +
      +

      createEmptyInputScript

      +
      public Script createEmptyInputScript(@Nullable + ECKey key, + @Nullable + Script redeemScript)
      +
      Creates an incomplete scriptSig that, once filled with signatures, can redeem output containing this scriptPubKey. + Instead of the signatures resulting script has OP_0. + Having incomplete input script allows to pass around partially signed tx. + It is expected that this program later on will be updated with proper signatures.
      +
      +
    • +
    • +
      +

      getScriptSigWithSignature

      +
      public Script getScriptSigWithSignature(Script scriptSig, + byte[] sigBytes, + int index)
      +
      Returns a copy of the given scriptSig with the signature inserted in the given position.
      +
      +
    • +
    • +
      +

      getSigInsertionIndex

      +
      public int getSigInsertionIndex(Sha256Hash hash, + ECKey signingKey)
      +
      Returns the index where a signature by the key should be inserted. Only applicable to + a P2SH scriptSig.
      +
      +
    • +
    • +
      +

      getPubKeys

      +
      public List<ECKey> getPubKeys()
      +
      Returns a list of the keys required by this script, assuming a multi-sig script.
      +
      +
      Throws:
      +
      ScriptException - if the script type is not understood or is pay to address or is P2SH (run this method on the "Redeem script" instead).
      +
      +
      +
    • +
    • +
      +

      decodeFromOpN

      +
      public static int decodeFromOpN(int opcode)
      +
      +
    • +
    • +
      +

      encodeToOpN

      +
      public static int encodeToOpN(int value)
      +
      +
    • +
    • +
      +

      getSigOpCount

      +
      public static int getSigOpCount(byte[] program) + throws ScriptException
      +
      Gets the count of regular SigOps in the script program (counting multisig ops as 20)
      +
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      getP2SHSigOpCount

      +
      public static long getP2SHSigOpCount(byte[] scriptSig) + throws ScriptException
      +
      Gets the count of P2SH Sig Ops in the Script scriptSig
      +
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      getNumberOfSignaturesRequiredToSpend

      +
      public int getNumberOfSignaturesRequiredToSpend()
      +
      Returns number of signatures required to satisfy this script.
      +
      +
    • +
    • +
      +

      getNumberOfBytesRequiredToSpend

      +
      public int getNumberOfBytesRequiredToSpend(@Nullable + ECKey pubKey, + @Nullable + Script redeemScript)
      +
      Returns number of bytes required to spend this script. It accepts optional ECKey and redeemScript that may + be required for certain types of script to estimate target size.
      +
      +
    • +
    • +
      +

      removeAllInstancesOf

      +
      public static byte[] removeAllInstancesOf(byte[] inputScript, + byte[] chunkToRemove)
      +
      Returns the script bytes of inputScript with all instances of the specified script object removed
      +
      +
    • +
    • +
      +

      removeAllInstancesOfOp

      +
      public static byte[] removeAllInstancesOfOp(byte[] inputScript, + int opCode)
      +
      Returns the script bytes of inputScript with all instances of the given op code removed
      +
      +
    • +
    • +
      +

      executeScript

      +
      public static void executeScript(@Nullable + Transaction txContainingThis, + long index, + Script script, + LinkedList<byte[]> stack, + Set<Script.VerifyFlag> verifyFlags) + throws ScriptException
      +
      Exposes the script interpreter. Normally you should not use this directly, instead use + TransactionInput.verify(TransactionOutput) or + correctlySpends(Transaction, int, TransactionWitness, Coin, Script, Set). This method + is useful if you need more precise control or access to the final state of the stack. This interface is very + likely to change in future.
      +
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      correctlySpends

      +
      public void correctlySpends(Transaction txContainingThis, + int scriptSigIndex, + @Nullable + TransactionWitness witness, + @Nullable + Coin value, + Script scriptPubKey, + Set<Script.VerifyFlag> verifyFlags) + throws ScriptException
      +
      Verifies that this script (interpreted as a scriptSig) correctly spends the given scriptPubKey.
      +
      +
      Parameters:
      +
      txContainingThis - The transaction in which this input scriptSig resides. + Accessing txContainingThis from another thread while this method runs results in undefined behavior.
      +
      scriptSigIndex - The index in txContainingThis of the scriptSig (note: NOT the index of the scriptPubKey).
      +
      scriptPubKey - The connected scriptPubKey containing the conditions needed to claim the value.
      +
      witness - Transaction witness belonging to the transaction input containing this script. Needed for segwit.
      +
      value - Value of the output. Needed for segwit scripts.
      +
      verifyFlags - Each flag enables one validation rule.
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      correctlySpends

      +
      @Deprecated +public void correctlySpends(Transaction txContainingThis, + long scriptSigIndex, + Script scriptPubKey, + Set<Script.VerifyFlag> verifyFlags) + throws ScriptException
      + +
      Verifies that this script (interpreted as a scriptSig) correctly spends the given scriptPubKey.
      +
      +
      Parameters:
      +
      txContainingThis - The transaction in which this input scriptSig resides. + Accessing txContainingThis from another thread while this method runs results in undefined behavior.
      +
      scriptSigIndex - The index in txContainingThis of the scriptSig (note: NOT the index of the scriptPubKey).
      +
      scriptPubKey - The connected scriptPubKey containing the conditions needed to claim the value.
      +
      verifyFlags - Each flag enables one validation rule.
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      getScriptType

      +
      @Nullable +public ScriptType getScriptType()
      +
      Get the ScriptType.
      +
      +
      Returns:
      +
      The script type, or null if the script is of unknown type
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/script/ScriptBuilder.html b/javadoc/0.17-rc1/org/bitcoinj/script/ScriptBuilder.html new file mode 100644 index 000000000..6d8049962 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/script/ScriptBuilder.html @@ -0,0 +1,847 @@ + + + + +ScriptBuilder (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ScriptBuilder

+
+
java.lang.Object +
org.bitcoinj.script.ScriptBuilder
+
+
+
+
public class ScriptBuilder +extends Object
+

Tools for the construction of commonly used script types. You don't normally need this as it's hidden behind + convenience methods on Transaction, but they are useful when working with the + protocol at a lower level.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ScriptBuilder

      +
      public ScriptBuilder()
      +
      Creates a fresh ScriptBuilder with an empty program.
      +
      +
    • +
    • +
      +

      ScriptBuilder

      +
      public ScriptBuilder(Script template)
      +
      Creates a fresh ScriptBuilder with the given program as the starting point.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      creationTime

      +
      public ScriptBuilder creationTime(Instant creationTime)
      +
      Associates this script to be built with a given creation time. This is currently used in the context of + watching wallets only, where the scriptPubKeys being watched actually represent public keys and their addresses.
      +
      +
      Parameters:
      +
      creationTime - creation time to associate the script with
      +
      Returns:
      +
      this builder
      +
      +
      +
    • +
    • +
      +

      addChunk

      +
      public ScriptBuilder addChunk(ScriptChunk chunk)
      +
      Adds the given chunk to the end of the program
      +
      +
    • +
    • +
      +

      addChunk

      +
      public ScriptBuilder addChunk(int index, + ScriptChunk chunk)
      +
      Adds the given chunk at the given index in the program
      +
      +
    • +
    • +
      +

      op

      +
      public ScriptBuilder op(int opcode)
      +
      Adds the given opcode to the end of the program.
      +
      +
    • +
    • +
      +

      op

      +
      public ScriptBuilder op(int index, + int opcode)
      +
      Adds the given opcode to the given index in the program
      +
      +
    • +
    • +
      +

      data

      +
      public ScriptBuilder data(byte[] data)
      +
      Adds a copy of the given byte array as a data element (i.e. PUSHDATA) at the end of the program.
      +
      +
    • +
    • +
      +

      data

      +
      public ScriptBuilder data(int index, + byte[] data)
      +
      Adds a copy of the given byte array as a data element (i.e. PUSHDATA) at the given index in the program.
      +
      +
    • +
    • +
      +

      number

      +
      public ScriptBuilder number(long num)
      +
      Adds the given number to the end of the program. Automatically uses + shortest encoding possible.
      +
      +
    • +
    • +
      +

      number

      +
      public ScriptBuilder number(int index, + long num)
      +
      Adds the given number to the given index in the program. Automatically + uses shortest encoding possible.
      +
      +
    • +
    • +
      +

      smallNum

      +
      public ScriptBuilder smallNum(int num)
      +
      Adds the given number as a OP_N opcode to the end of the program. + Only handles values 0-16 inclusive.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      bigNum

      +
      protected ScriptBuilder bigNum(long num)
      +
      Adds the given number as a push data chunk. + This is intended to use for negative numbers or values greater than 16, and although + it will accept numbers in the range 0-16 inclusive, the encoding would be + considered non-standard.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      smallNum

      +
      public ScriptBuilder smallNum(int index, + int num)
      +
      Adds the given number as a OP_N opcode to the given index in the program. + Only handles values 0-16 inclusive.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      bigNum

      +
      protected ScriptBuilder bigNum(int index, + long num)
      +
      Adds the given number as a push data chunk to the given index in the program. + This is intended to use for negative numbers or values greater than 16, and although + it will accept numbers in the range 0-16 inclusive, the encoding would be + considered non-standard.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      opTrue

      +
      public ScriptBuilder opTrue()
      +
      Adds true to the end of the program.
      +
      +
      Returns:
      +
      this
      +
      +
      +
    • +
    • +
      +

      opTrue

      +
      public ScriptBuilder opTrue(int index)
      +
      Adds true to the given index in the program.
      +
      +
      Parameters:
      +
      index - at which insert true
      +
      Returns:
      +
      this
      +
      +
      +
    • +
    • +
      +

      opFalse

      +
      public ScriptBuilder opFalse()
      +
      Adds false to the end of the program.
      +
      +
      Returns:
      +
      this
      +
      +
      +
    • +
    • +
      +

      opFalse

      +
      public ScriptBuilder opFalse(int index)
      +
      Adds false to the given index in the program.
      +
      +
      Parameters:
      +
      index - at which insert true
      +
      Returns:
      +
      this
      +
      +
      +
    • +
    • +
      +

      build

      +
      public Script build()
      +
      Creates a new immutable Script based on the state of the builder.
      +
      +
    • +
    • +
      +

      createEmpty

      +
      public static Script createEmpty()
      +
      Creates an empty script.
      +
      +
    • +
    • +
      +

      createOutputScript

      +
      public static Script createOutputScript(Address to, + Instant creationTime)
      +
      Creates a scriptPubKey that encodes payment to the given address.
      +
      +
      Parameters:
      +
      to - address to send payment to
      +
      creationTime - creation time of the scriptPubKey
      +
      Returns:
      +
      scriptPubKey
      +
      +
      +
    • +
    • +
      +

      createOutputScript

      +
      public static Script createOutputScript(Address to)
      +
      Creates a scriptPubKey that encodes payment to the given address.
      +
      +
      Parameters:
      +
      to - address to send payment to
      +
      Returns:
      +
      scriptPubKey
      +
      +
      +
    • +
    • +
      +

      createInputScript

      +
      public static Script createInputScript(@Nullable + TransactionSignature signature, + ECKey pubKey)
      +
      Creates a scriptSig that can redeem a P2PKH output. + If given signature is null, incomplete scriptSig will be created with OP_0 instead of signature
      +
      +
    • +
    • +
      +

      createInputScript

      +
      public static Script createInputScript(@Nullable + TransactionSignature signature)
      +
      Creates a scriptSig that can redeem a P2PK output. + If given signature is null, incomplete scriptSig will be created with OP_0 instead of signature
      +
      +
    • +
    • +
      +

      createMultiSigOutputScript

      +
      public static Script createMultiSigOutputScript(int threshold, + List<ECKey> pubkeys)
      +
      Creates a program that requires at least N of the given keys to sign, using OP_CHECKMULTISIG.
      +
      +
    • +
    • +
      +

      createMultiSigInputScript

      +
      public static Script createMultiSigInputScript(List<TransactionSignature> signatures)
      +
      Create a program that satisfies an OP_CHECKMULTISIG program.
      +
      +
    • +
    • +
      +

      createMultiSigInputScript

      +
      public static Script createMultiSigInputScript(TransactionSignature... signatures)
      +
      Create a program that satisfies an OP_CHECKMULTISIG program.
      +
      +
    • +
    • +
      +

      createMultiSigInputScriptBytes

      +
      public static Script createMultiSigInputScriptBytes(List<byte[]> signatures)
      +
      Create a program that satisfies an OP_CHECKMULTISIG program, using pre-encoded signatures.
      +
      +
    • +
    • +
      +

      createP2SHMultiSigInputScript

      +
      public static Script createP2SHMultiSigInputScript(@Nullable + List<TransactionSignature> signatures, + Script multisigProgram)
      +
      Create a program that satisfies a P2SH OP_CHECKMULTISIG program. + If given signature list is null, incomplete scriptSig will be created with OP_0 instead of signatures
      +
      +
    • +
    • +
      +

      createMultiSigInputScriptBytes

      +
      public static Script createMultiSigInputScriptBytes(List<byte[]> signatures, + @Nullable + byte[] multisigProgramBytes)
      +
      Create a program that satisfies an OP_CHECKMULTISIG program, using pre-encoded signatures. + Optionally, appends the script program bytes if spending a P2SH output.
      +
      +
    • +
    • +
      +

      updateScriptWithSignature

      +
      public static Script updateScriptWithSignature(Script scriptSig, + byte[] signature, + int targetIndex, + int sigsPrefixCount, + int sigsSuffixCount)
      +
      Returns a copy of the given scriptSig with the signature inserted in the given position. + + This function assumes that any missing sigs have OP_0 placeholders. If given scriptSig already has all the signatures + in place, IllegalArgumentException will be thrown.
      +
      +
      Parameters:
      +
      targetIndex - where to insert the signature
      +
      sigsPrefixCount - how many items to copy verbatim (e.g. initial OP_0 for multisig)
      +
      sigsSuffixCount - how many items to copy verbatim at end (e.g. redeemScript for P2SH)
      +
      +
      +
    • +
    • +
      +

      createP2PKOutputScript

      +
      public static Script createP2PKOutputScript(byte[] pubKey)
      +
      Creates a scriptPubKey that encodes payment to the given raw public key.
      +
      +
    • +
    • +
      +

      createP2PKOutputScript

      +
      public static Script createP2PKOutputScript(ECKey pubKey)
      +
      Creates a scriptPubKey that encodes payment to the given raw public key.
      +
      +
    • +
    • +
      +

      createP2PKHOutputScript

      +
      public static Script createP2PKHOutputScript(byte[] hash)
      +
      Creates a scriptPubKey that sends to the given public key hash.
      +
      +
    • +
    • +
      +

      createP2PKHOutputScript

      +
      public static Script createP2PKHOutputScript(ECKey key)
      +
      Creates a scriptPubKey that sends to the given public key.
      +
      +
    • +
    • +
      +

      createP2WPKHOutputScript

      +
      public static Script createP2WPKHOutputScript(byte[] hash)
      +
      Creates a segwit scriptPubKey that sends to the given public key hash.
      +
      +
    • +
    • +
      +

      createP2WPKHOutputScript

      +
      public static Script createP2WPKHOutputScript(ECKey key)
      +
      Creates a segwit scriptPubKey that sends to the given public key.
      +
      +
    • +
    • +
      +

      createP2SHOutputScript

      +
      public static Script createP2SHOutputScript(byte[] hash)
      +
      Creates a scriptPubKey that sends to the given script hash. Read + BIP 16 to learn more about this + kind of script.
      +
      +
      Parameters:
      +
      hash - The hash of the redeem script
      +
      Returns:
      +
      an output script that sends to the redeem script
      +
      +
      +
    • +
    • +
      +

      createP2SHOutputScript

      +
      public static Script createP2SHOutputScript(Script redeemScript)
      +
      Creates a scriptPubKey for a given redeem script.
      +
      +
      Parameters:
      +
      redeemScript - The redeem script
      +
      Returns:
      +
      an output script that sends to the redeem script
      +
      +
      +
    • +
    • +
      +

      createP2WSHOutputScript

      +
      public static Script createP2WSHOutputScript(byte[] hash)
      +
      Creates a segwit scriptPubKey that sends to the given script hash.
      +
      +
    • +
    • +
      +

      createP2WSHOutputScript

      +
      public static Script createP2WSHOutputScript(Script redeemScript)
      +
      Creates a segwit scriptPubKey for the given redeem script.
      +
      +
    • +
    • +
      +

      createP2SHOutputScript

      +
      public static Script createP2SHOutputScript(int threshold, + List<ECKey> pubkeys)
      +
      Creates a P2SH output script for n-of-m multisig with given public keys and threshold. Given public keys will + be placed in redeem script in the lexicographical sorting order.
      +
      +
      Parameters:
      +
      threshold - The threshold number of keys that must sign (n)
      +
      pubkeys - A list of m public keys
      +
      Returns:
      +
      The P2SH multisig output script
      +
      +
      +
    • +
    • +
      +

      createRedeemScript

      +
      public static Script createRedeemScript(int threshold, + List<ECKey> pubkeys)
      +
      Creates an n-of-m multisig redeem script with given public keys and threshold. Given public keys will be placed in + redeem script in the lexicographical sorting order.
      +
      +
      Parameters:
      +
      threshold - The threshold number of keys that must sign (n)
      +
      pubkeys - A list of m public keys
      +
      Returns:
      +
      The P2SH multisig redeem script
      +
      +
      +
    • +
    • +
      +

      createOpReturnScript

      +
      public static Script createOpReturnScript(byte[] data)
      +
      Creates a script of the form OP_RETURN [data]. This feature allows you to attach a small piece of data (like + a hash of something stored elsewhere) to a zero valued output which can never be spent and thus does not pollute + the ledger.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/script/ScriptChunk.html b/javadoc/0.17-rc1/org/bitcoinj/script/ScriptChunk.html new file mode 100644 index 000000000..fb3d518db --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/script/ScriptChunk.html @@ -0,0 +1,335 @@ + + + + +ScriptChunk (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ScriptChunk

+
+
java.lang.Object +
org.bitcoinj.script.ScriptChunk
+
+
+
+
public class ScriptChunk +extends Object
+
A script element that is either a data push (signature, pubkey, etc) or a non-push (logic, numeric, etc) operation.
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    final byte[]
    + +
    +
    For push operations, this is the vector to be pushed on the stack.
    +
    +
    final int
    + +
    +
    Operation to be executed.
    +
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    ScriptChunk(int opcode, + byte[] data)
    +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    int
    + +
    +
    If this chunk is an OP_N opcode returns the equivalent integer value.
    +
    +
    boolean
    + +
     
    +
    boolean
    +
    equalsOpCode(int opcode)
    +
     
    +
    int
    + +
     
    +
    boolean
    + +
    +
    If this chunk is a single byte of non-pushdata content (could be OP_RESERVED or some invalid Opcode)
    +
    +
    boolean
    + +
    +
    Returns true if this chunk is pushdata content, including the single-byte pushdatas.
    +
    +
    boolean
    + +
    +
    Called on a pushdata chunk, returns true if it uses the smallest possible way (according to BIP62) to push the data.
    +
    +
    int
    + +
     
    +
    byte[]
    + +
     
    + + +
     
    +
    void
    + +
    +
    Deprecated. + +
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      opcode

      +
      public final int opcode
      +
      Operation to be executed. Opcodes are defined in ScriptOpCodes.
      +
      +
    • +
    • +
      +

      data

      +
      @Nullable +public final byte[] data
      +
      For push operations, this is the vector to be pushed on the stack. For ScriptOpCodes.OP_0, the vector is + empty. Null for non-push operations.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ScriptChunk

      +
      public ScriptChunk(int opcode, + @Nullable + byte[] data)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      equalsOpCode

      +
      public boolean equalsOpCode(int opcode)
      +
      +
    • +
    • +
      +

      isOpCode

      +
      public boolean isOpCode()
      +
      If this chunk is a single byte of non-pushdata content (could be OP_RESERVED or some invalid Opcode)
      +
      +
    • +
    • +
      +

      isPushData

      +
      public boolean isPushData()
      +
      Returns true if this chunk is pushdata content, including the single-byte pushdatas.
      +
      +
    • +
    • +
      +

      decodeOpN

      +
      public int decodeOpN()
      +
      If this chunk is an OP_N opcode returns the equivalent integer value.
      +
      +
    • +
    • +
      +

      isShortestPossiblePushData

      +
      public boolean isShortestPossiblePushData()
      +
      Called on a pushdata chunk, returns true if it uses the smallest possible way (according to BIP62) to push the data.
      +
      +
    • +
    • +
      +

      write

      +
      @Deprecated +public void write(OutputStream stream) + throws IOException
      +
      Deprecated. + +
      +
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      toByteArray

      +
      public byte[] toByteArray()
      +
      +
    • +
    • +
      +

      size

      +
      public int size()
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/script/ScriptError.html b/javadoc/0.17-rc1/org/bitcoinj/script/ScriptError.html new file mode 100644 index 000000000..5dd9b1431 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/script/ScriptError.html @@ -0,0 +1,555 @@ + + + + +ScriptError (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class ScriptError

+
+
java.lang.Object +
java.lang.Enum<ScriptError> +
org.bitcoinj.script.ScriptError
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<ScriptError>, Constable
+
+
+
public enum ScriptError +extends Enum<ScriptError>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      SCRIPT_ERR_OK

      +
      public static final ScriptError SCRIPT_ERR_OK
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_UNKNOWN_ERROR

      +
      public static final ScriptError SCRIPT_ERR_UNKNOWN_ERROR
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_EVAL_FALSE

      +
      public static final ScriptError SCRIPT_ERR_EVAL_FALSE
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_OP_RETURN

      +
      public static final ScriptError SCRIPT_ERR_OP_RETURN
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_SCRIPT_SIZE

      +
      public static final ScriptError SCRIPT_ERR_SCRIPT_SIZE
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_PUSH_SIZE

      +
      public static final ScriptError SCRIPT_ERR_PUSH_SIZE
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_OP_COUNT

      +
      public static final ScriptError SCRIPT_ERR_OP_COUNT
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_STACK_SIZE

      +
      public static final ScriptError SCRIPT_ERR_STACK_SIZE
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_SIG_COUNT

      +
      public static final ScriptError SCRIPT_ERR_SIG_COUNT
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_PUBKEY_COUNT

      +
      public static final ScriptError SCRIPT_ERR_PUBKEY_COUNT
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_VERIFY

      +
      public static final ScriptError SCRIPT_ERR_VERIFY
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_EQUALVERIFY

      +
      public static final ScriptError SCRIPT_ERR_EQUALVERIFY
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_CHECKMULTISIGVERIFY

      +
      public static final ScriptError SCRIPT_ERR_CHECKMULTISIGVERIFY
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_CHECKSIGVERIFY

      +
      public static final ScriptError SCRIPT_ERR_CHECKSIGVERIFY
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_NUMEQUALVERIFY

      +
      public static final ScriptError SCRIPT_ERR_NUMEQUALVERIFY
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_BAD_OPCODE

      +
      public static final ScriptError SCRIPT_ERR_BAD_OPCODE
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_DISABLED_OPCODE

      +
      public static final ScriptError SCRIPT_ERR_DISABLED_OPCODE
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_INVALID_STACK_OPERATION

      +
      public static final ScriptError SCRIPT_ERR_INVALID_STACK_OPERATION
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_INVALID_ALTSTACK_OPERATION

      +
      public static final ScriptError SCRIPT_ERR_INVALID_ALTSTACK_OPERATION
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_UNBALANCED_CONDITIONAL

      +
      public static final ScriptError SCRIPT_ERR_UNBALANCED_CONDITIONAL
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_NEGATIVE_LOCKTIME

      +
      public static final ScriptError SCRIPT_ERR_NEGATIVE_LOCKTIME
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_UNSATISFIED_LOCKTIME

      +
      public static final ScriptError SCRIPT_ERR_UNSATISFIED_LOCKTIME
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_SIG_HASHTYPE

      +
      public static final ScriptError SCRIPT_ERR_SIG_HASHTYPE
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_SIG_DER

      +
      public static final ScriptError SCRIPT_ERR_SIG_DER
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_MINIMALDATA

      +
      public static final ScriptError SCRIPT_ERR_MINIMALDATA
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_SIG_PUSHONLY

      +
      public static final ScriptError SCRIPT_ERR_SIG_PUSHONLY
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_SIG_HIGH_S

      +
      public static final ScriptError SCRIPT_ERR_SIG_HIGH_S
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_SIG_NULLDUMMY

      +
      public static final ScriptError SCRIPT_ERR_SIG_NULLDUMMY
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_PUBKEYTYPE

      +
      public static final ScriptError SCRIPT_ERR_PUBKEYTYPE
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_CLEANSTACK

      +
      public static final ScriptError SCRIPT_ERR_CLEANSTACK
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_MINIMALIF

      +
      public static final ScriptError SCRIPT_ERR_MINIMALIF
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_SIG_NULLFAIL

      +
      public static final ScriptError SCRIPT_ERR_SIG_NULLFAIL
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS

      +
      public static final ScriptError SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM

      +
      public static final ScriptError SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH

      +
      public static final ScriptError SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY

      +
      public static final ScriptError SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH

      +
      public static final ScriptError SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_WITNESS_MALLEATED

      +
      public static final ScriptError SCRIPT_ERR_WITNESS_MALLEATED
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_WITNESS_MALLEATED_P2SH

      +
      public static final ScriptError SCRIPT_ERR_WITNESS_MALLEATED_P2SH
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_WITNESS_UNEXPECTED

      +
      public static final ScriptError SCRIPT_ERR_WITNESS_UNEXPECTED
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_WITNESS_PUBKEYTYPE

      +
      public static final ScriptError SCRIPT_ERR_WITNESS_PUBKEYTYPE
      +
      +
    • +
    • +
      +

      SCRIPT_ERR_ERROR_COUNT

      +
      public static final ScriptError SCRIPT_ERR_ERROR_COUNT
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static ScriptError[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static ScriptError valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      getMnemonic

      +
      public String getMnemonic()
      +
      +
    • +
    • +
      +

      fromMnemonic

      +
      public static ScriptError fromMnemonic(String name)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/script/ScriptException.html b/javadoc/0.17-rc1/org/bitcoinj/script/ScriptException.html new file mode 100644 index 000000000..a831876e8 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/script/ScriptException.html @@ -0,0 +1,204 @@ + + + + +ScriptException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ScriptException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class ScriptException +extends VerificationException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/script/ScriptOpCodes.html b/javadoc/0.17-rc1/org/bitcoinj/script/ScriptOpCodes.html new file mode 100644 index 000000000..4de2ee137 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/script/ScriptOpCodes.html @@ -0,0 +1,2192 @@ + + + + +ScriptOpCodes (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ScriptOpCodes

+
+
java.lang.Object +
org.bitcoinj.script.ScriptOpCodes
+
+
+
+
public class ScriptOpCodes +extends Object
+
Various constants that define the assembly-like scripting language that forms part of the Bitcoin protocol. + See Script for details. Also provides a method to convert them to a string.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ScriptOpCodes

      +
      public ScriptOpCodes()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getOpCodeName

      +
      public static String getOpCodeName(int opcode)
      +
      Converts the given OpCode into a string (e.g. "0", "PUSHDATA", or "NON_OP(10)")
      +
      +
    • +
    • +
      +

      getPushDataName

      +
      public static String getPushDataName(int opcode)
      +
      Converts the given pushdata OpCode into a string (e.g. "PUSHDATA2", or "PUSHDATA(23)")
      +
      +
    • +
    • +
      +

      getOpCode

      +
      public static int getOpCode(String opCodeName)
      +
      Converts the given OpCodeName into an int
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/script/ScriptPattern.html b/javadoc/0.17-rc1/org/bitcoinj/script/ScriptPattern.html new file mode 100644 index 000000000..926bc07c3 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/script/ScriptPattern.html @@ -0,0 +1,374 @@ + + + + +ScriptPattern (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ScriptPattern

+
+
java.lang.Object +
org.bitcoinj.script.ScriptPattern
+
+
+
+
public class ScriptPattern +extends Object
+
This is a Script pattern matcher with some typical script patterns
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static byte[]
    + +
    +
    Extract the pubkey hash from a P2PKH scriptPubKey.
    +
    +
    static byte[]
    + +
    +
    Extract the script hash from a P2SH scriptPubKey.
    +
    +
    static byte[]
    + +
    +
    Extract the pubkey hash from a P2WPKH or the script hash from a P2WSH scriptPubKey.
    +
    +
    static byte[]
    + +
    +
    Extract the pubkey from a P2SH scriptPubKey.
    +
    +
    static byte[]
    + +
    +
    Extract the taproot output key from a P2TR scriptPubKey.
    +
    +
    static Sha256Hash
    + +
    +
    Retrieves the hash from a segwit commitment (in an output of the coinbase transaction).
    +
    +
    static boolean
    + +
    +
    Returns whether this script is using OP_RETURN to store arbitrary data.
    +
    +
    static boolean
    +
    isP2PK(Script script)
    +
    +
    Returns true if this script is of the form <pubkey> OP_CHECKSIG.
    +
    +
    static boolean
    +
    isP2PKH(Script script)
    +
    +
    Returns true if this script is of the form DUP HASH160 <pubkey hash> EQUALVERIFY CHECKSIG, ie, payment to an + address like 1VayNert3x1KzbpzMGt2qdqrAThiRovi8.
    +
    +
    static boolean
    +
    isP2SH(Script script)
    +
    +
    + Whether or not this is a scriptPubKey representing a P2SH output.
    +
    +
    static boolean
    +
    isP2TR(Script script)
    +
    +
    Returns true if this script is of the form OP_1 <pubkey>.
    +
    +
    static boolean
    +
    isP2WH(Script script)
    +
    +
    Returns true if this script is of the form OP_0 <hash>.
    +
    +
    static boolean
    +
    isP2WPKH(Script script)
    +
    +
    Returns true if this script is of the form OP_0 <hash> and hash is 20 bytes long.
    +
    +
    static boolean
    +
    isP2WSH(Script script)
    +
    +
    Returns true if this script is of the form OP_0 <hash> and hash is 32 bytes long.
    +
    +
    static boolean
    + +
    +
    Returns whether this script matches the format used for m-of-n multisig outputs: + [m] [keys...] [n] CHECKMULTISIG
    +
    +
    static boolean
    + +
    +
    Returns whether this script matches the pattern for a segwit commitment (in an output of the coinbase + transaction).
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ScriptPattern

      +
      public ScriptPattern()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      isP2PKH

      +
      public static boolean isP2PKH(Script script)
      +
      Returns true if this script is of the form DUP HASH160 <pubkey hash> EQUALVERIFY CHECKSIG, ie, payment to an + address like 1VayNert3x1KzbpzMGt2qdqrAThiRovi8. This form was originally intended for the case where you wish + to send somebody money with a written code because their node is offline, but over time has become the standard + way to make payments due to the short and recognizable base58 form addresses come in.
      +
      +
    • +
    • +
      +

      extractHashFromP2PKH

      +
      public static byte[] extractHashFromP2PKH(Script script)
      +
      Extract the pubkey hash from a P2PKH scriptPubKey. It's important that the script is in the correct form, so you + will want to guard calls to this method with isP2PKH(Script).
      +
      +
    • +
    • +
      +

      isP2SH

      +
      public static boolean isP2SH(Script script)
      +

      + Whether or not this is a scriptPubKey representing a P2SH output. In such outputs, the logic that + controls reclamation is not actually in the output at all. Instead there's just a hash, and it's up to the + spending input to provide a program matching that hash. +

      +

      + P2SH is described by BIP16. +

      +
      +
    • +
    • +
      +

      extractHashFromP2SH

      +
      public static byte[] extractHashFromP2SH(Script script)
      +
      Extract the script hash from a P2SH scriptPubKey. It's important that the script is in the correct form, so you + will want to guard calls to this method with isP2SH(Script).
      +
      +
    • +
    • +
      +

      isP2PK

      +
      public static boolean isP2PK(Script script)
      +
      Returns true if this script is of the form <pubkey> OP_CHECKSIG. This form was originally intended for transactions + where the peers talked to each other directly via TCP/IP, but has fallen out of favor with time due to that mode + of operation being susceptible to man-in-the-middle attacks. It is still used in coinbase outputs and can be + useful more exotic types of transaction, but today most payments are to addresses.
      +
      +
    • +
    • +
      +

      extractKeyFromP2PK

      +
      public static byte[] extractKeyFromP2PK(Script script)
      +
      Extract the pubkey from a P2SH scriptPubKey. It's important that the script is in the correct form, so you will + want to guard calls to this method with isP2PK(Script).
      +
      +
    • +
    • +
      +

      isP2WH

      +
      public static boolean isP2WH(Script script)
      +
      Returns true if this script is of the form OP_0 <hash>. This can either be a P2WPKH or P2WSH scriptPubKey. These + two script types were introduced with segwit.
      +
      +
    • +
    • +
      +

      isP2WPKH

      +
      public static boolean isP2WPKH(Script script)
      +
      Returns true if this script is of the form OP_0 <hash> and hash is 20 bytes long. This can only be a P2WPKH + scriptPubKey. This script type was introduced with segwit.
      +
      +
    • +
    • +
      +

      isP2WSH

      +
      public static boolean isP2WSH(Script script)
      +
      Returns true if this script is of the form OP_0 <hash> and hash is 32 bytes long. This can only be a P2WSH + scriptPubKey. This script type was introduced with segwit.
      +
      +
    • +
    • +
      +

      extractHashFromP2WH

      +
      public static byte[] extractHashFromP2WH(Script script)
      +
      Extract the pubkey hash from a P2WPKH or the script hash from a P2WSH scriptPubKey. It's important that the + script is in the correct form, so you will want to guard calls to this method with + isP2WH(Script).
      +
      +
    • +
    • +
      +

      isP2TR

      +
      public static boolean isP2TR(Script script)
      +
      Returns true if this script is of the form OP_1 <pubkey>. This is a P2TR scriptPubKey. This + script type was introduced with taproot.
      +
      +
    • +
    • +
      +

      extractOutputKeyFromP2TR

      +
      public static byte[] extractOutputKeyFromP2TR(Script script)
      +
      Extract the taproot output key from a P2TR scriptPubKey. It's important that the script is in the correct + form, so you will want to guard calls to this method with isP2TR(Script).
      +
      +
    • +
    • +
      +

      isSentToMultisig

      +
      public static boolean isSentToMultisig(Script script)
      +
      Returns whether this script matches the format used for m-of-n multisig outputs: + [m] [keys...] [n] CHECKMULTISIG
      +
      +
    • +
    • +
      +

      isOpReturn

      +
      public static boolean isOpReturn(Script script)
      +
      Returns whether this script is using OP_RETURN to store arbitrary data.
      +
      +
    • +
    • +
      +

      isWitnessCommitment

      +
      public static boolean isWitnessCommitment(Script script)
      +
      Returns whether this script matches the pattern for a segwit commitment (in an output of the coinbase + transaction). + See BIP141.
      +
      +
    • +
    • +
      +

      extractWitnessCommitmentHash

      +
      public static Sha256Hash extractWitnessCommitmentHash(Script script)
      +
      Retrieves the hash from a segwit commitment (in an output of the coinbase transaction). + You will want to guard calls to this method with isWitnessCommitment(Script). + See BIP141.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/script/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/script/package-summary.html new file mode 100644 index 000000000..a9ac6aa29 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/script/package-summary.html @@ -0,0 +1,117 @@ + + + + +org.bitcoinj.script (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.script

+
+
+
package org.bitcoinj.script
+
+
Classes for working with and executing Bitcoin script programs, as embedded in inputs and outputs.
+
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/script/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/script/package-tree.html new file mode 100644 index 000000000..0a4c6ed91 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/script/package-tree.html @@ -0,0 +1,107 @@ + + + + +org.bitcoinj.script Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.script

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/signers/CustomTransactionSigner.SignatureAndKey.html b/javadoc/0.17-rc1/org/bitcoinj/signers/CustomTransactionSigner.SignatureAndKey.html new file mode 100644 index 000000000..4676c30c5 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/signers/CustomTransactionSigner.SignatureAndKey.html @@ -0,0 +1,171 @@ + + + + +CustomTransactionSigner.SignatureAndKey (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CustomTransactionSigner.SignatureAndKey

+
+
java.lang.Object +
org.bitcoinj.signers.CustomTransactionSigner.SignatureAndKey
+
+
+
+
Enclosing class:
+
CustomTransactionSigner
+
+
+
public static class CustomTransactionSigner.SignatureAndKey +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/signers/CustomTransactionSigner.html b/javadoc/0.17-rc1/org/bitcoinj/signers/CustomTransactionSigner.html new file mode 100644 index 000000000..0536a3c91 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/signers/CustomTransactionSigner.html @@ -0,0 +1,228 @@ + + + + +CustomTransactionSigner (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CustomTransactionSigner

+
+
java.lang.Object +
org.bitcoinj.signers.CustomTransactionSigner
+
+
+
+
All Implemented Interfaces:
+
TransactionSigner
+
+
+
public abstract class CustomTransactionSigner +extends Object +implements TransactionSigner
+

This signer may be used as a template for creating custom multisig transaction signers.

+

+ Concrete implementations have to implement getSignature(Sha256Hash, List) + method returning a signature and a public key of the keypair used to created that signature. + It's up to custom implementation where to locate signatures: it may be a network connection, + some local API or something else. +

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/signers/LocalTransactionSigner.html b/javadoc/0.17-rc1/org/bitcoinj/signers/LocalTransactionSigner.html new file mode 100644 index 000000000..75ebec329 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/signers/LocalTransactionSigner.html @@ -0,0 +1,211 @@ + + + + +LocalTransactionSigner (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class LocalTransactionSigner

+
+
java.lang.Object +
org.bitcoinj.signers.LocalTransactionSigner
+
+
+
+
All Implemented Interfaces:
+
TransactionSigner
+
+
+
public class LocalTransactionSigner +extends Object +implements TransactionSigner
+

TransactionSigner implementation for signing inputs using keys from provided KeyBag.

+

This signer doesn't create input scripts for tx inputs. Instead it expects inputs to contain scripts with + empty sigs and replaces one of the empty sigs with calculated signature. +

+

This signer is always implicitly added into every wallet and it is the first signer to be executed during tx + completion. As the first signer to create a signature, it stores derivation path of the signing key in a given + TransactionSigner.ProposedTransaction object that will be also passed then to the next signer in chain. This allows other + signers to use correct signing key for P2SH inputs, because all the keys involved in a single P2SH address have + the same derivation path.

+

This signer always uses Transaction.SigHash.ALL signing mode.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      LocalTransactionSigner

      +
      public LocalTransactionSigner()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/signers/MissingSigResolutionSigner.html b/javadoc/0.17-rc1/org/bitcoinj/signers/MissingSigResolutionSigner.html new file mode 100644 index 000000000..e99db5b1c --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/signers/MissingSigResolutionSigner.html @@ -0,0 +1,214 @@ + + + + +MissingSigResolutionSigner (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MissingSigResolutionSigner

+
+
java.lang.Object +
org.bitcoinj.signers.MissingSigResolutionSigner
+
+
+
+
All Implemented Interfaces:
+
TransactionSigner
+
+
+
public class MissingSigResolutionSigner +extends Object +implements TransactionSigner
+
This transaction signer resolves missing signatures in accordance with the given Wallet.MissingSigsMode. + If missingSigsMode is USE_OP_ZERO this signer does nothing assuming missing signatures are already presented in + scriptSigs as OP_0. + In MissingSigsMode.THROW mode this signer will throw an exception. It would be MissingSignatureException + for P2SH or MissingPrivateKeyException for other transaction types.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MissingSigResolutionSigner

      +
      public MissingSigResolutionSigner()
      +
      +
    • +
    • +
      +

      MissingSigResolutionSigner

      +
      public MissingSigResolutionSigner(Wallet.MissingSigsMode missingSigsMode)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/signers/TransactionSigner.MissingSignatureException.html b/javadoc/0.17-rc1/org/bitcoinj/signers/TransactionSigner.MissingSignatureException.html new file mode 100644 index 000000000..f5d0ff98a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/signers/TransactionSigner.MissingSignatureException.html @@ -0,0 +1,152 @@ + + + + +TransactionSigner.MissingSignatureException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TransactionSigner.MissingSignatureException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.signers.TransactionSigner.MissingSignatureException
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing interface:
+
TransactionSigner
+
+
+
public static class TransactionSigner.MissingSignatureException +extends RuntimeException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MissingSignatureException

      +
      public MissingSignatureException()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/signers/TransactionSigner.ProposedTransaction.html b/javadoc/0.17-rc1/org/bitcoinj/signers/TransactionSigner.ProposedTransaction.html new file mode 100644 index 000000000..227b6af61 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/signers/TransactionSigner.ProposedTransaction.html @@ -0,0 +1,178 @@ + + + + +TransactionSigner.ProposedTransaction (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class TransactionSigner.ProposedTransaction

+
+
java.lang.Object +
org.bitcoinj.signers.TransactionSigner.ProposedTransaction
+
+
+
+
Enclosing interface:
+
TransactionSigner
+
+
+
public static class TransactionSigner.ProposedTransaction +extends Object
+
This class wraps transaction proposed to complete keeping a metadata that may be updated, used and effectively + shared by transaction signers.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      partialTx

      +
      public final Transaction partialTx
      +
      +
    • +
    • +
      +

      keyPaths

      +
      public final Map<Script,List<ChildNumber>> keyPaths
      +
      HD key paths used for each input to derive a signing key. It's useful for multisig inputs only. + The keys used to create a single P2SH address have the same derivation path, so to use a correct key each signer + has to know a derivation path of signing keys used by previous signers. For each input signers will use the + same derivation path and we need to store only one key path per input. As TransactionInput is mutable, inputs + are identified by their scriptPubKeys (keys in this map).
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ProposedTransaction

      +
      public ProposedTransaction(Transaction partialTx)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/signers/TransactionSigner.html b/javadoc/0.17-rc1/org/bitcoinj/signers/TransactionSigner.html new file mode 100644 index 000000000..8dacf67d4 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/signers/TransactionSigner.html @@ -0,0 +1,174 @@ + + + + +TransactionSigner (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface TransactionSigner

+
+
+
+
All Known Implementing Classes:
+
CustomTransactionSigner, LocalTransactionSigner, MissingSigResolutionSigner
+
+
+
public interface TransactionSigner
+

Implementations of this interface are intended to sign inputs of the given transaction. Given transaction may already + be partially signed or somehow altered by other signers.

+

To make use of the signer, you need to add it into the wallet by + calling Wallet.addTransactionSigner(TransactionSigner). Signer will be serialized + along with the wallet data. In order for a wallet to recreate signer after deserialization, each signer + should have no-args constructor

+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      isReady

      +
      boolean isReady()
      +
      Returns true if this signer is ready to be used.
      +
      +
    • +
    • +
      +

      signInputs

      +
      boolean signInputs(TransactionSigner.ProposedTransaction propTx, + KeyBag keyBag)
      +
      Signs given transaction's inputs. + Returns true if signer is compatible with given transaction (can do something meaningful with it). + Otherwise this method returns false
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/signers/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/signers/package-summary.html new file mode 100644 index 000000000..f1431f618 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/signers/package-summary.html @@ -0,0 +1,116 @@ + + + + +org.bitcoinj.signers (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.signers

+
+
+
package org.bitcoinj.signers
+
+
Transaction signers know how to calculate signatures over transactions in different contexts, for example, using + local private keys or fetching them from remote servers. The Wallet class uses these + when sending money.
+
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/signers/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/signers/package-tree.html new file mode 100644 index 000000000..6cbb390b5 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/signers/package-tree.html @@ -0,0 +1,94 @@ + + + + +org.bitcoinj.signers Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.signers

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/store/BlockStore.html b/javadoc/0.17-rc1/org/bitcoinj/store/BlockStore.html new file mode 100644 index 000000000..077d14731 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/store/BlockStore.html @@ -0,0 +1,222 @@ + + + + +BlockStore (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface BlockStore

+
+
+
+
All Known Subinterfaces:
+
FullPrunedBlockStore
+
+
+
All Known Implementing Classes:
+
MemoryBlockStore, MemoryFullPrunedBlockStore, SPVBlockStore
+
+
+
public interface BlockStore
+
An implementor of BlockStore saves StoredBlock objects to disk. Different implementations store them in + different ways. An in-memory implementation (MemoryBlockStore) exists for unit testing but real apps will want to + use implementations that save to disk.

+ + A BlockStore is a map of hashes to StoredBlock. The hash is the double digest of the Bitcoin serialization + of the block header, not the header with the extra data as well.

+ + BlockStores are thread safe.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Closes the store.
    +
    + + +
    +
    Returns the StoredBlock given a hash.
    +
    + + +
    +
    Returns the StoredBlock that represents the top of the chain of greatest total work.
    +
    +
    void
    + +
    +
    Saves the given block header+extra data.
    +
    +
    void
    + +
    +
    Sets the StoredBlock that represents the top of the chain of greatest total work.
    +
    +
    +
    +
    +
    +
  • +
+
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/store/BlockStoreException.html b/javadoc/0.17-rc1/org/bitcoinj/store/BlockStoreException.html new file mode 100644 index 000000000..e7f8e084a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/store/BlockStoreException.html @@ -0,0 +1,169 @@ + + + + +BlockStoreException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BlockStoreException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.store.BlockStoreException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
ChainFileLockedException
+
+
+
public class BlockStoreException +extends Exception
+
Thrown when something goes wrong with storing a block. Examples: out of disk space.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BlockStoreException

      +
      public BlockStoreException(String message)
      +
      +
    • +
    • +
      +

      BlockStoreException

      +
      public BlockStoreException(Throwable t)
      +
      +
    • +
    • +
      +

      BlockStoreException

      +
      public BlockStoreException(String message, + Throwable t)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/store/ChainFileLockedException.html b/javadoc/0.17-rc1/org/bitcoinj/store/ChainFileLockedException.html new file mode 100644 index 000000000..be219c9db --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/store/ChainFileLockedException.html @@ -0,0 +1,157 @@ + + + + +ChainFileLockedException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ChainFileLockedException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class ChainFileLockedException +extends BlockStoreException
+
Thrown by SPVBlockStore when the process cannot gain exclusive access to the chain file.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ChainFileLockedException

      +
      public ChainFileLockedException(String message)
      +
      +
    • +
    • +
      +

      ChainFileLockedException

      +
      public ChainFileLockedException(Throwable t)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/store/FullPrunedBlockStore.html b/javadoc/0.17-rc1/org/bitcoinj/store/FullPrunedBlockStore.html new file mode 100644 index 000000000..1ee71b534 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/store/FullPrunedBlockStore.html @@ -0,0 +1,390 @@ + + + + +FullPrunedBlockStore (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface FullPrunedBlockStore

+
+
+
+
All Superinterfaces:
+
BlockStore, UTXOProvider
+
+
+
All Known Implementing Classes:
+
MemoryFullPrunedBlockStore
+
+
+
public interface FullPrunedBlockStore +extends BlockStore, UTXOProvider
+

An implementor of FullPrunedBlockStore saves StoredBlock objects to some storage mechanism.

+ +

In addition to keeping track of a chain using StoredBlocks, it should also keep track of a second + copy of the chain which holds StoredUndoableBlocks. In this way, an application can perform a + headers-only initial sync and then use that information to more efficiently download a locally verified + full copy of the block chain.

+ +

A FullPrunedBlockStore should function well as a standard BlockStore and then be able to + trivially switch to being used as a FullPrunedBlockStore.

+ +

It should store the StoredUndoableBlocks of a number of recent blocks before verifiedHead.height and + all those after verifiedHead.height. + It is advisable to store any StoredUndoableBlock which has a height > verifiedHead.height - N. + Because N determines the memory usage, it is recommended that N be customizable. N should be chosen such that + re-orgs beyond that point are vanishingly unlikely, for example, a few thousand blocks is a reasonable choice.

+ +

It must store the StoredBlock of all blocks.

+ +

A FullPrunedBlockStore contains a map of hashes to [Full]StoredBlock. The hash is the double digest of the + Bitcoin serialization of the block header, not the header with the extra data as well.

+ +

A FullPrunedBlockStore also contains a map of hash+index to UTXO. Again, the hash is + a standard Bitcoin double-SHA256 hash of the transaction.

+ +

FullPrunedBlockStores are thread safe.

+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      put

      +
      void put(StoredBlock storedBlock, + StoredUndoableBlock undoableBlock) + throws BlockStoreException
      +

      Saves the given StoredUndoableBlock and StoredBlock. Calculates keys from the StoredBlock

      + +

      Though not required for proper function of a FullPrunedBlockStore, any user of a FullPrunedBlockStore should ensure + that a StoredUndoableBlock for each block up to the fully verified chain head has been added to this block store using + this function (not put(StoredBlock)), so that the ability to perform reorgs is maintained.

      +
      +
      Throws:
      +
      BlockStoreException - if there is a problem with the underlying storage layer, such as running out of disk space.
      +
      +
      +
    • +
    • +
      +

      getOnceUndoableStoredBlock

      +
      StoredBlock getOnceUndoableStoredBlock(Sha256Hash hash) + throws BlockStoreException
      +
      Returns the StoredBlock that was added as a StoredUndoableBlock given a hash. The returned values block.getHash() + method will be equal to the parameter. If no such block is found, returns null.
      +
      +
      Throws:
      +
      BlockStoreException
      +
      +
      +
    • +
    • +
      +

      getUndoBlock

      +
      StoredUndoableBlock getUndoBlock(Sha256Hash hash) + throws BlockStoreException
      +
      Returns a StoredUndoableBlock whose block.getHash() method will be equal to the parameter. If no such + block is found, returns null. Note that this may return null more often than get(Sha256Hash hash) as not all + StoredBlocks have a StoredUndoableBlock copy stored as well.
      +
      +
      Throws:
      +
      BlockStoreException
      +
      +
      +
    • +
    • +
      +

      getTransactionOutput

      +
      UTXO getTransactionOutput(Sha256Hash hash, + long index) + throws BlockStoreException
      +
      Gets a UTXO with the given hash and index, or null if none is found
      +
      +
      Throws:
      +
      BlockStoreException
      +
      +
      +
    • +
    • +
      +

      addUnspentTransactionOutput

      +
      void addUnspentTransactionOutput(UTXO out) + throws BlockStoreException
      +
      Adds a UTXO to the list of unspent TransactionOutputs
      +
      +
      Throws:
      +
      BlockStoreException
      +
      +
      +
    • +
    • +
      +

      removeUnspentTransactionOutput

      +
      void removeUnspentTransactionOutput(UTXO out) + throws BlockStoreException
      +
      Removes a UTXO from the list of unspent TransactionOutputs + Note that the coinbase of the genesis block should NEVER be spendable and thus never in the list.
      +
      +
      Throws:
      +
      BlockStoreException - if there is an underlying storage issue, or out was not in the list.
      +
      +
      +
    • +
    • +
      +

      hasUnspentOutputs

      +
      boolean hasUnspentOutputs(Sha256Hash hash, + int numOutputs) + throws BlockStoreException
      +
      True if this store has any unspent outputs from a transaction with a hash equal to the first parameter
      +
      +
      Parameters:
      +
      numOutputs - the number of outputs the given transaction has
      +
      Throws:
      +
      BlockStoreException
      +
      +
      +
    • +
    • +
      +

      getVerifiedChainHead

      +
      StoredBlock getVerifiedChainHead() + throws BlockStoreException
      +
      Returns the StoredBlock that represents the top of the chain of greatest total work that has + been fully verified and the point in the chain at which the unspent transaction output set in this + store represents.
      +
      +
      Throws:
      +
      BlockStoreException
      +
      +
      +
    • +
    • +
      +

      setVerifiedChainHead

      +
      void setVerifiedChainHead(StoredBlock chainHead) + throws BlockStoreException
      +
      Sets the StoredBlock that represents the top of the chain of greatest total work that has been + fully verified. It should generally be set after a batch of updates to the transaction unspent output set, + before a call to commitDatabaseBatchWrite. + + If chainHead has a greater height than the non-verified chain head (ie that set with + BlockStore.setChainHead(org.bitcoinj.core.StoredBlock)) the non-verified chain head should be set to the one set here. + In this way a class using a FullPrunedBlockStore only in full-verification mode can ignore the regular + BlockStore functions implemented as a part of a FullPrunedBlockStore.
      +
      +
      Throws:
      +
      BlockStoreException
      +
      +
      +
    • +
    • +
      +

      beginDatabaseBatchWrite

      +
      void beginDatabaseBatchWrite() + throws BlockStoreException
      +

      Begins/Commits/Aborts a database transaction.

      + +

      If abortDatabaseBatchWrite() is called by the same thread that called beginDatabaseBatchWrite(), + any data writes between this call and abortDatabaseBatchWrite() made by the same thread + should be discarded.

      + +

      Furthermore, any data written after a call to beginDatabaseBatchWrite() should not be readable + by any other threads until commitDatabaseBatchWrite() has been called by this thread. + Multiple calls to beginDatabaseBatchWrite() in any given thread should be ignored and treated as one call.

      +
      +
      Throws:
      +
      BlockStoreException
      +
      +
      +
    • +
    • +
      +

      commitDatabaseBatchWrite

      +
      void commitDatabaseBatchWrite() + throws BlockStoreException
      +
      +
      Throws:
      +
      BlockStoreException
      +
      +
      +
    • +
    • +
      +

      abortDatabaseBatchWrite

      +
      void abortDatabaseBatchWrite() + throws BlockStoreException
      +
      +
      Throws:
      +
      BlockStoreException
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/store/MemoryBlockStore.html b/javadoc/0.17-rc1/org/bitcoinj/store/MemoryBlockStore.html new file mode 100644 index 000000000..4d45b14db --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/store/MemoryBlockStore.html @@ -0,0 +1,258 @@ + + + + +MemoryBlockStore (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MemoryBlockStore

+
+
java.lang.Object +
org.bitcoinj.store.MemoryBlockStore
+
+
+
+
All Implemented Interfaces:
+
BlockStore
+
+
+
public class MemoryBlockStore +extends Object +implements BlockStore
+
Keeps StoredBlocks in memory. Used primarily for unit testing.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/store/MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag.html b/javadoc/0.17-rc1/org/bitcoinj/store/MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag.html new file mode 100644 index 000000000..54cd1da8b --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/store/MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag.html @@ -0,0 +1,171 @@ + + + + +MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag

+
+
java.lang.Object +
org.bitcoinj.store.MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag
+
+
+
+
Enclosing class:
+
MemoryFullPrunedBlockStore
+
+
+
protected static class MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      block

      +
      public StoredBlock block
      +
      +
    • +
    • +
      +

      wasUndoable

      +
      public boolean wasUndoable
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      StoredBlockAndWasUndoableFlag

      +
      public StoredBlockAndWasUndoableFlag(StoredBlock block, + boolean wasUndoable)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/store/MemoryFullPrunedBlockStore.html b/javadoc/0.17-rc1/org/bitcoinj/store/MemoryFullPrunedBlockStore.html new file mode 100644 index 000000000..e9341adc7 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/store/MemoryFullPrunedBlockStore.html @@ -0,0 +1,621 @@ + + + + +MemoryFullPrunedBlockStore (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MemoryFullPrunedBlockStore

+
+
java.lang.Object +
org.bitcoinj.store.MemoryFullPrunedBlockStore
+
+
+
+
All Implemented Interfaces:
+
UTXOProvider, BlockStore, FullPrunedBlockStore
+
+
+
public class MemoryFullPrunedBlockStore +extends Object +implements FullPrunedBlockStore
+
Keeps StoredBlocks, StoredUndoableBlocks and UTXOs in memory. + Used primarily for unit testing.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/store/SPVBlockStore.html b/javadoc/0.17-rc1/org/bitcoinj/store/SPVBlockStore.html new file mode 100644 index 000000000..b317d03ff --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/store/SPVBlockStore.html @@ -0,0 +1,480 @@ + + + + +SPVBlockStore (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SPVBlockStore

+
+
java.lang.Object +
org.bitcoinj.store.SPVBlockStore
+
+
+
+
All Implemented Interfaces:
+
BlockStore
+
+
+
public class SPVBlockStore +extends Object +implements BlockStore
+
An SPVBlockStore holds a limited number of block headers in a memory mapped ring buffer. With such a store, you + may not be able to process very deep re-orgs and could be disconnected from the chain (requiring a replay), + but as they are virtually unheard of this is not a significant risk.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/store/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/store/package-summary.html new file mode 100644 index 000000000..e71ece1e9 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/store/package-summary.html @@ -0,0 +1,121 @@ + + + + +org.bitcoinj.store (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.store

+
+
+
package org.bitcoinj.store
+
+
Block stores persist blockchain data downloaded from remote peers. There is an SPV block store which preserves a ring + buffer of headers on disk and is suitable for lightweight user wallets, a store that can calculate a full indexed + UTXO set (i.e. it can query address balances), and a memory only store useful for unit tests.
+
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/store/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/store/package-tree.html new file mode 100644 index 000000000..ef10bcd83 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/store/package-tree.html @@ -0,0 +1,102 @@ + + + + +org.bitcoinj.store Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.store

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/testing/FakeTxBuilder.BlockPair.html b/javadoc/0.17-rc1/org/bitcoinj/testing/FakeTxBuilder.BlockPair.html new file mode 100644 index 000000000..0f2fcabba --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/testing/FakeTxBuilder.BlockPair.html @@ -0,0 +1,171 @@ + + + + +FakeTxBuilder.BlockPair (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FakeTxBuilder.BlockPair

+
+
java.lang.Object +
org.bitcoinj.testing.FakeTxBuilder.BlockPair
+
+
+
+
Enclosing class:
+
FakeTxBuilder
+
+
+
public static class FakeTxBuilder.BlockPair +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      block

      +
      public final Block block
      +
      +
    • +
    • +
      +

      storedBlock

      +
      public final StoredBlock storedBlock
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BlockPair

      +
      public BlockPair(Block block, + StoredBlock storedBlock)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/testing/FakeTxBuilder.DoubleSpends.html b/javadoc/0.17-rc1/org/bitcoinj/testing/FakeTxBuilder.DoubleSpends.html new file mode 100644 index 000000000..a3aa2772d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/testing/FakeTxBuilder.DoubleSpends.html @@ -0,0 +1,178 @@ + + + + +FakeTxBuilder.DoubleSpends (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FakeTxBuilder.DoubleSpends

+
+
java.lang.Object +
org.bitcoinj.testing.FakeTxBuilder.DoubleSpends
+
+
+
+
Enclosing class:
+
FakeTxBuilder
+
+
+
public static class FakeTxBuilder.DoubleSpends +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DoubleSpends

      +
      public DoubleSpends()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/testing/FakeTxBuilder.html b/javadoc/0.17-rc1/org/bitcoinj/testing/FakeTxBuilder.html new file mode 100644 index 000000000..dcbb528a4 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/testing/FakeTxBuilder.html @@ -0,0 +1,583 @@ + + + + +FakeTxBuilder (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FakeTxBuilder

+
+
java.lang.Object +
org.bitcoinj.testing.FakeTxBuilder
+
+
+
+
public class FakeTxBuilder +extends Object
+
Methods for building fake transactions for unit tests. Since these methods are currently used both in the `bitcoinj-core` + unit tests and in the `integration-test` subproject, they are (for now) included in the `bitcoinj-core` JAR. They should + not be considered part of the API.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/testing/MockAltNetwork.html b/javadoc/0.17-rc1/org/bitcoinj/testing/MockAltNetwork.html new file mode 100644 index 000000000..987c9d48d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/testing/MockAltNetwork.html @@ -0,0 +1,322 @@ + + + + +MockAltNetwork (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MockAltNetwork

+
+
java.lang.Object +
org.bitcoinj.testing.MockAltNetwork
+
+
+
+
All Implemented Interfaces:
+
Network
+
+
+
public class MockAltNetwork +extends Object +implements Network
+
Mock Alt-net implementation of Network for unit tests.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MockAltNetwork

      +
      public MockAltNetwork()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      id

      +
      public String id()
      +
      Description copied from interface: Network
      +
      The dot-seperated string id for this network. For example "org.bitcoin.production"
      +
      +
      Specified by:
      +
      id in interface Network
      +
      Returns:
      +
      String ID for network
      +
      +
      +
    • +
    • +
      +

      legacyAddressHeader

      +
      public int legacyAddressHeader()
      +
      Description copied from interface: Network
      +
      Header byte of base58 encoded legacy P2PKH addresses for this network.
      +
      +
      Specified by:
      +
      legacyAddressHeader in interface Network
      +
      Returns:
      +
      header byte as an int.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      legacyP2SHHeader

      +
      public int legacyP2SHHeader()
      +
      Description copied from interface: Network
      +
      Header byte of base58 encoded legacy P2SH addresses for this network.
      +
      +
      Specified by:
      +
      legacyP2SHHeader in interface Network
      +
      Returns:
      +
      header byte as an int.
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      segwitAddressHrp

      +
      public String segwitAddressHrp()
      +
      Description copied from interface: Network
      +
      Human-readable part (HRP) of bech32 encoded segwit addresses for this network.
      +
      +
      Specified by:
      +
      segwitAddressHrp in interface Network
      +
      Returns:
      +
      HRP (lowercase)
      +
      +
      +
    • +
    • +
      +

      uriScheme

      +
      public String uriScheme()
      +
      Description copied from interface: Network
      +
      The URI scheme for this network. See BitcoinNetwork.uriScheme().
      +
      +
      Specified by:
      +
      uriScheme in interface Network
      +
      Returns:
      +
      The URI scheme for this network
      +
      +
      +
    • +
    • +
      +

      hasMaxMoney

      +
      public boolean hasMaxMoney()
      +
      Description copied from interface: Network
      +
      Does this network have a fixed maximum number of coins
      +
      +
      Specified by:
      +
      hasMaxMoney in interface Network
      +
      Returns:
      +
      true if this network has a fixed maximum number of coins
      +
      +
      +
    • +
    • +
      +

      maxMoney

      +
      public Monetary maxMoney()
      +
      Description copied from interface: Network
      +
      Maximum number of coins for this network as a Monetary value. + Where not applicable, a very large number of coins is returned instead (e.g. the main coin issue for Dogecoin).
      +
      +
      Specified by:
      +
      maxMoney in interface Network
      +
      Returns:
      +
      Maximum number of coins for this network
      +
      +
      +
    • +
    • +
      +

      exceedsMaxMoney

      +
      public boolean exceedsMaxMoney(Monetary monetary)
      +
      Description copied from interface: Network
      +
      Check if an amount exceeds the maximum allowed for a network (if the network has one)
      +
      +
      Specified by:
      +
      exceedsMaxMoney in interface Network
      +
      Parameters:
      +
      monetary - A monetary amount
      +
      Returns:
      +
      true if too big, false if an allowed amount
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/testing/MockAltNetworkParams.html b/javadoc/0.17-rc1/org/bitcoinj/testing/MockAltNetworkParams.html new file mode 100644 index 000000000..5157315bf --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/testing/MockAltNetworkParams.html @@ -0,0 +1,368 @@ + + + + +MockAltNetworkParams (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class MockAltNetworkParams

+
+
java.lang.Object +
org.bitcoinj.core.NetworkParameters +
org.bitcoinj.testing.MockAltNetworkParams
+
+
+
+
+
public class MockAltNetworkParams +extends NetworkParameters
+
Mock Alt-net subclass of NetworkParameters for unit tests.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MockAltNetworkParams

      +
      public MockAltNetworkParams()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getPaymentProtocolId

      +
      public String getPaymentProtocolId()
      +
      +
      Specified by:
      +
      getPaymentProtocolId in class NetworkParameters
      +
      Returns:
      +
      the payment protocol network id string
      +
      +
      +
    • +
    • +
      +

      checkDifficultyTransitions

      +
      public void checkDifficultyTransitions(StoredBlock storedPrev, + Block next, + BlockStore blockStore) + throws VerificationException, +BlockStoreException
      +
      Description copied from class: NetworkParameters
      +
      Throws an exception if the block's difficulty is not correct.
      +
      +
      Specified by:
      +
      checkDifficultyTransitions in class NetworkParameters
      +
      Parameters:
      +
      storedPrev - previous stored block
      +
      next - proposed block
      +
      blockStore - active BlockStore
      +
      Throws:
      +
      VerificationException - if the block's difficulty is not correct.
      +
      BlockStoreException - if an error occurred accessing the BlockStore
      +
      +
      +
    • +
    • +
      +

      getGenesisBlock

      +
      public Block getGenesisBlock()
      +
      Description copied from class: NetworkParameters
      +

      Genesis block for this chain.

      + +

      The first block in every chain is a well known constant shared between all Bitcoin implementations. For a + block to be valid, it must be eventually possible to work backwards to the genesis block by following the + prevBlockHash pointers in the block headers.

      + +

      The genesis blocks for both test and main networks contain the timestamp of when they were created, + and a message in the coinbase transaction. It says, "The Times 03/Jan/2009 Chancellor on brink of second + bailout for banks".

      +
      +
      Specified by:
      +
      getGenesisBlock in class NetworkParameters
      +
      Returns:
      +
      genesis block
      +
      +
      +
    • +
    • +
      +

      getMaxMoney

      +
      public Coin getMaxMoney()
      +
      Description copied from class: NetworkParameters
      +
      Returns the number of coins that will be produced in total, on this + network. Where not applicable, a very large number of coins is returned + instead (e.g. the main coin issue for Dogecoin).
      +
      +
      Specified by:
      +
      getMaxMoney in class NetworkParameters
      +
      Returns:
      +
      maximum number of coins for this network
      +
      +
      +
    • +
    • +
      +

      getMonetaryFormat

      +
      public MonetaryFormat getMonetaryFormat()
      +
      Description copied from class: NetworkParameters
      +
      The monetary object for this currency.
      +
      +
      Specified by:
      +
      getMonetaryFormat in class NetworkParameters
      +
      Returns:
      +
      formatting utility object
      +
      +
      +
    • +
    • +
      +

      getUriScheme

      +
      public String getUriScheme()
      +
      Description copied from class: NetworkParameters
      +
      Scheme part for URIs, for example "bitcoin".
      +
      +
      Specified by:
      +
      getUriScheme in class NetworkParameters
      +
      Returns:
      +
      a string with the "scheme" part
      +
      +
      +
    • +
    • +
      +

      hasMaxMoney

      +
      public boolean hasMaxMoney()
      +
      Description copied from class: NetworkParameters
      +
      Returns whether this network has a maximum number of coins (finite supply) or + not. Always returns true for Bitcoin, but exists to be overridden for other + networks.
      +
      +
      Specified by:
      +
      hasMaxMoney in class NetworkParameters
      +
      Returns:
      +
      true if network has a fixed maximum number of coins
      +
      +
      +
    • +
    • +
      +

      getSerializer

      +
      public BitcoinSerializer getSerializer()
      +
      Description copied from class: NetworkParameters
      +
      Construct and return a custom serializer.
      +
      +
      Specified by:
      +
      getSerializer in class NetworkParameters
      +
      Returns:
      +
      the serializer
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/testing/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/testing/package-summary.html new file mode 100644 index 000000000..c1fd0dc4a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/testing/package-summary.html @@ -0,0 +1,96 @@ + + + + +org.bitcoinj.testing (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.testing

+
+
+
package org.bitcoinj.testing
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/testing/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/testing/package-tree.html new file mode 100644 index 000000000..ad5ab4a49 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/testing/package-tree.html @@ -0,0 +1,79 @@ + + + + +org.bitcoinj.testing Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.testing

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/uri/BitcoinURI.html b/javadoc/0.17-rc1/org/bitcoinj/uri/BitcoinURI.html new file mode 100644 index 000000000..bf0407f2d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/uri/BitcoinURI.html @@ -0,0 +1,593 @@ + + + + +BitcoinURI (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BitcoinURI

+
+
java.lang.Object +
org.bitcoinj.uri.BitcoinURI
+
+
+
+
public class BitcoinURI +extends Object
+

Provides a standard implementation of a Bitcoin URI with support for the following:

+ +
    +
  • URLEncoded URIs (as passed in by IE on the command line)
  • +
  • BIP21 names (including the "req-" prefix handling requirements)
  • +
+ +

Accepted formats

+ +

The following input forms are accepted:

+ +
    +
  • bitcoin:<address>
  • +
  • bitcoin:<address>?<name1>=<value1>&<name2>=<value2> with multiple + additional name/value pairs
  • +
+ +

The name/value pairs are processed as follows.

+
    +
  1. URL encoding is stripped and treated as UTF-8
  2. +
  3. names prefixed with req- are treated as required and if unknown or conflicting cause a parse exception
  4. +
  5. Unknown names not prefixed with req- are added to a Map, accessible by parameter name
  6. +
  7. Known names not prefixed with req- are processed unless they are malformed
  8. +
+ +

The following names are known and have the following formats:

+
    +
  • amount decimal value to 8 dp (e.g. 0.12345678) Note that the + exponent notation is not supported any more
  • +
  • label any URL encoded alphanumeric
  • +
  • message any URL encoded alphanumeric
  • +
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BitcoinURI

      +
      @Deprecated +public BitcoinURI(@Nullable + NetworkParameters params, + String input) + throws BitcoinURIParseException
      +
      Deprecated. + +
      +
      Constructs a new object by trying to parse the input as a valid Bitcoin URI.
      +
      +
      Parameters:
      +
      params - The network parameters that determine which network the URI is from, or null if you don't have + any expectation about what network the URI is for and wish to check yourself.
      +
      input - The raw URI data to be parsed (see class comments for accepted formats)
      +
      Throws:
      +
      BitcoinURIParseException - If the input fails Bitcoin URI syntax and semantic checks.
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      of

      +
      public static BitcoinURI of(String uri) + throws BitcoinURIParseException
      +
      Constructs a new BitcoinURI from the given string. Can be for any network.
      +
      +
      Parameters:
      +
      uri - The raw URI data to be parsed (see class comments for accepted formats)
      +
      Throws:
      +
      BitcoinURIParseException - if the URI is not syntactically or semantically valid.
      +
      +
      +
    • +
    • +
      +

      of

      +
      public static BitcoinURI of(String uri, + @Nonnull + Network network) + throws BitcoinURIParseException
      +
      Constructs a new object by trying to parse the input as a valid Bitcoin URI.
      +
      +
      Parameters:
      +
      uri - The raw URI data to be parsed (see class comments for accepted formats)
      +
      network - The network the URI is from
      +
      Throws:
      +
      BitcoinURIParseException - If the input fails Bitcoin URI syntax and semantic checks.
      +
      +
      +
    • +
    • +
      +

      getAddress

      +
      @Nullable +public Address getAddress()
      +
      The Bitcoin address from the URI, if one was present. It's possible to have Bitcoin URI's with no address if a + r= payment protocol parameter is specified, though this form is not recommended as older wallets can't understand + it.
      +
      +
    • +
    • +
      +

      getAmount

      +
      public Coin getAmount()
      +
      +
      Returns:
      +
      The amount name encoded using a pure integer value based at + 10,000,000 units is 1 BTC. May be null if no amount is specified
      +
      +
      +
    • +
    • +
      +

      getLabel

      +
      public String getLabel()
      +
      +
      Returns:
      +
      The label from the URI.
      +
      +
      +
    • +
    • +
      +

      getMessage

      +
      public String getMessage()
      +
      +
      Returns:
      +
      The message from the URI.
      +
      +
      +
    • +
    • +
      +

      getPaymentRequestUrl

      +
      public final String getPaymentRequestUrl()
      +
      +
      Returns:
      +
      The URL where a payment request (as specified in BIP 70) may + be fetched.
      +
      +
      +
    • +
    • +
      +

      getPaymentRequestUrls

      +
      public List<String> getPaymentRequestUrls()
      +
      Returns the URLs where a payment request (as specified in BIP 70) may be fetched. The first URL is the main URL, + all subsequent URLs are fallbacks.
      +
      +
    • +
    • +
      +

      getParameterByName

      +
      public Object getParameterByName(String name)
      +
      +
      Parameters:
      +
      name - The name of the parameter
      +
      Returns:
      +
      The parameter value, or null if not present
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      convertToBitcoinURI

      +
      public static String convertToBitcoinURI(Address address, + Coin amount, + String label, + String message)
      +
      Simple Bitcoin URI builder using known good fields.
      +
      +
      Parameters:
      +
      address - The Bitcoin address
      +
      amount - The amount
      +
      label - A label
      +
      message - A message
      +
      Returns:
      +
      A String containing the Bitcoin URI
      +
      +
      +
    • +
    • +
      +

      convertToBitcoinURI

      +
      @Deprecated +public static String convertToBitcoinURI(NetworkParameters params, + String address, + @Nullable + Coin amount, + @Nullable + String label, + @Nullable + String message)
      + +
      Simple Bitcoin URI builder using known good fields.
      +
      +
      Parameters:
      +
      params - The network parameters that determine which network the URI + is for.
      +
      address - The Bitcoin address
      +
      amount - The amount
      +
      label - A label
      +
      message - A message
      +
      Returns:
      +
      A String containing the Bitcoin URI
      +
      +
      +
    • +
    • +
      +

      convertToBitcoinURI

      +
      public static String convertToBitcoinURI(Network network, + String address, + @Nullable + Coin amount, + @Nullable + String label, + @Nullable + String message)
      +
      Simple Bitcoin URI builder using known good fields.
      +
      +
      Parameters:
      +
      network - The network the URI is for.
      +
      address - The Bitcoin address
      +
      amount - The amount
      +
      label - A label
      +
      message - A message
      +
      Returns:
      +
      A String containing the Bitcoin URI
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/uri/BitcoinURIParseException.html b/javadoc/0.17-rc1/org/bitcoinj/uri/BitcoinURIParseException.html new file mode 100644 index 000000000..f237363cd --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/uri/BitcoinURIParseException.html @@ -0,0 +1,167 @@ + + + + +BitcoinURIParseException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BitcoinURIParseException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.uri.BitcoinURIParseException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
OptionalFieldValidationException, RequiredFieldValidationException
+
+
+
public class BitcoinURIParseException +extends Exception
+

Exception to provide the following to BitcoinURI:

+
    +
  • Provision of parsing error messages
  • +
+

This base exception acts as a general failure mode not attributable to a specific cause (other than + that reported in the exception message). Since this is in English, it may not be worth reporting directly + to the user other than as part of a "general failure to parse" response.

+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BitcoinURIParseException

      +
      public BitcoinURIParseException(String s)
      +
      +
    • +
    • +
      +

      BitcoinURIParseException

      +
      public BitcoinURIParseException(String s, + Throwable throwable)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/uri/OptionalFieldValidationException.html b/javadoc/0.17-rc1/org/bitcoinj/uri/OptionalFieldValidationException.html new file mode 100644 index 000000000..155c29b84 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/uri/OptionalFieldValidationException.html @@ -0,0 +1,167 @@ + + + + +OptionalFieldValidationException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class OptionalFieldValidationException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.uri.BitcoinURIParseException +
org.bitcoinj.uri.OptionalFieldValidationException
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class OptionalFieldValidationException +extends BitcoinURIParseException
+

Exception to provide the following to BitcoinURI:

+
    +
  • Provision of parsing error messages
  • +
+

This exception occurs when an optional field is detected (under the Bitcoin URI scheme) and fails + to pass the associated test (such as amount not being a valid number).

+
+
Since:
+
0.3.0 +  
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      OptionalFieldValidationException

      +
      public OptionalFieldValidationException(String s)
      +
      +
    • +
    • +
      +

      OptionalFieldValidationException

      +
      public OptionalFieldValidationException(String s, + Throwable throwable)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/uri/RequiredFieldValidationException.html b/javadoc/0.17-rc1/org/bitcoinj/uri/RequiredFieldValidationException.html new file mode 100644 index 000000000..233fcd47f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/uri/RequiredFieldValidationException.html @@ -0,0 +1,168 @@ + + + + +RequiredFieldValidationException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class RequiredFieldValidationException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.uri.BitcoinURIParseException +
org.bitcoinj.uri.RequiredFieldValidationException
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class RequiredFieldValidationException +extends BitcoinURIParseException
+

Exception to provide the following to BitcoinURI:

+
    +
  • Provision of parsing error messages
  • +
+

This exception occurs when a required field is detected (under the BIP21 rules) and fails + to pass the associated test (such as req-expires being out of date), or the required field is unknown + to this version of the client in which case it should fail for security reasons.

+
+
Since:
+
0.3.0 +  
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      RequiredFieldValidationException

      +
      public RequiredFieldValidationException(String s)
      +
      +
    • +
    • +
      +

      RequiredFieldValidationException

      +
      public RequiredFieldValidationException(String s, + Throwable throwable)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/uri/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/uri/package-summary.html new file mode 100644 index 000000000..1454c17f5 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/uri/package-summary.html @@ -0,0 +1,105 @@ + + + + +org.bitcoinj.uri (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.uri

+
+
+
package org.bitcoinj.uri
+
+
Parsing and handling of bitcoin: textual URIs as found in qr codes and web links.
+
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/uri/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/uri/package-tree.html new file mode 100644 index 000000000..eca27c4bb --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/uri/package-tree.html @@ -0,0 +1,85 @@ + + + + +org.bitcoinj.uri Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.uri

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/AppDataDirectory.html b/javadoc/0.17-rc1/org/bitcoinj/utils/AppDataDirectory.html new file mode 100644 index 000000000..f541cdc91 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/AppDataDirectory.html @@ -0,0 +1,196 @@ + + + + +AppDataDirectory (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AppDataDirectory

+
+
java.lang.Object +
org.bitcoinj.utils.AppDataDirectory
+
+
+
+
public class AppDataDirectory +extends Object
+
Find/create App Data Directory in correct platform-specific location. + This class is based on the conventions used in Bitcoin Core which + uses the following locations: +
+
Windows
${APPDATA}/.bitcoin
+
macOS
${HOME}/Library/Application Support/Bitcoin
+
Linux
${HOME}/.bitcoin
+
+ Note that appName is converted to lower-case on Windows and Linux/Unix.
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static Path
    +
    get(String appName)
    +
    +
    Get and create if necessary the Path to the application data directory.
    +
    +
    static Path
    +
    getPath(String appName)
    +
    +
    Return the Path to the application data directory without making + sure it exists or creating it.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AppDataDirectory

      +
      public AppDataDirectory()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      get

      +
      public static Path get(String appName)
      +
      Get and create if necessary the Path to the application data directory.
      +
      +
      Parameters:
      +
      appName - The name of the current application
      +
      Returns:
      +
      Path to the application data directory
      +
      +
      +
    • +
    • +
      +

      getPath

      +
      public static Path getPath(String appName)
      +
      Return the Path to the application data directory without making + sure it exists or creating it. (No disk I/O)
      +
      +
      Parameters:
      +
      appName - The name of the current application
      +
      Returns:
      +
      Path to the application data directory
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/BaseTaggableObject.html b/javadoc/0.17-rc1/org/bitcoinj/utils/BaseTaggableObject.html new file mode 100644 index 000000000..7dee559a4 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/BaseTaggableObject.html @@ -0,0 +1,279 @@ + + + + +BaseTaggableObject (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BaseTaggableObject

+
+
java.lang.Object +
org.bitcoinj.utils.BaseTaggableObject
+
+
+
+
All Implemented Interfaces:
+
TaggableObject
+
+
+
Direct Known Subclasses:
+
Wallet
+
+
+
@Deprecated +public class BaseTaggableObject +extends Object +implements TaggableObject
+
Deprecated. +
Applications should use another mechanism to persist application state data
+
+
A simple implementation of TaggableObject that uses a hashmap that is + synchronized on this object's Java monitor.
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    protected final Map<String,com.google.protobuf.ByteString>
    + +
    +
    Deprecated.
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
    +
    Deprecated.
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    com.google.protobuf.ByteString
    + +
    +
    Deprecated.
    +
    +
    Map<String,com.google.protobuf.ByteString>
    + +
    +
    Deprecated.
    +
    +
    com.google.protobuf.ByteString
    + +
    +
    Deprecated.
    +
    +
    void
    +
    setTag(String tag, + com.google.protobuf.ByteString value)
    +
    +
    Deprecated.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      tags

      +
      protected final Map<String,com.google.protobuf.ByteString> tags
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BaseTaggableObject

      +
      public BaseTaggableObject()
      +
      Deprecated.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      maybeGetTag

      +
      @Nullable +@Deprecated +public com.google.protobuf.ByteString maybeGetTag(String tag)
      +
      Deprecated.
      +
      Description copied from interface: TaggableObject
      +
      Returns the immutable byte array associated with the given tag name, or null if there is none.
      +
      +
      Specified by:
      +
      maybeGetTag in interface TaggableObject
      +
      +
      +
    • +
    • +
      +

      getTag

      +
      @Deprecated +public com.google.protobuf.ByteString getTag(String tag)
      +
      Deprecated.
      +
      Description copied from interface: TaggableObject
      +
      Returns the immutable byte array associated with the given tag name, or throws IllegalArgumentException + if that tag wasn't set yet.
      +
      +
      Specified by:
      +
      getTag in interface TaggableObject
      +
      +
      +
    • +
    • +
      +

      setTag

      +
      @Deprecated +public void setTag(String tag, + com.google.protobuf.ByteString value)
      +
      Deprecated.
      +
      Description copied from interface: TaggableObject
      +
      Associates the given immutable byte array with the string tag. See the docs for TaggableObject to learn more.
      +
      +
      Specified by:
      +
      setTag in interface TaggableObject
      +
      +
      +
    • +
    • +
      +

      getTags

      +
      @Deprecated +public Map<String,com.google.protobuf.ByteString> getTags()
      +
      Deprecated.
      +
      Description copied from interface: TaggableObject
      +
      Returns a copy of all the tags held by this object.
      +
      +
      Specified by:
      +
      getTags in interface TaggableObject
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/BlockFileLoader.BlockFileIterator.html b/javadoc/0.17-rc1/org/bitcoinj/utils/BlockFileLoader.BlockFileIterator.html new file mode 100644 index 000000000..b005b64f4 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/BlockFileLoader.BlockFileIterator.html @@ -0,0 +1,212 @@ + + + + +BlockFileLoader.BlockFileIterator (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BlockFileLoader.BlockFileIterator

+
+
java.lang.Object +
org.bitcoinj.utils.BlockFileLoader.BlockFileIterator
+
+
+
+
All Implemented Interfaces:
+
Iterator<ByteBuffer>
+
+
+
Enclosing class:
+
BlockFileLoader
+
+
+
public class BlockFileLoader.BlockFileIterator +extends Object +implements Iterator<ByteBuffer>
+
Iterates all the blocks in a single block file.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/BlockFileLoader.html b/javadoc/0.17-rc1/org/bitcoinj/utils/BlockFileLoader.html new file mode 100644 index 000000000..b301f8a3f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/BlockFileLoader.html @@ -0,0 +1,308 @@ + + + + +BlockFileLoader (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BlockFileLoader

+
+
java.lang.Object +
org.bitcoinj.utils.BlockFileLoader
+
+
+
+
All Implemented Interfaces:
+
Iterable<Block>
+
+
+
public class BlockFileLoader +extends Object +implements Iterable<Block>
+

This class reads block files stored in the Bitcoin Core format. This is simply a way to concatenate + blocks together. Importing block data with this tool can be a lot faster than syncing over the network, if you + have the files available.

+ +

In order to comply with Iterable, BlockFileLoader.BlockFileIterator swallows a lot of IOExceptions, which may result in a few + blocks being missed followed by a huge set of orphan blocks.

+ +

To blindly import all files which can be found in Bitcoin Core (version 0.8 or higher) datadir automatically, + try this code fragment: + + BlockFileLoader loader = new BlockFileLoader(BlockFileLoader.getReferenceClientBlockFileList()); + for (Block block : loader) { + try { chain.add(block); } catch (Exception e) { } + } +

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getReferenceClientBlockFileList

      +
      public static List<File> getReferenceClientBlockFileList(File blocksDir)
      +
      Gets the list of files which contain blocks from Bitcoin Core.
      +
      +
    • +
    • +
      +

      getReferenceClientBlockFileList

      +
      public static List<File> getReferenceClientBlockFileList()
      +
      +
    • +
    • +
      +

      defaultBlocksDir

      +
      public static File defaultBlocksDir()
      +
      +
    • +
    • +
      +

      iterator

      +
      public Iterator<Block> iterator()
      +
      +
      Specified by:
      +
      iterator in interface Iterable<Block>
      +
      +
      +
    • +
    • +
      +

      stream

      +
      public Stream<Block> stream()
      +
      +
    • +
    • +
      +

      streamBuffers

      +
      public Stream<ByteBuffer> streamBuffers()
      +
      +
    • +
    • +
      +

      fileBlockStream

      +
      protected Stream<ByteBuffer> fileBlockStream(File file)
      +
      +
    • +
    • +
      +

      fileBlockSpliterator

      +
      protected Spliterator<ByteBuffer> fileBlockSpliterator(File file)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/BriefLogFormatter.html b/javadoc/0.17-rc1/org/bitcoinj/utils/BriefLogFormatter.html new file mode 100644 index 000000000..8e152496a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/BriefLogFormatter.html @@ -0,0 +1,207 @@ + + + + +BriefLogFormatter (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BriefLogFormatter

+
+
java.lang.Object +
java.util.logging.Formatter +
org.bitcoinj.utils.BriefLogFormatter
+
+
+
+
+
public class BriefLogFormatter +extends Formatter
+
A Java logging formatter that writes more compact output than the default.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BriefLogFormatter

      +
      public BriefLogFormatter()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      init

      +
      public static void init()
      +
      +
    • +
    • +
      +

      init

      +
      public static void init(Level level)
      +
      Configures JDK logging to use this class for everything.
      +
      +
    • +
    • +
      +

      initVerbose

      +
      public static void initVerbose()
      +
      +
    • +
    • +
      +

      initWithSilentBitcoinJ

      +
      public static void initWithSilentBitcoinJ()
      +
      +
    • +
    • +
      +

      format

      +
      public String format(LogRecord logRecord)
      +
      +
      Specified by:
      +
      format in class Formatter
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/BtcAutoFormat.Style.html b/javadoc/0.17-rc1/org/bitcoinj/utils/BtcAutoFormat.Style.html new file mode 100644 index 000000000..393e460ec --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/BtcAutoFormat.Style.html @@ -0,0 +1,229 @@ + + + + +BtcAutoFormat.Style (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class BtcAutoFormat.Style

+
+
java.lang.Object +
java.lang.Enum<BtcAutoFormat.Style> +
org.bitcoinj.utils.BtcAutoFormat.Style
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<BtcAutoFormat.Style>, Constable
+
+
+
Enclosing class:
+
BtcAutoFormat
+
+
+
public static enum BtcAutoFormat.Style +extends Enum<BtcAutoFormat.Style>
+
Enum for specifying the style of currency indicators that are used + when formatting, either codes or symbols.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      CODE

      +
      public static final BtcAutoFormat.Style CODE
      +
      Constant for the formatting style that uses a currency code, e.g., "BTC".
      +
      +
    • +
    • +
      +

      SYMBOL

      +
      public static final BtcAutoFormat.Style SYMBOL
      +
      Constant for the formatting style that uses a currency symbol, e.g., "฿".
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static BtcAutoFormat.Style[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static BtcAutoFormat.Style valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/BtcAutoFormat.html b/javadoc/0.17-rc1/org/bitcoinj/utils/BtcAutoFormat.html new file mode 100644 index 000000000..500b49186 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/BtcAutoFormat.html @@ -0,0 +1,334 @@ + + + + +BtcAutoFormat (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BtcAutoFormat

+
+
java.lang.Object +
java.text.Format +
org.bitcoinj.utils.BtcFormat +
org.bitcoinj.utils.BtcAutoFormat
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Cloneable
+
+
+
public final class BtcAutoFormat +extends BtcFormat
+

This class, a concrete extension of BtcFormat, is distinguished by its + accommodation of multiple denominational units as follows: + +

When formatting Bitcoin monetary values, an instance of this class automatically adjusts + the denominational units in which it represents a given value so as to minimize the number + of consecutive zeros in the number that is displayed, and includes either a currency code or + symbol in the formatted value to indicate which denomination was chosen. + +

When parsing String representations of Bitcoin monetary values, instances of + this class automatically recognize units indicators consisting of currency codes and + symbols, including including those containing currency or metric prefixes such as + "¢" or "c" to indicate hundredths, and interpret each number being + parsed in accordance with the recognized denominational units. + +

A more detailed explanation, including examples, is in the documentation for the BtcFormat class, and further information beyond that is in the documentation for the Format class, from which this class descends.

+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BtcAutoFormat

      +
      protected BtcAutoFormat(Locale locale, + BtcAutoFormat.Style style, + int fractionPlaces)
      +
      Constructor
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      scale

      +
      protected int scale(BigInteger satoshis, + int fractionPlaces)
      +
      Calculate the appropriate denomination for the given Bitcoin monetary value. This + method takes a BigInteger representing a quantity of satoshis, and returns the + number of places that value's decimal point is to be moved when formatting said value + in order that the resulting number represents the correct quantity of denominational + units. + +

      As a side-effect, this sets the units indicators of the underlying NumberFormat object. + Only invoke this from a synchronized method, and be sure to put the DecimalFormatSymbols + back to its proper state, otherwise immutability, equals() and hashCode() fail.

      +
      +
      Specified by:
      +
      scale in class BtcFormat
      +
      Parameters:
      +
      satoshis - The number of satoshis having the value for which the shift is calculated
      +
      fractionPlaces - The number of decimal places available for displaying the + fractional part of the denominated value
      +
      Returns:
      +
      The size of the shift in increasingly-precise decimal places
      +
      +
      +
    • +
    • +
      +

      scale

      +
      protected int scale()
      +
      Returns the int value indicating coin denomination. This is what causes + the number in a parsed value that lacks a units indicator to be interpreted as a quantity + of bitcoins.
      +
      +
      Specified by:
      +
      scale in class BtcFormat
      +
      +
      +
    • +
    • +
      +

      fractionPlaces

      +
      public int fractionPlaces()
      +
      Return the number of decimal places in the fraction part of numbers formatted by this + instance. This is the maximum number of fraction places that will be displayed; + the actual number used is limited to a precision of satoshis.
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      Return true if the other instance is equivalent to this one. + Formatters for different locales will never be equal, even + if they behave identically.
      +
      +
      Overrides:
      +
      equals in class BtcFormat
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      Return a brief description of this formatter. The exact details of the representation + are unspecified and subject to change, but will include some representation of the + pattern and the number of fractional decimal places.
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/BtcFixedFormat.html b/javadoc/0.17-rc1/org/bitcoinj/utils/BtcFixedFormat.html new file mode 100644 index 000000000..78e707bf2 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/BtcFixedFormat.html @@ -0,0 +1,436 @@ + + + + +BtcFixedFormat (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BtcFixedFormat

+
+
java.lang.Object +
java.text.Format +
org.bitcoinj.utils.BtcFormat +
org.bitcoinj.utils.BtcFixedFormat
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Cloneable
+
+
+
public final class BtcFixedFormat +extends BtcFormat
+

This class, a concrete extension of BtcFormat, is distinguished in that each + instance formats and by-default parses all Bitcoin monetary values in units of a single + denomination that is specified at the time that instance is constructed.

+ +

By default, neither currency codes nor symbols are included in formatted values as + output, nor recognized in parsed values as input. The can be overridden by applying a + custom pattern using either the BtcFormat.Builder.localizedPattern(String) or + BtcFormat.Builder.localizedPattern(String) methods, as described in the documentation for + the BtcFormat.Builder class.

+ +

A more detailed explanation, including examples, is in the documentation for the + BtcFormat class, and further information beyond that is in the documentation for the + Format class, from which this class descends.

+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      REPEATING_PLACES

      +
      public static final int[] REPEATING_PLACES
      +
      A constant specifying the use of as many optional decimal places in the fraction part + of a formatted number as are useful for expressing precision. This value can be passed + as the final argument to a factory method or BtcFormat.format(Object, int, int...).
      +
      +
    • +
    • +
      +

      REPEATING_DOUBLETS

      +
      public static final int[] REPEATING_DOUBLETS
      +
      A constant specifying the use of as many optional groups of two + decimal places in the fraction part of a formatted number as are useful for expressing + precision. This value can be passed as the final argument to a factory method or + BtcFormat.format(Object, int, int...).
      +
      +
    • +
    • +
      +

      REPEATING_TRIPLETS

      +
      public static final int[] REPEATING_TRIPLETS
      +
      A constant specifying the use of as many optional groups of three + decimal places in the fraction part of a formatted number as are useful for expressing + precision. This value can be passed as the final argument to a factory method or + BtcFormat.format(Object, int, int...).
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BtcFixedFormat

      +
      protected BtcFixedFormat(Locale locale, + int scale, + int minDecimals, + List<Integer> groups)
      +
      Constructor
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      scale

      +
      protected int scale(BigInteger satoshis, + int fractionPlaces)
      +
      Return the decimal-place shift for this object's unit-denomination. For example, if + the denomination is millibitcoins, this method will return the value 3. As + a side-effect, prefixes the currency signs of the underlying NumberFormat object. This + method is invoked by the superclass when formatting. The arguments are ignored because + the denomination is fixed regardless of the value being formatted.
      +
      +
      Specified by:
      +
      scale in class BtcFormat
      +
      Parameters:
      +
      satoshis - The number of satoshis having the value for which the shift is calculated
      +
      fractionPlaces - The number of decimal places available for displaying the + fractional part of the denominated value
      +
      Returns:
      +
      The size of the shift in increasingly-precise decimal places
      +
      +
      +
    • +
    • +
      +

      scale

      +
      public int scale()
      +
      Return the decimal-place shift for this object's fixed unit-denomination. For example, if + the denomination is millibitcoins, this method will return the value 3.
      +
      +
      Specified by:
      +
      scale in class BtcFormat
      +
      +
      +
    • +
    • +
      +

      code

      +
      public String code()
      +
      Return the currency code that identifies the units in which values formatted and + (by-default) parsed by this instance are denominated. For example, if the formatter's + denomination is millibitcoins, then this method will return "mBTC", + assuming the default base currency-code is not overridden using a + BtcFormat.Builder.
      +
      +
    • +
    • +
      +

      symbol

      +
      public String symbol()
      +
      Return the currency symbol that identifies the units in which values formatted by this + instance are denominated. For example, when invoked on an instance denominated in + millibitcoins, this method by default returns "₥฿", depending on the + locale.
      +
      +
    • +
    • +
      +

      fractionPlaceGroups

      +
      public int[] fractionPlaceGroups()
      +
      Return the fractional decimal-placing used when formatting. This method returns an + int array. The value of the first element is the minimum number of + decimal places to be used in all cases, limited to a precision of satoshis. The value + of each successive element is the size of an optional place-group that will be applied, + possibly partially, if useful for expressing precision. The actual size of each group + is limited to, and may be reduced to the limit of, a precision of no smaller than + satoshis.
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      Return true if the given object is equivalent to this one. Formatters for different + locales will never be equal, even if they behave identically.
      +
      +
      Overrides:
      +
      equals in class BtcFormat
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      Return a hash code value for this instance.
      +
      +
      Overrides:
      +
      hashCode in class BtcFormat
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      Returns a brief description of this formatter. The exact details of the representation + are unspecified and subject to change, but will include some representation of the + formatting/parsing pattern and the fractional decimal place grouping.
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/BtcFormat.Builder.html b/javadoc/0.17-rc1/org/bitcoinj/utils/BtcFormat.Builder.html new file mode 100644 index 000000000..8983d88bd --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/BtcFormat.Builder.html @@ -0,0 +1,372 @@ + + + + +BtcFormat.Builder (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BtcFormat.Builder

+
+
java.lang.Object +
org.bitcoinj.utils.BtcFormat.Builder
+
+
+
+
Enclosing class:
+
BtcFormat
+
+
+
public static class BtcFormat.Builder +extends Object
+

This class constructs new instances of BtcFormat, allowing for the + configuration of those instances before they are constructed. After obtaining a + Builder object from the BtcFormat.builder() method, invoke the + necessary setter methods to obtain your desired configuration. Finally, the build() method returns a new BtcFormat object that has the specified + configuration. + +

All the setter methods override defaults. Invoking build() without invoking any + of the setting methods is equivalent to invoking BtcFormat.getInstance() with no arguments. + +

Each setter methods returns the same instance on which it is invoked, + thus these methods can be chained. + +

Instances of this class are not thread-safe.

+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      style

      + +
      Specify the new BtcFormat is to be automatically-denominating. + The argument determines which of either codes or symbols the new BtcFormat + will use by default to indicate the denominations it chooses when formatting values. + +

      Note that the Style argument specifies the + default style, which is overridden by invoking + either pattern(String) or localizedPattern(String).

      +
      +
      Throws:
      +
      IllegalArgumentException - if scale(int) has + previously been invoked on this instance.
      +
      +
      +
    • +
    • +
      +

      fractionDigits

      +
      public BtcFormat.Builder fractionDigits(int val)
      +
      Specify the number of decimal places in the fraction part of formatted numbers. + This is equivalent to the minimumFractionDigits(int) method, but named + appropriately for the context of generating BtcAutoFormat instances. + +

      If neither this method nor minimumFactionDigits() is invoked, the default value + will be 2.

      +
      +
    • +
    • +
      +

      scale

      +
      public BtcFormat.Builder scale(int val)
      +
      Specify a fixed-denomination of units to use when formatting and parsing values. + The argument specifies the number of decimal places, in increasing + precision, by which each formatted value will differ from that same value + denominated in bitcoins. For example, a denomination of millibitcoins is specified + with a value of 3. + +

      The BtcFormat class provides appropriately named + int-type constants for the three common values, BtcFormat.COIN_SCALE, + BtcFormat.MILLICOIN_SCALE BtcFormat.MICROCOIN_SCALE. + +

      If neither this method nor style(BtcAutoFormat.Style) is invoked on a + BtcFormat.Builder, then the BtcFormat will default to a + fixed-denomination of bitcoins, equivalent to invoking this method with an argument + of 0.

      +
      +
    • +
    • +
      +

      minimumFractionDigits

      +
      public BtcFormat.Builder minimumFractionDigits(int val)
      +
      Specify the minimum number of decimal places in the fraction part of formatted values. + This method is equivalent to fractionDigits(int), but named appropriately for + the context of generating a fixed-denomination formatter. + +

      If neither this method nor fractionDigits() is invoked, the default value + will be 2.

      +
      +
    • +
    • +
      +

      fractionGroups

      +
      public BtcFormat.Builder fractionGroups(int... val)
      +
      Specify the sizes of a variable number of optional decimal-place groups in the + fraction part of formatted values. A group of each specified size will be used in + addition to all previously applied decimal places only if doing so is useful for + expressing precision. The size of each group is limited to a maximum precision of + satoshis. + +

      If this method is not invoked, then the number of fractional decimal places will + be limited to the value passed to minimumFractionDigits, or 2 + if that method is not invoked.

      +
      +
    • +
    • +
      +

      locale

      +
      public BtcFormat.Builder locale(Locale val)
      +
      Specify the Locale for formatting and parsing. + If this method is not invoked, then the runtime default locale will be used.
      +
      +
    • +
    • +
      +

      symbol

      +
      public BtcFormat.Builder symbol(String val)
      +
      Specify a currency symbol to be used in the denomination-unit indicators + of formatted values. This method only sets the symbol, but does not cause + it to be used. You must also invoke either style(SYMBOL), or else apply + a custom pattern that includes a single currency-sign character by invoking either + pattern(String) or localizedPattern(String). + +

      Specify only the base symbol. The appropriate prefix will be applied according + to the denomination of formatted and parsed values.

      +
      +
    • +
    • +
      +

      code

      +
      public BtcFormat.Builder code(String val)
      +
      Specify a custom currency code to be used in the denomination-unit indicators + of formatted values. This method only sets the code, but does not cause + it to be used. You must also invoke either style(CODE), or else apply + a custom pattern that includes a double currency-sign character by invoking either + pattern(String) or localizedPattern(String). + +

      Specify only the base code. The appropriate prefix will be applied according + to the denomination of formatted and parsed values.

      +
      +
    • +
    • +
      +

      pattern

      +
      public BtcFormat.Builder pattern(String val)
      +
      Use the given pattern when formatting and parsing. The format of this pattern is + identical to that used by the DecimalFormat class. + +

      If the pattern lacks a negative subpattern, then the formatter will indicate + negative values by placing a minus sign immediately preceding the number part of + formatted values. + +

      Note that while the pattern format specified by the DecimalFormat class includes a mechanism for setting the number of + fractional decimal places, that part of the pattern is ignored. Instead, use the + fractionDigits(int), minimumFractionDigits(int) and fractionGroups(int...) methods. + +

      Warning: if you set a pattern that includes a currency-sign for a + fixed-denomination formatter that uses a non-standard scale, then an exception will + be raised when you try to format a value. The standard scales include all for + which a metric prefix exists from micro to mega. + +

      Note that by applying a pattern you override the configured formatting style of + BtcAutoFormat instances.

      +
      +
    • +
    • +
      +

      localizedPattern

      +
      public BtcFormat.Builder localizedPattern(String val)
      +
      Use the given localized-pattern for formatting and parsing. The format of this + pattern is identical to the patterns used by the DecimalFormat + class. + +

      The pattern is localized according to the locale of the BtcFormat + instance, the symbols for which can be examined by inspecting the DecimalFormatSymbols object returned by BtcFormat.symbols(). + So, for example, if you are in Germany, then the non-localized pattern of +

      "#,##0.###"
      would be localized as
      "#.##0,###"
      + +

      If the pattern lacks a negative subpattern, then the formatter will indicate + negative values by placing a minus sign immediately preceding the number part of + formatted values. + +

      Note that while the pattern format specified by the DecimalFormat class includes a mechanism for setting the number of + fractional decimal places, that part of the pattern is ignored. Instead, use the + fractionDigits(int), minimumFractionDigits(int) and fractionGroups(int...) methods. + +

      Warning: if you set a pattern that includes a currency-sign for a + fixed-denomination formatter that uses a non-standard scale, then an exception will + be raised when you try to format a value. The standard scales include all for + which a metric prefix exists from micro to mega. + +

      Note that by applying a pattern you override the configured formatting style of + BtcAutoFormat instances.

      +
      +
    • +
    • +
      +

      build

      +
      public BtcFormat build()
      +
      Return a new BtcFormat instance. The object returned will be configured according + to the state of this Builder instance at the time this method is invoked.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/BtcFormat.html b/javadoc/0.17-rc1/org/bitcoinj/utils/BtcFormat.html new file mode 100644 index 000000000..5162dd755 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/BtcFormat.html @@ -0,0 +1,1772 @@ + + + + +BtcFormat (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BtcFormat

+
+
java.lang.Object +
java.text.Format +
org.bitcoinj.utils.BtcFormat
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Cloneable
+
+
+
Direct Known Subclasses:
+
BtcAutoFormat, BtcFixedFormat
+
+
+
public abstract class BtcFormat +extends Format
+

Instances of this class format and parse locale-specific numerical + representations of Bitcoin monetary values.

+ +

A primary goal of this class is to minimize the danger of + human-misreading of monetary values due to mis-counting the number + of zeros (or, more generally, of decimal places) in the number that + represents a Bitcoin monetary value. Some of the features offered for doing this + are:

+ +
    +
  1. automatic adjustment of denominational units in which a + value is represented so as to lessen the number of adjacent zeros, +
  2. use of locale-specific decimal-separators to group digits in + the integer portion of formatted numbers, +
  3. fine control over the number and grouping of fractional decimal places, and +
  4. access to character information that allows for vertical + alignment of tabular columns of formatted values.
+ +

Basic Usage

+ +

Basic usage is very simple:

+ +
    +
  1. Construct a new formatter object using one of the factory methods. +
  2. Format a value by passing it as an argument to the + Format.format(Object) method. +
  3. Parse a value by passing a String-type + representation of it to the parse(String) method.
+ +

For example, depending on your locale, values might be formatted + and parsed as follows:

+ +
+ BtcFormat f = BtcFormat.getInstance();
+ String c = f.format(Coin.COIN);                // "BTC 1.00"
+ String k = f.format(Coin.COIN.multiply(1000)); // "BTC 1,000.00"
+ String m = f.format(Coin.COIN.divide(1000));   // "mBTC 1.00"
+ Coin all = f.parseObject("M฿ 21");             // All the money in the world
+ 
+ +

Auto-Denomination versus Fixed-Denomination

+ +

There are two provided concrete classes, one that automatically denominates values to + be formatted, BtcAutoFormat, and another that formats any value in units of a + fixed, specified denomination, BtcFixedFormat.

+ +

Automatic Denomination

+ +

Automatic denomination means that the formatter adjusts the denominational units in which a + formatted number is expressed based on the monetary value that number represents. An + auto-denominating formatter is defined by its style, specified by one of the enumerated + values of BtcAutoFormat.Style. There are two styles constants: BtcAutoFormat.Style.CODE (the default), and BtcAutoFormat.Style.SYMBOL. The + difference is that the CODE style uses an internationally-distinct currency + code, such as "BTC", to indicate the units of denomination, while the + SYMBOL style uses a possibly-ambiguous currency symbol such as + "฿".

+ +

The denomination used when formatting will be either bitcoin, millicoin + or microcoin, depending on the value being represented, chosen so as to minimize the number + of consecutive zeros displayed without losing precision. For example, depending on the + locale, a value of one bitcoin might be formatted as ฿1.00 where a value + exceeding that by one satoshi would be µ฿1,000,000.01

+ +

Fixed Denomination

+ +

Fixed denomination means that the same denomination of units is used for every value that is + formatted or parsed by a given formatter instance. A fixed-denomination formatter is + defined by its scale, which is the number of places one must shift the decimal point in + increasing precision to convert the representation of a given quantity of bitcoins into a + representation of the same value denominated in the formatter's units. For example, a scale + value of 3 specifies a denomination of millibitcoins, because to represent + 1.0000 BTC, or one bitcoin, in millibitcoins, one shifts the decimal point + three places, that is, to 1000.0 mBTC.

+ +

Construction

+ +

There are two ways to obtain an instance of this class:

+ +
    +
  1. Use one of the factory methods; or +
  2. Use a BtcFormat.Builder object.
+ +

The factory methods are appropriate for basic use where the default + configuration is either used or modified. The BtcFormat.Builder + class provides more control over the configuration, and gives + access to some features not available through the factory methods, + such as using custom formatting patterns and currency symbols.

+ +

Factory Methods

+ +

Although formatting and parsing is performed by one of the concrete + subclasses, you can obtain formatters using the various static factory + methods of this abstract base class BtcFormat. There + are a variety of overloaded methods that allow you to obtain a + formatter that behaves according to your needs.

+ +

The primary distinction is between automatic- and + fixed-denomination formatters. By default, the + getInstance() method with no arguments returns a new, + automatic-denominating BtcAutoFormat instance for your + default locale that will display exactly two fractional decimal + places and a currency code. For example, if you happen to be in + the USA:

+ +
+ BtcFormat f = BtcFormat.getInstance();
+ String s = f.format(Coin.COIN); // "BTC 1.00"
+ 
+ +

The first argument to getInstance() can determine + whether you get an auto- or fixed-denominating formatter. If the + type of the first argument is an int, then the value + of that int will be interpreted as the decimal-place scale of + the BtcFixedFormat instance that is returned, and thus will + determine its denomination. For example, if you want to format + values in units of microbitcoins:

+ +
BtcFormat m = BtcFormat.getInstance(6);
+ String s = m.format(Coin.COIN); // "1,000,000.00"
+ 
+ +

This class provides several constants bound to common scale values:

+ +
BtcFormat milliFormat = BtcFormat.getInstance(MILLICOIN_SCALE);
+ +

Alternatively, if the type of the first argument to + getInstance() is one of the enumerated values of the + BtcAutoFormat.Style type, either BtcAutoFormat.Style.CODE or + BtcAutoFormat.Style.SYMBOL, then you will get a BtcAutoFormat + instance that uses either a currency code or symbol, respectively, + to indicate the results of its auto-denomination.

+ +
+ BtcFormat s = BtcFormat.getInstance(SYMBOL);
+ Coin value = Coin.parseCoin("0.1234");
+ String mil = s.format(value);              // "₥฿123.40"
+ String mic = s.format(value.divide(1000)); // "µ฿123.40"
+ 
+ +

An alternative way to specify whether you want an auto- or fixed-denomination formatter + is to use one of the factory methods that is named to indicate that characteristics of the + new instance returned. For fixed-denomination formatters, these methods are getCoinInstance(), getMilliInstance(), and getMicroInstance(). These + three methods are equivalent to invoking getInstance() with a first argument of + 0, 3 and 6, respectively. For auto-denominating + formatters the relevant factory methods are getCodeInstance() and getSymbolInstance(), which are equivalent to getInstance(Style.CODE), and + getInstance(Style.SYMBOL).

+ +

Regardless of how you specify whether your new formatter is to be of automatic- or + fixed-denomination, the next (and possibly first) parameter to each of the factory methods + is an optional Locale value.

+ +

For example, here we construct four instances for the same locale that each format + differently the same one-bitcoin value:

+ +
+ // Next line returns "1,00 BTC"
+ BtcFormat.getInstance(Locale.GERMANY).format(Coin.COIN);
+ // Next line returns "1,00 ฿"
+ BtcFormat.getInstance(SYMBOL, Locale.GERMANY).format(Coin.COIN);
+ // Next line returns "1.000,00"
+ BtcFormat.getMilliInstance(Locale.GERMANY).format(Coin.COIN);
+ // Next line returns "10.000,00"
+ BtcFormat.getInstance(4, Locale.GERMANY).format(Coin.COIN);
+ 
+ +

Omitting such a Locale parameter will give you a + formatter for your default locale.

+ +

The final (and possibly only) arguments to the factory methods serve to set the default + number of fractional decimal places that will be displayed when formatting monetary values. + In the case of an auto-denominating formatter, this can be a single int value, + which will determine the number of fractional decimal places to be used in all cases, except + where either (1) doing so would provide a place for fractional satoshis, or (2) that default + value is overridden when invoking the format() method as described below.

+ +

In the case of a fixed-denomination formatter, you can pass any number of + int values. The first will determine the minimum number of fractional decimal + places, and each following int value specifies the size of an optional group of + decimal-places to be displayed only if useful for expressing precision. As with auto-denominating + formatters, numbers will never be formatted with a decimal place that represents a + fractional quantity of satoshis, and these defaults can be overridden by arguments to the + format() method. See below for examples.

+ +

The BtcFormat.Builder Class

+ +

A new BtcFormat.Builder instance is returned by the builder() method. Such + an object has methods that set the configuration parameters of a BtcFormat + object. Its BtcFormat.Builder.build() method constructs and returns a BtcFormat instance + configured according to those settings.

+ +

In addition to setter-methods that correspond to the factory-method parameters explained + above, a BtcFormat.Builder also allows you to specify custom formatting and parsing + patterns and currency symbols and codes. For example, rather than using the default + currency symbol, which has the same unicode character point as the national currency symbol of + Thailand, some people prefer to use a capital letter "B" with a vertical overstrike.

+ +
+ BtcFormat.Builder builder = BtcFormat.builder();
+ builder.style(SYMBOL);
+ builder.symbol("B\u20e6"); // unicode char "double vertical stroke overlay"
+ BtcFormat f = builder.build();
+ String out = f.format(COIN); // "B⃦1.00" depending on locale
+ 
+ + The BtcFormat.Builder methods are chainable. So, for example, if you are + deferential to ISO 4217, you might construct a formatter in a single line this way: + +
+ BtcFormat f = BtcFormat.builder().style(CODE).code("XBT").build();
+ String out = f.format(COIN); // "XBT 1.00"
+ 
+ +

See the documentation of the BtcFormat.Builder class for details.

+ +

Formatting

+ +

You format a Bitcoin monetary value by passing it to the Format.format(Object) + method. This argument can be either a Coin-type object or a + numerical object such as Long or BigDecimal. + Integer-based types such as BigInteger are interpreted as representing a + number of satoshis, while a BigDecimal is interpreted as representing a + number of bitcoins. A value having a fractional amount of satoshis is rounded to the + nearest whole satoshi at least, and possibly to a greater unit depending on the number of + fractional decimal-places displayed. The format() method will not accept an + argument whose type is String, Float nor Double.

+ +

Subsequent to the monetary value to be formatted, the Format.format(Object) method also + accepts as arguments optional int values that specify the number of decimal + places to use to represent the fractional portion of the number. This overrides the + default, and enables a single formatter instance to be reused, formatting different values + that require different numbers of fractional decimal places. These parameters have the same + meaning as those that set the default values in the factory methods as described above. + Namely, a single int value determines the minimum number of fractional decimal + places that will be used in all cases, to a precision limit of satoshis. Instances of + BtcFixedFormat also accept a variable-length sequence of additional int + values, each of which specifies the size of a group of fractional decimal-places to be used + in addition to all preceding places, only if useful to express precision, and only to a + maximum precision of satoshis. For example:

+ +
+ BtcFormat f = BtcFormat.getCoinInstance();
+ Coin value = COIN.add(Coin.valueOf(5)); // 100000005 satoshis
+ f.format(value, 2);       // "1.00"
+ f.format(value, 3);       // "1.000"
+ f.format(value, 2, 3);    // "1.00" three more zeros doesn't help 
+ f.format(value, 2, 3, 3); // "1.00000005" 
+ f.format(value, 2, 3, 4); // "1.00000005" fractions of satoshis have no place
+ f.format(value, 2, 3, 2); // "1.0000001" rounds to nearest usable place
+ 
+ +

Note that if using all the fractional decimal places in a specified group would give a + place to fractions of satoshis, then the size of that group will be reduced to a maximum + precision of satoshis. Either all or none of the allowed decimal places of that group will + still be applied as doing so is useful for expressing the precision of the value being + formatted.

+ +

Several convenient constants of repeating group-size sequences are provided: + BtcFixedFormat.REPEATING_PLACES, BtcFixedFormat.REPEATING_DOUBLETS and BtcFixedFormat.REPEATING_TRIPLETS. These signify repeating groups + of one, two and three decimals places, respectively. For example, + to display only as many fractional places as useful in order to + prevent hanging zeros on the least-significant end of formatted + numbers:

+ +
+ format(value, 0, REPEATING_PLACES);
+ 
+ +

When using an automatically-denominating formatter, you might + want to know what denomination was chosen. You can get the + currency-units indicator, as well as any other field in the + formatted output, by using a FieldPosition instance + constructed using an appropriate constant from the NumberFormat.Field class:

+ +
+ BtcFormat de = BtcFormat.getInstance(Locale.GERMANY);
+ FieldPosition currField = new FieldPosition(NumberFormat.Field.CURRENCY);
+ // next line formats the value as "987.654.321,23 µBTC"
+ String output = de.format(valueOf(98765432123L), new StringBuffer(), currField);
+ // next line sets variable currencyCode to "µBTC"
+ String currencyCode = output.substring(currField.getBeginIndex(), currField.getEndIndex()));
+ 
+ +

When using a fixed-denomination formatter whose scale can be expressed as a standard + "metric" prefix, you can invoke the code() and symbol() methods to + obtain a String whose value is the appropriate currency code or symbol, + respectively, for that formatter.

+ +
+ BtcFixedFormat kilo = (BtcFixedFormat)BtcFormat(-3); // scale -3 for kilocoins
+ Coin value = Coin.parseCoin("1230");
+ // variable coded will be set to "kBTC 1.23"
+ String coded = kilo.code() + " " + kilo.format(value);
+ // variable symbolic will be set to "k฿1.23"
+ String symbolic = kilo.symbol() + kilo.format(value);
+ BtcFormat(4).code(); // unnamed denomination has no code; raises exception
+ 
+ +

Formatting for Tabular Columns

+ +

When displaying tables of monetary values, you can lessen the + risk of human misreading-error by vertically aligning the decimal + separator of those values. This example demonstrates one way to do that:

+ +
+ // The elements of this array are the values we will format:
+ Coin[] rows = {MAX_MONEY, MAX_MONEY.subtract(SATOSHI), Coin.parseCoin("1234"),
+                COIN, COIN.divide(1000),
+                valueOf(10000), valueOf(1000), valueOf(100),
+                SATOSHI};
+ BtcFormat f = BtcFormat.getCoinInstance(2, REPEATING_PLACES);
+ FieldPosition fp = new FieldPosition(DECIMAL_SEPARATOR); // see java.text.NumberFormat.Field
+ String[] output = new String[rows.length];
+ int[] indexes = new int[rows.length];
+ int maxIndex = 0;
+ for (int i = 0; i < rows.length; i++) {
+     output[i] = f.format(rows[i], new StringBuffer(), fp).toString();
+     indexes[i] = fp.getBeginIndex();
+     if (indexes[i] > maxIndex) maxIndex = indexes[i];
+ }
+ for (int i = 0; i < output.length; i++) {
+     System.out.println(repeat(" ", (maxIndex - indexes[i])) + output[i]);
+ }
+ 
+ + Assuming you are using a monospaced font, and depending on your + locale, the foregoing will print the following: + +
+ 21,000,000.00
+ 20,999,999.99999999
+      1,234.00
+          1.00
+          0.001
+          0.0001
+          0.00001
+          0.000001
+          0.00000001
+ 
+ +

If you need to vertically-align columns printed in a proportional font, + then see the documentation for the NumberFormat class + for an explanation of how to do that.

+ +

Parsing

+ +

The parse(String) method accepts a String argument, and returns a + Coin-type value. The difference in parsing behavior between instances of BtcFixedFormat and BtcAutoFormat is analogous to the difference in formatting + behavior between instances of those classes. Instances of BtcAutoFormat recognize + currency codes and symbols in the String being parsed, and interpret them as + indicators of the units in which the number being parsed is denominated. On the other hand, + instances of BtcFixedFormat by default recognize no codes nor symbols, but rather + interpret every number as being denominated in the units that were specified when + constructing the instance doing the parsing. This default behavior of BtcFixedFormat can be overridden by setting a parsing pattern that includes a currency sign + using the pattern() method.

+ +

The parse(String) method of BtcAutoFormat (and of + BtcAutoFormat configured with applicable non-default pattern) will recognize a + variety of currency symbols and codes, including all standard international (metric) + prefixes from micro to mega. For example, denominational units of microcoins may be + specified by µ฿, u฿, µB⃦, µɃ, + µBTC or other appropriate permutations of those characters. Additionally, if + either or both of a custom currency code or symbol is configured using BtcFormat.Builder.code or BtcFormat.Builder.code, then such code or symbol will + be recognized in addition to those recognized by default.

+ +

Instances of this class that recognize currency signs will recognize both currency + symbols and codes, regardless of which that instance uses for formatting. However, if the + style is CODE (and unless overridden by a custom pattern) then a space character must + separate the units indicator from the number. When parsing with a SYMBOL-style + BtcFormat instance, on the other hand, whether or not the units indicator must + be separated by a space from the number is determined by the locale. The pattern() method returns a representation of the pattern that + can be examined to determine whether a space must separate currency signs from numbers in + parsed Strings.

+ +

When parsing, if the currency-units indicator is absent, then a BtcAutoFormat + instance will infer a denomination of bitcoins while a BtcFixedFormat will infer the + denomination in which it expresses formatted values. Note: by default (unless overridden by + a custom pattern), if the locale or style requires a space to separate the number from the + units indicator, that space must be present in the String to be parsed, even if the units + indicator is absent.

+ +

The parse() method returns an instance of the + Coin class. Therefore, attempting to parse a value greater + than the maximum that a Coin object can represent will + raise a ParseException, as will any other detected + parsing error.

+ +

Limitations

+ +

Parsing

+ +

Parsing is performed by an underlying NumberFormat object. While this + delivers the benefit of recognizing locale-specific patterns, some have criticized other + aspects of its behavior. For example, see this article by Joe Sam + Shirah. In particular, explicit positive-signs are not recognized. If you are parsing + input from end-users, then you should consider whether you would benefit from any of the + work-arounds mentioned in that article.

+ +

Exotic Locales

+ +

This class is not well-tested in locales that use non-ascii + character sets, especially those where writing proceeds from + right-to-left. Helpful feedback in that regard is appreciated.

+ +

Thread-Safety

+ +

Instances of this class are immutable.

+
+
See Also:
+
+ +
+
+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    Nested Classes
    +
    +
    Modifier and Type
    +
    Class
    +
    Description
    +
    static class 
    + +
    +
    This class constructs new instances of BtcFormat, allowing for the + configuration of those instances before they are constructed.
    +
    +
    +
    +

    Nested classes/interfaces inherited from class java.text.Format

    +Format.Field
    +
    +
  • + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static final int
    + +
    +
    A constant useful for specifying a denomination of bitcoins, the int value + 0.
    +
    +
    protected static final String
    + +
    +
    An alternative currency symbol to use in locales where the default symbol is used for the national currency.
    +
    +
    protected final List<Integer>
    + +
     
    +
    static final int
    + +
    +
    A constant useful for specifying a denomination of microbitcoins, the int + value 6.
    +
    +
    static final int
    + +
    +
    A constant useful for specifying a denomination of millibitcoins, the int + value 3.
    +
    +
    protected final int
    + +
     
    +
    protected final DecimalFormat
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Modifier
    +
    Constructor
    +
    Description
    +
    protected
    +
    BtcFormat(DecimalFormat numberFormat, + int minDecimals, + List<Integer> groups)
    +
    +
    This single constructor is invoked by the overriding subclass constructors.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
    +
    Return a new BtcFormat.Builder object.
    +
    + + +
    +
    Return the unprefixed international currency code for bitcoins configured for this + object.
    +
    + + +
    +
    Return the unprefixed currency symbol for bitcoins configured for this object.
    +
    +
    boolean
    + +
    +
    Return true if the given object is equivalent to this one.
    +
    + +
    format(Object qty, + int minDecimals, + int... fractionGroups)
    +
    +
    Formats a bitcoin value as a number and possibly a units indicator to a + String.The type of monetary value argument can be any one of any of the + following classes: Coin, Integer, Long, + BigInteger, BigDecimal.
    +
    + +
    format(Object qty, + StringBuffer toAppendTo, + FieldPosition pos)
    +
    +
    Formats a bitcoin value as a number and possibly a units indicator and appends the + resulting text to the given string buffer.
    +
    + +
    format(Object qty, + StringBuffer toAppendTo, + FieldPosition pos, + int minDecimals, + int... fractionGroups)
    +
    +
    Formats a bitcoin value as a number and possibly a units indicator and appends the + resulting text to the given string buffer.
    +
    + + +
    +
    Formats a bitcoin monetary value and returns an AttributedCharacterIterator.
    +
    +
    static Locale[]
    + +
    +
    Return an array of all locales for which the getInstance() method of this class can + return localized instances.
    +
    +
    static BtcFormat
    + +
    +
    Return a new auto-denominating instance that will indicate units using a currency + code, for example, "BTC".
    +
    +
    static BtcFormat
    +
    getCodeInstance(int minDecimals)
    +
    +
    Return a new code-style auto-formatter with the given number of fractional decimal + places.
    +
    +
    static BtcFormat
    + +
    +
    Return a new code-style auto-formatter for the given locale.
    +
    +
    static BtcFormat
    +
    getCodeInstance(Locale locale, + int minDecimals)
    +
    +
    Return a new code-style auto-formatter for the given locale with the given number of + fraction places.
    +
    +
    static BtcFormat
    + +
    +
    Return a new coin-denominated formatter.
    +
    +
    static BtcFormat
    +
    getCoinInstance(int minFractionPlaces, + int... groups)
    +
    +
    Return a new coin-denominated formatter with the specified fraction-places.
    +
    +
    static BtcFormat
    + +
    +
    Return a new coin-denominated formatter for the given locale.
    +
    +
    static BtcFormat
    +
    getCoinInstance(Locale locale, + int scale, + int... groups)
    +
    +
    Return a newly-constructed instance for the given locale that will format + values in terms of bitcoins, with the given minimum number of fractional + decimal places.
    +
    +
    static BtcFormat
    + +
    +
    Return a new instance of this class using all defaults.
    +
    +
    static BtcFormat
    +
    getInstance(int scale)
    +
    +
    Return a new fixed-denomination formatter.
    +
    +
    static BtcFormat
    +
    getInstance(int scale, + int minDecimals, + int... groups)
    +
    +
    Return a new fixed-denomination formatter with the specified fractional decimal + placing.
    +
    +
    static BtcFormat
    +
    getInstance(int scale, + Locale locale)
    +
    +
    Return a new fixed-denomination formatter for the given locale.
    +
    +
    static BtcFormat
    +
    getInstance(int scale, + Locale locale, + int minDecimals, + int... groups)
    +
    +
    Return a new fixed-denomination formatter for the given locale, with the specified + fractional decimal placing.
    +
    +
    static BtcFormat
    +
    getInstance(int scale, + Locale locale, + int minDecimals, + List<Integer> groups)
    +
    +
    Return a new fixed-denomination formatter for the given locale, with the specified + fractional decimal placing.
    +
    +
    static BtcFormat
    + +
    +
    Return a new code-style auto-formatter for the given locale.
    +
    +
    static BtcFormat
    +
    getInstance(Locale locale, + int minDecimals)
    +
    +
    Return a new code-style auto-formatter for the given locale with the given number of + fraction places.
    +
    +
    static BtcFormat
    + +
    +
    Return a new auto-denominating formatter.
    +
    +
    static BtcFormat
    +
    getInstance(BtcAutoFormat.Style style, + int fractionPlaces)
    +
    +
    Return a new auto-denominating formatter with the given number of fractional decimal + places.
    +
    +
    static BtcFormat
    + +
    +
    Return a new auto-formatter with the given style for the given locale.
    +
    +
    static BtcFormat
    +
    getInstance(BtcAutoFormat.Style style, + Locale locale, + int fractionPlaces)
    +
    +
    Return a new auto-formatter for the given locale with the given number of fraction places.
    +
    +
    static BtcFormat
    + +
    +
    Return a new microcoin-denominated formatter for the default locale.
    +
    +
    static BtcFormat
    +
    getMicroInstance(int scale, + int... groups)
    +
    +
    Return a new microcoin-denominated formatter with the specified fractional decimal + placing.
    +
    +
    static BtcFormat
    + +
    +
    Return a new microcoin-denominated formatter for the given locale.
    +
    +
    static BtcFormat
    +
    getMicroInstance(Locale locale, + int scale, + int... groups)
    +
    +
    Return a new microcoin-denominated formatter for the given locale with the specified + fractional decimal placing.
    +
    +
    static BtcFormat
    + +
    +
    Return a new millicoin-denominated formatter.
    +
    +
    static BtcFormat
    +
    getMilliInstance(int scale, + int... groups)
    +
    +
    Return a new millicoin-denominated formatter with the specified fractional decimal + placing.
    +
    +
    static BtcFormat
    + +
    +
    Return a new millicoin-denominated formatter for the given locale.
    +
    +
    static BtcFormat
    +
    getMilliInstance(Locale locale, + int scale, + int... groups)
    +
    +
    Return a new millicoin-denominated formatter for the given locale with the specified + fractional decimal placing.
    +
    +
    static BtcFormat
    + +
    +
    Return a new auto-denominating instance that will indicate units using a currency + symbol, for example, "฿".
    +
    +
    static BtcFormat
    +
    getSymbolInstance(int fractionPlaces)
    +
    +
    Return a new symbol-style auto-formatter with the given number of fractional decimal + places.
    +
    +
    static BtcFormat
    + +
    +
    Return a new symbol-style auto-formatter for the given locale.
    +
    +
    static BtcFormat
    +
    getSymbolInstance(Locale locale, + int fractionPlaces)
    +
    +
    Return a new symbol-style auto-formatter for the given locale with the given number of + fraction places.
    +
    +
    int
    + +
    +
    Return a hash code value for this instance.
    +
    +
    protected static String
    +
    negify(String pattern)
    +
    +
    Guarantee a formatting pattern has a subpattern for negative values.
    +
    + +
    parse(String source)
    +
    +
    Parse a String representation of a Bitcoin monetary value.
    +
    + +
    parse(String source, + ParsePosition pos)
    +
    +
    Parse a String representation of a Bitcoin monetary value.
    +
    +
    final Object
    + +
    +
    Parse a String representation of a Bitcoin monetary value.
    +
    + + +
    +
    Return a representation of the pattern used by this instance for formatting and + parsing.
    +
    +
    protected static String
    +
    prefixCode(String code, + int scale)
    +
    +
    END OF PARSING STUFF
    +
    +
    protected static String
    +
    prefixSymbol(String symbol, + int scale)
    +
     
    +
    protected static void
    +
    prefixUnitsIndicator(DecimalFormat numberFormat, + int scale)
    +
    +
    Set both the currency symbol and code of the underlying, mutable NumberFormat object + according to the given denominational units scale factor.
    +
    +
    protected abstract int
    + +
    +
    Return the denomination of this object.
    +
    +
    protected abstract int
    +
    scale(BigInteger satoshis, + int fractionPlaces)
    +
    +
    Return the denomination for formatting the given value.
    +
    + + +
    +
    Return a copy of the localized symbols used by this instance for formatting and parsing.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.text.Format

    +clone, format, parseObject
    +
    +

    Methods inherited from class java.lang.Object

    +finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      COIN_SYMBOL_ALT

      +
      protected static final String COIN_SYMBOL_ALT
      +
      An alternative currency symbol to use in locales where the default symbol is used for the national currency.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      numberFormat

      +
      protected final DecimalFormat numberFormat
      +
      +
    • +
    • +
      +

      minimumFractionDigits

      +
      protected final int minimumFractionDigits
      +
      +
    • +
    • +
      +

      decimalGroups

      +
      protected final List<Integer> decimalGroups
      +
      +
    • +
    • +
      +

      COIN_SCALE

      +
      public static final int COIN_SCALE
      +
      A constant useful for specifying a denomination of bitcoins, the int value + 0.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      MILLICOIN_SCALE

      +
      public static final int MILLICOIN_SCALE
      +
      A constant useful for specifying a denomination of millibitcoins, the int + value 3.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      MICROCOIN_SCALE

      +
      public static final int MICROCOIN_SCALE
      +
      A constant useful for specifying a denomination of microbitcoins, the int + value 6.
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BtcFormat

      +
      protected BtcFormat(DecimalFormat numberFormat, + int minDecimals, + List<Integer> groups)
      +
      This single constructor is invoked by the overriding subclass constructors.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      builder

      +
      public static BtcFormat.Builder builder()
      +
      Return a new BtcFormat.Builder object. See the documentation of that class for usage details.
      +
      +
    • +
    • +
      +

      getInstance

      +
      public static BtcFormat getInstance()
      +
      Return a new instance of this class using all defaults. The returned formatter will + auto-denominate values so as to minimize zeros without loss of precision and display a + currency code, for example "BTC", to indicate that denomination. The + returned object will uses the default locale for formatting the number and placement of + the currency-code. Two fractional decimal places will be displayed in all formatted numbers.
      +
      +
    • +
    • +
      +

      getSymbolInstance

      +
      public static BtcFormat getSymbolInstance()
      +
      Return a new auto-denominating instance that will indicate units using a currency + symbol, for example, "฿". Formatting and parsing will be done + according to the default locale.
      +
      +
    • +
    • +
      +

      getCodeInstance

      +
      public static BtcFormat getCodeInstance()
      +
      Return a new auto-denominating instance that will indicate units using a currency + code, for example, "BTC". Formatting and parsing will be done + according to the default locale.
      +
      +
    • +
    • +
      +

      getSymbolInstance

      +
      public static BtcFormat getSymbolInstance(int fractionPlaces)
      +
      Return a new symbol-style auto-formatter with the given number of fractional decimal + places. Denominational units will be indicated using a currency symbol, for example, + "฿". The returned object will format the fraction-part of numbers using + the given number of decimal places, or fewer as necessary to avoid giving a place to + fractional satoshis. Formatting and parsing will be done according to the default + locale.
      +
      +
    • +
    • +
      +

      getCodeInstance

      +
      public static BtcFormat getCodeInstance(int minDecimals)
      +
      Return a new code-style auto-formatter with the given number of fractional decimal + places. Denominational units will be indicated using a currency code, for example, + "BTC". The returned object will format the fraction-part of numbers using + the given number of decimal places, or fewer as necessary to avoid giving a place to + fractional satoshis. Formatting and parsing will be done according to the default + locale.
      +
      +
    • +
    • +
      +

      getInstance

      +
      public static BtcFormat getInstance(Locale locale)
      +
      Return a new code-style auto-formatter for the given locale. The returned object will + select denominational units based on each value being formatted, and will indicate those + units using a currency code, for example, "mBTC".
      +
      +
    • +
    • +
      +

      getCodeInstance

      +
      public static BtcFormat getCodeInstance(Locale locale)
      +
      Return a new code-style auto-formatter for the given locale. The returned object will + select denominational units based on each value being formatted, and will indicate those + units using a currency code, for example, "mBTC".
      +
      +
    • +
    • +
      +

      getInstance

      +
      public static BtcFormat getInstance(Locale locale, + int minDecimals)
      +
      Return a new code-style auto-formatter for the given locale with the given number of + fraction places. The returned object will select denominational units based on each + value being formatted, and will indicate those units using a currency code, for example, + "mBTC". The returned object will format the fraction-part of numbers using + the given number of decimal places, or fewer as necessary to avoid giving a place to + fractional satoshis.
      +
      +
    • +
    • +
      +

      getCodeInstance

      +
      public static BtcFormat getCodeInstance(Locale locale, + int minDecimals)
      +
      Return a new code-style auto-formatter for the given locale with the given number of + fraction places. The returned object will select denominational units based on each + value being formatted, and will indicate those units using a currency code, for example, + "mBTC". The returned object will format the fraction-part of numbers using + the given number of decimal places, or fewer as necessary to avoid giving a place to + fractional satoshis.
      +
      +
    • +
    • +
      +

      getSymbolInstance

      +
      public static BtcFormat getSymbolInstance(Locale locale)
      +
      Return a new symbol-style auto-formatter for the given locale. The returned object will + select denominational units based on each value being formatted, and will indicate those + units using a currency symbol, for example, "µ฿".
      +
      +
    • +
    • +
      +

      getSymbolInstance

      +
      public static BtcFormat getSymbolInstance(Locale locale, + int fractionPlaces)
      +
      Return a new symbol-style auto-formatter for the given locale with the given number of + fraction places. The returned object will select denominational units based on each + value being formatted, and will indicate those units using a currency symbol, for example, + "µ฿". The returned object will format the fraction-part of numbers using + the given number of decimal places, or fewer as necessary to avoid giving a place to + fractional satoshis.
      +
      +
    • +
    • +
      +

      getInstance

      +
      public static BtcFormat getInstance(BtcAutoFormat.Style style)
      +
      Return a new auto-denominating formatter. The returned object will indicate the + denominational units of formatted values using either a currency symbol, such as, + "฿", or code, such as "mBTC", depending on the value of + the argument. Formatting and parsing will be done according to the default locale.
      +
      +
    • +
    • +
      +

      getInstance

      +
      public static BtcFormat getInstance(BtcAutoFormat.Style style, + int fractionPlaces)
      +
      Return a new auto-denominating formatter with the given number of fractional decimal + places. The returned object will indicate the denominational units of formatted values + using either a currency symbol, such as, "฿", or code, such as + "mBTC", depending on the value of the first argument. The returned object + will format the fraction-part of numbers using the given number of decimal places, or + fewer as necessary to avoid giving a place to fractional satoshis. Formatting and + parsing will be done according to the default locale.
      +
      +
    • +
    • +
      +

      getInstance

      +
      public static BtcFormat getInstance(BtcAutoFormat.Style style, + Locale locale)
      +
      Return a new auto-formatter with the given style for the given locale. + The returned object that will auto-denominate each formatted value, and + will indicate that denomination using either a currency code, such as + "BTC", or symbol, such as "฿", depending on the value + of the first argument. +

      The number of fractional decimal places in formatted number will be two, or fewer + as necessary to avoid giving a place to fractional satoshis.

      +
      +
    • +
    • +
      +

      getInstance

      +
      public static BtcFormat getInstance(BtcAutoFormat.Style style, + Locale locale, + int fractionPlaces)
      +
      Return a new auto-formatter for the given locale with the given number of fraction places. + The returned object will automatically-denominate each formatted + value, and will indicate that denomination using either a currency code, + such as "mBTC", or symbol, such as "฿", + according to the given style argument. It will format each number + according to the given locale. + +

      The third parameter is the number of fractional decimal places to use for each + formatted number, reduced as necessary when formatting to avoid giving a place to + fractional satoshis.

      +
      +
    • +
    • +
      +

      getCoinInstance

      +
      public static BtcFormat getCoinInstance()
      +
      Return a new coin-denominated formatter. The returned object will format and parse + values according to the default locale, and will format numbers with two fractional + decimal places, rounding values as necessary.
      +
      +
    • +
    • +
      +

      getCoinInstance

      +
      public static BtcFormat getCoinInstance(int minFractionPlaces, + int... groups)
      +
      Return a new coin-denominated formatter with the specified fraction-places. The + returned object will format and parse values according to the default locale, and will + format the fraction part of numbers with at least two decimal places. The sizes of + additional groups of decimal places can be specified by a variable number of + int arguments. Each optional decimal-place group will be applied only if + useful for expressing precision, and will be only partially applied if necessary to + avoid giving a place to fractional satoshis.
      +
      +
    • +
    • +
      +

      getCoinInstance

      +
      public static BtcFormat getCoinInstance(Locale locale)
      +
      Return a new coin-denominated formatter for the given locale. The returned object will + format the fractional part of numbers with two decimal places, rounding as necessary.
      +
      +
    • +
    • +
      +

      getCoinInstance

      +
      public static BtcFormat getCoinInstance(Locale locale, + int scale, + int... groups)
      +
      Return a newly-constructed instance for the given locale that will format + values in terms of bitcoins, with the given minimum number of fractional + decimal places. Optionally, repeating integer arguments can be passed, each + indicating the size of an additional group of fractional decimal places to be + used as necessary to avoid rounding, to a limiting precision of satoshis.
      +
      +
    • +
    • +
      +

      getMilliInstance

      +
      public static BtcFormat getMilliInstance()
      +
      Return a new millicoin-denominated formatter. The returned object will format and + parse values for the default locale, and will format the fractional part of numbers with + two decimal places, rounding as necessary.
      +
      +
    • +
    • +
      +

      getMilliInstance

      +
      public static BtcFormat getMilliInstance(Locale locale)
      +
      Return a new millicoin-denominated formatter for the given locale. The returned object + will format the fractional part of numbers with two decimal places, rounding as + necessary.
      +
      +
    • +
    • +
      +

      getMilliInstance

      +
      public static BtcFormat getMilliInstance(int scale, + int... groups)
      +
      Return a new millicoin-denominated formatter with the specified fractional decimal + placing. The returned object will format and parse values according to the default + locale, and will format the fractional part of numbers with the given minimum number of + fractional decimal places. Optionally, repeating integer arguments can be passed, each + indicating the size of an additional group of fractional decimal places to be used as + necessary to avoid rounding, to a limiting precision of satoshis.
      +
      +
    • +
    • +
      +

      getMilliInstance

      +
      public static BtcFormat getMilliInstance(Locale locale, + int scale, + int... groups)
      +
      Return a new millicoin-denominated formatter for the given locale with the specified + fractional decimal placing. The returned object will format the fractional part of + numbers with the given minimum number of fractional decimal places. Optionally, + repeating integer arguments can be passed, each indicating the size of an additional + group of fractional decimal places to be used as necessary to avoid rounding, to a + limiting precision of satoshis.
      +
      +
    • +
    • +
      +

      getMicroInstance

      +
      public static BtcFormat getMicroInstance()
      +
      Return a new microcoin-denominated formatter for the default locale. The returned object + will format the fractional part of numbers with two decimal places, rounding as + necessary.
      +
      +
    • +
    • +
      +

      getMicroInstance

      +
      public static BtcFormat getMicroInstance(Locale locale)
      +
      Return a new microcoin-denominated formatter for the given locale. The returned object + will format the fractional part of numbers with two decimal places, rounding as + necessary.
      +
      +
    • +
    • +
      +

      getMicroInstance

      +
      public static BtcFormat getMicroInstance(int scale, + int... groups)
      +
      Return a new microcoin-denominated formatter with the specified fractional decimal + placing. The returned object will format and parse values according to the default + locale, and will format the fractional part of numbers with the given minimum number of + fractional decimal places. Optionally, repeating integer arguments can be passed, each + indicating the size of an additional group of fractional decimal places to be used as + necessary to avoid rounding, to a limiting precision of satoshis.
      +
      +
    • +
    • +
      +

      getMicroInstance

      +
      public static BtcFormat getMicroInstance(Locale locale, + int scale, + int... groups)
      +
      Return a new microcoin-denominated formatter for the given locale with the specified + fractional decimal placing. The returned object will format the fractional part of + numbers with the given minimum number of fractional decimal places. Optionally, + repeating integer arguments can be passed, each indicating the size of an additional + group of fractional decimal places to be used as necessary to avoid rounding, to a + limiting precision of satoshis.
      +
      +
    • +
    • +
      +

      getInstance

      +
      public static BtcFormat getInstance(int scale, + int minDecimals, + int... groups)
      +
      Return a new fixed-denomination formatter with the specified fractional decimal + placing. The first argument specifies the denomination as the size of the + shift from coin-denomination in increasingly-precise decimal places. The returned object will format + and parse values according to the default locale, and will format the fractional part of + numbers with the given minimum number of fractional decimal places. Optionally, + repeating integer arguments can be passed, each indicating the size of an additional + group of fractional decimal places to be used as necessary to avoid rounding, to a + limiting precision of satoshis.
      +
      +
    • +
    • +
      +

      getInstance

      +
      public static BtcFormat getInstance(int scale)
      +
      Return a new fixed-denomination formatter. The argument specifies the denomination as + the size of the shift from coin-denomination in increasingly-precise decimal places. + The returned object will format and parse values according to the default locale, and + will format the fractional part of numbers with two decimal places, or fewer as + necessary to avoid giving a place to fractional satoshis.
      +
      +
    • +
    • +
      +

      getInstance

      +
      public static BtcFormat getInstance(int scale, + Locale locale)
      +
      Return a new fixed-denomination formatter for the given locale. The first argument + specifies the denomination as the size of the shift from coin-denomination in + increasingly-precise decimal places. The returned object will format and parse values + according to the locale specified by the second argument, and will format the fractional + part of numbers with two decimal places, or fewer as necessary to avoid giving a place + to fractional satoshis.
      +
      +
    • +
    • +
      +

      getInstance

      +
      public static BtcFormat getInstance(int scale, + Locale locale, + int minDecimals, + int... groups)
      +
      Return a new fixed-denomination formatter for the given locale, with the specified + fractional decimal placing. The first argument specifies the denomination as the size + of the shift from coin-denomination in increasingly-precise decimal places. The third + parameter is the minimum number of fractional decimal places to use, followed by + optional repeating integer parameters each specifying the size of an additional group of + fractional decimal places to use as necessary to avoid rounding, down to a maximum + precision of satoshis.
      +
      +
    • +
    • +
      +

      getInstance

      +
      public static BtcFormat getInstance(int scale, + Locale locale, + int minDecimals, + List<Integer> groups)
      +
      Return a new fixed-denomination formatter for the given locale, with the specified + fractional decimal placing. The first argument specifies the denomination as the size + of the shift from coin-denomination in increasingly-precise decimal places. The third + parameter is the minimum number of fractional decimal places to use. The third argument + specifies the minimum number of fractional decimal places in formatted numbers. The + last argument is a List of Integer values, each of which + specifies the size of an additional group of fractional decimal places to use as + necessary to avoid rounding, down to a maximum precision of satoshis.
      +
      +
    • +
    • +
      +

      formatToCharacterIterator

      +
      public AttributedCharacterIterator formatToCharacterIterator(Object obj)
      +
      Formats a bitcoin monetary value and returns an AttributedCharacterIterator. + By iterating, you can examine what fields apply to each character. This can be useful + since a character may be part of more than one field, for example a grouping separator + that is also part of the integer field.
      +
      +
      Overrides:
      +
      formatToCharacterIterator in class Format
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      format

      +
      public StringBuffer format(Object qty, + StringBuffer toAppendTo, + FieldPosition pos)
      +
      Formats a bitcoin value as a number and possibly a units indicator and appends the + resulting text to the given string buffer. The type of monetary value argument can be + any one of any of the following classes: Coin, + Integer, Long, BigInteger, + BigDecimal. Numeric types that can represent only an integer are interpreted + as that number of satoshis. The value of a BigDecimal is interpreted as that + number of bitcoins, rounded to the nearest satoshi as necessary.
      +
      +
      Specified by:
      +
      format in class Format
      +
      Returns:
      +
      the StringBuffer passed in as toAppendTo
      +
      +
      +
    • +
    • +
      +

      format

      +
      public String format(Object qty, + int minDecimals, + int... fractionGroups)
      +
      Formats a bitcoin value as a number and possibly a units indicator to a + String.The type of monetary value argument can be any one of any of the + following classes: Coin, Integer, Long, + BigInteger, BigDecimal. Numeric types that can represent only + an integer are interpreted as that number of satoshis. The value of a + BigDecimal is interpreted as that number of bitcoins, rounded to the + nearest satoshi as necessary.
      +
      +
      Parameters:
      +
      minDecimals - The minimum number of decimal places in the fractional part of the formatted number
      +
      fractionGroups - The sizes of optional additional fractional decimal-place groups
      +
      Throws:
      +
      IllegalArgumentException - if the number of fraction places is negative.
      +
      +
      +
    • +
    • +
      +

      format

      +
      public StringBuffer format(Object qty, + StringBuffer toAppendTo, + FieldPosition pos, + int minDecimals, + int... fractionGroups)
      +
      Formats a bitcoin value as a number and possibly a units indicator and appends the + resulting text to the given string buffer. The type of monetary value argument can be + any one of any of the following classes: Coin, + Integer, Long, BigInteger, + BigDecimal. Numeric types that can represent only an integer are interpreted + as that number of satoshis. The value of a BigDecimal is interpreted as that + number of bitcoins, rounded to the nearest satoshi as necessary.
      +
      +
      Parameters:
      +
      minDecimals - The minimum number of decimal places in the fractional part of the formatted number
      +
      fractionGroups - The sizes of optional additional fractional decimal-place groups
      +
      Throws:
      +
      IllegalArgumentException - if the number of fraction places is negative.
      +
      +
      +
    • +
    • +
      +

      scale

      +
      protected abstract int scale(BigInteger satoshis, + int fractionPlaces)
      +
      Return the denomination for formatting the given value. The returned int + is the size of the decimal-place shift between the given Bitcoin-value denominated in + bitcoins and that same value as formatted. A fixed-denomination formatter will ignore + the arguments.
      +
      +
      Parameters:
      +
      satoshis - The number of satoshis having the value for which the shift is calculated
      +
      fractionPlaces - The number of decimal places available for displaying the + fractional part of the denominated value
      +
      Returns:
      +
      The size of the shift in increasingly-precise decimal places
      +
      +
      +
    • +
    • +
      +

      scale

      +
      protected abstract int scale()
      +
      Return the denomination of this object. Fixed-denomination formatters will override + with their configured denomination, auto-formatters with coin denomination. This + determines the interpretation of parsed numbers lacking a units-indicator.
      +
      +
    • +
    • +
      +

      parseObject

      +
      public final Object parseObject(String source, + ParsePosition pos)
      +
      Parse a String representation of a Bitcoin monetary value. Returns a + Coin object that represents the parsed value.
      +
      +
      Specified by:
      +
      parseObject in class Format
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      prefixUnitsIndicator

      +
      protected static void prefixUnitsIndicator(DecimalFormat numberFormat, + int scale)
      +
      Set both the currency symbol and code of the underlying, mutable NumberFormat object + according to the given denominational units scale factor. This is for formatting, not parsing. + +

      Set back to zero when you're done formatting otherwise immutability, equals() and + hashCode() will break!

      +
      +
      Parameters:
      +
      scale - Number of places the decimal point will be shifted when formatting + a quantity of satoshis.
      +
      +
      +
    • +
    • +
      +

      parse

      +
      public Coin parse(String source, + ParsePosition pos)
      +
      Parse a String representation of a Bitcoin monetary value. If this + object's pattern includes a currency sign, either symbol or code, as by default is true + for instances of BtcAutoFormat and false for instances of BtcFixedFormat, then denominated (i.e., prefixed) currency signs in the parsed String + will be recognized, and the parsed number will be interpreted as a quantity of units + having that recognized denomination. +

      If the pattern includes a currency sign but no currency sign is detected in the parsed + String, then the number is interpreted as a quatity of bitcoins. +

      If the pattern contains neither a currency symbol nor sign, then instances of BtcAutoFormat will interpret the parsed number as a quantity of bitcoins, and instances + of BtcAutoFormat will interpret the number as a quantity of that instance's + configured denomination, which can be ascertained by invoking the BtcFixedFormat.symbol() or BtcFixedFormat.code() method. + +

      Consider using the single-argument version of this overloaded method unless you need to + keep track of the current parse position.

      +
      +
      Returns:
      +
      a Coin object representing the parsed value
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      parse

      +
      public Coin parse(String source) + throws ParseException
      +
      Parse a String representation of a Bitcoin monetary value. If this + object's pattern includes a currency sign, either symbol or code, as by default is true + for instances of BtcAutoFormat and false for instances of BtcFixedFormat, then denominated (i.e., prefixed) currency signs in the parsed String + will be recognized, and the parsed number will be interpreted as a quantity of units + having that recognized denomination. +

      If the pattern includes a currency sign but no currency sign is detected in the parsed + String, then the number is interpreted as a quatity of bitcoins. +

      If the pattern contains neither a currency symbol nor sign, then instances of BtcAutoFormat will interpret the parsed number as a quantity of bitcoins, and instances + of BtcAutoFormat will interpret the number as a quantity of that instance's + configured denomination, which can be ascertained by invoking the BtcFixedFormat.symbol() or BtcFixedFormat.code() method.

      +
      +
      Returns:
      +
      a Coin object representing the parsed value
      +
      Throws:
      +
      ParseException
      +
      +
      +
    • +
    • +
      +

      prefixCode

      +
      protected static String prefixCode(String code, + int scale)
      +
      END OF PARSING STUFF
      +
      +
    • +
    • +
      +

      prefixSymbol

      +
      protected static String prefixSymbol(String symbol, + int scale)
      +
      +
    • +
    • +
      +

      negify

      +
      protected static String negify(String pattern)
      +
      Guarantee a formatting pattern has a subpattern for negative values. This method takes + a pattern that may be missing a negative subpattern, and returns the same pattern with + a negative subpattern appended as needed. + +

      This method accommodates an imperfection in the Java formatting code and distributed + locale data. To wit: the subpattern for negative numbers is optional and not all + locales have one. In those cases, DecimalFormat will indicate numbers + less than zero by adding a negative sign as the first character of the prefix of the + positive subpattern. + +

      We don't like this, since we claim the negative sign applies to the number not the + units, and therefore it ought to be adjacent to the number, displacing the + currency-units indicator if necessary.

      +
      +
    • +
    • +
      +

      getAvailableLocales

      +
      public static Locale[] getAvailableLocales()
      +
      Return an array of all locales for which the getInstance() method of this class can + return localized instances. See NumberFormat.getAvailableLocales()
      +
      +
    • +
    • +
      +

      coinSymbol

      +
      public String coinSymbol()
      +
      Return the unprefixed currency symbol for bitcoins configured for this object. The + return value of this method is constant throughout the life of an instance.
      +
      +
    • +
    • +
      +

      coinCode

      +
      public String coinCode()
      +
      Return the unprefixed international currency code for bitcoins configured for this + object. The return value of this method is constant throughough the life of an instance.
      +
      +
    • +
    • +
      +

      pattern

      +
      public String pattern()
      +
      Return a representation of the pattern used by this instance for formatting and + parsing. The format is similar to, but not the same as the format recognized by the + BtcFormat.Builder.pattern and BtcFormat.Builder.localizedPattern methods. The pattern + returned by this method is localized, any currency signs expressed are literally, and + optional fractional decimal places are shown grouped in parentheses.
      +
      +
    • +
    • +
      +

      symbols

      +
      public DecimalFormatSymbols symbols()
      +
      Return a copy of the localized symbols used by this instance for formatting and parsing.
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      Return true if the given object is equivalent to this one. + Formatters for different locales will never be equal, even + if they behave identically.
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      Return a hash code value for this instance.
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/ContextPropagatingThreadFactory.html b/javadoc/0.17-rc1/org/bitcoinj/utils/ContextPropagatingThreadFactory.html new file mode 100644 index 000000000..5e6f176ef --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/ContextPropagatingThreadFactory.html @@ -0,0 +1,179 @@ + + + + +ContextPropagatingThreadFactory (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ContextPropagatingThreadFactory

+
+
java.lang.Object +
org.bitcoinj.utils.ContextPropagatingThreadFactory
+
+
+
+
All Implemented Interfaces:
+
ThreadFactory
+
+
+
public class ContextPropagatingThreadFactory +extends Object +implements ThreadFactory
+
A ThreadFactory that propagates a Context from the creating + thread into the new thread. This factory creates daemon threads.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ContextPropagatingThreadFactory

      +
      public ContextPropagatingThreadFactory(String name, + int priority)
      +
      +
    • +
    • +
      +

      ContextPropagatingThreadFactory

      +
      public ContextPropagatingThreadFactory(String name)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/DaemonThreadFactory.html b/javadoc/0.17-rc1/org/bitcoinj/utils/DaemonThreadFactory.html new file mode 100644 index 000000000..8a7e8cd35 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/DaemonThreadFactory.html @@ -0,0 +1,178 @@ + + + + +DaemonThreadFactory (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DaemonThreadFactory

+
+
java.lang.Object +
org.bitcoinj.utils.DaemonThreadFactory
+
+
+
+
All Implemented Interfaces:
+
ThreadFactory
+
+
+
public class DaemonThreadFactory +extends Object +implements ThreadFactory
+
Thread factory whose threads are marked as daemon and won't prevent process exit.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DaemonThreadFactory

      +
      public DaemonThreadFactory(@Nullable + String name)
      +
      +
    • +
    • +
      +

      DaemonThreadFactory

      +
      public DaemonThreadFactory()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/ExchangeRate.html b/javadoc/0.17-rc1/org/bitcoinj/utils/ExchangeRate.html new file mode 100644 index 000000000..7c271c61f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/ExchangeRate.html @@ -0,0 +1,262 @@ + + + + +ExchangeRate (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ExchangeRate

+
+
java.lang.Object +
org.bitcoinj.utils.ExchangeRate
+
+
+
+
public class ExchangeRate +extends Object
+
An exchange rate is expressed as a ratio of a Coin and a Fiat amount.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      coin

      +
      public final Coin coin
      +
      +
    • +
    • +
      +

      fiat

      +
      public final Fiat fiat
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ExchangeRate

      +
      public ExchangeRate(Coin coin, + Fiat fiat)
      +
      Construct exchange rate. This amount of coin is worth that amount of fiat.
      +
      +
    • +
    • +
      +

      ExchangeRate

      +
      public ExchangeRate(Fiat fiat)
      +
      Construct exchange rate. One coin is worth this amount of fiat.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      coinToFiat

      +
      public Fiat coinToFiat(Coin convertCoin)
      +
      Convert a coin amount to a fiat amount using this exchange rate.
      +
      +
      Throws:
      +
      ArithmeticException - if the converted fiat amount is too high or too low.
      +
      +
      +
    • +
    • +
      +

      fiatToCoin

      +
      public Coin fiatToCoin(Fiat convertFiat)
      +
      Convert a fiat amount to a coin amount using this exchange rate.
      +
      +
      Throws:
      +
      ArithmeticException - if the converted coin amount is too high or too low.
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/ExponentialBackoff.Params.html b/javadoc/0.17-rc1/org/bitcoinj/utils/ExponentialBackoff.Params.html new file mode 100644 index 000000000..3ef8999d0 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/ExponentialBackoff.Params.html @@ -0,0 +1,153 @@ + + + + +ExponentialBackoff.Params (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ExponentialBackoff.Params

+
+
java.lang.Object +
org.bitcoinj.utils.ExponentialBackoff.Params
+
+
+
+
Enclosing class:
+
ExponentialBackoff
+
+
+
public static class ExponentialBackoff.Params +extends Object
+
Parameters to configure a particular kind of exponential backoff.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Params

      +
      public Params(Duration initialInterval, + float multiplier, + Duration maximumInterval)
      +
      +
      Parameters:
      +
      initialInterval - the initial interval to wait
      +
      multiplier - the multiplier to apply on each failure
      +
      maximumInterval - the maximum interval to wait
      +
      +
      +
    • +
    • +
      +

      Params

      +
      public Params()
      +
      Construct params with default values.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/ExponentialBackoff.html b/javadoc/0.17-rc1/org/bitcoinj/utils/ExponentialBackoff.html new file mode 100644 index 000000000..f496ddfbf --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/ExponentialBackoff.html @@ -0,0 +1,309 @@ + + + + +ExponentialBackoff (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ExponentialBackoff

+
+
java.lang.Object +
org.bitcoinj.utils.ExponentialBackoff
+
+
+
+
All Implemented Interfaces:
+
Comparable<ExponentialBackoff>
+
+
+
public class ExponentialBackoff +extends Object +implements Comparable<ExponentialBackoff>
+

Tracks successes and failures and calculates a time to retry the operation.

+ +

The retries are exponentially backed off, up to a maximum interval. On success the back off interval is reset.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      DEFAULT_INITIAL_INTERVAL

      +
      public static final Duration DEFAULT_INITIAL_INTERVAL
      +
      +
    • +
    • +
      +

      DEFAULT_MULTIPLIER

      +
      public static final float DEFAULT_MULTIPLIER
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      DEFAULT_MAXIMUM_INTERVAL

      +
      public static final Duration DEFAULT_MAXIMUM_INTERVAL
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      trackSuccess

      +
      public final void trackSuccess()
      +
      Track a success - reset back off interval to the initial value
      +
      +
    • +
    • +
      +

      trackFailure

      +
      public void trackFailure()
      +
      Track a failure - multiply the back off interval by the multiplier
      +
      +
    • +
    • +
      +

      retryTime

      +
      public Instant retryTime()
      +
      Get the next time to retry
      +
      +
    • +
    • +
      +

      getRetryTime

      +
      @Deprecated +public long getRetryTime()
      +
      Deprecated. + +
      +
      Get the next time to retry, in milliseconds since the epoch
      +
      +
    • +
    • +
      +

      compareTo

      +
      public int compareTo(ExponentialBackoff other)
      +
      +
      Specified by:
      +
      compareTo in interface Comparable<ExponentialBackoff>
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/ListenableCompletableFuture.html b/javadoc/0.17-rc1/org/bitcoinj/utils/ListenableCompletableFuture.html new file mode 100644 index 000000000..05f28291d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/ListenableCompletableFuture.html @@ -0,0 +1,266 @@ + + + + +ListenableCompletableFuture (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ListenableCompletableFuture<V>

+
+
java.lang.Object +
java.util.concurrent.CompletableFuture<V> +
org.bitcoinj.utils.ListenableCompletableFuture<V>
+
+
+
+
+
All Implemented Interfaces:
+
com.google.common.util.concurrent.ListenableFuture<V>, CompletionStage<V>, Future<V>, ListenableCompletionStage<V>
+
+
+
public class ListenableCompletableFuture<V> +extends CompletableFuture<V> +implements ListenableCompletionStage<V>
+
A CompletableFuture that is also a ListenableFuture for migration + from Guava ListenableFuture to CompletableFuture. This allows clients of bitcoinj to change the type + of variables receiving Futures from bitcoinj methods. You must switch from Guava's + ListenableFuture (and related types) to Java 8's CompletableFuture. + Release 0.18 of bitcoinj will remove this class, + and the type of returned futures from bitcoinj, will be changed to CompletableFuture. +

+ WARNING: This class should be considered Deprecated for Removal, as it will be removed in Release 0.18. See above for details.

+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ListenableCompletableFuture

      +
      public ListenableCompletableFuture()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      completedFuture

      +
      @Deprecated +public static <T> ListenableCompletableFuture<T> completedFuture(T value)
      + +
      Returns a new CompletableFuture that is already completed with + the given value.
      +
      +
      Type Parameters:
      +
      T - the type of the value
      +
      Parameters:
      +
      value - the value
      +
      Returns:
      +
      the completed CompletableFuture
      +
      +
      +
    • +
    • +
      +

      failedFuture

      +
      @Deprecated +public static <T> ListenableCompletableFuture<T> failedFuture(Throwable throwable)
      +
      Deprecated. +
      Use new CompletableFuture() + CompletableFuture.completeExceptionally() or if JDK 9+ use CompletableFuture.failedFuture()
      +
      +
      Returns a new ListenableCompletableFuture that is already completed exceptionally + with the given throwable.
      +
      +
      Type Parameters:
      +
      T - the type of the expected value
      +
      Parameters:
      +
      throwable - the exceptions
      +
      Returns:
      +
      the completed CompletableFuture
      +
      +
      +
    • +
    • +
      +

      of

      +
      @Deprecated +public static <T> ListenableCompletableFuture<T> of(CompletableFuture<T> future)
      +
      Deprecated. +
      Don't convert to ListenableCompletableFuture, use CompletableFuture directly.
      +
      +
      Converts a generic CompletableFuture to a ListenableCompletableFuture. If the passed + in future is already a ListenableCompletableFuture no conversion is performed.
      +
      +
      Type Parameters:
      +
      T - the type of the futures return value
      +
      Parameters:
      +
      future - A CompletableFuture that may need to be converted
      +
      Returns:
      +
      A ListenableCompletableFuture
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/ListenableCompletionStage.html b/javadoc/0.17-rc1/org/bitcoinj/utils/ListenableCompletionStage.html new file mode 100644 index 000000000..6e3508cb1 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/ListenableCompletionStage.html @@ -0,0 +1,157 @@ + + + + +ListenableCompletionStage (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface ListenableCompletionStage<V>

+
+
+
+
All Superinterfaces:
+
CompletionStage<V>, Future<V>, com.google.common.util.concurrent.ListenableFuture<V>
+
+
+
All Known Implementing Classes:
+
ListenableCompletableFuture
+
+
+
public interface ListenableCompletionStage<V> +extends CompletionStage<V>, com.google.common.util.concurrent.ListenableFuture<V>
+
A CompletionStage with a ListenableFuture-compatible interface to smooth migration + from Guava ListenableFuture to CompletableFuture/CompletionStage. +

+ WARNING: This interface should be considered Deprecated for Removal, It will be removed in Release 0.18. See ListenableCompletableFuture for details.

+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/ListenerRegistration.html b/javadoc/0.17-rc1/org/bitcoinj/utils/ListenerRegistration.html new file mode 100644 index 000000000..f82b408ec --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/ListenerRegistration.html @@ -0,0 +1,213 @@ + + + + +ListenerRegistration (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class ListenerRegistration<T>

+
+
java.lang.Object +
org.bitcoinj.utils.ListenerRegistration<T>
+
+
+
+
public class ListenerRegistration<T> +extends Object
+
A simple wrapper around a listener and an executor, with some utility methods.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      listener

      +
      public final T listener
      +
      +
    • +
    • +
      +

      executor

      +
      public final Executor executor
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ListenerRegistration

      +
      public ListenerRegistration(T listener, + Executor executor)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      removeFromList

      +
      public static <T> boolean removeFromList(T listener, + List<? extends ListenerRegistration<T>> list)
      +
      Remove wrapped listener
      +
      +
      Type Parameters:
      +
      T -
      +
      Parameters:
      +
      listener - listener to remove
      +
      list - list to remove it from
      +
      Returns:
      +
      true if the listener was removed, else false.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/TaggableObject.html b/javadoc/0.17-rc1/org/bitcoinj/utils/TaggableObject.html new file mode 100644 index 000000000..c4ad46c13 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/TaggableObject.html @@ -0,0 +1,194 @@ + + + + +TaggableObject (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface TaggableObject

+
+
+
+
All Known Implementing Classes:
+
BaseTaggableObject, Wallet
+
+
+
@Deprecated +public interface TaggableObject
+
Deprecated. +
Applications should use another mechanism to persist application state data
+
+

An object that can carry around and possibly serialize a map of strings to immutable byte arrays. Tagged objects + can have data stored on them that might be useful for an application developer. For example a wallet can store tags, + and thus this would be a reasonable place to put any important data items that the bitcoinj API does not allow for: + things like exchange rates at the time a transaction was made would currently fall into this category. Of course, + it helps interop and other developers if you introduce a real type safe API for a new feature instead of using this + so please consider that path, if you find yourself tempted to store tags!

+ +

Good tag names won't conflict with other people's code, should you one day decide to merge them. Choose tag names + like "com.example:keyowner:02b7e6dc316dfaa19c5a599f63d88ffeae398759b857ca56b2f69de3e815381343" instead of + "owner" or just "o". Also, it's good practice to create constants for each string you use, to help avoid typos + in string parameters causing confusing bugs!

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    com.google.protobuf.ByteString
    + +
    +
    Deprecated.
    +
    +
    Map<String,com.google.protobuf.ByteString>
    + +
    +
    Deprecated.
    +
    +
    com.google.protobuf.ByteString
    + +
    +
    Deprecated.
    +
    +
    void
    +
    setTag(String tag, + com.google.protobuf.ByteString value)
    +
    +
    Deprecated.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      maybeGetTag

      +
      @Deprecated +@Nullable +com.google.protobuf.ByteString maybeGetTag(String tag)
      +
      Deprecated.
      +
      Returns the immutable byte array associated with the given tag name, or null if there is none.
      +
      +
    • +
    • +
      +

      getTag

      +
      @Deprecated +com.google.protobuf.ByteString getTag(String tag)
      +
      Deprecated.
      +
      Returns the immutable byte array associated with the given tag name, or throws IllegalArgumentException + if that tag wasn't set yet.
      +
      +
    • +
    • +
      +

      setTag

      +
      @Deprecated +void setTag(String tag, + com.google.protobuf.ByteString value)
      +
      Deprecated.
      +
      Associates the given immutable byte array with the string tag. See the docs for TaggableObject to learn more.
      +
      +
    • +
    • +
      +

      getTags

      +
      @Deprecated +Map<String,com.google.protobuf.ByteString> getTags()
      +
      Deprecated.
      +
      Returns a copy of all the tags held by this object.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/Threading.UserThread.html b/javadoc/0.17-rc1/org/bitcoinj/utils/Threading.UserThread.html new file mode 100644 index 000000000..b20e51697 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/Threading.UserThread.html @@ -0,0 +1,232 @@ + + + + +Threading.UserThread (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Threading.UserThread

+
+
java.lang.Object +
java.lang.Thread +
org.bitcoinj.utils.Threading.UserThread
+
+
+
+
+
All Implemented Interfaces:
+
Runnable, Executor
+
+
+
Enclosing class:
+
Threading
+
+
+
public static class Threading.UserThread +extends Thread +implements Executor
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      WARNING_THRESHOLD

      +
      public static int WARNING_THRESHOLD
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      UserThread

      +
      public UserThread()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      run

      +
      public void run()
      +
      +
      Specified by:
      +
      run in interface Runnable
      +
      Overrides:
      +
      run in class Thread
      +
      +
      +
    • +
    • +
      +

      execute

      +
      public void execute(Runnable command)
      +
      +
      Specified by:
      +
      execute in interface Executor
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/Threading.html b/javadoc/0.17-rc1/org/bitcoinj/utils/Threading.html new file mode 100644 index 000000000..a40c3a6ba --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/Threading.html @@ -0,0 +1,338 @@ + + + + +Threading (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Threading

+
+
java.lang.Object +
org.bitcoinj.utils.Threading
+
+
+
+
public class Threading +extends Object
+
Various threading related utilities. Provides a wrapper around explicit lock creation that lets you control whether + bitcoinj performs cycle detection or not. Cycle detection is useful to detect bugs but comes with a small cost. + Also provides a worker thread that is designed for event listeners to be dispatched on.
+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    Nested Classes
    +
    +
    Modifier and Type
    +
    Class
    +
    Description
    +
    static class 
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static com.google.common.util.concurrent.CycleDetectingLockFactory
    + +
     
    +
    static final Executor
    + +
    +
    A dummy executor that just invokes the runnable immediately.
    +
    + + +
    +
    A caching thread pool that creates daemon threads, which won't keep the JVM alive waiting for more work.
    +
    + + +
    +
    An exception handler that will be invoked for any exceptions that occur in the user thread, and + any unhandled exceptions that are caught whilst the framework is processing network traffic or doing other + background tasks.
    +
    +
    static Executor
    + +
    +
    An executor with one thread that is intended for running event listeners on.
    +
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static com.google.common.util.concurrent.CycleDetectingLockFactory.Policy
    + +
     
    +
    static void
    + +
     
    + +
    lock(Class clazz)
    +
     
    + +
    lock(String name)
    +
     
    +
    static void
    +
    setPolicy(com.google.common.util.concurrent.CycleDetectingLockFactory.Policy policy)
    +
     
    +
    static void
    + +
     
    +
    static void
    + +
    +
    Put a dummy task into the queue and wait for it to be run.
    +
    +
    static void
    + +
     
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      USER_THREAD

      +
      public static Executor USER_THREAD
      +
      An executor with one thread that is intended for running event listeners on. This ensures all event listener code + runs without any locks being held. It's intended for the API user to run things on. Callbacks registered by + bitcoinj internally shouldn't normally run here, although currently there are a few exceptions.
      +
      +
    • +
    • +
      +

      SAME_THREAD

      +
      public static final Executor SAME_THREAD
      +
      A dummy executor that just invokes the runnable immediately. Use this over more complex executors + (e.g. those extending ExecutorService), which are overkill for our needs.
      +
      +
    • +
    • +
      +

      uncaughtExceptionHandler

      +
      @Nullable +public static volatile Thread.UncaughtExceptionHandler uncaughtExceptionHandler
      +
      An exception handler that will be invoked for any exceptions that occur in the user thread, and + any unhandled exceptions that are caught whilst the framework is processing network traffic or doing other + background tasks. The purpose of this is to allow you to report back unanticipated crashes from your users + to a central collection center for analysis and debugging. You should configure this before any + bitcoinj library code is run, setting it after you started network traffic and other forms of processing + may result in the change not taking effect.
      +
      +
    • +
    • +
      +

      factory

      +
      public static com.google.common.util.concurrent.CycleDetectingLockFactory factory
      +
      +
    • +
    • +
      +

      THREAD_POOL

      +
      public static ExecutorService THREAD_POOL
      +
      A caching thread pool that creates daemon threads, which won't keep the JVM alive waiting for more work.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Threading

      +
      public Threading()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      waitForUserCode

      +
      public static void waitForUserCode()
      +
      Put a dummy task into the queue and wait for it to be run. Because it's single threaded, this means all + tasks submitted before this point are now completed. Usually you won't want to use this method - it's a + convenience primarily used in unit testing. If you want to wait for an event to be called the right thing + to do is usually to create a CompletableFuture and then call CompletableFuture.complete(Object) + on it. For example: +
      
      + CompletableFuture f = CompletableFuture.supplyAsync(() -> event, USER_THREAD)
      + 
      + You can then either block on that future, compose it, add listeners to it and so on.
      +
      +
    • +
    • +
      +

      lock

      +
      public static ReentrantLock lock(Class clazz)
      +
      +
    • +
    • +
      +

      lock

      +
      public static ReentrantLock lock(String name)
      +
      +
    • +
    • +
      +

      warnOnLockCycles

      +
      public static void warnOnLockCycles()
      +
      +
    • +
    • +
      +

      throwOnLockCycles

      +
      public static void throwOnLockCycles()
      +
      +
    • +
    • +
      +

      ignoreLockCycles

      +
      public static void ignoreLockCycles()
      +
      +
    • +
    • +
      +

      setPolicy

      +
      public static void setPolicy(com.google.common.util.concurrent.CycleDetectingLockFactory.Policy policy)
      +
      +
    • +
    • +
      +

      getPolicy

      +
      public static com.google.common.util.concurrent.CycleDetectingLockFactory.Policy getPolicy()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/VersionTally.html b/javadoc/0.17-rc1/org/bitcoinj/utils/VersionTally.html new file mode 100644 index 000000000..27ecf47d5 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/VersionTally.html @@ -0,0 +1,235 @@ + + + + +VersionTally (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class VersionTally

+
+
java.lang.Object +
org.bitcoinj.utils.VersionTally
+
+
+
+
public class VersionTally +extends Object
+
Caching counter for the block versions within a moving window. This class + is NOT thread safe (as if two threads are trying to use it concurrently, + there's risk of getting versions out of sequence).
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      add

      +
      public void add(long version)
      +
      Add a new block version to the tally, and return the count for that version + within the window.
      +
      +
      Parameters:
      +
      version - the block version to add.
      +
      +
      +
    • +
    • +
      +

      getCountAtOrAbove

      +
      public Integer getCountAtOrAbove(long version)
      +
      Get the count of blocks at or above the given version, within the window.
      +
      +
      Parameters:
      +
      version - the block version to query.
      +
      Returns:
      +
      the count for the block version, or null if the window is not yet + full.
      +
      +
      +
    • +
    • +
      +

      initialize

      +
      public void initialize(BlockStore blockStore, + StoredBlock chainHead) + throws BlockStoreException
      +
      Initialize the version tally from the block store. Note this does not + search backwards past the start of the block store, so if starting from + a checkpoint this may not fill the window.
      +
      +
      Parameters:
      +
      blockStore - block store to load blocks from.
      +
      chainHead - current chain tip.
      +
      Throws:
      +
      BlockStoreException
      +
      +
      +
    • +
    • +
      +

      size

      +
      public int size()
      +
      Get the size of the version window.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/utils/package-summary.html new file mode 100644 index 000000000..a3a2547a2 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/package-summary.html @@ -0,0 +1,181 @@ + + + + +org.bitcoinj.utils (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.utils

+
+
+
package org.bitcoinj.utils
+
+
Formatting monetary amounts, representing exchange rates, a program for loading Bitcoin Core saved block files, + a class to control how bitcoinj uses threads and misc other utility classes that don't fit anywhere else.
+
+
+
    +
  • +
    +
    +
    +
    +
    Class
    +
    Description
    + +
    +
    Find/create App Data Directory in correct platform-specific location.
    +
    + +
    Deprecated. +
    Applications should use another mechanism to persist application state data
    +
    + +
    +
    This class reads block files stored in the Bitcoin Core format.
    +
    + +
    +
    A Java logging formatter that writes more compact output than the default.
    +
    + +
    +
    This class, a concrete extension of BtcFormat, is distinguished by its + accommodation of multiple denominational units as follows:
    +
    + +
    +
    Enum for specifying the style of currency indicators that are used + when formatting, either codes or symbols.
    +
    + +
    +
    This class, a concrete extension of BtcFormat, is distinguished in that each + instance formats and by-default parses all Bitcoin monetary values in units of a single + denomination that is specified at the time that instance is constructed.
    +
    + +
    +
    Instances of this class format and parse locale-specific numerical + representations of Bitcoin monetary values.
    +
    + +
    +
    This class constructs new instances of BtcFormat, allowing for the + configuration of those instances before they are constructed.
    +
    + +
    +
    A ThreadFactory that propagates a Context from the creating + thread into the new thread.
    +
    + +
    +
    Thread factory whose threads are marked as daemon and won't prevent process exit.
    +
    + +
    +
    An exchange rate is expressed as a ratio of a Coin and a Fiat amount.
    +
    + +
    +
    Tracks successes and failures and calculates a time to retry the operation.
    +
    + +
    +
    Parameters to configure a particular kind of exponential backoff.
    +
    + +
    +
    A CompletableFuture that is also a ListenableFuture for migration + from Guava ListenableFuture to CompletableFuture.
    +
    + +
    +
    A CompletionStage with a ListenableFuture-compatible interface to smooth migration + from Guava ListenableFuture to CompletableFuture/CompletionStage.
    +
    + +
    +
    A simple wrapper around a listener and an executor, with some utility methods.
    +
    + +
    Deprecated. +
    Applications should use another mechanism to persist application state data
    +
    + +
    +
    Various threading related utilities.
    +
    + +
     
    + +
    +
    Caching counter for the block versions within a moving window.
    +
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/utils/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/utils/package-tree.html new file mode 100644 index 000000000..ca72de91a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/utils/package-tree.html @@ -0,0 +1,142 @@ + + + + +org.bitcoinj.utils Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.utils

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/AllRandomKeysRotating.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/AllRandomKeysRotating.html new file mode 100644 index 000000000..27dbdeb8d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/AllRandomKeysRotating.html @@ -0,0 +1,150 @@ + + + + +AllRandomKeysRotating (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AllRandomKeysRotating

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.wallet.AllRandomKeysRotating
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class AllRandomKeysRotating +extends RuntimeException
+
Indicates that an attempt was made to upgrade a random wallet to deterministic, but there were no non-rotating + random keys to use as source material for the seed. Add a non-compromised key first!
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AllRandomKeysRotating

      +
      public AllRandomKeysRotating()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/AllowUnconfirmedCoinSelector.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/AllowUnconfirmedCoinSelector.html new file mode 100644 index 000000000..7d77256cc --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/AllowUnconfirmedCoinSelector.html @@ -0,0 +1,186 @@ + + + + +AllowUnconfirmedCoinSelector (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AllowUnconfirmedCoinSelector

+
+
java.lang.Object +
org.bitcoinj.wallet.DefaultCoinSelector +
org.bitcoinj.wallet.AllowUnconfirmedCoinSelector
+
+
+
+
+
All Implemented Interfaces:
+
CoinSelector
+
+
+
public class AllowUnconfirmedCoinSelector +extends DefaultCoinSelector
+
This coin selector will select any transaction at all, regardless of where it came from or whether it was + confirmed yet. However immature coinbases will not be included (would be a protocol violation).
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AllowUnconfirmedCoinSelector

      +
      public AllowUnconfirmedCoinSelector()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    + +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/BasicKeyChain.State.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/BasicKeyChain.State.html new file mode 100644 index 000000000..7a400040f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/BasicKeyChain.State.html @@ -0,0 +1,230 @@ + + + + +BasicKeyChain.State (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class BasicKeyChain.State

+
+
java.lang.Object +
java.lang.Enum<BasicKeyChain.State> +
org.bitcoinj.wallet.BasicKeyChain.State
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<BasicKeyChain.State>, Constable
+
+
+
Enclosing class:
+
BasicKeyChain
+
+
+
public static enum BasicKeyChain.State +extends Enum<BasicKeyChain.State>
+
Whether this basic key chain is empty, full of regular (usable for signing) keys, or full of watching keys.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static BasicKeyChain.State[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static BasicKeyChain.State valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/BasicKeyChain.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/BasicKeyChain.html new file mode 100644 index 000000000..3f6467cf9 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/BasicKeyChain.html @@ -0,0 +1,774 @@ + + + + +BasicKeyChain (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class BasicKeyChain

+
+
java.lang.Object +
org.bitcoinj.wallet.BasicKeyChain
+
+
+
+
All Implemented Interfaces:
+
EncryptableKeyChain, KeyChain
+
+
+
public class BasicKeyChain +extends Object +implements EncryptableKeyChain
+
A KeyChain that implements the simplest model possible: it can have keys imported into it, and just acts as + a dumb bag of keys. It will, left to its own devices, always return the same key for usage by the wallet, although + it will automatically add one to itself if it's empty or if encryption is requested.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BasicKeyChain

      +
      public BasicKeyChain()
      +
      +
    • +
    • +
      +

      BasicKeyChain

      +
      public BasicKeyChain(@Nullable + KeyCrypter crypter)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getKeyCrypter

      +
      @Nullable +public KeyCrypter getKeyCrypter()
      +
      Returns the KeyCrypter in use or null if the key chain is not encrypted.
      +
      +
      Specified by:
      +
      getKeyCrypter in interface EncryptableKeyChain
      +
      +
      +
    • +
    • +
      +

      getKey

      +
      public ECKey getKey(@Nullable + KeyChain.KeyPurpose ignored)
      +
      Description copied from interface: KeyChain
      +
      Obtains a key intended for the given purpose. The chain may create a new key, derive one, or re-use an old one.
      +
      +
      Specified by:
      +
      getKey in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      getKeys

      +
      public List<ECKey> getKeys(@Nullable + KeyChain.KeyPurpose purpose, + int numberOfKeys)
      +
      Description copied from interface: KeyChain
      +
      Obtains a number of key/s intended for the given purpose. The chain may create new key/s, derive, or re-use an old one.
      +
      +
      Specified by:
      +
      getKeys in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      getKeys

      +
      public List<ECKey> getKeys()
      +
      Returns a copy of the list of keys that this chain is managing.
      +
      +
    • +
    • +
      +

      importKeys

      +
      public int importKeys(ECKey... keys)
      +
      +
    • +
    • +
      +

      importKeys

      +
      public int importKeys(List<? extends ECKey> keys)
      +
      +
    • +
    • +
      +

      importKey

      +
      public void importKey(ECKey key)
      +
      Imports a key to the key chain. If key is present in the key chain, ignore it.
      +
      +
    • +
    • +
      +

      findKeyFromPubHash

      +
      public ECKey findKeyFromPubHash(byte[] pubKeyHash)
      +
      +
    • +
    • +
      +

      findKeyFromPubKey

      +
      public ECKey findKeyFromPubKey(byte[] pubKey)
      +
      +
    • +
    • +
      +

      hasKey

      +
      public boolean hasKey(ECKey key)
      +
      Description copied from interface: KeyChain
      +
      Returns true if the given key is in the chain.
      +
      +
      Specified by:
      +
      hasKey in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      numKeys

      +
      public int numKeys()
      +
      Description copied from interface: KeyChain
      +
      Returns the number of keys this key chain manages.
      +
      +
      Specified by:
      +
      numKeys in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      isWatching

      +
      public BasicKeyChain.State isWatching()
      +
      Returns whether this chain consists of pubkey only (watching) keys, regular keys (usable for signing), or + has no keys in it yet at all (thus we cannot tell).
      +
      +
    • +
    • +
      +

      removeKey

      +
      public boolean removeKey(ECKey key)
      +
      Removes the given key from the keychain. Be very careful with this - losing a private key destroys the + money associated with it.
      +
      +
      Returns:
      +
      Whether the key was removed or not.
      +
      +
      +
    • +
    • +
      +

      earliestKeyCreationTime

      +
      public Instant earliestKeyCreationTime()
      +
      Returns the earliest creation time of keys in this chain.
      +
      +
      Specified by:
      +
      earliestKeyCreationTime in interface KeyChain
      +
      Returns:
      +
      earliest creation times of keys in this chain, + Instant.EPOCH if at least one time is unknown, + Instant.MAX if no keys in this chain
      +
      +
      +
    • +
    • +
      +

      getListeners

      + +
      +
    • +
    • +
      +

      serializeToProtobuf

      +
      public List<org.bitcoinj.protobuf.wallet.Protos.Key> serializeToProtobuf()
      +
      Serialize to a list of keys
      +
      +
      Specified by:
      +
      serializeToProtobuf in interface KeyChain
      +
      Returns:
      +
      list of keys (treat as unmodifiable list, will change in future release)
      +
      +
      +
    • +
    • +
      +

      fromProtobufUnencrypted

      +
      public static BasicKeyChain fromProtobufUnencrypted(List<org.bitcoinj.protobuf.wallet.Protos.Key> keys) + throws UnreadableWalletException
      +
      Returns a new BasicKeyChain that contains all basic, ORIGINAL type keys extracted from the list. Unrecognised + key types are ignored.
      +
      +
      Throws:
      +
      UnreadableWalletException
      +
      +
      +
    • +
    • +
      +

      fromProtobufEncrypted

      +
      public static BasicKeyChain fromProtobufEncrypted(List<org.bitcoinj.protobuf.wallet.Protos.Key> keys, + KeyCrypter crypter) + throws UnreadableWalletException
      +
      Returns a new BasicKeyChain that contains all basic, ORIGINAL type keys and also any encrypted keys extracted + from the list. Unrecognised key types are ignored.
      +
      +
      Throws:
      +
      UnreadableWalletException.BadPassword - if the password doesn't seem to match
      +
      UnreadableWalletException - if the data structures are corrupted/inconsistent
      +
      +
      +
    • +
    • +
      +

      addEventListener

      +
      public void addEventListener(KeyChainEventListener listener)
      +
      Description copied from interface: KeyChain
      +
      Adds a listener for events that are run when keys are added, on the user thread.
      +
      +
      Specified by:
      +
      addEventListener in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      addEventListener

      +
      public void addEventListener(KeyChainEventListener listener, + Executor executor)
      +
      Description copied from interface: KeyChain
      +
      Adds a listener for events that are run when keys are added, on the given executor.
      +
      +
      Specified by:
      +
      addEventListener in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      removeEventListener

      +
      public boolean removeEventListener(KeyChainEventListener listener)
      +
      Description copied from interface: KeyChain
      +
      Removes a listener for events that are run when keys are added.
      +
      +
      Specified by:
      +
      removeEventListener in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      toEncrypted

      +
      public BasicKeyChain toEncrypted(CharSequence password)
      +
      Convenience wrapper around toEncrypted(KeyCrypter, AesKey) which uses the default Scrypt key derivation algorithm and + parameters, derives a key from the given password and returns the created key.
      +
      +
      Specified by:
      +
      toEncrypted in interface EncryptableKeyChain
      +
      Returns:
      +
      The derived key, in case you wish to cache it for future use.
      +
      +
      +
    • +
    • +
      +

      toEncrypted

      +
      public BasicKeyChain toEncrypted(KeyCrypter keyCrypter, + AesKey aesKey)
      +
      Encrypt the wallet using the KeyCrypter and the AES key. A good default KeyCrypter to use is + KeyCrypterScrypt.
      +
      +
      Specified by:
      +
      toEncrypted in interface EncryptableKeyChain
      +
      Parameters:
      +
      keyCrypter - The KeyCrypter that specifies how to encrypt/ decrypt a key
      +
      aesKey - AES key to use (normally created using KeyCrypter#deriveKey and cached as it is time consuming + to create from a password)
      +
      Throws:
      +
      KeyCrypterException - Thrown if the wallet encryption fails. If so, the wallet state is unchanged.
      +
      +
      +
    • +
    • +
      +

      toDecrypted

      +
      public BasicKeyChain toDecrypted(CharSequence password)
      +
      Description copied from interface: EncryptableKeyChain
      +
      Decrypts the key chain with the given password. See EncryptableKeyChain.toDecrypted(AesKey) + for details.
      +
      +
      Specified by:
      +
      toDecrypted in interface EncryptableKeyChain
      +
      +
      +
    • +
    • +
      +

      toDecrypted

      +
      public BasicKeyChain toDecrypted(AesKey aesKey)
      +
      Description copied from interface: EncryptableKeyChain
      +
      Decrypt the key chain with the given AES key and whatever KeyCrypter is already set. Note that if you + just want to spend money from an encrypted wallet, don't decrypt the whole thing first. Instead, set the + SendRequest.aesKey field before asking the wallet to build the send.
      +
      +
      Specified by:
      +
      toDecrypted in interface EncryptableKeyChain
      +
      Parameters:
      +
      aesKey - AES key to use (normally created using KeyCrypter#deriveKey and cached as it is time consuming to + create from a password)
      +
      +
      +
    • +
    • +
      +

      checkPassword

      +
      public boolean checkPassword(CharSequence password)
      +
      Returns whether the given password is correct for this key chain.
      +
      +
      Specified by:
      +
      checkPassword in interface EncryptableKeyChain
      +
      Throws:
      +
      IllegalStateException - if the chain is not encrypted at all.
      +
      +
      +
    • +
    • +
      +

      checkAESKey

      +
      public boolean checkAESKey(AesKey aesKey)
      +
      Check whether the AES key can decrypt the first encrypted key in the wallet.
      +
      +
      Specified by:
      +
      checkAESKey in interface EncryptableKeyChain
      +
      Returns:
      +
      true if AES key supplied can decrypt the first encrypted private key in the wallet, false otherwise.
      +
      +
      +
    • +
    • +
      +

      getFilter

      +
      public BloomFilter getFilter(int size, + double falsePositiveRate, + int tweak)
      +
      Description copied from interface: KeyChain
      +

      Gets a bloom filter that contains all of the public keys from this chain, and which will provide the given + false-positive rate if it has size elements. Keep in mind that you will get 2 elements in the bloom filter for + each key in the key chain, for the public key and the hash of the public key (address form). For this reason + size should be at least 2x the result of KeyChain.numKeys().

      + +

      This is used to generate a BloomFilter which can be BloomFilter.merge(BloomFilter)d with + another. It could also be used if you have a specific target for the filter's size.

      + +

      See the docs for BloomFilter(int, double, int) for a brief + explanation of anonymity when using bloom filters, and for the meaning of these parameters.

      +
      +
      Specified by:
      +
      getFilter in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      numBloomFilterEntries

      +
      public int numBloomFilterEntries()
      +
      Description copied from interface: KeyChain
      +
      Returns the number of elements this chain wishes to insert into the Bloom filter. The size passed to + KeyChain.getFilter(int, double, int) should be at least this large.
      +
      +
      Specified by:
      +
      numBloomFilterEntries in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      findOldestKeyAfter

      +
      public Optional<ECKey> findOldestKeyAfter(Instant time)
      +
      Returns the first ECKey created after the given time, or empty if there is none.
      +
      +
    • +
    • +
      +

      findOldestKeyAfter

      +
      @Nullable +@Deprecated +public ECKey findOldestKeyAfter(long timeSecs)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      findKeysBefore

      +
      public List<ECKey> findKeysBefore(Instant time)
      +
      Returns a list of all ECKeys created after the given time.
      +
      +
    • +
    • +
      +

      findKeysBefore

      +
      @Deprecated +public List<ECKey> findKeysBefore(long timeSecs)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString(boolean includePrivateKeys, + @Nullable + AesKey aesKey, + Network network)
      +
      +
    • +
    • +
      +

      toString

      +
      @Deprecated +public String toString(boolean includePrivateKeys, + @Nullable + AesKey aesKey, + NetworkParameters params)
      + +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/CoinSelection.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/CoinSelection.html new file mode 100644 index 000000000..39b79124e --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/CoinSelection.html @@ -0,0 +1,250 @@ + + + + +CoinSelection (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CoinSelection

+
+
java.lang.Object +
org.bitcoinj.wallet.CoinSelection
+
+
+
+
public class CoinSelection +extends Object
+
Represents the results of a CoinSelector.select(Coin, List) operation. A coin selection represents a list + of spendable transaction outputs that sum together to a totalValue() value gathered. Different coin selections + could be produced by different coin selectors from the same input set, according to their varying policies.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/CoinSelector.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/CoinSelector.html new file mode 100644 index 000000000..d342a97ed --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/CoinSelector.html @@ -0,0 +1,162 @@ + + + + +CoinSelector (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface CoinSelector

+
+
+
+
All Known Implementing Classes:
+
AllowUnconfirmedCoinSelector, DefaultCoinSelector, FilteringCoinSelector, KeyTimeCoinSelector
+
+
+
Functional Interface:
+
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
+
+
+
@FunctionalInterface +public interface CoinSelector
+
A CoinSelector is responsible for picking some outputs to spend, from the list of all possible outputs. It + allows you to customize the policies for creation of transactions to suit your needs. The select operation + may return a CoinSelection that has a valueGathered lower than the requested target, if there's not + enough money in the wallet.
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      select

      +
      CoinSelection select(Coin target, + List<TransactionOutput> candidates)
      +
      Creates a CoinSelection that tries to meet the target amount of value. The candidates list is given to + this call and can be edited freely. See the docs for CoinSelection to learn more, or look a the implementation + of DefaultCoinSelector.
      +
      +
    • +
    • +
      +

      fromPredicate

      +
      static CoinSelector fromPredicate(Predicate<TransactionOutput> predicate)
      +
      Create a CoinSelector from a predicate function that filters a single TransactionOutput
      +
      +
      Parameters:
      +
      predicate - Returns true if a "coin" (TransactionOutput) should be included.
      +
      Returns:
      +
      A CoinSelector that only returns coins matching the predicate
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/DecryptingKeyBag.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/DecryptingKeyBag.html new file mode 100644 index 000000000..20bc78449 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/DecryptingKeyBag.html @@ -0,0 +1,269 @@ + + + + +DecryptingKeyBag (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DecryptingKeyBag

+
+
java.lang.Object +
org.bitcoinj.wallet.DecryptingKeyBag
+
+
+
+
All Implemented Interfaces:
+
KeyBag
+
+
+
public class DecryptingKeyBag +extends Object +implements KeyBag
+
A DecryptingKeyBag filters a pre-existing key bag, decrypting keys as they are requested using the provided + AES key. If the keys are encrypted and no AES key provided, ECKey.KeyIsEncryptedException + will be thrown.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      target

      +
      protected final KeyBag target
      +
      +
    • +
    • +
      +

      aesKey

      +
      protected final AesKey aesKey
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DecryptingKeyBag

      +
      public DecryptingKeyBag(KeyBag target, + @Nullable + AesKey aesKey)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      findKeyFromPubKeyHash

      +
      @Nullable +public ECKey findKeyFromPubKeyHash(byte[] pubKeyHash, + @Nullable + ScriptType scriptType)
      +
      Description copied from interface: KeyBag
      +
      Locates a keypair from the keychain given the hash of the public key, and (optionally) by usage for a specific + script type. This is needed when finding out which key we need to use to redeem a transaction output.
      +
      +
      Specified by:
      +
      findKeyFromPubKeyHash in interface KeyBag
      +
      Parameters:
      +
      pubKeyHash - hash of the keypair to look for
      +
      scriptType - only look for given usage (currently ScriptType.P2PKH or + ScriptType.P2WPKH) or null if we don't care
      +
      Returns:
      +
      found key or null if no such key was found.
      +
      +
      +
    • +
    • +
      +

      findKeyFromPubKey

      +
      @Nullable +public ECKey findKeyFromPubKey(byte[] pubKey)
      +
      Description copied from interface: KeyBag
      +
      Locates a keypair from the keychain given the raw public key bytes.
      +
      +
      Specified by:
      +
      findKeyFromPubKey in interface KeyBag
      +
      Returns:
      +
      ECKey or null if no such key was found.
      +
      +
      +
    • +
    • +
      +

      findRedeemDataFromScriptHash

      +
      @Nullable +public RedeemData findRedeemDataFromScriptHash(byte[] scriptHash)
      +
      Description copied from interface: KeyBag
      +
      Locates a redeem data (redeem script and keys) from the keychain given the hash of the script. + This is needed when finding out which key and script we need to use to locally sign a P2SH transaction input. + It is assumed that wallet should not have more than one private key for a single P2SH tx for security reasons. + + Returns RedeemData object or null if no such data was found.
      +
      +
      Specified by:
      +
      findRedeemDataFromScriptHash in interface KeyBag
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultCoinSelector.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultCoinSelector.html new file mode 100644 index 000000000..674be5ad0 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultCoinSelector.html @@ -0,0 +1,249 @@ + + + + +DefaultCoinSelector (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DefaultCoinSelector

+
+
java.lang.Object +
org.bitcoinj.wallet.DefaultCoinSelector
+
+
+
+
All Implemented Interfaces:
+
CoinSelector
+
+
+
Direct Known Subclasses:
+
AllowUnconfirmedCoinSelector
+
+
+
public class DefaultCoinSelector +extends Object +implements CoinSelector
+
This class implements a CoinSelector which attempts to get the highest priority + possible. This means that the transaction is the most likely to get confirmed. Note that this means we may end up + "spending" more priority than would be required to get the transaction we are creating confirmed.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DefaultCoinSelector

      +
      protected DefaultCoinSelector()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      select

      +
      public CoinSelection select(Coin target, + List<TransactionOutput> candidates)
      +
      Description copied from interface: CoinSelector
      +
      Creates a CoinSelection that tries to meet the target amount of value. The candidates list is given to + this call and can be edited freely. See the docs for CoinSelection to learn more, or look a the implementation + of DefaultCoinSelector.
      +
      +
      Specified by:
      +
      select in interface CoinSelector
      +
      +
      +
    • +
    • +
      +

      compareByDepth

      +
      public static int compareByDepth(TransactionOutput a, + TransactionOutput b)
      +
      Comparator for sorting TransactionOutput by coin depth, value, and then hash.
      +
      +
      Parameters:
      +
      a - The first object to be compared
      +
      b - The second object to be compared
      +
      Returns:
      +
      a negative integer, zero, or a positive integer as the first argument is + less than, equal to, or greater than the second.
      +
      +
      +
    • +
    • +
      +

      shouldSelect

      +
      protected boolean shouldSelect(Transaction tx)
      +
      Sub-classes can override this to just customize whether transactions are usable, but keep age sorting.
      +
      +
    • +
    • +
      +

      isSelectable

      +
      public static boolean isSelectable(Transaction tx, + Network network)
      +
      Helper to determine if this selector would select a given transaction. Note that in a regtest network outgoing + payments will likely not see propagation, so there is a special exception.
      +
      +
      Parameters:
      +
      tx - transaction to determine if it would be selected
      +
      network - network the transaction is on
      +
      Returns:
      +
      true if it would be selected, false otherwise
      +
      +
      +
    • +
    • +
      +

      get

      +
      public static CoinSelector get(Network network)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultKeyChainFactory.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultKeyChainFactory.html new file mode 100644 index 000000000..fa41110dc --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultKeyChainFactory.html @@ -0,0 +1,240 @@ + + + + +DefaultKeyChainFactory (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DefaultKeyChainFactory

+
+
java.lang.Object +
org.bitcoinj.wallet.DefaultKeyChainFactory
+
+
+
+
All Implemented Interfaces:
+
KeyChainFactory
+
+
+
public class DefaultKeyChainFactory +extends Object +implements KeyChainFactory
+
Default factory for creating keychains while de-serializing.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultRiskAnalysis.Analyzer.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultRiskAnalysis.Analyzer.html new file mode 100644 index 000000000..c7cf7bf4c --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultRiskAnalysis.Analyzer.html @@ -0,0 +1,175 @@ + + + + +DefaultRiskAnalysis.Analyzer (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DefaultRiskAnalysis.Analyzer

+
+
java.lang.Object +
org.bitcoinj.wallet.DefaultRiskAnalysis.Analyzer
+
+
+
+
All Implemented Interfaces:
+
RiskAnalysis.Analyzer
+
+
+
Enclosing class:
+
DefaultRiskAnalysis
+
+
+
public static class DefaultRiskAnalysis.Analyzer +extends Object +implements RiskAnalysis.Analyzer
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultRiskAnalysis.RuleViolation.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultRiskAnalysis.RuleViolation.html new file mode 100644 index 000000000..3560d967a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultRiskAnalysis.RuleViolation.html @@ -0,0 +1,255 @@ + + + + +DefaultRiskAnalysis.RuleViolation (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class DefaultRiskAnalysis.RuleViolation

+
+
java.lang.Object +
java.lang.Enum<DefaultRiskAnalysis.RuleViolation> +
org.bitcoinj.wallet.DefaultRiskAnalysis.RuleViolation
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<DefaultRiskAnalysis.RuleViolation>, Constable
+
+
+
Enclosing class:
+
DefaultRiskAnalysis
+
+
+
public static enum DefaultRiskAnalysis.RuleViolation +extends Enum<DefaultRiskAnalysis.RuleViolation>
+
The reason a transaction is considered non-standard, returned by + DefaultRiskAnalysis.isStandard(Transaction).
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultRiskAnalysis.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultRiskAnalysis.html new file mode 100644 index 000000000..34ea031f1 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/DefaultRiskAnalysis.html @@ -0,0 +1,321 @@ + + + + +DefaultRiskAnalysis (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DefaultRiskAnalysis

+
+
java.lang.Object +
org.bitcoinj.wallet.DefaultRiskAnalysis
+
+
+
+
All Implemented Interfaces:
+
RiskAnalysis
+
+
+
public class DefaultRiskAnalysis +extends Object +implements RiskAnalysis
+

The default risk analysis. Currently, it only is concerned with whether a tx/dependency is non-final or not, and + whether a tx/dependency violates the dust rules. Outside of specialised protocols you should not encounter non-final + transactions.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      analyze

      +
      public RiskAnalysis.Result analyze()
      +
      +
      Specified by:
      +
      analyze in interface RiskAnalysis
      +
      +
      +
    • +
    • +
      +

      isStandard

      +
      public static DefaultRiskAnalysis.RuleViolation isStandard(Transaction tx)
      +

      Checks if a transaction is considered "standard" by Bitcoin Core's IsStandardTx and AreInputsStandard + functions.

      + +

      Note that this method currently only implements a minimum of checks. More to be added later.

      +
      +
    • +
    • +
      +

      isOutputStandard

      +
      public static DefaultRiskAnalysis.RuleViolation isOutputStandard(TransactionOutput output)
      +
      Checks the output to see if the script violates a standardness rule. Not complete.
      +
      +
    • +
    • +
      +

      isInputStandard

      +
      public static DefaultRiskAnalysis.RuleViolation isInputStandard(TransactionInput input)
      +
      Checks if the given input passes some of the AreInputsStandard checks. Not complete.
      +
      +
    • +
    • +
      +

      getNonStandard

      +
      @Nullable +public Transaction getNonStandard()
      +
      Returns the transaction that was found to be non-standard, or null.
      +
      +
    • +
    • +
      +

      getNonFinal

      +
      @Nullable +public Transaction getNonFinal()
      +
      Returns the transaction that was found to be non-final, or null.
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicKeyChain.Builder.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicKeyChain.Builder.html new file mode 100644 index 000000000..8bb481cb2 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicKeyChain.Builder.html @@ -0,0 +1,444 @@ + + + + +DeterministicKeyChain.Builder (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DeterministicKeyChain.Builder<T extends DeterministicKeyChain.Builder<T>>

+
+
java.lang.Object +
org.bitcoinj.wallet.DeterministicKeyChain.Builder<T>
+
+
+
+
Enclosing class:
+
DeterministicKeyChain
+
+
+
public static class DeterministicKeyChain.Builder<T extends DeterministicKeyChain.Builder<T>> +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      random

      +
      protected SecureRandom random
      +
      +
    • +
    • +
      +

      bits

      +
      protected int bits
      +
      +
    • +
    • +
      +

      passphrase

      +
      protected String passphrase
      +
      +
    • +
    • +
      +

      creationTime

      +
      @Nullable +protected Instant creationTime
      +
      +
    • +
    • +
      +

      entropy

      +
      protected byte[] entropy
      +
      +
    • +
    • +
      +

      seed

      +
      protected DeterministicSeed seed
      +
      +
    • +
    • +
      +

      outputScriptType

      +
      protected ScriptType outputScriptType
      +
      +
    • +
    • +
      +

      watchingKey

      +
      protected DeterministicKey watchingKey
      +
      +
    • +
    • +
      +

      spendingKey

      +
      protected DeterministicKey spendingKey
      +
      +
    • +
    • +
      +

      accountPath

      +
      protected HDPath accountPath
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Builder

      +
      protected Builder()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      self

      +
      protected T self()
      +
      +
    • +
    • +
      +

      entropy

      +
      public T entropy(byte[] entropy, + Instant creationTime)
      +
      Creates a deterministic key chain starting from the given entropy. All keys yielded by this chain will be the same + if the starting entropy is the same. You should provide the creation time for the + chain: this lets us know from what part of the chain we can expect to see derived keys appear.
      +
      +
      Parameters:
      +
      entropy - entropy to create the chain with
      +
      creationTime - creation time for the chain
      +
      +
      +
    • +
    • +
      +

      entropy

      +
      @Deprecated +public T entropy(byte[] entropy, + long creationTimeSecs)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      seed

      +
      public T seed(DeterministicSeed seed)
      +
      Creates a deterministic key chain starting from the given seed. All keys yielded by this chain will be the same + if the starting seed is the same.
      +
      +
    • +
    • +
      +

      random

      +
      public T random(SecureRandom random, + int bits)
      +
      Generates a new key chain with entropy selected randomly from the given SecureRandom + object and of the requested size in bits. The derived seed is further protected with a user selected passphrase + (see BIP 39).
      +
      +
      Parameters:
      +
      random - the random number generator - use new SecureRandom().
      +
      bits - The number of bits of entropy to use when generating entropy. Either 128 (default), 192 or 256.
      +
      +
      +
    • +
    • +
      +

      random

      +
      public T random(SecureRandom random)
      +
      Generates a new key chain with 128 bits of entropy selected randomly from the given SecureRandom + object. The derived seed is further protected with a user selected passphrase + (see BIP 39).
      +
      +
      Parameters:
      +
      random - the random number generator - use new SecureRandom().
      +
      +
      +
    • +
    • +
      +

      watch

      +
      public T watch(DeterministicKey accountKey)
      +
      Creates a key chain that watches the given account key.
      +
      +
    • +
    • +
      +

      spend

      +
      public T spend(DeterministicKey accountKey)
      +
      Creates a key chain that can spend from the given account key.
      +
      +
    • +
    • +
      +

      outputScriptType

      +
      public T outputScriptType(ScriptType outputScriptType)
      +
      +
    • +
    • +
      +

      passphrase

      +
      public T passphrase(String passphrase)
      +
      The passphrase to use with the generated mnemonic, or null if you would like to use the default empty string. Currently must be the empty string.
      +
      +
    • +
    • +
      +

      accountPath

      +
      public T accountPath(List<ChildNumber> accountPath)
      +
      Use an account path other than the default DeterministicKeyChain.ACCOUNT_ZERO_PATH.
      +
      +
    • +
    • +
      +

      build

      +
      public DeterministicKeyChain build()
      +
      +
    • +
    • +
      +

      getPassphrase

      +
      protected String getPassphrase()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicKeyChain.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicKeyChain.html new file mode 100644 index 000000000..c62059697 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicKeyChain.html @@ -0,0 +1,1303 @@ + + + + +DeterministicKeyChain (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DeterministicKeyChain

+
+
java.lang.Object +
org.bitcoinj.wallet.DeterministicKeyChain
+
+
+
+
All Implemented Interfaces:
+
EncryptableKeyChain, KeyChain
+
+
+
public class DeterministicKeyChain +extends Object +implements EncryptableKeyChain
+

A deterministic key chain is a KeyChain that uses the + BIP 32 standard, as implemented by + DeterministicHierarchy, to derive all the keys in the keychain from a master seed. + This type of wallet is extremely convenient and flexible. Although backing up full wallet files is always a good + idea, to recover money only the root seed needs to be preserved and that is a number small enough that it can be + written down on paper or, when represented using a BIP 39 MnemonicCode, + dictated over the phone (possibly even memorized).

+ +

Deterministic key chains have other advantages: parts of the key tree can be selectively revealed to allow + for auditing, and new public keys can be generated without access to the private keys, yielding a highly secure + configuration for web servers which can accept payments into a wallet but not spend from them. This does not work + quite how you would expect due to a quirk of elliptic curve mathematics and the techniques used to deal with it. + A watching wallet is not instantiated using the public part of the master key as you may imagine. Instead, you + need to take the account key (first child of the master key) and provide the public part of that to the watching + wallet instead. You can do this by calling getWatchingKey() and then serializing it with + DeterministicKey.serializePubB58(Network). The resulting "xpub..." string encodes + sufficient information about the account key to create a watching chain via + DeterministicKey.deserializeB58(DeterministicKey, String, Network) + (with null as the first parameter) and then + DeterministicKeyChain.Builder.watch(DeterministicKey).

+ +

This class builds on DeterministicHierarchy and + DeterministicKey by adding support for serialization to and from protobufs, + and encryption of parts of the key tree. Internally it arranges itself as per the BIP 32 spec, with the seed being + used to derive a master key, which is then used to derive an account key, the account key is used to derive two + child keys called the internal and external parent keys (for change and handing out addresses respectively) + and finally the actual leaf keys that users use hanging off the end. The leaf keys are special in that they don't + internally store the private part at all, instead choosing to rederive the private key from the parent when + needed for signing. This simplifies the design for encrypted key chains.

+ +

The key chain manages a lookahead zone. This zone is required because when scanning the chain, you don't + know exactly which keys might receive payments. The user may have handed out several addresses and received payments + on them, but for latency reasons the block chain is requested from remote peers in bulk, meaning you must + "look ahead" when calculating keys to put in the Bloom filter. The default lookahead zone is 100 keys, meaning if + the user hands out more than 100 addresses and receives payment on them before the chain is next scanned, some + transactions might be missed. 100 is a reasonable choice for consumer wallets running on CPU constrained devices. + For industrial wallets that are receiving keys all the time, a higher value is more appropriate. Ideally DKC and the + wallet would know how to adjust this value automatically, but that's not implemented at the moment.

+ +

In fact the real size of the lookahead zone is larger than requested, by default, it's one third larger. This + is because the act of deriving new keys means recalculating the Bloom filters and this is an expensive operation. + Thus, to ensure we don't have to recalculate on every single new key/address requested or seen we add more buffer + space and only extend the lookahead zone when that buffer is exhausted. For example with a lookahead zone of 100 + keys, you can request 33 keys before more keys will be calculated and the Bloom filter rebuilt and rebroadcast. + But even when you are requesting the 33rd key, you will still be looking 100 keys ahead. +

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      lock

      +
      protected final ReentrantLock lock
      +
      +
    • +
    • +
      +

      DEFAULT_PASSPHRASE_FOR_MNEMONIC

      +
      public static final String DEFAULT_PASSPHRASE_FOR_MNEMONIC
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      ACCOUNT_ZERO_PATH

      +
      public static final HDPath ACCOUNT_ZERO_PATH
      +
      +
    • +
    • +
      +

      ACCOUNT_ONE_PATH

      +
      public static final HDPath ACCOUNT_ONE_PATH
      +
      +
    • +
    • +
      +

      BIP44_ACCOUNT_ZERO_PATH

      +
      public static final HDPath BIP44_ACCOUNT_ZERO_PATH
      +
      +
    • +
    • +
      +

      EXTERNAL_SUBPATH

      +
      public static final HDPath EXTERNAL_SUBPATH
      +
      +
    • +
    • +
      +

      INTERNAL_SUBPATH

      +
      public static final HDPath INTERNAL_SUBPATH
      +
      +
    • +
    • +
      +

      lookaheadSize

      +
      protected int lookaheadSize
      +
      +
    • +
    • +
      +

      lookaheadThreshold

      +
      protected int lookaheadThreshold
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DeterministicKeyChain

      +
      public DeterministicKeyChain(DeterministicKey key, + boolean isFollowing, + boolean isWatching, + ScriptType outputScriptType)
      +

      + Creates a deterministic key chain from a watched or spendable account key. If isWatching flag is set, + then creates a deterministic key chain that watches the given (public only) root key. You can use this to + calculate balances and generally follow along, but spending is not possible with such a chain. If it is not set, + then this creates a deterministic key chain that allows spending. If isFollowing flag is set(only allowed + if isWatching is set) then this keychain follows some other keychain. In a married wallet following + keychain represents "spouse's" keychain. +

      + +

      + This constructor is not stable across releases! If you need a stable API, use builder() to use a + DeterministicKeyChain.Builder. +

      +
      +
    • +
    • +
      +

      DeterministicKeyChain

      +
      protected DeterministicKeyChain(DeterministicSeed seed, + @Nullable + KeyCrypter crypter, + ScriptType outputScriptType, + List<ChildNumber> accountPath)
      +

      + Creates a deterministic key chain with an encrypted deterministic seed using the provided account path. Using + KeyCrypter to decrypt. +

      + +

      + This constructor is not stable across releases! If you need a stable API, use builder() to use a + DeterministicKeyChain.Builder. +

      +
      +
    • +
    • +
      +

      DeterministicKeyChain

      +
      protected DeterministicKeyChain(KeyCrypter crypter, + AesKey aesKey, + DeterministicKeyChain chain)
      +
      For use in encryption when toEncrypted(KeyCrypter, AesKey) is called, so that + subclasses can override that method and create an instance of the right class. + + See also makeKeyChainFromSeed(DeterministicSeed, List, ScriptType)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      builder

      +
      public static DeterministicKeyChain.Builder<?> builder()
      +
      +
    • +
    • +
      +

      getAccountPath

      +
      public HDPath getAccountPath()
      +
      +
    • +
    • +
      +

      getOutputScriptType

      +
      public ScriptType getOutputScriptType()
      +
      +
    • +
    • +
      +

      getKey

      +
      public DeterministicKey getKey(KeyChain.KeyPurpose purpose)
      +
      Returns a freshly derived key that has not been returned by this method before.
      +
      +
      Specified by:
      +
      getKey in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      getKeys

      +
      public List<DeterministicKey> getKeys(KeyChain.KeyPurpose purpose, + int numberOfKeys)
      +
      Returns freshly derived key/s that have not been returned by this method before.
      +
      +
      Specified by:
      +
      getKeys in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      markKeyAsUsed

      +
      public DeterministicKey markKeyAsUsed(DeterministicKey k)
      +
      Mark the DeterministicKey as used. + Also correct the issued{Internal|External}Keys counter, because all lower children seem to be requested already. + If the counter was updated, we also might trigger lookahead.
      +
      +
    • +
    • +
      +

      findKeyFromPubHash

      +
      public DeterministicKey findKeyFromPubHash(byte[] pubkeyHash)
      +
      +
    • +
    • +
      +

      findKeyFromPubKey

      +
      public DeterministicKey findKeyFromPubKey(byte[] pubkey)
      +
      +
    • +
    • +
      +

      markPubHashAsUsed

      +
      @Nullable +public DeterministicKey markPubHashAsUsed(byte[] pubkeyHash)
      +
      Mark the DeterministicKeys as used, if they match the pubkeyHash + See markKeyAsUsed(DeterministicKey) for more info on this.
      +
      +
    • +
    • +
      +

      markPubKeyAsUsed

      +
      @Nullable +public DeterministicKey markPubKeyAsUsed(byte[] pubkey)
      +
      Mark the DeterministicKeys as used, if they match the pubkey + See markKeyAsUsed(DeterministicKey) for more info on this.
      +
      +
    • +
    • +
      +

      hasKey

      +
      public boolean hasKey(ECKey key)
      +
      Description copied from interface: KeyChain
      +
      Returns true if the given key is in the chain.
      +
      +
      Specified by:
      +
      hasKey in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      getKeyByPath

      +
      protected DeterministicKey getKeyByPath(ChildNumber... path)
      +
      Returns the deterministic key for the given absolute path in the hierarchy.
      +
      +
    • +
    • +
      +

      getKeyByPath

      +
      protected DeterministicKey getKeyByPath(List<ChildNumber> path)
      +
      Returns the deterministic key for the given absolute path in the hierarchy.
      +
      +
    • +
    • +
      +

      getKeyByPath

      +
      public DeterministicKey getKeyByPath(List<ChildNumber> path, + boolean create)
      +
      Returns the deterministic key for the given absolute path in the hierarchy, optionally creating it
      +
      +
    • +
    • +
      +

      getRootKey

      +
      @Nullable +public DeterministicKey getRootKey()
      +
      +
    • +
    • +
      +

      getWatchingKey

      +
      public DeterministicKey getWatchingKey()
      +

      An alias for getKeyByPath(getAccountPath()).

      + +

      Use this when you would like to create a watching key chain that follows this one, but can't spend money from it. + The returned key can be serialized and then passed into DeterministicKeyChain.Builder.watch(DeterministicKey) + on another system to watch the hierarchy.

      + +

      Note that the returned key is not pubkey only unless this key chain already is: the returned key can still + be used for signing etc if the private key bytes are available.

      +
      +
    • +
    • +
      +

      isWatching

      +
      public boolean isWatching()
      +
      Returns true if this chain is watch only, meaning it has public keys but no private key.
      +
      +
    • +
    • +
      +

      numKeys

      +
      public int numKeys()
      +
      Description copied from interface: KeyChain
      +
      Returns the number of keys this key chain manages.
      +
      +
      Specified by:
      +
      numKeys in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      numLeafKeysIssued

      +
      public int numLeafKeysIssued()
      +
      Returns number of leaf keys used including both internal and external paths. This may be fewer than the number + that have been deserialized or held in memory, because of the lookahead zone.
      +
      +
    • +
    • +
      +

      earliestKeyCreationTime

      +
      public Instant earliestKeyCreationTime()
      +
      Description copied from interface: KeyChain
      +
      Returns the earliest creation time of keys in this chain.
      +
      +
      Specified by:
      +
      earliestKeyCreationTime in interface KeyChain
      +
      Returns:
      +
      earliest creation times of keys in this chain, + Instant.EPOCH if at least one time is unknown, + Instant.MAX if no keys in this chain
      +
      +
      +
    • +
    • +
      +

      addEventListener

      +
      public void addEventListener(KeyChainEventListener listener)
      +
      Description copied from interface: KeyChain
      +
      Adds a listener for events that are run when keys are added, on the user thread.
      +
      +
      Specified by:
      +
      addEventListener in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      addEventListener

      +
      public void addEventListener(KeyChainEventListener listener, + Executor executor)
      +
      Description copied from interface: KeyChain
      +
      Adds a listener for events that are run when keys are added, on the given executor.
      +
      +
      Specified by:
      +
      addEventListener in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      removeEventListener

      +
      public boolean removeEventListener(KeyChainEventListener listener)
      +
      Description copied from interface: KeyChain
      +
      Removes a listener for events that are run when keys are added.
      +
      +
      Specified by:
      +
      removeEventListener in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      getMnemonicCode

      +
      @Nullable +public List<String> getMnemonicCode()
      +
      Returns a list of words that represent the seed or null if this chain is a watching chain.
      +
      +
    • +
    • +
      +

      isFollowing

      +
      public boolean isFollowing()
      +
      Return true if this keychain is following another keychain
      +
      +
    • +
    • +
      +

      serializeToProtobuf

      +
      public List<org.bitcoinj.protobuf.wallet.Protos.Key> serializeToProtobuf()
      +
      Serialize to a list of keys
      +
      +
      Specified by:
      +
      serializeToProtobuf in interface KeyChain
      +
      Returns:
      +
      A list of keys (treat as unmodifiable list, will change in future release)
      +
      +
      +
    • +
    • +
      +

      serializeMyselfToProtobuf

      +
      protected List<org.bitcoinj.protobuf.wallet.Protos.Key> serializeMyselfToProtobuf()
      +
      Serialize to a list of keys. Does not use lock, expects caller to provide locking.
      +
      +
      Returns:
      +
      A list of keys (treat as unmodifiable list, will change in future release)
      +
      +
      +
    • +
    • +
      +

      fromProtobuf

      +
      public static List<DeterministicKeyChain> fromProtobuf(List<org.bitcoinj.protobuf.wallet.Protos.Key> keys, + @Nullable + KeyCrypter crypter, + KeyChainFactory factory) + throws UnreadableWalletException
      +
      Returns all the key chains found in the given list of keys. Typically there will only be one, but in the case of + key rotation it can happen that there are multiple chains found.
      +
      +
      Throws:
      +
      UnreadableWalletException
      +
      +
      +
    • +
    • +
      +

      toEncrypted

      +
      public DeterministicKeyChain toEncrypted(CharSequence password)
      +
      Description copied from interface: EncryptableKeyChain
      +
      Takes the given password, which should be strong, derives a key from it and then invokes + EncryptableKeyChain.toEncrypted(KeyCrypter, AesKey) with + KeyCrypterScrypt as the crypter.
      +
      +
      Specified by:
      +
      toEncrypted in interface EncryptableKeyChain
      +
      Returns:
      +
      The derived key, in case you wish to cache it for future use.
      +
      +
      +
    • +
    • +
      +

      toEncrypted

      +
      public DeterministicKeyChain toEncrypted(KeyCrypter keyCrypter, + AesKey aesKey)
      +
      Description copied from interface: EncryptableKeyChain
      +
      Returns a new keychain holding identical/cloned keys to this chain, but encrypted under the given key. + Old keys and keychains remain valid and so you should ensure you don't accidentally hold references to them.
      +
      +
      Specified by:
      +
      toEncrypted in interface EncryptableKeyChain
      +
      +
      +
    • +
    • +
      +

      toDecrypted

      +
      public DeterministicKeyChain toDecrypted(CharSequence password)
      +
      Description copied from interface: EncryptableKeyChain
      +
      Decrypts the key chain with the given password. See EncryptableKeyChain.toDecrypted(AesKey) + for details.
      +
      +
      Specified by:
      +
      toDecrypted in interface EncryptableKeyChain
      +
      +
      +
    • +
    • +
      +

      toDecrypted

      +
      public DeterministicKeyChain toDecrypted(AesKey aesKey)
      +
      Description copied from interface: EncryptableKeyChain
      +
      Decrypt the key chain with the given AES key and whatever KeyCrypter is already set. Note that if you + just want to spend money from an encrypted wallet, don't decrypt the whole thing first. Instead, set the + SendRequest.aesKey field before asking the wallet to build the send.
      +
      +
      Specified by:
      +
      toDecrypted in interface EncryptableKeyChain
      +
      Parameters:
      +
      aesKey - AES key to use (normally created using KeyCrypter#deriveKey and cached as it is time consuming to + create from a password)
      +
      +
      +
    • +
    • +
      +

      makeKeyChainFromSeed

      +
      protected DeterministicKeyChain makeKeyChainFromSeed(DeterministicSeed seed, + List<ChildNumber> accountPath, + ScriptType outputScriptType)
      +
      Factory method to create a key chain from a seed. + Subclasses should override this to create an instance of the subclass instead of a plain DKC. + This is used in encryption/decryption.
      +
      +
    • +
    • +
      +

      checkPassword

      +
      public boolean checkPassword(CharSequence password)
      +
      +
      Specified by:
      +
      checkPassword in interface EncryptableKeyChain
      +
      +
      +
    • +
    • +
      +

      checkAESKey

      +
      public boolean checkAESKey(AesKey aesKey)
      +
      +
      Specified by:
      +
      checkAESKey in interface EncryptableKeyChain
      +
      +
      +
    • +
    • +
      +

      getKeyCrypter

      +
      @Nullable +public KeyCrypter getKeyCrypter()
      +
      Description copied from interface: EncryptableKeyChain
      +
      Returns the key crypter used by this key chain, or null if it's not encrypted.
      +
      +
      Specified by:
      +
      getKeyCrypter in interface EncryptableKeyChain
      +
      +
      +
    • +
    • +
      +

      numBloomFilterEntries

      +
      public int numBloomFilterEntries()
      +
      Description copied from interface: KeyChain
      +
      Returns the number of elements this chain wishes to insert into the Bloom filter. The size passed to + KeyChain.getFilter(int, double, int) should be at least this large.
      +
      +
      Specified by:
      +
      numBloomFilterEntries in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      getFilter

      +
      public BloomFilter getFilter(int size, + double falsePositiveRate, + int tweak)
      +
      Description copied from interface: KeyChain
      +

      Gets a bloom filter that contains all of the public keys from this chain, and which will provide the given + false-positive rate if it has size elements. Keep in mind that you will get 2 elements in the bloom filter for + each key in the key chain, for the public key and the hash of the public key (address form). For this reason + size should be at least 2x the result of KeyChain.numKeys().

      + +

      This is used to generate a BloomFilter which can be BloomFilter.merge(BloomFilter)d with + another. It could also be used if you have a specific target for the filter's size.

      + +

      See the docs for BloomFilter(int, double, int) for a brief + explanation of anonymity when using bloom filters, and for the meaning of these parameters.

      +
      +
      Specified by:
      +
      getFilter in interface KeyChain
      +
      +
      +
    • +
    • +
      +

      getLookaheadSize

      +
      public int getLookaheadSize()
      +

      The number of public keys we should pre-generate on each path before they are requested by the app. This is + required so that when scanning through the chain given only a seed, we can give enough keys to the remote node + via the Bloom filter such that we see transactions that are "from the future", for example transactions created + by a different app that's sharing the same seed, or transactions we made before but we're replaying the chain + given just the seed. The default is 100.

      +
      +
    • +
    • +
      +

      setLookaheadSize

      +
      public void setLookaheadSize(int lookaheadSize)
      +
      Sets a new lookahead size. See getLookaheadSize() for details on what this is. Setting a new size + that's larger than the current size will return immediately and the new size will only take effect next time + a fresh filter is requested (e.g. due to a new peer being connected). So you should set this before starting + to sync the chain, if you want to modify it. If you haven't modified the lookahead threshold manually then + it will be automatically set to be a third of the new size.
      +
      +
    • +
    • +
      +

      setLookaheadThreshold

      +
      public void setLookaheadThreshold(int num)
      +
      Sets the threshold for the key pre-generation. This is used to avoid adding new keys and thus + re-calculating Bloom filters every time a new key is calculated. Without a lookahead threshold, every time we + received a relevant transaction we'd extend the lookahead zone and generate a new filter, which is inefficient.
      +
      +
    • +
    • +
      +

      getLookaheadThreshold

      +
      public int getLookaheadThreshold()
      +
      Gets the threshold for the key pre-generation. See setLookaheadThreshold(int) for details on what this + is. The default is a third of the lookahead size (100 / 3 == 33). If you don't modify it explicitly then this + value will always be one third of the lookahead size.
      +
      +
    • +
    • +
      +

      maybeLookAhead

      +
      public void maybeLookAhead()
      +
      Pre-generate enough keys to reach the lookahead size. You can call this if you need to explicitly invoke + the lookahead procedure, but it's normally unnecessary as it will be done automatically when needed.
      +
      +
    • +
    • +
      +

      maybeLookAheadScripts

      +
      public void maybeLookAheadScripts()
      +
      Housekeeping call to call when lookahead might be needed. Normally called automatically by KeychainGroup.
      +
      +
    • +
    • +
      +

      getIssuedExternalKeys

      +
      public int getIssuedExternalKeys()
      +
      Returns number of keys used on external path. This may be fewer than the number that have been deserialized + or held in memory, because of the lookahead zone.
      +
      +
    • +
    • +
      +

      getIssuedInternalKeys

      +
      public int getIssuedInternalKeys()
      +
      Returns number of keys used on internal path. This may be fewer than the number that have been deserialized + or held in memory, because of the lookahead zone.
      +
      +
    • +
    • +
      +

      getSeed

      +
      @Nullable +public DeterministicSeed getSeed()
      +
      Returns the seed or null if this chain is a watching chain.
      +
      +
    • +
    • +
      +

      getIssuedReceiveKeys

      +
      public List<DeterministicKey> getIssuedReceiveKeys()
      +
      Returns only the external keys that have been issued by this chain, lookahead not included.
      +
      +
      Returns:
      +
      Unmodifiable list of keys
      +
      +
      +
    • +
    • +
      +

      getLeafKeys

      +
      public List<DeterministicKey> getLeafKeys()
      +
      Returns leaf keys issued by this chain (including lookahead zone)
      +
      +
      Returns:
      +
      Unmodifiable list of keys
      +
      +
      +
    • +
    • +
      +

      getKeyLookaheadEpoch

      +
      public int getKeyLookaheadEpoch()
      +
      Returns a counter that is incremented each time new keys are generated due to lookahead. Used by the network + code to learn whether to discard the current block and await calculation of a new filter.
      +
      +
    • +
    • +
      +

      getRedeemData

      +
      public RedeemData getRedeemData(DeterministicKey followedKey)
      +
      Get redeem data for a key. Only applicable to married keychains.
      +
      +
    • +
    • +
      +

      freshOutputScript

      +
      public Script freshOutputScript(KeyChain.KeyPurpose purpose)
      +
      Create a new key and return the matching output script. Only applicable to married keychains.
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString(boolean includeLookahead, + boolean includePrivateKeys, + @Nullable + AesKey aesKey, + Network network)
      +
      +
    • +
    • +
      +

      toString

      +
      @Deprecated +public String toString(boolean includeLookahead, + boolean includePrivateKeys, + @Nullable + AesKey aesKey, + NetworkParameters params)
      + +
      +
    • +
    • +
      +

      formatAddresses

      +
      protected void formatAddresses(boolean includeLookahead, + boolean includePrivateKeys, + @Nullable + AesKey aesKey, + Network network, + StringBuilder builder)
      +
      +
    • +
    • +
      +

      setSigsRequiredToSpend

      +
      public void setSigsRequiredToSpend(int sigsRequiredToSpend)
      +
      The number of signatures required to spend coins received by this keychain.
      +
      +
    • +
    • +
      +

      getSigsRequiredToSpend

      +
      public int getSigsRequiredToSpend()
      +
      Returns the number of signatures required to spend transactions for this KeyChain. It's the N from + N-of-M CHECKMULTISIG script for P2SH transactions and always 1 for other transaction types.
      +
      +
    • +
    • +
      +

      findRedeemDataByScriptHash

      +
      @Nullable +public RedeemData findRedeemDataByScriptHash(com.google.protobuf.ByteString bytes)
      +
      Returns the redeem script by its hash or null if this keychain did not generate the script.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicSeed.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicSeed.html new file mode 100644 index 000000000..ec2b0b14a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicSeed.html @@ -0,0 +1,746 @@ + + + + +DeterministicSeed (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DeterministicSeed

+
+
java.lang.Object +
org.bitcoinj.wallet.DeterministicSeed
+
+
+
+
All Implemented Interfaces:
+
EncryptableItem
+
+
+
public class DeterministicSeed +extends Object +implements EncryptableItem
+
Holds the seed bytes for the BIP32 deterministic wallet algorithm, inside a + DeterministicKeyChain. The purpose of this wrapper is to simplify the encryption + code.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      DEFAULT_SEED_ENTROPY_BITS

      +
      public static final int DEFAULT_SEED_ENTROPY_BITS
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      MAX_SEED_ENTROPY_BITS

      +
      public static final int MAX_SEED_ENTROPY_BITS
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      ofMnemonic

      +
      public static DeterministicSeed ofMnemonic(String mnemonicCode, + String passphrase, + Instant creationTime)
      +
      Constructs a seed from a BIP 39 mnemonic code. See MnemonicCode for more + details on this scheme.
      +
      +
      Parameters:
      +
      mnemonicCode - list of words, space separated
      +
      passphrase - user supplied passphrase, or empty string if there is no passphrase
      +
      creationTime - when the seed was originally created
      +
      +
      +
    • +
    • +
      +

      ofMnemonic

      +
      public static DeterministicSeed ofMnemonic(String mnemonicCode, + String passphrase)
      +
      Constructs a seed from a BIP 39 mnemonic code. See MnemonicCode for more + details on this scheme. Use this if you don't know the seed's creation time.
      +
      +
      Parameters:
      +
      mnemonicCode - list of words, space separated
      +
      passphrase - user supplied passphrase, or empty string if there is no passphrase
      +
      +
      +
    • +
    • +
      +

      ofMnemonic

      +
      public static DeterministicSeed ofMnemonic(List<String> mnemonicCode, + String passphrase, + Instant creationTime)
      +
      Constructs a seed from a BIP 39 mnemonic code. See MnemonicCode for more + details on this scheme.
      +
      +
      Parameters:
      +
      mnemonicCode - list of words
      +
      passphrase - user supplied passphrase, or empty string if there is no passphrase
      +
      creationTime - when the seed was originally created
      +
      +
      +
    • +
    • +
      +

      ofMnemonic

      +
      public static DeterministicSeed ofMnemonic(List<String> mnemonicCode, + String passphrase)
      +
      Constructs a seed from a BIP 39 mnemonic code. See MnemonicCode for more + details on this scheme. Use this if you don't know the seed's creation time.
      +
      +
      Parameters:
      +
      mnemonicCode - list of words
      +
      passphrase - user supplied passphrase, or empty string if there is no passphrase
      +
      +
      +
    • +
    • +
      +

      ofEntropy

      +
      public static DeterministicSeed ofEntropy(byte[] entropy, + String passphrase, + Instant creationTime)
      +
      Constructs a BIP 39 mnemonic code and a seed from a given entropy. See MnemonicCode for more + details on this scheme.
      +
      +
      Parameters:
      +
      entropy - entropy bits, length must be at least 128 bits and a multiple of 32 bits
      +
      passphrase - user supplied passphrase, or empty string if there is no passphrase
      +
      creationTime - when the seed was originally created
      +
      +
      +
    • +
    • +
      +

      ofEntropy

      +
      public static DeterministicSeed ofEntropy(byte[] entropy, + String passphrase)
      +
      Constructs a BIP 39 mnemonic code and a seed from a given entropy. See MnemonicCode for more + details on this scheme. Use this if you don't know the seed's creation time.
      +
      +
      Parameters:
      +
      entropy - entropy bits, length must be at least 128 bits and a multiple of 32 bits
      +
      passphrase - user supplied passphrase, or empty string if there is no passphrase
      +
      +
      +
    • +
    • +
      +

      ofRandom

      +
      public static DeterministicSeed ofRandom(SecureRandom random, + int bits, + String passphrase)
      +
      Constructs a BIP 39 mnemonic code and a seed randomly. See MnemonicCode for more + details on this scheme.
      +
      +
      Parameters:
      +
      random - random source for the entropy
      +
      bits - number of bits of entropy, must be at least 128 bits and a multiple of 32 bits
      +
      passphrase - user supplied passphrase, or empty string if there is no passphrase
      +
      +
      +
    • +
    • +
      +

      isEncrypted

      +
      public boolean isEncrypted()
      +
      Description copied from interface: EncryptableItem
      +
      Returns whether the item is encrypted or not. If it is, then EncryptableItem.getSecretBytes() will return null.
      +
      +
      Specified by:
      +
      isEncrypted in interface EncryptableItem
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString(boolean includePrivate)
      +
      +
    • +
    • +
      +

      toHexString

      +
      @Nullable +public String toHexString()
      +
      Returns the seed as hex or null if encrypted.
      +
      +
    • +
    • +
      +

      getSecretBytes

      +
      @Nullable +public byte[] getSecretBytes()
      +
      Description copied from interface: EncryptableItem
      +
      Returns the raw bytes of the item, if not encrypted, or null if encrypted or the secret is missing.
      +
      +
      Specified by:
      +
      getSecretBytes in interface EncryptableItem
      +
      +
      +
    • +
    • +
      +

      getSeedBytes

      +
      @Nullable +public byte[] getSeedBytes()
      +
      +
    • +
    • +
      +

      getEncryptedData

      +
      @Nullable +public EncryptedData getEncryptedData()
      +
      Description copied from interface: EncryptableItem
      +
      Returns the initialization vector and encrypted secret bytes, or null if not encrypted.
      +
      +
      Specified by:
      +
      getEncryptedData in interface EncryptableItem
      +
      +
      +
    • +
    • +
      +

      getEncryptionType

      +
      public org.bitcoinj.protobuf.wallet.Protos.Wallet.EncryptionType getEncryptionType()
      +
      Description copied from interface: EncryptableItem
      +
      Returns an enum constant describing what algorithm was used to encrypt the key or UNENCRYPTED.
      +
      +
      Specified by:
      +
      getEncryptionType in interface EncryptableItem
      +
      +
      +
    • +
    • +
      +

      getEncryptedSeedData

      +
      @Nullable +public EncryptedData getEncryptedSeedData()
      +
      +
    • +
    • +
      +

      getCreationTime

      +
      public Optional<Instant> getCreationTime()
      +
      Description copied from interface: EncryptableItem
      +
      Returns the time at which this encryptable item was first created/derived, or empty of unknown.
      +
      +
      Specified by:
      +
      getCreationTime in interface EncryptableItem
      +
      +
      +
    • +
    • +
      +

      setCreationTime

      +
      public void setCreationTime(Instant creationTime)
      +
      Sets the creation time of this seed.
      +
      +
      Parameters:
      +
      creationTime - creation time of this seed
      +
      +
      +
    • +
    • +
      +

      clearCreationTime

      +
      public void clearCreationTime()
      +
      Clears the creation time of this seed. This is mainly used deserialization and cloning. Normally you should not + need to use this, as keys should have proper creation times whenever possible.
      +
      +
    • +
    • +
      +

      setCreationTimeSeconds

      +
      @Deprecated +public void setCreationTimeSeconds(long creationTimeSecs)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      encrypt

      +
      public DeterministicSeed encrypt(KeyCrypter keyCrypter, + AesKey aesKey)
      +
      +
    • +
    • +
      +

      decrypt

      +
      public DeterministicSeed decrypt(KeyCrypter crypter, + String passphrase, + AesKey aesKey)
      +
      +
    • +
    • +
      +

      equals

      +
      public boolean equals(Object o)
      +
      +
      Overrides:
      +
      equals in class Object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public int hashCode()
      +
      +
      Overrides:
      +
      hashCode in class Object
      +
      +
      +
    • +
    • +
      +

      check

      +
      public void check() + throws MnemonicException
      +
      Check if our mnemonic is a valid mnemonic phrase for our word list. + Does nothing if we are encrypted.
      +
      +
      Throws:
      +
      MnemonicException - if check fails
      +
      +
      +
    • +
    • +
      +

      getMnemonicCode

      +
      @Nullable +public List<String> getMnemonicCode()
      +
      Get the mnemonic code, or null if unknown.
      +
      +
    • +
    • +
      +

      getMnemonicString

      +
      @Nullable +public String getMnemonicString()
      +
      Get the mnemonic code as string, or null if unknown.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicUpgradeRequiredException.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicUpgradeRequiredException.html new file mode 100644 index 000000000..c268c85c0 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicUpgradeRequiredException.html @@ -0,0 +1,150 @@ + + + + +DeterministicUpgradeRequiredException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DeterministicUpgradeRequiredException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.wallet.DeterministicUpgradeRequiredException
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class DeterministicUpgradeRequiredException +extends RuntimeException
+
Indicates that an attempt was made to use HD wallet features on a wallet that was deserialized from an old, + pre-HD random wallet without calling upgradeToDeterministic() beforehand.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DeterministicUpgradeRequiredException

      +
      public DeterministicUpgradeRequiredException()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicUpgradeRequiresPassword.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicUpgradeRequiresPassword.html new file mode 100644 index 000000000..74f75dedc --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/DeterministicUpgradeRequiresPassword.html @@ -0,0 +1,151 @@ + + + + +DeterministicUpgradeRequiresPassword (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class DeterministicUpgradeRequiresPassword

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.wallet.DeterministicUpgradeRequiresPassword
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
public class DeterministicUpgradeRequiresPassword +extends RuntimeException
+
Indicates that the pre-HD random wallet is encrypted, so you should try the upgrade again after getting the + users password. This is required because HD wallets are upgraded from random using the private key bytes of + the oldest non-rotating key, in order to make the upgrade process itself deterministic.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DeterministicUpgradeRequiresPassword

      +
      public DeterministicUpgradeRequiresPassword()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/EncryptableKeyChain.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/EncryptableKeyChain.html new file mode 100644 index 000000000..8a37db092 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/EncryptableKeyChain.html @@ -0,0 +1,237 @@ + + + + +EncryptableKeyChain (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface EncryptableKeyChain

+
+
+
+
All Superinterfaces:
+
KeyChain
+
+
+
All Known Implementing Classes:
+
BasicKeyChain, DeterministicKeyChain
+
+
+
public interface EncryptableKeyChain +extends KeyChain
+
An encryptable key chain is a key-chain that can be encrypted with a user-provided password or AES key.
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      toEncrypted

      +
      EncryptableKeyChain toEncrypted(CharSequence password)
      +
      Takes the given password, which should be strong, derives a key from it and then invokes + toEncrypted(KeyCrypter, AesKey) with + KeyCrypterScrypt as the crypter.
      +
      +
      Returns:
      +
      The derived key, in case you wish to cache it for future use.
      +
      +
      +
    • +
    • +
      +

      toEncrypted

      +
      EncryptableKeyChain toEncrypted(KeyCrypter keyCrypter, + AesKey aesKey)
      +
      Returns a new keychain holding identical/cloned keys to this chain, but encrypted under the given key. + Old keys and keychains remain valid and so you should ensure you don't accidentally hold references to them.
      +
      +
    • +
    • +
      +

      toDecrypted

      +
      EncryptableKeyChain toDecrypted(CharSequence password)
      +
      Decrypts the key chain with the given password. See toDecrypted(AesKey) + for details.
      +
      +
    • +
    • +
      +

      toDecrypted

      +
      EncryptableKeyChain toDecrypted(AesKey aesKey)
      +
      Decrypt the key chain with the given AES key and whatever KeyCrypter is already set. Note that if you + just want to spend money from an encrypted wallet, don't decrypt the whole thing first. Instead, set the + SendRequest.aesKey field before asking the wallet to build the send.
      +
      +
      Parameters:
      +
      aesKey - AES key to use (normally created using KeyCrypter#deriveKey and cached as it is time consuming to + create from a password)
      +
      Throws:
      +
      KeyCrypterException - Thrown if the wallet decryption fails. If so, the wallet state is unchanged.
      +
      +
      +
    • +
    • +
      +

      checkPassword

      +
      boolean checkPassword(CharSequence password)
      +
      +
    • +
    • +
      +

      checkAESKey

      +
      boolean checkAESKey(AesKey aesKey)
      +
      +
    • +
    • +
      +

      getKeyCrypter

      +
      @Nullable +KeyCrypter getKeyCrypter()
      +
      Returns the key crypter used by this key chain, or null if it's not encrypted.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/FilteringCoinSelector.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/FilteringCoinSelector.html new file mode 100644 index 000000000..572e992aa --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/FilteringCoinSelector.html @@ -0,0 +1,216 @@ + + + + +FilteringCoinSelector (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class FilteringCoinSelector

+
+
java.lang.Object +
org.bitcoinj.wallet.FilteringCoinSelector
+
+
+
+
All Implemented Interfaces:
+
CoinSelector
+
+
+
public class FilteringCoinSelector +extends Object +implements CoinSelector
+
A filtering coin selector delegates to another coin selector, but won't select outputs spent by the given transactions.
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      select

      +
      public CoinSelection select(Coin target, + List<TransactionOutput> candidates)
      +
      Description copied from interface: CoinSelector
      +
      Creates a CoinSelection that tries to meet the target amount of value. The candidates list is given to + this call and can be edited freely. See the docs for CoinSelection to learn more, or look a the implementation + of DefaultCoinSelector.
      +
      +
      Specified by:
      +
      select in interface CoinSelector
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyBag.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyBag.html new file mode 100644 index 000000000..5cdb611af --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyBag.html @@ -0,0 +1,181 @@ + + + + +KeyBag (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface KeyBag

+
+
+
+
All Known Implementing Classes:
+
DecryptingKeyBag, KeyChainGroup, Wallet
+
+
+
public interface KeyBag
+
A KeyBag is simply an object that can map public keys, their 160-bit hashes and script hashes to ECKey + and RedeemData objects.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + +
    findKeyFromPubKey(byte[] pubKey)
    +
    +
    Locates a keypair from the keychain given the raw public key bytes.
    +
    + +
    findKeyFromPubKeyHash(byte[] pubKeyHash, + ScriptType scriptType)
    +
    +
    Locates a keypair from the keychain given the hash of the public key, and (optionally) by usage for a specific + script type.
    +
    + +
    findRedeemDataFromScriptHash(byte[] scriptHash)
    +
    +
    Locates a redeem data (redeem script and keys) from the keychain given the hash of the script.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      findKeyFromPubKeyHash

      +
      @Nullable +ECKey findKeyFromPubKeyHash(byte[] pubKeyHash, + @Nullable + ScriptType scriptType)
      +
      Locates a keypair from the keychain given the hash of the public key, and (optionally) by usage for a specific + script type. This is needed when finding out which key we need to use to redeem a transaction output.
      +
      +
      Parameters:
      +
      pubKeyHash - hash of the keypair to look for
      +
      scriptType - only look for given usage (currently ScriptType.P2PKH or + ScriptType.P2WPKH) or null if we don't care
      +
      Returns:
      +
      found key or null if no such key was found.
      +
      +
      +
    • +
    • +
      +

      findKeyFromPubKey

      +
      @Nullable +ECKey findKeyFromPubKey(byte[] pubKey)
      +
      Locates a keypair from the keychain given the raw public key bytes.
      +
      +
      Returns:
      +
      ECKey or null if no such key was found.
      +
      +
      +
    • +
    • +
      +

      findRedeemDataFromScriptHash

      +
      @Nullable +RedeemData findRedeemDataFromScriptHash(byte[] scriptHash)
      +
      Locates a redeem data (redeem script and keys) from the keychain given the hash of the script. + This is needed when finding out which key and script we need to use to locally sign a P2SH transaction input. + It is assumed that wallet should not have more than one private key for a single P2SH tx for security reasons. + + Returns RedeemData object or null if no such data was found.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChain.KeyPurpose.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChain.KeyPurpose.html new file mode 100644 index 000000000..2f9a7dd51 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChain.KeyPurpose.html @@ -0,0 +1,237 @@ + + + + +KeyChain.KeyPurpose (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class KeyChain.KeyPurpose

+
+
java.lang.Object +
java.lang.Enum<KeyChain.KeyPurpose> +
org.bitcoinj.wallet.KeyChain.KeyPurpose
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<KeyChain.KeyPurpose>, Constable
+
+
+
Enclosing interface:
+
KeyChain
+
+
+
public static enum KeyChain.KeyPurpose +extends Enum<KeyChain.KeyPurpose>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static KeyChain.KeyPurpose[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static KeyChain.KeyPurpose valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChain.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChain.html new file mode 100644 index 000000000..b9edc209c --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChain.html @@ -0,0 +1,325 @@ + + + + +KeyChain (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface KeyChain

+
+
+
+
All Known Subinterfaces:
+
EncryptableKeyChain
+
+
+
All Known Implementing Classes:
+
BasicKeyChain, DeterministicKeyChain
+
+
+
public interface KeyChain
+

A KeyChain is a class that stores a collection of keys for a Wallet. Key chains + are expected to be able to look up keys given a hash (i.e. address) or pubkey bytes, and provide keys on request + for a given purpose. They can inform event listeners about new keys being added.

+ +

However it is important to understand what this interface does not provide. It cannot encrypt or decrypt + keys, for instance you need an implementor of EncryptableKeyChain. It cannot have keys imported into it, + that you to use a method of a specific key chain instance, such as BasicKeyChain. The reason for these + restrictions is to support key chains that may be handled by external hardware or software, or which are derived + deterministically from a seed (and thus the notion of importing a key is meaningless).

+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      hasKey

      +
      boolean hasKey(ECKey key)
      +
      Returns true if the given key is in the chain.
      +
      +
    • +
    • +
      +

      getKeys

      +
      List<? extends ECKey> getKeys(KeyChain.KeyPurpose purpose, + int numberOfKeys)
      +
      Obtains a number of key/s intended for the given purpose. The chain may create new key/s, derive, or re-use an old one.
      +
      +
    • +
    • +
      +

      getKey

      +
      ECKey getKey(KeyChain.KeyPurpose purpose)
      +
      Obtains a key intended for the given purpose. The chain may create a new key, derive one, or re-use an old one.
      +
      +
    • +
    • +
      +

      serializeToProtobuf

      +
      List<org.bitcoinj.protobuf.wallet.Protos.Key> serializeToProtobuf()
      +
      Return a list of keys serialized to the bitcoinj protobuf format.
      +
      +
      Returns:
      +
      list of keys (treat as unmodifiable list)
      +
      +
      +
    • +
    • +
      +

      addEventListener

      +
      void addEventListener(KeyChainEventListener listener)
      +
      Adds a listener for events that are run when keys are added, on the user thread.
      +
      +
    • +
    • +
      +

      addEventListener

      +
      void addEventListener(KeyChainEventListener listener, + Executor executor)
      +
      Adds a listener for events that are run when keys are added, on the given executor.
      +
      +
    • +
    • +
      +

      removeEventListener

      +
      boolean removeEventListener(KeyChainEventListener listener)
      +
      Removes a listener for events that are run when keys are added.
      +
      +
    • +
    • +
      +

      numKeys

      +
      int numKeys()
      +
      Returns the number of keys this key chain manages.
      +
      +
    • +
    • +
      +

      numBloomFilterEntries

      +
      int numBloomFilterEntries()
      +
      Returns the number of elements this chain wishes to insert into the Bloom filter. The size passed to + getFilter(int, double, int) should be at least this large.
      +
      +
    • +
    • +
      +

      earliestKeyCreationTime

      +
      Instant earliestKeyCreationTime()
      +
      Returns the earliest creation time of keys in this chain.
      +
      +
      Returns:
      +
      earliest creation times of keys in this chain, + Instant.EPOCH if at least one time is unknown, + Instant.MAX if no keys in this chain
      +
      +
      +
    • +
    • +
      +

      getEarliestKeyCreationTime

      +
      @Deprecated +default long getEarliestKeyCreationTime()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      getFilter

      +
      BloomFilter getFilter(int size, + double falsePositiveRate, + int tweak)
      +

      Gets a bloom filter that contains all of the public keys from this chain, and which will provide the given + false-positive rate if it has size elements. Keep in mind that you will get 2 elements in the bloom filter for + each key in the key chain, for the public key and the hash of the public key (address form). For this reason + size should be at least 2x the result of numKeys().

      + +

      This is used to generate a BloomFilter which can be BloomFilter.merge(BloomFilter)d with + another. It could also be used if you have a specific target for the filter's size.

      + +

      See the docs for BloomFilter(int, double, int) for a brief + explanation of anonymity when using bloom filters, and for the meaning of these parameters.

      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChainFactory.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChainFactory.html new file mode 100644 index 000000000..8f1e85d8c --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChainFactory.html @@ -0,0 +1,272 @@ + + + + +KeyChainFactory (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface KeyChainFactory

+
+
+
+
All Known Implementing Classes:
+
DefaultKeyChainFactory
+
+
+
public interface KeyChainFactory
+
Factory interface for creation keychains while de-serializing a wallet.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChainGroup.Builder.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChainGroup.Builder.html new file mode 100644 index 000000000..daca5e0c7 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChainGroup.Builder.html @@ -0,0 +1,269 @@ + + + + +KeyChainGroup.Builder (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class KeyChainGroup.Builder

+
+
java.lang.Object +
org.bitcoinj.wallet.KeyChainGroup.Builder
+
+
+
+
Enclosing class:
+
KeyChainGroup
+
+
+
public static class KeyChainGroup.Builder +extends Object
+
Builder for KeyChainGroup. Use KeyChainGroup.builder(Network) to acquire an instance.
+
+
+ +
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      fromRandom

      +
      public KeyChainGroup.Builder fromRandom(ScriptType outputScriptType)
      +

      Add chain from a random source.

      +

      In the case of P2PKH, just a P2PKH chain is created and activated which is then the default chain for fresh + addresses. It can be upgraded to P2WPKH later.

      +

      In the case of P2WPKH, both a P2PKH and a P2WPKH chain are created and activated, the latter being the default + chain. This behaviour will likely be changed in future such that only a P2WPKH chain is created and + activated.

      +
      +
      Parameters:
      +
      outputScriptType - type of addresses (aka output scripts) to generate for receiving
      +
      +
      +
    • +
    • +
      +

      fromSeed

      +
      public KeyChainGroup.Builder fromSeed(DeterministicSeed seed, + ScriptType outputScriptType)
      +

      Add chain from a given seed.

      +

      In the case of P2PKH, just a P2PKH chain is created and activated which is then the default chain for fresh + addresses. It can be upgraded to P2WPKH later.

      +

      In the case of P2WPKH, both a P2PKH and a P2WPKH chain are created and activated, the latter being the default + chain. This behaviour will likely be changed in future such that only a P2WPKH chain is created and + activated.

      +
      +
      Parameters:
      +
      seed - deterministic seed to derive all keys from
      +
      outputScriptType - type of addresses (aka output scripts) to generate for receiving
      +
      +
      +
    • +
    • +
      +

      fromKey

      +
      public KeyChainGroup.Builder fromKey(DeterministicKey accountKey, + ScriptType outputScriptType)
      +

      Add chain from a given account key.

      +

      In the case of P2PKH, just a P2PKH chain is created and activated which is then the default chain for fresh + addresses. It can be upgraded to P2WPKH later.

      +

      In the case of P2WPKH, both a P2PKH and a P2WPKH chain are created and activated, the latter being the default + chain. This behaviour will likely be changed with bitcoinj 0.16 such that only a P2WPKH chain is created and + activated.

      +
      +
      Parameters:
      +
      accountKey - deterministic account key to derive all keys from
      +
      outputScriptType - type of addresses (aka output scripts) to generate for receiving
      +
      +
      +
    • +
    • +
      +

      addChain

      + +
      Add a single chain.
      +
      +
      Parameters:
      +
      chain - to add
      +
      +
      +
    • +
    • +
      +

      chains

      + +
      Add multiple chains.
      +
      +
      Parameters:
      +
      chains - to add
      +
      +
      +
    • +
    • +
      +

      lookaheadSize

      +
      public KeyChainGroup.Builder lookaheadSize(int lookaheadSize)
      +
      Set a custom lookahead size for all deterministic chains
      +
      +
      Parameters:
      +
      lookaheadSize - lookahead size
      +
      +
      +
    • +
    • +
      +

      lookaheadThreshold

      +
      public KeyChainGroup.Builder lookaheadThreshold(int lookaheadThreshold)
      +
      Set a custom lookahead threshold for all deterministic chains
      +
      +
      Parameters:
      +
      lookaheadThreshold - lookahead threshold
      +
      +
      +
    • +
    • +
      +

      build

      +
      public KeyChainGroup build()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChainGroup.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChainGroup.html new file mode 100644 index 000000000..cb6c1b321 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChainGroup.html @@ -0,0 +1,1240 @@ + + + + +KeyChainGroup (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class KeyChainGroup

+
+
java.lang.Object +
org.bitcoinj.wallet.KeyChainGroup
+
+
+
+
All Implemented Interfaces:
+
KeyBag
+
+
+
public class KeyChainGroup +extends Object +implements KeyBag
+

A KeyChainGroup is used by the Wallet and manages: a BasicKeyChain object + (which will normally be empty), and zero or more DeterministicKeyChains. The last added + deterministic keychain is always the default active keychain, that's the one we normally derive keys and + addresses from.

+ +

There can be active keychains for each output script type. However this class almost entirely only works on + the default active keychain (see getActiveKeyChain()). The other active keychains + (see getActiveKeyChain(ScriptType, long)) are meant as fallback for if a sender doesn't understand a + certain new script type (e.g. P2WPKH which comes with the new Bech32 address format). Active keychains + share the same seed, so that upgrading the wallet + (see upgradeToDeterministic(ScriptType, KeyChainGroupStructure, long, AesKey)) to understand + a new script type doesn't require a fresh backup.

+ +

If a key rotation time is set, it may be necessary to add a new DeterministicKeyChain with a fresh seed + and also preserve the old one, so funds can be swept from the rotating keys. In this case, there may be + more than one deterministic chain. The latest chain is called the active chain and is where new keys are served + from.

+ +

The wallet delegates most key management tasks to this class. It is not thread safe and requires external + locking, i.e. by the wallet lock. The group then in turn delegates most operations to the key chain objects, + combining their responses together when necessary.

+ +

Deterministic key chains have a concept of a lookahead size and threshold. Please see the discussion in the + class docs for DeterministicKeyChain for more information on this topic.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      createBasic

      +
      public static KeyChainGroup createBasic(Network network)
      +
      Creates a keychain group with just a basic chain. No deterministic chains will be created automatically.
      +
      +
    • +
    • +
      +

      createBasic

      +
      @Deprecated +public static KeyChainGroup createBasic(NetworkParameters params)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      builder

      +
      public static KeyChainGroup.Builder builder(Network network)
      +
      +
    • +
    • +
      +

      builder

      +
      @Deprecated +public static KeyChainGroup.Builder builder(NetworkParameters params)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      builder

      +
      public static KeyChainGroup.Builder builder(Network network, + KeyChainGroupStructure structure)
      +
      +
    • +
    • +
      +

      builder

      +
      @Deprecated +public static KeyChainGroup.Builder builder(NetworkParameters params, + KeyChainGroupStructure structure)
      + +
      +
    • +
    • +
      +

      supportsDeterministicChains

      +
      public boolean supportsDeterministicChains()
      +
      Are any deterministic keychains supported?
      +
      +
      Returns:
      +
      true if it contains any deterministic keychain
      +
      +
      +
    • +
    • +
      +

      isSupportsDeterministicChains

      +
      @Deprecated +public boolean isSupportsDeterministicChains()
      + +
      +
      Returns:
      +
      true if it contains any deterministic keychain
      +
      +
      +
    • +
    • +
      +

      addAndActivateHDChain

      +
      public void addAndActivateHDChain(DeterministicKeyChain chain)
      +
      Adds an HD chain to the chains list, and make it the default chain (from which keys are issued). + Useful for adding a complex pre-configured keychain, such as a married wallet.
      +
      +
    • +
    • +
      +

      currentKey

      +
      public DeterministicKey currentKey(KeyChain.KeyPurpose purpose)
      +
      Returns a key that hasn't been seen in a transaction yet, and which is suitable for displaying in a wallet + user interface as "a convenient key to receive funds on" when the purpose parameter is + KeyChain.KeyPurpose.RECEIVE_FUNDS. The returned key is stable until + it's actually seen in a pending or confirmed transaction, at which point this method will start returning + a different key (for each purpose independently).
      +
      +
    • +
    • +
      +

      currentAddress

      +
      public Address currentAddress(KeyChain.KeyPurpose purpose)
      +
      Returns address for a currentKey(KeyChain.KeyPurpose)
      +
      +
    • +
    • +
      +

      freshKey

      +
      public DeterministicKey freshKey(KeyChain.KeyPurpose purpose)
      +
      Returns a key that has not been returned by this method before (fresh). You can think of this as being + a newly created key, although the notion of "create" is not really valid for a + DeterministicKeyChain. When the parameter is + KeyChain.KeyPurpose.RECEIVE_FUNDS the returned key is suitable for being put + into a receive coins wizard type UI. You should use this when the user is definitely going to hand this key out + to someone who wishes to send money. +

      This method is not supposed to be used for married keychains and will throw UnsupportedOperationException if + the active chain is married. + For married keychains use freshAddress(KeyChain.KeyPurpose) + to get a proper P2SH address

      +
      +
    • +
    • +
      +

      freshKeys

      +
      public List<DeterministicKey> freshKeys(KeyChain.KeyPurpose purpose, + int numberOfKeys)
      +
      Returns a key/s that have not been returned by this method before (fresh). You can think of this as being + newly created key/s, although the notion of "create" is not really valid for a + DeterministicKeyChain. When the parameter is + KeyChain.KeyPurpose.RECEIVE_FUNDS the returned key is suitable for being put + into a receive coins wizard type UI. You should use this when the user is definitely going to hand this key out + to someone who wishes to send money.
      +
      +
    • +
    • +
      +

      freshAddress

      +
      public Address freshAddress(KeyChain.KeyPurpose purpose, + ScriptType outputScriptType, + @Nullable + Instant keyRotationTime)
      +

      Returns a fresh address for a given KeyChain.KeyPurpose and of a given + ScriptType.

      +

      This method is meant for when you really need a fallback address. Normally, you should be + using freshAddress(KeyChain.KeyPurpose) or + currentAddress(KeyChain.KeyPurpose).

      +
      +
    • +
    • +
      +

      freshAddress

      +
      @Deprecated +public Address freshAddress(KeyChain.KeyPurpose purpose, + ScriptType outputScriptType, + long keyRotationTimeSecs)
      + +
      +
    • +
    • +
      +

      freshAddress

      +
      public Address freshAddress(KeyChain.KeyPurpose purpose)
      +
      Returns address for a freshKey(KeyChain.KeyPurpose)
      +
      +
    • +
    • +
      +

      getActiveKeyChains

      +
      public List<DeterministicKeyChain> getActiveKeyChains(@Nullable + Instant keyRotationTime)
      +
      Returns the key chains that are used for generation of fresh/current keys, in the order of how they + were added. The default active chain will come last in the list.
      +
      +
      Parameters:
      +
      keyRotationTime - key rotation to take into account
      +
      +
      +
    • +
    • +
      +

      getActiveKeyChains

      +
      @Deprecated +public List<DeterministicKeyChain> getActiveKeyChains(long keyRotationTimeSecs)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      getActiveKeyChain

      +
      public final DeterministicKeyChain getActiveKeyChain(ScriptType outputScriptType, + Instant keyRotationTime)
      +
      Returns the key chain that's used for generation of fresh/current keys of the given type. If it's not the default + type and no active chain for this type exists, null is returned. No upgrade or downgrade is tried.
      +
      +
    • +
    • +
      +

      getActiveKeyChain

      +
      @Deprecated +public final DeterministicKeyChain getActiveKeyChain(ScriptType outputScriptType, + long keyRotationTimeSecs)
      + +
      +
    • +
    • +
      +

      getActiveKeyChain

      +
      public final DeterministicKeyChain getActiveKeyChain()
      +
      Returns the key chain that's used for generation of default fresh/current keys. This is always the newest + deterministic chain. If no deterministic chain is present but imported keys instead, a deterministic upgrade is + tried.
      +
      +
    • +
    • +
      +

      mergeActiveKeyChains

      +
      public final void mergeActiveKeyChains(KeyChainGroup from, + Instant keyRotationTime)
      +
      Merge all active chains from the given keychain group into this keychain group.
      +
      +
    • +
    • +
      +

      mergeActiveKeyChains

      +
      @Deprecated +public final void mergeActiveKeyChains(KeyChainGroup from, + long keyRotationTimeSecs)
      + +
      +
    • +
    • +
      +

      getLookaheadSize

      +
      public int getLookaheadSize()
      +
      Gets the current lookahead size being used for ALL deterministic key chains. See + DeterministicKeyChain.setLookaheadSize(int) + for more information.
      +
      +
    • +
    • +
      +

      getLookaheadThreshold

      +
      public int getLookaheadThreshold()
      +
      Gets the current lookahead threshold being used for ALL deterministic key chains. See + DeterministicKeyChain.setLookaheadThreshold(int) + for more information.
      +
      +
    • +
    • +
      +

      importKeys

      +
      public int importKeys(List<ECKey> keys)
      +
      Imports the given keys into the basic chain, creating it if necessary.
      +
      +
    • +
    • +
      +

      importKeys

      +
      public int importKeys(ECKey... keys)
      +
      Imports the given keys into the basic chain, creating it if necessary.
      +
      +
    • +
    • +
      +

      checkPassword

      +
      public boolean checkPassword(CharSequence password)
      +
      +
    • +
    • +
      +

      checkAESKey

      +
      public boolean checkAESKey(AesKey aesKey)
      +
      +
    • +
    • +
      +

      importKeysAndEncrypt

      +
      public int importKeysAndEncrypt(List<ECKey> keys, + AesKey aesKey)
      +
      Imports the given unencrypted keys into the basic chain, encrypting them along the way with the given key.
      +
      +
    • +
    • +
      +

      findRedeemDataFromScriptHash

      +
      @Nullable +public RedeemData findRedeemDataFromScriptHash(byte[] scriptHash)
      +
      Description copied from interface: KeyBag
      +
      Locates a redeem data (redeem script and keys) from the keychain given the hash of the script. + This is needed when finding out which key and script we need to use to locally sign a P2SH transaction input. + It is assumed that wallet should not have more than one private key for a single P2SH tx for security reasons. + + Returns RedeemData object or null if no such data was found.
      +
      +
      Specified by:
      +
      findRedeemDataFromScriptHash in interface KeyBag
      +
      +
      +
    • +
    • +
      +

      markP2SHAddressAsUsed

      +
      public void markP2SHAddressAsUsed(LegacyAddress address)
      +
      +
    • +
    • +
      +

      findKeyFromPubKeyHash

      +
      @Nullable +public ECKey findKeyFromPubKeyHash(byte[] pubKeyHash, + @Nullable + ScriptType scriptType)
      +
      Description copied from interface: KeyBag
      +
      Locates a keypair from the keychain given the hash of the public key, and (optionally) by usage for a specific + script type. This is needed when finding out which key we need to use to redeem a transaction output.
      +
      +
      Specified by:
      +
      findKeyFromPubKeyHash in interface KeyBag
      +
      Parameters:
      +
      pubKeyHash - hash of the keypair to look for
      +
      scriptType - only look for given usage (currently ScriptType.P2PKH or + ScriptType.P2WPKH) or null if we don't care
      +
      Returns:
      +
      found key or null if no such key was found.
      +
      +
      +
    • +
    • +
      +

      markPubKeyHashAsUsed

      +
      public void markPubKeyHashAsUsed(byte[] pubKeyHash)
      +
      Mark the DeterministicKeys as used, if they match the pubKeyHash + See DeterministicKeyChain.markKeyAsUsed(DeterministicKey) for more info on this.
      +
      +
    • +
    • +
      +

      hasKey

      +
      public boolean hasKey(ECKey key)
      +
      +
    • +
    • +
      +

      findKeyFromPubKey

      +
      @Nullable +public ECKey findKeyFromPubKey(byte[] pubKey)
      +
      Description copied from interface: KeyBag
      +
      Locates a keypair from the keychain given the raw public key bytes.
      +
      +
      Specified by:
      +
      findKeyFromPubKey in interface KeyBag
      +
      Returns:
      +
      ECKey or null if no such key was found.
      +
      +
      +
    • +
    • +
      +

      markPubKeyAsUsed

      +
      public void markPubKeyAsUsed(byte[] pubkey)
      +
      Mark the DeterministicKeys as used, if they match the pubkey + See DeterministicKeyChain.markKeyAsUsed(DeterministicKey) for more info on this.
      +
      +
    • +
    • +
      +

      numKeys

      +
      public int numKeys()
      +
      Returns the number of keys managed by this group, including the lookahead buffers.
      +
      +
    • +
    • +
      +

      removeImportedKey

      +
      public boolean removeImportedKey(ECKey key)
      +
      Removes a key that was imported into the basic key chain. You cannot remove deterministic keys.
      +
      +
      Throws:
      +
      IllegalArgumentException - if the key is deterministic.
      +
      +
      +
    • +
    • +
      +

      encrypt

      +
      public void encrypt(KeyCrypter keyCrypter, + AesKey aesKey)
      +
      Encrypt the keys in the group using the KeyCrypter and the AES key. A good default KeyCrypter to use is + KeyCrypterScrypt.
      +
      +
      Throws:
      +
      KeyCrypterException - Thrown if the wallet encryption fails for some reason, + leaving the group unchanged.
      +
      DeterministicUpgradeRequiredException - Thrown if there are random keys but no HD chain.
      +
      +
      +
    • +
    • +
      +

      decrypt

      +
      public void decrypt(AesKey aesKey)
      +
      Decrypt the keys in the group using the previously given key crypter and the AES key. A good default + KeyCrypter to use is KeyCrypterScrypt.
      +
      +
      Throws:
      +
      KeyCrypterException - Thrown if the wallet decryption fails for some reason, leaving the group unchanged.
      +
      +
      +
    • +
    • +
      +

      isEncrypted

      +
      public boolean isEncrypted()
      +
      Returns true if the group is encrypted.
      +
      +
    • +
    • +
      +

      isWatching

      +
      public boolean isWatching()
      +
      Returns whether this chain has only watching keys (unencrypted keys with no private part). Mixed chains are + forbidden.
      +
      +
      Throws:
      +
      IllegalStateException - if there are no keys, or if there is a mix between watching and non-watching keys.
      +
      +
      +
    • +
    • +
      +

      getKeyCrypter

      +
      @Nullable +public KeyCrypter getKeyCrypter()
      +
      Returns the key crypter or null if the group is not encrypted.
      +
      +
    • +
    • +
      +

      getImportedKeys

      +
      public List<ECKey> getImportedKeys()
      +
      Returns a list of the non-deterministic keys that have been imported into the wallet, or the empty list if none.
      +
      +
    • +
    • +
      +

      earliestKeyCreationTime

      +
      public Instant earliestKeyCreationTime()
      +
      Gets the earliest time for which full block must be downloaded.
      +
      +
      Returns:
      +
      earliest creation times of keys in this group, + Instant.EPOCH if at least one time is unknown, + Instant.MAX if no keys in this group
      +
      +
      +
    • +
    • +
      +

      getEarliestKeyCreationTime

      +
      @Deprecated +public long getEarliestKeyCreationTime()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      getBloomFilterElementCount

      +
      public int getBloomFilterElementCount()
      +
      +
    • +
    • +
      +

      getBloomFilter

      +
      public BloomFilter getBloomFilter(int size, + double falsePositiveRate, + int nTweak)
      +
      +
    • +
    • +
      +

      isRequiringUpdateAllBloomFilter

      +
      public boolean isRequiringUpdateAllBloomFilter()
      +
      +
    • +
    • +
      +

      addEventListener

      +
      public void addEventListener(KeyChainEventListener listener)
      +
      Adds a listener for events that are run when keys are added, on the user thread.
      +
      +
    • +
    • +
      +

      addEventListener

      +
      public void addEventListener(KeyChainEventListener listener, + Executor executor)
      +
      Adds a listener for events that are run when keys are added, on the given executor.
      +
      +
    • +
    • +
      +

      removeEventListener

      +
      public boolean removeEventListener(KeyChainEventListener listener)
      +
      Removes a listener for events that are run when keys are added.
      +
      +
    • +
    • +
      +

      addCurrentKeyChangeEventListener

      +
      public void addCurrentKeyChangeEventListener(CurrentKeyChangeEventListener listener)
      +
      Removes a listener for events that are run when a current key and/or address changes.
      +
      +
    • +
    • +
      +

      addCurrentKeyChangeEventListener

      +
      public void addCurrentKeyChangeEventListener(CurrentKeyChangeEventListener listener, + Executor executor)
      +
      Adds a listener for events that are run when a current key and/or address changes, on the given + executor.
      +
      +
    • +
    • +
      +

      removeCurrentKeyChangeEventListener

      +
      public boolean removeCurrentKeyChangeEventListener(CurrentKeyChangeEventListener listener)
      +
      Removes a listener for events that are run when a current key and/or address changes.
      +
      +
    • +
    • +
      +

      serializeToProtobuf

      +
      public List<org.bitcoinj.protobuf.wallet.Protos.Key> serializeToProtobuf()
      +
      Return a list of key protobufs obtained by merging the chains.
      +
      +
      Returns:
      +
      a list of key protobufs (treat as unmodifiable, will change in future release)
      +
      +
      +
    • +
    • +
      +

      fromProtobufUnencrypted

      +
      public static KeyChainGroup fromProtobufUnencrypted(Network network, + List<org.bitcoinj.protobuf.wallet.Protos.Key> keys, + KeyChainFactory factory) + throws UnreadableWalletException
      +
      +
      Throws:
      +
      UnreadableWalletException
      +
      +
      +
    • +
    • +
      +

      fromProtobufEncrypted

      +
      public static KeyChainGroup fromProtobufEncrypted(Network network, + List<org.bitcoinj.protobuf.wallet.Protos.Key> keys, + KeyCrypter crypter, + KeyChainFactory factory) + throws UnreadableWalletException
      +
      +
      Throws:
      +
      UnreadableWalletException
      +
      +
      +
    • +
    • +
      +

      upgradeToDeterministic

      +
      public void upgradeToDeterministic(ScriptType preferredScriptType, + KeyChainGroupStructure structure, + @Nullable + Instant keyRotationTime, + @Nullable + AesKey aesKey) + throws DeterministicUpgradeRequiresPassword
      +

      This method will upgrade the wallet along the following path: Basic --> P2PKH --> P2WPKH

      +

      It won't skip any steps in that upgrade path because the user might be restoring from a backup and + still expects money on the P2PKH chain.

      +

      It will extract and reuse the seed from the current wallet, so that a fresh backup isn't required + after upgrading. If coming from a basic chain containing only random keys this means it will pick the + oldest non-rotating private key as a seed.

      +

      Note that for upgrading an encrypted wallet, the decryption key is needed. In future, we could skip + that requirement for a P2PKH --> P2WPKH upgrade and just clone the encryped seed, but currently + the key is needed even for that.

      +
      +
      Parameters:
      +
      preferredScriptType - desired script type for the active keychain
      +
      structure - keychain group structure to derive an account path from
      +
      keyRotationTime - If non-empty, time for which keys created before this are assumed to be + compromised or weak, those keys will not be used for deterministic upgrade.
      +
      aesKey - If non-null, the encryption key the keychain is encrypted under. If the keychain is encrypted + and this is not supplied, an exception is thrown letting you know you should ask the user for + their password, turn it into a key, and then try again.
      +
      Throws:
      +
      IllegalStateException - if there is already a deterministic key chain present or if there are + no random keys (i.e. this is not an upgrade scenario), or if aesKey is + provided but the wallet is not encrypted.
      +
      IllegalArgumentException - if the rotation time specified excludes all keys.
      +
      DeterministicUpgradeRequiresPassword - if the key chain group is encrypted + and you should provide the users encryption key.
      +
      +
      +
    • +
    • +
      +

      upgradeToDeterministic

      +
      @Deprecated +public void upgradeToDeterministic(ScriptType preferredScriptType, + KeyChainGroupStructure structure, + long keyRotationTimeSecs, + @Nullable + AesKey aesKey)
      + +
      +
    • +
    • +
      +

      isDeterministicUpgradeRequired

      +
      public boolean isDeterministicUpgradeRequired(ScriptType preferredScriptType, + @Nullable + Instant keyRotationTime)
      +
      Returns true if a call to upgradeToDeterministic(ScriptType, KeyChainGroupStructure, long, AesKey) is required + in order to have an active deterministic keychain of the desired script type.
      +
      +
    • +
    • +
      +

      isDeterministicUpgradeRequired

      +
      @Deprecated +public boolean isDeterministicUpgradeRequired(ScriptType preferredScriptType, + long keyRotationTimeSecs)
      + +
      +
    • +
    • +
      +

      toString

      +
      public String toString(boolean includeLookahead, + boolean includePrivateKeys, + @Nullable + AesKey aesKey)
      +
      +
    • +
    • +
      +

      getDeterministicKeyChains

      +
      public List<DeterministicKeyChain> getDeterministicKeyChains()
      +
      Returns a copy of the current list of chains.
      +
      +
    • +
    • +
      +

      getCombinedKeyLookaheadEpochs

      +
      public int getCombinedKeyLookaheadEpochs()
      +
      Returns a counter that increases (by an arbitrary amount) each time new keys have been calculated due to + lookahead and thus the Bloom filter that was previously calculated has become stale.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChainGroupStructure.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChainGroupStructure.html new file mode 100644 index 000000000..6db9a8f04 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyChainGroupStructure.html @@ -0,0 +1,314 @@ + + + + +KeyChainGroupStructure (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface KeyChainGroupStructure

+
+
+
+
public interface KeyChainGroupStructure
+
Defines a structure for hierarchical deterministic wallets. +

+ Use BIP32 for BIP-32 wallets and BIP43 for + BIP-43-family wallets. +

+ bitcoinj BIP-32 wallets use DeterministicKeyChain.ACCOUNT_ZERO_PATH for ScriptType.P2PKH + and DeterministicKeyChain.ACCOUNT_ONE_PATH for ScriptType.P2WPKH +

+ BIP-43-family wallets structured via KeyChainGroupStructure will always use account number zero. Currently, + only BIP-44 (P2PKH) and BIP-84 (P2WPKH) are supported.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      accountPathFor

      +
      @Deprecated +default HDPath accountPathFor(ScriptType outputScriptType)
      + +
      Map desired output script type to an account path. + Default to MainNet, BIP-32 Keychains use the same path for MainNet and TestNet
      +
      +
      Parameters:
      +
      outputScriptType - the script/address type
      +
      Returns:
      +
      account path
      +
      +
      +
    • +
    • +
      +

      accountPathFor

      +
      HDPath accountPathFor(ScriptType outputScriptType, + Network network)
      +
      Map desired output script type and network to an account path
      +
      +
      Parameters:
      +
      outputScriptType - output script type (purpose)
      +
      network - network/coin type
      +
      Returns:
      +
      The HD Path: purpose / coinType / accountIndex
      +
      +
      +
    • +
    • +
      +

      accountPathFor

      +
      @Deprecated +default HDPath accountPathFor(ScriptType outputScriptType, + NetworkParameters networkParameters)
      + +
      Map desired output script type and network to an account path
      +
      +
      Parameters:
      +
      outputScriptType - output script type (purpose)
      +
      networkParameters - network/coin type
      +
      Returns:
      +
      The HD Path: purpose / coinType / accountIndex
      +
      +
      +
    • +
    • +
      +

      purpose

      +
      static HDPath purpose(ScriptType scriptType)
      +
      Return the (root) path containing "purpose" for the specified scriptType
      +
      +
      Parameters:
      +
      scriptType - script/address type
      +
      Returns:
      +
      An HDPath with a BIP44 "purpose" entry
      +
      +
      +
    • +
    • +
      +

      coinType

      +
      static ChildNumber coinType(Network network)
      +
      Return coin type path component for a network id
      +
      +
      Parameters:
      +
      network - network id string, e.g. BitcoinNetwork.ID_MAINNET
      +
      +
      +
    • +
    • +
      +

      account

      +
      static ChildNumber account(int accountIndex)
      +
      Return path component for an account
      +
      +
      Parameters:
      +
      accountIndex - account index
      +
      Returns:
      +
      A hardened path component
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyTimeCoinSelector.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyTimeCoinSelector.html new file mode 100644 index 000000000..dd475f313 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/KeyTimeCoinSelector.html @@ -0,0 +1,241 @@ + + + + +KeyTimeCoinSelector (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class KeyTimeCoinSelector

+
+
java.lang.Object +
org.bitcoinj.wallet.KeyTimeCoinSelector
+
+
+
+
All Implemented Interfaces:
+
CoinSelector
+
+
+
public class KeyTimeCoinSelector +extends Object +implements CoinSelector
+
A coin selector that takes all coins assigned to keys created before the given timestamp. + Used as part of the implementation of Wallet.setKeyRotationTime(java.time.Instant).
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/RedeemData.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/RedeemData.html new file mode 100644 index 000000000..f2a4737fe --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/RedeemData.html @@ -0,0 +1,217 @@ + + + + +RedeemData (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class RedeemData

+
+
java.lang.Object +
org.bitcoinj.wallet.RedeemData
+
+
+
+
public class RedeemData +extends Object
+
This class aggregates data required to spend transaction output. + + For P2PKH and P2PK transactions it will have only a single key and CHECKSIG program as redeemScript. + For multisignature transactions there will be multiple keys one of which will be a full key and the rest are watch only, + redeem script will be a CHECKMULTISIG program. Keys will be sorted in the same order they appear in + a program (lexicographical order).
+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      redeemScript

      +
      public final Script redeemScript
      +
      +
    • +
    • +
      +

      keys

      +
      public final List<ECKey> keys
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      of

      +
      public static RedeemData of(List<ECKey> keys, + Script redeemScript)
      +
      +
    • +
    • +
      +

      of

      +
      public static RedeemData of(ECKey key, + Script redeemScript)
      +
      Creates RedeemData for P2PKH, P2WPKH or P2PK input. Provided key is a single private key needed + to spend such inputs.
      +
      +
    • +
    • +
      +

      getFullKey

      +
      public ECKey getFullKey()
      +
      Returns the first key that has private bytes
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/RiskAnalysis.Analyzer.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/RiskAnalysis.Analyzer.html new file mode 100644 index 000000000..6b1adc738 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/RiskAnalysis.Analyzer.html @@ -0,0 +1,136 @@ + + + + +RiskAnalysis.Analyzer (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface RiskAnalysis.Analyzer

+
+
+
+
All Known Implementing Classes:
+
DefaultRiskAnalysis.Analyzer
+
+
+
Enclosing interface:
+
RiskAnalysis
+
+
+
public static interface RiskAnalysis.Analyzer
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/RiskAnalysis.Result.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/RiskAnalysis.Result.html new file mode 100644 index 000000000..bc9567b27 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/RiskAnalysis.Result.html @@ -0,0 +1,229 @@ + + + + +RiskAnalysis.Result (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class RiskAnalysis.Result

+
+
java.lang.Object +
java.lang.Enum<RiskAnalysis.Result> +
org.bitcoinj.wallet.RiskAnalysis.Result
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<RiskAnalysis.Result>, Constable
+
+
+
Enclosing interface:
+
RiskAnalysis
+
+
+
public static enum RiskAnalysis.Result +extends Enum<RiskAnalysis.Result>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static RiskAnalysis.Result[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static RiskAnalysis.Result valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/RiskAnalysis.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/RiskAnalysis.html new file mode 100644 index 000000000..563dac713 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/RiskAnalysis.html @@ -0,0 +1,154 @@ + + + + +RiskAnalysis (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface RiskAnalysis

+
+
+
+
All Known Implementing Classes:
+
DefaultRiskAnalysis
+
+
+
public interface RiskAnalysis
+

A RiskAnalysis represents an analysis of how likely it is that a transaction (and its dependencies) represents a + possible double spending attack. The wallet will create these to decide whether or not to accept a pending + transaction. Look at DefaultRiskAnalysis to see what is currently considered risky.

+ +

The intention here is that implementing classes can expose more information and detail about the result, for + app developers. The core code needs only to know whether it's OK or not.

+ +

A factory interface is provided. The wallet will use this to analyze new pending transactions.

+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    Nested Classes
    +
    +
    Modifier and Type
    +
    Interface
    +
    Description
    +
    static interface 
    + +
     
    +
    static enum 
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + + +
     
    +
    +
    +
    +
    +
  • +
+
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/SendRequest.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/SendRequest.html new file mode 100644 index 000000000..0ed7887d5 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/SendRequest.html @@ -0,0 +1,497 @@ + + + + +SendRequest (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class SendRequest

+
+
java.lang.Object +
org.bitcoinj.wallet.SendRequest
+
+
+
+
public class SendRequest +extends Object
+
A SendRequest gives the wallet information about precisely how to send money to a recipient or set of recipients. + Static methods are provided to help you create SendRequests and there are a few helper methods on the wallet that + just simplify the most common use cases. You may wish to customize a SendRequest if you want to attach a fee or + modify the change address.
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    + + +
    +
    The AES key to use to decrypt the private keys before signing.
    +
    + + +
    +
    "Change" means the difference between the value gathered by a transactions inputs (the size of which you + don't really control as it depends on who sent you money), and the value being sent somewhere else.
    +
    + + +
    +
    If not null, the CoinSelector to use instead of the wallets default.
    +
    +
    boolean
    + +
    +
    When emptyWallet is set, all coins selected by the coin selector are sent to the first output in tx + (its value is ignored and set to Wallet.getBalance() - the fees required + for the transaction).
    +
    +
    boolean
    + +
    +
    Requires that there be enough fee for a default Bitcoin Core to at least relay the transaction.
    +
    + + +
    +
    If not null, this exchange rate is recorded with the transaction during completion.
    +
    + + +
    +
    A transaction can have a fee attached, which is defined as the difference between the input values + and output values.
    +
    + + +
    +
    If not null, this memo is recorded with the transaction during completion.
    +
    + + +
    +
    Specifies what to do with missing signatures left after completing this request.
    +
    +
    boolean
    + +
    +
    If false (default value), tx fee is paid by the sender If true, tx fee is paid by the recipient/s.
    +
    +
    boolean
    + +
    +
    If true (the default), the outputs will be shuffled during completion to randomize the location of the change + output, if any.
    +
    +
    boolean
    + +
    +
    If true (the default), the inputs will be signed.
    +
    + + +
    +
    A transaction, probably incomplete, that describes the outline of what you want to do.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Shortcut for req.coinSelector = AllowUnconfirmedCoinSelector.get();.
    +
    + +
    childPaysForParent(Wallet wallet, + Transaction parentTransaction, + Coin feeRaise)
    +
    +
    Construct a SendRequest for a CPFP (child-pays-for-parent) transaction.
    +
    + +
    emptyWallet(Address destination)
    +
     
    + + +
    +
    Simply wraps a pre-built incomplete transaction provided by you.
    +
    + +
    fromPaymentDetails(org.bitcoinj.protobuf.payments.Protos.PaymentDetails paymentDetails)
    +
    +
    Copy data from payment request.
    +
    +
    void
    +
    setFeePerVkb(Coin feePerVkb)
    +
     
    + +
    to(Address destination, + Coin value)
    +
    +
    Creates a new SendRequest to the given address for the given value.
    +
    + +
    to(NetworkParameters params, + ECKey destination, + Coin value)
    +
    +
    Deprecated. + +
    +
    + +
    to(ECKey destination, + Coin value)
    +
    +
    Creates a new SendRequest to the given pubkey for the given value.
    +
    + + +
     
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      tx

      +
      public final Transaction tx
      +

      A transaction, probably incomplete, that describes the outline of what you want to do. This typically will + mean it has some outputs to the intended destinations, but no inputs or change address (and therefore no + fees) - the wallet will calculate all that for you and update tx later.

      + +

      Be careful when adding outputs that you check the min output value + (TransactionOutput.getMinNonDustValue(Coin)) to avoid the whole transaction being rejected + because one output is dust.

      + +

      If there are already inputs to the transaction, make sure their out point has a connected output, + otherwise their value will be added to fee. Also ensure they are either signed or are spendable by a wallet + key, otherwise the behavior of Wallet.completeTx(SendRequest) is undefined (likely + RuntimeException).

      +
      +
    • +
    • +
      +

      emptyWallet

      +
      public boolean emptyWallet
      +
      When emptyWallet is set, all coins selected by the coin selector are sent to the first output in tx + (its value is ignored and set to Wallet.getBalance() - the fees required + for the transaction). Any additional outputs are removed.
      +
      +
    • +
    • +
      +

      changeAddress

      +
      public Address changeAddress
      +
      "Change" means the difference between the value gathered by a transactions inputs (the size of which you + don't really control as it depends on who sent you money), and the value being sent somewhere else. The + change address should be selected from this wallet, normally. If null this will be chosen for you.
      +
      +
    • +
    • +
      +

      feePerKb

      +
      public Coin feePerKb
      +

      A transaction can have a fee attached, which is defined as the difference between the input values + and output values. Any value taken in that is not provided to an output can be claimed by a miner. This + is how mining is incentivized in later years of the Bitcoin system when inflation drops. It also provides + a way for people to prioritize their transactions over others and is used as a way to make denial of service + attacks expensive.

      + +

      This is a dynamic fee (in satoshis) which will be added to the transaction for each virtual kilobyte in size + including the first. This is useful as as miners usually sort pending transactions by their fee per unit size + when choosing which transactions to add to a block. Note that, to keep this equivalent to Bitcoin Core + definition, a virtual kilobyte is defined as 1000 virtual bytes, not 1024.

      +
      +
    • +
    • +
      +

      ensureMinRequiredFee

      +
      public boolean ensureMinRequiredFee
      +

      Requires that there be enough fee for a default Bitcoin Core to at least relay the transaction. + (ie ensure the transaction will not be outright rejected by the network). Defaults to true, you should + only set this to false if you know what you're doing.

      + +

      Note that this does not enforce certain fee rules that only apply to transactions which are larger than + 26,000 bytes. If you get a transaction which is that large, you should set a feePerKb of at least + Transaction.REFERENCE_DEFAULT_MIN_TX_FEE.

      +
      +
    • +
    • +
      +

      signInputs

      +
      public boolean signInputs
      +
      If true (the default), the inputs will be signed.
      +
      +
    • +
    • +
      +

      aesKey

      +
      public AesKey aesKey
      +
      The AES key to use to decrypt the private keys before signing. + If null then no decryption will be performed and if decryption is required an exception will be thrown. + You can get this from a password by doing wallet.getKeyCrypter().deriveKey(password).
      +
      +
    • +
    • +
      +

      coinSelector

      +
      public CoinSelector coinSelector
      +
      If not null, the CoinSelector to use instead of the wallets default. Coin selectors are + responsible for choosing which transaction outputs (coins) in a wallet to use given the desired send value + amount.
      +
      +
    • +
    • +
      +

      shuffleOutputs

      +
      public boolean shuffleOutputs
      +
      If true (the default), the outputs will be shuffled during completion to randomize the location of the change + output, if any. This is normally what you want for privacy reasons but in unit tests it can be annoying + so it can be disabled here.
      +
      +
    • +
    • +
      +

      missingSigsMode

      +
      public Wallet.MissingSigsMode missingSigsMode
      +
      Specifies what to do with missing signatures left after completing this request. Default strategy is to + throw an exception on missing signature (Wallet.MissingSigsMode.THROW).
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      exchangeRate

      +
      public ExchangeRate exchangeRate
      +
      If not null, this exchange rate is recorded with the transaction during completion.
      +
      +
    • +
    • +
      +

      memo

      +
      public String memo
      +
      If not null, this memo is recorded with the transaction during completion. It can be used to record the memo + of the payment request that initiated the transaction.
      +
      +
    • +
    • +
      +

      recipientsPayFees

      +
      public boolean recipientsPayFees
      +
      If false (default value), tx fee is paid by the sender If true, tx fee is paid by the recipient/s. If there is + more than one recipient, the tx fee is split equally between them regardless of output value and size.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setFeePerVkb

      +
      public void setFeePerVkb(Coin feePerVkb)
      +
      +
    • +
    • +
      +

      allowUnconfirmed

      +
      public void allowUnconfirmed()
      +
      Shortcut for req.coinSelector = AllowUnconfirmedCoinSelector.get();.
      +
      +
    • +
    • +
      +

      to

      +
      public static SendRequest to(Address destination, + Coin value)
      +

      Creates a new SendRequest to the given address for the given value.

      + +

      Be careful to check the output's value is reasonable using + TransactionOutput.getMinNonDustValue(Coin) afterwards or you risk having the transaction + rejected by the network.

      +
      +
    • +
    • +
      +

      to

      +
      public static SendRequest to(ECKey destination, + Coin value)
      +

      Creates a new SendRequest to the given pubkey for the given value.

      + +

      Be careful to check the output's value is reasonable using + TransactionOutput.getMinNonDustValue(Coin) afterwards or you risk having the transaction + rejected by the network. Note that using to(Address, Coin) will result + in a smaller output, and thus the ability to use a smaller output value without rejection.

      +
      +
    • +
    • +
      +

      to

      +
      @Deprecated +public static SendRequest to(NetworkParameters params, + ECKey destination, + Coin value)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      forTx

      +
      public static SendRequest forTx(Transaction tx)
      +
      Simply wraps a pre-built incomplete transaction provided by you.
      +
      +
    • +
    • +
      +

      emptyWallet

      +
      public static SendRequest emptyWallet(Address destination)
      +
      +
    • +
    • +
      +

      childPaysForParent

      +
      public static SendRequest childPaysForParent(Wallet wallet, + Transaction parentTransaction, + Coin feeRaise)
      +
      Construct a SendRequest for a CPFP (child-pays-for-parent) transaction. The resulting transaction is already + completed, so you should directly proceed to signing and broadcasting/committing the transaction. CPFP is + currently only supported by a few miners, so use with care.
      +
      +
    • +
    • +
      +

      fromPaymentDetails

      +
      public SendRequest fromPaymentDetails(org.bitcoinj.protobuf.payments.Protos.PaymentDetails paymentDetails)
      +
      Copy data from payment request.
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/UnreadableWalletException.BadPassword.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/UnreadableWalletException.BadPassword.html new file mode 100644 index 000000000..dfdcb384c --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/UnreadableWalletException.BadPassword.html @@ -0,0 +1,161 @@ + + + + +UnreadableWalletException.BadPassword (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class UnreadableWalletException.BadPassword

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.wallet.UnreadableWalletException +
org.bitcoinj.wallet.UnreadableWalletException.BadPassword
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
UnreadableWalletException
+
+
+
public static class UnreadableWalletException.BadPassword +extends UnreadableWalletException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BadPassword

      +
      public BadPassword()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/UnreadableWalletException.FutureVersion.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/UnreadableWalletException.FutureVersion.html new file mode 100644 index 000000000..8b80dda09 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/UnreadableWalletException.FutureVersion.html @@ -0,0 +1,161 @@ + + + + +UnreadableWalletException.FutureVersion (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class UnreadableWalletException.FutureVersion

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.wallet.UnreadableWalletException +
org.bitcoinj.wallet.UnreadableWalletException.FutureVersion
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
UnreadableWalletException
+
+
+
public static class UnreadableWalletException.FutureVersion +extends UnreadableWalletException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      FutureVersion

      +
      public FutureVersion()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/UnreadableWalletException.WrongNetwork.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/UnreadableWalletException.WrongNetwork.html new file mode 100644 index 000000000..386d3a3a5 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/UnreadableWalletException.WrongNetwork.html @@ -0,0 +1,161 @@ + + + + +UnreadableWalletException.WrongNetwork (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class UnreadableWalletException.WrongNetwork

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.wallet.UnreadableWalletException +
org.bitcoinj.wallet.UnreadableWalletException.WrongNetwork
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
UnreadableWalletException
+
+
+
public static class UnreadableWalletException.WrongNetwork +extends UnreadableWalletException
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      WrongNetwork

      +
      public WrongNetwork()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/UnreadableWalletException.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/UnreadableWalletException.html new file mode 100644 index 000000000..346dc8237 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/UnreadableWalletException.html @@ -0,0 +1,183 @@ + + + + +UnreadableWalletException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class UnreadableWalletException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
org.bitcoinj.wallet.UnreadableWalletException
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
UnreadableWalletException.BadPassword, UnreadableWalletException.FutureVersion, UnreadableWalletException.WrongNetwork
+
+
+
public class UnreadableWalletException +extends Exception
+
Thrown by the WalletProtobufSerializer when the serialized protocol buffer is either corrupted, + internally inconsistent or appears to be from the future.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      UnreadableWalletException

      +
      public UnreadableWalletException(String s)
      +
      +
    • +
    • +
      +

      UnreadableWalletException

      +
      public UnreadableWalletException(String s, + Throwable t)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.BadWalletEncryptionKeyException.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.BadWalletEncryptionKeyException.html new file mode 100644 index 000000000..7a1f2069a --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.BadWalletEncryptionKeyException.html @@ -0,0 +1,156 @@ + + + + +Wallet.BadWalletEncryptionKeyException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Wallet.BadWalletEncryptionKeyException

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
Wallet
+
+
+
public static class Wallet.BadWalletEncryptionKeyException +extends Wallet.CompletionException
+
Thrown if the private keys and seed of this wallet cannot be decrypted due to the supplied encryption + key or password being wrong.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      BadWalletEncryptionKeyException

      +
      public BadWalletEncryptionKeyException(Throwable throwable)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.BalanceType.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.BalanceType.html new file mode 100644 index 000000000..567ccad55 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.BalanceType.html @@ -0,0 +1,264 @@ + + + + +Wallet.BalanceType (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class Wallet.BalanceType

+
+
java.lang.Object +
java.lang.Enum<Wallet.BalanceType> +
org.bitcoinj.wallet.Wallet.BalanceType
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Wallet.BalanceType>, Constable
+
+
+
Enclosing class:
+
Wallet
+
+
+
public static enum Wallet.BalanceType +extends Enum<Wallet.BalanceType>
+

It's possible to calculate a wallets balance from multiple points of view. This enum selects which + Wallet.getBalance(BalanceType) should use.

+ +

Consider a real-world example: you buy a snack costing $5 but you only have a $10 bill. At the start you have + $10 viewed from every possible angle. After you order the snack you hand over your $10 bill. From the + perspective of your wallet you have zero dollars (AVAILABLE). But you know in a few seconds the shopkeeper + will give you back $5 change so most people in practice would say they have $5 (ESTIMATED).

+ +

The fact that the wallet can track transactions which are not spendable by itself ("watching wallets") adds + another type of balance to the mix. Although the wallet won't do this by default, advanced use cases that + override the relevancy checks can end up with a mix of spendable and unspendable transactions.

+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      ESTIMATED

      +
      public static final Wallet.BalanceType ESTIMATED
      +
      Balance calculated assuming all pending transactions are in fact included into the best chain by miners. + This includes the value of immature coinbase transactions.
      +
      +
    • +
    • +
      +

      AVAILABLE

      +
      public static final Wallet.BalanceType AVAILABLE
      +
      Balance that could be safely used to create new spends, if we had all the needed private keys. This is + whatever the default coin selector would make available, which by default means transaction outputs with at + least 1 confirmation and pending transactions created by our own wallet which have been propagated across + the network. Whether we actually have the private keys or not is irrelevant for this balance type.
      +
      +
    • +
    • +
      +

      ESTIMATED_SPENDABLE

      +
      public static final Wallet.BalanceType ESTIMATED_SPENDABLE
      +
      Same as ESTIMATED but only for outputs we have the private keys for and can sign ourselves.
      +
      +
    • +
    • +
      +

      AVAILABLE_SPENDABLE

      +
      public static final Wallet.BalanceType AVAILABLE_SPENDABLE
      +
      Same as AVAILABLE but only for outputs we have the private keys for and can sign ourselves.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Wallet.BalanceType[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Wallet.BalanceType valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.CompletionException.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.CompletionException.html new file mode 100644 index 000000000..6062092ea --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.CompletionException.html @@ -0,0 +1,173 @@ + + + + +Wallet.CompletionException (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Wallet.CompletionException

+
+
java.lang.Object +
java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.bitcoinj.wallet.Wallet.CompletionException
+
+
+
+
+
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Direct Known Subclasses:
+
Wallet.BadWalletEncryptionKeyException, Wallet.CouldNotAdjustDownwards, Wallet.DustySendRequested, Wallet.ExceededMaxTransactionSize, Wallet.MultipleOpReturnRequested
+
+
+
Enclosing class:
+
Wallet
+
+
+
public static class Wallet.CompletionException +extends RuntimeException
+
Class of exceptions thrown in Wallet.completeTx(SendRequest).
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CompletionException

      +
      public CompletionException()
      +
      +
    • +
    • +
      +

      CompletionException

      +
      public CompletionException(Throwable throwable)
      +
      +
    • +
    • +
      +

      CompletionException

      +
      public CompletionException(String message)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.CouldNotAdjustDownwards.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.CouldNotAdjustDownwards.html new file mode 100644 index 000000000..7b793f162 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.CouldNotAdjustDownwards.html @@ -0,0 +1,126 @@ + + + + +Wallet.CouldNotAdjustDownwards (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Wallet.CouldNotAdjustDownwards

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
Wallet
+
+
+
public static class Wallet.CouldNotAdjustDownwards +extends Wallet.CompletionException
+
Thrown when we were trying to empty the wallet, and the total amount of money we were trying to empty after + being reduced for the fee was smaller than the min payment. Note that the missing field will be null in this + case.
+
+
See Also:
+
+ +
+
+
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.DustySendRequested.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.DustySendRequested.html new file mode 100644 index 000000000..8b4a54f42 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.DustySendRequested.html @@ -0,0 +1,155 @@ + + + + +Wallet.DustySendRequested (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Wallet.DustySendRequested

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
Wallet
+
+
+
public static class Wallet.DustySendRequested +extends Wallet.CompletionException
+
Thrown if the resultant transaction would violate the dust rules (an output that's too small to be worthwhile).
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DustySendRequested

      +
      public DustySendRequested()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.ExceededMaxTransactionSize.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.ExceededMaxTransactionSize.html new file mode 100644 index 000000000..b413b829c --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.ExceededMaxTransactionSize.html @@ -0,0 +1,155 @@ + + + + +Wallet.ExceededMaxTransactionSize (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Wallet.ExceededMaxTransactionSize

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
Wallet
+
+
+
public static class Wallet.ExceededMaxTransactionSize +extends Wallet.CompletionException
+
Thrown if the resultant transaction is too big for Bitcoin to process. Try breaking up the amounts of value.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ExceededMaxTransactionSize

      +
      public ExceededMaxTransactionSize()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.MissingSigsMode.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.MissingSigsMode.html new file mode 100644 index 000000000..77757c6fd --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.MissingSigsMode.html @@ -0,0 +1,242 @@ + + + + +Wallet.MissingSigsMode (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class Wallet.MissingSigsMode

+
+
java.lang.Object +
java.lang.Enum<Wallet.MissingSigsMode> +
org.bitcoinj.wallet.Wallet.MissingSigsMode
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Wallet.MissingSigsMode>, Constable
+
+
+
Enclosing class:
+
Wallet
+
+
+
public static enum Wallet.MissingSigsMode +extends Enum<Wallet.MissingSigsMode>
+
Enumerates possible resolutions for missing signatures.
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Wallet.MissingSigsMode[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Wallet.MissingSigsMode valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.MultipleOpReturnRequested.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.MultipleOpReturnRequested.html new file mode 100644 index 000000000..40aacbb45 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.MultipleOpReturnRequested.html @@ -0,0 +1,155 @@ + + + + +Wallet.MultipleOpReturnRequested (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Wallet.MultipleOpReturnRequested

+
+ +
+
+
All Implemented Interfaces:
+
Serializable
+
+
+
Enclosing class:
+
Wallet
+
+
+
public static class Wallet.MultipleOpReturnRequested +extends Wallet.CompletionException
+
Thrown if there is more than one OP_RETURN output for the resultant transaction.
+
+
See Also:
+
+ +
+
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      MultipleOpReturnRequested

      +
      public MultipleOpReturnRequested()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.SendResult.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.SendResult.html new file mode 100644 index 000000000..f40f17502 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.SendResult.html @@ -0,0 +1,273 @@ + + + + +Wallet.SendResult (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Wallet.SendResult

+
+
java.lang.Object +
org.bitcoinj.wallet.Wallet.SendResult
+
+
+
+
Enclosing class:
+
Wallet
+
+
+
public static class Wallet.SendResult +extends Object
+
A SendResult is returned to you as part of sending coins to a recipient.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.html new file mode 100644 index 000000000..5aded6d08 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/Wallet.html @@ -0,0 +1,4799 @@ + + + + +Wallet (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class Wallet

+
+ +
+
+
All Implemented Interfaces:
+
AddressParser, NewBestBlockListener, ReorganizeListener, TransactionReceivedInBlockListener, PeerFilterProvider, TransactionBag, TaggableObject, KeyBag
+
+
+ +

A Wallet stores keys and a record of transactions that send and receive value from those keys. Using these, + it is able to create new transactions that spend the recorded transactions, and this is the fundamental operation + of the Bitcoin protocol.

+ +

To learn more about this class, read + working with the wallet.

+ +

To fill up a Wallet with transactions, you need to use it in combination with a BlockChain and various + other objects, see the Getting started tutorial + on the website to learn more about how to set everything up.

+ +

Wallets can be serialized using protocol buffers. You need to save the wallet whenever it changes, there is an + auto-save feature that simplifies this for you although you're still responsible for manually triggering a save when + your app is about to quit because the auto-save feature waits a moment before actually committing to disk to avoid IO + thrashing when the wallet is changing very fast (e.g. due to a block chain sync). See + autosaveToFile(File, Duration, WalletFiles.Listener) + for more information about this.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    + +
    +
  • + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      createDeterministic

      +
      public static Wallet createDeterministic(Network network, + ScriptType outputScriptType)
      +
      Creates a new, empty wallet with a randomly chosen seed and no transactions. Make sure to provide for sufficient + backup! Any keys will be derived from the seed. If you want to restore a wallet from disk instead, see + loadFromFile(java.io.File, org.bitcoinj.wallet.WalletExtension...).
      +
      +
      Parameters:
      +
      network - network wallet will operate on
      +
      outputScriptType - type of addresses (aka output scripts) to generate for receiving
      +
      Returns:
      +
      A new empty wallet
      +
      +
      +
    • +
    • +
      +

      createDeterministic

      +
      @Deprecated +public static Wallet createDeterministic(NetworkParameters params, + ScriptType outputScriptType)
      + +
      +
    • +
    • +
      +

      createDeterministic

      +
      public static Wallet createDeterministic(Network network, + ScriptType outputScriptType, + KeyChainGroupStructure keyChainGroupStructure)
      +
      Creates a new, empty wallet with a randomly chosen seed and no transactions. Make sure to provide for sufficient + backup! Any keys will be derived from the seed. If you want to restore a wallet from disk instead, see + loadFromFile(java.io.File, org.bitcoinj.wallet.WalletExtension...).
      +
      +
      Parameters:
      +
      network - network wallet will operate on
      +
      outputScriptType - type of addresses (aka output scripts) to generate for receiving
      +
      keyChainGroupStructure - structure (e.g. BIP32 or BIP43)
      +
      Returns:
      +
      A new empty wallet
      +
      +
      +
    • +
    • +
      +

      createDeterministic

      +
      @Deprecated +public static Wallet createDeterministic(NetworkParameters params, + ScriptType outputScriptType, + KeyChainGroupStructure keyChainGroupStructure)
      + +
      +
    • +
    • +
      +

      createBasic

      +
      public static Wallet createBasic(Network network)
      +
      Creates a new, empty wallet with just a basic keychain and no transactions. No deterministic chains will be created + automatically. This is meant for when you just want to import a few keys and operate on them.
      +
      +
      Parameters:
      +
      network - network wallet will operate on
      +
      +
      +
    • +
    • +
      +

      createBasic

      +
      @Deprecated +public static Wallet createBasic(NetworkParameters params)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      fromSeed

      +
      public static Wallet fromSeed(Network network, + DeterministicSeed seed, + ScriptType outputScriptType)
      +
      +
      Parameters:
      +
      network - network wallet will operate on
      +
      seed - deterministic seed
      +
      outputScriptType - type of addresses (aka output scripts) to generate for receiving
      +
      Returns:
      +
      a wallet from a deterministic seed with a default account path
      +
      +
      +
    • +
    • +
      +

      fromSeed

      +
      @Deprecated +public static Wallet fromSeed(NetworkParameters params, + DeterministicSeed seed, + ScriptType outputScriptType)
      + +
      +
    • +
    • +
      +

      fromSeed

      +
      public static Wallet fromSeed(Network network, + DeterministicSeed seed, + ScriptType outputScriptType, + KeyChainGroupStructure structure)
      +
      +
      Parameters:
      +
      network - network wallet will operate on
      +
      seed - deterministic seed
      +
      outputScriptType - type of addresses (aka output scripts) to generate for receiving
      +
      structure - structure for your wallet
      +
      Returns:
      +
      a wallet from a deterministic seed with a default account path
      +
      +
      +
    • +
    • +
      +

      fromSeed

      +
      @Deprecated +public static Wallet fromSeed(NetworkParameters params, + DeterministicSeed seed, + ScriptType outputScriptType, + KeyChainGroupStructure structure)
      + +
      +
    • +
    • +
      +

      fromSeed

      +
      public static Wallet fromSeed(Network network, + DeterministicSeed seed, + ScriptType outputScriptType, + List<ChildNumber> accountPath)
      +
      +
      Parameters:
      +
      network - network wallet will operate on
      +
      seed - deterministic seed
      +
      outputScriptType - type of addresses (aka output scripts) to generate for receiving
      +
      accountPath - account path to generate receiving addresses on
      +
      Returns:
      +
      an instance of a wallet from a deterministic seed.
      +
      +
      +
    • +
    • +
      +

      fromSeed

      +
      @Deprecated +public static Wallet fromSeed(NetworkParameters params, + DeterministicSeed seed, + ScriptType outputScriptType, + List<ChildNumber> accountPath)
      + +
      +
    • +
    • +
      +

      fromWatchingKey

      +
      public static Wallet fromWatchingKey(Network network, + DeterministicKey watchKey, + ScriptType outputScriptType)
      +
      Creates a wallet that tracks payments to and from the HD key hierarchy rooted by the given watching key. This HAS + to be an account key as returned by DeterministicKeyChain.getWatchingKey().
      +
      +
    • +
    • +
      +

      fromWatchingKey

      +
      @Deprecated +public static Wallet fromWatchingKey(NetworkParameters params, + DeterministicKey watchKey, + ScriptType outputScriptType)
      + +
      +
    • +
    • +
      +

      fromWatchingKeyB58

      +
      public static Wallet fromWatchingKeyB58(Network network, + String watchKeyB58, + Instant creationTime)
      +
      Creates a wallet that tracks payments to and from the HD key hierarchy rooted by the given watching key. The + account path is specified.
      +
      +
      Parameters:
      +
      network - network wallet will operate on
      +
      watchKeyB58 - The key in base58 notation
      +
      creationTime - creation time of the key (if unknown use fromWatchingKeyB58(Network, String)
      +
      Returns:
      +
      a new wallet
      +
      +
      +
    • +
    • +
      +

      fromWatchingKeyB58

      +
      @Deprecated +public static Wallet fromWatchingKeyB58(NetworkParameters params, + String watchKeyB58, + Instant creationTime)
      + +
      +
    • +
    • +
      +

      fromWatchingKeyB58

      +
      public static Wallet fromWatchingKeyB58(Network network, + String watchKeyB58)
      +
      Creates a wallet that tracks payments to and from the HD key hierarchy rooted by the given watching key. The + account path is specified. The key's creation time will be set to DeterministicHierarchy.BIP32_STANDARDISATION_TIME
      +
      +
      Parameters:
      +
      network - network wallet will operate on
      +
      watchKeyB58 - The key in base58 notation
      +
      Returns:
      +
      a new wallet
      +
      +
      +
    • +
    • +
      +

      fromWatchingKeyB58

      +
      @Deprecated +public static Wallet fromWatchingKeyB58(NetworkParameters params, + String watchKeyB58)
      + +
      +
    • +
    • +
      +

      fromWatchingKeyB58

      +
      @Deprecated +public static Wallet fromWatchingKeyB58(NetworkParameters params, + String watchKeyB58, + long creationTimeSeconds)
      + +
      +
    • +
    • +
      +

      fromSpendingKey

      +
      public static Wallet fromSpendingKey(Network network, + DeterministicKey spendKey, + ScriptType outputScriptType)
      +
      Creates a wallet that tracks payments to and from the HD key hierarchy rooted by the given spending key. This HAS + to be an account key as returned by DeterministicKeyChain.getWatchingKey(). This wallet can also spend.
      +
      +
      Parameters:
      +
      network - network wallet will operate on
      +
      +
      +
    • +
    • +
      +

      fromSpendingKey

      +
      @Deprecated +public static Wallet fromSpendingKey(NetworkParameters params, + DeterministicKey spendKey, + ScriptType outputScriptType)
      + +
      +
    • +
    • +
      +

      fromSpendingKeyB58

      +
      public static Wallet fromSpendingKeyB58(Network network, + String spendingKeyB58, + Instant creationTime)
      +
      Creates a wallet that tracks payments to and from the HD key hierarchy rooted by the given spending key.
      +
      +
      Parameters:
      +
      network - network wallet will operate on
      +
      spendingKeyB58 - The key in base58 notation
      +
      creationTime - creation time of the key (if unknown use fromWatchingKeyB58(Network, String)
      +
      Returns:
      +
      a new wallet
      +
      +
      +
    • +
    • +
      +

      fromSpendingKeyB58

      +
      @Deprecated +public static Wallet fromSpendingKeyB58(NetworkParameters params, + String spendingKeyB58, + Instant creationTime)
      + +
      +
    • +
    • +
      +

      fromSpendingKeyB58

      +
      public static Wallet fromSpendingKeyB58(Network network, + String spendingKeyB58)
      +
      Creates a wallet that tracks payments to and from the HD key hierarchy rooted by the given spending key. + The key's creation time will be set to DeterministicHierarchy.BIP32_STANDARDISATION_TIME.
      +
      +
      Parameters:
      +
      network - network wallet will operate on
      +
      spendingKeyB58 - The key in base58 notation
      +
      Returns:
      +
      a new wallet
      +
      +
      +
    • +
    • +
      +

      fromSpendingKeyB58

      +
      @Deprecated +public static Wallet fromSpendingKeyB58(NetworkParameters params, + String spendingKeyB58)
      + +
      +
    • +
    • +
      +

      fromSpendingKeyB58

      +
      @Deprecated +public static Wallet fromSpendingKeyB58(NetworkParameters params, + String spendingKeyB58, + long creationTimeSeconds)
      + +
      +
    • +
    • +
      +

      fromMasterKey

      +
      public static Wallet fromMasterKey(Network network, + DeterministicKey masterKey, + ScriptType outputScriptType, + ChildNumber accountNumber)
      +
      Creates a spending wallet that tracks payments to and from a BIP32-style HD key hierarchy rooted by masterKey and + accountNumber. The account path must be directly below the master key as in BIP-32. +

      + This method should not be used for BIP-43 compliant wallets or accounts not of the form m/accountNumber'. +

      + This wallet will not store the masterKey, only the account key.

      +
      +
      Parameters:
      +
      network - network the wallet will operate on
      +
      masterKey - root private key (e.g. path m)
      +
      outputScriptType - type of addresses (aka output scripts) to generate for receiving
      +
      accountNumber - account number to append, resulting in an account path of m/accountNumber'
      +
      Returns:
      +
      newly created Wallet object
      +
      +
      +
    • +
    • +
      +

      fromMasterKey

      +
      @Deprecated +public static Wallet fromMasterKey(NetworkParameters params, + DeterministicKey masterKey, + ScriptType outputScriptType, + ChildNumber accountNumber)
      + +
      +
    • +
    • +
      +

      network

      +
      public Network network()
      +
      +
    • +
    • +
      +

      getNetworkParameters

      +
      @Deprecated +public NetworkParameters getNetworkParameters()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      parseAddress

      +
      public Address parseAddress(String addressString) + throws AddressFormatException
      +
      Parse an address string using all formats this wallet knows about for the wallet's network type
      +
      +
      Specified by:
      +
      parseAddress in interface AddressParser
      +
      Parameters:
      +
      addressString - Address string to parse
      +
      Returns:
      +
      A validated address
      +
      Throws:
      +
      AddressFormatException - if invalid string
      +
      +
      +
    • +
    • +
      +

      getActiveKeyChains

      +
      public List<DeterministicKeyChain> getActiveKeyChains()
      +
      Gets the active keychains via KeyChainGroup.getActiveKeyChains(Instant).
      +
      +
    • +
    • +
      +

      getActiveKeyChain

      +
      public DeterministicKeyChain getActiveKeyChain()
      +
      Gets the default active keychain via KeyChainGroup.getActiveKeyChain().
      +
      +
    • +
    • +
      +

      addTransactionSigner

      +
      public final void addTransactionSigner(TransactionSigner signer)
      +

      Adds given transaction signer to the list of signers. It will be added to the end of the signers list, so if + this wallet already has some signers added, given signer will be executed after all of them.

      +

      Transaction signer should be fully initialized before adding to the wallet, otherwise IllegalStateException + will be thrown

      +
      +
    • +
    • +
      +

      getTransactionSigners

      +
      public List<TransactionSigner> getTransactionSigners()
      +
      +
    • +
    • +
      +

      currentKey

      +
      public DeterministicKey currentKey(KeyChain.KeyPurpose purpose)
      +
      Returns a key that hasn't been seen in a transaction yet, and which is suitable for displaying in a wallet + user interface as "a convenient key to receive funds on" when the purpose parameter is + KeyChain.KeyPurpose.RECEIVE_FUNDS. The returned key is stable until + it's actually seen in a pending or confirmed transaction, at which point this method will start returning + a different key (for each purpose independently).
      +
      +
    • +
    • +
      +

      currentReceiveKey

      +
      public DeterministicKey currentReceiveKey()
      +
      An alias for calling currentKey(KeyChain.KeyPurpose) with + KeyChain.KeyPurpose.RECEIVE_FUNDS as the parameter.
      +
      +
    • +
    • +
      +

      currentAddress

      +
      public Address currentAddress(KeyChain.KeyPurpose purpose)
      +
      Returns address for a currentKey(KeyChain.KeyPurpose)
      +
      +
    • +
    • +
      +

      currentReceiveAddress

      +
      public Address currentReceiveAddress()
      +
      An alias for calling currentAddress(KeyChain.KeyPurpose) with + KeyChain.KeyPurpose.RECEIVE_FUNDS as the parameter.
      +
      +
    • +
    • +
      +

      freshKey

      +
      public DeterministicKey freshKey(KeyChain.KeyPurpose purpose)
      +
      Returns a key that has not been returned by this method before (fresh). You can think of this as being + a newly created key, although the notion of "create" is not really valid for a + DeterministicKeyChain. When the parameter is + KeyChain.KeyPurpose.RECEIVE_FUNDS the returned key is suitable for being put + into a receive coins wizard type UI. You should use this when the user is definitely going to hand this key out + to someone who wishes to send money.
      +
      +
    • +
    • +
      +

      freshKeys

      +
      public List<DeterministicKey> freshKeys(KeyChain.KeyPurpose purpose, + int numberOfKeys)
      +
      Returns a key/s that has not been returned by this method before (fresh). You can think of this as being + a newly created key/s, although the notion of "create" is not really valid for a + DeterministicKeyChain. When the parameter is + KeyChain.KeyPurpose.RECEIVE_FUNDS the returned key is suitable for being put + into a receive coins wizard type UI. You should use this when the user is definitely going to hand this key/s out + to someone who wishes to send money.
      +
      +
    • +
    • +
      +

      freshReceiveKey

      +
      public DeterministicKey freshReceiveKey()
      +
      An alias for calling freshKey(KeyChain.KeyPurpose) with + KeyChain.KeyPurpose.RECEIVE_FUNDS as the parameter.
      +
      +
    • +
    • +
      +

      freshAddress

      +
      public Address freshAddress(KeyChain.KeyPurpose purpose)
      +
      Returns address for a freshKey(KeyChain.KeyPurpose)
      +
      +
    • +
    • +
      +

      freshReceiveAddress

      +
      public Address freshReceiveAddress()
      +
      An alias for calling freshAddress(KeyChain.KeyPurpose) with + KeyChain.KeyPurpose.RECEIVE_FUNDS as the parameter.
      +
      +
    • +
    • +
      +

      freshReceiveAddress

      +
      public Address freshReceiveAddress(ScriptType scriptType)
      +

      Returns a fresh receive address for a given ScriptType.

      +

      This method is meant for when you really need a fallback address. Normally, you should be + using freshAddress(KeyChain.KeyPurpose) or + currentAddress(KeyChain.KeyPurpose).

      +
      +
    • +
    • +
      +

      getIssuedReceiveKeys

      +
      public List<ECKey> getIssuedReceiveKeys()
      +
      Returns only the keys that have been issued by freshReceiveKey(), freshReceiveAddress(), + currentReceiveKey() or currentReceiveAddress().
      +
      +
    • +
    • +
      +

      getIssuedReceiveAddresses

      +
      public List<Address> getIssuedReceiveAddresses()
      +
      Returns only the addresses that have been issued by freshReceiveKey(), freshReceiveAddress(), + currentReceiveKey() or currentReceiveAddress().
      +
      +
    • +
    • +
      +

      upgradeToDeterministic

      +
      public void upgradeToDeterministic(ScriptType outputScriptType, + @Nullable + AesKey aesKey) + throws DeterministicUpgradeRequiresPassword
      +
      Upgrades the wallet to be deterministic (BIP32). You should call this, possibly providing the users encryption + key, after loading a wallet produced by previous versions of bitcoinj. If the wallet is encrypted the key + must be provided, due to the way the seed is derived deterministically from private key bytes: failing + to do this will result in an exception being thrown. For non-encrypted wallets, the upgrade will be done for + you automatically the first time a new key is requested (this happens when spending due to the change address).
      +
      +
      Throws:
      +
      DeterministicUpgradeRequiresPassword
      +
      +
      +
    • +
    • +
      +

      upgradeToDeterministic

      +
      public void upgradeToDeterministic(ScriptType outputScriptType, + KeyChainGroupStructure structure, + @Nullable + AesKey aesKey) + throws DeterministicUpgradeRequiresPassword
      +
      Upgrades the wallet to be deterministic (BIP32). You should call this, possibly providing the users encryption + key, after loading a wallet produced by previous versions of bitcoinj. If the wallet is encrypted the key + must be provided, due to the way the seed is derived deterministically from private key bytes: failing + to do this will result in an exception being thrown. For non-encrypted wallets, the upgrade will be done for + you automatically the first time a new key is requested (this happens when spending due to the change address).
      +
      +
      Throws:
      +
      DeterministicUpgradeRequiresPassword
      +
      +
      +
    • +
    • +
      +

      isDeterministicUpgradeRequired

      +
      public boolean isDeterministicUpgradeRequired(ScriptType outputScriptType)
      +
      Returns true if the wallet contains random keys and no HD chains, in which case you should call + upgradeToDeterministic(ScriptType, AesKey) before attempting to do anything + that would require a new address or key.
      +
      +
    • +
    • +
      +

      getWatchedScripts

      +
      public List<Script> getWatchedScripts()
      +
      Returns a snapshot of the watched scripts. This view is not live.
      +
      +
    • +
    • +
      +

      removeKey

      +
      public boolean removeKey(ECKey key)
      +
      Removes the given key from the basicKeyChain. Be very careful with this - losing a private key destroys the + money associated with it.
      +
      +
      Returns:
      +
      Whether the key was removed or not.
      +
      +
      +
    • +
    • +
      +

      getKeyChainGroupSize

      +
      public int getKeyChainGroupSize()
      +
      Returns the number of keys in the key chain group, including lookahead keys.
      +
      +
    • +
    • +
      +

      getKeyChainGroupCombinedKeyLookaheadEpochs

      +
      public int getKeyChainGroupCombinedKeyLookaheadEpochs()
      +
      +
    • +
    • +
      +

      getImportedKeys

      +
      public List<ECKey> getImportedKeys()
      +
      Returns a list of the non-deterministic keys that have been imported into the wallet, or the empty list if none.
      +
      +
    • +
    • +
      +

      currentChangeAddress

      +
      public Address currentChangeAddress()
      +
      Returns the address used for change outputs. Note: this will probably go away in future.
      +
      +
    • +
    • +
      +

      importKey

      +
      public boolean importKey(ECKey key)
      +

      Imports the given ECKey to the wallet.

      + +

      If the wallet is configured to auto save to a file, triggers a save immediately. Runs the onKeysAdded event + handler. If the key already exists in the wallet, does nothing and returns false.

      +
      +
    • +
    • +
      +

      importKeys

      +
      public int importKeys(List<ECKey> keys)
      +
      Imports the given keys to the wallet. + If autosaveToFile(File, Duration, WalletFiles.Listener) + has been called, triggers an auto save bypassing the normal coalescing delay and event handlers. + Returns the number of keys added, after duplicates are ignored. The onKeyAdded event will be called for each key + in the list that was not already present.
      +
      +
    • +
    • +
      +

      importKeysAndEncrypt

      +
      public int importKeysAndEncrypt(List<ECKey> keys, + CharSequence password)
      +
      Takes a list of keys and a password, then encrypts and imports them in one step using the current keycrypter.
      +
      +
    • +
    • +
      +

      importKeysAndEncrypt

      +
      public int importKeysAndEncrypt(List<ECKey> keys, + AesKey aesKey)
      +
      Takes a list of keys and an AES key, then encrypts and imports them in one step using the current keycrypter.
      +
      +
    • +
    • +
      +

      addAndActivateHDChain

      +
      public void addAndActivateHDChain(DeterministicKeyChain chain)
      +
      Add a pre-configured keychain to the wallet. Useful for setting up a complex keychain, + such as for a married wallet (which is not supported any more).
      +
      +
    • +
    • +
      +

      getKeyChainGroupLookaheadSize

      +
      public int getKeyChainGroupLookaheadSize()
      + +
      +
    • +
    • +
      +

      getKeyChainGroupLookaheadThreshold

      +
      public int getKeyChainGroupLookaheadThreshold()
      + +
      +
    • +
    • +
      +

      getWatchingKey

      +
      public DeterministicKey getWatchingKey()
      +
      Returns a public-only DeterministicKey that can be used to set up a watching wallet: that is, a wallet that + can import transactions from the block chain just as the normal wallet can, but which cannot spend. Watching + wallets are very useful for things like web servers that accept payments. This key corresponds to the account + zero key in the recommended BIP32 hierarchy.
      +
      +
    • +
    • +
      +

      isWatching

      +
      public boolean isWatching()
      +
      Returns whether this wallet consists entirely of watching keys (unencrypted keys with no private part). Mixed + wallets are forbidden.
      +
      +
      Throws:
      +
      IllegalStateException - if there are no keys, or if there is a mix between watching and non-watching keys.
      +
      +
      +
    • +
    • +
      +

      isAddressWatched

      +
      public boolean isAddressWatched(Address address)
      +
      Return true if we are watching this address.
      +
      +
    • +
    • +
      +

      addWatchedAddress

      +
      public boolean addWatchedAddress(Address address)
      +
      Same as addWatchedAddress(Address, Instant) with the current time as the creation time.
      +
      +
    • +
    • +
      +

      addWatchedAddress

      +
      public boolean addWatchedAddress(Address address, + Instant creationTime)
      +
      Adds the given address to the wallet to be watched. Outputs can be retrieved by getWatchedOutputs(boolean).
      +
      +
      Parameters:
      +
      creationTime - creation time, for scanning the blockchain
      +
      Returns:
      +
      whether the address was added successfully (not already present)
      +
      +
      +
    • +
    • +
      +

      addWatchedAddress

      +
      @Deprecated +public boolean addWatchedAddress(Address address, + long creationTime)
      + +
      +
    • +
    • +
      +

      addWatchedAddresses

      +
      public int addWatchedAddresses(List<Address> addresses, + Instant creationTime)
      +
      Adds the given addresses to the wallet to be watched. Outputs can be retrieved + by getWatchedOutputs(boolean).
      +
      +
      Parameters:
      +
      addresses - addresses to be watched
      +
      creationTime - creation time of the addresses
      +
      Returns:
      +
      how many addresses were added successfully
      +
      +
      +
    • +
    • +
      +

      addWatchedAddresses

      +
      public int addWatchedAddresses(List<Address> addresses)
      +
      Adds the given addresses to the wallet to be watched. Outputs can be retrieved + by getWatchedOutputs(boolean). Use this if the creation time of the addresses is unknown.
      +
      +
      Parameters:
      +
      addresses - addresses to be watched
      +
      Returns:
      +
      how many addresses were added successfully
      +
      +
      +
    • +
    • +
      +

      addWatchedAddresses

      +
      @Deprecated +public int addWatchedAddresses(List<Address> addresses, + long creationTime)
      + +
      +
    • +
    • +
      +

      addWatchedScripts

      +
      public int addWatchedScripts(List<Script> scripts)
      +
      Adds the given output scripts to the wallet to be watched. Outputs can be retrieved by getWatchedOutputs(boolean). + If a script is already being watched, the object is replaced with the one in the given list. As Script + equality is defined in terms of program bytes only this lets you update metadata such as creation time. Note that + you should be careful not to add scripts with a creation time of zero (the default!) because otherwise it will + disable the important wallet checkpointing optimisation.
      +
      +
      Returns:
      +
      how many scripts were added successfully
      +
      +
      +
    • +
    • +
      +

      removeWatchedAddress

      +
      public boolean removeWatchedAddress(Address address)
      +
      Removes the given output scripts from the wallet that were being watched.
      +
      +
      Returns:
      +
      true if successful
      +
      +
      +
    • +
    • +
      +

      removeWatchedAddresses

      +
      public boolean removeWatchedAddresses(List<Address> addresses)
      +
      Removes the given output scripts from the wallet that were being watched.
      +
      +
      Returns:
      +
      true if successful
      +
      +
      +
    • +
    • +
      +

      removeWatchedScripts

      +
      public boolean removeWatchedScripts(List<Script> scripts)
      +
      Removes the given output scripts from the wallet that were being watched.
      +
      +
      Returns:
      +
      true if successful
      +
      +
      +
    • +
    • +
      +

      getWatchedAddresses

      +
      public List<Address> getWatchedAddresses()
      +
      Returns all addresses watched by this wallet.
      +
      +
    • +
    • +
      +

      findKeyFromPubKeyHash

      +
      @Nullable +public ECKey findKeyFromPubKeyHash(byte[] pubKeyHash, + @Nullable + ScriptType scriptType)
      +
      Locates a keypair from the basicKeyChain given the hash of the public key. This is needed when finding out which + key we need to use to redeem a transaction output.
      +
      +
      Specified by:
      +
      findKeyFromPubKeyHash in interface KeyBag
      +
      Parameters:
      +
      pubKeyHash - hash of the keypair to look for
      +
      scriptType - only look for given usage (currently ScriptType.P2PKH or + ScriptType.P2WPKH) or null if we don't care
      +
      Returns:
      +
      ECKey object or null if no such key was found.
      +
      +
      +
    • +
    • +
      +

      hasKey

      +
      public boolean hasKey(ECKey key)
      +
      Returns true if the given key is in the wallet, false otherwise. Currently an O(N) operation.
      +
      +
    • +
    • +
      +

      isAddressMine

      +
      public boolean isAddressMine(Address address)
      +
      Returns true if the address is belongs to this wallet.
      +
      +
    • +
    • +
      +

      isPubKeyHashMine

      +
      public boolean isPubKeyHashMine(byte[] pubKeyHash, + @Nullable + ScriptType scriptType)
      +
      Description copied from interface: TransactionBag
      +
      Look for a public key which hashes to the given hash and (optionally) is used for a specific script type.
      +
      +
      Specified by:
      +
      isPubKeyHashMine in interface TransactionBag
      +
      Parameters:
      +
      pubKeyHash - hash of the public key to look for
      +
      scriptType - only look for given usage (currently ScriptType.P2PKH or ScriptType.P2WPKH) or null if we don't care
      +
      Returns:
      +
      true if hash was found
      +
      +
      +
    • +
    • +
      +

      isWatchedScript

      +
      public boolean isWatchedScript(Script script)
      +
      Description copied from interface: TransactionBag
      +
      Returns true if this wallet is watching transactions for outputs with the script.
      +
      +
      Specified by:
      +
      isWatchedScript in interface TransactionBag
      +
      +
      +
    • +
    • +
      +

      findKeyFromAddress

      +
      public ECKey findKeyFromAddress(Address address)
      +
      Locates a keypair from the wallet given the corresponding address.
      +
      +
      Returns:
      +
      ECKey or null if no such key was found.
      +
      +
      +
    • +
    • +
      +

      findKeyFromPubKey

      +
      @Nullable +public ECKey findKeyFromPubKey(byte[] pubKey)
      +
      Locates a keypair from the basicKeyChain given the raw public key bytes.
      +
      +
      Specified by:
      +
      findKeyFromPubKey in interface KeyBag
      +
      Returns:
      +
      ECKey or null if no such key was found.
      +
      +
      +
    • +
    • +
      +

      isPubKeyMine

      +
      public boolean isPubKeyMine(byte[] pubKey)
      +
      Description copied from interface: TransactionBag
      +
      Returns true if this wallet contains a keypair with the given public key.
      +
      +
      Specified by:
      +
      isPubKeyMine in interface TransactionBag
      +
      +
      +
    • +
    • +
      +

      findRedeemDataFromScriptHash

      +
      @Nullable +public RedeemData findRedeemDataFromScriptHash(byte[] payToScriptHash)
      +
      Locates a redeem data (redeem script and keys) from the keyChainGroup given the hash of the script. + Returns RedeemData object or null if no such data was found.
      +
      +
      Specified by:
      +
      findRedeemDataFromScriptHash in interface KeyBag
      +
      +
      +
    • +
    • +
      +

      isPayToScriptHashMine

      +
      public boolean isPayToScriptHashMine(byte[] payToScriptHash)
      +
      Description copied from interface: TransactionBag
      +
      Returns true if this wallet knows the script corresponding to the given hash.
      +
      +
      Specified by:
      +
      isPayToScriptHashMine in interface TransactionBag
      +
      +
      +
    • +
    • +
      +

      getKeyChainSeed

      +
      public DeterministicSeed getKeyChainSeed()
      +
      Returns the immutable seed for the current active HD chain.
      +
      +
      Throws:
      +
      ECKey.MissingPrivateKeyException - if the seed is unavailable (watching wallet)
      +
      +
      +
    • +
    • +
      +

      getKeyByPath

      +
      public DeterministicKey getKeyByPath(List<ChildNumber> path)
      +
      Returns a key for the given HD path, assuming it's already been derived. You normally shouldn't use this: + use currentReceiveKey/freshReceiveKey instead.
      +
      +
    • +
    • +
      +

      encrypt

      +
      public void encrypt(CharSequence password)
      +
      Convenience wrapper around encrypt(KeyCrypter, AesKey) which uses the default Scrypt key derivation algorithm and + parameters to derive a key from the given password.
      +
      +
    • +
    • +
      +

      encrypt

      +
      public void encrypt(KeyCrypter keyCrypter, + AesKey aesKey)
      +
      Encrypt the wallet using the KeyCrypter and the AES key. A good default KeyCrypter to use is + KeyCrypterScrypt.
      +
      +
      Parameters:
      +
      keyCrypter - The KeyCrypter that specifies how to encrypt/ decrypt a key
      +
      aesKey - AES key to use (normally created using KeyCrypter#deriveKey and cached as it is time consuming to create from a password)
      +
      Throws:
      +
      KeyCrypterException - Thrown if the wallet encryption fails. If so, the wallet state is unchanged.
      +
      +
      +
    • +
    • +
      +

      decrypt

      +
      public void decrypt(CharSequence password) + throws Wallet.BadWalletEncryptionKeyException
      +
      Decrypt the wallet with the wallets keyCrypter and password.
      +
      +
      Throws:
      +
      Wallet.BadWalletEncryptionKeyException - Thrown if the given password is wrong. If so, the wallet state is unchanged.
      +
      KeyCrypterException - Thrown if the wallet decryption fails. If so, the wallet state is unchanged.
      +
      +
      +
    • +
    • +
      +

      decrypt

      +
      public void decrypt(AesKey aesKey) + throws Wallet.BadWalletEncryptionKeyException
      +
      Decrypt the wallet with the wallets keyCrypter and AES key.
      +
      +
      Parameters:
      +
      aesKey - AES key to use (normally created using KeyCrypter#deriveKey and cached as it is time consuming to create from a password)
      +
      Throws:
      +
      Wallet.BadWalletEncryptionKeyException - Thrown if the given aesKey is wrong. If so, the wallet state is unchanged.
      +
      KeyCrypterException - Thrown if the wallet decryption fails. If so, the wallet state is unchanged.
      +
      +
      +
    • +
    • +
      +

      checkPassword

      +
      public boolean checkPassword(CharSequence password)
      +
      Check whether the password can decrypt the first key in the wallet. + This can be used to check the validity of an entered password.
      +
      +
      Returns:
      +
      boolean true if password supplied can decrypt the first private key in the wallet, false otherwise.
      +
      Throws:
      +
      IllegalStateException - if the wallet is not encrypted.
      +
      +
      +
    • +
    • +
      +

      checkAESKey

      +
      public boolean checkAESKey(AesKey aesKey)
      +
      Check whether the AES key can decrypt the first encrypted key in the wallet.
      +
      +
      Returns:
      +
      boolean true if AES key supplied can decrypt the first encrypted private key in the wallet, false otherwise.
      +
      +
      +
    • +
    • +
      +

      getKeyCrypter

      +
      @Nullable +public KeyCrypter getKeyCrypter()
      +
      Get the wallet's KeyCrypter, or null if the wallet is not encrypted. + (Used in encrypting/ decrypting an ECKey).
      +
      +
    • +
    • +
      +

      getEncryptionType

      +
      public org.bitcoinj.protobuf.wallet.Protos.Wallet.EncryptionType getEncryptionType()
      +
      Get the type of encryption used for this wallet. + + (This is a convenience method - the encryption type is actually stored in the keyCrypter).
      +
      +
    • +
    • +
      +

      isEncrypted

      +
      public boolean isEncrypted()
      +
      Returns true if the wallet is encrypted using any scheme, false if not.
      +
      +
    • +
    • +
      +

      changeEncryptionPassword

      +
      public void changeEncryptionPassword(CharSequence currentPassword, + CharSequence newPassword) + throws Wallet.BadWalletEncryptionKeyException
      +
      Changes wallet encryption password, this is atomic operation.
      +
      +
      Throws:
      +
      Wallet.BadWalletEncryptionKeyException - Thrown if the given currentPassword is wrong. If so, the wallet state is unchanged.
      +
      KeyCrypterException - Thrown if the wallet decryption fails. If so, the wallet state is unchanged.
      +
      +
      +
    • +
    • +
      +

      changeEncryptionKey

      +
      public void changeEncryptionKey(KeyCrypter keyCrypter, + AesKey currentAesKey, + AesKey newAesKey) + throws Wallet.BadWalletEncryptionKeyException
      +
      Changes wallet AES encryption key, this is atomic operation.
      +
      +
      Throws:
      +
      Wallet.BadWalletEncryptionKeyException - Thrown if the given currentAesKey is wrong. If so, the wallet state is unchanged.
      +
      KeyCrypterException - Thrown if the wallet decryption fails. If so, the wallet state is unchanged.
      +
      +
      +
    • +
    • +
      +

      serializeKeyChainGroupToProtobuf

      +
      @Deprecated +public List<org.bitcoinj.protobuf.wallet.Protos.Key> serializeKeyChainGroupToProtobuf()
      +
      Deprecated.
      +
      +
    • +
    • +
      +

      saveToFile

      +
      public void saveToFile(File tempFile, + File destFile) + throws IOException
      +
      Saves the wallet first to the given temporary file, then renames to the destination file. This is done to make + the save an atomic operation.
      +
      +
      Parameters:
      +
      tempFile - temporary file to use for saving the wallet
      +
      destFile - file to save the wallet to
      +
      Throws:
      +
      FileNotFoundException - if directory doesn't exist
      +
      IOException - if an error occurs while saving
      +
      +
      +
    • +
    • +
      +

      saveToFile

      +
      public void saveToFile(File f) + throws IOException
      +
      Uses protobuf serialization to save the wallet to the given file. To learn more about this file format, see + WalletProtobufSerializer. Writes out first to a temporary file in the same directory and then renames + once written.
      +
      +
      Parameters:
      +
      f - File to save wallet
      +
      Throws:
      +
      FileNotFoundException - if directory doesn't exist
      +
      IOException - if an error occurs while saving
      +
      +
      +
    • +
    • +
      +

      setAcceptRiskyTransactions

      +
      public void setAcceptRiskyTransactions(boolean acceptRiskyTransactions)
      +

      Whether or not the wallet will ignore pending transactions that fail the selected + RiskAnalysis. By default, if a transaction is considered risky then it won't enter the wallet + and won't trigger any event listeners. If you set this property to true, then all transactions will + be allowed in regardless of risk. For example, the DefaultRiskAnalysis checks for non-finality of + transactions.

      + +

      Note that this property is not serialized. You have to set it each time a Wallet object is constructed, + even if it's loaded from a protocol buffer.

      +
      +
    • +
    • +
      +

      isAcceptRiskyTransactions

      +
      public boolean isAcceptRiskyTransactions()
      +
      See setAcceptRiskyTransactions(boolean) for an explanation of this property.
      +
      +
    • +
    • +
      +

      setRiskAnalyzer

      +
      public void setRiskAnalyzer(RiskAnalysis.Analyzer analyzer)
      +
      Sets the RiskAnalysis implementation to use for deciding whether received pending transactions are risky + or not. If the analyzer says a transaction is risky, by default it will be dropped. You can customize this + behaviour with setAcceptRiskyTransactions(boolean).
      +
      +
    • +
    • +
      +

      getRiskAnalyzer

      +
      public RiskAnalysis.Analyzer getRiskAnalyzer()
      +
      Gets the current RiskAnalysis implementation. The default is DefaultRiskAnalysis.
      +
      +
    • +
    • +
      +

      autosaveToFile

      +
      public WalletFiles autosaveToFile(File f, + Duration delay, + @Nullable + WalletFiles.Listener eventListener)
      +

      Sets up the wallet to auto-save itself to the given file, using temp files with atomic renames to ensure + consistency. After connecting to a file, you no longer need to save the wallet manually, it will do it + whenever necessary. Protocol buffer serialization will be used.

      + +

      A background thread will be created and the wallet will only be saved to + disk every periodically. If no changes have occurred for the given time period, nothing will be written. + In this way disk IO can be rate limited. It's a good idea to set this as otherwise the wallet can change very + frequently, e.g. if there are a lot of transactions in it or during block sync, and there will be a lot of redundant + writes. Note that when a new key is added, that always results in an immediate save regardless of + delay. You should still save the wallet manually using saveToFile(File) when your program + is about to shut down as the JVM will not wait for the background thread.

      + +

      An event listener can be provided. It will be called on a background thread + with the wallet locked when an auto-save occurs.

      +
      +
      Parameters:
      +
      f - The destination file to save to.
      +
      delay - How much time to wait until saving the wallet on a background thread.
      +
      eventListener - callback to be informed when the auto-save thread does things, or null
      +
      +
      +
    • +
    • +
      +

      autosaveToFile

      +
      @Deprecated +public WalletFiles autosaveToFile(File f, + long delayTime, + TimeUnit timeUnit, + @Nullable + WalletFiles.Listener eventListener)
      + +
      +
    • +
    • +
      +

      shutdownAutosaveAndWait

      +
      public void shutdownAutosaveAndWait()
      +

      + Disables auto-saving, after it had been enabled with + autosaveToFile(File, Duration, WalletFiles.Listener) + before. This method blocks until finished. +

      +
      +
    • +
    • +
      +

      saveLater

      +
      protected void saveLater()
      +
      Requests an asynchronous save on a background thread
      +
      +
    • +
    • +
      +

      saveNow

      +
      protected void saveNow()
      +
      If auto saving is enabled, do an immediate sync write to disk ignoring any delays.
      +
      +
    • +
    • +
      +

      saveToFileStream

      +
      public void saveToFileStream(OutputStream f) + throws IOException
      +
      Uses protobuf serialization to save the wallet to the given file stream. To learn more about this file format, see + WalletProtobufSerializer.
      +
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      getParams

      +
      @Deprecated +public NetworkParameters getParams()
      +
      Deprecated. + +
      +
      Returns the parameters this wallet was created with.
      +
      +
    • +
    • +
      +

      loadFromFile

      +
      public static Wallet loadFromFile(File file, + @Nullable + WalletExtension... walletExtensions) + throws UnreadableWalletException
      +
      Returns a wallet deserialized from the given file. Extensions previously saved with the wallet can be + deserialized by calling @WalletExtension.deserializeWalletExtension(Wallet, byte[])}
      +
      +
      Parameters:
      +
      file - the wallet file to read
      +
      walletExtensions - extensions possibly added to the wallet.
      +
      Returns:
      +
      The Wallet
      +
      Throws:
      +
      UnreadableWalletException - if there was a problem loading or parsing the file
      +
      +
      +
    • +
    • +
      +

      loadFromFile

      +
      public static Wallet loadFromFile(File file, + WalletProtobufSerializer.WalletFactory factory, + boolean forceReset, + boolean ignoreMandatoryExtensions, + @Nullable + WalletExtension... walletExtensions) + throws UnreadableWalletException
      +
      Returns a wallet deserialized from the given file. Extensions previously saved with the wallet can be + deserialized by calling @WalletExtension.deserializeWalletExtension(Wallet, byte[])}
      +
      +
      Parameters:
      +
      file - the wallet file to read
      +
      factory - wallet factory
      +
      forceReset - force a reset of the wallet
      +
      ignoreMandatoryExtensions - if true, mandatory extensions will be ignored instead of causing load errors (not recommended)
      +
      walletExtensions - extensions possibly added to the wallet.
      +
      Returns:
      +
      The Wallet
      +
      Throws:
      +
      UnreadableWalletException - if there was a problem loading or parsing the file
      +
      +
      +
    • +
    • +
      +

      isConsistent

      +
      public boolean isConsistent()
      +
      Returns if this wallet is structurally consistent, so e.g. no duplicate transactions. First inconsistency and a + dump of the wallet will be logged.
      +
      +
    • +
    • +
      +

      isConsistentOrThrow

      +
      public void isConsistentOrThrow() + throws IllegalStateException
      +
      Variant of isConsistent() that throws an IllegalStateException describing the first + inconsistency.
      +
      +
      Throws:
      +
      IllegalStateException
      +
      +
      +
    • +
    • +
      +

      loadFromFileStream

      +
      public static Wallet loadFromFileStream(InputStream stream, + @Nullable + WalletExtension... walletExtensions) + throws UnreadableWalletException
      +
      Returns a wallet deserialized from the given input stream and wallet extensions.
      +
      +
      Parameters:
      +
      stream - An open InputStream containing a ProtoBuf Wallet
      +
      walletExtensions - extensions possibly added to the wallet.
      +
      Returns:
      +
      The Wallet
      +
      Throws:
      +
      UnreadableWalletException - if there was a problem reading or parsing the stream
      +
      +
      +
    • +
    • +
      +

      loadFromFileStream

      +
      public static Wallet loadFromFileStream(InputStream stream, + WalletProtobufSerializer.WalletFactory factory, + boolean forceReset, + boolean ignoreMandatoryExtensions, + @Nullable + WalletExtension... walletExtensions) + throws UnreadableWalletException
      +
      Returns a wallet deserialized from the given input stream and wallet extensions.
      +
      +
      Parameters:
      +
      stream - An open InputStream containing a ProtoBuf Wallet
      +
      factory - wallet factory
      +
      forceReset - if true, configure wallet to replay transactions from the blockchain
      +
      ignoreMandatoryExtensions - if true, mandatory extensions will be ignored instead of causing load errors (not recommended)
      +
      walletExtensions - extensions possibly added to the wallet.
      +
      Returns:
      +
      The Wallet
      +
      Throws:
      +
      UnreadableWalletException - if there was a problem reading or parsing the stream
      +
      +
      +
    • +
    • +
      +

      notifyTransactionIsInBlock

      +
      public boolean notifyTransactionIsInBlock(Sha256Hash txHash, + StoredBlock block, + AbstractBlockChain.NewBlockType blockType, + int relativityOffset) + throws VerificationException
      +
      Called by the BlockChain when we receive a new filtered block that contains a transactions previously + received by a call to receivePending(org.bitcoinj.core.Transaction, java.util.List<org.bitcoinj.core.Transaction>, boolean).

      + + This is necessary for the internal book-keeping Wallet does. When a transaction is received that sends us + coins it is added to a pool so we can use it later to create spends. When a transaction is received that + consumes outputs they are marked as spent so they won't be used in future.

      + + A transaction that spends our own coins can be received either because a spend we created was accepted by the + network and thus made it into a block, or because our keys are being shared between multiple instances and + some other node spent the coins instead. We still have to know about that to avoid accidentally trying to + double spend.

      + + A transaction may be received multiple times if is included into blocks in parallel chains. The blockType + parameter describes whether the containing block is on the main/best chain or whether it's on a presently + inactive side chain. We must still record these transactions and the blocks they appear in because a future + block might change which chain is best causing a reorganize. A re-org can totally change our balance!

      +
      +
      Specified by:
      +
      notifyTransactionIsInBlock in interface TransactionReceivedInBlockListener
      +
      Returns:
      +
      whether the transaction is known about i.e. was considered relevant previously.
      +
      Throws:
      +
      VerificationException
      +
      +
      +
    • +
    • +
      +

      receivePending

      +
      public void receivePending(Transaction tx, + @Nullable + List<Transaction> dependencies, + boolean overrideIsRelevant) + throws VerificationException
      +

      Called when we have found a transaction (via network broadcast or otherwise) that is relevant to this wallet + and want to record it. Note that we cannot verify these transactions at all, they may spend fictional + coins or be otherwise invalid. They are useful to inform the user about coins they can expect to receive soon, + and if you trust the sender of the transaction you can choose to assume they are in fact valid and will not + be double spent as an optimization.

      + +

      This is the same as receivePending(Transaction, List) but allows you to override the + isPendingTransactionRelevant(Transaction) sanity-check to keep track of transactions that are not + spendable or spend our coins. This can be useful when you want to keep track of transaction confidence on + arbitrary transactions. Note that transactions added in this way will still be relayed to peers and appear in + transaction lists like any other pending transaction (even when not relevant).

      +
      +
      Throws:
      +
      VerificationException
      +
      +
      +
    • +
    • +
      +

      isTransactionRisky

      +
      public boolean isTransactionRisky(Transaction tx, + @Nullable + List<Transaction> dependencies)
      +
      Given a transaction and an optional list of dependencies (recursive/flattened), returns true if the given + transaction would be rejected by the analyzer, or false otherwise. The result of this call is independent + of the value of isAcceptRiskyTransactions(). Risky transactions yield a logged warning. If you + want to know the reason why a transaction is risky, create an instance of the RiskAnalysis yourself + using the factory returned by getRiskAnalyzer() and use it directly.
      +
      +
    • +
    • +
      +

      receivePending

      +
      public void receivePending(Transaction tx, + @Nullable + List<Transaction> dependencies) + throws VerificationException
      +

      Called when we have found a transaction (via network broadcast or otherwise) that is relevant to this wallet + and want to record it. Note that we cannot verify these transactions at all, they may spend fictional + coins or be otherwise invalid. They are useful to inform the user about coins they can expect to receive soon, + and if you trust the sender of the transaction you can choose to assume they are in fact valid and will not + be double spent as an optimization.

      + +

      Before this method is called, isPendingTransactionRelevant(Transaction) should have been + called to decide whether the wallet cares about the transaction - if it does, then this method expects the + transaction and any dependencies it has which are still in the memory pool.

      +
      +
      Throws:
      +
      VerificationException
      +
      +
      +
    • +
    • +
      +

      isPendingTransactionRelevant

      +
      public boolean isPendingTransactionRelevant(Transaction tx) + throws ScriptException
      +
      This method is used by a Peer to find out if a transaction that has been announced is interesting, + that is, whether we should bother downloading its dependencies and exploring the transaction to decide how + risky it is. If this method returns true then receivePending(Transaction, List) + will soon be called with the transactions dependencies as well.
      +
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      isTransactionRelevant

      +
      public boolean isTransactionRelevant(Transaction tx) + throws ScriptException
      +

      Returns true if the given transaction sends coins to any of our keys, or has inputs spending any of our outputs, + and also returns true if tx has inputs that are spending outputs which are + not ours but which are spent by pending transactions.

      + +

      Note that if the tx has inputs containing one of our keys, but the connected transaction is not in the wallet, + it will not be considered relevant.

      +
      +
      Throws:
      +
      ScriptException
      +
      +
      +
    • +
    • +
      +

      isTransactionMature

      +
      public boolean isTransactionMature(Transaction tx)
      +
      Determine if a transaction is mature. A coinbase transaction is mature if it has been confirmed at least + NetworkParameters.getSpendableCoinbaseDepth() times. On BitcoinNetwork.MAINNET this value is 100. + For purposes of this method, non-coinbase transactions are also considered mature.
      +
      +
      Parameters:
      +
      tx - the transaction to evaluate
      +
      Returns:
      +
      true if it is a mature coinbase transaction or if it is not a coinbase transaction
      +
      +
      +
    • +
    • +
      +

      receiveFromBlock

      +
      public void receiveFromBlock(Transaction tx, + StoredBlock block, + AbstractBlockChain.NewBlockType blockType, + int relativityOffset) + throws VerificationException
      +
      Called by the BlockChain when we receive a new block that sends coins to one of our addresses or + spends coins from one of our addresses (note that a single transaction can do both).

      + + This is necessary for the internal book-keeping Wallet does. When a transaction is received that sends us + coins it is added to a pool so we can use it later to create spends. When a transaction is received that + consumes outputs they are marked as spent so they won't be used in future.

      + + A transaction that spends our own coins can be received either because a spend we created was accepted by the + network and thus made it into a block, or because our keys are being shared between multiple instances and + some other node spent the coins instead. We still have to know about that to avoid accidentally trying to + double spend.

      + + A transaction may be received multiple times if is included into blocks in parallel chains. The blockType + parameter describes whether the containing block is on the main/best chain or whether it's on a presently + inactive side chain. We must still record these transactions and the blocks they appear in because a future + block might change which chain is best causing a reorganize. A re-org can totally change our balance!

      +
      +
      Specified by:
      +
      receiveFromBlock in interface TransactionReceivedInBlockListener
      +
      Throws:
      +
      VerificationException
      +
      +
      +
    • +
    • +
      +

      notifyNewBestBlock

      +
      public void notifyNewBestBlock(StoredBlock block) + throws VerificationException
      +

      Called by the BlockChain when a new block on the best chain is seen, AFTER relevant wallet + transactions are extracted and sent to us UNLESS the new block caused a re-org, in which case this will + not be called (the reorganize(StoredBlock, List, List) method will + call this one in that case).

      +

      Used to update confidence data in each transaction and last seen block hash. Triggers auto saving. + Invokes the onWalletChanged event listener if there were any affected transactions.

      +
      +
      Specified by:
      +
      notifyNewBestBlock in interface NewBestBlockListener
      +
      Throws:
      +
      VerificationException
      +
      +
      +
    • +
    • +
      +

      maybeCommitTx

      +
      public boolean maybeCommitTx(Transaction tx) + throws VerificationException
      +
      Updates the wallet with the given transaction: puts it into the pending pool, sets the spent flags and runs + the onCoinsSent/onCoinsReceived event listener. +

      + Triggers an auto save (if enabled.) +

      + Unlike commitTx(org.bitcoinj.core.Transaction) this method does not throw an exception if the transaction + was already added to the wallet, instead it will return false

      +
      +
      Parameters:
      +
      tx - transaction to commit
      +
      Returns:
      +
      true if the tx was added to the wallet, or false if it was already in the pending pool
      +
      Throws:
      +
      VerificationException - If transaction fails to verify
      +
      +
      +
    • +
    • +
      +

      commitTx

      +
      public void commitTx(Transaction tx) + throws VerificationException
      +
      Updates the wallet with the given transaction: puts it into the pending pool, sets the spent flags and runs + the onCoinsSent/onCoinsReceived event listener. Used in two situations: +
        +
      1. When we have just successfully transmitted the tx we created to the network.
      2. +
      3. When we receive a pending transaction that didn't appear in the chain yet, and we did not create it.
      4. +
      + Triggers an auto save (if enabled.) +

      + Unlike maybeCommitTx(org.bitcoinj.core.Transaction) commitTx throws an exception if the transaction + was already added to the wallet.

      +
      +
      Parameters:
      +
      tx - transaction to commit
      +
      Throws:
      +
      VerificationException - if transaction was already in the pending pool
      +
      +
      +
    • +
    • +
      +

      addChangeEventListener

      +
      public void addChangeEventListener(WalletChangeEventListener listener)
      +
      Adds an event listener object. Methods on this object are called when something interesting happens, + like receiving money. Runs the listener methods in the user thread.
      +
      +
    • +
    • +
      +

      addChangeEventListener

      +
      public void addChangeEventListener(Executor executor, + WalletChangeEventListener listener)
      +
      Adds an event listener object. Methods on this object are called when something interesting happens, + like receiving money. The listener is executed by the given executor.
      +
      +
    • +
    • +
      +

      addCoinsReceivedEventListener

      +
      public void addCoinsReceivedEventListener(WalletCoinsReceivedEventListener listener)
      +
      Adds an event listener object called when coins are received. + Runs the listener methods in the user thread.
      +
      +
    • +
    • +
      +

      addCoinsReceivedEventListener

      +
      public void addCoinsReceivedEventListener(Executor executor, + WalletCoinsReceivedEventListener listener)
      +
      Adds an event listener object called when coins are received. + The listener is executed by the given executor.
      +
      +
    • +
    • +
      +

      addCoinsSentEventListener

      +
      public void addCoinsSentEventListener(WalletCoinsSentEventListener listener)
      +
      Adds an event listener object called when coins are sent. + Runs the listener methods in the user thread.
      +
      +
    • +
    • +
      +

      addCoinsSentEventListener

      +
      public void addCoinsSentEventListener(Executor executor, + WalletCoinsSentEventListener listener)
      +
      Adds an event listener object called when coins are sent. + The listener is executed by the given executor.
      +
      +
    • +
    • +
      +

      addKeyChainEventListener

      +
      public void addKeyChainEventListener(KeyChainEventListener listener)
      +
      Adds an event listener object. Methods on this object are called when keys are + added. The listener is executed in the user thread.
      +
      +
    • +
    • +
      +

      addKeyChainEventListener

      +
      public void addKeyChainEventListener(Executor executor, + KeyChainEventListener listener)
      +
      Adds an event listener object. Methods on this object are called when keys are + added. The listener is executed by the given executor.
      +
      +
    • +
    • +
      +

      addCurrentKeyChangeEventListener

      +
      public void addCurrentKeyChangeEventListener(CurrentKeyChangeEventListener listener)
      +
      Adds an event listener object. Methods on this object are called when a current key and/or address + changes. The listener is executed in the user thread.
      +
      +
    • +
    • +
      +

      addCurrentKeyChangeEventListener

      +
      public void addCurrentKeyChangeEventListener(Executor executor, + CurrentKeyChangeEventListener listener)
      +
      Adds an event listener object. Methods on this object are called when a current key and/or address + changes. The listener is executed by the given executor.
      +
      +
    • +
    • +
      +

      addReorganizeEventListener

      +
      public void addReorganizeEventListener(WalletReorganizeEventListener listener)
      +
      Adds an event listener object. Methods on this object are called when something interesting happens, + like receiving money. Runs the listener methods in the user thread.
      +
      +
    • +
    • +
      +

      addReorganizeEventListener

      +
      public void addReorganizeEventListener(Executor executor, + WalletReorganizeEventListener listener)
      +
      Adds an event listener object. Methods on this object are called when something interesting happens, + like receiving money. The listener is executed by the given executor.
      +
      +
    • +
    • +
      +

      addScriptsChangeEventListener

      +
      public void addScriptsChangeEventListener(ScriptsChangeEventListener listener)
      +
      Adds an event listener object. Methods on this object are called when scripts + watched by this wallet change. Runs the listener methods in the user thread.
      +
      +
    • +
    • +
      +

      addScriptsChangeEventListener

      +
      public void addScriptsChangeEventListener(Executor executor, + ScriptsChangeEventListener listener)
      +
      Adds an event listener object. Methods on this object are called when scripts + watched by this wallet change. The listener is executed by the given executor.
      +
      +
    • +
    • +
      +

      addTransactionConfidenceEventListener

      +
      public void addTransactionConfidenceEventListener(TransactionConfidenceEventListener listener)
      +
      Adds an event listener object. Methods on this object are called when confidence + of a transaction changes. Runs the listener methods in the user thread.
      +
      +
    • +
    • +
      +

      addTransactionConfidenceEventListener

      +
      public void addTransactionConfidenceEventListener(Executor executor, + TransactionConfidenceEventListener listener)
      +
      Adds an event listener object. Methods on this object are called when confidence + of a transaction changes. The listener is executed by the given executor.
      +
      +
    • +
    • +
      +

      removeChangeEventListener

      +
      public boolean removeChangeEventListener(WalletChangeEventListener listener)
      +
      Removes the given event listener object. Returns true if the listener was removed, false if that listener + was never added.
      +
      +
    • +
    • +
      +

      removeCoinsReceivedEventListener

      +
      public boolean removeCoinsReceivedEventListener(WalletCoinsReceivedEventListener listener)
      +
      Removes the given event listener object. Returns true if the listener was removed, false if that listener + was never added.
      +
      +
    • +
    • +
      +

      removeCoinsSentEventListener

      +
      public boolean removeCoinsSentEventListener(WalletCoinsSentEventListener listener)
      +
      Removes the given event listener object. Returns true if the listener was removed, false if that listener + was never added.
      +
      +
    • +
    • +
      +

      removeKeyChainEventListener

      +
      public boolean removeKeyChainEventListener(KeyChainEventListener listener)
      +
      Removes the given event listener object. Returns true if the listener was removed, false if that listener + was never added.
      +
      +
    • +
    • +
      +

      removeCurrentKeyChangeEventListener

      +
      public boolean removeCurrentKeyChangeEventListener(CurrentKeyChangeEventListener listener)
      +
      Removes the given event listener object. Returns true if the listener was removed, false if that + listener was never added.
      +
      +
    • +
    • +
      +

      removeReorganizeEventListener

      +
      public boolean removeReorganizeEventListener(WalletReorganizeEventListener listener)
      +
      Removes the given event listener object. Returns true if the listener was removed, false if that listener + was never added.
      +
      +
    • +
    • +
      +

      removeScriptsChangeEventListener

      +
      public boolean removeScriptsChangeEventListener(ScriptsChangeEventListener listener)
      +
      Removes the given event listener object. Returns true if the listener was removed, false if that listener + was never added.
      +
      +
    • +
    • +
      +

      removeTransactionConfidenceEventListener

      +
      public boolean removeTransactionConfidenceEventListener(TransactionConfidenceEventListener listener)
      +
      Removes the given event listener object. Returns true if the listener was removed, false if that listener + was never added.
      +
      +
    • +
    • +
      +

      maybeQueueOnWalletChanged

      +
      protected void maybeQueueOnWalletChanged()
      +
      +
    • +
    • +
      +

      queueOnCoinsReceived

      +
      protected void queueOnCoinsReceived(Transaction tx, + Coin balance, + Coin newBalance)
      +
      +
    • +
    • +
      +

      queueOnCoinsSent

      +
      protected void queueOnCoinsSent(Transaction tx, + Coin prevBalance, + Coin newBalance)
      +
      +
    • +
    • +
      +

      queueOnReorganize

      +
      protected void queueOnReorganize()
      +
      +
    • +
    • +
      +

      queueOnScriptsChanged

      +
      protected void queueOnScriptsChanged(List<Script> scripts, + boolean isAddingScripts)
      +
      +
    • +
    • +
      +

      getTransactions

      +
      public Set<Transaction> getTransactions(boolean includeDead)
      +
      Returns a set of all transactions in the wallet.
      +
      +
      Parameters:
      +
      includeDead - If true, transactions that were overridden by a double spend are included.
      +
      +
      +
    • +
    • +
      +

      getWalletTransactions

      +
      public Iterable<WalletTransaction> getWalletTransactions()
      +
      Returns a set of all WalletTransactions in the wallet.
      +
      +
    • +
    • +
      +

      addWalletTransaction

      +
      public void addWalletTransaction(WalletTransaction wtx)
      +
      Adds a transaction that has been associated with a particular wallet pool. This is intended for usage by + deserialization code, such as the WalletProtobufSerializer class. It isn't normally useful for + applications. It does not trigger auto saving.
      +
      +
    • +
    • +
      +

      getTransactionsByTime

      +
      public List<Transaction> getTransactionsByTime()
      +
      Returns all non-dead, active transactions ordered by recency.
      +
      +
    • +
    • +
      +

      getRecentTransactions

      +
      public List<Transaction> getRecentTransactions(int numTransactions, + boolean includeDead)
      +

      Returns an list of N transactions, ordered by increasing age. Transactions on side chains are not included. + Dead transactions (overridden by double spends) are optionally included.

      +

      Note: the current implementation is O(num transactions in wallet). Regardless of how many transactions are + requested, the cost is always the same. In future, requesting smaller numbers of transactions may be faster + depending on how the wallet is implemented (e.g. if backed by a database).

      +
      +
    • +
    • +
      +

      getTransaction

      +
      @Nullable +public Transaction getTransaction(Sha256Hash hash)
      +
      Returns a transaction object given its hash, if it exists in this wallet, or null otherwise.
      +
      +
    • +
    • +
      +

      getTransactionPool

      +
      public Map<Sha256Hash,Transaction> getTransactionPool(WalletTransaction.Pool pool)
      +
      Description copied from interface: TransactionBag
      +
      Returns transactions from a specific pool.
      +
      +
      Specified by:
      +
      getTransactionPool in interface TransactionBag
      +
      +
      +
    • +
    • +
      +

      reset

      +
      public void reset()
      +
      Prepares the wallet for a blockchain replay. Removes all transactions (as they would get in the way of the + replay) and makes the wallet think it has never seen a block. WalletChangeEventListener.onWalletChanged(org.bitcoinj.wallet.Wallet) will + be fired.
      +
      +
    • +
    • +
      +

      clearTransactions

      +
      public void clearTransactions(int fromHeight)
      +
      Deletes transactions which appeared above the given block height from the wallet, but does not touch the keys. + This is useful if you have some keys and wish to replay the block chain into the wallet in order to pick them up. + Triggers auto saving.
      +
      +
    • +
    • +
      +

      getWatchedOutputs

      +
      public List<TransactionOutput> getWatchedOutputs(boolean excludeImmatureCoinbases)
      +
      Returns all the outputs that match addresses or scripts added via addWatchedAddress(Address) or + addWatchedScripts(java.util.List).
      +
      +
      Parameters:
      +
      excludeImmatureCoinbases - Whether to ignore outputs that are unspendable due to being immature.
      +
      +
      +
    • +
    • +
      +

      cleanup

      +
      public void cleanup()
      +
      Clean up the wallet. Currently, it only removes risky pending transaction from the wallet and only if their + outputs have not been spent.
      +
      +
    • +
    • +
      +

      getPoolSize

      +
      public int getPoolSize(WalletTransaction.Pool pool)
      +
      +
    • +
    • +
      +

      poolContainsTxHash

      +
      public boolean poolContainsTxHash(WalletTransaction.Pool pool, + Sha256Hash txHash)
      +
      +
    • +
    • +
      +

      getUnspents

      +
      public List<TransactionOutput> getUnspents()
      +
      Returns a copy of the internal unspent outputs list
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString()
      +
      +
      Overrides:
      +
      toString in class Object
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public String toString(boolean includeLookahead, + boolean includePrivateKeys, + @Nullable + AesKey aesKey, + boolean includeTransactions, + boolean includeExtensions, + @Nullable + AbstractBlockChain chain)
      +
      Formats the wallet as a human-readable piece of text. Intended for debugging, the format is not meant to be + stable or human-readable.
      +
      +
      Parameters:
      +
      includeLookahead - Whether lookahead keys should be included.
      +
      includePrivateKeys - Whether raw private key data should be included.
      +
      aesKey - for decrypting private key data for if the wallet is encrypted.
      +
      includeTransactions - Whether to print transaction data.
      +
      includeExtensions - Whether to print extension data.
      +
      chain - If set, will be used to estimate lock times for block time-locked transactions.
      +
      Returns:
      +
      Human-readable wallet debugging information
      +
      +
      +
    • +
    • +
      +

      getPendingTransactions

      +
      public Collection<Transaction> getPendingTransactions()
      +
      Returns an immutable view of the transactions currently waiting for network confirmations.
      +
      +
    • +
    • +
      +

      earliestKeyCreationTime

      +
      public Instant earliestKeyCreationTime()
      +
      Returns the earliest creation time of keys or watched scripts in this wallet, ie the min + of ECKey.getCreationTime(). This can return Instant.EPOCH if at least one key does + not have that data (e.g. is an imported key with unknown timestamp).

      + + This method is most often used in conjunction with PeerGroup.setFastCatchupTime(Instant) in order to + optimize chain download for new users of wallet apps. Backwards compatibility notice: if you get Instant.EPOCH from this + method, you can instead use the time of the first release of your software, as it's guaranteed no users will + have wallets pre-dating this time.

      + + If there are no keys in the wallet, Instant.MAX is returned.

      +
      +
      Specified by:
      +
      earliestKeyCreationTime in interface PeerFilterProvider
      +
      Returns:
      +
      earliest creation times of keys in this wallet, + Instant.EPOCH if at least one time is unknown, + Instant.MAX if no keys in this wallet
      +
      +
      +
    • +
    • +
      +

      getLastBlockSeenHash

      +
      @Nullable +public Sha256Hash getLastBlockSeenHash()
      +
      Returns the hash of the last seen best-chain block, or null if the wallet is too old to store this data.
      +
      +
    • +
    • +
      +

      setLastBlockSeenHash

      +
      public void setLastBlockSeenHash(@Nullable + Sha256Hash lastBlockSeenHash)
      +
      +
    • +
    • +
      +

      setLastBlockSeenHeight

      +
      public void setLastBlockSeenHeight(int lastBlockSeenHeight)
      +
      +
    • +
    • +
      +

      setLastBlockSeenTime

      +
      public void setLastBlockSeenTime(Instant time)
      +
      +
    • +
    • +
      +

      clearLastBlockSeenTime

      +
      public void clearLastBlockSeenTime()
      +
      +
    • +
    • +
      +

      setLastBlockSeenTimeSecs

      +
      @Deprecated +public void setLastBlockSeenTimeSecs(long timeSecs)
      + +
      +
    • +
    • +
      +

      lastBlockSeenTime

      +
      public Optional<Instant> lastBlockSeenTime()
      +
      Returns time extracted from the last best seen block header, or empty. This timestamp + is not the local time at which the block was first observed by this application but rather what the block + (i.e. miner) self declares. It is allowed to have some significant drift from the real time at which the block + was found, although most miners do use accurate times. If this wallet is old and does not have a recorded + time then this method returns zero.
      +
      +
    • +
    • +
      +

      getLastBlockSeenTimeSecs

      +
      @Deprecated +public long getLastBlockSeenTimeSecs()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      getLastBlockSeenTime

      +
      @Deprecated +@Nullable +public Date getLastBlockSeenTime()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      getLastBlockSeenHeight

      +
      public int getLastBlockSeenHeight()
      +
      Returns the height of the last seen best-chain block. Can be 0 if a wallet is brand new or -1 if the wallet + is old and doesn't have that data.
      +
      +
    • +
    • +
      +

      getVersion

      +
      public int getVersion()
      +
      Get the version of the Wallet. + This is an int you can use to indicate which versions of wallets your code understands, + and which come from the future (and hence cannot be safely loaded).
      +
      +
    • +
    • +
      +

      setVersion

      +
      public void setVersion(int version)
      +
      Set the version number of the wallet. See getVersion().
      +
      +
    • +
    • +
      +

      setDescription

      +
      public void setDescription(String description)
      +
      Set the description of the wallet. + This is a Unicode encoding string typically entered by the user as descriptive text for the wallet.
      +
      +
    • +
    • +
      +

      getDescription

      +
      public String getDescription()
      +
      Get the description of the wallet. See setDescription(String)
      +
      +
    • +
    • +
      +

      getBalance

      +
      public Coin getBalance()
      +
      Returns the AVAILABLE balance of this wallet. See Wallet.BalanceType.AVAILABLE for details on what this + means.
      +
      +
    • +
    • +
      +

      getBalance

      +
      public Coin getBalance(Wallet.BalanceType balanceType)
      +
      Returns the balance of this wallet as calculated by the provided balanceType.
      +
      +
    • +
    • +
      +

      getBalance

      +
      public Coin getBalance(CoinSelector selector)
      +
      Returns the balance that would be considered spendable by the given coin selector, including watched outputs + (i.e. balance includes outputs we don't have the private keys for). Just asks it to select as many coins as + possible and returns the total.
      +
      +
    • +
    • +
      +

      getBalanceFuture

      +
      public ListenableCompletableFuture<Coin> getBalanceFuture(Coin value, + Wallet.BalanceType type)
      +

      Returns a future that will complete when the balance of the given type has becom equal or larger to the given + value. If the wallet already has a large enough balance the future is returned in a pre-completed state. Note + that this method is not blocking, if you want to actually wait immediately, you have to call .get() on + the result.

      + +

      Also note that by the time the future completes, the wallet may have changed yet again if something else + is going on in parallel, so you should treat the returned balance as advisory and be prepared for sending + money to fail! Finally please be aware that any listeners on the future will run either on the calling thread + if it completes immediately, or eventually on a background thread if the balance is not yet at the right + level. If you do something that means you know the balance should be sufficient to trigger the future, + you can use Threading.waitForUserCode() to block until the future had a + chance to be updated.

      +
      +
    • +
    • +
      +

      getTotalReceived

      +
      public Coin getTotalReceived()
      +
      Returns the amount of bitcoin ever received via output. This is not the balance! If an output spends from a + transaction whose inputs are also to our wallet, the input amounts are deducted from the outputs contribution, with a minimum of zero + contribution. The idea behind this is we avoid double counting money sent to us.
      +
      +
      Returns:
      +
      the total amount of satoshis received, regardless of whether it was spent or not.
      +
      +
      +
    • +
    • +
      +

      getTotalSent

      +
      public Coin getTotalSent()
      +
      Returns the amount of bitcoin ever sent via output. If an output is sent to our own wallet, because of change or + rotating keys or whatever, we do not count it. If the wallet was + involved in a shared transaction, i.e. there is some input to the transaction that we don't have the key for, then + we multiply the sum of the output values by the proportion of satoshi coming in to our inputs. Essentially we treat + inputs as pooling into the transaction, becoming fungible and being equally distributed to all outputs.
      +
      +
      Returns:
      +
      the total amount of satoshis sent by us
      +
      +
      +
    • +
    • +
      +

      createSend

      +
      public Transaction createSend(Address address, + Coin value) + throws InsufficientMoneyException, +Wallet.CompletionException
      +

      Statelessly creates a transaction that sends the given value to address. The change is sent to + currentChangeAddress(), so you must have added at least one key.

      + +

      If you just want to send money quickly, you probably want + sendCoins(TransactionBroadcaster, Address, Coin) instead. That will create the sending + transaction, commit to the wallet and broadcast it to the network all in one go. This method is lower level + and lets you see the proposed transaction before anything is done with it.

      + +

      This is a helper method that is equivalent to using SendRequest.to(Address, Coin) + followed by completeTx(SendRequest) and returning the requests transaction object. + Note that this means a fee may be automatically added if required, if you want more control over the process, + just do those two steps yourself.

      + +

      IMPORTANT: This method does NOT update the wallet. If you call createSend again you may get two transactions + that spend the same coins. You have to call commitTx(Transaction) on the created transaction to + prevent this, but that should only occur once the transaction has been accepted by the network. This implies + you cannot have more than one outstanding sending tx at once.

      + +

      You MUST ensure that the value is not smaller than TransactionOutput.getMinNonDustValue() or the transaction + will almost certainly be rejected by the network as dust.

      +
      +
      Parameters:
      +
      address - The Bitcoin address to send the money to.
      +
      value - How much currency to send.
      +
      Returns:
      +
      either the created Transaction or null if there are insufficient coins.
      +
      Throws:
      +
      InsufficientMoneyException - if the request could not be completed due to not enough balance.
      +
      Wallet.DustySendRequested - if the resultant transaction would violate the dust rules.
      +
      Wallet.CouldNotAdjustDownwards - if emptying the wallet was requested and the output can't be shrunk for fees without violating a protocol rule.
      +
      Wallet.ExceededMaxTransactionSize - if the resultant transaction is too big for Bitcoin to process.
      +
      Wallet.MultipleOpReturnRequested - if there is more than one OP_RETURN output for the resultant transaction.
      +
      Wallet.BadWalletEncryptionKeyException - if the supplied SendRequest.aesKey is wrong.
      +
      Wallet.CompletionException
      +
      +
      +
    • +
    • +
      +

      createSend

      +
      public Transaction createSend(Address address, + Coin value, + boolean allowUnconfirmed) + throws InsufficientMoneyException, +Wallet.CompletionException
      +

      Statelessly creates a transaction that sends the given value to address. The change is sent to + currentChangeAddress(), so you must have added at least one key.

      + +

      If you just want to send money quickly, you probably want + sendCoins(TransactionBroadcaster, Address, Coin) instead. That will create the sending + transaction, commit to the wallet and broadcast it to the network all in one go. This method is lower level + and lets you see the proposed transaction before anything is done with it.

      + +

      This is a helper method that is equivalent to using SendRequest.to(Address, Coin) + followed by completeTx(SendRequest) and returning the requests transaction object. + Note that this means a fee may be automatically added if required, if you want more control over the process, + just do those two steps yourself.

      + +

      IMPORTANT: This method does NOT update the wallet. If you call createSend again you may get two transactions + that spend the same coins. You have to call commitTx(Transaction) on the created transaction to + prevent this, but that should only occur once the transaction has been accepted by the network. This implies + you cannot have more than one outstanding sending tx at once.

      + +

      You MUST ensure that the value is not smaller than TransactionOutput.getMinNonDustValue() or the transaction + will almost certainly be rejected by the network as dust.

      +
      +
      Parameters:
      +
      address - The Bitcoin address to send the money to.
      +
      value - How much currency to send.
      +
      allowUnconfirmed - Whether to allow spending unconfirmed outputs.
      +
      Returns:
      +
      either the created Transaction or null if there are insufficient coins.
      +
      Throws:
      +
      InsufficientMoneyException - if the request could not be completed due to not enough balance.
      +
      Wallet.DustySendRequested - if the resultant transaction would violate the dust rules.
      +
      Wallet.CouldNotAdjustDownwards - if emptying the wallet was requested and the output can't be shrunk for fees without violating a protocol rule.
      +
      Wallet.ExceededMaxTransactionSize - if the resultant transaction is too big for Bitcoin to process.
      +
      Wallet.MultipleOpReturnRequested - if there is more than one OP_RETURN output for the resultant transaction.
      +
      Wallet.BadWalletEncryptionKeyException - if the supplied SendRequest.aesKey is wrong.
      +
      Wallet.CompletionException
      +
      +
      +
    • +
    • +
      +

      sendCoinsOffline

      +
      public Transaction sendCoinsOffline(SendRequest request) + throws InsufficientMoneyException, +Wallet.CompletionException
      +
      Sends coins to the given address but does not broadcast the resulting pending transaction. It is still stored + in the wallet, so when the wallet is added to a PeerGroup or Peer the transaction will be + announced to the network. The given SendRequest is completed first using + completeTx(SendRequest) to make it valid.
      +
      +
      Returns:
      +
      the Transaction that was created
      +
      Throws:
      +
      InsufficientMoneyException - if the request could not be completed due to not enough balance.
      +
      IllegalArgumentException - if you try and complete the same SendRequest twice
      +
      Wallet.DustySendRequested - if the resultant transaction would violate the dust rules.
      +
      Wallet.CouldNotAdjustDownwards - if emptying the wallet was requested and the output can't be shrunk for fees without violating a protocol rule.
      +
      Wallet.ExceededMaxTransactionSize - if the resultant transaction is too big for Bitcoin to process.
      +
      Wallet.MultipleOpReturnRequested - if there is more than one OP_RETURN output for the resultant transaction.
      +
      Wallet.BadWalletEncryptionKeyException - if the supplied SendRequest.aesKey is wrong.
      +
      Wallet.CompletionException
      +
      +
      +
    • +
    • +
      +

      sendCoins

      + +

      Sends coins to the given address, via the given PeerGroup. Change is returned to + currentChangeAddress(). Note that a fee may be automatically added if one may be required for the + transaction to be confirmed.

      + +

      The returned object provides both the transaction, and a future that can be used to learn when the broadcast + is complete. Complete means, if the PeerGroup is limited to only one connection, when it was written out to + the socket. Otherwise when the transaction is written out and we heard it back from a different peer.

      + +

      Note that the sending transaction is committed to the wallet immediately, not when the transaction is + successfully broadcast. This means that even if the network hasn't heard about your transaction you won't be + able to spend those same coins again.

      + +

      You MUST ensure that value is not smaller than TransactionOutput.getMinNonDustValue() or the transaction will + almost certainly be rejected by the network as dust.

      +
      +
      Parameters:
      +
      broadcaster - a TransactionBroadcaster to use to send the transactions out.
      +
      to - Which address to send coins to.
      +
      value - How much value to send.
      +
      Returns:
      +
      An object containing the transaction that was created, and a future for the broadcast of it.
      +
      Throws:
      +
      InsufficientMoneyException - if the request could not be completed due to not enough balance.
      +
      Wallet.DustySendRequested - if the resultant transaction would violate the dust rules.
      +
      Wallet.CouldNotAdjustDownwards - if emptying the wallet was requested and the output can't be shrunk for fees without violating a protocol rule.
      +
      Wallet.ExceededMaxTransactionSize - if the resultant transaction is too big for Bitcoin to process.
      +
      Wallet.MultipleOpReturnRequested - if there is more than one OP_RETURN output for the resultant transaction.
      +
      Wallet.BadWalletEncryptionKeyException - if the supplied SendRequest.aesKey is wrong.
      +
      Wallet.CompletionException
      +
      +
      +
    • +
    • +
      +

      sendCoins

      + +

      Sends coins according to the given request, via the given TransactionBroadcaster.

      + +

      The returned object provides both the transaction, and a future that can be used to learn when the broadcast + is complete. Complete means, if the PeerGroup is limited to only one connection, when it was written out to + the socket. Otherwise when the transaction is written out and we heard it back from a different peer.

      + +

      Note that the sending transaction is committed to the wallet immediately, not when the transaction is + successfully broadcast. This means that even if the network hasn't heard about your transaction you won't be + able to spend those same coins again.

      +
      +
      Parameters:
      +
      broadcaster - the target to use for broadcast.
      +
      request - the SendRequest that describes what to do, get one using static methods on SendRequest itself.
      +
      Returns:
      +
      An object containing the transaction that was created, and a future for the broadcast of it.
      +
      Throws:
      +
      InsufficientMoneyException - if the request could not be completed due to not enough balance.
      +
      IllegalArgumentException - if you try and complete the same SendRequest twice
      +
      Wallet.DustySendRequested - if the resultant transaction would violate the dust rules.
      +
      Wallet.CouldNotAdjustDownwards - if emptying the wallet was requested and the output can't be shrunk for fees without violating a protocol rule.
      +
      Wallet.ExceededMaxTransactionSize - if the resultant transaction is too big for Bitcoin to process.
      +
      Wallet.MultipleOpReturnRequested - if there is more than one OP_RETURN output for the resultant transaction.
      +
      Wallet.BadWalletEncryptionKeyException - if the supplied SendRequest.aesKey is wrong.
      +
      Wallet.CompletionException
      +
      +
      +
    • +
    • +
      +

      sendCoins

      + +
      Satisfies the given SendRequest using the default transaction broadcaster configured either via + PeerGroup.addWallet(Wallet) or directly with setTransactionBroadcaster(TransactionBroadcaster).
      +
      +
      Parameters:
      +
      request - the SendRequest that describes what to do, get one using static methods on SendRequest itself.
      +
      Returns:
      +
      An object containing the transaction that was created, and a future for the broadcast of it.
      +
      Throws:
      +
      IllegalStateException - if no transaction broadcaster has been configured.
      +
      InsufficientMoneyException - if the request could not be completed due to not enough balance.
      +
      IllegalArgumentException - if you try and complete the same SendRequest twice
      +
      Wallet.DustySendRequested - if the resultant transaction would violate the dust rules.
      +
      Wallet.CouldNotAdjustDownwards - if emptying the wallet was requested and the output can't be shrunk for fees without violating a protocol rule.
      +
      Wallet.ExceededMaxTransactionSize - if the resultant transaction is too big for Bitcoin to process.
      +
      Wallet.MultipleOpReturnRequested - if there is more than one OP_RETURN output for the resultant transaction.
      +
      Wallet.BadWalletEncryptionKeyException - if the supplied SendRequest.aesKey is wrong.
      +
      Wallet.CompletionException
      +
      +
      +
    • +
    • +
      +

      sendCoins

      +
      public Transaction sendCoins(Peer peer, + SendRequest request) + throws InsufficientMoneyException, +Wallet.CompletionException
      +
      Sends coins to the given address, via the given Peer. Change is returned to currentChangeAddress(). + If an exception is thrown by PeerSocketHandler.sendMessage(Message) the transaction is still committed, so the + pending transaction must be broadcast by you at some other time. Note that a fee may be automatically added + if one may be required for the transaction to be confirmed.
      +
      +
      Returns:
      +
      The Transaction that was created or null if there was insufficient balance to send the coins.
      +
      Throws:
      +
      InsufficientMoneyException - if the request could not be completed due to not enough balance.
      +
      IllegalArgumentException - if you try and complete the same SendRequest twice
      +
      Wallet.DustySendRequested - if the resultant transaction would violate the dust rules.
      +
      Wallet.CouldNotAdjustDownwards - if emptying the wallet was requested and the output can't be shrunk for fees without violating a protocol rule.
      +
      Wallet.ExceededMaxTransactionSize - if the resultant transaction is too big for Bitcoin to process.
      +
      Wallet.MultipleOpReturnRequested - if there is more than one OP_RETURN output for the resultant transaction.
      +
      Wallet.BadWalletEncryptionKeyException - if the supplied SendRequest.aesKey is wrong.
      +
      Wallet.CompletionException
      +
      +
      +
    • +
    • +
      +

      sendTransaction

      +
      public CompletableFuture<TransactionBroadcast> sendTransaction(SendRequest sendRequest)
      +
      Initiate sending the transaction in a SendRequest. Calls sendCoins(SendRequest) which + performs the following significant operations internally: +
        +
      1. completeTx(SendRequest) -- calculate change and sign
      2. +
      3. commitTx(Transaction) -- puts the transaction in the Wallet's pending pool
      4. +
      5. TransactionBroadcaster.broadcastTransaction(Transaction) typically implemented by PeerGroup.broadcastTransaction(Transaction) -- queues requests to send the transaction to a single remote Peer
      6. +
      + This method will complete and return a TransactionBroadcast when the send to the remote peer occurs (is buffered.) + The broadcast process includes the following steps: +
        +
      1. Wait until enough Peers are connected.
      2. +
      3. Broadcast (buffer for send) the transaction to a single remote Peer
      4. +
      5. Mark TransactionBroadcast.awaitSent() as complete
      6. +
      7. Wait for a number of remote peers to confirm they have received the broadcast
      8. +
      9. Mark TransactionBroadcast.awaitRelayed() as complete
      10. +
      +
      +
      Parameters:
      +
      sendRequest - transaction to send
      +
      Returns:
      +
      A future for the transaction broadcast
      +
      +
      +
    • +
    • +
      +

      waitForConfirmation

      +
      public CompletableFuture<TransactionConfidence> waitForConfirmation(Transaction tx)
      +
      Wait for at least 1 confirmation on a transaction.
      +
      +
      Parameters:
      +
      tx - the transaction we are waiting for
      +
      Returns:
      +
      a future for an object that contains transaction confidence information
      +
      +
      +
    • +
    • +
      +

      waitForConfirmations

      +
      public CompletableFuture<TransactionConfidence> waitForConfirmations(Transaction tx, + int requiredConfirmations)
      +
      Wait for a required number of confirmations on a transaction.
      +
      +
      Parameters:
      +
      tx - the transaction we are waiting for
      +
      requiredConfirmations - the minimum required confirmations before completing
      +
      Returns:
      +
      a future for an object that contains transaction confidence information
      +
      +
      +
    • +
    • +
      +

      completeTx

      +
      public void completeTx(SendRequest req) + throws InsufficientMoneyException, +Wallet.CompletionException
      +
      Given a spend request containing an incomplete transaction, makes it valid by adding outputs and signed inputs + according to the instructions in the request. The transaction in the request is modified by this method.
      +
      +
      Parameters:
      +
      req - a SendRequest that contains the incomplete transaction and details for how to make it valid.
      +
      Throws:
      +
      InsufficientMoneyException - if the request could not be completed due to not enough balance.
      +
      IllegalArgumentException - if you try and complete the same SendRequest twice
      +
      Wallet.DustySendRequested - if the resultant transaction would violate the dust rules.
      +
      Wallet.CouldNotAdjustDownwards - if emptying the wallet was requested and the output can't be shrunk for fees without violating a protocol rule.
      +
      Wallet.ExceededMaxTransactionSize - if the resultant transaction is too big for Bitcoin to process.
      +
      Wallet.MultipleOpReturnRequested - if there is more than one OP_RETURN output for the resultant transaction.
      +
      Wallet.BadWalletEncryptionKeyException - if the supplied SendRequest.aesKey is wrong.
      +
      Wallet.CompletionException
      +
      +
      +
    • +
    • +
      +

      signTransaction

      +
      public void signTransaction(SendRequest req) + throws Wallet.BadWalletEncryptionKeyException
      +

      Given a send request containing transaction, attempts to sign it's inputs. This method expects transaction + to have all necessary inputs connected or they will be ignored.

      +

      Actual signing is done by pluggable signers and it's not guaranteed that + transaction will be complete in the end.

      +
      +
      Throws:
      +
      Wallet.BadWalletEncryptionKeyException - if the supplied SendRequest.aesKey is wrong.
      +
      +
      +
    • +
    • +
      +

      calculateAllSpendCandidates

      +
      public List<TransactionOutput> calculateAllSpendCandidates()
      +
      Returns a list of the outputs that can potentially be spent, i.e. that we have the keys for and are unspent + according to our knowledge of the block chain.
      +
      +
    • +
    • +
      +

      calculateAllSpendCandidates

      +
      public List<TransactionOutput> calculateAllSpendCandidates(boolean excludeImmatureCoinbases, + boolean excludeUnsignable)
      +
      Returns a list of all outputs that are being tracked by this wallet either from the UTXOProvider + (in this case the existence or not of private keys is ignored), or the wallets internal storage (the default) + taking into account the flags.
      +
      +
      Parameters:
      +
      excludeImmatureCoinbases - Whether to ignore coinbase outputs that we will be able to spend in future once they mature.
      +
      excludeUnsignable - Whether to ignore outputs that we are tracking but don't have the keys to sign for.
      +
      +
      +
    • +
    • +
      +

      canSignFor

      +
      public boolean canSignFor(Script script)
      +
      Returns true if this wallet has at least one of the private keys needed to sign for this scriptPubKey. Returns + false if the form of the script is not known or if the script is OP_RETURN.
      +
      +
    • +
    • +
      +

      calculateAllSpendCandidatesFromUTXOProvider

      +
      protected List<TransactionOutput> calculateAllSpendCandidatesFromUTXOProvider(boolean excludeImmatureCoinbases)
      +
      Returns the spendable candidates from the UTXOProvider based on keys that the wallet contains.
      +
      +
      Returns:
      +
      The list of candidates.
      +
      +
      +
    • +
    • +
      +

      getStoredOutputsFromUTXOProvider

      +
      protected List<UTXO> getStoredOutputsFromUTXOProvider() + throws UTXOProviderException
      +
      Get all the UTXO's from the UTXOProvider based on keys that the + wallet contains.
      +
      +
      Returns:
      +
      The list of stored outputs.
      +
      Throws:
      +
      UTXOProviderException
      +
      +
      +
    • +
    • +
      +

      getCoinSelector

      +
      public CoinSelector getCoinSelector()
      +
      Returns the default CoinSelector object that is used by this wallet if no custom selector is specified.
      +
      +
    • +
    • +
      +

      getUTXOProvider

      +
      @Nullable +public UTXOProvider getUTXOProvider()
      +
      Get the UTXOProvider.
      +
      +
      Returns:
      +
      The UTXO provider.
      +
      +
      +
    • +
    • +
      +

      setUTXOProvider

      +
      public void setUTXOProvider(@Nullable + UTXOProvider provider)
      +
      Set the UTXOProvider. + +

      The wallet will query the provider for spendable candidates, i.e. outputs controlled exclusively + by private keys contained in the wallet.

      + +

      Note that the associated provider must be reattached after a wallet is loaded from disk. + The association is not serialized.

      +
      +
    • +
    • +
      +

      reorganize

      +
      public void reorganize(StoredBlock splitPoint, + List<StoredBlock> oldBlocks, + List<StoredBlock> newBlocks) + throws VerificationException
      +

      Don't call this directly. It's not intended for API users.

      + +

      Called by the BlockChain when the best chain (representing total work done) has changed. This can + cause the number of confirmations of a transaction to go higher, lower, drop to zero and can even result in + a transaction going dead (will never confirm) due to a double spend.

      + +

      The oldBlocks/newBlocks lists are ordered height-wise from top first to bottom last.

      +
      +
      Specified by:
      +
      reorganize in interface ReorganizeListener
      +
      Throws:
      +
      VerificationException
      +
      +
      +
    • +
    • +
      +

      beginBloomFilterCalculation

      +
      public void beginBloomFilterCalculation()
      +
      Description copied from interface: PeerFilterProvider
      +
      Called on all registered filter providers before PeerFilterProvider.getBloomFilterElementCount() and + PeerFilterProvider.getBloomFilter(int, double, int) are called. Once called, the provider should ensure that the items + it will want to insert into the filter don't change. The reason is that all providers will have their element + counts queried, and then a filter big enough for all of them will be specified. So the provider must use + consistent state. There is guaranteed to be a matching call to PeerFilterProvider.endBloomFilterCalculation() that can + be used to e.g. unlock a lock.
      +
      +
      Specified by:
      +
      beginBloomFilterCalculation in interface PeerFilterProvider
      +
      +
      +
    • +
    • +
      +

      endBloomFilterCalculation

      +
      public void endBloomFilterCalculation()
      +
      Description copied from interface: PeerFilterProvider
      + +
      +
      Specified by:
      +
      endBloomFilterCalculation in interface PeerFilterProvider
      +
      +
      +
    • +
    • +
      +

      getBloomFilterElementCount

      +
      public int getBloomFilterElementCount()
      +
      Returns the number of distinct data items (note: NOT keys) that will be inserted into a bloom filter, when it + is constructed.
      +
      +
      Specified by:
      +
      getBloomFilterElementCount in interface PeerFilterProvider
      +
      +
      +
    • +
    • +
      +

      getBloomFilter

      +
      public BloomFilter getBloomFilter(double falsePositiveRate)
      +
      Gets a bloom filter that contains all of the public keys from this wallet, and which will provide the given + false-positive rate. See the docs for BloomFilter for a brief explanation of anonymity when using filters.
      +
      +
    • +
    • +
      +

      getBloomFilter

      +
      public BloomFilter getBloomFilter(int size, + double falsePositiveRate, + int nTweak)
      +

      Gets a bloom filter that contains all of the public keys from this wallet, and which will provide the given + false-positive rate if it has size elements. Keep in mind that you will get 2 elements in the bloom filter for + each key in the wallet, for the public key and the hash of the public key (address form).

      + +

      This is used to generate a BloomFilter which can be BloomFilter.merge(BloomFilter)d with another. + It could also be used if you have a specific target for the filter's size.

      + +

      See the docs for BloomFilter(int, double, int, BloomFilter.BloomUpdate) for a brief explanation of anonymity when using bloom + filters.

      +
      +
      Specified by:
      +
      getBloomFilter in interface PeerFilterProvider
      +
      +
      +
    • +
    • +
      +

      checkForFilterExhaustion

      +
      public boolean checkForFilterExhaustion(FilteredBlock block)
      +
      Used by Peer to decide whether or not to discard this block and any blocks building upon it, in case + the Bloom filter used to request them may be exhausted, that is, not have sufficient keys in the deterministic + sequence within it to reliably find relevant transactions.
      +
      +
    • +
    • +
      +

      addExtension

      +
      public void addExtension(WalletExtension extension)
      +
      By providing an object implementing the WalletExtension interface, you can save and load arbitrary + additional data that will be stored with the wallet. Each extension is identified by an ID, so attempting to + add the same extension twice (or two different objects that use the same ID) will throw an IllegalStateException.
      +
      +
    • +
    • +
      +

      addOrGetExistingExtension

      +
      public WalletExtension addOrGetExistingExtension(WalletExtension extension)
      +
      Atomically adds extension or returns an existing extension if there is one with the same id already present.
      +
      +
    • +
    • +
      +

      addOrUpdateExtension

      +
      public void addOrUpdateExtension(WalletExtension extension)
      +
      Either adds extension as a new extension or replaces the existing extension if one already exists with the same + id. This also triggers wallet auto-saving, so may be useful even when called with the same extension as is + already present.
      +
      +
    • +
    • +
      +

      getExtensions

      +
      public Map<String,WalletExtension> getExtensions()
      +
      Returns a snapshot of all registered extension objects. The extensions themselves are not copied.
      +
      +
    • +
    • +
      +

      deserializeExtension

      +
      public void deserializeExtension(WalletExtension extension, + byte[] data) + throws Exception
      +
      Deserialize the wallet extension with the supplied data and then install it, replacing any existing extension + that may have existed with the same ID. If an exception is thrown then the extension is removed from the wallet, + if already present.
      +
      +
      Throws:
      +
      Exception
      +
      +
      +
    • +
    • +
      +

      setTag

      +
      public void setTag(String tag, + com.google.protobuf.ByteString value)
      +
      Deprecated. +
      Applications should use another mechanism to persist application state information
      +
      +
      Description copied from interface: TaggableObject
      +
      Associates the given immutable byte array with the string tag. See the docs for TaggableObject to learn more.
      +
      +
      Specified by:
      +
      setTag in interface TaggableObject
      +
      Overrides:
      +
      setTag in class BaseTaggableObject
      +
      +
      +
    • +
    • +
      +

      setTransactionBroadcaster

      +
      public void setTransactionBroadcaster(@Nullable + TransactionBroadcaster broadcaster)
      +

      Specifies that the given TransactionBroadcaster, typically a PeerGroup, should be used for + sending transactions to the Bitcoin network by default. Some sendCoins methods let you specify a broadcaster + explicitly, in that case, they don't use this broadcaster. If null is specified then the wallet won't attempt + to broadcast transactions itself.

      + +

      You don't normally need to call this. A PeerGroup will automatically set itself as the wallets + broadcaster when you use PeerGroup.addWallet(Wallet). A wallet can use the broadcaster when you ask + it to send money, but in future also at other times to implement various features that may require asynchronous + re-organisation of the wallet contents on the block chain. For instance, in future the wallet may choose to + optimise itself to reduce fees or improve privacy.

      +
      +
    • +
    • +
      +

      setKeyRotationTime

      +
      public void setKeyRotationTime(@Nullable + Instant keyRotationTime)
      +

      + When a key rotation time is set, any money controlled by keys created before the given timestamp T will be + respent to any key that was created after T. This can be used to recover from a situation where a set of keys is + believed to be compromised. The rotation time is persisted to the wallet. You can stop key rotation by calling + this method again with null as the argument. +

      + +

      + Once set up, calling doMaintenance(AesKey, boolean) will create and possibly send rotation + transactions: but it won't be done automatically (because you might have to ask for the users password). This may + need to be repeated regularly in case new coins keep coming in on rotating addresses/keys. +

      + +

      + The given time cannot be in the future. +

      +
      +
      Parameters:
      +
      keyRotationTime - rotate any keys created before this time, or null for no rotation
      +
      +
      +
    • +
    • +
      +

      setKeyRotationTime

      +
      @Deprecated +public void setKeyRotationTime(long timeSecs)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      setKeyRotationTime

      +
      @Deprecated +public void setKeyRotationTime(@Nullable + Date time)
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      keyRotationTime

      +
      public Optional<Instant> keyRotationTime()
      +
      Returns the key rotation time, or empty if unconfigured. See setKeyRotationTime(Instant) for a description + of the field.
      +
      +
    • +
    • +
      +

      getKeyRotationTime

      +
      @Deprecated +@Nullable +public Date getKeyRotationTime()
      +
      Deprecated. + +
      +
      +
    • +
    • +
      +

      isKeyRotating

      +
      public boolean isKeyRotating(ECKey key)
      +
      Returns whether the keys creation time is before the key rotation time, if one was set.
      +
      +
    • +
    • +
      +

      doMaintenance

      +
      public ListenableCompletableFuture<List<Transaction>> doMaintenance(@Nullable + AesKey aesKey, + boolean signAndSend) + throws DeterministicUpgradeRequiresPassword
      +
      A wallet app should call this from time to time in order to let the wallet craft and send transactions needed + to re-organise coins internally. A good time to call this would be after receiving coins for an unencrypted + wallet, or after sending money for an encrypted wallet. If you have an encrypted wallet and just want to know + if some maintenance needs doing, call this method with andSend set to false and look at the returned list of + transactions. Maintenance might also include internal changes that involve some processing or work but + which don't require making transactions - these will happen automatically unless the password is required + in which case an exception will be thrown.
      +
      +
      Parameters:
      +
      aesKey - the users password, if any.
      +
      signAndSend - if true, send the transactions via the tx broadcaster and return them, if false just return them.
      +
      Returns:
      +
      A list of transactions that the wallet just made/will make for internal maintenance. Might be empty.
      +
      Throws:
      +
      DeterministicUpgradeRequiresPassword - if key rotation requires the users password.
      +
      +
      +
    • +
    • +
      +

      doMaintenance

      +
      public ListenableCompletableFuture<List<Transaction>> doMaintenance(KeyChainGroupStructure structure, + @Nullable + AesKey aesKey, + boolean signAndSend) + throws DeterministicUpgradeRequiresPassword
      +
      A wallet app should call this from time to time in order to let the wallet craft and send transactions needed + to re-organise coins internally. A good time to call this would be after receiving coins for an unencrypted + wallet, or after sending money for an encrypted wallet. If you have an encrypted wallet and just want to know + if some maintenance needs doing, call this method with andSend set to false and look at the returned list of + transactions. Maintenance might also include internal changes that involve some processing or work but + which don't require making transactions - these will happen automatically unless the password is required + in which case an exception will be thrown.
      +
      +
      Parameters:
      +
      structure - to derive the account path from if a new seed needs to be created
      +
      aesKey - the users password, if any.
      +
      signAndSend - if true, send the transactions via the tx broadcaster and return them, if false just return them.
      +
      Returns:
      +
      A list of transactions that the wallet just made/will make for internal maintenance. Might be empty.
      +
      Throws:
      +
      DeterministicUpgradeRequiresPassword - if key rotation requires the users password.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletExtension.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletExtension.html new file mode 100644 index 000000000..b2e18b1b5 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletExtension.html @@ -0,0 +1,181 @@ + + + + +WalletExtension (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface WalletExtension

+
+
+
+
public interface WalletExtension
+

An object implementing this interface can be added to a Wallet and provide arbitrary byte arrays that will + be serialized alongside the wallet. Extensions can be mandatory, in which case applications that don't know how to + read the given data will refuse to load the wallet at all. Extensions identify themselves with a string ID that + should use a Java-style reverse DNS identifier to avoid being mixed up with other kinds of extension. To use an + extension, add an object that implements this interface to the wallet using Wallet.addExtension(WalletExtension) + before you load it (to read existing data) and ensure it's present when the wallet is save (to write the data).

+ +

Note that extensions are singletons - you cannot add two objects that provide the same ID to the same wallet.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    deserializeWalletExtension(Wallet containingWallet, + byte[] data)
    +
    +
    Loads the contents of this object from the wallet.
    +
    + + +
    +
    Returns a Java package/class style name used to disambiguate this extension from others.
    +
    +
    boolean
    + +
    +
    If this returns true, the mandatory flag is set when the wallet is serialized and attempts to load it without + the extension being in the wallet will throw an exception.
    +
    +
    byte[]
    + +
    +
    Returns bytes that will be saved in the wallet.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getWalletExtensionID

      +
      String getWalletExtensionID()
      +
      Returns a Java package/class style name used to disambiguate this extension from others.
      +
      +
    • +
    • +
      +

      isWalletExtensionMandatory

      +
      boolean isWalletExtensionMandatory()
      +
      If this returns true, the mandatory flag is set when the wallet is serialized and attempts to load it without + the extension being in the wallet will throw an exception. This method should not change its result during + the objects lifetime.
      +
      +
    • +
    • +
      +

      serializeWalletExtension

      +
      byte[] serializeWalletExtension()
      +
      Returns bytes that will be saved in the wallet.
      +
      +
    • +
    • +
      +

      deserializeWalletExtension

      +
      void deserializeWalletExtension(Wallet containingWallet, + byte[] data) + throws Exception
      +
      Loads the contents of this object from the wallet.
      +
      +
      Throws:
      +
      Exception
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletFiles.Listener.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletFiles.Listener.html new file mode 100644 index 000000000..5aa0a8c8b --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletFiles.Listener.html @@ -0,0 +1,146 @@ + + + + +WalletFiles.Listener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface WalletFiles.Listener

+
+
+
+
Enclosing class:
+
WalletFiles
+
+
+
public static interface WalletFiles.Listener
+
Implementors can do pre/post treatment of the wallet file. Useful for adjusting permissions and other things.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onAfterAutoSave(File newlySavedFile)
    +
    +
    Called on the auto-save thread after the newly created temporary file has been filled with data and renamed.
    +
    +
    void
    + +
    +
    Called on the auto-save thread when a new temporary file is created but before the wallet data is saved + to it.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onBeforeAutoSave

      +
      void onBeforeAutoSave(File tempFile)
      +
      Called on the auto-save thread when a new temporary file is created but before the wallet data is saved + to it. If you want to do something here like adjust permissions, go ahead and do so.
      +
      +
    • +
    • +
      +

      onAfterAutoSave

      +
      void onAfterAutoSave(File newlySavedFile)
      +
      Called on the auto-save thread after the newly created temporary file has been filled with data and renamed.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletFiles.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletFiles.html new file mode 100644 index 000000000..83b80b37c --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletFiles.html @@ -0,0 +1,267 @@ + + + + +WalletFiles (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WalletFiles

+
+
java.lang.Object +
org.bitcoinj.wallet.WalletFiles
+
+
+
+
public class WalletFiles +extends Object
+
A class that handles atomic and optionally delayed writing of the wallet file to disk. In future: backups too. + It can be useful to delay writing of a wallet file to disk on slow devices where disk and serialization overhead + can come to dominate the chain processing speed, i.e. on Android phones. By coalescing writes and doing serialization + and disk IO on a background thread performance can be improved.
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getWallet

      +
      public Wallet getWallet()
      +
      Get the Wallet this WalletFiles is managing.
      +
      +
    • +
    • +
      +

      setListener

      +
      public void setListener(@Nonnull + WalletFiles.Listener listener)
      +
      The given listener will be called on the autosave thread before and after the wallet is saved to disk.
      +
      +
    • +
    • +
      +

      saveNow

      +
      public void saveNow() + throws IOException
      +
      Actually write the wallet file to disk, using an atomic rename when possible. Runs on the current thread.
      +
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      saveLater

      +
      public void saveLater()
      +
      Queues up a save in the background. Useful for not very important wallet changes.
      +
      +
    • +
    • +
      +

      shutdownAndWait

      +
      public void shutdownAndWait()
      +
      Shut down auto-saving.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletProtobufSerializer.WalletFactory.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletProtobufSerializer.WalletFactory.html new file mode 100644 index 000000000..ab763c46b --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletProtobufSerializer.WalletFactory.html @@ -0,0 +1,179 @@ + + + + +WalletProtobufSerializer.WalletFactory (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface WalletProtobufSerializer.WalletFactory

+
+
+
+
Enclosing class:
+
WalletProtobufSerializer
+
+
+
Functional Interface:
+
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
+
+
+
@FunctionalInterface +public static interface WalletProtobufSerializer.WalletFactory
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletProtobufSerializer.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletProtobufSerializer.html new file mode 100644 index 000000000..5ab0fbbb3 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletProtobufSerializer.html @@ -0,0 +1,562 @@ + + + + +WalletProtobufSerializer (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WalletProtobufSerializer

+
+
java.lang.Object +
org.bitcoinj.wallet.WalletProtobufSerializer
+
+
+
+
public class WalletProtobufSerializer +extends Object
+
Serialize and de-serialize a wallet to a byte stream containing a + protocol buffer. Protocol buffers are + a data interchange format developed by Google with an efficient binary representation, a type safe specification + language and compilers that generate code to work with those data structures for many languages. Protocol buffers + can have their format evolved over time: conceptually they represent data using (tag, length, value) tuples. The + format is defined by the wallet.proto file in the bitcoinj source distribution. +

+ The most common operations are writeWallet and readWallet, which do + the obvious operations on Output/InputStreams. You can use a ByteArrayInputStream and equivalent + ByteArrayOutputStream if you'd like byte arrays instead. The protocol buffer can also be manipulated + in its object form if you'd like to modify the flattened data structure before serialization to binary. +

+ You can extend the wallet format with additional fields specific to your application if you want, but make sure + to either put the extra data in the provided extension areas, or select tag numbers that are unlikely to be used + by anyone else.

+
+
+ +
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      CURRENT_WALLET_VERSION

      +
      public static final int CURRENT_WALLET_VERSION
      +
      Current version used for serializing wallets. A version higher than this is considered from the future.
      +
      +
    • +
    • +
      +

      txMap

      +
      protected Map<com.google.protobuf.ByteString,Transaction> txMap
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setKeyChainFactory

      +
      public void setKeyChainFactory(KeyChainFactory keyChainFactory)
      +
      +
    • +
    • +
      +

      setRequireMandatoryExtensions

      +
      public void setRequireMandatoryExtensions(boolean value)
      +
      If this property is set to false, then unknown mandatory extensions will be ignored instead of causing load + errors. You should only use this if you know exactly what you are doing, as the extension data will NOT be + round-tripped, possibly resulting in a corrupted wallet if you save it back out again.
      +
      +
    • +
    • +
      +

      setRequireAllExtensionsKnown

      +
      public void setRequireAllExtensionsKnown(boolean value)
      +
      If this property is set to true, the wallet will fail to load if any found extensions are unknown..
      +
      +
    • +
    • +
      +

      setWalletWriteBufferSize

      +
      public void setWalletWriteBufferSize(int walletWriteBufferSize)
      +
      Change buffer size for writing wallet to output stream. Default is CodedOutputStream.DEFAULT_BUFFER_SIZE
      +
      +
      Parameters:
      +
      walletWriteBufferSize - - buffer size in bytes
      +
      +
      +
    • +
    • +
      +

      writeWallet

      +
      public void writeWallet(Wallet wallet, + OutputStream output) + throws IOException
      +
      Formats the given wallet (transactions and keys) to the given output stream in protocol buffer format.

      + + Equivalent to walletToProto(wallet).writeTo(output);

      +
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      walletToText

      +
      public String walletToText(Wallet wallet)
      +
      Returns the given wallet formatted as text. The text format is that used by protocol buffers and + it is designed more for debugging than storage. It is not well specified and wallets are largely binary data + structures anyway, consisting as they do of keys (large random numbers) and Transactions which also + mostly contain keys and hashes.
      +
      +
    • +
    • +
      +

      walletToProto

      +
      public org.bitcoinj.protobuf.wallet.Protos.Wallet walletToProto(Wallet wallet)
      +
      Converts the given wallet to the object representation of the protocol buffers. This can be modified, or + additional data fields set, before serialization takes place.
      +
      +
    • +
    • +
      +

      hashToByteString

      +
      public static com.google.protobuf.ByteString hashToByteString(Sha256Hash hash)
      +
      +
    • +
    • +
      +

      byteStringToHash

      +
      public static Sha256Hash byteStringToHash(com.google.protobuf.ByteString bs)
      +
      +
    • +
    • +
      +

      readWallet

      +
      public Wallet readWallet(InputStream input, + @Nullable + WalletExtension... walletExtensions) + throws UnreadableWalletException
      +

      Loads wallet data from the given protocol buffer and inserts it into the given Wallet object. This is primarily + useful when you wish to pre-register extension objects. Note that if loading fails the provided Wallet object + may be in an indeterminate state and should be thrown away.

      + +

      A wallet can be unreadable for various reasons, such as inability to open the file, corrupt data, internally + inconsistent data, a wallet extension marked as mandatory that cannot be handled and so on. You should always + handle UnreadableWalletException and communicate failure to the user in an appropriate manner.

      +
      +
      Throws:
      +
      UnreadableWalletException - thrown in various error conditions (see description).
      +
      +
      +
    • +
    • +
      +

      readWallet

      +
      public Wallet readWallet(InputStream input, + boolean forceReset, + @Nullable + WalletExtension[] extensions) + throws UnreadableWalletException
      +

      Loads wallet data from the given protocol buffer and inserts it into the given Wallet object. This is primarily + useful when you wish to pre-register extension objects. Note that if loading fails the provided Wallet object + may be in an indeterminate state and should be thrown away. Do not simply call this method again on the same + Wallet object with forceReset set true. It won't work.

      + +

      If forceReset is true, then no transactions are loaded from the wallet, and it is configured + to replay transactions from the blockchain (as if the wallet had been loaded and Wallet.reset() + had been called immediately thereafter). + +

      A wallet can be unreadable for various reasons, such as inability to open the file, corrupt data, internally + inconsistent data, a wallet extension marked as mandatory that cannot be handled and so on. You should always + handle UnreadableWalletException and communicate failure to the user in an appropriate manner.

      +
      +
      Throws:
      +
      UnreadableWalletException - thrown in various error conditions (see description).
      +
      +
      +
    • +
    • +
      +

      readWallet

      +
      public Wallet readWallet(Network network, + @Nullable + WalletExtension[] extensions, + org.bitcoinj.protobuf.wallet.Protos.Wallet walletProto) + throws UnreadableWalletException
      +

      Loads wallet data from the given protocol buffer and inserts it into the given Wallet object. This is primarily + useful when you wish to pre-register extension objects. Note that if loading fails the provided Wallet object + may be in an indeterminate state and should be thrown away.

      + +

      A wallet can be unreadable for various reasons, such as inability to open the file, corrupt data, internally + inconsistent data, a wallet extension marked as mandatory that cannot be handled and so on. You should always + handle UnreadableWalletException and communicate failure to the user in an appropriate manner.

      +
      +
      Throws:
      +
      UnreadableWalletException - thrown in various error conditions (see description).
      +
      +
      +
    • +
    • +
      +

      readWallet

      +
      @Deprecated +public Wallet readWallet(NetworkParameters params, + @Nullable + WalletExtension[] extensions, + org.bitcoinj.protobuf.wallet.Protos.Wallet walletProto) + throws UnreadableWalletException
      + +
      +
      Throws:
      +
      UnreadableWalletException
      +
      +
      +
    • +
    • +
      +

      readWallet

      +
      public Wallet readWallet(Network network, + @Nullable + WalletExtension[] extensions, + org.bitcoinj.protobuf.wallet.Protos.Wallet walletProto, + boolean forceReset) + throws UnreadableWalletException
      +

      Loads wallet data from the given protocol buffer and inserts it into the given Wallet object. This is primarily + useful when you wish to pre-register extension objects. Note that if loading fails the provided Wallet object + may be in an indeterminate state and should be thrown away. Do not simply call this method again on the same + Wallet object with forceReset set true. It won't work.

      + +

      If forceReset is true, then no transactions are loaded from the wallet, and it is configured + to replay transactions from the blockchain (as if the wallet had been loaded and Wallet.reset() + had been called immediately thereafter). + +

      A wallet can be unreadable for various reasons, such as inability to open the file, corrupt data, internally + inconsistent data, a wallet extension marked as mandatory that cannot be handled and so on. You should always + handle UnreadableWalletException and communicate failure to the user in an appropriate manner.

      +
      +
      Throws:
      +
      UnreadableWalletException - thrown in various error conditions (see description).
      +
      +
      +
    • +
    • +
      +

      readWallet

      +
      @Deprecated +public Wallet readWallet(NetworkParameters params, + @Nullable + WalletExtension[] extensions, + org.bitcoinj.protobuf.wallet.Protos.Wallet walletProto, + boolean forceReset) + throws UnreadableWalletException
      + +
      +
      Throws:
      +
      UnreadableWalletException
      +
      +
      +
    • +
    • +
      +

      parseToProto

      +
      public static org.bitcoinj.protobuf.wallet.Protos.Wallet parseToProto(InputStream input) + throws IOException
      +
      Returns the loaded protocol buffer from the given byte stream. You normally want + Wallet.loadFromFile(File, WalletExtension...) instead - this method is designed for low level + work involving the wallet file format itself.
      +
      +
      Throws:
      +
      IOException
      +
      +
      +
    • +
    • +
      +

      isWallet

      +
      public static boolean isWallet(InputStream is)
      +
      Cheap test to see if input stream is a wallet. This checks for a magic value at the beginning of the stream.
      +
      +
      Parameters:
      +
      is - input stream to test
      +
      Returns:
      +
      true if input stream is a wallet
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletTransaction.Pool.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletTransaction.Pool.html new file mode 100644 index 000000000..872aeb462 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletTransaction.Pool.html @@ -0,0 +1,237 @@ + + + + +WalletTransaction.Pool (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Enum Class WalletTransaction.Pool

+
+
java.lang.Object +
java.lang.Enum<WalletTransaction.Pool> +
org.bitcoinj.wallet.WalletTransaction.Pool
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<WalletTransaction.Pool>, Constable
+
+
+
Enclosing class:
+
WalletTransaction
+
+
+
public static enum WalletTransaction.Pool +extends Enum<WalletTransaction.Pool>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    + +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static WalletTransaction.Pool[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static WalletTransaction.Pool valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletTransaction.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletTransaction.html new file mode 100644 index 000000000..c5cbba986 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/WalletTransaction.html @@ -0,0 +1,185 @@ + + + + +WalletTransaction (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class WalletTransaction

+
+
java.lang.Object +
org.bitcoinj.wallet.WalletTransaction
+
+
+
+
public class WalletTransaction +extends Object
+
Stores data about a transaction that is only relevant to the Wallet class.
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/AbstractKeyChainEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/AbstractKeyChainEventListener.html new file mode 100644 index 000000000..01527d6b1 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/AbstractKeyChainEventListener.html @@ -0,0 +1,174 @@ + + + + +AbstractKeyChainEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class AbstractKeyChainEventListener

+
+
java.lang.Object +
org.bitcoinj.wallet.listeners.AbstractKeyChainEventListener
+
+
+
+
All Implemented Interfaces:
+
KeyChainEventListener
+
+
+
public class AbstractKeyChainEventListener +extends Object +implements KeyChainEventListener
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AbstractKeyChainEventListener

      +
      public AbstractKeyChainEventListener()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onKeysAdded

      +
      public void onKeysAdded(List<ECKey> keys)
      +
      Description copied from interface: KeyChainEventListener
      +
      Called whenever a new key is added to the key chain, whether that be via an explicit addition or due to some + other automatic derivation. See the documentation for your KeyChain implementation for details on what + can trigger this event.
      +
      +
      Specified by:
      +
      onKeysAdded in interface KeyChainEventListener
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/CurrentKeyChangeEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/CurrentKeyChangeEventListener.html new file mode 100644 index 000000000..d70f599bb --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/CurrentKeyChangeEventListener.html @@ -0,0 +1,127 @@ + + + + +CurrentKeyChangeEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface CurrentKeyChangeEventListener

+
+
+
+
public interface CurrentKeyChangeEventListener
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Called by KeyChainGroup whenever a current key and/or address changes.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onCurrentKeyChanged

      +
      void onCurrentKeyChanged()
      +
      Called by KeyChainGroup whenever a current key and/or address changes.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/KeyChainEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/KeyChainEventListener.html new file mode 100644 index 000000000..e963afb6d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/KeyChainEventListener.html @@ -0,0 +1,134 @@ + + + + +KeyChainEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface KeyChainEventListener

+
+
+
+
All Known Implementing Classes:
+
AbstractKeyChainEventListener, NativeKeyChainEventListener
+
+
+
public interface KeyChainEventListener
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Called whenever a new key is added to the key chain, whether that be via an explicit addition or due to some + other automatic derivation.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onKeysAdded

      +
      void onKeysAdded(List<ECKey> keys)
      +
      Called whenever a new key is added to the key chain, whether that be via an explicit addition or due to some + other automatic derivation. See the documentation for your KeyChain implementation for details on what + can trigger this event.
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/ScriptsChangeEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/ScriptsChangeEventListener.html new file mode 100644 index 000000000..afdd73965 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/ScriptsChangeEventListener.html @@ -0,0 +1,141 @@ + + + + +ScriptsChangeEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface ScriptsChangeEventListener

+
+
+
+
All Known Implementing Classes:
+
NativeScriptsChangeEventListener
+
+
+
public interface ScriptsChangeEventListener
+

Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money + or a block chain re-organize.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onScriptsChanged(Wallet wallet, + List<Script> scripts, + boolean isAddingScripts)
    +
    +
    Called whenever a new watched script is added to the wallet.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onScriptsChanged

      +
      void onScriptsChanged(Wallet wallet, + List<Script> scripts, + boolean isAddingScripts)
      +
      Called whenever a new watched script is added to the wallet.
      +
      +
      Parameters:
      +
      isAddingScripts - will be true if added scripts, false if removed scripts.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/WalletChangeEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/WalletChangeEventListener.html new file mode 100644 index 000000000..a40c9b66d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/WalletChangeEventListener.html @@ -0,0 +1,148 @@ + + + + +WalletChangeEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface WalletChangeEventListener

+
+
+
+
All Known Implementing Classes:
+
NativeWalletChangeEventListener
+
+
+
public interface WalletChangeEventListener
+

Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money + or a block chain re-organize.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Designed for GUI applications to refresh their transaction lists.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onWalletChanged

      +
      void onWalletChanged(Wallet wallet)
      +

      Designed for GUI applications to refresh their transaction lists. This callback is invoked in the following + situations:

      + +
        +
      1. A new block is received (and thus building transactions got more confidence)
      2. +
      3. A pending transaction is received
      4. +
      5. A pending transaction changes confidence due to some non-new-block related event, such as being + announced by more peers or by a double-spend conflict being observed.
      6. +
      7. A re-organize occurs. Call occurs only if the re-org modified any of our transactions.
      8. +
      9. A new spend is committed to the wallet.
      10. +
      11. The wallet is reset and all transactions removed.
      12. +
      + +

      When this is called you can refresh the UI contents from the wallet contents. It's more efficient to use + this rather than onTransactionConfidenceChanged() + onReorganize() because you only get one callback per block + rather than one per transaction per block. Note that this is not called when a key is added.

      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.html new file mode 100644 index 000000000..66502e922 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.html @@ -0,0 +1,152 @@ + + + + +WalletCoinsReceivedEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface WalletCoinsReceivedEventListener

+
+
+
+
All Known Implementing Classes:
+
NativeWalletCoinsReceivedEventListener
+
+
+
public interface WalletCoinsReceivedEventListener
+

Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money + or a block chain re-organize.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onCoinsReceived(Wallet wallet, + Transaction tx, + Coin prevBalance, + Coin newBalance)
    +
    +
    This is called when a transaction is seen that sends coins to this wallet, either because it + was broadcast across the network or because a block was received.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onCoinsReceived

      +
      void onCoinsReceived(Wallet wallet, + Transaction tx, + Coin prevBalance, + Coin newBalance)
      +
      This is called when a transaction is seen that sends coins to this wallet, either because it + was broadcast across the network or because a block was received. If a transaction is seen when it was broadcast, + onCoinsReceived won't be called again when a block containing it is received. If you want to know when such a + transaction receives its first confirmation, register a TransactionConfidence event listener using + the object retrieved via Transaction.getConfidence(). It's safe to modify the + wallet in this callback, for example, by spending the transaction just received.
      +
      +
      Parameters:
      +
      wallet - The wallet object that received the coins
      +
      tx - The transaction which sent us the coins.
      +
      prevBalance - Balance before the coins were received.
      +
      newBalance - Current balance of the wallet. This is the 'estimated' balance.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/WalletCoinsSentEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/WalletCoinsSentEventListener.html new file mode 100644 index 000000000..a0048587f --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/WalletCoinsSentEventListener.html @@ -0,0 +1,155 @@ + + + + +WalletCoinsSentEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface WalletCoinsSentEventListener

+
+
+
+
All Known Implementing Classes:
+
NativeWalletCoinsSentEventListener
+
+
+
public interface WalletCoinsSentEventListener
+

Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money + or a block chain re-organize.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    onCoinsSent(Wallet wallet, + Transaction tx, + Coin prevBalance, + Coin newBalance)
    +
    +
    This is called when a transaction is seen that sends coins from this wallet, either + because it was broadcast across the network or because a block was received.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onCoinsSent

      +
      void onCoinsSent(Wallet wallet, + Transaction tx, + Coin prevBalance, + Coin newBalance)
      +
      This is called when a transaction is seen that sends coins from this wallet, either + because it was broadcast across the network or because a block was received. This may at first glance seem + useless, because in the common case you already know about such transactions because you created them with + the Wallets createSend/sendCoins methods. However when you have a wallet containing only keys, and you wish + to replay the block chain to fill it with transactions, it's useful to find out when a transaction is discovered + that sends coins from the wallet.

      + + It's safe to modify the wallet from inside this callback, but if you're replaying the block chain you should + be careful to avoid such modifications. Otherwise your changes may be overridden by new data from the chain.

      +
      +
      Parameters:
      +
      wallet - The wallet object that this callback relates to (that sent the coins).
      +
      tx - The transaction that sent the coins to someone else.
      +
      prevBalance - The wallets balance before this transaction was seen.
      +
      newBalance - The wallets balance after this transaction was seen. This is the 'estimated' balance.
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/WalletReorganizeEventListener.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/WalletReorganizeEventListener.html new file mode 100644 index 000000000..f58da7a46 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/WalletReorganizeEventListener.html @@ -0,0 +1,139 @@ + + + + +WalletReorganizeEventListener (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Interface WalletReorganizeEventListener

+
+
+
+
All Known Implementing Classes:
+
NativeWalletReorganizeEventListener
+
+
+
public interface WalletReorganizeEventListener
+

Implementors are called when the wallet is reorganized.

+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    This is called when a block is received that triggers a block chain re-organization.
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      onReorganize

      +
      void onReorganize(Wallet wallet)
      +

      This is called when a block is received that triggers a block chain re-organization.

      + +

      A re-organize means that the consensus (chain) of the network has diverged and now changed from what we + believed it was previously. Usually this won't matter because the new consensus will include all our old + transactions assuming we are playing by the rules. However it's theoretically possible for our balance to + change in arbitrary ways, most likely, we could lose some money we thought we had.

      + +

      It is safe to use methods of wallet whilst inside this callback.

      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/package-summary.html new file mode 100644 index 000000000..a6a586ce8 --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/package-summary.html @@ -0,0 +1,131 @@ + + + + +org.bitcoinj.wallet.listeners (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.wallet.listeners

+
+
+
package org.bitcoinj.wallet.listeners
+
+
    +
  • + +
  • +
  • +
    +
    +
    +
    +
    Class
    +
    Description
    + +
     
    + +
     
    + +
     
    + +
    +
    Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money + or a block chain re-organize.
    +
    + +
    +
    Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money + or a block chain re-organize.
    +
    + +
    +
    Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money + or a block chain re-organize.
    +
    + +
    +
    Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money + or a block chain re-organize.
    +
    + +
    +
    Implementors are called when the wallet is reorganized.
    +
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/package-tree.html new file mode 100644 index 000000000..1685ec68e --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/listeners/package-tree.html @@ -0,0 +1,83 @@ + + + + +org.bitcoinj.wallet.listeners Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.wallet.listeners

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/package-summary.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/package-summary.html new file mode 100644 index 000000000..d727eb43b --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/package-summary.html @@ -0,0 +1,313 @@ + + + + +org.bitcoinj.wallet (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.bitcoinj.wallet

+
+
+
package org.bitcoinj.wallet
+
+
Classes that support the Wallet, which knows how to find and save transactions relevant to + a set of keys or scripts, calculate balances, and spend money: the wallet has many features and can be extended + in various ways, please refer to the website for documentation on how to use it.
+
+
+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/org/bitcoinj/wallet/package-tree.html b/javadoc/0.17-rc1/org/bitcoinj/wallet/package-tree.html new file mode 100644 index 000000000..b01e3da7d --- /dev/null +++ b/javadoc/0.17-rc1/org/bitcoinj/wallet/package-tree.html @@ -0,0 +1,169 @@ + + + + +org.bitcoinj.wallet Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.bitcoinj.wallet

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/overview-summary.html b/javadoc/0.17-rc1/overview-summary.html new file mode 100644 index 000000000..77177bf91 --- /dev/null +++ b/javadoc/0.17-rc1/overview-summary.html @@ -0,0 +1,25 @@ + + + + +bitcoinj-core 0.17-rc1 API + + + + + + + + + + +
+ +

index.html

+
+ + diff --git a/javadoc/0.17-rc1/overview-tree.html b/javadoc/0.17-rc1/overview-tree.html new file mode 100644 index 000000000..9df48d6f8 --- /dev/null +++ b/javadoc/0.17-rc1/overview-tree.html @@ -0,0 +1,678 @@ + + + + +Class Hierarchy (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Class Hierarchy

+ +
+
+
+
+ + diff --git a/javadoc/0.17-rc1/package-search-index.js b/javadoc/0.17-rc1/package-search-index.js new file mode 100644 index 000000000..722591c11 --- /dev/null +++ b/javadoc/0.17-rc1/package-search-index.js @@ -0,0 +1 @@ +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"org.bitcoinj.base"},{"l":"org.bitcoinj.base.exceptions"},{"l":"org.bitcoinj.base.internal"},{"l":"org.bitcoinj.base.utils"},{"l":"org.bitcoinj.core"},{"l":"org.bitcoinj.core.internal"},{"l":"org.bitcoinj.core.listeners"},{"l":"org.bitcoinj.crypto"},{"l":"org.bitcoinj.crypto.internal"},{"l":"org.bitcoinj.crypto.utils"},{"l":"org.bitcoinj.jni"},{"l":"org.bitcoinj.kits"},{"l":"org.bitcoinj.net"},{"l":"org.bitcoinj.net.discovery"},{"l":"org.bitcoinj.params"},{"l":"org.bitcoinj.protocols.payments"},{"l":"org.bitcoinj.script"},{"l":"org.bitcoinj.signers"},{"l":"org.bitcoinj.store"},{"l":"org.bitcoinj.testing"},{"l":"org.bitcoinj.uri"},{"l":"org.bitcoinj.utils"},{"l":"org.bitcoinj.wallet"},{"l":"org.bitcoinj.wallet.listeners"}];updateSearchResults(); \ No newline at end of file diff --git a/javadoc/0.17-rc1/resources/glass.png b/javadoc/0.17-rc1/resources/glass.png new file mode 100644 index 0000000000000000000000000000000000000000..a7f591f467a1c0c949bbc510156a0c1afb860a6e GIT binary patch literal 499 zcmVJoRsvExf%rEN>jUL}qZ_~k#FbE+Q;{`;0FZwVNX2n-^JoI; zP;4#$8DIy*Yk-P>VN(DUKmPse7mx+ExD4O|;?E5D0Z5($mjO3`*anwQU^s{ZDK#Lz zj>~{qyaIx5K!t%=G&2IJNzg!ChRpyLkO7}Ry!QaotAHAMpbB3AF(}|_f!G-oI|uK6 z`id_dumai5K%C3Y$;tKS_iqMPHg<*|-@e`liWLAggVM!zAP#@l;=c>S03;{#04Z~5 zN_+ss=Yg6*hTr59mzMwZ@+l~q!+?ft!fF66AXT#wWavHt30bZWFCK%!BNk}LN?0Hg z1VF_nfs`Lm^DjYZ1(1uD0u4CSIr)XAaqW6IT{!St5~1{i=i}zAy76p%_|w8rh@@c0Axr!ns=D-X+|*sY6!@wacG9%)Qn*O zl0sa739kT-&_?#oVxXF6tOnqTD)cZ}2vi$`ZU8RLAlo8=_z#*P3xI~i!lEh+Pdu-L zx{d*wgjtXbnGX_Yf@Tc7Q3YhLhPvc8noGJs2DA~1DySiA&6V{5JzFt ojAY1KXm~va;tU{v7C?Xj0BHw!K;2aXV*mgE07*qoM6N<$f;4TDA^-pY literal 0 HcmV?d00001 diff --git a/javadoc/0.17-rc1/script-dir/jquery-3.7.1.min.js b/javadoc/0.17-rc1/script-dir/jquery-3.7.1.min.js new file mode 100644 index 000000000..7f37b5d99 --- /dev/null +++ b/javadoc/0.17-rc1/script-dir/jquery-3.7.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",le.option=!!xe.lastChild;var ke={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=x.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthC(E(s),E(n))?o.important="horizontal":o.important="vertical",c.using.call(this,t,o)}),l.offset(x.extend(u,{using:t}))})},x.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,l=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=x(t.target),i=x(x.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){x.contains(this.element[0],x.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=x(t.target).closest(".ui-menu-item"),i=x(t.currentTarget),e[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=x(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case x.ui.keyCode.PAGE_UP:this.previousPage(t);break;case x.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case x.ui.keyCode.HOME:this._move("first","first",t);break;case x.ui.keyCode.END:this._move("last","last",t);break;case x.ui.keyCode.UP:this.previous(t);break;case x.ui.keyCode.DOWN:this.next(t);break;case x.ui.keyCode.LEFT:this.collapse(t);break;case x.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case x.ui.keyCode.ENTER:case x.ui.keyCode.SPACE:this._activate(t);break;case x.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=x(this),e=t.prev(),i=x("").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=x(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(e=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(e,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!x.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(i=parseFloat(x.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(x.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&this._isContentEditable(this.element),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=x.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=x("
    ").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){x(t.target).trigger(t.originalEvent)});s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(x("
    ").text(i))},100))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==x.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=x("
    ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||x.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?x(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(x.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=x.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(x("
    ").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),x.extend(x.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(x.ui.autocomplete.escapeRegex(e),"i");return x.grep(t,function(t){return i.test(t.label||t.value||t)})}}),x.widget("ui.autocomplete",x.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1").text(e))},100))}});x.ui.autocomplete}); \ No newline at end of file diff --git a/javadoc/0.17-rc1/script.js b/javadoc/0.17-rc1/script.js new file mode 100644 index 000000000..73cd8faac --- /dev/null +++ b/javadoc/0.17-rc1/script.js @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var moduleSearchIndex; +var packageSearchIndex; +var typeSearchIndex; +var memberSearchIndex; +var tagSearchIndex; +function loadScripts(doc, tag) { + createElem(doc, tag, 'search.js'); + + createElem(doc, tag, 'module-search-index.js'); + createElem(doc, tag, 'package-search-index.js'); + createElem(doc, tag, 'type-search-index.js'); + createElem(doc, tag, 'member-search-index.js'); + createElem(doc, tag, 'tag-search-index.js'); +} + +function createElem(doc, tag, path) { + var script = doc.createElement(tag); + var scriptElement = doc.getElementsByTagName(tag)[0]; + script.src = pathtoroot + path; + scriptElement.parentNode.insertBefore(script, scriptElement); +} + +function show(tableId, selected, columns) { + if (tableId !== selected) { + document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')') + .forEach(function(elem) { + elem.style.display = 'none'; + }); + } + document.querySelectorAll('div.' + selected) + .forEach(function(elem, index) { + elem.style.display = ''; + var isEvenRow = index % (columns * 2) < columns; + elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor); + elem.classList.add(isEvenRow ? evenRowColor : oddRowColor); + }); + updateTabs(tableId, selected); +} + +function updateTabs(tableId, selected) { + document.getElementById(tableId + '.tabpanel') + .setAttribute('aria-labelledby', selected); + document.querySelectorAll('button[id^="' + tableId + '"]') + .forEach(function(tab, index) { + if (selected === tab.id || (tableId === selected && index === 0)) { + tab.className = activeTableTab; + tab.setAttribute('aria-selected', true); + tab.setAttribute('tabindex',0); + } else { + tab.className = tableTab; + tab.setAttribute('aria-selected', false); + tab.setAttribute('tabindex',-1); + } + }); +} + +function switchTab(e) { + var selected = document.querySelector('[aria-selected=true]'); + if (selected) { + if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) { + // left or up arrow key pressed: move focus to previous tab + selected.previousSibling.click(); + selected.previousSibling.focus(); + e.preventDefault(); + } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) { + // right or down arrow key pressed: move focus to next tab + selected.nextSibling.click(); + selected.nextSibling.focus(); + e.preventDefault(); + } + } +} + +var updateSearchResults = function() {}; + +function indexFilesLoaded() { + return moduleSearchIndex + && packageSearchIndex + && typeSearchIndex + && memberSearchIndex + && tagSearchIndex; +} + +// Workaround for scroll position not being included in browser history (8249133) +document.addEventListener("DOMContentLoaded", function(e) { + var contentDiv = document.querySelector("div.flex-content"); + window.addEventListener("popstate", function(e) { + if (e.state !== null) { + contentDiv.scrollTop = e.state; + } + }); + window.addEventListener("hashchange", function(e) { + history.replaceState(contentDiv.scrollTop, document.title); + }); + contentDiv.addEventListener("scroll", function(e) { + var timeoutID; + if (!timeoutID) { + timeoutID = setTimeout(function() { + history.replaceState(contentDiv.scrollTop, document.title); + timeoutID = null; + }, 100); + } + }); + if (!location.hash) { + history.replaceState(contentDiv.scrollTop, document.title); + } +}); diff --git a/javadoc/0.17-rc1/search.js b/javadoc/0.17-rc1/search.js new file mode 100644 index 000000000..db3b2f4a6 --- /dev/null +++ b/javadoc/0.17-rc1/search.js @@ -0,0 +1,354 @@ +/* + * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var noResult = {l: "No results found"}; +var loading = {l: "Loading search index..."}; +var catModules = "Modules"; +var catPackages = "Packages"; +var catTypes = "Classes and Interfaces"; +var catMembers = "Members"; +var catSearchTags = "Search Tags"; +var highlight = "$&"; +var searchPattern = ""; +var fallbackPattern = ""; +var RANKING_THRESHOLD = 2; +var NO_MATCH = 0xffff; +var MIN_RESULTS = 3; +var MAX_RESULTS = 500; +var UNNAMED = ""; +function escapeHtml(str) { + return str.replace(//g, ">"); +} +function getHighlightedText(item, matcher, fallbackMatcher) { + var escapedItem = escapeHtml(item); + var highlighted = escapedItem.replace(matcher, highlight); + if (highlighted === escapedItem) { + highlighted = escapedItem.replace(fallbackMatcher, highlight) + } + return highlighted; +} +function getURLPrefix(ui) { + var urlPrefix=""; + var slash = "/"; + if (ui.item.category === catModules) { + return ui.item.l + slash; + } else if (ui.item.category === catPackages && ui.item.m) { + return ui.item.m + slash; + } else if (ui.item.category === catTypes || ui.item.category === catMembers) { + if (ui.item.m) { + urlPrefix = ui.item.m + slash; + } else { + $.each(packageSearchIndex, function(index, item) { + if (item.m && ui.item.p === item.l) { + urlPrefix = item.m + slash; + } + }); + } + } + return urlPrefix; +} +function createSearchPattern(term) { + var pattern = ""; + var isWordToken = false; + term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) { + if (index > 0) { + // whitespace between identifiers is significant + pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*"; + } + var tokens = w.split(/(?=[A-Z,.()<>[\/])/); + for (var i = 0; i < tokens.length; i++) { + var s = tokens[i]; + if (s === "") { + continue; + } + pattern += $.ui.autocomplete.escapeRegex(s); + isWordToken = /\w$/.test(s); + if (isWordToken) { + pattern += "([a-z0-9_$<>\\[\\]]*?)"; + } + } + }); + return pattern; +} +function createMatcher(pattern, flags) { + var isCamelCase = /[A-Z]/.test(pattern); + return new RegExp(pattern, flags + (isCamelCase ? "" : "i")); +} +var watermark = 'Search'; +$(function() { + var search = $("#search-input"); + var reset = $("#reset-button"); + search.val(''); + search.prop("disabled", false); + reset.prop("disabled", false); + search.val(watermark).addClass('watermark'); + search.blur(function() { + if ($(this).val().length === 0) { + $(this).val(watermark).addClass('watermark'); + } + }); + search.on('click keydown paste', function() { + if ($(this).val() === watermark) { + $(this).val('').removeClass('watermark'); + } + }); + reset.click(function() { + search.val('').focus(); + }); + search.focus()[0].setSelectionRange(0, 0); +}); +$.widget("custom.catcomplete", $.ui.autocomplete, { + _create: function() { + this._super(); + this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); + }, + _renderMenu: function(ul, items) { + var rMenu = this; + var currentCategory = ""; + rMenu.menu.bindings = $(); + $.each(items, function(index, item) { + var li; + if (item.category && item.category !== currentCategory) { + ul.append("
  • " + item.category + "
  • "); + currentCategory = item.category; + } + li = rMenu._renderItemData(ul, item); + if (item.category) { + li.attr("aria-label", item.category + " : " + item.l); + li.attr("class", "result-item"); + } else { + li.attr("aria-label", item.l); + li.attr("class", "result-item"); + } + }); + }, + _renderItem: function(ul, item) { + var label = ""; + var matcher = createMatcher(escapeHtml(searchPattern), "g"); + var fallbackMatcher = new RegExp(fallbackPattern, "gi") + if (item.category === catModules) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catPackages) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catTypes) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catMembers) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.c + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.c + "." + item.l, matcher, fallbackMatcher); + } else if (item.category === catSearchTags) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else { + label = item.l; + } + var li = $("
  • ").appendTo(ul); + var div = $("
    ").appendTo(li); + if (item.category === catSearchTags && item.h) { + if (item.d) { + div.html(label + " (" + item.h + ")
    " + + item.d + "
    "); + } else { + div.html(label + " (" + item.h + ")"); + } + } else { + if (item.m) { + div.html(item.m + "/" + label); + } else { + div.html(label); + } + } + return li; + } +}); +function rankMatch(match, category) { + if (!match) { + return NO_MATCH; + } + var index = match.index; + var input = match.input; + var leftBoundaryMatch = 2; + var periferalMatch = 0; + // make sure match is anchored on a left word boundary + if (index === 0 || /\W/.test(input[index - 1]) || "_" === input[index]) { + leftBoundaryMatch = 0; + } else if ("_" === input[index - 1] || (input[index] === input[index].toUpperCase() && !/^[A-Z0-9_$]+$/.test(input))) { + leftBoundaryMatch = 1; + } + var matchEnd = index + match[0].length; + var leftParen = input.indexOf("("); + var endOfName = leftParen > -1 ? leftParen : input.length; + // exclude peripheral matches + if (category !== catModules && category !== catSearchTags) { + var delim = category === catPackages ? "/" : "."; + if (leftParen > -1 && leftParen < index) { + periferalMatch += 2; + } else if (input.lastIndexOf(delim, endOfName) >= matchEnd) { + periferalMatch += 2; + } + } + var delta = match[0].length === endOfName ? 0 : 1; // rank full match higher than partial match + for (var i = 1; i < match.length; i++) { + // lower ranking if parts of the name are missing + if (match[i]) + delta += match[i].length; + } + if (category === catTypes) { + // lower ranking if a type name contains unmatched camel-case parts + if (/[A-Z]/.test(input.substring(matchEnd))) + delta += 5; + if (/[A-Z]/.test(input.substring(0, index))) + delta += 5; + } + return leftBoundaryMatch + periferalMatch + (delta / 200); + +} +function doSearch(request, response) { + var result = []; + searchPattern = createSearchPattern(request.term); + fallbackPattern = createSearchPattern(request.term.toLowerCase()); + if (searchPattern === "") { + return this.close(); + } + var camelCaseMatcher = createMatcher(searchPattern, ""); + var fallbackMatcher = new RegExp(fallbackPattern, "i"); + + function searchIndexWithMatcher(indexArray, matcher, category, nameFunc) { + if (indexArray) { + var newResults = []; + $.each(indexArray, function (i, item) { + item.category = category; + var ranking = rankMatch(matcher.exec(nameFunc(item)), category); + if (ranking < RANKING_THRESHOLD) { + newResults.push({ranking: ranking, item: item}); + } + return newResults.length <= MAX_RESULTS; + }); + return newResults.sort(function(e1, e2) { + return e1.ranking - e2.ranking; + }).map(function(e) { + return e.item; + }); + } + return []; + } + function searchIndex(indexArray, category, nameFunc) { + var primaryResults = searchIndexWithMatcher(indexArray, camelCaseMatcher, category, nameFunc); + result = result.concat(primaryResults); + if (primaryResults.length <= MIN_RESULTS && !camelCaseMatcher.ignoreCase) { + var secondaryResults = searchIndexWithMatcher(indexArray, fallbackMatcher, category, nameFunc); + result = result.concat(secondaryResults.filter(function (item) { + return primaryResults.indexOf(item) === -1; + })); + } + } + + searchIndex(moduleSearchIndex, catModules, function(item) { return item.l; }); + searchIndex(packageSearchIndex, catPackages, function(item) { + return (item.m && request.term.indexOf("/") > -1) + ? (item.m + "/" + item.l) : item.l; + }); + searchIndex(typeSearchIndex, catTypes, function(item) { + return request.term.indexOf(".") > -1 ? item.p + "." + item.l : item.l; + }); + searchIndex(memberSearchIndex, catMembers, function(item) { + return request.term.indexOf(".") > -1 + ? item.p + "." + item.c + "." + item.l : item.l; + }); + searchIndex(tagSearchIndex, catSearchTags, function(item) { return item.l; }); + + if (!indexFilesLoaded()) { + updateSearchResults = function() { + doSearch(request, response); + } + result.unshift(loading); + } else { + updateSearchResults = function() {}; + } + response(result); +} +$(function() { + $("#search-input").catcomplete({ + minLength: 1, + delay: 300, + source: doSearch, + response: function(event, ui) { + if (!ui.content.length) { + ui.content.push(noResult); + } else { + $("#search-input").empty(); + } + }, + autoFocus: true, + focus: function(event, ui) { + return false; + }, + position: { + collision: "flip" + }, + select: function(event, ui) { + if (ui.item.category) { + var url = getURLPrefix(ui); + if (ui.item.category === catModules) { + url += "module-summary.html"; + } else if (ui.item.category === catPackages) { + if (ui.item.u) { + url = ui.item.u; + } else { + url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; + } + } else if (ui.item.category === catTypes) { + if (ui.item.u) { + url = ui.item.u; + } else if (ui.item.p === UNNAMED) { + url += ui.item.l + ".html"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html"; + } + } else if (ui.item.category === catMembers) { + if (ui.item.p === UNNAMED) { + url += ui.item.c + ".html" + "#"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; + } + if (ui.item.u) { + url += ui.item.u; + } else { + url += ui.item.l; + } + } else if (ui.item.category === catSearchTags) { + url += ui.item.u; + } + if (top !== window) { + parent.classFrame.location = pathtoroot + url; + } else { + window.location.href = pathtoroot + url; + } + $("#search-input").focus(); + } + } + }); +}); diff --git a/javadoc/0.17-rc1/serialized-form.html b/javadoc/0.17-rc1/serialized-form.html new file mode 100644 index 000000000..4665f2d62 --- /dev/null +++ b/javadoc/0.17-rc1/serialized-form.html @@ -0,0 +1,732 @@ + + + + +Serialized Form (bitcoinj-core 0.17-rc1 API) + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Serialized Form

    +
    + +
    +
    +
    + + diff --git a/javadoc/0.17-rc1/stylesheet.css b/javadoc/0.17-rc1/stylesheet.css new file mode 100644 index 000000000..4a576bd24 --- /dev/null +++ b/javadoc/0.17-rc1/stylesheet.css @@ -0,0 +1,869 @@ +/* + * Javadoc style sheet + */ + +@import url('resources/fonts/dejavu.css'); + +/* + * Styles for individual HTML elements. + * + * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular + * HTML element throughout the page. + */ + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; + padding:0; + height:100%; + width:100%; +} +iframe { + margin:0; + padding:0; + height:100%; + width:100%; + overflow-y:scroll; + border:none; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a[href]:hover, a[href]:focus { + text-decoration:none; + color:#bb7a2a; +} +a[name] { + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; +} +h4 { + font-size:15px; +} +h5 { + font-size:14px; +} +h6 { + font-size:13px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; +} +:not(h1, h2, h3, h4, h5, h6) > code, +:not(h1, h2, h3, h4, h5, h6) > tt { + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +.summary-table dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +button { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size: 14px; +} +/* + * Styles for HTML generated by javadoc. + * + * These are style classes that are used by the standard doclet to generate HTML documentation. + */ + +/* + * Styles for document title and copyright. + */ +.clear { + clear:both; + height:0; + overflow:hidden; +} +.about-language { + float:right; + padding:0 21px 8px 8px; + font-size:11px; + margin-top:-9px; + height:2.9em; +} +.legal-copy { + margin-left:.5em; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* + * Styles for navigation bar. + */ +@media screen { + .flex-box { + position:fixed; + display:flex; + flex-direction:column; + height: 100%; + width: 100%; + } + .flex-header { + flex: 0 0 auto; + } + .flex-content { + flex: 1 1 auto; + overflow-y: auto; + } +} +.top-nav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + min-height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.sub-nav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.sub-nav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list { + padding-top:5px; +} +ul.nav-list { + display:block; + margin:0 25px 0 0; + padding:0; +} +ul.sub-nav-list { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.nav-list li { + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list-search { + float:right; + margin:0 0 0 0; + padding:5px 6px; + clear:none; +} +.nav-list-search label { + position:relative; + right:-16px; +} +ul.sub-nav-list li { + list-style:none; + float:left; + padding-top:10px; +} +.top-nav a:link, .top-nav a:active, .top-nav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.top-nav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.nav-bar-cell1-rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skip-nav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* + * Hide navigation links and search box in print layout + */ +@media print { + ul.nav-list, div.sub-nav { + display:none; + } +} +/* + * Styles for page header and footer. + */ +.title { + color:#2c4557; + margin:10px 0; +} +.sub-title { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* + * Styles for headings. + */ +body.class-declaration-page .summary h2, +body.class-declaration-page .details h2, +body.class-use-page h2, +body.module-declaration-page .block-list h2 { + font-style: italic; + padding:0; + margin:15px 0; +} +body.class-declaration-page .summary h3, +body.class-declaration-page .details h3, +body.class-declaration-page .summary .inherited-list h2 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +/* + * Styles for page layout containers. + */ +main { + clear:both; + padding:10px 20px; + position:relative; +} +dl.notes > dt { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +dl.notes > dd { + margin:5px 10px 10px 0; + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +dl.name-value > dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +dl.name-value > dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* + * Styles for lists. + */ +li.circle { + list-style:circle; +} +ul.horizontal li { + display:inline; + font-size:0.9em; +} +div.inheritance { + margin:0; + padding:0; +} +div.inheritance div.inheritance { + margin-left:2em; +} +ul.block-list, +ul.details-list, +ul.member-list, +ul.summary-list { + margin:10px 0 10px 0; + padding:0; +} +ul.block-list > li, +ul.details-list > li, +ul.member-list > li, +ul.summary-list > li { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +.summary-table dl, .summary-table dl dt, .summary-table dl dd { + margin-top:0; + margin-bottom:1px; +} +ul.see-list, ul.see-list-long { + padding-left: 0; + list-style: none; +} +ul.see-list li { + display: inline; +} +ul.see-list li:not(:last-child):after, +ul.see-list-long li:not(:last-child):after { + content: ", "; + white-space: pre-wrap; +} +/* + * Styles for tables. + */ +.summary-table, .details-table { + width:100%; + border-spacing:0; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; + padding:0; +} +.caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0; + padding-top:10px; + padding-left:1px; + margin:0; + white-space:pre; +} +.caption a:link, .caption a:visited { + color:#1f389c; +} +.caption a:hover, +.caption a:active { + color:#FFFFFF; +} +.caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +div.table-tabs { + padding:10px 0 0 1px; + margin:0; +} +div.table-tabs > button { + border: none; + cursor: pointer; + padding: 5px 12px 7px 12px; + font-weight: bold; + margin-right: 3px; +} +div.table-tabs > button.active-table-tab { + background: #F8981D; + color: #253441; +} +div.table-tabs > button.table-tab { + background: #4D7A97; + color: #FFFFFF; +} +.two-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); +} +.three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, auto); +} +.four-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(10%, max-content) minmax(10%, max-content) minmax(10%, auto); +} +@media screen and (max-width: 600px) { + .two-column-summary { + display: grid; + grid-template-columns: 1fr; + } +} +@media screen and (max-width: 800px) { + .three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(25%, auto); + } + .three-column-summary .col-last { + grid-column-end: span 2; + } +} +@media screen and (max-width: 1000px) { + .four-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); + } +} +.summary-table > div, .details-table > div { + text-align:left; + padding: 8px 3px 3px 7px; +} +.col-first, .col-second, .col-last, .col-constructor-name, .col-summary-item-name { + vertical-align:top; + padding-right:0; + padding-top:8px; + padding-bottom:3px; +} +.table-header { + background:#dee3e9; + font-weight: bold; +} +.col-first, .col-first { + font-size:13px; +} +.col-second, .col-second, .col-last, .col-constructor-name, .col-summary-item-name, .col-last { + font-size:13px; +} +.col-first, .col-second, .col-constructor-name { + vertical-align:top; + overflow: auto; +} +.col-last { + white-space:normal; +} +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-constructor-name a:link, .col-constructor-name a:visited, +.col-summary-item-name a:link, .col-summary-item-name a:visited, +.constant-values-container a:link, .constant-values-container a:visited, +.all-classes-container a:link, .all-classes-container a:visited, +.all-packages-container a:link, .all-packages-container a:visited { + font-weight:bold; +} +.table-sub-heading-color { + background-color:#EEEEFF; +} +.even-row-color, .even-row-color .table-header { + background-color:#FFFFFF; +} +.odd-row-color, .odd-row-color .table-header { + background-color:#EEEEEF; +} +/* + * Styles for contents. + */ +.deprecated-content { + margin:0; + padding:10px 0; +} +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +.col-last div { + padding-top:0; +} +.col-last a { + padding-bottom:3px; +} +.module-signature, +.package-signature, +.type-signature, +.member-signature { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + margin:14px 0; + white-space: pre-wrap; +} +.module-signature, +.package-signature, +.type-signature { + margin-top: 0; +} +.member-signature .type-parameters-long, +.member-signature .parameters, +.member-signature .exceptions { + display: inline-block; + vertical-align: top; + white-space: pre; +} +.member-signature .type-parameters { + white-space: normal; +} +/* + * Styles for formatting effect. + */ +.source-line-no { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:0 10px 5px 0; + color:#474747; +} +.deprecated-label, .descfrm-type-label, .implementation-label, .member-name-label, .member-name-link, +.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type, +.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label { + font-weight:bold; +} +.deprecation-comment, .help-footnote, .preview-comment { + font-style:italic; +} +.deprecation-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +.preview-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +div.block div.deprecation-comment { + font-style:normal; +} +/* + * Styles specific to HTML5 elements. + */ +main, nav, header, footer, section { + display:block; +} +/* + * Styles for javadoc search. + */ +.ui-autocomplete-category { + font-weight:bold; + font-size:15px; + padding:7px 0 7px 3px; + background-color:#4D7A97; + color:#FFFFFF; +} +.result-item { + font-size:13px; +} +.ui-autocomplete { + max-height:85%; + max-width:65%; + overflow-y:scroll; + overflow-x:scroll; + white-space:nowrap; + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); +} +ul.ui-autocomplete { + position:fixed; + z-index:999999; + background-color: #FFFFFF; +} +ul.ui-autocomplete li { + float:left; + clear:both; + width:100%; +} +.result-highlight { + font-weight:bold; +} +.ui-autocomplete .result-item { + font-size: inherit; +} +#search-input { + background-image:url('resources/glass.png'); + background-size:13px; + background-repeat:no-repeat; + background-position:2px 3px; + padding-left:20px; + position:relative; + right:-18px; + width:400px; +} +#reset-button { + background-color: rgb(255,255,255); + background-image:url('resources/x.png'); + background-position:center; + background-repeat:no-repeat; + background-size:12px; + border:0 none; + width:16px; + height:16px; + position:relative; + left:-4px; + top:-4px; + font-size:0px; +} +.watermark { + color:#545454; +} +.search-tag-desc-result { + font-style:italic; + font-size:11px; +} +.search-tag-holder-result { + font-style:italic; + font-size:12px; +} +.search-tag-result:target { + background-color:yellow; +} +.module-graph span { + display:none; + position:absolute; +} +.module-graph:hover span { + display:block; + margin: -100px 0 0 100px; + z-index: 1; +} +.inherited-list { + margin: 10px 0 10px 0; +} +section.class-description { + line-height: 1.4; +} +.summary section[class$="-summary"], .details section[class$="-details"], +.class-uses .detail, .serialized-class-details { + padding: 0px 20px 5px 10px; + border: 1px solid #ededed; + background-color: #f8f8f8; +} +.inherited-list, section[class$="-details"] .detail { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +.vertical-separator { + padding: 0 5px; +} +ul.help-section-list { + margin: 0; +} +ul.help-subtoc > li { + display: inline-block; + padding-right: 5px; + font-size: smaller; +} +ul.help-subtoc > li::before { + content: "\2022" ; + padding-right:2px; +} +span.help-note { + font-style: italic; +} +/* + * Indicator icon for external links. + */ +main a[href*="://"]::after { + content:""; + display:inline-block; + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); + background-size:100% 100%; + width:7px; + height:7px; + margin-left:2px; + margin-bottom:4px; +} +main a[href*="://"]:hover::after, +main a[href*="://"]:focus::after { + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); +} + +/* + * Styles for user-provided tables. + * + * borderless: + * No borders, vertical margins, styled caption. + * This style is provided for use with existing doc comments. + * In general, borderless tables should not be used for layout purposes. + * + * plain: + * Plain borders around table and cells, vertical margins, styled caption. + * Best for small tables or for complex tables for tables with cells that span + * rows and columns, when the "striped" style does not work well. + * + * striped: + * Borders around the table and vertical borders between cells, striped rows, + * vertical margins, styled caption. + * Best for tables that have a header row, and a body containing a series of simple rows. + */ + +table.borderless, +table.plain, +table.striped { + margin-top: 10px; + margin-bottom: 10px; +} +table.borderless > caption, +table.plain > caption, +table.striped > caption { + font-weight: bold; + font-size: smaller; +} +table.borderless th, table.borderless td, +table.plain th, table.plain td, +table.striped th, table.striped td { + padding: 2px 5px; +} +table.borderless, +table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th, +table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td { + border: none; +} +table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr { + background-color: transparent; +} +table.plain { + border-collapse: collapse; + border: 1px solid black; +} +table.plain > thead > tr, table.plain > tbody tr, table.plain > tr { + background-color: transparent; +} +table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th, +table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td { + border: 1px solid black; +} +table.striped { + border-collapse: collapse; + border: 1px solid black; +} +table.striped > thead { + background-color: #E3E3E3; +} +table.striped > thead > tr > th, table.striped > thead > tr > td { + border: 1px solid black; +} +table.striped > tbody > tr:nth-child(even) { + background-color: #EEE +} +table.striped > tbody > tr:nth-child(odd) { + background-color: #FFF +} +table.striped > tbody > tr > th, table.striped > tbody > tr > td { + border-left: 1px solid black; + border-right: 1px solid black; +} +table.striped > tbody > tr > th { + font-weight: normal; +} +/** + * Tweak font sizes and paddings for small screens. + */ +@media screen and (max-width: 1050px) { + #search-input { + width: 300px; + } +} +@media screen and (max-width: 800px) { + #search-input { + width: 200px; + } + .top-nav, + .bottom-nav { + font-size: 11px; + padding-top: 6px; + } + .sub-nav { + font-size: 11px; + } + .about-language { + padding-right: 16px; + } + ul.nav-list li, + .sub-nav .nav-list-search { + padding: 6px; + } + ul.sub-nav-list li { + padding-top: 5px; + } + main { + padding: 10px; + } + .summary section[class$="-summary"], .details section[class$="-details"], + .class-uses .detail, .serialized-class-details { + padding: 0 8px 5px 8px; + } + body { + -webkit-text-size-adjust: none; + } +} +@media screen and (max-width: 500px) { + #search-input { + width: 150px; + } + .top-nav, + .bottom-nav { + font-size: 10px; + } + .sub-nav { + font-size: 10px; + } + .about-language { + font-size: 10px; + padding-right: 12px; + } +} diff --git a/javadoc/0.17-rc1/tag-search-index.js b/javadoc/0.17-rc1/tag-search-index.js new file mode 100644 index 000000000..bf10aaf6d --- /dev/null +++ b/javadoc/0.17-rc1/tag-search-index.js @@ -0,0 +1 @@ +tagSearchIndex = [{"l":"Constant Field Values","h":"","u":"constant-values.html"},{"l":"Serialized Form","h":"","u":"serialized-form.html"}];updateSearchResults(); \ No newline at end of file diff --git a/javadoc/0.17-rc1/type-search-index.js b/javadoc/0.17-rc1/type-search-index.js new file mode 100644 index 000000000..18af55d33 --- /dev/null +++ b/javadoc/0.17-rc1/type-search-index.js @@ -0,0 +1 @@ +typeSearchIndex = [{"p":"org.bitcoinj.core","l":"AbstractBlockChain"},{"p":"org.bitcoinj.wallet.listeners","l":"AbstractKeyChainEventListener"},{"p":"org.bitcoinj.net","l":"AbstractTimeoutHandler"},{"p":"org.bitcoinj.protocols.payments","l":"PaymentProtocol.Ack"},{"p":"org.bitcoinj.base","l":"Address"},{"p":"org.bitcoinj.core.listeners","l":"AddressEventListener"},{"p":"org.bitcoinj.base.exceptions","l":"AddressFormatException"},{"p":"org.bitcoinj.base","l":"LegacyAddress.AddressHeader"},{"p":"org.bitcoinj.core","l":"AddressMessage"},{"p":"org.bitcoinj.base","l":"AddressParser"},{"p":"org.bitcoinj.base","l":"AddressParser.AddressParserProvider"},{"p":"org.bitcoinj.core","l":"AddressV1Message"},{"p":"org.bitcoinj.core","l":"AddressV2Message"},{"p":"org.bitcoinj.crypto","l":"AesKey"},{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"org.bitcoinj.wallet","l":"AllowUnconfirmedCoinSelector"},{"p":"org.bitcoinj.wallet","l":"AllRandomKeysRotating"},{"p":"org.bitcoinj.wallet","l":"DefaultRiskAnalysis.Analyzer"},{"p":"org.bitcoinj.wallet","l":"RiskAnalysis.Analyzer"},{"p":"org.bitcoinj.utils","l":"AppDataDirectory"},{"p":"org.bitcoinj.crypto","l":"BIP38PrivateKey.BadPassphraseException"},{"p":"org.bitcoinj.wallet","l":"UnreadableWalletException.BadPassword"},{"p":"org.bitcoinj.wallet","l":"Wallet.BadWalletEncryptionKeyException"},{"p":"org.bitcoinj.wallet","l":"Wallet.BalanceType"},{"p":"org.bitcoinj.base","l":"Base58"},{"p":"org.bitcoinj.core","l":"BaseMessage"},{"p":"org.bitcoinj.utils","l":"BaseTaggableObject"},{"p":"org.bitcoinj.wallet","l":"BasicKeyChain"},{"p":"org.bitcoinj.base","l":"Bech32"},{"p":"org.bitcoinj.base","l":"Bech32.Bech32Bytes"},{"p":"org.bitcoinj.base","l":"Bech32.Bech32Data"},{"p":"org.bitcoinj.crypto","l":"BIP38PrivateKey"},{"p":"org.bitcoinj.base","l":"BitcoinNetwork"},{"p":"org.bitcoinj.params","l":"BitcoinNetworkParams"},{"p":"org.bitcoinj.core","l":"BitcoinSerializer.BitcoinPacketHeader"},{"p":"org.bitcoinj.core","l":"BitcoinSerializer"},{"p":"org.bitcoinj.uri","l":"BitcoinURI"},{"p":"org.bitcoinj.uri","l":"BitcoinURIParseException"},{"p":"org.bitcoinj.core","l":"Block"},{"p":"org.bitcoinj.core","l":"BlockChain"},{"p":"org.bitcoinj.core.listeners","l":"BlockchainDownloadEventListener"},{"p":"org.bitcoinj.utils","l":"BlockFileLoader.BlockFileIterator"},{"p":"org.bitcoinj.utils","l":"BlockFileLoader"},{"p":"org.bitcoinj.net","l":"BlockingClient"},{"p":"org.bitcoinj.net","l":"BlockingClientManager"},{"p":"org.bitcoinj.core","l":"BlockLocator"},{"p":"org.bitcoinj.testing","l":"FakeTxBuilder.BlockPair"},{"p":"org.bitcoinj.core.listeners","l":"BlocksDownloadedEventListener"},{"p":"org.bitcoinj.store","l":"BlockStore"},{"p":"org.bitcoinj.store","l":"BlockStoreException"},{"p":"org.bitcoinj.core","l":"VerificationException.BlockVersionOutOfDate"},{"p":"org.bitcoinj.core","l":"BloomFilter"},{"p":"org.bitcoinj.core","l":"BloomFilter.BloomUpdate"},{"p":"org.bitcoinj.utils","l":"BriefLogFormatter"},{"p":"org.bitcoinj.utils","l":"BtcAutoFormat"},{"p":"org.bitcoinj.utils","l":"BtcFixedFormat"},{"p":"org.bitcoinj.utils","l":"BtcFormat"},{"p":"org.bitcoinj.base.internal","l":"Buffers"},{"p":"org.bitcoinj.utils","l":"BtcFormat.Builder"},{"p":"org.bitcoinj.wallet","l":"DeterministicKeyChain.Builder"},{"p":"org.bitcoinj.wallet","l":"KeyChainGroup.Builder"},{"p":"org.bitcoinj.base.internal","l":"ByteArray"},{"p":"org.bitcoinj.base.internal","l":"ByteUtils"},{"p":"org.bitcoinj.core.listeners","l":"ChainDownloadStartedEventListener"},{"p":"org.bitcoinj.store","l":"ChainFileLockedException"},{"p":"org.bitcoinj.core","l":"TransactionConfidence.Listener.ChangeReason"},{"p":"org.bitcoinj.core","l":"CheckpointManager"},{"p":"org.bitcoinj.crypto","l":"ChildNumber"},{"p":"org.bitcoinj.net","l":"ClientConnectionManager"},{"p":"org.bitcoinj.base","l":"Coin"},{"p":"org.bitcoinj.core","l":"VerificationException.CoinbaseHeightMismatch"},{"p":"org.bitcoinj.core","l":"VerificationException.CoinbaseScriptSizeOutOfRange"},{"p":"org.bitcoinj.wallet","l":"CoinSelection"},{"p":"org.bitcoinj.wallet","l":"CoinSelector"},{"p":"org.bitcoinj.wallet","l":"Wallet.CompletionException"},{"p":"org.bitcoinj.core","l":"TransactionConfidence.ConfidenceType"},{"p":"org.bitcoinj.core","l":"TransactionInput.ConnectionResult"},{"p":"org.bitcoinj.core","l":"TransactionInput.ConnectMode"},{"p":"org.bitcoinj.core","l":"Context"},{"p":"org.bitcoinj.utils","l":"ContextPropagatingThreadFactory"},{"p":"org.bitcoinj.wallet","l":"Wallet.CouldNotAdjustDownwards"},{"p":"org.bitcoinj.crypto.internal","l":"CryptoUtils"},{"p":"org.bitcoinj.wallet.listeners","l":"CurrentKeyChangeEventListener"},{"p":"org.bitcoinj.signers","l":"CustomTransactionSigner"},{"p":"org.bitcoinj.utils","l":"DaemonThreadFactory"},{"p":"org.bitcoinj.wallet","l":"DecryptingKeyBag"},{"p":"org.bitcoinj.wallet","l":"DefaultCoinSelector"},{"p":"org.bitcoinj.wallet","l":"DefaultKeyChainFactory"},{"p":"org.bitcoinj.wallet","l":"DefaultRiskAnalysis"},{"p":"org.bitcoinj.crypto","l":"TrustStoreLoader.DefaultTrustStoreLoader"},{"p":"org.bitcoinj.crypto","l":"DeterministicHierarchy"},{"p":"org.bitcoinj.crypto","l":"DeterministicKey"},{"p":"org.bitcoinj.wallet","l":"DeterministicKeyChain"},{"p":"org.bitcoinj.wallet","l":"DeterministicSeed"},{"p":"org.bitcoinj.wallet","l":"DeterministicUpgradeRequiredException"},{"p":"org.bitcoinj.wallet","l":"DeterministicUpgradeRequiresPassword"},{"p":"org.bitcoinj.net.discovery","l":"DnsDiscovery"},{"p":"org.bitcoinj.net.discovery","l":"DnsDiscovery.DnsSeedDiscovery"},{"p":"org.bitcoinj.testing","l":"FakeTxBuilder.DoubleSpends"},{"p":"org.bitcoinj.core.listeners","l":"DownloadProgressTracker"},{"p":"org.bitcoinj.crypto","l":"DumpedPrivateKey"},{"p":"org.bitcoinj.core","l":"VerificationException.DuplicatedOutPoint"},{"p":"org.bitcoinj.wallet","l":"Wallet.DustySendRequested"},{"p":"org.bitcoinj.crypto","l":"ECKey.ECDSASignature"},{"p":"org.bitcoinj.crypto","l":"ECKey"},{"p":"org.bitcoinj.core","l":"VerificationException.EmptyInputsOrOutputs"},{"p":"org.bitcoinj.core","l":"EmptyMessage"},{"p":"org.bitcoinj.crypto","l":"EncodedPrivateKey"},{"p":"org.bitcoinj.base","l":"Bech32.Encoding"},{"p":"org.bitcoinj.crypto","l":"EncryptableItem"},{"p":"org.bitcoinj.wallet","l":"EncryptableKeyChain"},{"p":"org.bitcoinj.crypto","l":"EncryptedData"},{"p":"org.bitcoinj.wallet","l":"Wallet.ExceededMaxTransactionSize"},{"p":"org.bitcoinj.core","l":"VerificationException.ExcessiveValue"},{"p":"org.bitcoinj.utils","l":"ExchangeRate"},{"p":"org.bitcoinj.protocols.payments","l":"PaymentProtocolException.Expired"},{"p":"org.bitcoinj.utils","l":"ExponentialBackoff"},{"p":"org.bitcoinj.testing","l":"FakeTxBuilder"},{"p":"org.bitcoinj.core","l":"FeeFilterMessage"},{"p":"org.bitcoinj.base.utils","l":"Fiat"},{"p":"org.bitcoinj.crypto","l":"TrustStoreLoader.FileTrustStoreLoader"},{"p":"org.bitcoinj.core","l":"FilteredBlock"},{"p":"org.bitcoinj.wallet","l":"FilteringCoinSelector"},{"p":"org.bitcoinj.net","l":"FilterMerger"},{"p":"org.bitcoinj.core","l":"PeerGroup.FilterRecalculateMode"},{"p":"org.bitcoinj.core","l":"FullPrunedBlockChain"},{"p":"org.bitcoinj.store","l":"FullPrunedBlockStore"},{"p":"org.bitcoinj.base.internal","l":"FutureUtils"},{"p":"org.bitcoinj.wallet","l":"UnreadableWalletException.FutureVersion"},{"p":"org.bitcoinj.core","l":"GetAddrMessage"},{"p":"org.bitcoinj.core","l":"GetBlocksMessage"},{"p":"org.bitcoinj.core.listeners","l":"GetDataEventListener"},{"p":"org.bitcoinj.core","l":"GetDataMessage"},{"p":"org.bitcoinj.core","l":"GetHeadersMessage"},{"p":"org.bitcoinj.crypto","l":"HDDerivationException"},{"p":"org.bitcoinj.crypto","l":"HDKeyDerivation"},{"p":"org.bitcoinj.crypto","l":"HDPath"},{"p":"org.bitcoinj.crypto","l":"HDUtils"},{"p":"org.bitcoinj.core","l":"HeadersMessage"},{"p":"org.bitcoinj.core","l":"LockTime.HeightLock"},{"p":"org.bitcoinj.base.internal","l":"HexFormat"},{"p":"org.bitcoinj.core","l":"InsufficientMoneyException"},{"p":"org.bitcoinj.base.internal","l":"InternalUtils"},{"p":"org.bitcoinj.base.exceptions","l":"AddressFormatException.InvalidCharacter"},{"p":"org.bitcoinj.base.exceptions","l":"AddressFormatException.InvalidChecksum"},{"p":"org.bitcoinj.crypto","l":"KeyCrypterException.InvalidCipherText"},{"p":"org.bitcoinj.base.exceptions","l":"AddressFormatException.InvalidDataLength"},{"p":"org.bitcoinj.protocols.payments","l":"PaymentProtocolException.InvalidNetwork"},{"p":"org.bitcoinj.protocols.payments","l":"PaymentProtocolException.InvalidOutputs"},{"p":"org.bitcoinj.protocols.payments","l":"PaymentProtocolException.InvalidPaymentRequestURL"},{"p":"org.bitcoinj.protocols.payments","l":"PaymentProtocolException.InvalidPaymentURL"},{"p":"org.bitcoinj.protocols.payments","l":"PaymentProtocolException.InvalidPkiData"},{"p":"org.bitcoinj.protocols.payments","l":"PaymentProtocolException.InvalidPkiType"},{"p":"org.bitcoinj.base.exceptions","l":"AddressFormatException.InvalidPrefix"},{"p":"org.bitcoinj.protocols.payments","l":"PaymentProtocolException.InvalidVersion"},{"p":"org.bitcoinj.core","l":"InventoryItem"},{"p":"org.bitcoinj.core","l":"InventoryMessage"},{"p":"org.bitcoinj.base.internal","l":"InternalUtils.Joiner"},{"p":"org.bitcoinj.wallet","l":"KeyBag"},{"p":"org.bitcoinj.wallet","l":"KeyChain"},{"p":"org.bitcoinj.wallet.listeners","l":"KeyChainEventListener"},{"p":"org.bitcoinj.wallet","l":"KeyChainFactory"},{"p":"org.bitcoinj.wallet","l":"KeyChainGroup"},{"p":"org.bitcoinj.wallet","l":"KeyChainGroupStructure"},{"p":"org.bitcoinj.crypto","l":"KeyCrypter"},{"p":"org.bitcoinj.crypto","l":"KeyCrypterException"},{"p":"org.bitcoinj.crypto","l":"KeyCrypterScrypt"},{"p":"org.bitcoinj.crypto","l":"ECKey.KeyIsEncryptedException"},{"p":"org.bitcoinj.wallet","l":"KeyChain.KeyPurpose"},{"p":"org.bitcoinj.wallet","l":"KeyTimeCoinSelector"},{"p":"org.bitcoinj.core","l":"VerificationException.LargerThanMaxBlockSize"},{"p":"org.bitcoinj.crypto","l":"LazyECPoint"},{"p":"org.bitcoinj.base","l":"LegacyAddress"},{"p":"org.bitcoinj.crypto","l":"LinuxSecureRandom"},{"p":"org.bitcoinj.utils","l":"ListenableCompletableFuture"},{"p":"org.bitcoinj.utils","l":"ListenableCompletionStage"},{"p":"org.bitcoinj.core","l":"TransactionConfidence.Listener"},{"p":"org.bitcoinj.wallet","l":"WalletFiles.Listener"},{"p":"org.bitcoinj.utils","l":"ListenerRegistration"},{"p":"org.bitcoinj.core","l":"ListMessage"},{"p":"org.bitcoinj.signers","l":"LocalTransactionSigner"},{"p":"org.bitcoinj.core","l":"LockTime"},{"p":"org.bitcoinj.params","l":"MainNetParams"},{"p":"org.bitcoinj.store","l":"MemoryBlockStore"},{"p":"org.bitcoinj.store","l":"MemoryFullPrunedBlockStore"},{"p":"org.bitcoinj.core","l":"MemoryPoolMessage"},{"p":"org.bitcoinj.core","l":"Message"},{"p":"org.bitcoinj.core","l":"MessageSerializer"},{"p":"org.bitcoinj.crypto.utils","l":"MessageVerifyUtils"},{"p":"org.bitcoinj.net","l":"MessageWriteTarget"},{"p":"org.bitcoinj.crypto","l":"ECKey.MissingPrivateKeyException"},{"p":"org.bitcoinj.signers","l":"TransactionSigner.MissingSignatureException"},{"p":"org.bitcoinj.signers","l":"MissingSigResolutionSigner"},{"p":"org.bitcoinj.wallet","l":"Wallet.MissingSigsMode"},{"p":"org.bitcoinj.crypto","l":"MnemonicException.MnemonicChecksumException"},{"p":"org.bitcoinj.crypto","l":"MnemonicCode"},{"p":"org.bitcoinj.crypto","l":"MnemonicException"},{"p":"org.bitcoinj.crypto","l":"MnemonicException.MnemonicLengthException"},{"p":"org.bitcoinj.crypto","l":"MnemonicException.MnemonicWordException"},{"p":"org.bitcoinj.testing","l":"MockAltNetwork"},{"p":"org.bitcoinj.testing","l":"MockAltNetworkParams"},{"p":"org.bitcoinj.base","l":"Monetary"},{"p":"org.bitcoinj.base.utils","l":"MonetaryFormat"},{"p":"org.bitcoinj.wallet","l":"Wallet.MultipleOpReturnRequested"},{"p":"org.bitcoinj.net.discovery","l":"MultiplexingDiscovery"},{"p":"org.bitcoinj.jni","l":"NativeBlockChainListener"},{"p":"org.bitcoinj.jni","l":"NativeFutureCallback"},{"p":"org.bitcoinj.jni","l":"NativeKeyChainEventListener"},{"p":"org.bitcoinj.jni","l":"NativeScriptsChangeEventListener"},{"p":"org.bitcoinj.jni","l":"NativeTransactionConfidenceEventListener"},{"p":"org.bitcoinj.jni","l":"NativeTransactionConfidenceListener"},{"p":"org.bitcoinj.jni","l":"NativeWalletChangeEventListener"},{"p":"org.bitcoinj.jni","l":"NativeWalletCoinsReceivedEventListener"},{"p":"org.bitcoinj.jni","l":"NativeWalletCoinsSentEventListener"},{"p":"org.bitcoinj.jni","l":"NativeWalletReorganizeEventListener"},{"p":"org.bitcoinj.core","l":"VerificationException.NegativeValueOutput"},{"p":"org.bitcoinj.base","l":"Network"},{"p":"org.bitcoinj.core","l":"NetworkParameters"},{"p":"org.bitcoinj.params","l":"Networks"},{"p":"org.bitcoinj.core.listeners","l":"NewBestBlockListener"},{"p":"org.bitcoinj.core","l":"AbstractBlockChain.NewBlockType"},{"p":"org.bitcoinj.net","l":"NioClient"},{"p":"org.bitcoinj.net","l":"NioClientManager"},{"p":"org.bitcoinj.net","l":"NioServer"},{"p":"org.bitcoinj.core","l":"VerificationException.NoncanonicalSignature"},{"p":"org.bitcoinj.core","l":"NotFoundMessage"},{"p":"org.bitcoinj.core.listeners","l":"OnTransactionBroadcastListener"},{"p":"org.bitcoinj.uri","l":"OptionalFieldValidationException"},{"p":"org.bitcoinj.base.internal","l":"PlatformUtils.OS"},{"p":"org.bitcoinj.protocols.payments","l":"PaymentProtocol.Output"},{"p":"org.bitcoinj.base","l":"LegacyAddress.P2SHHeader"},{"p":"org.bitcoinj.utils","l":"ExponentialBackoff.Params"},{"p":"org.bitcoinj.core","l":"PartialMerkleTree"},{"p":"org.bitcoinj.protocols.payments","l":"PaymentProtocol"},{"p":"org.bitcoinj.protocols.payments","l":"PaymentProtocolException"},{"p":"org.bitcoinj.protocols.payments","l":"PaymentSession"},{"p":"org.bitcoinj.crypto","l":"PBKDF2SHA512"},{"p":"org.bitcoinj.core","l":"Peer"},{"p":"org.bitcoinj.core","l":"PeerAddress"},{"p":"org.bitcoinj.core.listeners","l":"PeerConnectedEventListener"},{"p":"org.bitcoinj.core.listeners","l":"PeerDataEventListener"},{"p":"org.bitcoinj.core.listeners","l":"PeerDisconnectedEventListener"},{"p":"org.bitcoinj.core.listeners","l":"PeerDiscoveredEventListener"},{"p":"org.bitcoinj.net.discovery","l":"PeerDiscovery"},{"p":"org.bitcoinj.net.discovery","l":"PeerDiscoveryException"},{"p":"org.bitcoinj.core","l":"PeerException"},{"p":"org.bitcoinj.core","l":"PeerFilterProvider"},{"p":"org.bitcoinj.core","l":"PeerGroup"},{"p":"org.bitcoinj.core","l":"PeerSocketHandler"},{"p":"org.bitcoinj.core","l":"Ping"},{"p":"org.bitcoinj.protocols.payments","l":"PaymentProtocol.PkiVerificationData"},{"p":"org.bitcoinj.protocols.payments","l":"PaymentProtocolException.PkiVerificationException"},{"p":"org.bitcoinj.base.internal","l":"PlatformUtils"},{"p":"org.bitcoinj.core","l":"Pong"},{"p":"org.bitcoinj.wallet","l":"WalletTransaction.Pool"},{"p":"org.bitcoinj.base.internal","l":"Preconditions"},{"p":"org.bitcoinj.core.listeners","l":"PreMessageReceivedEventListener"},{"p":"org.bitcoinj.core","l":"TransactionBroadcast.ProgressCallback"},{"p":"org.bitcoinj.signers","l":"TransactionSigner.ProposedTransaction"},{"p":"org.bitcoinj.core","l":"ProtocolException"},{"p":"org.bitcoinj.core","l":"ProtocolVersion"},{"p":"org.bitcoinj.core","l":"PrunedException"},{"p":"org.bitcoinj.crypto","l":"HDKeyDerivation.PublicDeriveMode"},{"p":"org.bitcoinj.crypto","l":"KeyCrypterException.PublicPrivateMismatch"},{"p":"org.bitcoinj.core","l":"Transaction.Purpose"},{"p":"org.bitcoinj.crypto","l":"HDKeyDerivation.RawKeyBytes"},{"p":"org.bitcoinj.wallet","l":"RedeemData"},{"p":"org.bitcoinj.params","l":"RegTestParams"},{"p":"org.bitcoinj.core","l":"RejectMessage.RejectCode"},{"p":"org.bitcoinj.core","l":"RejectedTransactionException"},{"p":"org.bitcoinj.core","l":"RejectMessage"},{"p":"org.bitcoinj.core.listeners","l":"ReorganizeListener"},{"p":"org.bitcoinj.uri","l":"RequiredFieldValidationException"},{"p":"org.bitcoinj.net","l":"FilterMerger.Result"},{"p":"org.bitcoinj.wallet","l":"RiskAnalysis.Result"},{"p":"org.bitcoinj.wallet","l":"RiskAnalysis"},{"p":"org.bitcoinj.wallet","l":"DefaultRiskAnalysis.RuleViolation"},{"p":"org.bitcoinj.base.internal","l":"PlatformUtils.Runtime"},{"p":"org.bitcoinj.script","l":"Script"},{"p":"org.bitcoinj.script","l":"ScriptBuilder"},{"p":"org.bitcoinj.script","l":"ScriptChunk"},{"p":"org.bitcoinj.script","l":"ScriptError"},{"p":"org.bitcoinj.script","l":"ScriptException"},{"p":"org.bitcoinj.script","l":"ScriptOpCodes"},{"p":"org.bitcoinj.script","l":"ScriptPattern"},{"p":"org.bitcoinj.wallet.listeners","l":"ScriptsChangeEventListener"},{"p":"org.bitcoinj.base","l":"ScriptType"},{"p":"org.bitcoinj.net.discovery","l":"SeedPeers"},{"p":"org.bitcoinj.base","l":"SegwitAddress"},{"p":"org.bitcoinj.base","l":"SegwitAddress.SegwitHrp"},{"p":"org.bitcoinj.core","l":"SendAddrV2Message"},{"p":"org.bitcoinj.core","l":"SendHeadersMessage"},{"p":"org.bitcoinj.wallet","l":"SendRequest"},{"p":"org.bitcoinj.wallet","l":"Wallet.SendResult"},{"p":"org.bitcoinj.core","l":"Services"},{"p":"org.bitcoinj.base","l":"Sha256Hash"},{"p":"org.bitcoinj.core","l":"Transaction.SigHash"},{"p":"org.bitcoinj.signers","l":"CustomTransactionSigner.SignatureAndKey"},{"p":"org.bitcoinj.crypto","l":"SignatureDecodeException"},{"p":"org.bitcoinj.params","l":"SigNetParams"},{"p":"org.bitcoinj.net","l":"SocketTimeoutTask"},{"p":"org.bitcoinj.core","l":"TransactionConfidence.Source"},{"p":"org.bitcoinj.base.internal","l":"InternalUtils.Splitter"},{"p":"org.bitcoinj.store","l":"SPVBlockStore"},{"p":"org.bitcoinj.wallet","l":"BasicKeyChain.State"},{"p":"org.bitcoinj.base.internal","l":"Stopwatch"},{"p":"org.bitcoinj.core","l":"StoredBlock"},{"p":"org.bitcoinj.store","l":"MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag"},{"p":"org.bitcoinj.core","l":"StoredUndoableBlock"},{"p":"org.bitcoinj.net","l":"StreamConnection"},{"p":"org.bitcoinj.net","l":"StreamConnectionFactory"},{"p":"org.bitcoinj.base.internal","l":"StreamUtils"},{"p":"org.bitcoinj.utils","l":"BtcAutoFormat.Style"},{"p":"org.bitcoinj.utils","l":"TaggableObject"},{"p":"org.bitcoinj.params","l":"TestNet3Params"},{"p":"org.bitcoinj.utils","l":"Threading"},{"p":"org.bitcoinj.base.internal","l":"FutureUtils.ThrowingSupplier"},{"p":"org.bitcoinj.core","l":"LockTime.TimeLock"},{"p":"org.bitcoinj.net","l":"TimeoutHandler"},{"p":"org.bitcoinj.base.internal","l":"TimeUtils"},{"p":"org.bitcoinj.core.internal","l":"TorUtils"},{"p":"org.bitcoinj.core","l":"Transaction"},{"p":"org.bitcoinj.core","l":"TransactionBag"},{"p":"org.bitcoinj.core","l":"TransactionBroadcast"},{"p":"org.bitcoinj.core","l":"TransactionBroadcaster"},{"p":"org.bitcoinj.core","l":"TransactionConfidence"},{"p":"org.bitcoinj.core.listeners","l":"TransactionConfidenceEventListener"},{"p":"org.bitcoinj.core","l":"TransactionInput"},{"p":"org.bitcoinj.core","l":"TransactionOutPoint"},{"p":"org.bitcoinj.core","l":"TransactionOutput"},{"p":"org.bitcoinj.core","l":"TransactionOutputChanges"},{"p":"org.bitcoinj.core.listeners","l":"TransactionReceivedInBlockListener"},{"p":"org.bitcoinj.crypto","l":"TransactionSignature"},{"p":"org.bitcoinj.signers","l":"TransactionSigner"},{"p":"org.bitcoinj.core","l":"TransactionWitness"},{"p":"org.bitcoinj.crypto","l":"TrustStoreLoader"},{"p":"org.bitcoinj.core","l":"TxConfidenceTable"},{"p":"org.bitcoinj.core","l":"InventoryItem.Type"},{"p":"org.bitcoinj.core","l":"VerificationException.UnexpectedCoinbaseInput"},{"p":"org.bitcoinj.base.exceptions","l":"AddressFormatException.UnexpectedWitnessVersion"},{"p":"org.bitcoinj.params","l":"UnitTestParams"},{"p":"org.bitcoinj.core","l":"UnknownMessage"},{"p":"org.bitcoinj.wallet","l":"UnreadableWalletException"},{"p":"org.bitcoinj.utils","l":"Threading.UserThread"},{"p":"org.bitcoinj.core","l":"Utils"},{"p":"org.bitcoinj.core","l":"UTXO"},{"p":"org.bitcoinj.core","l":"UTXOProvider"},{"p":"org.bitcoinj.core","l":"UTXOProviderException"},{"p":"org.bitcoinj.base","l":"VarInt"},{"p":"org.bitcoinj.core","l":"VerificationException"},{"p":"org.bitcoinj.core","l":"Block.VerifyFlag"},{"p":"org.bitcoinj.script","l":"Script.VerifyFlag"},{"p":"org.bitcoinj.core","l":"VersionAck"},{"p":"org.bitcoinj.core","l":"VersionMessage"},{"p":"org.bitcoinj.utils","l":"VersionTally"},{"p":"org.bitcoinj.wallet","l":"Wallet"},{"p":"org.bitcoinj.kits","l":"WalletAppKit"},{"p":"org.bitcoinj.wallet.listeners","l":"WalletChangeEventListener"},{"p":"org.bitcoinj.wallet.listeners","l":"WalletCoinsReceivedEventListener"},{"p":"org.bitcoinj.wallet.listeners","l":"WalletCoinsSentEventListener"},{"p":"org.bitcoinj.wallet","l":"WalletExtension"},{"p":"org.bitcoinj.wallet","l":"WalletProtobufSerializer.WalletFactory"},{"p":"org.bitcoinj.wallet","l":"WalletFiles"},{"p":"org.bitcoinj.wallet","l":"WalletProtobufSerializer"},{"p":"org.bitcoinj.wallet.listeners","l":"WalletReorganizeEventListener"},{"p":"org.bitcoinj.wallet","l":"WalletTransaction"},{"p":"org.bitcoinj.base.exceptions","l":"AddressFormatException.WrongNetwork"},{"p":"org.bitcoinj.wallet","l":"UnreadableWalletException.WrongNetwork"},{"p":"org.bitcoinj.crypto","l":"X509Utils"}];updateSearchResults(); \ No newline at end of file diff --git a/pre-release-notes.md b/pre-release-notes.md index ab193e2d1..dfae39bfd 100644 --- a/pre-release-notes.md +++ b/pre-release-notes.md @@ -16,6 +16,20 @@ title: "Pre-release notes" These versions are not yet released. For official releases, see the release notes. +## Version 0.17 release candidate 1 + +See the preliminary API documentation. + +Breaking change: + +* Make sure in the 0.17 cycle, migrate all usage of Guava `ListenableFuture` to `CompletableFuture` + +Various: + +* More `Date` to `Instant` conversions +* Some removed methods are added back as deprecated +* Clarify concept of `Script` creation time in the JavaDoc + ## Version 0.17 beta 1 See the preliminary API documentation.